/* =====================================================================
   Ohangwena EOI Investment Portal
   css/components.css — reusable UI components
   ===================================================================== */

/* ------------------------------------------------------------------ */
/* Buttons                                                             */
/* ------------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  min-height: 48px;
  padding: var(--s3) var(--s5);
  border: 1px solid transparent;
  border-radius: 12px;
  font: inherit;
  font-weight: 600;
  font-size: var(--step--1);
  letter-spacing: 0.04em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}
.btn--primary { background: var(--ohg-crest); color: #ffffff !important; border-color: var(--ohg-crest); border-radius: 40px; }
.btn--primary:hover { background: var(--ohg-crest-deep); color: #fff; }

.btn--secondary { background: transparent; color: var(--ohg-crest); border-color: var(--ohg-crest); }
.btn--secondary:hover { background: var(--ohg-crest-tint); }

.btn--gold { background: var(--ohg-mahangu); color: var(--ohg-ink); border-color: var(--ohg-mahangu); }
.btn--gold:hover { background: #b8920f; border-color: #b8920f; color: var(--ohg-ink); }

/* On dark surfaces the outline button must invert, or it disappears. */
.section--crest .btn--secondary,
.page-head .btn--secondary,
.hero .btn--secondary { color: #fff; border-color: rgb(255 255 255 / 0.55); }
.section--crest .btn--secondary:hover,
.page-head .btn--secondary:hover,
.hero .btn--secondary:hover { background: rgb(255 255 255 / 0.12); color: #fff; }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--s3); }

/* ------------------------------------------------------------------ */
/* Hero                                                                */
/* ------------------------------------------------------------------ */

.hero {
  background: var(--ohg-crest-deep);
  color: #fff;
  padding-block: var(--s9) var(--s8);
}

/* 50/50. The circle carries transparent corners and a transparent centre, so
   it sits directly on the hero blue with no plate behind it. */
.hero > .wrap,
.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s8);
  align-items: center;
}
.hero__figure { justify-self: center; width: 100%; max-width: 560px; }
/* The key visual is supplied as a JPEG with its own warm background, so it
   cannot sit transparently on the hero the way the old cut-out did. A
   hairline frame and a small radius make it read as a deliberate panel
   rather than a pasted rectangle. */
.hero__figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
  border: 1px solid rgb(255 255 255 / 0.22);
}
.hero h1 { color: #fff; max-width: 16ch; }
.hero__lede {
  font-family: var(--font-editorial);
  /* Fixed at 18px by request, rather than the fluid --step-1 (19.2-22.7px). */
  font-size: 1.1rem;
  line-height: 1.55;
  color: rgb(255 255 255 / 0.85);
  max-width: 56ch;
  margin-bottom: var(--s6);
}

.notice-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  padding: var(--s2) var(--s4);
  border: 1px solid var(--ohg-mahangu);
  border-radius: 999px;
  font-size: var(--step--1);
  font-weight: 500;
  margin-bottom: var(--s5);
  background: rgb(201 162 39 / 0.12);
}
.notice-chip__dot {
  width: 8px; height: 8px; border-radius: 999px;
  background: var(--ohg-mahangu); flex: none;
}

/* Notice-at-a-glance panel */
.notice-panel {
  background: rgb(255 255 255 / 0.06);
  border: 1px solid rgb(255 255 255 / 0.22);
  border-top: 3px solid var(--ohg-mahangu);
  padding: var(--s5);
}
.notice-panel h2 {
  font-size: var(--step--1);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ohg-mahangu-light);
  margin: 0 0 var(--s4);
}
.notice-panel dl { margin: 0; }
.notice-panel dl > div {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: var(--s4); padding-block: var(--s3);
  border-bottom: 1px solid rgb(255 255 255 / 0.14);
}
.notice-panel dt { font-size: var(--step--1); color: rgb(255 255 255 / 0.72); }
.notice-panel dd {
  margin: 0; font-weight: 600; text-align: right; font-size: var(--step--1);
}
.notice-panel__foot {
  margin: var(--s4) 0 0; font-size: 0.78rem; color: rgb(255 255 255 / 0.7);
}

/* ------------------------------------------------------------------ */
/* Quick action bar                                                    */
/* ------------------------------------------------------------------ */

.quickbar { background: var(--ohg-crest); }
.quickbar ul {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(6, 1fr);
}
.quickbar li { margin: 0; }
.quickbar a {
  display: flex; flex-direction: column; gap: var(--s1);
  padding: var(--s5) var(--s4);
  color: #fff; text-decoration: none;
  border-right: 1px solid rgb(255 255 255 / 0.15);
  height: 100%;
  transition: background-color 150ms ease;
}
.quickbar li:last-child a { border-right: none; }
.quickbar a:hover { background: var(--ohg-crest-deep); color: #fff; }
.quickbar__n {
  font-family: var(--font-mono); font-size: 0.72rem;
  color: var(--ohg-mahangu-light); letter-spacing: 0.1em;
}
.quickbar__t { font-size: var(--step--1); font-weight: 600; line-height: 1.3; }

/* ------------------------------------------------------------------ */
/* SIGNATURE: sector envelope bar                                      */
/* Shows N$366m–870m as the sum of five published envelopes, so the     */
/* headline figure evidences itself instead of asking for trust.       */
/* ------------------------------------------------------------------ */

.envelope { margin-block: var(--s7) var(--s5); }

.envelope__bar {
  display: flex;
  width: 100%;
  height: 84px;
  border: 1px solid var(--ohg-line);
  background: var(--ohg-paper);
  overflow: hidden;
}
.envelope__seg {
  display: flex; flex-direction: column; justify-content: flex-end;
  gap: var(--s1);
  padding: var(--s3);
  /* A floor so the smallest envelope can still show its own label.
     Creative Industry is 2.5% of the bar — proportionally honest but
     unreadable without this. The printed range keeps the data exact. */
  min-width: 96px;
  border-right: 1px solid rgb(255 255 255 / 0.35);
  text-decoration: none;
  color: #fff;
  transition: filter 150ms ease;
}
.envelope__seg:last-child { border-right: none; }
.envelope__seg:hover { filter: brightness(1.12); color: #fff; }
.envelope__seg-name {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.envelope__seg-val {
  font-family: var(--font-mono); font-size: 0.72rem;
  opacity: 0.92; white-space: nowrap;
}

/* Every fill carries white text at >= 4.9:1, verified. */
.envelope__seg--agriculture { background: #2e6b4f; }
.envelope__seg--manufacturing { background: #00497e; }
.envelope__seg--healthcare { background: #2f6e96; }
.envelope__seg--tourism { background: #8a6d1f; }
.envelope__seg--creative { background: #6b4e0f; }

.envelope__scale {
  display: flex; justify-content: space-between; gap: var(--s4);
  margin-top: var(--s3);
  font-family: var(--font-mono); font-size: var(--step--1);
  color: var(--ohg-ink-muted);
}
.envelope__scale strong { color: var(--ohg-ink); font-weight: 500; }
.envelope__note {
  margin-top: var(--s4); font-size: 16px;
  color: var(--ohg-ink-muted); 
}

/* Reveal is additive only: segments render at full size with no JS, so a
   blocked or slow script can never leave the bar invisible. */
.envelope.is-visible .envelope__seg {
  animation: env-grow 700ms cubic-bezier(0.2, 0.8, 0.3, 1) both;
}
@keyframes env-grow {
  from { transform: scaleX(0); transform-origin: left; }
  to { transform: scaleX(1); transform-origin: left; }
}

/* ------------------------------------------------------------------ */
/* Statistics                                                          */
/* ------------------------------------------------------------------ */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
  gap: var(--s5);
  border-top: 2px solid var(--ohg-ink);
  padding-top: var(--s5);
}
.stat__v {
  font-family: var(--font-mono);
  font-size: var(--step-4);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
  display: block;
  margin-bottom: var(--s2);
}
.stat__l { font-size: var(--step--1); color: var(--ohg-ink-muted); display: block; }
.stat__n { display: block; font-size: 0.75rem; color: var(--ohg-ink-faint); margin-top: var(--s1); }

/* ------------------------------------------------------------------ */
/* Cards                                                               */
/* ------------------------------------------------------------------ */

.card {
  background: var(--ohg-paper);
  border: 1px solid var(--ohg-line);
  border-radius: 4px;
  padding: var(--s5);
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}
.card h3 { margin: 0; font-size: var(--step-0); }
.card p { margin: 0; color: var(--ohg-ink-muted); font-size: var(--step--1); }
a.card { text-decoration: none; color: inherit; transition: border-color 150ms ease; }
a.card:hover { border-color: var(--ohg-crest); color: inherit; }

.sector-card { border-top: 4px solid var(--ohg-crest); }
.sector-card--agriculture { border-top-color: #2e6b4f; }
.sector-card--manufacturing { border-top-color: #00497e; }
.sector-card--healthcare { border-top-color: #2f6e96; }
.sector-card--tourism { border-top-color: #8a6d1f; }
.sector-card--creative { border-top-color: #6b4e0f; }

.sector-card ul {
  margin: 0; padding-left: 1.1em;
  font-size: var(--step--1); color: var(--ohg-ink-muted);
}
.sector-card li { margin-bottom: var(--s1); }

.tagrow { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: auto; }
.tag {
  font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase;
  font-weight: 600; padding: 3px 9px; border-radius: 999px;
  background: var(--ohg-crest-tint); color: var(--ohg-crest-deep);
  text-decoration: none;
}
a.tag:hover { background: var(--ohg-crest); color: #fff; }

/* ------------------------------------------------------------------ */
/* Numbered stage timeline                                             */
/* Numerals are load-bearing here: the ten stages are a real sequence.  */
/* ------------------------------------------------------------------ */

.stages { display: grid; border-top: 1px solid var(--ohg-line); }
.stage {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: var(--s5);
  padding-block: var(--s5);
  border-bottom: 1px solid var(--ohg-line);
}
.stage__n {
  font-family: var(--font-mono);
  font-size: var(--step-3);
  color: #b9ac93;
  line-height: 1;
}
.stage__t { margin: 0 0 var(--s2); font-size: var(--step-1); }
.stage__meta {
  display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5);
  font-size: var(--step--1); color: var(--ohg-ink-faint);
  margin-bottom: var(--s3);
}
.stage__body { font-family: var(--font-editorial); margin: 0 0 var(--s3); }
.stage__do {
  border-left: 3px solid var(--ohg-mahangu);
  padding-left: var(--s4);
  font-size: var(--step--1);
  max-width: 66ch;
}
.stage__do strong {
  display: block; font-size: 0.72rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ohg-ink-faint); margin-bottom: var(--s1);
}

/* ------------------------------------------------------------------ */
/* Evaluation criteria bars                                            */
/* ------------------------------------------------------------------ */

.criteria { display: grid; gap: var(--s4); }
.criterion {
  display: grid; grid-template-columns: 1fr auto;
  gap: var(--s2) var(--s4); align-items: baseline;
}
.criterion__n { font-weight: 600; }
.criterion__w { font-family: var(--font-mono); font-size: var(--step-1); }
.criterion__track {
  grid-column: 1 / -1; height: 8px; background: var(--ohg-sand-deep);
}
.criterion__fill { height: 100%; background: var(--ohg-crest); }
.criterion__d {
  grid-column: 1 / -1; font-size: var(--step--1);
  color: var(--ohg-ink-muted); margin: 0;
}

/* ------------------------------------------------------------------ */
/* Callouts                                                            */
/* ------------------------------------------------------------------ */

.callout {
  border-left: 3px solid var(--ohg-crest);
  background: var(--ohg-crest-tint);
  padding: var(--s5);
  font-size: var(--step--1);
  max-width: 74ch;
}
.callout--warn { border-left-color: var(--ohg-warning); background: #fdf6e8; }
.callout--dark {
  background: rgb(255 255 255 / 0.08);
  border-left-color: var(--ohg-mahangu);
  color: rgb(255 255 255 / 0.9);
}
.callout > strong { display: block; margin-bottom: var(--s2); font-size: var(--step-0); }
.callout p:last-child { margin-bottom: 0; }

/* ------------------------------------------------------------------ */
/* Download centre                                                     */
/*                                                                     */
/* Drop-in replacement for the existing "Download centre" block in     */
/* css/components.css. Replace from the `/* Download centre */`        */
/* banner down to the line above the `/* FAQ */` banner.               */
/* Everything above .doc__meta is unchanged from the current file.     */
/* ------------------------------------------------------------------ */

.packgroup { margin-bottom: var(--s8); }
.packgroup__head { display: flex; align-items: baseline; gap: var(--s4); margin-bottom: var(--s2); }
.packgroup__n { font-family: var(--font-mono); font-size: var(--step-2); color: #b9ac93; line-height: 1; }
.packgroup__blurb { color: var(--ohg-ink-muted); margin-bottom: var(--s5); max-width: 68ch; }

.doc {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: var(--s4);
  align-items: center;
  padding: var(--s5) 0;
  border-top: 1px solid var(--ohg-line);
}
.doc:last-child { border-bottom: 1px solid var(--ohg-line); }
.doc__n { font-family: var(--font-mono); color: var(--ohg-ink-faint); }
.doc__t { margin: 0 0 var(--s1); font-size: var(--step-0); font-weight: 600; overflow-wrap: anywhere; }
.doc__d { margin: 0; font-size: var(--step--1); color: var(--ohg-ink-muted); }
.doc__badge {
  display: inline-block; margin-top: var(--s2);
  font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase;
  font-weight: 600; color: var(--ohg-ink-faint);
}

/* Format and weight, stated before the click. On a metered Namibian
   mobile connection a 462 KB download is a decision, not a reflex. */
.doc__meta {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: var(--s2) var(--s3);
  margin: var(--s2) 0 0;
}
.doc__type {
  font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ohg-crest-deep);
  background: var(--ohg-crest-tint);
  border-radius: 2px;
  padding: 2px 7px;
}
.doc__size { font-family: var(--font-mono); font-size: 0.72rem; color: var(--ohg-ink-faint); }

/* ------------------------------------------------------------------ */
/* FAQ                                                                 */
/* ------------------------------------------------------------------ */

.faq { border-top: 1px solid var(--ohg-line); }
.faq details { border-bottom: 1px solid var(--ohg-line); }
.faq summary {
  cursor: pointer;
  padding: var(--s5) var(--s7) var(--s5) 0;
  font-weight: 600;
  list-style: none;
  position: relative;
  min-height: 48px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  position: absolute; right: var(--s2); top: 50%; transform: translateY(-50%);
  font-family: var(--font-mono); font-size: var(--step-1); color: var(--ohg-crest);
}
.faq details[open] summary::after { content: '\2212'; }
.faq__a { padding: 0 var(--s7) var(--s5) 0; font-family: var(--font-editorial); max-width: 68ch; }
.faq__a p { margin: 0 0 var(--s2); }
.faq__ref { font-size: 0.75rem; color: var(--ohg-ink-faint); font-family: var(--font-ui); }

.faq-search { margin-bottom: var(--s6); max-width: 32rem; }
.faq-filters { display: flex; flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s7); }
.faq-count { font-size: var(--step--1); color: var(--ohg-ink-muted); margin-bottom: var(--s5); }
.faq [hidden] { display: none !important; }

/* ------------------------------------------------------------------ */
/* Forms                                                              */
/* ------------------------------------------------------------------ */

.form { display: grid; gap: var(--s5); max-width: 40rem; }
.form__section { display: grid; gap: var(--s5); }

/* Grid children default to min-width:auto. A file input reports a wide
   intrinsic size and refuses to shrink below it, which drags the whole
   form past a 320px screen. */
.form > *, .form__section > *, .field > * { min-width: 0; }
.dropzone { min-width: 0; }
.dropzone input[type='file'] { width: 100%; max-width: 100%; min-width: 0; }
.form__section > h2 { margin: 0; }

.field { display: grid; gap: var(--s2); }
.field > label { font-weight: 600; font-size: var(--step--1); }
.field__hint { font-size: var(--step--1); color: var(--ohg-ink-muted); margin: 0; }
.field__req { color: var(--ohg-critical); }

.field input[type='text'],
.field input[type='email'],
.field input[type='tel'],
.field input[type='url'],
.field input[type='number'],
.field select,
.field textarea {
  font: inherit;
  font-size: var(--step-0);
  color: var(--ohg-ink);
  background: var(--ohg-paper);
  border: 1px solid var(--ohg-field-border);
  border-radius: 2px;
  padding: var(--s3) var(--s4);
  min-height: 48px;
  width: 100%;
}
.field textarea { min-height: 8rem; resize: vertical; line-height: 1.6; }

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--ohg-crest);
  outline-offset: 1px;
  border-color: var(--ohg-crest);
}

.field--error input,
.field--error select,
.field--error textarea { border-color: var(--ohg-critical); border-width: 2px; }
.field__error {
  font-size: var(--step--1); font-weight: 600;
  color: var(--ohg-critical); margin: 0;
}

/* Choice lists — 48px targets, whole row is the label */
.choices { display: grid; gap: var(--s2); margin: 0; padding: 0; border: 0; }
.choices legend { font-weight: 600; font-size: var(--step--1); padding: 0; margin-bottom: var(--s2); }
.choice {
  display: grid; grid-template-columns: 22px 1fr; gap: var(--s3);
  align-items: start; padding: var(--s3) var(--s4);
  border: 1px solid var(--ohg-line); border-radius: 2px;
  cursor: pointer; min-height: 48px;
}
.choice:hover { background: var(--ohg-crest-tint); }
.choice:has(input:checked) { border-color: var(--ohg-crest); background: var(--ohg-crest-tint); }
.choice input { width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--ohg-crest); }
.choice__t { font-weight: 600; font-size: var(--step--1); display: block; }
.choice__d { font-size: var(--step--1); color: var(--ohg-ink-muted); margin: var(--s1) 0 0; display: block; }

/* Upload dropzone — a real, keyboard-reachable file input sits inside.
   A drag-only zone is unusable without a pointer. */
.dropzone {
  border: 2px dashed var(--ohg-field-border);
  border-radius: 4px;
  padding: var(--s6) var(--s5);
  text-align: center;
  background: var(--ohg-sand);
  transition: border-color 150ms ease, background-color 150ms ease;
}
.dropzone p { margin: 0 0 var(--s3); color: var(--ohg-ink-muted); font-size: var(--step--1); }
.dropzone input[type='file'] { font: inherit; font-size: var(--step--1); max-width: 100%; }
.dropzone:focus-within, .dropzone.is-dragover {
  border-color: var(--ohg-crest); border-style: solid; background: var(--ohg-crest-tint);
}

/* Selected-file list */
.filelist { list-style: none; margin: var(--s4) 0 0; padding: 0; display: grid; gap: var(--s2); }
.filelist li {
  display: grid; grid-template-columns: 1fr auto auto; gap: var(--s3);
  align-items: center; margin: 0;
  padding: var(--s3) var(--s4);
  border: 1px solid var(--ohg-line); border-radius: 2px;
  font-size: var(--step--1);
}
.filelist__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filelist__size { font-family: var(--font-mono); color: var(--ohg-ink-faint); font-size: 0.75rem; }
.filelist__bad { color: var(--ohg-critical); font-weight: 600; }

/* Validation summary — focus target after a failed submit */
.form-summary {
  border: 2px solid var(--ohg-critical);
  padding: var(--s5);
  margin-bottom: var(--s5);
}
.form-summary h2 { color: var(--ohg-critical); font-size: var(--step-1); margin-bottom: var(--s3); }
.form-summary ul { margin: 0; padding-left: 1.2em; }
.form-summary a { color: var(--ohg-critical); font-weight: 600; }

.alert { padding: var(--s5); border-left: 3px solid; margin-bottom: var(--s6); }
.alert--success { border-color: var(--ohg-positive); background: #eef6f1; }
.alert--error { border-color: var(--ohg-critical); background: #fceeee; }
.alert > strong { display: block; margin-bottom: var(--s2); }
.alert p:last-child { margin-bottom: 0; }

/* ------------------------------------------------------------------ */
/* Pathway chooser                                                     */
/* ------------------------------------------------------------------ */

.pathways { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: var(--s5); }
.pathway {
  display: flex; flex-direction: column; gap: var(--s3);
  border: 1px solid var(--ohg-line);
  border-top: 4px solid var(--ohg-crest);
  border-radius: 4px;
  padding: var(--s6);
  background: var(--ohg-paper);
}
.pathway__n { font-family: var(--font-mono); color: var(--ohg-ink-faint); font-size: var(--step--1); }
.pathway h2 { margin: 0; font-size: var(--step-2); }
.pathway ul { margin: 0; padding-left: 1.1em; font-size: var(--step--1); color: var(--ohg-ink-muted); }
.pathway .btn { margin-top: auto; align-self: flex-start; }

/* ------------------------------------------------------------------ */
/* Success / reference number                                          */
/* ------------------------------------------------------------------ */

.reference {
  font-family: var(--font-mono);
  font-size: var(--step-3);
  letter-spacing: 0.06em;
  background: var(--ohg-sand);
  border: 1px solid var(--ohg-sand-deep);
  padding: var(--s4) var(--s5);
  display: inline-block;
  margin-block: var(--s4);
}
.success-icon {
  width: 64px; height: 64px; border-radius: 999px;
  background: var(--ohg-positive); color: #fff;
  display: grid; place-items: center;
  font-size: var(--step-3); margin-bottom: var(--s5);
}

/* ------------------------------------------------------------------ */
/* Scroll reveal — additive, never hides content without JS            */
/* ------------------------------------------------------------------ */

.reveal { opacity: 1; }
.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity 500ms ease, transform 500ms ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }


/* ------------------------------------------------------------------ */
/* Submit section — 50/50 text and investor map                        */
/* ------------------------------------------------------------------ */

.submit-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s8);
  align-items: center;
}
.submit-split__text { min-width: 0; }
/* Two default-size buttons measure 565px; the 50% column is 544px, so they
   wrapped. Tightened here only — the buttons elsewhere are unchanged. */
.submit-split .btn {
  padding-inline: 14px;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}
.submit-split__lede {
  font-family: var(--font-editorial);
  font-size: var(--step-1);
  line-height: 1.55;
  color: rgb(255 255 255 / 0.85);
  margin-bottom: var(--s6);
}
.submit-split__note {
  margin: var(--s6) 0 0;
  font-size: var(--step--1);
  color: rgb(255 255 255 / 0.65);
}

/* The map artwork has a transparent background and light-grey landmass, so it
   needs a light panel behind it to read at all on the crest blue. */
.submit-split__figure {
  margin: 0;
  background: var(--ohg-paper);
  border-radius: 4px;
  padding: var(--s5);
  display: flex;
  align-items: center;
  justify-content: center;
}
.submit-split__figure img { display: block; width: 100%; height: auto; }

/* ------------------------------------------------------------------ */
/* Application wizard                                                  */
/* ------------------------------------------------------------------ */

.page-head--slim { padding-block: var(--s7); }

.wizard { background: var(--ohg-sand); padding-block: var(--s8); }

.wizard__layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: var(--s8);
  align-items: start;
}
/* Grid items default to min-width:auto, so the horizontal step scroller
   inside the nav pushes the whole column wider than the viewport. */
.wizard__layout > * { min-width: 0; }

/* --- step navigation --- */
.wizard__nav {
  position: sticky;
  top: calc(var(--header-h) + var(--s4));
  background: var(--ohg-paper);
  border: 1px solid var(--ohg-line);
  border-radius: 4px;
  padding: var(--s5);
}
.wizard__nav ol { list-style: none; margin: 0; padding: 0; counter-reset: none; }
.wizard__nav li { margin: 0; }

.wizard__nav-item {
  display: flex; align-items: baseline; gap: var(--s3);
  width: 100%; text-align: left;
  background: none; border: 0; border-left: 2px solid transparent;
  padding: var(--s2) var(--s3);
  font: inherit; font-size: var(--step--1);
  color: var(--ohg-ink-muted);
  cursor: pointer;
  min-height: 44px;
}
.wizard__nav-item:hover { background: var(--ohg-crest-tint); color: var(--ohg-ink); }
.wizard__nav-item[aria-current='step'] {
  border-left-color: var(--ohg-crest);
  color: var(--ohg-ink);
  font-weight: 600;
  background: var(--ohg-crest-tint);
}
.wizard__nav-item.is-done .wizard__nav-n { color: var(--ohg-positive); }
.wizard__nav-n { font-family: var(--font-mono); font-size: 0.72rem; }
.wizard__nav-t { flex: 1; }

.wizard__progress { margin: 0 0 var(--s4); font-size: var(--step--1); color: var(--ohg-ink-muted); }
.wizard__progress-bar {
  display: block; height: 6px; background: var(--ohg-sand-deep);
  margin-bottom: var(--s2); border-radius: 3px; overflow: hidden;
}
.wizard__progress-bar > span {
  display: block; height: 100%; background: var(--ohg-crest);
  transition: width 250ms ease;
}

/* A visible save state is not decoration. On a slow connection it is the
   difference between trusting the form and abandoning it. */
.wizard__save {
  margin: var(--s4) 0 0; font-size: 0.78rem; color: var(--ohg-ink-faint);
  min-height: 1.2em;
}
.wizard__save.is-ok { color: var(--ohg-positive); }
.wizard__save.is-bad { color: var(--ohg-critical); font-weight: 600; }

/* --- form panel --- */
.wizard__form {
  background: var(--ohg-paper);
  border: 1px solid var(--ohg-line);
  border-radius: 4px;
  padding: var(--s7);
  max-width: none;
  display: block;
}
.wizard__step { display: grid; gap: var(--s5); }
.wizard__step[hidden] { display: none; }
.wizard__step > h2 { margin: 0; }
.wizard__step > h2:focus-visible { outline: 2px solid var(--ohg-crest); outline-offset: 4px; }

.wizard__stepmeta {
  margin: 0; font-size: var(--step--1);
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ohg-ink-faint); font-weight: 600;
}
.wizard__part { color: var(--ohg-crest); }
.wizard__note { margin: 0; color: var(--ohg-ink-muted); max-width: 68ch; }
.wizard__conditional { display: grid; gap: var(--s5); }
/* An explicit display value beats the hidden attribute's UA default, so
   hidden conditional panels stay on screen without this. */
.wizard__conditional[hidden] { display: none; }
.wizard__topics {
  margin: 0 0 var(--s2); padding-left: 1.2em;
  font-size: var(--step--1); color: var(--ohg-ink-muted);
}
.wizard__topics li { margin-bottom: var(--s1); }

.wizard__actions {
  display: flex; flex-wrap: wrap; gap: var(--s3);
  margin-top: var(--s7); padding-top: var(--s5);
  border-top: 1px solid var(--ohg-line);
}
.wizard__actions [data-wizard-save] { margin-left: auto; }

/* --- repeatable groups --- */
.repeat { display: grid; gap: var(--s5); }
.repeat__item {
  position: relative;
  border: 1px solid var(--ohg-line);
  border-left: 3px solid var(--ohg-crest);
  border-radius: 3px;
  padding: var(--s5);
  margin: 0;
  display: grid;
  gap: var(--s4);
}
.repeat__item legend {
  font-weight: 600; font-size: var(--step--1);
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ohg-crest-deep); padding: 0 var(--s2);
}
.repeat__remove {
  position: absolute; top: var(--s3); right: var(--s3);
  background: none; border: 1px solid var(--ohg-line); border-radius: 2px;
  font: inherit; font-size: 0.75rem; font-weight: 600;
  color: var(--ohg-critical);
  padding: var(--s1) var(--s3); min-height: 32px; cursor: pointer;
}
.repeat__remove:hover { background: #fceeee; border-color: var(--ohg-critical); }

.choices--declaration .choice { align-items: flex-start; }
.choices--declaration .choice__t { font-weight: 400; }

/* --- review --- */
.review { display: grid; gap: var(--s5); }
.review__section { border: 1px solid var(--ohg-line); border-radius: 3px; padding: var(--s5); }
.review__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--s4); margin-bottom: var(--s4);
}
.review__head h3 { margin: 0; font-size: var(--step-0); }
.review__edit {
  background: none; border: 1px solid var(--ohg-crest); border-radius: 2px;
  color: var(--ohg-crest); font: inherit; font-size: 0.75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.04em;
  padding: var(--s1) var(--s4); min-height: 36px; cursor: pointer;
}
.review__edit:hover { background: var(--ohg-crest-tint); }
.review__list { margin: 0; display: grid; grid-template-columns: 1fr; gap: var(--s3); }
.review__list dt {
  font-size: var(--step--1); color: var(--ohg-ink-faint); font-weight: 600;
}
.review__list dd {
  margin: 0 0 var(--s3); font-size: var(--step--1);
  white-space: pre-wrap; word-break: break-word;
}
.review__empty { margin: 0; font-size: var(--step--1); color: var(--ohg-ink-faint); }


/* ------------------------------------------------------------------ */
/* Debarment list table (Part H)                                       */
/* ------------------------------------------------------------------ */

.wizard__lists { margin-top: var(--s6); }
.wizard__lists h3 { font-size: var(--step-0); margin-bottom: var(--s2); }

.datatable { width: 100%; border-collapse: collapse; margin-top: var(--s4); }
.datatable th,
.datatable td {
  text-align: left;
  vertical-align: top;
  padding: var(--s3) var(--s3) var(--s3) 0;
  border-bottom: 1px solid var(--ohg-line);
  font-size: var(--step--1);
}
.datatable th { font-weight: 600; width: 34%; }
/* These URLs are long and unbreakable; without this they blow the layout
   out on a phone. */
.datatable td a { overflow-wrap: anywhere; }

@media (max-width: 560px) {
  .datatable th, .datatable td { display: block; width: auto; border-bottom: 0; padding-bottom: 0; }
  .datatable td { padding-bottom: var(--s4); border-bottom: 1px solid var(--ohg-line); }
}
