/* Seven Kilos - terminal concrete, a departures-board header, signal-orange bag tags and a thermal receipt tape. */
:root {
  --bg: #e7ebee; --surface: #fbfcfd; --ink: #14213d; --muted: #556075; --line: #cdd5de; --tint: #eef2f6;
  --accent: #ef5a1c; --accent-ink: #ffffff; --board: #14213d; --board-ink: #f2f5fa; --flap: #ffc53d;
  --ok: #128457; --ok-bg: #dcf1e7; --tight: #b86e00; --tight-bg: #fbeed6; --over: #cc2f27; --over-bg: #f9dedb;
  --tape-bg: #fffdf5; --tape-ink: #23201a; --tape-muted: #7a7466; --tape-line: #d9d3c2;
  --k-bag: #9aa5b1; --k-clothes: #3b78d8; --k-outer: #6b4fc8; --k-shoes: #b4631c; --k-toiletries: #149e94; --k-tech: #46566d; --k-gifts: #d6336c; --k-other: #9a9f6e;
  --sans: "Avenir Next", "Segoe UI", system-ui, -apple-system, sans-serif;
  --head: "DIN Alternate", "Bahnschrift", "Arial Narrow", "Avenir Next Condensed", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c111c; --surface: #141c2b; --ink: #e4e9f1; --muted: #9aa6ba; --line: #27334a; --tint: #1a2436;
    --accent: #ff7a3d; --accent-ink: #1a0f08; --board: #070b13; --board-ink: #e4e9f1; --flap: #ffc53d;
    --ok: #4fd09a; --ok-bg: #12301f; --tight: #f2b347; --tight-bg: #3a2b10; --over: #ff7b70; --over-bg: #3d1a18;
    --tape-bg: #f4f0e3; --tape-ink: #23201a; --tape-muted: #6f695b; --tape-line: #d2cbb8;
    --k-bag: #7d8a99; --k-clothes: #5b93ea; --k-outer: #8d75e0; --k-shoes: #d08443; --k-toiletries: #33bdb1; --k-tech: #8a9ab3; --k-gifts: #ec5f90; --k-other: #b4b98a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0c111c; --surface: #141c2b; --ink: #e4e9f1; --muted: #9aa6ba; --line: #27334a; --tint: #1a2436;
  --accent: #ff7a3d; --accent-ink: #1a0f08; --board: #070b13; --board-ink: #e4e9f1; --flap: #ffc53d;
  --ok: #4fd09a; --ok-bg: #12301f; --tight: #f2b347; --tight-bg: #3a2b10; --over: #ff7b70; --over-bg: #3d1a18;
  --tape-bg: #f4f0e3; --tape-ink: #23201a; --tape-muted: #6f695b; --tape-line: #d2cbb8;
  --k-bag: #7d8a99; --k-clothes: #5b93ea; --k-outer: #8d75e0; --k-shoes: #d08443; --k-toiletries: #33bdb1; --k-tech: #8a9ab3; --k-gifts: #ec5f90; --k-other: #b4b98a;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--sans); overflow-x: hidden; }
a { color: var(--accent); }
code { font: .85em var(--mono); background: var(--tint); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; word-break: break-word; }
h1, h2, h3 { font-family: var(--head); font-weight: 700; line-height: 1.15; letter-spacing: .01em; }
h2 { font-size: 1.3rem; margin: 0 0 8px; display: flex; align-items: center; gap: 8px; }
h3 { font-size: 1.02rem; margin: 16px 0 6px; display: flex; align-items: center; gap: 8px; }
.hidden { display: none !important; }
.small { font-size: .86rem; } .muted { color: var(--muted); } .mono { font-family: var(--mono); }
.warn { color: var(--tight); }

/* header: a departures board */
.bar { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--board); color: var(--board-ink); flex-wrap: wrap; border-bottom: 3px solid var(--flap); }
.bar .back { color: var(--board-ink); opacity: .75; text-decoration: none; font-size: .9rem; }
.brand { display: flex; align-items: center; gap: 8px; font-family: var(--head); font-size: 1.15rem; letter-spacing: .06em; text-transform: uppercase; color: var(--flap); }
.logo { width: 28px; height: 28px; }
.lg-bag { fill: var(--accent); } .lg-ln { stroke: var(--flap); stroke-width: 2.2; fill: none; stroke-linecap: round; } .lg-ln2 { stroke: var(--board); stroke-width: 1.6; opacity: .45; } .lg-dial { fill: var(--board); stroke: var(--flap); stroke-width: 1.4; }
.session { margin-left: auto; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.pill { font: inherit; font-size: .88rem; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 5px 13px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.bar .pill { background: transparent; color: var(--board-ink); border-color: rgba(255,255,255,.28); }
.pill:hover:not(:disabled) { border-color: var(--accent); }
.pill.solid, .bar .pill.solid { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.pill.ghost { background: transparent; color: inherit; cursor: default; }
.pill.tiny { font-size: .74rem; padding: 1px 9px; }
.pill.big { font-size: 1rem; padding: 9px 22px; }
.pill:disabled { opacity: .5; cursor: not-allowed; }

/* layout */
.wrap { max-width: 1180px; margin: 0 auto; padding: 16px; }
.hero { padding: 18px 0 8px; }
.kicker { text-transform: uppercase; letter-spacing: .16em; font-size: .76rem; color: var(--accent); font-weight: 700; margin: 0; font-family: var(--mono); }
.hero h1 { font-size: clamp(1.9rem, 5.2vw, 3rem); margin: 6px 0 10px; }
.hl { box-shadow: inset 0 -0.32em 0 var(--flap); color: inherit; }
.lede { max-width: 780px; color: var(--muted); margin: 0 0 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chips-label { font-size: .85rem; color: var(--muted); margin-right: 2px; }
.chip { font: inherit; font-size: .86rem; padding: 5px 12px 5px 22px; border: 1px solid var(--line); border-radius: 4px 999px 999px 4px; background: var(--surface); color: var(--ink); cursor: pointer; position: relative; }
.chip::before { content: ""; position: absolute; left: 8px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--line); }
.chip.on { border-color: var(--accent); } .chip.on::before { background: var(--accent); }
.two { display: grid; grid-template-columns: 1.15fr 1fr; gap: 16px; margin-top: 12px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-top: 16px; min-width: 0; }
.two .card { margin-top: 0; }
.stepno { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; background: var(--board); color: var(--flap); font: 700 .85rem var(--mono); flex: none; }
.drop { border: 1.5px dashed var(--line); border-radius: 10px; padding: 8px; }
.drop.over { border-color: var(--accent); background: var(--tint); }
.drop textarea { width: 100%; border: none; background: transparent; color: var(--ink); font: .86rem/1.5 var(--mono); resize: vertical; min-height: 220px; outline: none; }
.drop-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 6px; }
.filebtn { font-size: .84rem; color: var(--accent); cursor: pointer; text-decoration: underline; }
.filebtn input { display: none; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.f { display: flex; flex-direction: column; gap: 3px; font-size: .85rem; font-weight: 600; color: var(--muted); margin-top: 8px; min-width: 0; }
.grid2 .f { margin-top: 0; }
.f.wide { grid-column: 1 / -1; }
.f.dim { opacity: .45; }
.opt { font-weight: 400; font-size: .76rem; }
.f input, .f select, .f textarea { font: 400 .95rem var(--sans); color: var(--ink); background: var(--tint); border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; width: 100%; min-width: 0; }
.f input:focus, .f select:focus, .f textarea:focus, .drop textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.notes { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 4px; font-size: .88rem; }
.notes li { padding: 6px 10px; border-radius: 8px; background: var(--tint); border-left: 3px solid var(--line); }
.notes li.warn { border-left-color: var(--tight); background: var(--tight-bg); color: var(--ink); }
.notes li.bad { border-left-color: var(--over); background: var(--over-bg); }
.notes li.ok { border-left-color: var(--ok); background: var(--ok-bg); }
.notes li.info { border-left-color: var(--k-clothes); }
.notes li.none { color: var(--muted); }

/* the weigh-in */
.disp-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.verdict-tag { font: 700 .8rem var(--mono); text-transform: uppercase; letter-spacing: .06em; padding: 4px 10px; border-radius: 4px; background: var(--tint); color: var(--muted); }
.verdict-tag:empty { display: none; }
.verdict-tag.v-fits { background: var(--ok-bg); color: var(--ok); } .verdict-tag.v-trim { background: var(--tight-bg); color: var(--tight); } .verdict-tag.v-check { background: var(--over-bg); color: var(--over); }
.weighgrid { display: grid; grid-template-columns: minmax(0, 430px) minmax(0, 1fr); gap: 22px; align-items: start; margin-top: 8px; }
.tapebox { padding: 10px 0 14px; }
.tape { position: relative; background: var(--tape-bg); color: var(--tape-ink); font: .8rem/1.5 var(--mono); padding: 16px 16px 14px; margin: 10px auto; max-width: 430px; box-shadow: 0 8px 22px rgba(12,17,28,.16); }
.tape::before, .tape::after { content: ""; position: absolute; left: 0; right: 0; height: 12px;
  background: linear-gradient(45deg, transparent 33.33%, var(--tape-bg) 33.33%, var(--tape-bg) 66.66%, transparent 66.66%), linear-gradient(-45deg, transparent 33.33%, var(--tape-bg) 33.33%, var(--tape-bg) 66.66%, transparent 66.66%);
  background-size: 12px 24px; }
.tape::before { bottom: 100%; background-position: 0 12px; }
.tape::after { top: 100%; background-position: 0 -12px; }
.tape.empty { color: var(--tape-muted); text-align: center; padding: 30px 16px; }
.thead { text-align: center; display: grid; gap: 1px; padding-bottom: 8px; border-bottom: 1px dashed var(--tape-line); }
.tbrand { font-size: 1rem; letter-spacing: .22em; }
.treprint { color: #b7360f; font-weight: 700; letter-spacing: .08em; }
.tcols, .trow, .tsub { display: grid; grid-template-columns: minmax(0, 1fr) 4.6em 3.8em; gap: 6px; align-items: baseline; }
.tcols { color: var(--tape-muted); font-size: .7rem; padding: 6px 0 2px; } .tcols span:not(:first-child) { text-align: right; }
.tsec { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; padding-bottom: 2px; border-bottom: 1px dotted var(--tape-line); font-size: .74rem; color: var(--tape-muted); }
.tsec b { color: var(--tape-ink); letter-spacing: .08em; }
.trow { padding: 1px 0; }
.tnm { min-width: 0; overflow-wrap: anywhere; }
.tw, .trun { text-align: right; font-variant-numeric: tabular-nums; }
.trun { color: var(--tape-muted); }
.trow.tare .tnm { color: var(--tape-muted); font-style: italic; }
.trow.over .tnm, .trow.over .tw, .trow.over .trun { color: #c0281f; }
.trow.struck .tnm { text-decoration: line-through; text-decoration-thickness: 1.5px; color: var(--tape-muted); }
.trow.struck .tw { color: #0f7a4f; }
.trow.worn { color: var(--tape-muted); } .trow.worn.added { color: #0f7a4f; }
.tnote { display: inline-block; font-style: normal; font-size: .68rem; color: var(--tape-muted); margin-left: 6px; }
.tstamp { display: inline-block; font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; border: 1.5px solid currentColor; border-radius: 3px; padding: 0 4px; margin-left: 6px; transform: rotate(-4deg); text-decoration: none; }
.st-wear { color: #1d5fc4; } .st-cut { color: #c0281f; } .st-swap { color: #0f7a7a; } .st-move { color: #6b4fc8; } .st-check { color: #9a5b00; } .st-ship { color: #b02a63; }
.tear { position: relative; margin: 7px -16px; border-top: 2px dashed #c0281f; text-align: center; height: 0; }
.tear span { position: relative; top: -.78em; background: var(--tape-bg); color: #c0281f; font-weight: 700; font-size: .7rem; letter-spacing: .14em; padding: 0 8px; }
.tsub { border-top: 1px dotted var(--tape-line); margin-top: 2px; padding-top: 2px; color: var(--tape-muted); }
.tsub span:last-child { grid-column: 2 / 4; text-align: right; color: var(--tape-ink); font-weight: 700; }
.ttot { margin-top: 12px; border-top: 3px double var(--tape-ink); padding-top: 6px; display: grid; gap: 3px; }
.tline { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 10px; font-size: .76rem; }
.tline b { grid-column: 1 / -1; font-size: 1.15rem; letter-spacing: .06em; }
.tline.is-over b { color: #c0281f; } .tline.is-ok b { color: #0f7a4f; } .tline.is-tight b { color: #9a5b00; }
.tline.was { color: var(--tape-muted); border-top: 1px dashed var(--tape-line); padding-top: 4px; margin-top: 4px; } .tline.was b { font-size: .9rem; color: #0f7a4f; }
.tfoot { margin-top: 10px; text-align: center; font-size: .68rem; color: var(--tape-muted); border-top: 1px dashed var(--tape-line); padding-top: 8px; }
.trow.flash { animation: flash 1.4s ease-out; }
@keyframes flash { 0%, 40% { background: #ffe08a; } 100% { background: transparent; } }

/* bars */
.barsbox { display: grid; gap: 14px; }
.bbar { display: grid; gap: 5px; }
.bb-h { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: .9rem; }
.bb-track { position: relative; height: 24px; background: var(--tint); border-radius: 6px; display: flex; border: 1px solid var(--line); }
.seg { height: 100%; } .seg:first-child { border-radius: 5px 0 0 5px; }
.k-bag { background: var(--k-bag); } .k-clothes { background: var(--k-clothes); } .k-outer { background: var(--k-outer); } .k-shoes { background: var(--k-shoes); }
.k-toiletries { background: var(--k-toiletries); } .k-tech { background: var(--k-tech); } .k-gifts { background: var(--k-gifts); } .k-other { background: var(--k-other); }
.bb-ghost { position: absolute; left: -1px; top: -4px; bottom: -4px; border: 1.5px dashed var(--muted); border-radius: 6px; pointer-events: none; }
.bb-limit { position: absolute; top: -7px; bottom: -7px; width: 3px; margin-left: -1px; background: var(--ink); border-radius: 2px; }
.bb-limit.crossed { background: var(--over); }
.bb-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .8rem; color: var(--muted); }
.lg { display: inline-flex; align-items: center; gap: 5px; } .sw { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.flags h3 { margin-top: 18px; }
.readflags { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: .88rem; }
.readflags li { padding: 7px 10px; border-radius: 8px; background: var(--tint); }
.readflags .lv { font: 700 .66rem var(--mono); text-transform: uppercase; letter-spacing: .08em; padding: 1px 6px; border-radius: 3px; margin-right: 4px; background: var(--line); color: var(--ink); }
.readflags .lv-fix { background: var(--over-bg); } .readflags .lv-fix .lv { background: var(--over); color: #fff; }
.readflags li.ok { background: var(--ok-bg); } .readflags li.none { color: var(--muted); }
.rules { margin-top: 14px; font-size: .86rem; color: var(--muted); } .rules summary { cursor: pointer; font-weight: 600; color: var(--ink); } .rules ul { padding-left: 18px; }

/* ask, progress, result */
.gate { margin: 8px 0; padding: 8px 12px; background: var(--tint); border-radius: 8px; font-size: .9rem; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.runrow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.ptitle { font-weight: 700; margin: 0 0 6px; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 3px; font-size: .9rem; }
.step { color: var(--muted); } .step.done { color: var(--ok); } .step.active { color: var(--ink); font-weight: 600; }
.step-ic { font-family: var(--mono); display: inline-block; width: 1.2em; }
.raw { white-space: pre-wrap; overflow-x: auto; max-height: 380px; font-size: .8rem; background: var(--tint); padding: 10px; border-radius: 6px; }
.rhead { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rhead h2 { margin: 0; }
.stamp { font: 700 .82rem var(--mono); text-transform: uppercase; letter-spacing: .1em; border: 2px solid currentColor; padding: 3px 10px; border-radius: 4px; transform: rotate(-2deg); color: var(--muted); }
.stamp.v-fits { color: var(--ok); } .stamp.v-trim { color: var(--tight); } .stamp.v-check { color: var(--over); }
.summary { font-size: 1.02rem; }
.moves { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.mv { border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: 8px; padding: 8px 12px; background: var(--surface); }
.mv p { margin: 4px 0 0; font-size: .92rem; }
.mv.skipped { opacity: .7; border-style: dashed; }
.mv-h { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.astamp { font: 700 .68rem var(--mono); text-transform: uppercase; letter-spacing: .08em; padding: 2px 7px; border-radius: 3px; color: #fff; background: var(--muted); }
.a-wear { border-left-color: #1d5fc4; } .astamp.a-wear { background: #1d5fc4; }
.a-cut { border-left-color: var(--over); } .astamp.a-cut { background: var(--over); }
.a-swap { border-left-color: #0f8a8a; } .astamp.a-swap { background: #0f8a8a; }
.a-move { border-left-color: #6b4fc8; } .astamp.a-move { background: #6b4fc8; }
.a-check { border-left-color: #a8650a; } .astamp.a-check { background: #a8650a; }
.a-ship { border-left-color: #b02a63; } .astamp.a-ship { background: #b02a63; }
.cite { font: 600 .95rem var(--sans); background: none; border: none; padding: 0; color: var(--ink); cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
.save { color: var(--ok); font-size: .86rem; font-weight: 700; margin-left: auto; }
.said { font-family: var(--mono); font-size: .8rem !important; color: var(--muted); } .said.unq { color: var(--tight); }
.swapline { color: #0f8a8a; }
.twocol { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.rewear, .lines-plain { padding-left: 18px; margin: 0; font-size: .93rem; }
.rewear li, .lines-plain li { margin: 3px 0; }
.checklist { padding-left: 18px; margin: 0; font-size: .93rem; } .checklist li { margin: 3px 0; } .checklist label { cursor: pointer; }
.none { color: var(--muted); list-style: none; }
.recon h3 { margin-top: 18px; }

/* exports, history, footer */
.tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
.hist { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; }
.hrow { display: flex; gap: 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; flex-wrap: wrap; }
.hinfo { display: grid; flex: 1; min-width: 180px; }
.foot { max-width: 1180px; margin: 0 auto; padding: 10px 16px 40px; font-size: .84rem; color: var(--muted); }
.toasts { position: fixed; bottom: 16px; right: 16px; left: 16px; display: grid; gap: 6px; justify-items: end; z-index: 20; pointer-events: none; }
.toast { pointer-events: auto; background: var(--board); color: var(--board-ink); padding: 8px 12px; border-radius: 8px; font-size: .9rem; max-width: 420px; transition: opacity .5s; border-left: 3px solid var(--flap); }
.toast.err { background: var(--over); color: #fff; border-left-color: #fff; } .toast a { color: inherit; } .toast.gone { opacity: 0; }

/* docs pages */
.doc { max-width: 900px; margin: 0 auto; padding: 24px 16px 48px; }
.doc h1 { font-size: 2rem; }
.doc h2 { font-size: 1.35rem; margin-top: 32px; display: block; }
.doc h3 { font-size: 1.05rem; margin-top: 22px; display: block; }
.doc pre { background: var(--tint); border: 1px solid var(--line); border-radius: 8px; padding: 12px; overflow-x: auto; font: .8rem/1.45 var(--mono); max-width: 100%; }
.doc pre code { background: none; border: none; padding: 0; white-space: pre; }
.doc table { border-collapse: collapse; width: 100%; font-size: .9rem; display: block; overflow-x: auto; }
.doc th, .doc td { text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc td code { white-space: normal; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin: 12px 0 0; }
.tab { font: inherit; font-size: .8rem; padding: 4px 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 6px 6px 0 0; cursor: pointer; }
.tab.active { background: var(--board); color: var(--flap); border-color: var(--board); }
.codegroup pre { margin-top: 0; border-top-left-radius: 0; }
.statebox { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; background: var(--surface); }
.statebox p { margin: 4px 0 0; }
.tokenrow { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.tokenbox { font: .85rem var(--mono); background: var(--tint); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; word-break: break-all; width: 100%; }

@media (max-width: 900px) {
  .two, .weighgrid, .twocol { grid-template-columns: minmax(0, 1fr); }
  .tape { max-width: 100%; }
}
@media (max-width: 480px) {
  .grid2 { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 12px; }
  .tape { padding: 14px 10px 12px; font-size: .74rem; }
  .tear { margin: 7px -10px; }
  .tcols, .trow, .tsub { grid-template-columns: minmax(0, 1fr) 4.2em 3.4em; gap: 4px; }
  .bar { gap: 8px; } .brand { font-size: 1rem; }
  .save { margin-left: 0; }
  .toasts { bottom: 10px; right: 10px; left: 10px; }
  .toast { font-size: .8rem; padding: 6px 10px; }
  .toast:not(:last-child) { display: none; }
}
