/* AI Policy Builder page. Depends on the tokens and shared rules in styles.css. */
.builder-page { background: linear-gradient(180deg, #020817 0%, #030a18 60%, #020817 100%); }
.builder { position: relative; width: min(1120px, 100%); margin: 0 auto; padding: clamp(120px, 15vh, 150px) var(--gutter) clamp(90px, 10vw, 140px); }
.builder-intro h1 { max-width: none; margin: 0; font-size: clamp(32px, 3.4vw, 46px); font-weight: 300; line-height: 1; letter-spacing: -.025em; }
.builder-lead { max-width: 680px; margin: 14px 0 0; color: rgba(242,242,242,.84); font-size: clamp(16px, 1.2vw, 17.5px); font-weight: 300; line-height: 1.55; text-wrap: pretty; }

.progress { margin: 32px 0 30px; }
.progress-track { height: 1px; background: rgba(255,255,255,.14); }
.progress-fill { height: 1px; width: calc(var(--p, 0) * 100%); background: linear-gradient(90deg, #507ccb, #8faee4); transition: width .3s ease; }
.progress-label { margin: 12px 0 0; color: rgba(255,255,255,.62); font: 500 10.5px/1 "Geist Mono", monospace; letter-spacing: .14em; text-transform: uppercase; }

.screen { display: none; }
.screen.is-active { display: block; animation: screen-in .22s ease; }
.screen:focus { outline: none; }
@keyframes screen-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.screen-eyebrow { margin: 0 0 14px; color: #8faee4; font: 500 11px/1.3 "Geist Mono", monospace; letter-spacing: .13em; }
.screen-title { margin: 0; font-size: clamp(30px, 3.4vw, 44px); font-weight: 300; line-height: 1.05; letter-spacing: -.02em; text-wrap: balance; }
.screen-title:focus { outline: none; }
.screen-hint { max-width: 640px; margin: 14px 0 0; color: rgba(242,242,242,.76); font-size: 16px; font-weight: 300; line-height: 1.5; }
.field--company { margin-top: 34px; max-width: 520px; }

.choices { margin: 34px 0 0; padding: 0; border: 0; min-width: 0; }
.choices legend { padding: 0; margin: 0 0 14px; color: rgba(242,242,242,.74); font: 500 11px/1.4 "Geist Mono", monospace; letter-spacing: .13em; text-transform: uppercase; }
.choice-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.choice-grid--3 { grid-template-columns: repeat(3, 1fr); }
.choice-grid--4 { grid-template-columns: repeat(4, 1fr); }
.choice { position: relative; display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 14px 16px; border: 1px solid var(--line); background: rgba(2,8,23,.35); cursor: pointer; color: rgba(242,242,242,.92); font-size: 16px; font-weight: 300; line-height: 1.3; transition: border-color .18s ease, background-color .18s ease, color .18s ease; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.choice::before { content: ""; flex: 0 0 auto; width: 14px; height: 14px; border: 1px solid rgba(143,174,228,.45); background: transparent; transition: background-color .18s ease, border-color .18s ease; }
.choice:has(input[type="radio"])::before { border-radius: 50%; }
.choice:hover { border-color: var(--line-strong); color: #fff; }
.choice:has(input:checked) { border-color: #8faee4; background: rgba(80,124,203,.14); color: #fff; }
.choice:has(input:checked)::before { background: #8faee4; border-color: #8faee4; box-shadow: inset 0 0 0 3px #071022; }
.choice:has(input:focus-visible) { outline: 1px solid rgba(143,174,228,.9); outline-offset: 3px; }

.screen-actions { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 40px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.12); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; height: 50px; padding: 0 18px; border: 1px solid var(--line); background: transparent; color: #fff; font: 400 14px/1 Outfit, system-ui, sans-serif; cursor: pointer; text-decoration: none; transition: border-color .18s ease, background-color .18s ease, transform .18s ease; }
.btn:hover { border-color: var(--line-strong); }
.btn .cta-icon { color: currentColor; }
.btn--primary { background: #fff; color: #050505; border-color: #fff; }
.btn--primary:hover { background: #eef3ff; transform: translateY(-1px); }
.btn--primary .cta-icon { color: #050505; }
.btn[disabled] { opacity: .38; cursor: not-allowed; transform: none; }
.btn-back { padding: 0; border: 0; background: none; color: rgba(242,242,242,.7); font: 300 14px/1 Outfit, system-ui, sans-serif; cursor: pointer; transition: color .18s ease; }
.btn-back:hover { color: #fff; }

.review-list { margin: 30px 0 0; padding: 0; border-top: 1px solid rgba(255,255,255,.14); }
.review-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 18px; align-items: baseline; padding: 15px 0; border-bottom: 1px solid rgba(255,255,255,.10); }
.review-row dt { margin: 0; color: rgba(242,242,242,.74); font: 500 11px/1.5 "Geist Mono", monospace; letter-spacing: .13em; text-transform: uppercase; }
.review-row dd { margin: 0; color: rgba(242,242,242,.94); font-size: 16px; font-weight: 300; line-height: 1.5; }
.review-row a { color: rgba(143,174,228,.92); text-decoration: none; font-size: 13px; border-bottom: 1px solid rgba(143,174,228,.35); }
.review-row a:hover { color: #fff; border-color: rgba(143,174,228,.9); }
#generate-status { margin-top: 18px; }

.result-title { margin: 0; font-size: clamp(30px, 3.6vw, 48px); font-weight: 300; line-height: 1.05; letter-spacing: -.02em; text-wrap: balance; }
.result-title:focus { outline: none; }
.result-note { max-width: 640px; margin: 14px 0 0; color: rgba(143,174,228,.96); font-size: 15.5px; font-weight: 300; line-height: 1.55; }
.result-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 64px; margin-top: 40px; align-items: start; }
.result-panel { position: sticky; top: 24px; display: grid; gap: 22px; padding: 24px; border: 1px solid var(--line); background: rgba(2,8,23,.55); }
.result-panel h3 { margin: 0 0 10px; font-size: 16px; font-weight: 500; letter-spacing: .01em; }
.why { margin: 0; padding-left: 18px; color: rgba(242,242,242,.86); font-size: 14.5px; font-weight: 300; line-height: 1.5; }
.why li + li { margin-top: 8px; }
.result-downloads { display: grid; gap: 10px; }
.email-form label { display: block; margin-bottom: 8px; color: rgba(242,242,242,.62); font: 500 10.5px/1.3 "Geist Mono", monospace; letter-spacing: .13em; text-transform: uppercase; }
.email-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.email-row input { min-width: 0; height: 46px; border: 1px solid var(--line); border-bottom-color: rgba(143,174,228,.50); background: rgba(2,8,23,.55); color: #fff; padding: 0 12px; border-radius: 0; outline: none; font: 300 15px/1 Outfit, system-ui, sans-serif; }
.email-row input:focus-visible { border-color: rgba(143,174,228,.8); }
.email-row .btn { height: 46px; padding: 0 16px; }
.email-form .form-status { margin-top: 10px; font-size: 13px; }
.email-soon { margin: 0; color: rgba(242,242,242,.72); font-size: 14.5px; font-weight: 300; line-height: 1.5; }
.next-step { margin: 0; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.12); color: rgba(242,242,242,.82); font-size: 15px; font-weight: 300; line-height: 1.55; }
.next-step a { display: inline-flex; gap: 8px; color: #fff; text-decoration: none; border-bottom: 1px solid rgba(143,174,228,.5); }
.next-step a:hover { border-color: rgba(143,174,228,1); }
.start-over { margin: 0; font-size: 13px; }
.start-over a { color: rgba(242,242,242,.5); text-decoration: none; }
.start-over a:hover { color: #fff; }
.result-bar { display: none; }
.result-logo { display: block; max-width: 220px; max-height: 80px; margin: 0 0 22px; }
.logo-field { margin-top: 30px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.10); }
.logo-label { margin: 0 0 6px; color: rgba(242,242,242,.92); font-size: 16px; font-weight: 400; }
.logo-label span { margin-left: 8px; color: rgba(242,242,242,.6); font: 500 10.5px/1 "Geist Mono", monospace; letter-spacing: .12em; text-transform: uppercase; }
.logo-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 14px; }
.logo-row .btn { height: 44px; }
.logo-row input[type="file"] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.logo-row label.btn:has(input:focus-visible) { outline: 1px solid rgba(143,174,228,.9); outline-offset: 3px; }
.logo-name { color: rgba(242,242,242,.78); font-size: 15px; font-weight: 300; }
.logo-preview { display: block; max-width: 240px; max-height: 96px; min-height: 40px; margin-top: 14px; padding: 12px; background: #dfe5f0; border: 1px solid rgba(143,174,228,.35); object-fit: contain; }
.logo-preview[hidden], .result-logo[hidden] { display: none; }

/* The policy document as rendered on screen. */
.policy section { opacity: 0; transform: translateY(8px); transition: opacity .32s ease, transform .32s ease; }
.policy section.is-shown { opacity: 1; transform: none; }
.policy h2 { margin: 48px 0 16px; font-size: clamp(24px, 2.3vw, 30px); font-weight: 300; line-height: 1.15; letter-spacing: -.012em; }
.policy section:first-child h2 { margin-top: 0; }
.policy .sec-num { display: inline-block; min-width: 40px; color: #8faee4; font: 500 12px/1 "Geist Mono", monospace; letter-spacing: .1em; vertical-align: middle; }
.policy p, .policy li { color: rgba(242,242,242,.9); font-size: 17px; font-weight: 300; line-height: 1.62; text-wrap: pretty; }
.policy p { margin: 0 0 12px; white-space: pre-line; }
.policy ul, .policy ol { margin: 0 0 14px 20px; padding: 0; }
.policy li { margin-bottom: 6px; }
.policy table { width: 100%; border-collapse: collapse; margin: 8px 0 24px; font-size: 14.5px; }
.policy caption { margin-bottom: 8px; text-align: left; caption-side: top; color: rgba(242,242,242,.74); font: 500 11px/1.4 "Geist Mono", monospace; letter-spacing: .13em; text-transform: uppercase; }
.policy th, .policy td { border: 1px solid rgba(255,255,255,.12); padding: 10px 12px; vertical-align: top; text-align: left; font-weight: 300; color: rgba(242,242,242,.9); line-height: 1.45; }
.policy th { color: #8faee4; font: 500 11px/1.4 "Geist Mono", monospace; letter-spacing: .1em; text-transform: uppercase; background: rgba(80,124,203,.08); }
.policy .steps li { padding-left: 4px; margin-bottom: 10px; }

@media (max-width: 760px) {
  .builder { padding-top: 128px; }
  .choice-grid, .choice-grid--3 { grid-template-columns: 1fr; }
  .choice-grid--4 { grid-template-columns: 1fr 1fr; }
  .review-row { grid-template-columns: 1fr auto; gap: 4px 16px; }
  .review-row dt { grid-column: 1 / -1; }
  .result-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .result-panel { position: static; }
  .result { padding-bottom: 76px; }
  .result-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; gap: 10px; padding: 12px var(--gutter); background: rgba(2,8,23,.94); border-top: 1px solid rgba(143,174,228,.25); backdrop-filter: blur(8px); }
  .result-bar .btn { flex: 1; height: 46px; }
  .policy table { display: block; overflow-x: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .screen.is-active { animation: none; }
  .policy section { transition: none; opacity: 1; transform: none; }
  .progress-fill { transition: none; }
}

/* Readiness assessment. */
.statement { margin: 30px 0 0; padding: 0; border: 0; min-width: 0; }
.statement-text { display: flex; gap: 14px; padding: 0; margin: 0 0 14px; color: rgba(242,242,242,.94); font-size: 17px; font-weight: 300; line-height: 1.5; text-wrap: pretty; }
.statement-num { flex: 0 0 26px; color: #8faee4; font: 500 11px/1.9 "Geist Mono", monospace; letter-spacing: .1em; }
.scale { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-left: 40px; }
.scale-opt { position: relative; display: flex; align-items: center; justify-content: center; min-height: 46px; padding: 10px 12px; border: 1px solid var(--line); background: rgba(2,8,23,.35); color: rgba(242,242,242,.86); font-size: 15px; font-weight: 300; cursor: pointer; text-align: center; transition: border-color .18s ease, background-color .18s ease, color .18s ease; }
.scale-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.scale-opt:hover { border-color: var(--line-strong); color: #fff; }
.scale-opt:has(input:checked) { border-color: #8faee4; background: rgba(80,124,203,.16); color: #fff; }
.scale-opt:has(input:focus-visible) { outline: 1px solid rgba(143,174,228,.9); outline-offset: 3px; }
.stage-hero { padding: 26px 28px; border: 1px solid var(--line); background: rgba(80,124,203,.08); }
.stage-label { margin: 0 0 8px; color: #8faee4; font: 500 11px/1.3 "Geist Mono", monospace; letter-spacing: .13em; text-transform: uppercase; }
.stage-name { display: flex; align-items: baseline; gap: 16px; margin: 0 0 12px; font-size: clamp(30px, 3.2vw, 42px); font-weight: 300; line-height: 1.05; letter-spacing: -.02em; }
.stage-percent { color: #8faee4; font-size: .6em; }
.stage-read, .stage-loop { margin: 0; color: rgba(242,242,242,.9); font-size: 17px; font-weight: 300; line-height: 1.6; }
.stage-loop { margin-top: 10px; color: rgba(143,174,228,.95); }
.result-h3 { margin: 40px 0 16px; font-size: clamp(22px, 2.1vw, 26px); font-weight: 300; letter-spacing: -.01em; }
.dim-row { padding: 16px 0; border-top: 1px solid rgba(255,255,255,.12); opacity: 0; transform: translateY(6px); transition: opacity .3s ease, transform .3s ease; }
.dim-row.is-shown, .gap-card.is-shown { opacity: 1; transform: none; }
.dim-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 10px; }
.dim-name { font-size: 18px; font-weight: 400; }
.dim-score { color: rgba(242,242,242,.78); font: 500 11px/1 "Geist Mono", monospace; letter-spacing: .1em; text-transform: uppercase; }
.bar { height: 4px; background: rgba(255,255,255,.10); }
.bar span { display: block; height: 4px; background: linear-gradient(90deg, #507ccb, #8faee4); transition: width .6s ease; }
.dim-blurb { margin: 10px 0 0; color: rgba(242,242,242,.72); font-size: 15px; font-weight: 300; line-height: 1.5; }
.gap-card { margin-top: 12px; padding: 22px 24px; border: 1px solid var(--line); border-left: 2px solid #8faee4; background: rgba(2,8,23,.4); opacity: 0; transform: translateY(6px); transition: opacity .3s ease, transform .3s ease; }
.gap-step { margin: 12px 0 0; color: rgba(242,242,242,.92); font-size: 17px; font-weight: 300; line-height: 1.6; text-wrap: pretty; }
.next-step--alt { border-top: 0; padding-top: 0; }
@media (max-width: 760px) {
  .scale { grid-template-columns: 1fr 1fr; margin-left: 0; }
  .statement-text { font-size: 16px; }
  .stage-name { flex-wrap: wrap; gap: 8px 14px; }
}
@media (prefers-reduced-motion: reduce) { .dim-row, .gap-card { transition: none; opacity: 1; transform: none; } .bar span { transition: none; } }
