/* Guiding Hand package tool: customer questionnaire and the admin screen.
   Tokens from the design system v2.1; the CTA gradient on the primary button only; Fraunces headings in sentence case, Inter body,
   Cinzel for the wordmark and eyebrows. Fonts are self-hosted (the CSP allows 'self' only). No inline styles anywhere (CSP). */

@font-face { font-family: "Inter"; font-weight: 400; src: url("fonts/inter-400.d6d8942f0f9e.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Inter"; font-weight: 500; src: url("fonts/inter-500.94a86bb3f17b.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Inter"; font-weight: 600; src: url("fonts/inter-600.33f231c9b4e9.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Fraunces"; font-weight: 500; src: url("fonts/fraunces-500.4ef0142a5af7.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Fraunces"; font-weight: 600; src: url("fonts/fraunces-600.1e70bfeea697.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Cinzel"; font-weight: 600; src: url("fonts/cinzel-600.0f37b3696410.ttf") format("truetype"); font-display: swap; }

:root {
  --cream: #FBF7F5; --panel: #F5EEF2; --card: #FFFFFF; --ink: #2C2F36; --body: #4B4E57; --muted: #5F6470;
  --hair: #ECE3E6; --hair2: #E3D8DE; --pink: #EC9CB6; --lavender: #B49AC8; --lavender-text: #75638D; --blue: #6BA6CE;
  --link: #3A72B0; --cta: linear-gradient(125deg, #6FB0DA, #4A8AC6, #3A72B0); --error: #A3261B; --ok: #1B5E36;
  --radius: 18px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--body); font: 400 16px/1.55 "Inter", system-ui, sans-serif; }
h1, h2, h3 { font-family: "Fraunces", Georgia, serif; color: var(--ink); font-weight: 600; line-height: 1.25; }
h1 { font-size: 1.9rem; margin: 0.2em 0 0.4em; }
h2 { font-size: 1.35rem; margin: 1.4em 0 0.5em; }
h3 { font-size: 1.1rem; margin: 1em 0 0.4em; }
a { color: var(--link); }
:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* header lockup */
.site-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px; background: var(--card); border-bottom: 1px solid var(--hair); }
.lockup { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.lockup img { width: 38px; height: 38px; }
.lockup .wm { font-family: "Cinzel", serif; font-weight: 600; color: var(--ink); letter-spacing: 0.08em; line-height: 1.1; font-size: 0.95rem; }
.lockup .wm small { display: block; font-size: 0.62rem; letter-spacing: 0.14em; color: var(--lavender-text); }
.site-footer { padding: 20px 20px 32px; text-align: center; font-size: 15px; color: var(--muted); }
.eyebrow { font-family: "Cinzel", serif; text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.78rem; color: var(--lavender-text); }
.eyebrow::before { content: ""; display: inline-block; width: 22px; height: 2px; background: var(--lavender); vertical-align: middle; margin-right: 8px; }

main { max-width: 760px; margin: 0 auto; padding: 24px 16px 96px; }
.card { background: var(--card); border: 1px solid var(--hair); border-radius: var(--radius); box-shadow: 0 2px 10px rgba(44, 47, 54, 0.05); padding: 22px; margin: 16px 0; }
.meta, .help { color: var(--muted); font-size: 0.95rem; }

/* buttons: pill; the gradient on the primary only */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 22px; border-radius: 999px; border: 1px solid var(--hair2);
       background: var(--card); color: var(--ink); font: 500 1rem "Inter", sans-serif; cursor: pointer; text-decoration: none; }
.btn-primary { background: var(--cta); color: #fff; border: 0; }
.btn-link { border: 0; background: none; color: var(--link); text-decoration: underline; min-height: 44px; padding: 8px 4px; cursor: pointer; font: inherit; }
.btn-danger { color: var(--error); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
@media (max-width: 600px) { .actions .btn { width: 100%; } }

/* fields */
.q { margin: 18px 0; }
.q > label, .q legend { display: block; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.q fieldset { border: 0; padding: 0; margin: 0; }
input[type=text], input[type=email], input[type=tel], input[type=date], input[type=password], input[type=number], select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; font: 400 16px "Inter", sans-serif; color: var(--ink); background: #fff;
  border: 1px solid var(--hair2); border-radius: 10px; }
textarea { min-height: 110px; }
.choice { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.choice input { width: 22px; height: 22px; }
.error { color: var(--error); font-size: 0.95rem; margin-top: 6px; }
.err-input { border-color: var(--error) !important; }
/* tooltips (Stage 2a): an "i" button after the label; the tooltip shows on hover of its "i" (devices that hover), on keyboard focus
   and, on a phone, on tap (intake.js adds .open); Escape closes it. Luis's walkthrough: the "i" follows the question's last word on
   its line (the last word, the asterisk and the "i" never wrap apart: .nowrap); a 16 px glyph in a 24 px target (WCAG 2.2 AA
   minimum) with room below it; on wide screens the tooltip opens to the right of the "i", not over the field */
.q { position: relative; }
.qhead { position: relative; display: block; margin-bottom: 8px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.qhead label { display: inline; font-weight: 600; color: var(--ink); }
.qhead label.meta { font-weight: 400; color: var(--muted); }
.q legend.qhead { width: 100%; padding: 0; }
.nowrap { white-space: nowrap; }
.tipwrap { position: static; display: inline-flex; vertical-align: middle; margin-left: 4px; }
.tip-i { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; padding: 0; margin: -4px 0;
         border: 0; background: none; cursor: pointer; }
.tip-glyph { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--link); color: var(--link);
             font: 700 11px/13px "Inter", sans-serif; text-align: center; }
.tip { display: none; position: absolute; left: 0; right: 0; top: 100%; z-index: 20; margin-top: 4px; font-size: 15px; font-weight: 400; color: var(--body);
       background: var(--panel); border: 1px solid var(--hair2); border-radius: 10px; padding: 10px 12px; box-shadow: 0 4px 14px rgba(44, 47, 54, 0.12);
       overflow-wrap: anywhere; text-align: left; white-space: normal; }
@media (min-width: 1100px) {
  .tipwrap { position: relative; }
  .tip { left: calc(100% + 8px); right: auto; top: 50%; transform: translateY(-50%); margin-top: 0; width: max-content;
         max-width: min(300px, calc(100vw - 32px)); white-space: normal; }
  /* intake.js adds .tip-below when the tooltip would pass the window's right edge (Stage 3): below the "i", right-aligned to it */
  .tip.tip-below { left: auto; right: 0; top: 100%; transform: none; margin-top: 4px; }
}
@media (hover: hover) { .tipwrap:hover > .tip { display: block; } }
.tipwrap:focus-within > .tip, .tipwrap.open > .tip { display: block; }
/* required marks (Stage 2a): red #B42318 (6.1 to 1 on the cream) */
.req { color: #B42318; font-weight: 700; margin-left: 3px; }
.req-note { color: #B42318; font-size: 0.95rem; margin: 0 0 6px; }
.due { font-weight: 700; text-decoration: underline; }
/* fixed prefixes: +1 for phone, $ for money */
.inwrap.has-prefix { display: flex; align-items: stretch; }
.inwrap .prefix { display: flex; align-items: center; padding: 0 12px; border: 1px solid var(--hair2); border-right: 0; border-radius: 10px 0 0 10px;
                  background: var(--panel); color: var(--body); font-weight: 500; }
.inwrap.has-prefix input { border-radius: 0 10px 10px 0; min-width: 0; }
::placeholder { color: #8A8F98; opacity: 1; }
/* long words never push the page sideways */
.q > label, .q legend, .problems, .list-question, .notice, .card { overflow-wrap: anywhere; }
.list-row { border: 1px solid var(--hair); border-radius: 14px; padding: 12px 14px; margin: 12px 0; background: #fff; }
.list-row .row-head { display: flex; justify-content: space-between; align-items: center; }
.need-more { color: var(--muted); }
.save-state { position: fixed; right: 16px; bottom: 16px; max-width: calc(100vw - 32px); background: var(--card); border: 1px solid var(--hair); border-radius: 999px; padding: 8px 14px; font-size: 0.9rem; overflow-wrap: anywhere; }
.save-state.bad { color: var(--error); }

/* section nav */
.steps { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 12px 0 0; }
.steps a, .steps span { display: inline-block; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--hair2); text-decoration: none; color: var(--body); font-size: 0.9rem; min-height: 36px; }
.steps .current { background: var(--panel); color: var(--ink); font-weight: 600; }

.slots { width: 100%; border-collapse: collapse; }
.slots td, .slots th { text-align: left; padding: 10px 6px; border-bottom: 1px solid var(--hair); vertical-align: top; }
.state-Attached { color: var(--ok); font-weight: 600; }
.state-Missing { color: var(--error); font-weight: 600; }

.notice { background: var(--panel); border-radius: 14px; padding: 14px 16px; }
.problems li { margin: 6px 0; }
.codes { font-family: ui-monospace, Menlo, monospace; font-size: 1.1rem; columns: 2; }
.qr svg { width: 220px; height: 220px; }
/* Covered Individuals (Stage 2a): row 1 is the licensee or administrator; the question heads rows 2 to 5 */
.row-group { font-size: 1.05rem; margin: 0; }
.list-question { font-weight: 600; margin: 18px 0 8px; }

/* Stage 3: the download page (the Download and DownloadPhone mockups): one column on phones, full-width buttons, 44 px targets */
.dl h1 { margin-bottom: 4px; }
.dl .signed-in { text-align: right; overflow-wrap: anywhere; }
.dl-grid { display: flex; flex-wrap: wrap; gap: 20px; align-items: stretch; }
.dl-files { flex: 2 1 460px; min-width: 0; }
.dl-revisions { flex: 1 1 280px; min-width: 0; }
.btn-block { display: flex; width: 100%; box-sizing: border-box; }
.dl-label { font-weight: 600; color: var(--ink); margin: 16px 0 8px; }
.dl-list, .dl-versions { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.dl-list li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 12px; padding: 12px 14px; border-radius: 12px; background: var(--cream); font-size: 1rem; }
.dl-list li.dl-overview { background: #E3EEF8; border: 1px solid #A9C8E6; }
.dl-open { padding: 12px 14px; border-radius: 12px; background: #D6F0DF; color: #1F4D31; }
.dl-closed { padding: 12px 14px; border-radius: 12px; background: var(--panel, #F5EEF2); }
.dl-versions li { display: flex; justify-content: space-between; gap: 12px; }
.dl-versions .current { color: #23633C; font-weight: 600; }
.dl-upgrade { border-color: #A9C8E6; }
.dl-foot { margin-top: 20px; }
@media (max-width: 600px) {
  .dl-list li .btn { width: 100%; }
  .dl .signed-in { text-align: left; }
}
