/* ============================================================
   FLO FACTION LLC — UNIVERSAL DOCUMENT SYSTEM
   Invoices · Agreements · Receipts · Letters
   Works for ANY service line: tax, insurance, sync licensing,
   audio/video production, AI, web, digital products, dropship.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400;12..96,500;12..96,600;12..96,700;12..96,800&family=Manrope:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Flo Faction brand palette — wave blues, navy authority, sun accent.
     Mapped onto the document system's existing variable names so all
     seven documents inherit the brand without markup changes. */
  --ink:        #0B2557;   /* navy-900 — wordmark navy, headings */
  --ink-2:      #102E7A;   /* navy-800 — deep brand blue */
  --navy:       #061634;   /* navy-950 — ink-dark backdrop */
  --blue:       #2B7BE4;   /* royal — primary action */
  --blue-light: #7FC8F2;   /* sky / ring */
  --accent:     #1A4FBF;   /* trust blue (replaces off-brand purple) */
  --teal:       #16A571;   /* brand success — paid / positive */
  --teal-soft:  #DFF5EA;
  --gold:       #D9821A;   /* print-safe Florida sun (text) */
  --gold-soft:  #FCEBD0;
  --sun:        #F2A03D;   /* Florida sun — human-moment accent */
  --danger:     #D2453B;
  --danger-soft:#FADFDC;

  --paper:      #FFFFFF;
  --page-bg:    #ECF5FC;   /* brand tint surface (was cold gray) */
  --panel:      #F7FAFD;   /* warm paper */
  --panel-2:    #FBFDFE;
  --line:       #E7EEF6;   /* fog hairline */
  --line-soft:  #F0F6FC;
  --text:       #0E1A2C;   /* brand ink */
  --text-soft:  #5B6B82;   /* brand slate */
  --text-faint: #8493A8;

  --font-serif: 'Bricolage Grotesque', 'Sora', ui-sans-serif, sans-serif;
  --font-sans:  'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:  'JetBrains Mono', ui-monospace, monospace;

  --radius:     18px;
  --radius-sm:  10px;
  --shadow:     0 18px 48px rgba(11,37,87,0.14);
  --shadow-sm:  0 2px 10px rgba(11,37,87,0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--page-bg);
  font-family: var(--font-sans);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,h2,h3,h4 { font-family: var(--font-serif); font-weight: 700; letter-spacing: -0.02em; }

a { color: var(--blue); }

/* ===== Page shell ===== */
.doc {
  max-width: 880px;
  margin: 0 auto;
  padding: 36px 20px 80px;
  animation: rise .6s ease both;
}
@media (prefers-reduced-motion: no-preference) {
  @keyframes rise { from{transform:translateY(22px)} to{transform:none} }
}

.sheet {
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 30px;
}

/* ===== Masthead (shared brand header) ===== */
.mast {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(ellipse 70% 120% at 88% -10%, rgba(43,123,228,0.34) 0%, transparent 55%),
    radial-gradient(ellipse 60% 120% at 8% 120%, rgba(127,200,242,0.20) 0%, transparent 55%),
    linear-gradient(135deg, var(--navy) 0%, var(--ink) 55%, var(--ink-2) 100%);
  color: #fff;
  padding: 30px 38px;
}
/* Futuristic motion — drifting brand aurora */
.mast::before {
  content: "";
  position: absolute;
  inset: -45% -15%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(38% 48% at 22% 32%, rgba(43,123,228,0.55) 0%, transparent 62%),
    radial-gradient(34% 44% at 82% 18%, rgba(26,79,191,0.55) 0%, transparent 62%),
    radial-gradient(42% 52% at 62% 92%, rgba(78,155,240,0.42) 0%, transparent 62%),
    radial-gradient(30% 40% at 96% 74%, rgba(242,160,61,0.26) 0%, transparent 62%);
  filter: blur(28px) saturate(1.25);
  animation: ffAurora 16s ease-in-out infinite alternate;
}
/* Futuristic motion — HUD grid drifting */
.mast::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(125,200,242,0.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125,200,242,0.10) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(ellipse 92% 130% at 50% -12%, #000 12%, transparent 72%);
  mask-image: radial-gradient(ellipse 92% 130% at 50% -12%, #000 12%, transparent 72%);
  animation: ffGrid 20s linear infinite;
}
.mast-top {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 22px;
  flex-wrap: wrap;
}
.mast-brand { display: flex; align-items: center; gap: 20px; }
.mast-brand img { width: 104px; height: 104px; object-fit: contain; border-radius: 20px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.34), 0 0 0 1px rgba(255,255,255,0.06); flex-shrink: 0;
  animation: ffPulse 5.5s ease-in-out infinite; }
.mast-brand .name { font-family: var(--font-serif); font-size: 27px; line-height: 1; color: #fff; letter-spacing: -.3px;
  text-shadow: 0 0 24px rgba(77,163,240,0.35); }
.mast-brand .name b { color: var(--blue-light); font-weight: 400; }
/* Services line — animated brand shimmer */
.mast-brand .tag { font-size: 11px; letter-spacing: .15em; text-transform: uppercase; margin-top: 8px; font-weight: 700;
  background: linear-gradient(90deg, #A6DBF5 0%, #4E9BF0 26%, #2B7BE4 50%, #F2A03D 74%, #A6DBF5 100%);
  background-size: 220% auto;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: ffShimmer 7s linear infinite; }
.mast-meta { position: relative; z-index: 2; text-align: right; font-size: 12.5px; color: #C3D0E4; line-height: 1.85; }
.mast-meta b { color: #fff; font-weight: 600; }

.mast-rule { position: relative; overflow: hidden; height: 3px;
  background: linear-gradient(90deg, var(--blue) 0%, var(--blue-light) 45%, var(--sun) 100%); }
.mast-rule::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.85) 50%, transparent 100%);
  transform: translateX(-100%); animation: ffSheen 4.5s ease-in-out infinite; }

.mast-title { position: relative; overflow: hidden; padding: 26px 38px 30px; text-align: center;
  background: linear-gradient(180deg, var(--ink-2), var(--navy)); color:#fff; }
.mast-title::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(60% 130% at 50% -22%, rgba(77,163,240,0.22) 0%, transparent 60%);
  animation: ffTitleGlow 7s ease-in-out infinite alternate; }
.mast-title > * { position: relative; z-index: 1; }
.mast-title .kicker { font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); margin-bottom: 12px; }
.mast-title h1 { font-size: 33px; color:#fff; letter-spacing: -.4px; line-height: 1.1; }
.mast-title .sub { font-size: 14px; color:#A9BAD6; margin-top: 12px; max-width: 560px; margin-inline:auto; }

/* Masthead motion keyframes */
@keyframes ffAurora {
  0%   { transform: translate3d(-3%, -2%, 0) scale(1.05) rotate(0deg); }
  50%  { transform: translate3d(4%, 3%, 0) scale(1.18) rotate(3deg); }
  100% { transform: translate3d(-2%, 2%, 0) scale(1.08) rotate(-2deg); }
}
@keyframes ffGrid { from { background-position: 0 0, 0 0; } to { background-position: 0 -46px, 0 -46px; } }
@keyframes ffSheen { 0% { transform: translateX(-100%); } 55%, 100% { transform: translateX(100%); } }
@keyframes ffShimmer { to { background-position: 220% center; } }
@keyframes ffTitleGlow { from { opacity: .5; } to { opacity: 1; } }
@keyframes ffPulse {
  0%, 100% { box-shadow: 0 8px 24px rgba(0,0,0,0.34), 0 0 0 1px rgba(255,255,255,0.06), 0 0 0 0 rgba(77,163,240,0); }
  50%      { box-shadow: 0 10px 30px rgba(0,0,0,0.40), 0 0 0 1px rgba(255,255,255,0.12), 0 0 26px 5px rgba(77,163,240,0.40); }
}
@media (prefers-reduced-motion: reduce) {
  .mast::before, .mast::after, .mast-rule::after, .mast-brand img,
  .mast-brand .tag, .mast-title::before { animation: none; }
}
@media print {
  .mast::before, .mast::after, .mast-rule::after, .mast-title::before { display: none !important; }
  .mast-brand .tag { -webkit-text-fill-color: #C3D0E4 !important; color: #C3D0E4 !important; background: none !important; }
}

.chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16);
  color: #fff; font-size: 11px; font-weight: 600; letter-spacing: .05em;
  padding: 6px 13px; border-radius: 100px; margin-top: 14px;
}
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 0 rgba(0,184,148,.6); animation: pp 2.4s infinite; }
@keyframes pp { 0%{box-shadow:0 0 0 0 rgba(0,184,148,.5)} 70%{box-shadow:0 0 0 7px rgba(0,184,148,0)} 100%{box-shadow:0 0 0 0 rgba(0,184,148,0)} }
.chip.gold { background: var(--gold-soft); border-color: var(--gold); color: #6B4E12; }
.chip.gold .dot { background: var(--gold); animation: none; }

/* ===== Section heads ===== */
.sec-head {
  display: flex; align-items: center; gap: 13px;
  background: var(--navy); color: #fff;
  padding: 15px 24px; border-left: 4px solid var(--gold);
}
.sec-head .ic { font-size: 17px; line-height: 1; }
.sec-head h2 { font-family: var(--font-serif); font-size: 19px; color:#fff; }
.sec-head .n { margin-left: auto; font-family: var(--font-sans); font-size: 11px; letter-spacing:.16em; color:#8FA4C6; text-transform: uppercase; }
.sec-note { padding: 13px 24px 0; font-size: 13px; color: var(--text-soft); font-style: italic; }
.pad { padding: 24px; }

/* ===== Notice / callouts ===== */
.notice { padding: 22px 26px; border-left: 5px solid; border-radius: 0; }
.notice h3 { font-family: var(--font-sans); font-weight: 700; font-size: 15px; margin-bottom: 11px; display:flex; align-items:center; gap:8px; }
.notice p { font-size: 13.5px; line-height: 1.75; margin-bottom: 11px; }
.notice p:last-child { margin-bottom: 0; }
.notice.amber { background: var(--gold-soft); border-color: var(--gold); }
.notice.amber h3 { color:#6B4E12; }
.notice.amber p { color:#54451F; }
.notice.amber strong { color:#3D3107; }
.notice.teal { background: var(--teal-soft); border-color: var(--teal); }
.notice.teal h3 { color:#0A5B47; }
.notice.teal p { color:#1B4F42; }
.notice.teal strong { color:#063a2d; }
.notice.blue { background:#EAF2FC; border-color: var(--blue); }
.notice.blue h3 { color:#0E3E72; }
.notice.blue p { color:#1B3A5C; }

/* ===== Info grid ===== */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: 24px; }
.info { background: var(--panel); border:1px solid var(--line); border-radius: var(--radius-sm); padding: 18px 20px; }
.info h4 { font-family: var(--font-sans); font-weight:700; font-size:12px; letter-spacing:.1em; text-transform:uppercase; color: var(--ink); padding-bottom:10px; margin-bottom: 6px; border-bottom: 2px solid var(--gold); }
.kv { width:100%; border-collapse: collapse; font-size: 13px; }
.kv td { padding: 7px 2px; vertical-align: top; border-bottom: 1px solid var(--line-soft); }
.kv tr:last-child td { border-bottom: none; }
.kv td:first-child { color: var(--text-soft); width: 46%; }
.kv td:last-child { text-align: right; font-weight: 600; color: var(--text); }

/* ===== Service cards ===== */
.svc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 22px 24px; }
.svc { background: var(--paper); border:1px solid var(--line); border-top: 3px solid var(--blue); border-radius: var(--radius-sm); padding: 17px 18px; box-shadow: var(--shadow-sm); transition: transform .22s, box-shadow .22s; }
.svc:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(11,31,58,.13); }
.svc.full { grid-column: 1 / -1; border-top-color: var(--gold); }
.svc .ic { font-size: 21px; }
.svc .t { font-family: var(--font-serif); font-size: 16px; color: var(--ink); margin:7px 0 11px; line-height: 1.25; }
.svc ul { list-style: none; }
.svc li { font-size: 12.7px; color: var(--text-soft); line-height: 1.6; padding-left: 15px; position: relative; margin-bottom: 6px; }
.svc li::before { content:"›"; position:absolute; left:0; color: var(--blue); font-weight:700; }
.svc li strong { color: var(--text); font-weight: 600; }
.svc li.done::before { content:"✓"; color: var(--teal); }

/* ===== Stat row ===== */
.stats { display:grid; grid-template-columns: repeat(3,1fr); gap:15px; padding: 24px; }
.stat { background: var(--panel); border:1px solid var(--line); border-top:3px solid var(--teal); border-radius: var(--radius-sm); padding:18px; text-align:center; }
.stat.gold { border-top-color: var(--gold); }
.stat.blue { border-top-color: var(--blue); }
.stat .l { font-size:11px; letter-spacing:.07em; text-transform:uppercase; color: var(--text-soft); font-weight:600; margin-bottom:8px; }
.stat .v { font-family: var(--font-serif); font-size: 27px; color: var(--ink); letter-spacing:-.5px; }
.stat .v.teal { color: var(--teal); }
.stat .v.gold { color: var(--gold); }

/* ===== Tax math ===== */
.math { padding: 8px 24px 24px; }
.mrow { display:grid; grid-template-columns: 1fr auto; gap:20px; align-items:center; padding: 12px 0; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; }
.mrow .l { color: var(--text); }
.mrow .v { font-family: var(--font-serif); font-size: 16px; color: var(--ink); }
.mrow.credit .v { color: var(--teal); }
.mrow.sub .l { font-weight:600; color: var(--ink); }
.mrow.total { margin-top:10px; padding: 16px 18px; background: var(--teal-soft); border:2px solid var(--teal); border-radius: var(--radius-sm); }
.mrow.total .l { font-weight:700; color:#0A5B47; }
.mrow.total .v { color: var(--teal); font-size: 23px; }
.maxchip { display:inline-block; margin-left:9px; font-family:var(--font-sans); font-size:10px; font-weight:700; letter-spacing:.05em; color:#fff; background: var(--teal); border-radius:4px; padding:2px 7px; vertical-align:middle; }

/* ===== Bars ===== */
.bars { padding: 24px; }
.bar { margin-bottom: 17px; }
.bar:last-child { margin-bottom: 0; }
.bar-top { display:flex; justify-content:space-between; align-items:baseline; margin-bottom:7px; }
.bar-top .l { font-size:13px; font-weight:600; color: var(--text); }
.bar-top .v { font-family: var(--font-serif); font-size:15px; color: var(--ink); }
.track { background: var(--line-soft); border-radius:100px; height:11px; overflow:hidden; }
.fill { height:100%; border-radius:100px; width:0; background: linear-gradient(90deg, var(--blue), var(--teal)); animation: grow 1.3s ease-out forwards; }
@keyframes grow { from{width:0} to{width:var(--w)} }

/* ===== Invoice table ===== */
.inv { padding: 22px 24px; }
table.itab { width:100%; border-collapse: collapse; font-size: 13px; }
.itab thead th { background: var(--navy); color:#fff; font-family: var(--font-sans); font-weight:600; font-size:11.5px; letter-spacing:.05em; text-transform:uppercase; padding: 12px 13px; text-align:left; }
.itab thead th:last-child, .itab td.num { text-align:right; }
.itab tbody td { padding: 13px; border-bottom:1px solid var(--line); vertical-align: top; }
.itab tbody tr:nth-child(even) td { background: var(--panel-2); }
.itab td .d { font-weight:600; color: var(--text); }
.itab td .s { display:block; color: var(--text-faint); font-size:11.5px; margin-top:3px; line-height:1.5; }
.itab td.num { font-weight:600; white-space:nowrap; }
.itab .sub td { font-weight:600; color: var(--ink); background: var(--panel) !important; }
.itab .disc td { color: var(--danger); font-style: italic; }
.itab .strike { text-decoration: line-through; opacity:.55; }
.itab tfoot td { padding: 16px 13px; border-top: 2px solid var(--ink); }
.itab tfoot .tot td { font-family: var(--font-serif); font-size: 20px; color:#fff;
  background: linear-gradient(135deg, var(--ink), var(--navy)); }
.itab tfoot .tot td:first-child { color:#fff; }
.itab tfoot .tot td.num { color: var(--gold); }

/* ===== Disbursement ===== */
.disb { display:grid; grid-template-columns:1fr 1fr; gap:18px; padding:24px; }
.dcard { background: var(--panel); border:1px solid var(--line); border-radius: var(--radius-sm); padding:20px; }
.dcard h4 { font-family: var(--font-sans); font-weight:700; font-size:12px; letter-spacing:.08em; text-transform:uppercase; color: var(--ink); margin-bottom:11px; }
.dcard .big { font-family: var(--font-serif); font-size:30px; color: var(--teal); letter-spacing:-.5px; margin-bottom:8px; }
.dcard .big.ink { color: var(--ink); }
.dcard p { font-size:12.5px; color: var(--text-soft); line-height:1.65; }
.dcard .ml { font-size:11.5px; color: var(--text-soft); margin-top:11px; padding-top:11px; border-top:1px dashed var(--line); }
.dcard strong { color: var(--text); }

/* ===== Terms ===== */
.terms { padding: 18px 26px; }
.terms ol { list-style:none; counter-reset: t; }
.terms li { counter-increment:t; position:relative; padding: 7px 0 7px 30px; font-size: 10.5px; line-height:1.5; color: var(--text-soft); border-bottom:1px solid var(--line-soft); }
.terms li:last-child { border-bottom:none; }
.terms li::before { content: counter(t,decimal-leading-zero); position:absolute; left:0; top:8px; width:19px; height:19px; border-radius:50%; background: var(--navy); color: var(--gold); font-family: var(--font-sans); font-weight:700; font-size:12px; display:flex; align-items:center; justify-content:center; }
.terms li strong { color: var(--ink); font-weight:700; }
.terms li::before { font-size:9px; }

/* ===== Signature ===== */
.sig { display:grid; grid-template-columns:1fr 1fr; gap:22px; padding:24px; }
.sblk { background: var(--panel); border:1px solid var(--line); border-radius: var(--radius-sm); padding: 22px; }
.sblk h5 { font-family: var(--font-sans); font-size:11px; font-weight:700; letter-spacing:.1em; text-transform:uppercase; color: var(--gold); margin-bottom:26px; }
.sline { border-bottom:2px solid var(--ink); padding-bottom:5px; min-height:34px; font-family: var(--font-serif); font-style: italic; font-size:23px; color: var(--ink); }
.smeta { margin-top:10px; font-size:12px; color: var(--text-soft); line-height:1.65; }
.smeta strong { color: var(--text); font-weight:600; }

/* ===== Letter ===== */
.letter { padding: 44px 52px; font-size: 14.5px; line-height: 1.85; color: var(--text); }
.letter .date { color: var(--text-soft); font-size: 13px; margin-bottom: 26px; }
.letter .salut { margin-bottom: 18px; }
.letter p { margin-bottom: 16px; }
.letter strong { color: var(--ink); font-weight:600; }
.letter .sign-off { margin-top: 30px; }
.letter .sign-name { font-family: var(--font-serif); font-style: italic; font-size: 26px; color: var(--ink); margin-top: 6px; }
.letter .sign-role { font-size: 12.5px; color: var(--text-soft); margin-top: 4px; }

/* ===== Callout banner ===== */
.banner { margin: 0 24px 24px; padding: 16px 20px; border-radius: var(--radius-sm); font-size: 13px; line-height:1.7; border-left:5px solid var(--teal); background: var(--teal-soft); color:#1B4F42; }
.banner strong { color:#063a2d; }

/* ===== Footer ===== */
.foot { background: linear-gradient(135deg, var(--navy), var(--ink)); color:#9FB4D4; text-align:center; padding: 30px 26px; font-size:12px; line-height:1.8; }
.foot .fname { font-family: var(--font-serif); font-size: 18px; color:#fff; margin-bottom:5px; }
.foot .fents { color: var(--gold); font-size:11.5px; letter-spacing:.04em; margin: 6px 0; }
.foot a { color: var(--blue-light); text-decoration:none; }
.foot .fine { color:#6E82A4; font-size:10.5px; margin-top:12px; }

/* ===== Hub / index ===== */
.hub { max-width: 920px; margin: 0 auto; padding: 40px 22px 90px; }
.hub-grid { display:grid; grid-template-columns: 1fr 1fr; gap:18px; margin-top: 8px; }
.hub-card { display:block; background: var(--paper); border:1px solid var(--line); border-radius: var(--radius); padding: 24px; text-decoration:none; color: var(--text); box-shadow: var(--shadow-sm); transition: transform .22s, box-shadow .22s, border-color .22s; }
.hub-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--blue); }
.hub-card .hic { width:46px; height:46px; border-radius:11px; display:flex; align-items:center; justify-content:center; font-size:20px; background: var(--navy); color: var(--gold); margin-bottom:14px; }
.hub-card h3 { font-family: var(--font-serif); font-size:20px; color: var(--ink); margin-bottom:7px; }
.hub-card p { font-size:13px; color: var(--text-soft); line-height:1.6; }
.hub-card.full { grid-column:1 / -1; border-top:3px solid var(--gold); }
.hub-card .go { display:inline-block; margin-top:12px; font-family:var(--font-sans); font-weight:600; font-size:13px; color: var(--blue); }

/* ===== Responsive ===== */
@media (max-width: 720px) {
  .grid-2, .svc-grid, .stats, .disb, .sig, .hub-grid { grid-template-columns: 1fr; }
  .mast-top { flex-direction: column; }
  .mast-meta { text-align: left; }
  .mast-title h1 { font-size: 26px; }
  .letter { padding: 30px 24px; }
}

/* ===== Danger / red notice ===== */
.notice.red { background: var(--danger-soft); border-color: var(--danger); }
.notice.red h3 { color:#8E2020; }
.notice.red p { color:#5C2222; }
.notice.red strong { color:#3D0F0F; }

/* ===== Value-delivered stat (4-up) ===== */
.vstack { display:grid; grid-template-columns: repeat(4,1fr); gap:14px; padding:24px; }
.vcard { background: var(--navy); border-radius: var(--radius-sm); padding:18px 16px; text-align:center; border-top:3px solid var(--gold); }
.vcard .l { font-size:10.5px; letter-spacing:.07em; text-transform:uppercase; color:#9FB4D4; font-weight:600; margin-bottom:9px; line-height:1.35; }
.vcard .v { font-family: var(--font-serif); font-size:26px; color:#fff; letter-spacing:-.5px; }
.vcard .v.gold { color: var(--gold); }
.vcard .v.teal { color: var(--teal); }
.vcard .s { font-size:10.5px; color:#7E92B4; margin-top:6px; line-height:1.4; }
@media (max-width:720px){ .vstack { grid-template-columns: 1fr 1fr; } }

/* ===== Market comparison cells ===== */
.itab td.mkt { color: var(--danger); font-weight:600; white-space:nowrap; }
.itab td.ours { color: var(--teal); font-weight:700; white-space:nowrap; }
.itab tfoot .cmp-tot td { background: var(--navy); color:#fff; font-family:var(--font-serif); font-size:16px; }
.itab tfoot .cmp-tot td.mkt { color:#FF9B9B; }
.itab tfoot .cmp-tot td.ours { color: var(--teal); }
.savings-banner { margin: 0 24px 24px; padding: 18px 22px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--ink), var(--navy)); color:#fff; text-align:center; }
.savings-banner .big { font-family: var(--font-serif); font-size:30px; color: var(--gold); letter-spacing:-.5px; }
.savings-banner .cap { font-size:12.5px; color:#A9BAD6; margin-top:5px; }

/* ===== Deduction / data table ===== */
.dtab { width:100%; border-collapse:collapse; font-size:13px; }
.dtab td { padding:10px 13px; border-bottom:1px solid var(--line-soft); }
.dtab tr:nth-child(even) td { background: var(--panel-2); }
.dtab td:last-child { text-align:right; font-weight:600; font-family:var(--font-serif); font-size:15px; color:var(--ink); white-space:nowrap; }
.dtab td .sub2 { display:block; color:var(--text-faint); font-size:11.5px; margin-top:2px; }
.dtab .ttl td { border-top:2px solid var(--ink); border-bottom:none; font-weight:700; color:var(--ink); }

/* ===== IRS refund tracker ===== */
.irs { padding: 22px 24px 8px; }
.irs-bar { display:flex; align-items:center; gap:0; margin: 6px 0 18px; }
.irs-step { flex:1; text-align:center; position:relative; }
.irs-dot { width:26px; height:26px; border-radius:50%; margin:0 auto 9px; display:flex; align-items:center; justify-content:center; font-size:13px; font-weight:700; color:#fff; background: var(--line); }
.irs-step.done .irs-dot { background: var(--blue); }
.irs-step.active .irs-dot { background: var(--gold); box-shadow:0 0 0 5px var(--gold-soft); }
.irs-line { position:absolute; top:13px; left:50%; width:100%; height:3px; background: var(--line); z-index:-1; }
.irs-step.done .irs-line { background: var(--blue); }
.irs-step .lab { font-size:11.5px; font-weight:600; color: var(--text); }
.irs-step .lab.muted { color: var(--text-faint); font-weight:500; }

/* ===== Timeline (card closure) ===== */
.tl { padding: 8px 24px 24px; position:relative; }
.tl-item { position:relative; padding:0 0 20px 34px; border-left:2px solid var(--line); margin-left:8px; }
.tl-item:last-child { border-left-color:transparent; padding-bottom:0; }
.tl-item::before { content:""; position:absolute; left:-8px; top:2px; width:15px; height:15px; border-radius:50%; background:#fff; border:3px solid var(--blue); }
.tl-item.warn::before { border-color: var(--gold); }
.tl-item.crit::before { border-color: var(--danger); }
.tl-when { font-family:var(--font-sans); font-weight:700; font-size:12px; letter-spacing:.04em; color: var(--ink); text-transform:uppercase; }
.tl-what { font-size:13px; color: var(--text-soft); line-height:1.6; margin-top:4px; }
.tl-what strong { color: var(--text); }

/* ===== Credential ledger ===== */
.cred-warn { margin:0 24px; padding:13px 18px; border-radius: var(--radius-sm); background: var(--danger-soft);
  border:1px solid var(--danger); color:#5C2222; font-size:12.5px; line-height:1.6; display:flex; gap:10px; align-items:flex-start; }
.cred-warn .lk { font-size:16px; line-height:1; }
.credtab { width:100%; border-collapse:collapse; font-size:12.5px; margin-top:4px; }
.credtab th { background: var(--navy); color:#fff; font-weight:600; font-size:11px; letter-spacing:.04em; text-transform:uppercase; padding:11px 13px; text-align:left; }
.credtab td { padding:11px 13px; border-bottom:1px solid var(--line); vertical-align:top; }
.credtab tr:nth-child(even) td { background: var(--panel-2); }
.credtab td:first-child { font-weight:600; color: var(--ink); }
.credtab .ph { color: var(--text-faint); font-style:italic; }
.credtab .field { display:inline-block; min-width:130px; border-bottom:1px dashed var(--text-faint); }

/* ===== Footnote / source list ===== */
.fnotes { padding: 4px 26px 22px; }
.fnotes p { font-size:11px; color: var(--text-faint); line-height:1.6; margin-bottom:4px; }

/* ===== Mini status chips inline ===== */
.flag { display:inline-block; font-family:var(--font-sans); font-size:10px; font-weight:700; letter-spacing:.04em;
  padding:2px 8px; border-radius:5px; vertical-align:middle; margin-left:6px; }
.flag.red { background: var(--danger-soft); color:#8E2020; border:1px solid var(--danger); }
.flag.gold2 { background: var(--gold-soft); color:#6B4E12; border:1px solid var(--gold); }
.flag.teal2 { background: var(--teal-soft); color:#0A5B47; border:1px solid var(--teal); }

/* ===== Template badge ===== */
.tpl-badge { display:inline-flex; align-items:center; gap:7px; background: rgba(255,255,255,.08);
  border:1px dashed rgba(255,255,255,.3); color:#C3D0E4; font-size:10.5px; letter-spacing:.1em;
  text-transform:uppercase; padding:5px 11px; border-radius:7px; }

/* ===== Responsive additions ===== */
@media (max-width: 720px) {
  .vstack { grid-template-columns: 1fr 1fr; }
}

/* ===== Print ===== */
@media print {
  * { animation: none !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body { background: #fff; }
  .doc, .hub { max-width: 100%; padding: 0; }
  .sheet { box-shadow: none; border:1px solid var(--line); break-inside: avoid; margin-bottom: 14px; }
  .svc, .info, .dcard, .mrow.total, .sblk, .vcard, .tl-item, .dcard { break-inside: avoid; }
  .no-print { display: none !important; }
  .fill { width: var(--w) !important; }
  .irs-step.active .irs-dot { box-shadow: 0 0 0 5px var(--gold-soft) !important; }
}
