/* FreshAccess full page — BenefitsCal look: navy header, teal band, white step card. */
:root {
  --navy: #12445f;
  --navy-dark: #0c3349;
  --teal: #1a9aa0;
  --teal-tint: #eef7f8;
  --coral: #f35a45;
  --coral-dark: #d9432f;
  --gold: #f5a623;
  --ink: #1f2a33;
  --muted: #5b6770;
  --line: #b9c2c8;
  --hair: #e3e8eb;
  --bubble: #f3f6f8;
  --page: #f4f6f7;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--page); color: var(--ink);
  font-family: "Source Sans 3", "Source Sans Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 18px; line-height: 1.45;
}
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; background: #fff; color: var(--navy); padding: 8px 12px; border-radius: 4px; z-index: 10; }
.skip:focus { top: 12px; }

/* ---------- header ---------- */
.top { background: var(--navy); color: #fff; padding: 22px 0 130px; position: relative; }
.top::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 32px; background: var(--teal); }
.top-inner { max-width: 1240px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; gap: 32px; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; font-size: 34px; font-weight: 600; letter-spacing: -.01em; }
.logo b { color: var(--gold); font-weight: 600; }
.logo-mark { width: 52px; height: 52px; }
.nav { display: flex; gap: 28px; font-size: 19px; }
.nav a { text-decoration: none; }
.nav a:hover { text-decoration: underline; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.lang { height: 48px; min-width: 150px; padding: 0 12px; border: 1px solid #fff; border-radius: 4px; background: #fff; color: var(--ink); font-size: 18px; }
.btn-coral, .btn-outline {
  display: inline-grid; place-items: center; height: 48px; padding: 0 22px; border-radius: 6px;
  font-weight: 700; font-size: 18px; text-decoration: none; white-space: nowrap;
}
.btn-coral { background: var(--coral); color: #fff; border: 0; }
.btn-coral:hover { background: var(--coral-dark); }
.btn-outline { background: #fff; color: var(--teal); border: 2px solid var(--teal); }
.btn-outline:hover { background: var(--teal-tint); }

/* ---------- card ---------- */
.card {
  display: grid; grid-template-columns: 320px 1fr;
  max-width: 1240px; margin: -100px auto 40px; position: relative; z-index: 1;
  background: #fff; border-radius: 12px; box-shadow: 0 2px 12px rgba(12, 51, 73, .08);
  min-height: calc(100vh - 160px);
}
.rail { border-right: 1px solid var(--hair); padding: 40px 28px; }
.rail-kicker { margin: 0; font-size: 18px; }
.rail-title { margin: 0 0 24px; font-family: Montserrat, system-ui, sans-serif; font-weight: 800; font-size: 26px; color: var(--navy); }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.step {
  width: 100%; display: flex; gap: 16px; align-items: center; padding: 16px 14px;
  border: 0; border-radius: 8px; background: none; text-align: left; text-decoration: none; color: var(--navy);
  position: relative;
}
.step:hover { background: #f6f9fa; }
.step.on { background: #f3f8f9; box-shadow: 0 1px 6px rgba(12, 51, 73, .08); }
.step.on::after { content: ""; position: absolute; right: -29px; top: 0; bottom: 0; width: 8px; background: var(--navy); border-radius: 4px 0 0 4px; }
.step-icon svg { width: 34px; height: 34px; fill: none; stroke: var(--navy); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; display: block; }
.step-name { display: block; font-size: 20px; }
.step.on .step-name { font-weight: 700; }
.step small { display: block; font-size: 15px; color: var(--muted); }
.step.on small { color: var(--teal); font-weight: 600; }

/* ---------- main ---------- */
.main { padding: 40px 6% 32px; display: flex; flex-direction: column; min-width: 0; max-width: 940px; }
h1 { font-family: Montserrat, system-ui, sans-serif; font-weight: 800; color: var(--navy); font-size: 44px; line-height: 1.15; letter-spacing: -.01em; margin: 0 0 24px; }
.notice { display: flex; gap: 14px; padding: 18px 22px; background: var(--teal-tint); border: 1px solid #d6e7ea; border-left: 5px solid var(--teal); border-radius: 4px; }
.notice-icon { width: 24px; height: 24px; flex: none; fill: none; stroke: var(--navy); stroke-width: 2; stroke-linecap: round; margin-top: 2px; }
.notice-title { margin: 0 0 4px; font-weight: 700; color: var(--navy); }
.notice-text { margin: 0; font-size: 17px; }

.log { flex: 1; display: flex; flex-direction: column; gap: 18px; padding: 28px 0 12px; }
.row { display: flex; gap: 12px; align-items: flex-end; }
.row.user { justify-content: flex-end; }
.avatar { width: 36px; height: 36px; flex: none; }
.stack { display: flex; flex-direction: column; gap: 8px; max-width: 78%; }
.bubble { padding: 14px 18px; border-radius: 16px; border-bottom-left-radius: 4px; background: var(--bubble); max-width: 78%; }
.stack .bubble { max-width: 100%; }
.bubble p { margin: 0; }
.bubble p + p, .bubble ul { margin-top: 10px; }
.bubble ul { margin-bottom: 0; padding-left: 22px; }
.user .bubble { background: var(--navy); color: #fff; border-bottom-left-radius: 16px; border-bottom-right-radius: 4px; }
.typing { display: flex; align-items: center; gap: 12px; color: var(--muted); }
.dots { display: flex; gap: 5px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); animation: blink 1.2s infinite; }
.dots i:nth-child(2) { animation-delay: .2s; } .dots i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.callout { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: 4px; font-size: 16px; }
.callout svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; margin-top: 2px; }
.callout.warn { background: #fff6e5; border: 1px solid #f3d398; border-left: 5px solid var(--gold); }
.callout.error { background: #fdeceb; border: 1px solid #f5c2bc; border-left: 5px solid var(--coral); }
.inline-disclaimer { margin: 0; font-size: 14px; color: var(--muted); }
.cites { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cites-label { font-size: 14px; font-weight: 700; color: var(--muted); }
.chip { font-size: 14px; padding: 2px 10px; border-radius: 999px; background: var(--teal-tint); color: var(--navy); border: 1px solid #cfe3e6; }
.doc { margin-top: 8px; border-radius: 8px; background: #fff; color: var(--ink); font-size: 16px; }
.doc summary { padding: 8px 12px; cursor: pointer; font-weight: 700; color: var(--navy); overflow-wrap: anywhere; }
.doc-note { margin: 0; padding: 0 12px 8px; color: var(--muted); }
.doc pre { margin: 0; padding: 8px 12px 12px; max-height: 320px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; }
.pending { flex: 0 0 100%; display: flex; flex-wrap: wrap; gap: 8px; }
.pending[hidden] { display: none; }
.pending-file { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 4px 4px 4px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--teal-tint); font-size: 16px; overflow-wrap: anywhere; }
.pending-file button { width: 32px; height: 32px; flex: none; border: 0; background: none; color: var(--navy); font-size: 18px; cursor: pointer; }
.card-single { grid-template-columns: minmax(0, 1fr); }
.card-single .main { max-width: 860px; margin: 0 auto; width: 100%; }
.back { align-self: flex-start; margin-bottom: 16px; color: var(--navy); font-weight: 600; }
.req-list { margin: 8px 0 24px; padding: 0; list-style: none; counter-reset: req; }
.req-list > li { counter-increment: req; position: relative; padding: 20px 0 20px 52px; border-bottom: 1px solid var(--hair); }
.req-list > li::before { content: counter(req); position: absolute; left: 0; top: 20px; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 700; }
.req-list h2 { margin: 4px 0 8px; font-size: 22px; line-height: 1.25; color: var(--navy); }
.req-list p { margin: 0 0 8px; }
.req-list ul { margin: 0 0 10px; padding-left: 22px; }
.req-source { font-size: 15px; color: var(--muted); }
.req-list ul.limits { list-style: none; padding: 0; max-width: 420px; }
.limits li { display: flex; justify-content: space-between; gap: 16px; padding: 6px 0; border-bottom: 1px solid var(--hair); }
.limits b { color: var(--navy); }
.req-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.suggestions { display: flex; flex-wrap: wrap; gap: 10px; padding-left: 48px; }
.suggestion { padding: 10px 18px; border: 2px solid var(--teal); border-radius: 999px; background: #fff; color: var(--navy); font-weight: 600; font-size: 17px; }
.suggestion:hover { background: var(--teal-tint); }

.composer {
  position: sticky; bottom: 0; display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end;
  padding: 20px 0 8px; margin-top: 8px; border-top: 1px solid var(--hair); background: #fff;
}
.attach { width: 64px; height: 64px; flex: none; display: grid; place-items: center; border: 2px solid var(--teal); border-radius: 8px; background: #fff; color: var(--navy); }
.attach:hover { background: var(--teal-tint); }
.attach svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.input { flex: 1; min-width: 0; height: 64px; padding: 0 18px; font-size: 18px; color: var(--ink); background: #fafbfb; border: 2px solid var(--line); border-radius: 4px; }
.input:focus { outline: none; border-color: var(--teal); background: #fff; }
/* The question box starts one line tall and grows with its text (page.js fitInput), up to a
   limit after which it scrolls. */
textarea.input {
  display: block; height: 64px; max-height: 40vh; padding: 18px; resize: none; overflow-y: hidden;
  font: inherit; font-size: 18px; line-height: 1.45;
}
.send { height: 64px; min-width: 160px; padding: 0 28px; border: 0; border-radius: 8px; background: var(--coral); color: #fff; font-weight: 700; font-size: 20px; }
.send:hover { background: var(--coral-dark); }
button:disabled { opacity: .5; cursor: default; }

/* ---------- access code ---------- */
.gate { margin-top: 28px; padding: 28px; border: 1px solid var(--hair); border-radius: 8px; max-width: 640px; }
.gate-title { margin: 0 0 6px; font-family: Montserrat, system-ui, sans-serif; font-weight: 800; font-size: 24px; color: var(--navy); }
.gate-help { margin: 0 0 20px; color: var(--muted); }
.gate-label { display: block; margin-bottom: 8px; font-size: 20px; }
.gate-row { display: flex; gap: 14px; }
.gate-error { margin: 12px 0 0; min-height: 1.45em; color: var(--coral-dark); font-weight: 600; }
.step:disabled { opacity: .45; cursor: default; background: none; }

/* ---------- small screens ---------- */
@media (max-width: 960px) {
  .nav { display: none; }
  .top-inner { flex-wrap: wrap; row-gap: 14px; }
  .card { grid-template-columns: minmax(0, 1fr); margin: -100px 16px 24px; }
  .rail { min-width: 0; border-right: 0; border-bottom: 1px solid var(--hair); padding: 20px 16px 12px; }
  .rail-title { font-size: 20px; margin-bottom: 10px; }
  .steps { flex-direction: row; overflow-x: auto; gap: 8px; padding-bottom: 6px; }
  .step { width: auto; padding: 10px 12px; gap: 10px; white-space: nowrap; }
  .step small { display: none; }
  .step.on::after { display: none; }
  .step-icon svg { width: 24px; height: 24px; }
  .step-name { font-size: 16px; }
  .main { padding: 24px 16px 16px; }
  h1 { font-size: 30px; }
}
@media (max-width: 600px) {
  body { font-size: 17px; }
  .top { padding: 14px 0 110px; }
  .top-inner { padding: 0 16px; gap: 12px; flex-wrap: wrap; }
  .logo { font-size: 26px; } .logo-mark { width: 40px; height: 40px; }
  .top-actions { margin-left: 0; width: 100%; gap: 8px; }
  .lang { min-width: 0; flex: 1; height: 44px; }
  .btn-coral, .btn-outline { height: 44px; padding: 0 12px; font-size: 16px; }
  .btn-coral { display: none; }
  .card { margin: -96px 0 0; border-radius: 12px 12px 0 0; }
  .stack, .bubble { max-width: 90%; }
  .suggestions { padding-left: 0; }
  .attach, .input, .send { height: 52px; }
  textarea.input { height: 52px; padding: 12px 14px; font-size: 17px; }
  .gate { padding: 20px 16px; }
  .gate-row { flex-direction: column; }
  .gate-row .input { flex: none; }
  .attach { width: 52px; }
  .send { min-width: 0; padding: 0 18px; font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
