/* JoulePass demo. Tokens first; components use only the variables. Barlow stands in for DINish. */
@font-face { font-family: "Barlow"; src: url("/assets/fonts/Barlow-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("/assets/fonts/Barlow-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Semi Condensed"; src: url("/assets/fonts/BarlowSemiCondensed-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --black: #000000;
  --white: #FFFFFF;
  --housing: #D5DADF;
  --burgundy: #6B1D2A;
  --owed: #A1A7AE;
  --amber: #FFB000;
  --font: "Barlow", system-ui, sans-serif;
  --font-cond: "Barlow Semi Condensed", "Barlow", system-ui, sans-serif;
  --fs-12: 12px; --fs-14: 14px; --fs-16: 16px; --fs-18: 18px; --fs-21: 21px; --fs-24: 24px; --fs-36: 36px;
  --radius-object: 10px;
  --radius-control: 2px;
  --rule: 1px solid var(--black);
  --focus: 0 0 0 3px var(--burgundy);
  --hatch: repeating-linear-gradient(135deg, var(--owed) 0 2px, var(--white) 2px 4px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--white); color: var(--black); font-family: var(--font); font-size: var(--fs-16);
       line-height: 1.45; font-variant-numeric: tabular-nums lining-nums; }
a { color: var(--burgundy); text-underline-offset: 2px; }
a:focus-visible { outline: none; box-shadow: var(--focus); }
h1, h2, p, dl, dd, ul { margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.demo-nav { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; padding: 10px 16px;
            border-bottom: var(--rule); font-size: var(--fs-14); }
.demo-logo { display: block; line-height: 0; }
.demo-logo img { display: block; height: 28px; width: auto; }
.demo-tag { background: var(--amber); color: var(--black); font-weight: 600; padding: 1px 6px; }
.demo-nav ul { display: flex; flex-wrap: wrap; gap: 4px 16px; list-style: none; padding: 0; }
.demo-nav a[aria-current="page"] { color: var(--black); font-weight: 600; text-decoration: none; }

.sheet { max-width: 880px; margin: 0 auto; padding: 24px 16px 48px; }
.sheet.wide { max-width: 1120px; }
.pp-top { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.kicker { font-size: var(--fs-14); font-weight: 600; color: var(--burgundy); }
.wordmark { color: var(--burgundy); font-weight: 600; }
.lang { font-size: var(--fs-14); }
.brandline { margin-top: 12px; font-size: var(--fs-16); }
h1 { font-family: var(--font-cond); font-weight: 700; font-size: var(--fs-36); line-height: 1.05; margin-top: 2px; }
.meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px 24px; margin-top: 20px;
        padding: 12px 0; border-top: var(--rule); border-bottom: var(--rule); }
.meta dt { font-size: var(--fs-12); }
.meta dd { font-weight: 600; overflow-wrap: anywhere; }
.hash { display: block; font-weight: 400; font-size: var(--fs-12); }
.notice { margin-top: 16px; padding: 10px 12px; border: var(--rule); font-size: var(--fs-14); }
.readiness { margin-top: 16px; font-size: var(--fs-24); font-weight: 600; line-height: 1.25; max-width: 30em; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 20px; list-style: none; padding: 0; margin-top: 16px; font-size: var(--fs-14); }
.legend li { display: inline-flex; align-items: center; gap: 8px; }

.mk { display: inline-flex; width: 14px; height: 14px; align-items: center; justify-content: center; flex: 0 0 14px; }
.m { display: block; width: 12px; height: 12px; }
.m-provided { background: var(--black); }
.m-owed { background: var(--hatch); border: 1px solid var(--black); }
.m-later { border: 1.5px dashed var(--black); }
.m-locked { color: var(--black); }

.group { margin-top: 32px; }
h2 { font-size: var(--fs-21); font-weight: 600; padding-bottom: 6px; border-bottom: 2px solid var(--black); }
.rows { margin: 0; }
.row { display: grid; grid-template-columns: 14px minmax(0, 1fr); column-gap: 12px; row-gap: 2px; padding: 10px 0;
       border-bottom: 1px solid var(--housing); break-inside: avoid; }
.row .mk { grid-row: 1 / span 2; margin-top: 4px; }
.row dt { font-size: var(--fs-14); }
.row dd { font-size: var(--fs-16); font-weight: 600; overflow-wrap: anywhere; }
.no { display: inline-block; min-width: 2.2em; font-weight: 400; }
.v-locked, .v-note { font-weight: 400; font-size: var(--fs-14); }
.small { font-size: var(--fs-12); margin-top: 16px; }
.pp-foot { margin-top: 32px; padding-top: 12px; border-top: var(--rule); font-size: var(--fs-12); }
.pp-foot p + p { margin-top: 6px; }

@media (min-width: 720px) {
  .row { grid-template-columns: 14px minmax(0, 5fr) minmax(0, 6fr); }
  .row .mk { grid-row: auto; }
  .row dd { font-size: var(--fs-16); }
}

.tbl { width: 100%; border-collapse: collapse; font-size: var(--fs-14); }
.tbl th { text-align: left; font-weight: 600; padding: 8px 8px 6px 0; border-bottom: var(--rule); vertical-align: bottom; }
.tbl td { padding: 8px 8px 8px 0; border-bottom: 1px solid var(--housing); vertical-align: top; }
.tbl td:first-child, .tbl th:first-child { width: 22px; }
.tbl .num { width: 3em; }
.plain { list-style: none; padding: 0; margin-top: 8px; font-size: var(--fs-14); }
.plain li { display: flex; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--housing); }
@media (max-width: 719px) {
  .tbl thead { display: none; }
  .tbl tr { display: grid; grid-template-columns: 22px 3em 1fr; padding: 8px 0; border-bottom: 1px solid var(--housing); }
  .tbl td { border: 0; padding: 2px 8px 2px 0; }
  .tbl td:nth-child(n+4) { grid-column: 3; }
}

.stage { background: var(--housing); min-height: calc(100vh - 44px); padding: 48px 16px; display: flex;
         flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.label { background: var(--white); color: var(--black); border: 2px solid var(--black); border-radius: var(--radius-object);
         display: flex; gap: 24px; padding: 20px 24px; width: min(560px, 100%); align-items: center; justify-content: space-between; }
.label-text p { line-height: 1.25; }
.l-brand { font-family: var(--font-cond); font-weight: 700; font-size: var(--fs-24); }
.l-type { font-size: var(--fs-14); }
.l-model { font-weight: 600; font-size: var(--fs-18); margin-top: 10px; }
.l-spec { font-weight: 600; font-size: var(--fs-18); }
.l-sn, .l-made { font-size: var(--fs-14); margin-top: 6px; }
.l-made { margin-top: 0; }
.label-qr { text-align: center; font-size: var(--fs-12); flex: 0 0 auto; }
.qr { display: block; width: 156px; height: 156px; }
.caption { font-size: var(--fs-16); text-align: center; max-width: 34em; }
.caption.small { font-size: var(--fs-12); }
@media (max-width: 480px) { .label { flex-direction: column; align-items: flex-start; } }

@media print {
  @page { size: A4; margin: 14mm; }
  .demo-nav ul, .demo-tag, .lang { display: none; }
  .demo-nav { border-bottom: 0; padding: 0 0 4mm; }
  body { font-size: 10pt; }
  .sheet { max-width: none; padding: 0; }
  h1 { font-size: 24pt; }
  .meta { margin-top: 10px; padding: 8px 0; }
  .notice { margin-top: 10px; padding: 6px 10px; }
  .legend { margin-top: 10px; }
  .group { margin-top: 16px; break-inside: auto; }
  h2 { font-size: 13pt; padding-bottom: 4px; break-after: avoid; }
  .row { padding: 4px 0; }
  .row dt, .v-locked, .v-note { font-size: 9pt; }
  .row dd { font-size: 10pt; }
  .tbl { font-size: 9pt; }
  .tbl td, .tbl th { padding-top: 4px; padding-bottom: 4px; }
  .readiness { font-size: 16pt; }
  a { color: var(--black); text-decoration: none; }
  .row { grid-template-columns: 14px minmax(0, 5fr) minmax(0, 6fr); }
  .row .mk { grid-row: auto; }
  .stage { background: var(--white); min-height: 0; }
}
