/* ============================================================
   BondGov — marketing component vocabulary (home / pricing / features).

   These three pages extend _base.html and use the Vite treasury-civic
   tokens (--navy, --brand, --gold, --gold-2, --bg-page, --bg-paper,
   --ink*, --rule). This layer names the repeated inline patterns found
   across all three pages as .mkt-* components so future edits touch a
   class, not a wall of inline styles.

   Self-contained: every token reference carries a literal fallback,
   same convention as chrome.css, so pages render identically even if
   treasury-civic.css fails to load.
   ============================================================ */

/* ---- Section shell ------------------------------------------- */
.mkt-section { max-width: 1200px; margin: 0 auto; padding: 88px 32px; }
.mkt-section--tight { padding: 64px 32px; }
.mkt-section--wide { max-width: 1280px; }
.mkt-section--narrow { max-width: 1080px; }

/* ---- Eyebrow / heads / lead ----------------------------------- */
.mkt-eyebrow {
  font-size: 11px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold, #d4a64a); margin-bottom: 12px;
}
.mkt-eyebrow--on-dark { color: rgba(255,255,255,0.55); }

.mkt-h2 {
  font-family: var(--mp-font-serif, 'Source Serif 4', Georgia, serif);
  font-weight: 600; color: var(--navy, #0f4a3a);
  letter-spacing: -0.02em; line-height: 1.05; font-size: 44px;
}
.mkt-h2--sm { font-size: 32px; }
.mkt-h2--lg { font-size: 56px; }
.mkt-h2--on-dark { color: #fff; }
.mkt-h2 em, .mkt-h2 i { font-style: italic; color: var(--gold-2, #ecc97a); font-weight: 400; }

.mkt-lead {
  font-size: 16px; color: var(--ink-2, #3a4456); line-height: 1.6; max-width: 680px;
}
.mkt-lead--on-dark { color: rgba(255,255,255,0.75); }

/* ---- Cards ----------------------------------------------------- */
.mkt-card {
  background: var(--bg-card, #fff); border: 1px solid var(--rule, #d8d2bf);
  border-radius: 3px; padding: 32px 28px; transition: border-color 0.15s, box-shadow 0.15s;
}
.mkt-card:hover { border-color: var(--navy, #0f4a3a); box-shadow: 0 18px 40px -24px rgba(10,51,38,0.35); }
.mkt-card--featured {
  border-color: var(--navy, #0f4a3a);
  box-shadow: 0 18px 40px -20px rgba(10,51,38,0.35);
}
.mkt-card--flush { padding: 0; overflow: hidden; }

/* ---- Full-bleed bands ------------------------------------------ */
.mkt-band {
  background: var(--navy, #0f4a3a); position: relative; overflow: hidden; color: #fff;
}
.mkt-band::before {
  content: ''; position: absolute; inset: auto 0 0 0; height: 4px;
  background: repeating-linear-gradient(90deg, var(--gold-2, #ecc97a) 0 12px, transparent 12px 24px);
  opacity: 0.55;
}
.mkt-band__inner { max-width: 920px; margin: 0 auto; padding: 72px 32px; text-align: center; position: relative; }
.mkt-band--ivory {
  background: var(--bg-paper, #fafaf6); color: var(--ink, #111827); border-top: 1px solid var(--rule, #d8d2bf);
}
.mkt-band--ivory::before { display: none; }

/* ---- Stat figures / kicker numbers ----------------------------- */
.mkt-num {
  font-family: var(--mp-font-mono, 'JetBrains Mono', Consolas, monospace);
  color: var(--gold-2, #ecc97a); font-size: 22px; font-weight: 500;
}
.mkt-num--dark { color: var(--navy, #0f4a3a); }
.mkt-num--display {
  font-family: var(--mp-font-serif, 'Source Serif 4', Georgia, serif);
  font-size: 38px; font-weight: 600; color: var(--navy, #0f4a3a); letter-spacing: -0.02em; line-height: 1;
}

.mkt-kicker-num {
  font-family: var(--mp-font-serif, 'Source Serif 4', Georgia, serif);
  font-size: 56px; font-weight: 600; color: var(--gold, #d4a64a); letter-spacing: -0.02em; line-height: 1;
  padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--rule, #d8d2bf);
}

/* ---- Pricing tier card ------------------------------------------ */
.mkt-tier { background: var(--bg-card, #fff); border: 1px solid var(--rule, #d8d2bf); border-radius: 3px; display: flex; flex-direction: column; overflow: hidden; }
.mkt-tier--featured { border-color: var(--navy, #0f4a3a); position: relative; box-shadow: 0 18px 40px -20px rgba(10,51,38,0.35); }
.mkt-tier__stripe { height: 4px; background: repeating-linear-gradient(90deg, var(--gold, #d4a64a) 0 12px, transparent 12px 24px); opacity: 0.85; }
.mkt-tier__badge {
  position: absolute; top: 18px; right: 0; background: var(--gold, #d4a64a); color: var(--navy, #0f4a3a);
  font-size: 9px; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase;
  padding: 4px 14px 4px 12px; clip-path: polygon(8px 0, 100% 0, 100% 100%, 8px 100%, 0 50%);
}
.mkt-tier__head { padding: 28px 28px 20px; border-bottom: 1px solid var(--rule-2, #ebe5d2); min-height: 220px; }
.mkt-tier__name { font-family: var(--mp-font-serif, 'Source Serif 4', Georgia, serif); font-size: 28px; font-weight: 600; color: var(--navy, #0f4a3a); letter-spacing: -0.015em; line-height: 1.1; }
.mkt-tier__price { margin-top: 18px; display: flex; align-items: baseline; gap: 4px; }
.mkt-tier__price .cur { font-family: var(--mp-font-serif, 'Source Serif 4', Georgia, serif); font-size: 16px; color: var(--ink-3, #6b7384); font-weight: 500; }
.mkt-tier__price .amt { font-family: var(--mp-font-serif, 'Source Serif 4', Georgia, serif); font-size: 48px; font-weight: 600; color: var(--navy, #0f4a3a); letter-spacing: -0.025em; line-height: 1; }
.mkt-tier__price .per { font-size: 13px; color: var(--ink-3, #6b7384); font-weight: 500; }
.mkt-tier__desc { font-size: 13px; color: var(--ink-2, #3a4456); margin-top: 12px; line-height: 1.55; }
.mkt-tier__list { padding: 24px 28px; list-style: none; flex-grow: 1; display: flex; flex-direction: column; gap: 11px; margin: 0; }
.mkt-tier__list li { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; color: var(--ink-2, #3a4456); }
.mkt-tier__list li::before {
  content: '\2713'; color: var(--gold, #d4a64a); font-family: var(--mp-font-mono, 'JetBrains Mono', Consolas, monospace);
  font-weight: 700; font-size: 12px; margin-top: 1px; flex-shrink: 0; width: 14px;
}
.mkt-tier__foot { padding: 20px 28px 28px; border-top: 1px solid var(--rule-2, #ebe5d2); }
.mkt-tier__foot .pbtn { display: flex; width: 100%; }

/* ---- Comparison table helpers ----------------------------------- */
.mkt-check-table { width: 100%; border-collapse: collapse; background: var(--bg-card, #fff); border: 1px solid var(--rule, #d8d2bf); border-radius: 3px; overflow: hidden; }
.mkt-check-table th {
  padding: 18px 16px; text-align: center; background: var(--bg-paper, #fafaf6);
  border-bottom: 1px solid var(--rule, #d8d2bf); border-left: 1px solid var(--rule-2, #ebe5d2);
}
.mkt-check-table th:first-child { text-align: left; padding: 18px 20px; border-left: none; font-size: 11px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3, #6b7384); }
.mkt-check-table th.is-plan-featured { background: rgba(212,166,74,0.08); border-top: 3px solid var(--gold, #d4a64a); }
.mkt-check-table .plan-brand { font-size: 9px; color: var(--gold, #d4a64a); letter-spacing: 0.18em; font-weight: 700; text-transform: uppercase; }
.mkt-check-table .plan-name { font-family: var(--mp-font-serif, 'Source Serif 4', Georgia, serif); font-size: 18px; font-weight: 600; color: var(--navy, #0f4a3a); margin-top: 2px; }
.mkt-check-table .grp td {
  padding: 14px 20px; background: var(--bg-paper, #fafaf6); border-top: 1px solid var(--rule, #d8d2bf);
  border-bottom: 1px solid var(--rule-2, #ebe5d2); font-family: var(--mp-font-serif, 'Source Serif 4', Georgia, serif);
  font-size: 14px; font-weight: 600; color: var(--navy, #0f4a3a); font-style: italic; letter-spacing: -0.005em;
}
.mkt-check-table tr:not(.grp) { border-bottom: 1px solid var(--rule-2, #ebe5d2); }
.mkt-check-table tr:not(.grp) td:first-child { padding: 12px 20px; font-size: 14px; color: var(--ink, #111827); font-weight: 500; }
.mkt-check-table tr:not(.grp) td:not(:first-child) {
  padding: 12px 16px; text-align: center; font-size: 14px; font-weight: 700;
  font-family: var(--mp-font-mono, 'JetBrains Mono', Consolas, monospace); border-right: 1px solid var(--rule-2, #ebe5d2);
}
.mkt-check-table td.yes { color: var(--gold, #d4a64a); }
.mkt-check-table td.no { color: var(--ink-4, #9aa0ac); font-weight: 500; }
.mkt-check-table td.is-plan-featured { background: rgba(212,166,74,0.05); }

/* ---- Type scale at narrow widths --------------------------------- */
@media (max-width: 720px) {
  .mkt-section { padding: 56px 20px; }
  .mkt-h2 { font-size: 30px; }
  .mkt-h2--sm { font-size: 24px; }
  .mkt-h2--lg { font-size: 36px; }
  .mkt-band__inner { padding: 48px 20px; }
  .mkt-tier__price .amt { font-size: 38px; }
  .mkt-kicker-num { font-size: 42px; }
}

/* ---- Product preview mockup ------------------------------------------
   Self-contained miniature of the REAL issuer IR page (masthead band +
   KPI strip + rating cards) built from marketing tokens only. Does not
   import ds.css/public.css — the classes below are original to the
   marketing world and just echo the same visual shape. */
.mkt-preview {
  background: var(--bg-card, #fff); border: 1px solid var(--rule, #d8d2bf);
  border-radius: 3px; overflow: hidden;
}
.mkt-preview__chrome {
  background: var(--brand-4, #06251b); color: #cfe0d8; font-size: 11px;
  padding: 6px 18px; display: flex; justify-content: space-between; align-items: center;
}
.mkt-preview__chrome-brand { display: inline-flex; align-items: center; gap: 6px; letter-spacing: 0.22em; color: var(--gold-2, #ecc97a); font-weight: 600; }
.mkt-preview__chrome-url { font-family: var(--mp-font-mono, 'JetBrains Mono', Consolas, monospace); }

/* Masthead band — echoes .mast[data-hero="band"] */
.mkt-preview__mast { background: var(--navy, #0f4a3a); padding: 22px 26px 18px; }
.mkt-preview__mast-row { display: flex; align-items: flex-start; gap: 16px; }
.mkt-preview__seal {
  width: 46px; height: 46px; flex: 0 0 46px; border-radius: 6px; display: flex; align-items: center;
  justify-content: center; font-family: var(--mp-font-serif, 'Source Serif 4', Georgia, serif);
  font-weight: 700; font-size: 15px; letter-spacing: 0.03em; color: var(--gold-2, #ecc97a);
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.16);
}
.mkt-preview__mast-id { min-width: 0; flex: 1; }
.mkt-preview__mast-name {
  font-family: var(--mp-font-serif, 'Source Serif 4', Georgia, serif); font-size: 23px; font-weight: 600;
  color: #fff; line-height: 1.08; letter-spacing: -0.012em;
}
.mkt-preview__mast-meta { font-size: 11.5px; color: rgba(255,255,255,0.66); font-weight: 500; margin-top: 6px; }
.mkt-preview__mast-facts {
  display: grid; grid-template-columns: repeat(3, max-content); margin-top: 16px;
  border-top: 1px solid rgba(212,166,74,0.4);
}
.mkt-preview__mast-fact { padding: 11px 26px 2px 0; }
.mkt-preview__mast-fact + .mkt-preview__mast-fact { padding-left: 26px; border-left: 1px solid rgba(255,255,255,0.1); }
.mkt-preview__mast-factk {
  display: block; font-size: 9px; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase;
  color: rgba(255,255,255,0.55);
}
.mkt-preview__mast-factv {
  display: block; font-family: var(--mp-font-mono, 'JetBrains Mono', Consolas, monospace); font-size: 18px;
  font-weight: 700; color: #fff; margin-top: 4px;
}
.mkt-preview__mast-factv small { font-family: inherit; font-size: 10.5px; font-weight: 600; color: var(--gold-2, #ecc97a); }

/* Body — KPI strip + rating cards */
.mkt-preview__body { padding: 22px 26px 26px; }
.mkt-preview__label {
  font-size: 10px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-3, #6b7384); margin-bottom: 10px;
}
.mkt-preview__kstrip { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 26px; }
.mkt-preview__kcell { padding: 10px 12px 10px 0; border-top: 1px solid var(--rule-2, #ebe5d2); }
.mkt-preview__kk { display: block; font-size: 9px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3, #6b7384); }
.mkt-preview__kv { display: block; font-family: var(--mp-font-mono, 'JetBrains Mono', Consolas, monospace); font-size: 18px; font-weight: 700; color: var(--navy, #0f4a3a); margin-top: 4px; }
.mkt-preview__ratematrix { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.mkt-preview__rcard { background: var(--bg-paper, #fafaf6); border: 1px solid var(--rule, #d8d2bf); border-radius: 3px; padding: 14px 14px 12px; }
.mkt-preview__rcard-agency { font-size: 9.5px; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-3, #6b7384); }
.mkt-preview__rcard-grade {
  font-family: var(--mp-font-serif, 'Source Serif 4', Georgia, serif); font-size: 30px; font-weight: 600;
  color: var(--navy, #0f4a3a); line-height: 1; letter-spacing: -0.02em; margin-top: 8px;
}
.mkt-preview__rcard-since { font-family: var(--mp-font-mono, 'JetBrains Mono', Consolas, monospace); font-size: 10px; color: var(--ink-3, #6b7384); margin-top: 8px; }
.mkt-preview__caption { text-align: center; font-size: 12.5px; color: var(--ink-3, #6b7384); margin-top: 18px; }
.mkt-preview__caption a { color: var(--navy, #0f4a3a); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }

@media (max-width: 720px) {
  .mkt-preview__mast-facts { grid-template-columns: repeat(3, 1fr); }
  .mkt-preview__mast-fact { padding-right: 10px; }
  .mkt-preview__mast-fact + .mkt-preview__mast-fact { padding-left: 10px; }
  .mkt-preview__kstrip { grid-template-columns: repeat(2, 1fr); }
  .mkt-preview__ratematrix { grid-template-columns: repeat(2, 1fr); }
}

/* ---- Treasury-civic tokens + shared primitives ----------------
   The marketing templates lean on treasury-civic tokens (--navy,
   --gold, --ink-*, --rule) and four of its component classes, which
   normally arrive via the Vite bundle in _base.html. When that bundle
   is stale or fails, the hero issuer card collapsed into an unstyled
   text stack. Declaring both here honors this file's self-containment
   convention ("pages render identically even if treasury-civic.css
   fails to load"). Values mirror frontend/src/design/treasury-civic.css.
   :where() keeps this block at zero specificity so the bundle's own
   :root tokens win whenever the bundle loads — these are fallbacks,
   not overrides, and cannot mask future brand-token changes. */
:where(:root) {
  --bg-page: #fbf7ec;
  --bg-paper: #fafaf6;
  --bg-card: #ffffff;
  --ink: #111827;
  --ink-2: #3a4456;
  --ink-3: #6b7384;
  --ink-4: #9aa0ac;
  --rule: #d8d2bf;
  --rule-2: #ebe5d2;
  --brand: #176B52;
  --brand-2: #0F4A3A;
  --brand-3: #2A8A6E;
  --brand-4: #0A3326;
  --navy: var(--brand-2);
  --navy-2: var(--brand);
  --navy-3: var(--brand-3);
  --gold: #d4a64a;
  --gold-2: #ecc97a;
  --pos: #2f6b3f;
  --neg: #9a2b2b;
}

:where(.mono) { font-family: var(--mp-font-mono, 'JetBrains Mono', Consolas, monospace); }

:where(.smallcaps) {
  font-variant: all-small-caps;
  letter-spacing: 0.12em;
  font-weight: 600;
}

:where(.issuer-seal) {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--bg-paper);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mp-font-serif, 'Source Serif 4', Georgia, serif);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.04em;
  border: 2px solid var(--gold-2);
  box-shadow: inset 0 0 0 4px var(--navy), inset 0 0 0 5px rgba(255,255,255,0.15);
  flex-shrink: 0;
}

:where(.mini-ratings) {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 16px 0;
  padding: 12px 0;
  border-top: 1px dashed var(--rule);
  border-bottom: 1px dashed var(--rule);
}
:where(.mini-ratings .mr) { text-align: center; }
:where(.mini-ratings .mr .ag) {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 4px;
}
:where(.mini-ratings .mr .gr) {
  font-family: var(--mp-font-serif, 'Source Serif 4', Georgia, serif);
  font-size: 18px;
  font-weight: 600;
  color: var(--navy);
}
