:root {
  --page: #f4f6f2;
  --surface: #ffffff;
  --surface-soft: #eaf2ed;
  --surface-warm: #fff7dc;
  --ink: #17231e;
  --ink-soft: #44564d;
  --ink-muted: #66776f;
  --line: #cbd7d0;
  --line-strong: #93a79d;
  --green: #12634c;
  --green-dark: #0b4435;
  --teal: #176d7e;
  --yellow: #f1c94c;
  --coral: #d95e45;
  --focus: #0c63ce;
  --danger: #a53428;
  --shadow: 0 16px 44px rgba(23, 35, 30, 0.1);
  --radius-sm: 4px;
  --radius-md: 8px;
  --content: 1440px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 280px;
  background: var(--page);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
  letter-spacing: 0;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: var(--green-dark);
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--teal);
}

button:focus-visible,
a:focus-visible,
input:focus-visible + span {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  z-index: 100;
  top: -999px;
  left: 8px;
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: var(--radius-sm);
  color: var(--ink);
  padding: 10px 14px;
}

.skip-link:focus {
  top: 8px;
}

.topbar {
  min-height: 76px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px max(24px, calc((100vw - var(--content)) / 2));
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1rem;
  line-height: 1.15;
}

.brand small {
  color: var(--ink-muted);
  font-size: 0.78rem;
  margin-top: 3px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border: 1px solid var(--green-dark);
  border-radius: var(--radius-md);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: end;
  gap: 3px;
  padding: 8px;
  background: var(--surface-soft);
}

.brand-mark span {
  display: block;
  background: var(--green);
  border-radius: 2px 2px 0 0;
}

.brand-mark span:nth-child(1) {
  height: 42%;
}

.brand-mark span:nth-child(2) {
  height: 72%;
  background: var(--teal);
}

.brand-mark span:nth-child(3) {
  height: 100%;
  background: var(--coral);
}

.privacy-signal {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
  font-weight: 650;
}

.privacy-signal span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px var(--surface-soft);
}

.workspace {
  width: min(100%, var(--content));
  min-height: calc(100vh - 76px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(300px, 0.78fr) minmax(540px, 1.22fr);
  background: var(--surface);
}

.context-panel {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  border-right: 1px solid var(--line);
  background: var(--surface-soft);
  display: flex;
  flex-direction: column;
}

.context-copy {
  padding: 54px 44px 34px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--green);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  max-width: 14ch;
  font-size: 2.6rem;
  line-height: 1.08;
}

.context-copy > p:last-child {
  max-width: 48ch;
  margin: 20px 0 0;
  color: var(--ink-soft);
  font-size: 1.04rem;
}

.workflow-image {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  object-position: center;
}

.boundary-strip {
  padding: 30px 44px;
  border-bottom: 1px solid var(--line);
}

.boundary-strip h2 {
  font-size: 1rem;
}

.boundary-strip ul {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.boundary-strip li {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 9px;
  align-items: start;
}

.boundary-strip li::before {
  content: "";
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--green);
}

.policy-links {
  margin-top: auto;
  padding: 22px 44px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  color: var(--ink-muted);
  font-size: 0.82rem;
}

.assessment-panel {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  padding: 54px clamp(28px, 5vw, 72px) 64px;
}

.assessment-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.assessment-header h2 {
  font-size: 1.55rem;
}

.time-note {
  margin: 2px 0 0;
  color: var(--ink-muted);
  font-size: 0.86rem;
  white-space: nowrap;
}

.app-shell {
  min-height: 590px;
  padding-top: 28px;
}

.loading-state {
  color: var(--ink-muted);
}

.progress-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 34px;
}

.progress-track {
  height: 8px;
  overflow: hidden;
  background: #dce5df;
  border-radius: 999px;
}

.progress-fill {
  display: block;
  width: 0;
  height: 100%;
  background: var(--green);
  border-radius: inherit;
  transition: width 180ms ease;
}

.progress-label {
  margin: 0;
  min-width: 76px;
  color: var(--ink-soft);
  font-size: 0.84rem;
  font-weight: 700;
  text-align: right;
}

.question-header {
  max-width: 720px;
}

.question-number {
  margin: 0 0 8px;
  color: var(--teal);
  font-size: 0.8rem;
  font-weight: 800;
}

.question-title {
  font-size: 1.75rem;
  line-height: 1.22;
}

.question-help {
  margin: 12px 0 0;
  color: var(--ink-soft);
}

.options {
  border: 0;
  margin: 30px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.options legend {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.option {
  position: relative;
  min-height: 62px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  padding: 13px 16px;
}

.option:hover {
  border-color: var(--line-strong);
  background: #f9fbf9;
}

.option:has(input:checked) {
  border-color: var(--green);
  box-shadow: inset 4px 0 0 var(--green);
  background: #f0f7f3;
}

.option input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--green);
}

.option-main {
  min-width: 0;
  font-weight: 720;
}

.option-note {
  max-width: 24ch;
  color: var(--ink-muted);
  font-size: 0.82rem;
  text-align: right;
}

.validation-message {
  min-height: 24px;
  margin: 16px 0 0;
  color: var(--danger);
  font-size: 0.9rem;
  font-weight: 700;
}

.actions {
  min-height: 52px;
  margin-top: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.actions-end {
  display: flex;
  gap: 12px;
  margin-left: auto;
}

.button {
  min-height: 46px;
  min-width: 112px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  padding: 10px 17px;
  font-weight: 760;
}

.button-primary {
  background: var(--green-dark);
  color: #ffffff;
}

.button-primary:hover {
  background: var(--green);
}

.button-secondary {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}

.button-secondary:hover {
  background: var(--surface-soft);
}

.button-quiet {
  min-width: 88px;
  border-color: transparent;
  background: transparent;
  color: var(--ink-soft);
}

.button-quiet:hover {
  background: var(--surface-soft);
  color: var(--ink);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.result-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.result-kicker {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.result-title {
  font-size: 2rem;
  line-height: 1.15;
}

.score-block {
  min-width: 150px;
  text-align: right;
}

.score-number {
  display: block;
  font-size: 3.3rem;
  font-weight: 850;
  line-height: 1;
  color: var(--green-dark);
}

.score-label {
  display: block;
  margin-top: 5px;
  color: var(--ink-muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.result-summary {
  max-width: 70ch;
  margin: 22px 0 0;
  color: var(--ink-soft);
  font-size: 1rem;
}

.dimension-grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.dimension {
  border-left: 4px solid var(--teal);
  background: #edf6f7;
  padding: 16px;
}

.dimension:nth-child(2) {
  border-left-color: var(--coral);
  background: #fff1ed;
}

.dimension-label {
  display: block;
  color: var(--ink-muted);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.dimension strong {
  display: block;
  margin-top: 4px;
  font-size: 1.1rem;
}

.dimension p {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.result-section {
  margin-top: 34px;
}

.result-section > h3 {
  font-size: 1.18rem;
}

.recommendations {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
  counter-reset: actions;
}

.recommendation {
  counter-increment: actions;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  border-top: 1px solid var(--line);
  padding: 18px 0 4px;
}

.recommendation::before {
  content: counter(actions);
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--ink);
  font-weight: 850;
}

.recommendation h4 {
  margin: 0;
  font-size: 1rem;
}

.recommendation p {
  margin: 6px 0 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.recommendation-meta {
  display: grid;
  gap: 6px;
  justify-items: end;
}

.tag {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  padding: 4px 9px;
  font-size: 0.74rem;
  white-space: nowrap;
}

.week-plan {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.week-plan li {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px;
}

.week-plan strong,
.week-plan span {
  display: block;
}

.week-plan strong {
  color: var(--teal);
  font-size: 0.78rem;
}

.week-plan span {
  margin-top: 5px;
  color: var(--ink-soft);
  font-size: 0.86rem;
}

.evidence-details {
  margin-top: 28px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.evidence-details summary {
  min-height: 52px;
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: 760;
}

.evidence-list {
  margin: 0 0 18px;
  padding-left: 22px;
  color: var(--ink-soft);
  font-size: 0.86rem;
}

.evidence-list li + li {
  margin-top: 7px;
}

.result-actions {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.result-actions .button-quiet {
  margin-left: auto;
}

.result-boundary {
  margin: 24px 0 0;
  background: var(--surface-warm);
  border-left: 4px solid var(--yellow);
  padding: 14px 16px;
  color: var(--ink-soft);
  font-size: 0.86rem;
}

.notice {
  margin-top: 24px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--danger);
  background: #fff2ef;
  padding: 16px;
}

.notice p {
  margin: 6px 0 0;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-muted);
  padding: 22px max(24px, calc((100vw - var(--content)) / 2));
  display: flex;
  justify-content: space-between;
  gap: 28px;
  font-size: 0.78rem;
}

.site-footer p {
  margin: 0;
  max-width: 62ch;
}

.legal-page {
  background: var(--page);
}

.legal-shell {
  width: min(100% - 40px, 820px);
  margin: 0 auto;
  padding: 64px 0 80px;
}

.legal-shell > h1 {
  max-width: none;
  font-size: 2.6rem;
}

.legal-lead {
  max-width: 62ch;
  margin: 16px 0 0;
  color: var(--ink-soft);
  font-size: 1.08rem;
}

.legal-meta {
  margin: 12px 0 0;
  color: var(--ink-muted);
  font-size: 0.82rem;
}

.legal-shell section {
  margin-top: 34px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.legal-shell section h2 {
  font-size: 1.2rem;
}

.legal-shell section p,
.legal-shell section ul {
  margin-top: 12px;
  color: var(--ink-soft);
}

.legal-shell section ul {
  padding-left: 22px;
}

.legal-shell section li + li {
  margin-top: 8px;
}

.legal-nav {
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  font-weight: 760;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 980px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .assessment-panel {
    grid-column: 1;
    grid-row: 1;
  }

  .context-panel {
    grid-row: 2;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .context-copy,
  .boundary-strip {
    padding: 36px;
  }

  .workflow-image {
    grid-column: 2;
    grid-row: 1 / span 2;
    height: 100%;
  }

  .policy-links {
    grid-column: 1 / -1;
    padding: 18px 36px;
  }

  h1 {
    max-width: 18ch;
    font-size: 2.25rem;
  }
}

@media (max-width: 680px) {
  .topbar {
    min-height: 68px;
    padding: 10px 18px;
  }

  .brand small,
  .privacy-signal {
    display: none;
  }

  .workspace {
    min-height: calc(100vh - 68px);
  }

  .context-panel {
    display: block;
  }

  .context-copy {
    padding: 30px 22px 24px;
  }

  h1 {
    font-size: 2rem;
  }

  .workflow-image {
    height: auto;
  }

  .boundary-strip {
    padding: 24px 22px;
  }

  .policy-links {
    padding: 18px 22px;
  }

  .assessment-panel {
    padding: 34px 20px 46px;
  }

  .assessment-header {
    gap: 12px;
  }

  .assessment-header h2 {
    font-size: 1.3rem;
  }

  .time-note {
    white-space: normal;
    text-align: right;
  }

  .app-shell {
    min-height: 540px;
  }

  .question-title {
    font-size: 1.42rem;
  }

  .option {
    min-height: 60px;
    grid-template-columns: 22px minmax(0, 1fr);
    padding: 12px 13px;
  }

  .option-note {
    grid-column: 2;
    max-width: none;
    text-align: left;
  }

  .actions {
    align-items: stretch;
  }

  .actions-end {
    flex: 1;
  }

  .actions-end .button {
    flex: 1;
    min-width: 0;
  }

  .button-quiet {
    min-width: 72px;
  }

  .result-header {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .score-block {
    text-align: left;
  }

  .dimension-grid,
  .week-plan {
    grid-template-columns: 1fr;
  }

  .recommendation {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .recommendation-meta {
    grid-column: 2;
    justify-items: start;
    grid-auto-flow: column;
    justify-content: start;
  }

  .result-actions .button {
    flex: 1 1 140px;
  }

  .result-actions .button-quiet {
    margin-left: 0;
  }

  .site-footer {
    display: grid;
    padding: 20px;
  }

  .legal-shell {
    width: min(100% - 32px, 820px);
    padding: 40px 0 56px;
  }

  .legal-shell > h1 {
    font-size: 2rem;
  }
}

@media (max-width: 360px) {
  .brand strong {
    font-size: 0.9rem;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .context-copy,
  .assessment-panel {
    padding-left: 16px;
    padding-right: 16px;
  }

  h1 {
    font-size: 1.75rem;
  }

  .actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .actions-end {
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media print {
  @page {
    margin: 14mm;
  }

  body {
    background: #ffffff;
    color: #000000;
    font-size: 11pt;
  }

  .skip-link,
  .topbar,
  .context-panel,
  .assessment-header,
  .progress-row,
  .result-actions,
  .site-footer {
    display: none !important;
  }

  .workspace,
  .assessment-panel {
    display: block;
    width: 100%;
    min-height: 0;
    padding: 0;
  }

  .app-shell {
    min-height: 0;
    padding: 0;
  }

  .result-header,
  .recommendation,
  .evidence-details {
    break-inside: avoid;
  }

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

  .score-number {
    color: #000000;
  }
}
