:root {
  --green: #1769aa;
  --dark: #123b63;
  --lime: #6fb5e6;
  --accent: #287fb8;
  --ink: #18324a;
  --muted: #5b6f82;
  --line: #d5e3ef;
  --bg: #f4f8fc;
  --blue: #2686ba;
  --user-entry: #0047ab;
}

/* Answers must remain visually distinct from labels and guidance. */
.field {
  color: var(--user-entry) !important;
  font-weight: 800 !important;
}

.field::placeholder {
  color: #71817e !important;
  font-weight: 400 !important;
}

select.field:has(option[value=""]:checked) {
  color: #71817e !important;
  font-weight: 500 !important;
}

select.field:not(:has(option[value=""]:checked)) {
  color: var(--user-entry) !important;
  font-weight: 800 !important;
}

.choice:has(input:checked) strong,
.choice:has(input:checked) small,
.audit-check:has(input:checked) span,
.consent:has(input:checked) span,
.goal-card[aria-pressed="true"] b,
.goal-card[aria-pressed="true"] span {
  color: var(--user-entry) !important;
  font-weight: 800 !important;
}

.component-listbox option:checked {
  background: #eaf4fc !important;
  color: var(--user-entry) !important;
  font-weight: 800;
}

/* Some guidance boxes are emitted as spans. They must be blocks; otherwise
   wrapped-line padding and backgrounds can cover neighbouring fields. */
.field-example {
  display: block;
  clear: both;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.layer-grid > label {
  min-width: 0;
  align-self: start;
}

body {
  background: radial-gradient(circle at 8% 0, rgb(111 181 230 / 16%), transparent 32rem), var(--bg);
}

.languagebar {
  background: #102f50;
  box-shadow: 0 4px 14px rgb(18 59 99 / 16%);
}

.languagebar-label {
  color: #d9e9f6;
}

.native-translation-status {
  color: #c9dff0;
  font-size: 10px;
  font-weight: 700;
}

.legal {
  background: #183f63;
}

.commandbar {
  border-bottom-color: #c9dbea;
  background: rgb(248 251 254 / 97%);
  box-shadow: 0 8px 24px rgb(18 59 99 / 9%);
}

.hero {
  background: linear-gradient(135deg, #123b63, #1769aa);
  box-shadow: 0 14px 38px rgb(18 59 99 / 15%);
}

/* Keep the start panel informative but compact enough that users reach the
   questionnaire without scrolling past a large brochure-style hero area. */
.hero {
  gap: 14px;
  padding: clamp(12px, 1.45vw, 18px) clamp(18px, 2.4vw, 28px);
}

.hero h1 {
  margin: 0 0 6px;
  font-size: clamp(23px, 2.45vw, 33px);
  line-height: 1.04;
}

.hero p {
  font-size: 14.5px;
  line-height: 1.35;
}

.hero .hero-faq-update {
  margin-bottom: 5px;
  padding: 4px 9px;
  font-size: 11.5px;
  line-height: 1.18;
}

.hero-intro {
  margin-top: 2px !important;
}

.hero-capabilities {
  gap: 7px;
  margin-top: 7px;
}

.hero-capabilities li {
  grid-template-columns: 25px minmax(0, 1fr);
  gap: 7px;
  padding: 8px 9px;
  font-size: 12.3px;
  line-height: 1.33;
}

.hero-capabilities li::before {
  width: 23px;
  height: 23px;
  font-size: 11.5px;
}

.mark {
  width: 64px;
  font-size: 18px;
}

@media (max-width: 700px) {
  .hero {
    padding: 13px 12px;
  }

  .hero h1 {
    font-size: 23px;
  }

  .hero p {
    font-size: 13.5px;
  }

  .hero-capabilities {
    gap: 6px;
  }

  .hero-capabilities li {
    grid-template-columns: 24px minmax(0, 1fr);
    padding: 8px;
    font-size: 12px;
  }
}

.version,
.soft,
.choice:has(input:checked),
.supplier-title,
.goal-card[aria-pressed="true"],
.schema-status span,
.example-filter,
.consent {
  background: #eaf4fc;
}

.field:focus {
  box-shadow: 0 0 0 4px rgb(23 105 170 / 12%);
}

.tag,
.status-chip,
.step.done b,
.component-result-actions .word-template {
  border-color: #a9cee9;
  background: #edf6fc;
  color: #123b63;
}

.aside-note,
.requestpart,
.component-stage-note,
.packaging-class-example {
  border-left-color: #6fb5e6;
  background: #f1f7fc;
  color: #274862;
}

.track span {
  background: linear-gradient(90deg, #1769aa, #6fb5e6);
}

.focus-flash {
  box-shadow: 0 0 0 4px rgb(111 181 230 / 42%) !important;
}

.phase-substeps {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.phase-substep {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid #c6dbea;
  border-radius: 10px;
  background: #fff;
  color: #34536c;
  font-size: 12.5px;
  font-weight: 750;
  text-align: left;
}

.phase-substep span {
  display: grid;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 7px;
  background: #eaf4fc;
  color: #1769aa;
  font-size: 11px;
  font-weight: 900;
}

.phase-substep.active {
  border-color: #1769aa;
  background: #1769aa;
  color: #fff;
}

.phase-substep.active span {
  background: #fff;
  color: #123b63;
}

.phase-substep.done {
  border-color: #a9cee9;
  background: #edf6fc;
}

.component-builder {
  margin: 0 0 18px;
  padding: 22px;
  border: 1px solid #9fc5e2;
  border-radius: 18px;
  background: linear-gradient(135deg, #edf6fc, #fff);
}

.component-builder h3 {
  margin: 3px 0 6px;
  color: #123b63;
  font-size: 23px;
}

.component-builder p {
  margin: 0;
  color: #456078;
  line-height: 1.55;
}

.component-builder-kicker {
  color: #1769aa;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.component-starter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-top: 17px;
}

.component-starter {
  display: grid;
  min-height: 74px;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 11px;
  border: 1px solid #bfd7e9;
  border-radius: 12px;
  background: #fff;
  color: #183f63;
  font-weight: 820;
  line-height: 1.3;
  text-align: left;
}

.component-starter:hover,
.component-starter:focus-visible {
  border-color: #1769aa;
  background: #eaf4fc;
  outline: none;
}

.component-starter span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 9px;
  background: #1769aa;
  color: #fff;
  font-size: 18px;
}

.component-builder-note {
  margin-top: 14px !important;
  padding: 11px 13px;
  border-left: 4px solid #6fb5e6;
  border-radius: 0 10px 10px 0;
  background: #f4f9fd;
}

.word-language-control {
  display: grid;
  min-width: 250px;
  grid-template-columns: minmax(130px, 1fr) auto;
  align-items: end;
  gap: 8px;
}

.word-language-control label {
  color: #34536c;
  font-size: 11px;
  font-weight: 850;
}

.word-language-control .field {
  min-height: 42px;
  margin-top: 3px;
  padding: 7px 9px;
}

.evidence-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 700px) {
  .evidence-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .word-language-control {
    width: 100%;
    min-width: 0;
    grid-template-columns: minmax(0, 1fr);
  }

  .word-language-control .btn {
    width: 100%;
  }
}

@media (max-width: 980px) {
  .component-starter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .languagebar {
    position: relative;
    min-height: auto;
  }

  header {
    top: 0;
  }

  .commandbar {
    position: relative;
    top: auto;
    z-index: 8;
    overflow: visible;
  }

  .language-switcher {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .languagebar .lang-button {
    width: 100%;
    max-width: none;
    padding: 7px 2px;
    font-size: 0;
  }

  .languagebar .lang-button::after {
    font-size: 11px;
    content: attr(lang);
    text-transform: uppercase;
  }

  .phase-substeps {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .phase-substep:not(.active) {
    display: none;
  }

  .phase-substep.active {
    display: flex;
    width: 100%;
  }

  .component-builder {
    padding: 17px 13px;
  }

  .component-starter-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .component-starter {
    min-height: 58px;
  }

  #steps {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  #steps .phase-step:not(.active) {
    display: none;
  }

  #steps .phase-step.active button {
    min-height: 50px;
  }
}

@keyframes focus-flash {
  0%, 35% {
    background: #edf6fc;
    box-shadow: 0 0 0 6px rgb(111 181 230 / 48%);
  }
  100% {
    background: #fcfdff;
    box-shadow: none;
  }
}

.fcp-inline-term {
  border-bottom: 1px dotted #1769aa;
  color: inherit;
  text-decoration: none;
  cursor: help;
}

.fcp-inline-term::after {
  display: inline-grid;
  width: 16px;
  height: 16px;
  margin-left: 3px;
  place-items: center;
  border: 1px solid #8db9da;
  border-radius: 50%;
  background: #f4f9fd;
  color: #1769aa;
  content: "?";
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  vertical-align: 1px;
}

body.high-contrast {
  --green: #064f88;
  --dark: #082f52;
  --muted: #34495c;
  --line: #829bb0;
  --bg: #fff;
}
