/* ==========================================================================
   Gold Monster claims wizard — wizard.html only.
   Separate stylesheet (deviation from the append-to-styles.css rule, approved
   for this page) so the print layout for the generated filing packet stays
   isolated. Screen styles lean on the CSS variables from styles.css.
   ========================================================================== */

/* ---------- layout ---------- */

/* width:100% is load-bearing. This <main> is a grid item of .appshell, and
   `margin: 0 auto` on a grid item turns OFF stretch alignment — the item then
   sizes to fit-content, so the affidavit's 10-column claims table dragged the
   whole page to 816px on a 390px phone. An explicit 100% pins it to the grid
   area and lets the table's own overflow-x:auto do the scrolling. */
.wizard-main { max-width: 860px; width: 100%; margin: 0 auto; padding: 1.5rem 1rem 4rem; }

.wz-screen { animation: wz-fade 0.25s ease; }
@keyframes wz-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.wz-screen h1 { font-family: var(--display); font-size: clamp(1.5rem, 4vw, 2.1rem); margin: 0.75rem 0 1rem; color: var(--text); }
.wz-screen h2 { font-family: var(--display); font-size: 1.2rem; margin: 2rem 0 0.75rem; }
.wz-lede { color: var(--text-dim); line-height: 1.6; margin-bottom: 1.25rem; }
.wz-help { color: var(--text-dim); line-height: 1.55; margin-bottom: 1rem; font-size: 0.95rem; }
.wz-note { color: var(--text-dim); font-size: 0.85rem; margin-top: 1rem; line-height: 1.5; }
.wz-hint { display: block; color: var(--text-dim); font-size: 0.82rem; line-height: 1.5; margin-top: 0.35rem; }

.wz-progress { height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; margin-bottom: 0.5rem; }
.wz-progress-bar { height: 100%; background: var(--grad-gold); transition: width 0.3s ease; }

.wz-back { background: none; border: none; color: var(--text-dim); font-size: 0.9rem; cursor: pointer; padding: 0.6rem 0.6rem 0.6rem 0; min-height: 44px; }
.wz-back:hover { color: var(--gold); }

/* ---------- options & fields (44px tap targets — field product) ---------- */

.wz-options { display: grid; gap: 0.6rem; margin: 1rem 0 1.25rem; }
.wz-options-row { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }

.wz-option { display: flex; align-items: flex-start; gap: 0.7rem; padding: 0.85rem 1rem; min-height: 44px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; transition: border-color 0.15s ease; }
.wz-option:hover { border-color: var(--gold-lo); }
.wz-option input { width: 20px; height: 20px; margin-top: 0.1rem; accent-color: var(--gold); flex: none; }
.wz-option-label { color: var(--text); line-height: 1.45; font-size: 0.97rem; }
.wz-option-label small { display: block; color: var(--text-dim); font-size: 0.82rem; margin-top: 0.25rem; line-height: 1.45; }
.wz-option:has(input:checked) { border-color: var(--gold); background: rgba(224, 166, 60, 0.07); }

.wz-fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin: 0 0 1.25rem; }
.wz-fieldset legend { padding: 0 0.5rem; color: var(--text); font-weight: 600; font-size: 0.95rem; }

.wz-field { margin-bottom: 1rem; }
.wz-field label { display: block; margin-bottom: 0.35rem; color: var(--text); font-size: 0.92rem; font-weight: 600; }
.wz-field input, .wz-field select, .wz-field textarea {
  width: 100%; min-height: 44px; padding: 0.6rem 0.75rem; font-size: 1rem;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.wz-field textarea { line-height: 1.5; }
.wz-field input:focus, .wz-field select:focus, .wz-field textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.wz-field-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.wz-field-row .wz-field { flex: 1 1 160px; }
.wz-field-row .wz-field-sm { flex: 0 1 150px; }

.wz-static-row { display: flex; gap: 1rem; padding: 0.7rem 0; border-bottom: 1px solid var(--line); font-size: 0.95rem; }
.wz-static-label { flex: 0 0 90px; color: var(--text-dim); font-weight: 600; }
.wz-static-value { color: var(--text); }

/* ---------- actions ---------- */

.wz-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.5rem 0 0.5rem; align-items: center; }
.wz-actions .btn { min-height: 44px; }
.wz-unsure { font-size: 0.92rem; }

.wz-error { color: #e08a7a; font-size: 0.92rem; margin: 0.75rem 0; }

/* ---------- "I'm not sure" education panel ---------- */

.wz-unsure-panel { margin: 1.25rem 0; padding: 1rem 1.15rem; background: rgba(224, 166, 60, 0.06); border: 1px solid rgba(224, 166, 60, 0.3); border-left: 3px solid var(--gold); border-radius: var(--radius); font-size: 0.92rem; line-height: 1.55; color: var(--text-dim); }
.wz-unsure-panel p { margin: 0.35rem 0; }
.wz-unsure-panel a { color: var(--gold-bright); }

/* ---------- urgency banner & route-outs ---------- */

.wz-urgent { margin: 1rem 0; padding: 0.9rem 1.1rem; background: rgba(200, 60, 40, 0.12); border: 1px solid rgba(220, 90, 70, 0.55); border-left: 4px solid #c8503c; border-radius: var(--radius); color: #f0b3a8; font-size: 0.95rem; line-height: 1.5; }

.wz-routeout .routeout-copy { font-size: 1.05rem; line-height: 1.6; color: var(--text); padding: 1rem 1.15rem; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: var(--radius); }

.wz-sample-chip { display: inline-block; margin: 0 0 1rem; padding: 0.45rem 0.9rem; font-size: 0.85rem; font-weight: 600; color: var(--gold-bright); background: rgba(224, 166, 60, 0.1); border: 1px dashed var(--gold-lo); border-radius: var(--radius); }

/* ---------- review tables ---------- */

.wz-review-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; margin: 0.75rem 0 1.25rem; }
.wz-review-table th, .wz-review-table td { text-align: left; padding: 0.55rem 0.65rem; border-bottom: 1px solid var(--line); vertical-align: top; line-height: 1.5; }
.wz-review-table th { color: var(--text-dim); font-weight: 600; white-space: nowrap; }
.wz-fee-line { font-size: 1rem; line-height: 1.6; }
.wz-fee-verified a { color: var(--gold-bright); }

/* ---------- packet: on-screen document cards ---------- */

.wz-actions-sticky { position: sticky; top: 0.5rem; z-index: 5; background: var(--ink); padding: 0.5rem 0; }

.packet-doc { margin: 2rem 0; }
.packet-doc-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.6rem; }
.packet-doc-head h2 { margin: 0; font-size: 1.1rem; }
.wz-reviewcheck { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px; padding: 0.4rem 0.75rem; font-size: 0.9rem; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; }
.wz-reviewcheck input { width: 20px; height: 20px; accent-color: var(--gold); }

.wz-d2-gate { padding: 1.15rem 1.25rem; background: var(--surface); border: 1px dashed var(--gold-lo); border-radius: var(--radius); font-size: 0.94rem; line-height: 1.55; color: var(--text-dim); }
.wz-d2-gate a { color: var(--gold-bright); }
.wz-callscript { color: var(--text); }

/* The document itself — white "paper" on screen so print output matches. */
.doc-page { position: relative; overflow: hidden; background: #fdfcf8; color: #1c1a14; padding: 2.25rem 2.5rem; border-radius: 2px; border: 1px solid var(--line); box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45); font-family: var(--serif); font-size: 0.95rem; line-height: 1.6; }
.doc-page h2, .doc-page h3 { color: #1c1a14; font-family: var(--serif); }
.doc-page .doc-title { font-size: 1.15rem; text-align: center; letter-spacing: 0.04em; margin: 0 0 0.35rem; }
.doc-page .doc-subtitle { text-align: center; margin-bottom: 1.25rem; }
.doc-page h3 { font-size: 1rem; margin: 1.25rem 0 0.4rem; }
.doc-page p { margin: 0.6rem 0; }
.doc-page ol, .doc-page ul { margin: 0.6rem 0 0.6rem 1.4rem; }
.doc-page li { margin: 0.35rem 0; }
.doc-indent { margin-left: 1.5rem; }
.doc-signatures { margin: 1.75rem 0 1rem; }
.doc-signature-line { white-space: nowrap; overflow-x: auto; }
.doc-return-address, .doc-recorder-block { margin: 0.9rem 0; line-height: 1.5; }
.doc-prepnote { font-size: 0.85rem; font-style: italic; margin-top: 1.5rem; }
.doc-fee-table, .doc-deadline-table { width: 100%; border-collapse: collapse; margin: 0.75rem 0; }
.doc-fee-table td, .doc-deadline-table td, .doc-deadline-table th { border: 1px solid #b9b29c; padding: 0.45rem 0.6rem; text-align: left; vertical-align: top; }
.doc-fee-total td { font-weight: 700; }
.doc-feenote { font-size: 0.85rem; }
.doc-checklist li { margin: 0.7rem 0; }
.doc-brand { margin-top: 2rem; padding-top: 0.6rem; border-top: 1px solid #b9b29c; font-size: 0.8rem; color: #55503f; }
.doc-disclaimer { font-size: 0.78rem; color: #55503f; line-height: 1.5; }
.doc-disclaimer p { margin: 0.3rem 0; }

/* DRAFT watermark — present until the per-document review checkbox is checked. */
.doc-page.draft::before {
  content: "DRAFT";
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-size: clamp(4rem, 18vw, 9rem); font-weight: 700;
  letter-spacing: 0.15em; color: rgba(160, 120, 40, 0.18);
  transform: rotate(-28deg); pointer-events: none; z-index: 1;
}

/* ---------- mobile ---------- */

@media (max-width: 640px) {
  .wizard-main { padding: 1rem 0.85rem 3rem; }
  .doc-page { padding: 1.4rem 1.1rem; font-size: 0.9rem; }
  .doc-signature-line { white-space: normal; }
  .packet-doc-head { flex-direction: column; align-items: flex-start; }
}

/* ==========================================================================
   PRINT — letter-size, one document per page, clean output.
   ========================================================================== */

@media print {
  @page { size: letter; margin: 0.75in; }

  /* Hide the app chrome and every interview control — paper gets documents only. */
  body.member-area > header, body.member-area > nav, .site-footer,
  .appshell-topbar, .apptabs, .appshell-sidebar, .appshell-menu,
  .wz-progress, .wz-nav, .wz-back, .wz-actions, .wz-urgent, .wz-sample-chip,
  .packet-doc-head, .wz-d2-gate, .wz-lede, .wz-screen > h1,
  .wz-doc-note, .afd-form, .afd-screen-note, .afd-warn,
  .afd-intent, .afd-prefill-note,
  .globe-ambient { display: none !important; }

  /* The app shell lays out main next to the sidebar — flatten it for paper. */
  .appshell { display: block !important; }
  .appshell-main { max-width: none !important; padding: 0 !important; margin: 0 !important; }

  body { background: #fff; color: #000; }
  .wizard-main { max-width: none; padding: 0; margin: 0; }

  .packet-doc { margin: 0; page-break-after: always; break-after: page; }
  .packet-doc:last-child { page-break-after: auto; break-after: auto; }

  .doc-page { border: none; box-shadow: none; border-radius: 0; padding: 0; background: #fff; color: #000; overflow: visible; }
  .doc-page h2, .doc-page h3 { color: #000; }
  .doc-brand, .doc-disclaimer { color: #333; }

  /* Watermark still prints on unreviewed drafts — that is the point. */
  .doc-page.draft::before { color: rgba(120, 120, 120, 0.22); }
}
/* ==========================================================================
   Paperwork Helper assist panel — appended to wizard.css.
   Reuses custom properties from styles.css (--surface, --line, --gold, etc.).
   Screen only; hidden in print.
   ========================================================================== */

/* ---------- panel shell ---------- */

.wz-assist { margin-top: 2rem; padding: 1.25rem 1.15rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }

/* The helper is reachable on EVERY interview screen (QA 2026-08-12 M5 — it
   used to vanish past the intro, 13 Back-taps away). Past the intro it starts
   collapsed to a one-line bar; js/wizard/assist.js drives [data-collapsed]. */
.wz-assist[data-collapsed] { padding-top: 0.6rem; padding-bottom: 0.6rem; }
.wz-assist[data-collapsed] #assist-body { display: none; }
.wz-assist[data-collapsed] .wz-assist-header { margin-bottom: 0; }

.wz-assist-toggle { margin-left: auto; min-height: 36px; padding: 0.3rem 0.85rem; background: transparent; color: var(--text-dim); border: 1px solid var(--line); border-radius: var(--radius); font-size: 0.84rem; font-weight: 600; cursor: pointer; }
.wz-assist-toggle:hover { border-color: var(--gold); color: var(--gold-bright); }
.wz-assist[data-collapsed] .wz-assist-toggle { border-color: var(--gold-lo); color: var(--gold-bright); }

.wz-assist-header { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.wz-assist-header h2 { margin: 0; font-size: 1.15rem; }

.wz-assist-beta { display: inline-block; padding: 0.1rem 0.55rem; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); background: rgba(224, 166, 60, 0.1); border: 1px solid var(--gold-lo); border-radius: 999px; vertical-align: middle; }

.wz-assist-tagline { color: var(--text-dim); font-size: 0.88rem; line-height: 1.55; margin: 0 0 1rem; }

/* ---------- status box (wz-unsure-panel look) ---------- */

.wz-assist-status { margin: 1rem 0; padding: 0.9rem 1.1rem; background: rgba(224, 166, 60, 0.06); border: 1px solid rgba(224, 166, 60, 0.3); border-left: 3px solid var(--gold); border-radius: var(--radius); font-size: 0.9rem; line-height: 1.55; color: var(--text-dim); }
.wz-assist-status a { color: var(--gold-bright); }

/* ---------- chat thread ---------- */

.wz-assist-thread { display: flex; flex-direction: column; gap: 0.85rem; margin: 1rem 0; }

.wz-assist-msg { max-width: 85%; padding: 0.7rem 0.9rem; border-radius: var(--radius); font-size: 0.93rem; line-height: 1.5; word-break: break-word; }

.wz-assist-msg.from-member { align-self: flex-end; background: rgba(224, 166, 60, 0.08); border: 1px solid rgba(224, 166, 60, 0.18); color: var(--text); }

.wz-assist-msg.from-helper { align-self: flex-start; background: var(--ink); border: 1px solid var(--line); color: var(--text); }

/* --- extracted fields inside a helper bubble --- */

.wz-assist-fields { width: 100%; margin: 0.35rem 0; }

.wz-assist-field { display: flex; align-items: center; gap: 0.6rem; min-height: 44px; padding: 0.4rem 0; border-bottom: 1px solid var(--line); }
.wz-assist-field:last-child { border-bottom: none; }
.wz-assist-field input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--gold); flex: none; }

.wz-assist-field-label { color: var(--text-dim); font-weight: 600; font-size: 0.8rem; white-space: nowrap; min-width: 0; flex-shrink: 0; }
.wz-assist-field-value { color: var(--text); font-size: 0.93rem; word-break: break-word; min-width: 0; }

.wz-assist-missing { color: var(--text-dim); font-size: 0.85rem; margin: 0.3rem 0; padding-left: 1.3rem; }
.wz-assist-missing li { margin: 0.15rem 0; }

.wz-assist-apply { margin-top: 0.7rem; }

/* ---------- composer ---------- */

.wz-assist-composer { margin-top: 1.25rem; }

.wz-assist-label { display: block; margin-bottom: 0.35rem; color: var(--text); font-size: 0.92rem; font-weight: 600; }

.wz-assist-composer textarea {
  width: 100%; min-height: 44px; padding: 0.6rem 0.75rem; font-size: 1rem;
  background: var(--ink); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius);
  line-height: 1.5; resize: vertical; font-family: inherit;
}
.wz-assist-composer textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.wz-assist-composer textarea:disabled { opacity: 0.55; cursor: not-allowed; }

.wz-assist-composer-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-top: 0.6rem; }

.wz-assist-count { color: var(--text-dim); font-size: 0.82rem; margin-left: auto; }

.wz-assist-attach { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px; padding: 0.5rem 0.9rem; color: var(--text); background: transparent; border: 1.5px solid var(--silver-dim); border-radius: var(--radius); font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: border-color 0.15s ease; }
.wz-assist-attach:hover { border-color: var(--gold); color: var(--gold-bright); }
.wz-assist-attach input[type="file"] { display: none; }

.wz-assist-composer .btn { min-height: 44px; }
.wz-assist-composer .btn:disabled { opacity: 0.5; cursor: not-allowed; }
.wz-assist-attach:has(input:disabled) { opacity: 0.55; cursor: not-allowed; pointer-events: none; }

/* ---------- mobile-first ---------- */

@media (max-width: 639px) {
  .wz-assist { padding: 1rem 0.9rem; margin-left: -0.85rem; margin-right: -0.85rem; border-radius: 0; border-left: none; border-right: none; }
  .wz-assist-msg { max-width: 90%; }
  .wz-assist-field { flex-wrap: wrap; gap: 0.25rem 0.5rem; }
  .wz-assist-field-label { font-size: 0.78rem; }
  .wz-assist-composer-row { flex-direction: column; align-items: stretch; }
  .wz-assist-count { margin-left: 0; text-align: right; }
}

@media (min-width: 640px) {
  .wz-assist-msg { max-width: 75%; }
}

/* ---------- print: hide the panel entirely ---------- */

@media print {
  .wz-assist { display: none !important; }
}

/* ---------- claim workspace (js/claim-workspace.js) ---------- */

.wz-ws-statusbar { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem 1rem; margin: 0 0 1rem; padding: 0.55rem 0.9rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); font-size: 0.85rem; }
.wz-ws-claim { color: var(--text); font-weight: 600; }
.wz-ws-savestate { color: var(--text-dim); }
.wz-ws-savestate-saving { color: var(--gold-bright); }
.wz-ws-savestate-error { color: #f0b3a8; }
.wz-ws-reviewcount { color: var(--gold-bright); font-weight: 600; }
.wz-ws-historybtn { margin-left: auto; padding: 0.35rem 0.8rem; background: transparent; color: var(--text-dim); border: 1px solid var(--line); border-radius: var(--radius); font-size: 0.82rem; font-weight: 600; cursor: pointer; }
.wz-ws-historybtn:hover { border-color: var(--gold); color: var(--gold-bright); }

.wz-ws-chip { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem 0.9rem; margin: 0.4rem 0 1rem; padding: 0.6rem 0.9rem; background: rgba(224, 166, 60, 0.08); border: 1px solid rgba(224, 166, 60, 0.35); border-left: 3px solid var(--gold); border-radius: var(--radius); font-size: 0.87rem; color: var(--text-dim); }
.wz-ws-chip-conflict { background: rgba(200, 60, 40, 0.08); border-color: rgba(220, 90, 70, 0.45); border-left-color: #c8503c; }
.wz-ws-chip-text { flex: 1 1 16rem; line-height: 1.45; }
.wz-ws-chip-text strong { color: var(--text); }
.wz-ws-chip-actions { display: inline-flex; gap: 0.5rem; }
.wz-ws-chip-btn { min-height: 36px; padding: 0.3rem 0.85rem; font-size: 0.84rem; }

.wz-ws-meter { margin: 1rem 0; padding: 0.9rem 1.1rem; background: rgba(224, 166, 60, 0.08); border: 1px solid rgba(224, 166, 60, 0.35); border-left: 3px solid var(--gold); border-radius: var(--radius); font-size: 0.92rem; line-height: 1.5; color: var(--text-dim); }
.wz-ws-meter strong { color: var(--text); }
.wz-ws-meter ul { margin: 0.5rem 0 0; padding-left: 1.2rem; }
.wz-ws-jump { background: none; border: none; padding: 0; color: var(--gold-bright); font-size: inherit; text-decoration: underline; cursor: pointer; }

.wz-ws-history { margin: 1.25rem 0; padding: 1rem 1.15rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.wz-ws-history-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.wz-ws-history-head h2 { margin: 0; font-size: 1.15rem; }
.wz-ws-history-note { color: var(--text-dim); font-size: 0.87rem; line-height: 1.5; }
.wz-ws-events { margin: 0.5rem 0; padding-left: 1.4rem; max-height: 22rem; overflow-y: auto; font-size: 0.88rem; }
.wz-ws-events li { padding: 0.3rem 0; border-bottom: 1px solid var(--line); }
.wz-ws-events li:last-child { border-bottom: none; }
.wz-ws-ev-time { color: var(--text-dim); font-size: 0.8rem; margin-right: 0.4rem; white-space: nowrap; }
.wz-ws-ev-text { color: var(--text); }
.wz-ws-history-view { margin-top: 1rem; padding-top: 0.75rem; border-top: 1px solid var(--line); }
.wz-ws-history-view h3 { margin: 0 0 0.6rem; font-size: 1rem; }
.wz-ws-diff th, .wz-ws-diff td { color: var(--gold-bright); }
.wz-ws-restore-done { color: var(--text); }

@media print {
  .wz-ws-statusbar, .wz-ws-chip, .wz-ws-meter, .wz-ws-history { display: none !important; }
}

/* ==========================================================================
   Section jump nav + edit-from-review (TurboTax flow — 2026-08-14)
   ========================================================================== */

.wz-nav { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.75rem 0 1.5rem; }
.wz-nav-tab { min-height: 34px; padding: 0.25rem 0.9rem; background: transparent; color: var(--text-dim); border: 1px solid var(--line); border-radius: 999px; font-size: 0.82rem; font-weight: 600; letter-spacing: 0.02em; cursor: pointer; }
.wz-nav-tab:hover:not(:disabled) { border-color: var(--gold); color: var(--gold-bright); }
.wz-nav-tab.is-current { border-color: var(--gold); color: var(--gold-bright); background: rgba(224, 166, 60, 0.12); }
.wz-nav-tab:disabled { opacity: 0.35; cursor: default; }

.wz-review-editcell { text-align: right; white-space: nowrap; vertical-align: top; }
.wz-editlink { background: none; border: none; padding: 0; color: var(--gold-bright); font-size: 0.85rem; font-weight: 600; text-decoration: underline; cursor: pointer; }
.wz-editlink:hover { color: var(--gold); }

/* Screen-only note beside generated documents (the disclaimer lives HERE now,
   not on the printed sheets — Kris directive 8/14). Hidden in print above. */
.wz-doc-note { margin: 0 0 1.5rem; padding: 0.9rem 1.1rem; background: rgba(224, 166, 60, 0.06); border: 1px solid rgba(224, 166, 60, 0.3); border-left: 3px solid var(--gold); border-radius: var(--radius); font-size: 0.9rem; line-height: 1.55; color: var(--text-dim); }
.wz-doc-note p { margin: 0 0 0.4rem; }
.wz-doc-note .doc-disclaimer p { margin: 0.35rem 0 0; font-size: 0.85rem; }

/* ==========================================================================
   Affidavit of Annual Assessment Work (Form 3830-004) — affidavit.html
   ========================================================================== */

.afd-form .wz-field-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.afd-claims-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.afd-claims-table th, .afd-claims-table td { border: 1px solid var(--line); padding: 0.3rem 0.4rem; }
.afd-claims-table input { width: 100%; min-width: 4.5rem; background: transparent; border: none; color: var(--text); font-size: 0.85rem; padding: 0.2rem; }
.afd-claims-table input:focus { outline: 1px solid var(--gold); }
.afd-row-remove { background: none; border: none; color: var(--text-dim); font-size: 1rem; cursor: pointer; padding: 0.1rem 0.4rem; }
.afd-row-remove:hover { color: #f0b3a8; }
.afd-fee-line { margin: 0.75rem 0; font-size: 0.95rem; color: var(--text); }
.afd-warn { margin: 0.75rem 0; padding: 0.7rem 1rem; background: rgba(200, 60, 40, 0.1); border: 1px solid rgba(220, 90, 70, 0.45); border-left: 3px solid #c8503c; border-radius: var(--radius); font-size: 0.9rem; }
.afd-person { border: 1px solid var(--line); border-radius: var(--radius); padding: 0.75rem 0.9rem; margin: 0.6rem 0; }
.afd-person-head { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; }

/* Printed affidavit typography — federal-form plain, no brand chrome.
   The header is a three-cell flex row (form no. | title | OMB) — no negative
   margins, so screen and paper can never disagree about alignment. */
.doc-page .afd-headrow { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 0.8rem; }
.doc-page .afd-formno, .doc-page .afd-omb { font-size: 0.72rem; line-height: 1.4; flex: 0 0 auto; }
.doc-page .afd-omb { text-align: right; }
.doc-page .afd-formhead { text-align: center; flex: 1 1 auto; }
.doc-page .afd-formhead p { margin: 0.1rem 0; }
.doc-page .afd-title { font-weight: 700; letter-spacing: 0.03em; margin-top: 0.35rem; }
.doc-page .afd-table { width: 100%; border-collapse: collapse; margin: 0.6rem 0; font-size: 0.85rem; }
.doc-page .afd-table th, .doc-page .afd-table td { border: 1px solid currentColor; padding: 0.28rem 0.4rem; text-align: left; }
.doc-page .afd-sigline { margin: 1.4rem 0 0.2rem; }
.doc-page .afd-notary { border: 1px solid currentColor; padding: 0.75rem 1rem; margin-top: 1.2rem; }
.doc-page .afd-warnbox { border: 1px solid currentColor; padding: 0.6rem 0.9rem; margin: 1rem 0; font-size: 0.85rem; }

/* ---------- affidavit print compression (fit the federal page) ---------- */
@media print {
  .doc-page { font-size: 10pt; line-height: 1.35; }
  .doc-page p { margin: 0.35rem 0; }
  .doc-page .afd-table { font-size: 8.5pt; margin: 0.35rem 0; }
  .doc-page .afd-table th, .doc-page .afd-table td { padding: 2pt 3pt; }
  .doc-page .afd-table thead { display: table-header-group; }
  .doc-page .afd-table tr { break-inside: avoid; page-break-inside: avoid; }
  .doc-page .afd-headrow, .doc-page .afd-notary, .doc-page .afd-warnbox { break-inside: avoid; page-break-inside: avoid; }
  .doc-page .afd-sigline { margin-top: 1rem; }
}

/* ---------- affidavit: page-1 mailto/recorder row, logo, instructions ---------- */
.doc-page .afd-p1row { display: flex; gap: 1.25rem; align-items: stretch; margin-bottom: 0.6rem; }
.doc-page .afd-mailto { flex: 1 1 55%; }
.doc-page .afd-recorderbox { flex: 1 1 45%; border: 1px solid currentColor; padding: 0.5rem 0.75rem; font-size: 0.82rem; }
.doc-page .afd-recorderbox p { margin: 0.3rem 0; }
.doc-page .afd-logo { height: 58px; width: auto; align-self: flex-start; }
.doc-page .afd-instructions { font-size: 0.78rem; line-height: 1.45; margin-top: 1rem; }
.doc-page .afd-instructions ol { margin: 0.4rem 0 0.4rem 1.2rem; }
.doc-page .afd-instructions li { margin: 0.25rem 0; }
@media print {
  .doc-page .afd-p1row { break-inside: avoid; page-break-inside: avoid; }
  .doc-page .afd-instructions { font-size: 7.5pt; }
  .doc-page .afd-logo { height: 44pt; }
}

/* ---------- affidavit page 3: official two-column layout ---------- */
.doc-page .afd-p3row { display: flex; gap: 1.5rem; align-items: flex-start; }
.doc-page .afd-p3row .afd-instructions { flex: 1 1 55%; order: 1; margin-top: 0; }
.doc-page .afd-p3row .afd-p3-cert { flex: 1 1 45%; order: 2; }
.afd-form select { min-height: 36px; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); font-size: 0.85rem; padding: 0.2rem 0.4rem; }
@media print {
  .doc-page .afd-p3row { gap: 1rem; }
  .doc-page .afd-p3row .afd-p3-cert { font-size: 9pt; }
}

/* ---------- waiver (3830-002): segmented owner signature lines ---------- */
.doc-page .wv-owner { margin: 0.8rem 0; padding-bottom: 0.5rem; border-bottom: 1px dashed currentColor; }
.doc-page .wv-owner:last-of-type { border-bottom: none; }
.doc-page .wv-owner-row { display: flex; gap: 1.1rem; margin-top: 0.55rem; }
.doc-page .wv-line { display: flex; flex-direction: column; }
.doc-page .wv-line .v { display: block; border-bottom: 1px solid currentColor; min-height: 1.15em; padding: 0 0.2rem; }
.doc-page .wv-line small { text-align: center; font-size: 0.68rem; }
.doc-page .wv-w { flex: 3 1 0; }
.doc-page .wv-m { flex: 2 1 0; }
.doc-page .wv-s { flex: 1 1 0; }
@media print {
  .doc-page .wv-owner { break-inside: avoid; page-break-inside: avoid; }
}

/* ==========================================================================
   Filing records (the EHR model, 2026-08-18) — the "Your filings" list,
   lifecycle chips, the signed-lock banner, and the sign/reopen panels.
   Screen only; everything here hides in print.
   ========================================================================== */

.afd-filings { margin: 0 0 2rem; padding: 1.1rem 1.15rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.afd-filings-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 0.6rem; }
.afd-filings-head h2 { margin: 0; font-size: 1.15rem; }
.afd-filing-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; padding: 0.65rem 0.75rem; border: 1px solid var(--line); border-radius: var(--radius); margin: 0.45rem 0; }
.afd-filing-row.is-open { border-color: rgba(224, 166, 60, 0.55); background: rgba(224, 166, 60, 0.05); }
.afd-filing-main { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; flex: 1 1 16rem; }
.afd-filing-meta { font-size: 0.8rem; color: var(--text-dim); }
.afd-filing-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.afd-filing-actions .btn { padding: 0.35rem 0.75rem; font-size: 0.8rem; }

.afd-chip { display: inline-block; padding: 0.12rem 0.55rem; border-radius: 999px; font-size: 0.72rem; letter-spacing: 0.02em; border: 1px solid var(--line); color: var(--text-dim); white-space: nowrap; }
.afd-chip-draft { border-color: rgba(170, 170, 170, 0.5); }
.afd-chip-signed { border-color: rgba(96, 178, 96, 0.55); color: #7fc97f; }
.afd-chip-open { border-color: rgba(224, 166, 60, 0.55); color: var(--gold); }

.afd-locked { margin: 0 0 1.25rem; padding: 0.9rem 1.1rem; background: rgba(96, 178, 96, 0.07); border: 1px solid rgba(96, 178, 96, 0.4); border-left: 3px solid #5ab45a; border-radius: var(--radius); font-size: 0.92rem; }
.afd-locked p { margin: 0 0 0.5rem; }
.afd-locked .wz-actions { margin: 0.25rem 0 0; }

.afd-confirm { margin: 0.75rem 0; padding: 0.9rem 1.1rem; background: rgba(224, 166, 60, 0.07); border: 1px solid rgba(224, 166, 60, 0.4); border-radius: var(--radius); font-size: 0.92rem; }
.afd-confirm p { margin: 0 0 0.6rem; }

/* deep-link prefill offer (DESIGN-deadline-actions §3): confirm-first — the
   card sits above everything and creates nothing until the member says so */
.afd-intent { margin: 0 0 1.25rem; padding: 1rem 1.2rem; background: rgba(224, 166, 60, 0.07); border: 1px solid rgba(224, 166, 60, 0.45); border-left: 3px solid var(--gold); border-radius: var(--radius); font-size: 0.95rem; }
.afd-intent p { margin: 0 0 0.5rem; }
.afd-intent .wz-actions { margin: 0.4rem 0 0; }

/* account-sourced prefill banner (design §4): visible, calm, review-first */
.afd-prefill-note { margin: 0.75rem 0; padding: 0.7rem 1rem; background: rgba(96, 178, 96, 0.07); border: 1px solid rgba(96, 178, 96, 0.4); border-left: 3px solid #5ab45a; border-radius: var(--radius); font-size: 0.88rem; }

.afd-sign-panel { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin: 0.9rem 0 1.25rem; padding-top: 0.9rem; border-top: 1px solid var(--line); }
.afd-sign-panel .wz-hint { margin: 0; flex: 1 1 16rem; }
.afd-sign-panel .wz-error { flex-basis: 100%; margin: 0; }
.afd-sign-hint { margin: 0.75rem 0 1.25rem; }

/* A locked form reads as a record, not an input surface. */
.afd-form input:disabled, .afd-form select:disabled { opacity: 0.6; }

@media print {
  .afd-filings, .afd-locked, .afd-confirm, .afd-sign-panel, .afd-sign-hint { display: none !important; }
}
