/* RCV branded document styles — shared by all operational documents. */
doc-page:not(:defined){visibility:hidden}
:root{ --ink:#111111; --charcoal:#252525; --offwhite:#F2F1EE; --gold:#c6a76a; --goldtext:#8a6f36; }
h1,h2,h3{ font-family:'Space Grotesk',sans-serif; letter-spacing:-0.02em; }
body{ font-family:'Inter',sans-serif; color:var(--ink); }
.doc{ font-family:'Inter',sans-serif; color:var(--ink); line-height:1.6; font-size:11.5pt; }
.doc .kicker{ font-family:'Space Grotesk',sans-serif; font-weight:600; text-transform:uppercase; letter-spacing:.14em; font-size:9.5pt; color:var(--goldtext); }
.doc .goldbar{ width:72px; height:5px; background:var(--gold); margin-bottom:10px; }
.doc>.goldbar:first-child{ margin-top:20px; }
.doc .title{ font-size:27pt; font-weight:700; line-height:1.04; margin:2px 0 2px; }
.doc .sub{ font-size:11.5pt; color:#555; margin:2px 0 0; max-width:64%; }
.doc .meta{ font-family:ui-monospace,Menlo,monospace; font-size:9pt; letter-spacing:.04em; color:var(--goldtext); margin-top:14px; }
.doc .notice{ border:1px solid rgba(198,167,106,.32); background:rgba(198,167,106,.08); border-radius:6px; padding:16px 20px; font-size:10pt; color:var(--charcoal); margin:22px 0; }
.doc hr{ border:0; border-top:1px solid rgba(17,17,17,.09); margin:16px 0; }
.doc h2{ font-size:14pt; font-weight:700; margin:16px 0 6px; }
.doc h2 .num{ color:var(--goldtext); margin-right:.5em; }
.doc h3{ font-size:11.5pt; font-weight:600; margin:14px 0 4px; }
.doc p{ margin:0 0 10px; orphans:3; widows:3; text-wrap:pretty; color:#3d3a34; }
.doc ul,.doc ol{ margin:0 0 10px; padding-left:20px; }
.doc li{ margin:0 0 5px; orphans:3; widows:3; color:#3d3a34; }
.doc strong{ font-weight:600; color:#111; }
/* data rows */
.doc .rows{ list-style:none; padding:0; margin:0 0 10px; }
.doc .rows li{ display:flex; align-items:center; justify-content:space-between; gap:16px; padding:5px 0; border-bottom:1px solid rgba(17,17,17,.075); }
.doc .rows .k{ color:#94908a; }
.doc .rows .v{ font-weight:500; text-align:right; color:#111; }
.doc .ph{ color:#8f8a80; font-weight:500; font-family:ui-monospace,Menlo,monospace; font-size:9.5pt; }
/* tables */
.doc table{ width:100%; border-collapse:collapse; margin:10px 0 14px; font-size:10pt; }
.doc thead th{ text-align:left; font-family:'Space Grotesk',sans-serif; font-weight:600; font-size:9pt; text-transform:uppercase; letter-spacing:.06em; color:var(--goldtext); border-bottom:1px solid rgba(17,17,17,.135); padding:8px 8px; }
.doc tbody td{ border-bottom:1px solid rgba(17,17,17,.075); padding:7px 8px; vertical-align:top; }
.doc tbody tr:nth-child(even){ background:rgba(17,17,17,.02); }
.doc .num-col{ text-align:right; }
.doc .empty-row td{ height:34px; }
/* checkbox line */
.doc .check{ display:flex; align-items:flex-start; gap:10px; margin:0 0 8px; }
.doc .check .box{ width:15px; height:15px; border:1.5px solid var(--ink); border-radius:3px; flex:none; margin-top:2px; }
/* header / footer */
.rhead{ display:flex; align-items:center; gap:10px; padding-bottom:8px; margin-bottom:14px; border-bottom:1px solid rgba(17,17,17,.1); }
.rhead svg,.rhead img{ height:48px; width:auto; }
.rhead .name{ font-family:'Space Grotesk',sans-serif; font-weight:600; font-size:10pt; letter-spacing:-0.01em; }
.rhead .tag{ margin-left:auto; font-family:ui-monospace,Menlo,monospace; font-size:7.5pt; letter-spacing:.05em; color:var(--goldtext); }
.rfoot{ display:flex; align-items:center; justify-content:space-between; gap:12px; padding-top:8px; border-top:1px solid rgba(17,17,17,.12); font-size:8pt; color:#666; font-family:ui-monospace,Menlo,monospace; letter-spacing:.03em; }
.rfoot .c{ color:var(--charcoal); }
a{ color:var(--goldtext); }
a:hover{ color:var(--ink); }
/* Branded process steps */
.doc .steps{ display:flex; flex-direction:column; gap:9px; margin:4px 0 4px; }
.doc .step{ display:flex; align-items:center; gap:10px; font-size:11pt; color:#3d3a34; }
.doc .step .n{ width:22px; height:22px; border-radius:50%; background:var(--gold); color:#fff; font-family:'Space Grotesk',sans-serif; font-weight:600; font-size:10pt; display:flex; align-items:center; justify-content:center; flex:none; }
/* Premium process timeline */
.doc .timeline{ display:flex; gap:0; margin:10px 0 6px; }
.doc .tl-step{ flex:1; position:relative; display:flex; flex-direction:column; align-items:center; text-align:center; padding:0 12px; }
.doc .tl-step .dot{ width:30px; height:30px; border-radius:50%; background:var(--gold); color:#fff; font-family:'Space Grotesk',sans-serif; font-weight:600; font-size:11pt; display:flex; align-items:center; justify-content:center; margin-bottom:7px; position:relative; z-index:1; }
.doc .tl-step .dot svg{ width:15px; height:15px; display:block; }
.doc .tl-step:not(:last-child)::after{ content:''; position:absolute; top:14px; left:50%; width:100%; height:2px; background:var(--gold); opacity:.45; z-index:0; }
.doc .tl-step .t{ font-family:'Space Grotesk',sans-serif; font-weight:700; font-size:9.5pt; color:#111; line-height:1.15; }
.doc .tl-step .d{ font-size:7.5pt; color:#8f8a80; margin-top:3px; line-height:1.3; }
/* Muted (future) timeline stages — premium tracking feel */
.doc .tl-step.muted .dot{ background:#faf9f7; border:1.5px solid rgba(198,167,106,.5); color:#a99e86; }
.doc .tl-step.muted .t{ color:#9a9488; font-weight:500; }
.doc .tl-step.muted:not(:last-child)::after,
.doc .tl-step.muted::before{ opacity:.28; }
/* Acceptance-panel summary stats */
.doc .banner .bstats{ display:flex; gap:34px; margin-top:12px; padding-top:12px; border-top:1px solid rgba(198,167,106,.3); }
.doc .banner .bl{ font-family:'Space Grotesk',sans-serif; font-weight:600; font-size:7.5pt; text-transform:uppercase; letter-spacing:.1em; color:#8a6f36; }
.doc .banner .bv{ font-size:11pt; font-weight:600; color:#111; margin-top:2px; }
/* Inventory table (visual focus) */
.doc table.inv{ margin-top:2px; }
.doc table.inv thead th{ border-bottom:1.5px solid rgba(17,17,17,.22); padding:9px 10px; }
.doc table.inv tbody td{ padding:11px 10px; }
.doc table.inv tbody tr:nth-child(even){ background:rgba(17,17,17,.025); }
/* Support callout */
.doc .callout{ border:1px solid rgba(17,17,17,.12); border-radius:8px; padding:14px 18px; margin-top:8px; }
.doc .callout .ct{ font-family:'Space Grotesk',sans-serif; font-weight:600; font-size:10.5pt; color:#111; margin-bottom:3px; }
.doc .callout p{ margin:0; font-size:9.5pt; color:#3d3a34; }
/* Payout summary panel */
.doc .payout{ display:flex; flex-wrap:wrap; justify-content:space-between; align-items:flex-end; gap:20px 24px; border:1px solid rgba(198,167,106,.35); background:rgba(198,167,106,.09); border-radius:8px; padding:20px 24px; margin:18px 0 22px; }
.doc .payout .pl{ font-family:'Space Grotesk',sans-serif; font-weight:600; font-size:8.5pt; text-transform:uppercase; letter-spacing:.1em; color:#8a6f36; }
.doc .payout .pamt{ font-family:'Space Grotesk',sans-serif; font-weight:700; font-size:30pt; line-height:1; color:#111; margin-top:5px; }
.doc .payout .pmeta{ display:flex; gap:28px; text-align:right; }
.doc .payout .bl{ font-family:'Space Grotesk',sans-serif; font-weight:600; font-size:7.5pt; text-transform:uppercase; letter-spacing:.1em; color:#8a6f36; }
.doc .payout .bv{ font-size:10.5pt; font-weight:600; color:#111; margin-top:2px; }
/* Totals — final amount focal point */
.doc .final-line{ display:flex; justify-content:space-between; align-items:baseline; border-top:1.5px solid rgba(17,17,17,.18); margin-top:8px; padding-top:12px; }
.doc .final-line .fl{ font-family:'Space Grotesk',sans-serif; font-weight:700; font-size:13pt; color:#111; }
.doc .final-line .fv{ font-family:'Space Grotesk',sans-serif; font-weight:700; font-size:15pt; color:#111; }
/* Sales table — fixed layout so long values never overflow the page */
.doc table.sales{ table-layout:fixed; width:100%; font-size:8.5pt; margin-top:2px; }
.doc table.sales th,.doc table.sales td{ padding:7px 6px; word-break:break-word; overflow-wrap:anywhere; }
.doc table.sales thead th{ font-size:7.5pt; border-bottom:1px solid rgba(17,17,17,.135); }
.doc table.sales tbody tr:nth-child(even){ background:rgba(17,17,17,.025); }
@media (max-width:640px){
  .doc .timeline{ flex-direction:column; gap:16px; }
  .doc .tl-step{ flex-direction:row; align-items:flex-start; text-align:left; gap:12px; padding:0; }
  .doc .tl-step .dot{ margin-bottom:0; }
  .doc .tl-step:not(:last-child)::after{ top:30px; left:14px; width:2px; height:calc(100% + 16px); }
}
/* Confirmation banner */
.doc .banner{ display:flex; gap:14px; align-items:flex-start; border:1px solid rgba(198,167,106,.35); background:rgba(198,167,106,.09); border-radius:8px; padding:15px 20px; margin:18px 0 20px; }
.doc .banner .ico{ width:30px; height:30px; border-radius:50%; background:var(--gold); color:#fff; display:flex; align-items:center; justify-content:center; font-size:16px; font-weight:700; flex:none; }
.doc .banner .bt{ font-family:'Space Grotesk',sans-serif; font-weight:700; font-size:13pt; color:#111; margin-bottom:4px; }
.doc .banner .bd{ font-size:9.5pt; color:#3d3a34; margin:0 0 6px; line-height:1.5; }
.doc .banner .bd:last-child{ margin-bottom:0; }
/* Status badge */
.doc .badge{ display:inline-flex; align-items:center; gap:8px; font-family:'Space Grotesk',sans-serif; font-weight:600; font-size:10.5pt; padding:7px 15px; border-radius:999px; }
.doc .badge.ok{ background:rgba(45,110,66,.1); color:#2d6e42; border:1px solid rgba(45,110,66,.3); }
.doc .badge.warn{ background:rgba(198,167,106,.15); color:#8a6f36; border:1px solid rgba(198,167,106,.42); }
/* Primary reference rows (slightly stronger) */
.doc .rows li.primary .k{ color:#3d3a34; font-weight:600; }
.doc .rows li.primary .v{ font-size:11pt; font-weight:600; color:#111; }
/* Inventory table total row */
.doc tbody tr.total td{ border-top:1.5px solid rgba(17,17,17,.14); border-bottom:none; font-weight:600; color:#111; background:none; padding-top:9px; }

/* ── Phones ───────────────────────────────────────────────────────────────────
 * Two different documents exist: the SERVED page, where <doc-page> puts the
 * content in a fixed A4 sheet (.sheet{width:var(--doc-page-w)}) that has to be
 * pinched to read; and the GENERATED attachment, where documents.ts strips
 * doc-page.js and rewrites the tag to <div class="doc-page">, which is already
 * fluid. Only the second one fitted a phone — hence "the Inventory Receipt is
 * fine and the Submission Receipt isn't", depending which copy you opened.
 *
 * --doc-page-w is a custom property, so it inherits INTO the shadow sheet from
 * the light-DOM host: setting it here makes the served sheet fluid without
 * touching doc-page.js. Print geometry is untouched — this is @media screen.
 * ────────────────────────────────────────────────────────────────────────── */
@media screen and (max-width:820px){
  doc-page{ --doc-page-w:100% !important; min-width:0 !important; min-height:0 !important;
            padding:0 !important; background:#fff !important; }
  .doc-page{ width:auto !important; max-width:100% !important; }
  .doc{ font-size:12pt; line-height:1.55; }
  .doc .title{ font-size:21pt; }
  .doc .sub{ max-width:100%; font-size:11pt; }
  .doc h2{ font-size:13pt; margin-top:20px; }
  /* Header: the tag drops under the marks rather than squeezing them. */
  .rhead{ flex-wrap:wrap; gap:8px 10px; }
  .rhead svg,.rhead img{ height:36px; }
  .rhead .tag{ margin-left:0; width:100%; }
  .rfoot{ flex-direction:column; align-items:flex-start; gap:3px; }
  /* Key/value rows stack so a long value never collides with its label. */
  .doc .rows li{ flex-direction:column; align-items:flex-start; gap:1px; padding:8px 0; }
  .doc .rows .v{ text-align:left; font-size:11.5pt; }
  /* Headline panels. */
  .doc .payout{ flex-direction:column; align-items:flex-start; padding:16px 18px; gap:14px; }
  .doc .payout .pamt{ font-size:26pt; }
  .doc .payout .pmeta{ gap:22px; text-align:left; }
  .doc .banner{ flex-direction:column; padding:15px 18px; }
  .doc .banner .bstats{ flex-wrap:wrap; gap:14px 26px; }
  .doc .final-line{ gap:12px; }
  /* Tables stay tables — they are the record — but tighten and wrap hard. */
  .doc table{ font-size:9.5pt; }
  .doc table.inv{ table-layout:fixed; }
  .doc table.inv th,.doc table.inv td{ padding:8px 6px; word-break:break-word; overflow-wrap:anywhere; }
  .doc table.sales{ font-size:8.5pt; }
  .doc table.sales th,.doc table.sales td{ padding:6px 4px; }
  .doc .callout{ padding:13px 15px; }
}
@media screen and (max-width:420px){
  .doc .title{ font-size:18.5pt; }
  .doc .payout .pamt{ font-size:22pt; }
  .doc table.sales{ font-size:8pt; }
}
