/* ReWay — direction D: a Scandinavian fashion web shop in sand tones.
   One typeface for the interface, garments shown as product cards,
   choices styled like size selectors. Spaced capitals only for the logo,
   section headings, tabs and the main action. Minimum text size 12px. */

@font-face {
  font-family: "Albert Sans";
  src: url("../fonts/albertsans-var.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --bg: #ece5d9;     /* sand */
  --sf: #f6f1e8;     /* linen surface */
  --sf2: #e3d9c9;    /* product image ground, chips */
  --st: #d6c9b4;     /* stone hairline */
  --sb: #ad9e86;     /* selector border */
  --tp: #645849;     /* taupe text */
  --ink: #2a231c;    /* espresso */
  --pos: #4b622e;
  --neg: #983a1d;
  --news-red: #c8321c;
  --news-yellow: #f0c419;

  --sans: "Albert Sans", "Helvetica Neue", Arial, sans-serif;
  --news: "Archivo", "Arial Narrow", Arial, sans-serif;

  --wrap: 720px;
  --gut: 18px;
  --foot-h: 116px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 15px/1.5 var(--sans); font-variant-numeric: tabular-nums;
  -webkit-tap-highlight-color: transparent;
}
body.noscroll { overflow: hidden; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; line-height: 1.2; text-wrap: balance; }
p { margin: 0; }
dl, dd { margin: 0; }
b { font-weight: 600; }

/* ───────── type helpers ───────── */
.label { display: block; font-size: 12.5px; font-weight: 500; color: var(--tp); margin: 14px 0 6px; }
.label.inline { display: inline; margin: 0 6px 0 0; }
.muted { color: var(--tp); }
.small { font-size: 14px; }
.tiny { font-size: 12.5px; }
.neg { color: var(--neg); }
.pos { color: var(--pos); }
.num { font-variant-numeric: tabular-nums; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
.row-between > .label { margin: 0; }
.row-between + .seg { margin-top: 8px; }
.sub { font-size: 13.5px; color: var(--tp); }

/* ───────── buttons & controls ───────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: transparent; border: 1px solid var(--ink); border-radius: 0;
  padding: 11px 16px; font-size: 13px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase;
}
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--ink); color: var(--bg); }
.btn.danger { border-color: var(--neg); color: var(--neg); }
.btn.stitch { width: 100%; border: 1px dashed var(--sb); color: var(--ink); }
.btn.big { width: 100%; padding: 15px 16px; margin-top: 14px; }
.btn.small-btn { padding: 8px 12px; font-size: 12px; }
.btn[disabled] { opacity: .35; pointer-events: none; }
.link { background: none; border: 0; padding: 0; text-align: left; text-decoration: underline; text-underline-offset: 3px; }
.txt-btn { background: none; border: 0; padding: 6px 4px; font-size: 12px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: inherit; }

.lang { display: inline-flex; gap: 2px; }
.lang button { background: none; border: 0; border-bottom: 1px solid transparent; padding: 6px 4px 3px; font-size: 12px; font-weight: 500; letter-spacing: .08em; color: var(--tp); }
.lang button.on { color: var(--ink); border-bottom-color: var(--ink); }

/* size-selector style choices */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { background: transparent; border: 1px solid var(--sb); border-radius: 0; padding: 8px 12px; font-size: 13.5px; line-height: 1.25; text-align: left; }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip[disabled], .chip.disabled { color: var(--tp); border: 1px dashed var(--sb); background: transparent; cursor: not-allowed; }

.seg { display: grid; grid-auto-columns: 1fr; grid-auto-flow: column; gap: 6px; }
.seg button { background: transparent; border: 1px solid var(--sb); padding: 9px 4px; font-size: 13.5px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.seg button small { font-size: 12px; color: var(--tp); }
.seg button.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.seg button.on small { color: var(--st); }
.subseg { display: flex; justify-content: center; gap: 28px; margin-bottom: 4px; }
.subseg button { border: 0; border-bottom: 1px solid transparent; padding: 6px 0 4px; font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--tp); flex-direction: row; }
.subseg button.on { background: transparent; color: var(--ink); border-bottom-color: var(--ink); }

.tags { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 6px; }
.tag { font-size: 12.5px; background: var(--sf2); color: var(--ink); padding: 3px 8px; white-space: nowrap; }
.tag.green, .tag.risk-riskLow { background: #e2e6d3; color: var(--pos); }
.tag.bad, .tag.risk-riskHigh, .tag.risk-riskExtreme { background: #f0dccf; color: var(--neg); }
.tag.risk-riskMid { background: #efe1c4; color: #74511a; }

.stepper .label { margin: 0 0 6px; }
.stepper > div { display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--sb); }
.stepper button { width: 42px; height: 40px; border: 0; background: none; font-size: 18px; }
.stepper button:active { background: var(--sf2); }
.stepper button[disabled] { opacity: .3; }
.stepper b { font-size: 14.5px; font-weight: 500; white-space: nowrap; }
.stepper.wide { margin: 14px 0; }
.stepper.inline > div { display: inline-flex; gap: 6px; }
.stepper.inline button { width: 34px; height: 32px; font-size: 16px; }
.stepper.inline b { font-size: 13.5px; }

.toggle { display: flex; gap: 12px; align-items: flex-start; margin-top: 10px; padding: 12px; background: var(--sf); cursor: pointer; }
.toggle input { width: 18px; height: 18px; accent-color: var(--ink); margin: 2px 0 0; flex: none; }
.toggle span { display: flex; flex-direction: column; gap: 2px; }
.toggle b { font-weight: 500; }
.toggle small { font-size: 13.5px; color: var(--tp); }
input[type="range"] { width: 100%; accent-color: var(--ink); height: 28px; }

/* fit-finder style 1–5 scale and thin meters */
.bars { display: inline-flex; gap: 3px; vertical-align: middle; }
.bars i { width: 11px; height: 3px; background: var(--st); }
.bars i.on { background: var(--ink); }
.bar { display: block; height: 2px; background: var(--st); margin-top: 6px; }
.bar i { display: block; height: 100%; background: var(--ink); }
.scale { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--pos); }
.scale .bars i.on { background: var(--pos); }
.stars { color: var(--ink); letter-spacing: 1px; font-size: 13px; }
.stars .off { color: var(--st); }

.warn { background: #f0dccf; color: var(--neg); padding: 10px 12px; margin-bottom: 14px; font-size: 14px; font-weight: 500; }
.empty { color: var(--tp); padding: 18px 0; font-size: 14px; }
.note { background: var(--sf2); padding: 10px 12px; font-size: 14px; line-height: 1.45; margin-top: 8px; }
.note-k { font-weight: 600; margin-right: 6px; }
.brief { border-left: 2px solid var(--ink); padding: 2px 0 2px 12px; margin: 4px 0 12px; font-size: 15px; }
.brief .label { margin: 0 0 2px; }

/* ───────── start ───────── */
.start { max-width: 560px; margin: 0 auto; padding: calc(14px + env(safe-area-inset-top, 0px)) var(--gut) 40px; }
.start-top { display: flex; justify-content: flex-end; }
.start-brand { text-align: center; padding: 26px 0 22px; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.logo { font-size: 30px; font-weight: 500; letter-spacing: .34em; text-transform: uppercase; padding-left: .34em; }
.tagline { font-size: 15px; color: var(--tp); max-width: 34ch; }
.fabric-strip { display: grid; grid-template-columns: repeat(8, 1fr); margin: 0 calc(-1 * var(--gut)) 24px; }
.fabric-strip span { aspect-ratio: 1 / 1.3; display: block; overflow: hidden; }
.fabric-strip svg { width: 100%; height: 100%; display: block; }
#brand {
  width: 100%; padding: 14px; border: 1px solid var(--sb); border-radius: 0; background: var(--sf);
  font: 400 18px/1.25 var(--sans); color: var(--ink);
}
#brand::placeholder { color: #8a7c69; }
#brand:hover { border-color: var(--tp); }
#brand:focus { outline: none; border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.row-options { display: flex; flex-direction: column; gap: 6px; }
.row-option { text-align: left; background: transparent; border: 1px solid var(--sb); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.row-option b { font-weight: 500; font-size: 16px; }
.row-option small { font-size: 14px; color: var(--tp); }
.row-option.sel { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.row-option.sel small { color: var(--st); }
.how { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.how li { display: grid; grid-template-columns: 26px 1fr; padding: 9px 0; border-bottom: 1px solid var(--st); font-size: 14.5px; }
.how li:last-child { border-bottom: 0; }
.how .n { color: var(--tp); }

/* ───────── sections ───────── */
.sec { padding: 22px 0 24px; border-top: 1px solid var(--sb); display: flex; flex-direction: column; gap: 10px; }
.sec:first-child { border-top: 0; }
.sec-h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.sec-h h2 { font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.sec-h .aside { font-size: 13px; color: var(--tp); }
.offer { background: var(--sf); padding: 14px; margin-bottom: 14px; display: flex; flex-direction: column; gap: 6px; }
.offer .label { margin: 0; color: var(--pos); font-weight: 600; }
.offer .btn { align-self: flex-start; }

/* ───────── header ───────── */
.top {
  position: sticky; top: 0; z-index: 20; background: var(--sf); border-bottom: 1px solid var(--sb);
  padding: env(safe-area-inset-top, 0px) var(--gut) 0;
}
.top { transition: box-shadow .2s ease; }
.top.scrolled { box-shadow: 0 10px 22px -8px rgba(42, 35, 28, .5); }
.top-in, .bottom-in, .main { max-width: var(--wrap); margin: 0 auto; }
.top-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; padding: 10px 0 8px; }
.top-row > .txt-btn { justify-self: start; }
.brand { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.brand strong { font-size: 15px; font-weight: 500; letter-spacing: .26em; text-transform: uppercase; padding-left: .26em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 52vw; }
.brand span { font-size: 12px; color: var(--tp); white-space: nowrap; }
.top-actions { justify-self: end; display: flex; align-items: center; gap: 6px; }
.ledger { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; border-top: 1px solid var(--st); }
.ledger .cell { padding: 8px 6px 10px; text-align: center; border-left: 1px solid var(--st); min-width: 0; }
.ledger .cell:first-child { border-left: 0; }
.ledger dt { font-size: 12px; color: var(--tp); }
.ledger dd { font-size: 16px; white-space: nowrap; }
.ledger .cell.neg dd { color: var(--neg); }
.ledger .bar { width: 60%; margin: 5px auto 0; }

/* ───────── main & footer ───────── */
.main { padding: 14px var(--gut) calc(var(--foot-h) + env(safe-area-inset-bottom, 0px) + 16px); }
.bottom {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--sf); border-top: 1px solid var(--sb);
  padding: 10px var(--gut) env(safe-area-inset-bottom, 0px);
}
.bottom .next { width: 100%; justify-content: space-between; padding: 15px 18px; font-size: 13.5px; letter-spacing: .14em; }
.next-no { letter-spacing: .04em; text-transform: none; font-weight: 400; opacity: .8; }
.tabs { display: flex; justify-content: space-between; gap: 4px; margin-top: 4px; }
.tabs button {
  flex: 1 1 auto; background: none; border: 0; padding: 10px 2px; font-size: 12px; font-weight: 500; letter-spacing: .03em; text-transform: uppercase; color: var(--tp); white-space: nowrap;
  text-decoration: underline transparent; text-underline-offset: 5px;
}
.tabs button.on { color: var(--ink); text-decoration-color: var(--ink); }
.tabs em { font-style: normal; font-size: 12px; color: var(--neg); margin-left: 3px; }

/* ───────── product cards ───────── */
.grid { display: grid; gap: 12px; }
.grid + .btn, .grid + p { margin-top: 14px; }
@media (min-width: 720px) { .grid { grid-template-columns: 1fr 1fr; } }
.obj { background: var(--sf); padding: 14px; }
.obj + .obj { margin-top: 10px; }
.grid > .obj + .obj { margin-top: 0; }
.is-paused { opacity: .6; }
.product, .item { display: grid; grid-template-columns: 112px 1fr; gap: 6px 14px; align-items: start; }
.pimg { position: relative; display: block; background: var(--sf2); aspect-ratio: 4 / 5; padding: 8px; border: 0; width: 100%; }
.pimg svg { width: 100%; height: 100%; display: block; }
.pimg .care-code { position: absolute; left: 6px; bottom: 6px; }
.care-code { background: var(--sf); color: var(--ink); font-size: 12px; font-weight: 600; letter-spacing: .06em; padding: 2px 6px; }
.pinfo { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ptop { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.ptop h3 { font-size: 17px; font-weight: 500; }
.pcode { font-size: 12px; color: var(--tp); letter-spacing: .06em; white-space: nowrap; }
.pmat { font-size: 14.5px; }
.pprice { font-size: 16px; margin-top: 4px; }
.pfull { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 8px; }
.supplier { display: flex; flex-direction: column; gap: 6px; }
.supplier .small { color: var(--ink); }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px 16px; margin: 8px 0; }
.kpis.three { grid-template-columns: repeat(3, 1fr); }
.kpis > div { min-width: 0; }
.kpis dt { font-size: 12.5px; color: var(--tp); line-height: 1.3; }
.kpis dd { font-size: 18px; font-weight: 300; margin-top: 2px; }
.kpis dd small { font-size: 13px; color: var(--tp); }
.kpis > div > small { display: block; font-size: 12.5px; color: var(--tp); }
.kpis .bar { width: 70%; }

.review { display: flex; flex-direction: column; gap: 2px; }
.review q { quotes: none; font-size: 15px; }
.controls { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.spec-line { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 13.5px; color: var(--tp); border-top: 1px solid var(--st); padding-top: 8px; }
.spec-line b { color: var(--ink); font-weight: 500; }
.spec-line b.neg { color: var(--neg); }
.spec-line b.pos { color: var(--pos); }
details.manage { border-top: 1px solid var(--st); padding-top: 8px; }
details summary { cursor: pointer; list-style: none; font-size: 12.5px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; padding: 4px 0; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: " +"; }
details[open] summary::after { content: " −"; }
details.manage .btn { margin-top: 12px; }

/* ───────── fibre library ───────── */
.care-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 14px 10px; }
.care { background: none; border: 0; padding: 0; text-align: left; display: flex; flex-direction: column; gap: 4px; }
.care .sw { display: block; aspect-ratio: 1; background: var(--sf2); overflow: hidden; }
.care .sw svg { width: 100%; height: 100%; display: block; }
.care b { font-size: 14px; font-weight: 500; line-height: 1.25; }
.care small { font-size: 12.5px; color: var(--tp); }
.care.used small { color: var(--pos); }
.care.locked { color: #8f8270; }
.care.locked .sw { background: transparent; border: 1px dashed var(--sb); }
.fact { border-bottom: 1px solid var(--st); padding: 10px 0; }
.fact summary { font-size: 15px; font-weight: 500; letter-spacing: 0; text-transform: none; }
.fact summary::after { content: none; }
.fact p { font-size: 14.5px; margin-top: 6px; max-width: 65ch; }

/* ───────── report ───────── */
.pl > div, .rp-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--st); font-size: 14.5px; }
.pl b, .rp-line b { font-weight: 500; white-space: nowrap; }
.rp-line small { color: var(--tp); font-weight: 400; }
.result { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--ink); }
.result span { font-size: 12.5px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; }
.result b { font-size: 20px; font-weight: 500; }
.result.pos b { color: var(--pos); }
.result.neg b { color: var(--neg); }
.spark { width: 100%; height: 96px; display: block; }
.spark polyline { fill: none; stroke: var(--ink); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.spark .zero { stroke: var(--neg); stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }

/* ───────── overlay & sheets ───────── */
.overlay {
  position: fixed; inset: 0; z-index: 50; background: rgba(42, 35, 28, .5);
  display: flex; align-items: flex-end; justify-content: center; overflow-y: auto;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 0 0;
}
.overlay.enter { animation: fade .18s ease; }
.sheet {
  background: var(--bg); width: 100%; max-width: 620px; margin-top: auto;
  padding: 18px var(--gut) calc(18px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column;
}
.enter .sheet { animation: up .24s cubic-bezier(.2, .9, .3, 1); }
@media (min-width: 640px) {
  .overlay { align-items: center; padding: 32px 16px; }
  .sheet { margin: auto; padding: 24px; }
}
@keyframes up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } }
.sheet > p { margin: 8px 0; max-width: 65ch; }
.sheet-title { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding-bottom: 10px; margin-bottom: 6px; border-bottom: 1px solid var(--st); }
.sheet-title h2, .sheet-head h2 { font-size: 22px; font-weight: 500; }
.sheet-title .label { margin: 0; }
.sheet .obj, .sheet .list { margin-top: 8px; }

.design { max-height: calc(100dvh - 12px - env(safe-area-inset-top, 0px)); padding-bottom: 0; }
@media (min-width: 640px) { .design { max-height: calc(100dvh - 64px); } }
.sheet-head { flex: none; padding-bottom: 12px; border-bottom: 1px solid var(--st); display: flex; flex-direction: column; gap: 4px; }
.sheet-head .label { margin: 6px 0 0; }
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.steps i { height: 2px; background: var(--st); }
.steps i.on { background: var(--ink); }
.sheet-body { flex: 1; overflow-y: auto; margin: 0 calc(-1 * var(--gut)); padding: 12px var(--gut) 16px; -webkit-overflow-scrolling: touch; }
.sheet-foot { flex: none; display: grid; grid-template-columns: 1fr 2fr; gap: 8px; padding: 12px 0 calc(14px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--st); }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px 10px; }
.tile { background: none; border: 0; padding: 0; text-align: left; display: flex; flex-direction: column; gap: 4px; }
.timg { display: block; aspect-ratio: 4 / 5; background: var(--sf2); padding: 10px; outline: 1px solid transparent; outline-offset: -1px; }
.timg svg { width: 100%; height: 100%; display: block; }
.tile b { font-size: 15px; font-weight: 500; }
.tile small { font-size: 13px; color: var(--tp); }
.tile.sel .timg { outline: 2px solid var(--ink); }
.list { display: flex; flex-direction: column; gap: 8px; }
.opt { text-align: left; background: var(--sf); border: 1px solid transparent; padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.opt > b { font-weight: 500; font-size: 16px; }
.opt.sel { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.opt-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.opt-h b { font-weight: 500; font-size: 16px; }
.opt-h .price { font-size: 13.5px; color: var(--tp); white-space: nowrap; }
.opt-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 13px; color: var(--tp); margin-top: 4px; }
.fopt { display: grid; grid-template-columns: 64px 1fr; gap: 6px 12px; }
.fsw { display: block; aspect-ratio: 1; overflow: hidden; background: var(--sf2); }
.fsw svg { width: 100%; height: 100%; display: block; }
.fmain { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.fopt .props { grid-column: 1 / -1; }
.locked-opt { background: transparent; border: 1px dashed var(--sb); color: var(--tp); flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: baseline; }
.locked-opt b { font-weight: 500; font-size: 15px; }
.props { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 5px 20px; margin-top: 6px; }
.props .bars i { width: 9px; }
.prop { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 13px; color: var(--tp); }
.price-head { display: grid; grid-template-columns: 88px 1fr; gap: 14px; align-items: center; margin-bottom: 4px; }
.price-head b { display: block; font-size: 17px; font-weight: 500; }
.price-head .sub { display: block; }
.big-price { display: block; font-size: 24px; font-weight: 400; margin-top: 4px; }

.fiber-hero { position: relative; aspect-ratio: 3 / 1; overflow: hidden; margin: -18px calc(-1 * var(--gut)) 14px; }
@media (min-width: 640px) { .fiber-hero { margin: -24px -24px 16px; } }
.fiber-hero svg { width: 100%; height: auto; display: block; }
.fiber-hero .care-code { position: absolute; left: var(--gut); bottom: 12px; font-size: 14px; padding: 4px 8px; }
.flag-new { align-self: flex-start; background: var(--ink); color: var(--bg); font-size: 12px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; padding: 5px 9px; margin-bottom: 10px; }

/* ───────── tabloid: the in-world newspaper keeps its own loud style ───────── */
.tabloid { background: #faf8f3; padding-top: 0; }
.masthead {
  margin: 0 calc(-1 * var(--gut)) 14px; padding: 12px var(--gut) 9px; background: var(--news-red); color: #fff;
  display: flex; flex-direction: column; border-bottom: 6px solid var(--news-yellow);
}
@media (min-width: 640px) { .masthead { margin: 0 -24px 16px; padding: 14px 24px 10px; } }
.tone-good .masthead, .tone-opportunity .masthead { background: var(--ink); }
.mast { font: 900 42px/.9 var(--news); font-stretch: 62%; letter-spacing: .01em; }
.edition { font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; margin-top: 6px; }
.headline { font: 900 clamp(30px, 9vw, 44px)/.98 var(--news); font-stretch: 62%; text-transform: uppercase; margin: 0 0 12px; }
.enter .headline { animation: slam .4s cubic-bezier(.2, 1.4, .4, 1); }
.tone-serious .headline { font-stretch: 80%; font-weight: 800; font-size: clamp(24px, 6.5vw, 32px); line-height: 1.05; }
@keyframes slam { from { transform: scale(1.12); opacity: 0; } to { transform: none; opacity: 1; } }
.lede { font-size: 16px; font-weight: 500; line-height: 1.45; border-left: 4px solid var(--news-yellow); padding-left: 12px; }
.tone-good .lede, .tone-opportunity .lede { border-color: var(--ink); }
.choices { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.btn.choice { justify-content: flex-start; text-align: left; gap: 12px; padding: 13px 14px; border-color: var(--sb); font-size: 15px; font-weight: 500; letter-spacing: 0; text-transform: none; }
.btn.choice .n { font-weight: 600; color: var(--tp); }
.btn.choice:hover { border-color: var(--ink); }
.outcome { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.outcome .label { margin: 0; }
.deltas { display: flex; flex-wrap: wrap; gap: 6px; }
.deltas span { font-size: 13px; padding: 4px 8px; background: #e2e6d3; }
.deltas span.neg { background: #f0dccf; }
.learn { margin-top: 16px; background: var(--sf); padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.learn .label { margin: 0; color: var(--tp); }
.learn h4 { font-size: 17px; font-weight: 600; }
.learn p { font-size: 14.5px; }
.final-score { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px solid var(--ink); padding: 10px 0; margin-bottom: 4px; }
.final-score span { font-size: 12.5px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; }
.final-score b { font-size: 32px; font-weight: 400; }

#toast {
  position: fixed; left: 50%; bottom: calc(var(--foot-h) + 14px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 10px);
  background: var(--ink); color: var(--bg); padding: 10px 14px; font-size: 14px;
  opacity: 0; pointer-events: none; transition: .2s; z-index: 60; max-width: calc(100% - 32px); text-align: center;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ───────── circular operations ───────── */
.contract { display: flex; flex-direction: column; gap: 8px; }
.contract b { font-weight: 500; }
.mixbar { display: flex; height: 4px; background: var(--st); }
.mixbar span { display: block; height: 100%; }
.mixlegend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; color: var(--tp); }
.mixlegend i, .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: 0; }
.grade-row { padding: 12px 0; border-top: 1px solid var(--st); display: flex; flex-direction: column; gap: 6px; }
.grade-row:first-of-type { border-top: 0; }
.grade-row b { font-weight: 500; }
.grade-row .g-n { font-size: 13px; color: var(--tp); }
.grade-row .tiny { color: var(--tp); }
.station { display: flex; flex-direction: column; gap: 4px; }
.station b { font-weight: 500; }
.station .btn { align-self: flex-start; margin-top: 6px; }
.station > .label { margin: 6px 0 0; }
.station .spec-line { border: 0; padding-top: 2px; }
.station.owned { box-shadow: inset 3px 0 0 var(--pos); }
.item .chips { margin-top: 4px; }
.verdict { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; padding: 10px 12px; font-size: 14px; font-weight: 500; }
.verdict.pos { background: #e2e6d3; color: var(--pos); }
.verdict.neg { background: #f0dccf; color: var(--neg); }
.item details summary { margin-top: 4px; }

/* business model canvas: one ruled sheet, cells share their lines */
.canvas { display: grid; grid-template-columns: 1fr; gap: 1px; background: var(--st); border: 1px solid var(--st); }
@media (min-width: 560px) { .canvas { grid-template-columns: 1fr 1fr; } }
.cv-block { background: var(--sf); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.cv-block.lvl0 { background: var(--bg); }
.cv-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.cv-h b { font-size: 12.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.cv-level { display: inline-flex; gap: 3px; }
.cv-level i { width: 11px; height: 3px; background: var(--st); }
.cv-level i.on { background: var(--ink); }
.cv-block ul { margin: 0; padding: 0; list-style: none; }
.cv-block li { font-size: 14px; padding: 4px 0; border-bottom: 1px solid var(--st); display: flex; justify-content: space-between; gap: 8px; }
.cv-block li:last-child { border-bottom: 0; }
.cv-block .hint { font-size: 13.5px; color: var(--tp); }
.neg-block { background: #f3e6dc; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
