/* ------------------------------------------------------------------
   GTA Dispute Tool · stylesheet
   Palette / header structure / typography match ld.graintrade.org.au
   exactly. GTA navy #1b3a6b, hover #254d8c, Arial sans-serif.
   ------------------------------------------------------------------ */

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: Arial, sans-serif;
  background: #f5f5f5;
  color: #333;
  line-height: 1.5;
}

/* ---------------------- header (ported 1:1 from LDs) ---------------------- */
header {
  background-color: #1b3a6b;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}
header a {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
header img {
  height: 60px;
  width: auto;
  mix-blend-mode: screen;
}
.header-divider {
  width: 1px;
  height: 48px;
  background: rgba(255, 255, 255, 0.25);
  flex-shrink: 0;
}
.header-text h1 {
  color: #fff;
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.25;
}
.header-text p {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.78rem;
  margin-top: 4px;
  font-style: italic;
}

/* ---------------------- layout ---------------------- */
.container {
  max-width: 1300px;
  margin: 30px auto;
  padding: 0 16px;
}

.intro { margin-bottom: 20px; }
.intro h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1b3a6b;
  margin-bottom: 6px;
}
.intro p { color: #555; max-width: 70ch; }

/* ---------------------- cards ---------------------- */
.card {
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  padding: 20px;
  margin-bottom: 16px;
}
.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: #1b3a6b;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: 0;
  flex: 1;
}
.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding: 0 0 10px 0;
  border-bottom: 1px solid #ebebeb;
  background: transparent;
  color: inherit;
}
.card-position { border-left: 4px solid #1b3a6b; }
.card-disclaimer {
  background: #fafafa;
  color: #666;
  font-size: 0.85rem;
}

/* ---------------------- templates ---------------------- */
.templates {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.chip {
  background: #fff;
  color: #1b3a6b;
  border: 1px solid #cfd7e3;
  border-radius: 999px;
  padding: 6px 14px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.12s, color 0.12s, border-color 0.12s;
}
.chip:hover, .chip:focus-visible {
  background: #1b3a6b;
  color: #fff;
  border-color: #1b3a6b;
  outline: none;
}

/* ---------------------- form ---------------------- */
.form { display: grid; gap: 16px; }
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.form-row { display: flex; flex-direction: column; gap: 6px; }
.form-row label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #1b3a6b;
  letter-spacing: 0.02em;
}
.form-row textarea,
.form-row input,
.form-row select {
  font: inherit;
  font-size: 0.9rem;
  color: #333;
  padding: 8px 10px;
  height: 36px;
  border: 1px solid #cfd7e3;
  border-radius: 4px;
  background: #fff;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.form-row textarea {
  resize: vertical;
  min-height: 120px;
  height: auto;
}
.form-row textarea:focus,
.form-row input:focus,
.form-row select:focus {
  outline: none;
  border-color: #1b3a6b;
  box-shadow: 0 0 0 3px rgba(27, 58, 107, 0.15);
}

/* ---------------------- buttons (ported from LDs) ---------------------- */
.form-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-top: 4px;
}
.btn {
  padding: 8px 18px;
  height: 36px;
  border: none;
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.12s, color 0.12s;
}
.btn-search { background-color: #1b3a6b; color: #fff; }
.btn-search:hover { background-color: #254d8c; }
.btn-search:disabled { background-color: #9aa4b5; cursor: not-allowed; }
.btn-clear { background-color: #e0e0e0; color: #333; }
.btn-clear:hover { background-color: #cfcfcf; }
.btn-changes {
  background-color: #fff;
  color: #1b3a6b;
  border: 2px solid #1b3a6b;
}
.btn-changes:hover { background-color: #eef3fb; }
.btn-changes.active,
.btn-changes[aria-expanded="true"] { background-color: #1b3a6b; color: #fff; }

.toggle {
  height: auto;
  padding: 4px 12px;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ---------------------- result ---------------------- */
.result { display: block; }
.disclaimer-top {
  background: #fff8e1;
  border: 1px solid #e6c869;
  color: #6b4f0d;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 0.88rem;
  margin-bottom: 16px;
}

/* bands (reuse LD badge styles) */
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge[data-band="strong"]    { background: #d1fae5; color: #166534; }
.badge[data-band="moderate"]  { background: #fff3cd; color: #8a6200; }
.badge[data-band="uncertain"] { background: #f3f4f6; color: #6b7280; }
.badge[data-band="weak"]      { background: #fee2e2; color: #991b1b; }

.info {
  background: transparent;
  border: none;
  color: #6b7280;
  font-size: 1rem;
  cursor: help;
}

.collapsible { padding-top: 4px; }
.collapsible p { margin-bottom: 8px; }

.citation-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.citation-list li {
  padding: 8px 0;
  border-bottom: 1px solid #ebebeb;
  font-size: 0.9rem;
  color: #333;
}
.citation-list li:last-child { border-bottom: none; }
.citation-list .src {
  display: block;
  font-size: 0.78rem;
  color: #666;
  margin-top: 2px;
}

#result-next-steps { padding-left: 20px; margin: 0; }
#result-next-steps li { margin: 6px 0; font-size: 0.9rem; }

#result-factors { list-style-position: inside; padding-left: 0; margin: 0; }
#result-factors li { margin: 6px 0; font-size: 0.9rem; }

/* ---------------------- loading / error ---------------------- */
.loading { color: #555; font-style: italic; }
.error {
  border-left: 4px solid #991b1b;
  color: #991b1b;
  background: #fee2e2;
}

/* ---------------------- footer ---------------------- */
.site-footer {
  border-top: 1px solid #e0e0e0;
  background: #fff;
  margin-top: 40px;
  padding: 16px 0;
  color: #666;
  font-size: 0.82rem;
}
.site-footer .container { margin: 0 auto; }
