/* ==========================================================================
   Angelite - Platform Feature Guide
   Print-ready (A4) client report stylesheet.
   Mirrors the storefront brand identity (Layer A/B design tokens).
   Plain CSS, no build step. No JavaScript anywhere in the report.
   ========================================================================== */

/* ---------- Self-hosted brand fonts (latin subset, copied from the app build) ---------- */
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/instrument-sans-400.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/instrument-sans-500.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/instrument-sans-600.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/cormorant-400.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: italic; font-weight: 400; font-display: swap; src: url("fonts/cormorant-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/cormorant-500.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/cormorant-600.woff2") format("woff2"); }

/* ---------- Brand tokens (from resources/css/themes/storefront.css) ---------- */
:root {
  --ink: #2c2a27;
  --ink-soft: #7a7166;
  --ink-muted: #a89b8c;
  --ivory: #faf8f5;
  --ivory-deep: #ede3d1;
  --sand: #f2ede6;
  --raised: #ffffff;
  --rule: #e8e2da;
  --rule-strong: #c8bfb5;
  --brand: #9aa7c7;
  --brand-deep: #6b89a6;
  --brand-soft: #c7d6e3;
  --brand-fg: #ffffff;
  --gold: #b5924f;
  --gold-soft: #d7bd83;
  --logo: #8c795f;

  --ok: #6b9e62;        --ok-surface: #f0f5ee;     --ok-border: #c8d8c0;
  --error: #b07068;     --error-surface: #f5efee;  --error-border: #dec8c0;
  --pending: #8b8b6b;   --pending-surface: #f5f5ee; --pending-border: #d8d8c0;

  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 0.375rem;
  --radius-pill: 9999px;
  --shadow-sm: 0 1px 4px 0 rgba(44, 42, 39, 0.05);
  --shadow-md: 0 4px 12px -2px rgba(44, 42, 39, 0.08);
  --shadow-lg: 0 12px 24px -4px rgba(44, 42, 39, 0.10);

  /* A4 geometry */
  --page-w: 210mm;
  --page-margin: 16mm;
}

/* ---------- Reset / base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 10.5pt;
  line-height: 1.55;
  color: var(--ink);
  background: #ece6dd;            /* desk backdrop behind the A4 sheets (screen only) */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; color: var(--ink); line-height: 1.12; margin: 0; }
p { margin: 0 0 0.6em; }
a { color: var(--brand-deep); text-decoration: none; }
a:hover { color: var(--ink); }
strong { font-weight: 600; color: var(--ink); }
ul, ol { margin: 0 0 0.6em; padding-left: 1.25em; }
li { margin: 0 0 0.25em; }
code { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 0.86em; background: var(--sand); border: 1px solid var(--rule); border-radius: 4px; padding: 0.05em 0.35em; color: var(--ink); }

/* ==========================================================================
   On-screen shell: fixed brand sidebar + centered A4 "sheets"
   ========================================================================== */
.report-nav {
  position: fixed; top: 0; left: 0; width: 232px; height: 100vh;
  background: var(--ink); color: var(--ivory);
  display: flex; flex-direction: column;
  padding: 24px 0; overflow-y: auto; z-index: 50;
}
.report-nav__brand { padding: 0 22px 18px; border-bottom: 1px solid rgba(255,255,255,0.12); margin-bottom: 10px; }
.report-nav__brand .wordmark { font-family: var(--font-display); font-size: 20pt; letter-spacing: 0.04em; color: #fff; display: block; }
.report-nav__brand .tagline { font-size: 7.5pt; letter-spacing: 0.22em; text-transform: uppercase; color: var(--brand-soft); display: block; margin-top: 4px; }
.report-nav a { display: block; color: rgba(250,248,245,0.74); padding: 7px 22px; font-size: 9pt; letter-spacing: 0.01em; border-left: 3px solid transparent; }
.report-nav a:hover { color: #fff; background: rgba(255,255,255,0.04); }
.report-nav a.is-current { color: #fff; border-left-color: var(--gold); background: rgba(255,255,255,0.06); }
.report-nav a .n { color: var(--ink-muted); font-size: 8pt; margin-right: 8px; font-variant-numeric: tabular-nums; }
.report-nav a.is-current .n { color: var(--gold-soft); }
.report-nav__foot { margin-top: auto; padding: 16px 22px 0; font-size: 7.5pt; color: var(--ink-muted); letter-spacing: 0.04em; }

.report-main { margin-left: 232px; padding: 32px 24px 64px; }

/* the A4 sheet */
.sheet {
  width: var(--page-w);
  max-width: 100%;
  margin: 0 auto 26px;
  background: var(--ivory);
  box-shadow: var(--shadow-lg);
  padding: var(--page-margin);
  border: 1px solid var(--rule);
}

/* ==========================================================================
   Cover page
   ========================================================================== */
.cover {
  min-height: 257mm;                 /* A4 height minus margins, approx */
  display: flex; flex-direction: column;
  background:
    linear-gradient(180deg, rgba(250,248,245,0.86), rgba(250,248,245,0.97)),
    url("img/cover-hero.jpg") center 30% / cover no-repeat;
  border-top: 6px solid var(--brand);
}
.cover__top { display: flex; align-items: center; gap: 14px; }
.cover__top img { height: 54px; width: auto; }
.cover__top .brandtext { font-family: var(--font-display); font-size: 22pt; letter-spacing: 0.05em; color: var(--ink); }
.cover__center { margin-top: auto; }
.cover__eyebrow { font-size: 9pt; letter-spacing: 0.34em; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; }
.cover h1 { font-size: 46pt; font-weight: 500; line-height: 1.02; letter-spacing: 0.01em; margin-bottom: 14px; }
.cover h1 em { font-style: italic; color: var(--brand-deep); }
.cover__sub { font-size: 13pt; color: var(--ink-soft); max-width: 130mm; line-height: 1.5; }
.cover__rule { height: 2px; width: 84px; background: var(--gold); margin: 26px 0; }
.cover__meta { margin-top: auto; display: flex; flex-wrap: wrap; gap: 28px 48px; padding-top: 26px; border-top: 1px solid var(--rule-strong); }
.cover__meta dt { font-size: 7.5pt; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 3px; }
.cover__meta dd { margin: 0; font-size: 11pt; color: var(--ink); }

/* ==========================================================================
   Section header band
   ========================================================================== */
.section-head { border-bottom: 2px solid var(--gold); padding-bottom: 14px; margin-bottom: 22px; }
.section-head .kicker { font-size: 8pt; letter-spacing: 0.28em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; display: flex; align-items: center; gap: 10px; }
.section-head .kicker .pillar-no {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: var(--radius-pill);
  background: var(--ink); color: var(--ivory); font-family: var(--font-body);
  font-size: 9pt; font-weight: 600; letter-spacing: 0;
}
.section-head h1 { font-size: 30pt; font-weight: 500; margin-bottom: 8px; }
.section-head .lead { font-size: 11.5pt; color: var(--ink-soft); max-width: 150mm; }

/* In-page "On this page" contents */
.onpage { background: var(--sand); border: 1px solid var(--rule); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 26px; }
.onpage h2 { font-family: var(--font-body); font-size: 8pt; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 8px; font-weight: 600; }
.onpage ol { columns: 2; column-gap: 26px; list-style: none; padding: 0; margin: 0; font-size: 9.5pt; }
.onpage li { break-inside: avoid; margin-bottom: 4px; padding-left: 18px; position: relative; }
.onpage li::before { content: "›"; position: absolute; left: 2px; color: var(--gold); }

/* Subgroup heading inside a section (e.g. "Catalog › Products") */
.subgroup { font-size: 8.5pt; letter-spacing: 0.2em; text-transform: uppercase; color: var(--brand-deep); font-family: var(--font-body); font-weight: 600; margin: 30px 0 14px; padding-bottom: 6px; border-bottom: 1px solid var(--rule); }
.subgroup:first-of-type { margin-top: 6px; }

/* ==========================================================================
   Feature card (the atomic, ~170x repeated unit)
   ========================================================================== */
.feature {
  border: 1px solid var(--rule);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius);
  background: var(--raised);
  padding: 16px 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.feature__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 12px; margin-bottom: 8px; }
.feature__head h3 { font-size: 16pt; font-weight: 600; }
.feature__badges { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }

.badge { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-body); font-size: 7.5pt; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; padding: 2px 9px; border-radius: var(--radius-pill); border: 1px solid transparent; white-space: nowrap; }
.badge--role { background: var(--brand-soft); color: #34465f; border-color: #b3c6dc; }
.badge--customer { background: var(--ok-surface); color: #426b3a; border-color: var(--ok-border); }
.badge--flag { background: #f8f1e2; color: #8a6a26; border-color: var(--gold-soft); }
.badge--flag::before { content: "◆"; font-size: 6pt; }

.feature .what { font-size: 10.5pt; color: var(--ink); margin-bottom: 10px; }
.feature .howto-label { font-size: 7.5pt; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-muted); font-weight: 600; margin-bottom: 5px; }
.feature .howto { counter-reset: step; list-style: none; padding-left: 0; margin: 0 0 10px; }
.feature .howto > li { position: relative; padding-left: 26px; margin-bottom: 5px; font-size: 9.8pt; }
.feature .howto > li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 18px; height: 18px; border-radius: var(--radius-pill);
  background: var(--ink); color: var(--ivory);
  font-family: var(--font-body); font-size: 7.5pt; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
}
.feature .note { font-size: 9pt; color: var(--ink-soft); background: var(--ivory); border-left: 2px solid var(--gold-soft); padding: 7px 12px; border-radius: 0 var(--radius) var(--radius) 0; }
.feature .note strong { color: var(--gold); }

/* Screenshot figure */
figure.shot { margin: 12px 0 4px; }
figure.shot img { width: 100%; height: auto; display: block; border: 1px solid var(--rule-strong); border-radius: var(--radius); box-shadow: var(--shadow-md); background: #fff; }
figure.shot.shot--bordered img { padding: 0; }
figure.shot figcaption { font-size: 8pt; color: var(--ink-muted); margin-top: 6px; letter-spacing: 0.02em; }
figure.shot figcaption b { color: var(--ink-soft); font-weight: 600; }

/* ==========================================================================
   index.html specifics: stats strip, legend, TOC, feature-status table
   ========================================================================== */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; margin: 26px 0; }
.stats .stat { background: var(--ivory); padding: 16px 14px; text-align: center; }
.stats .stat .num { font-family: var(--font-display); font-size: 26pt; font-weight: 600; color: var(--brand-deep); line-height: 1; }
.stats .stat .lbl { font-size: 7.5pt; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-muted); margin-top: 6px; }

.legend { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; background: var(--sand); border: 1px solid var(--rule); border-radius: var(--radius); padding: 12px 16px; margin: 18px 0 28px; font-size: 9pt; color: var(--ink-soft); }
.legend .item { display: inline-flex; align-items: center; gap: 7px; }

.toc { margin-top: 18px; }
.toc__pillar { break-inside: avoid; margin-bottom: 16px; }
.toc__pillar > a { display: flex; align-items: baseline; gap: 10px; font-family: var(--font-display); font-size: 15pt; font-weight: 600; color: var(--ink); border-bottom: 1px solid var(--rule); padding-bottom: 5px; margin-bottom: 7px; }
.toc__pillar > a .pn { font-family: var(--font-body); font-size: 8.5pt; font-weight: 600; color: var(--gold); letter-spacing: 0.1em; }
.toc__pillar > a .ct { margin-left: auto; font-family: var(--font-body); font-size: 8pt; font-weight: 500; color: var(--ink-muted); letter-spacing: 0.04em; }
.toc__items { columns: 2; column-gap: 26px; list-style: none; padding: 0; margin: 0; font-size: 9pt; }
.toc__items li { break-inside: avoid; margin-bottom: 3px; padding-left: 14px; position: relative; color: var(--ink-soft); }
.toc__items li::before { content: "·"; position: absolute; left: 3px; color: var(--gold); font-weight: 700; }
.toc__items li .fl { color: var(--gold); font-size: 7pt; }

table.features { width: 100%; border-collapse: collapse; font-size: 8.6pt; margin-top: 10px; }
table.features caption { text-align: left; font-family: var(--font-body); font-size: 8pt; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-muted); font-weight: 600; margin-bottom: 8px; }
table.features th { text-align: left; background: var(--ink); color: var(--ivory); font-family: var(--font-body); font-weight: 600; font-size: 7.5pt; letter-spacing: 0.1em; text-transform: uppercase; padding: 7px 10px; }
table.features td { padding: 6px 10px; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.features tr:nth-child(even) td { background: var(--sand); }
table.features .flag { font-family: ui-monospace, Menlo, monospace; font-size: 8pt; color: var(--gold); }
.pill-on { color: var(--ok); font-weight: 600; }
.pill-off { color: var(--ink-muted); font-weight: 600; }

/* callout box */
.callout { background: var(--brand-soft); border: 1px solid #b3c6dc; border-radius: var(--radius); padding: 14px 18px; margin: 22px 0; font-size: 9.6pt; color: #2f4055; }
.callout h2 { font-family: var(--font-body); font-size: 9pt; letter-spacing: 0.16em; text-transform: uppercase; color: var(--brand-deep); font-weight: 600; margin-bottom: 6px; }

/* Page footer line repeated at the bottom of each sheet (screen only flavour) */
.sheet-foot { margin-top: 26px; padding-top: 10px; border-top: 1px solid var(--rule); display: flex; justify-content: space-between; font-size: 7.5pt; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); }

/* ==========================================================================
   "Scenario / In practice" callout inside a feature card
   ========================================================================== */
.scenario {
  background: #f4efe7;
  border: 1px solid var(--rule);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 11px 15px 12px;
  margin: 0 0 12px;
}
.scenario .lbl {
  font-size: 7.5pt; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold); font-weight: 600; margin-bottom: 5px;
  display: flex; align-items: center; gap: 10px; white-space: nowrap;
}
.scenario .lbl::after {
  content: ""; flex: 1; height: 1px; background: var(--gold-soft); opacity: 0.7;
}
.scenario p { margin: 0 0 6px; font-size: 9.9pt; color: var(--ink); }
.scenario p:last-child { margin-bottom: 0; }
.scenario p strong { color: var(--brand-deep); }
.scenario .situation { font-style: italic; color: var(--ink-soft); }

/* Problem statement: the merchant pain this feature removes; leads every card, before .what */
p.problem {
  margin: 0 0 10px;
  padding: 8px 13px;
  background: var(--sand);
  border-left: 3px solid var(--brand-deep);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 9.9pt;
  color: var(--ink);
}
p.problem > strong:first-child {
  display: block;
  font-size: 7.5pt; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--brand-deep); font-weight: 600; margin-bottom: 3px;
}

/* Provider spec list: why we chose it, how to configure, documentation link */
dl.spec {
  margin: 12px 0 4px; display: grid; grid-template-columns: max-content 1fr;
  gap: 7px 14px; font-size: 9.5pt; align-items: start;
}
dl.spec dt {
  font-size: 7.5pt; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--brand-deep); font-weight: 600; padding-top: 2px; white-space: nowrap;
}
dl.spec dd { margin: 0; color: var(--ink); }
dl.spec dd a { color: var(--brand-deep); text-decoration: underline; word-break: break-word; }

/* Reusable provider/role catalogue table inside a feature card */
table.catalog { width: 100%; border-collapse: collapse; font-size: 9pt; margin: 12px 0 4px; }
table.catalog th { text-align: left; background: var(--sand); color: var(--ink); font-family: var(--font-body); font-weight: 600; font-size: 7.5pt; letter-spacing: 0.08em; text-transform: uppercase; padding: 6px 10px; border-bottom: 1px solid var(--rule-strong); }
table.catalog td { padding: 6px 10px; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.catalog td:first-child { font-weight: 600; color: var(--ink); white-space: nowrap; }
table.catalog td a { color: var(--brand-deep); text-decoration: underline; }
table.catalog .built-in { color: var(--ok); font-weight: 600; font-size: 7.5pt; letter-spacing: 0.06em; text-transform: uppercase; }

/* Briefing page prose + at-a-glance grid */
.prose p { font-size: 10.6pt; margin-bottom: 0.7em; max-width: 168mm; }
.prose .lead-para { font-size: 13pt; color: var(--ink-soft); font-family: var(--font-display); line-height: 1.42; max-width: 168mm; }
.prose strong { color: var(--ink); }
.brief-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0 6px; }
.brief-card { border: 1px solid var(--rule); border-left: 3px solid var(--brand); border-radius: var(--radius); background: var(--raised); padding: 13px 16px; break-inside: avoid; }
.brief-card h3 { font-size: 13.5pt; margin-bottom: 4px; }
.brief-card .pn { font-family: var(--font-body); font-size: 8pt; font-weight: 600; color: var(--gold); letter-spacing: 0.1em; margin-right: 7px; }
.brief-card p { font-size: 9.3pt; color: var(--ink-soft); margin: 5px 0 0; }
.brief-step { display: flex; gap: 14px; margin-bottom: 12px; break-inside: avoid; }
.brief-step .num { flex: none; width: 30px; height: 30px; border-radius: var(--radius-pill); background: var(--ink); color: var(--ivory); font-family: var(--font-display); font-size: 13pt; display: flex; align-items: center; justify-content: center; }
.brief-step .body { font-size: 10pt; }
.brief-step .body h4 { font-family: var(--font-body); font-size: 9.5pt; font-weight: 600; color: var(--ink); margin-bottom: 2px; }
.brief-step .body p { margin: 0; color: var(--ink-soft); font-size: 9.6pt; }

/* ==========================================================================
   Print / PDF (A4)
   ========================================================================== */
@page {
  size: A4;
  margin: 16mm 15mm 18mm;
}
@media print {
  body { background: #fff; }
  .report-nav { display: none !important; }
  .report-main { margin-left: 0; padding: 0; }
  .sheet { width: auto; max-width: none; margin: 0; padding: 0; border: 0; box-shadow: none; background: #fff; }
  .sheet-foot { display: none; }

  /* page-break discipline */
  .cover { min-height: 0; height: 247mm; break-after: page; border-top-width: 5px; }
  .section-head { break-after: avoid; }
  .subgroup { break-after: avoid; }
  .feature { break-inside: avoid; box-shadow: none; }
  figure.shot { break-inside: avoid; }
  figure.shot img { box-shadow: none; }
  .scenario, p.problem, dl.spec, table.catalog tr, .brief-card, .brief-step { break-inside: avoid; }
  .brief-grid { break-inside: auto; }
  .toc__pillar, .onpage li, .stats { break-inside: avoid; }
  table.features { font-size: 8pt; }
  table.features tr { break-inside: avoid; }
  a { color: var(--ink); }
  h1, h2, h3, h4 { break-after: avoid; }
}
