/* Do Not Dig Here - limestone page, granite marker, rust-ochre ink. Light and dark share one set of tokens. */
:root {
  --bg: #ebe6dd; --panel: #f7f3ec; --ink: #24211d; --muted: #5f584e; --line: #d2c9bb; --accent: #8f4210; --accent-ink: #ffffff;
  --tape-a: #d9a514; --tape-b: #2a2622; --chip: #efe8dc;
  --stone-1: #b5b0a6; --stone-2: #a39e94; --stone-3: #8e897f; --cut: #24211d; --cut-hi: rgba(255,255,255,.42); --worn: rgba(59,55,50,.16);
  --v-fresh-bg: #dfe7ef; --v-fresh: #22405e; --v-durable-bg: #dcebd9; --v-durable: #24502a; --v-patch-bg: #f5e6c4; --v-patch: #6b4a05; --v-recarve-bg: #f3d9d2; --v-recarve: #7d2616;
  --k-name: #f3d9d2; --k-date: #dfe7ef; --k-slang: #f5e6c4; --k-shout: #f1d3e6; --k-joke: #e4dcf3; --k-brand: #dcebd9; --k-ink: #2a2622;
  --warn: #7d2616; --ok: #24502a;
}
:root[data-theme="dark"] {
  --bg: #161513; --panel: #201e1b; --ink: #ece6dc; --muted: #ada497; --line: #3b3732; --accent: #e8955a; --accent-ink: #1b1209;
  --tape-a: #c99712; --tape-b: #0f0e0d; --chip: #2a2723;
  --stone-1: #57534d; --stone-2: #4a4641; --stone-3: #3c3935; --cut: #e7e1d6; --cut-hi: rgba(0,0,0,.55); --worn: rgba(231,225,214,.14);
  --v-fresh-bg: #1f3247; --v-fresh: #cfe2f7; --v-durable-bg: #1f3a23; --v-durable: #cdeccb; --v-patch-bg: #3f3110; --v-patch: #f6e0a4; --v-recarve-bg: #4a1f17; --v-recarve: #f8cfc4;
  --k-name: #4a1f17; --k-date: #1f3247; --k-slang: #3f3110; --k-shout: #43203a; --k-joke: #2f2647; --k-brand: #1f3a23; --k-ink: #f2ece2;
  --warn: #f8b4a3; --ok: #b9e6b6;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; overflow-x: hidden; }
a { color: var(--accent); }
.hidden { display: none !important; }
.small { font-size: .875rem; } .muted { color: var(--muted); } .mono { font-family: ui-monospace, Menlo, monospace; }
.tape { height: 8px; background: repeating-linear-gradient(135deg, var(--tape-a) 0 14px, var(--tape-b) 14px 28px); }
.bar { display: flex; align-items: center; gap: 12px; padding: 10px 20px; border-bottom: 1px solid var(--line); background: var(--panel); flex-wrap: wrap; }
.back { text-decoration: none; color: var(--muted); font-size: .9rem; white-space: nowrap; }
.brand { display: flex; align-items: center; gap: 8px; font-size: 1.05rem; margin-right: auto; white-space: nowrap; }
.logo { width: 28px; height: 28px; }
.lg-stone { fill: var(--stone-2); stroke: var(--cut); stroke-width: 1.5; }
.lg-cut { stroke: var(--cut); stroke-width: 2; stroke-linecap: round; fill: none; }
.lg-ground { stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; }
.session { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.pill { font: inherit; font-size: .875rem; border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 999px; padding: 6px 14px; cursor: pointer; text-decoration: none; display: inline-block; line-height: 1.3; }
.pill:hover:not(:disabled) { border-color: var(--accent); }
.pill.solid { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.pill.ghost { cursor: default; background: transparent; }
.pill.tiny { padding: 3px 10px; font-size: .8rem; }
.pill.big { padding: 10px 22px; font-size: 1rem; }
.pill:disabled { opacity: .5; cursor: not-allowed; }
main { max-width: 1080px; margin: 0 auto; padding: 8px 20px 40px; }
.hero { padding: 22px 0 10px; }
.kicker { font-size: .85rem; color: var(--muted); border-left: 3px solid var(--accent); padding-left: 10px; margin: 0 0 14px; max-width: 760px; }
h1 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(2rem, 6vw, 3.1rem); letter-spacing: .06em; text-transform: uppercase; margin: 0; line-height: 1.05; overflow-wrap: anywhere; }
.h1b { display: block; font-size: 1.05rem; letter-spacing: 0; text-transform: none; font-family: system-ui, sans-serif; color: var(--muted); font-weight: 500; margin-top: 8px; }
.lede { max-width: 720px; }
.samples { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip { font: inherit; font-size: .85rem; border: 1px dashed var(--line); background: var(--chip); color: var(--ink); border-radius: 6px; padding: 5px 12px; cursor: pointer; }
.chip.on { border-style: solid; border-color: var(--accent); box-shadow: inset 0 -3px 0 var(--accent); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; margin: 16px 0; min-width: 0; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.two-col .panel { margin: 0; }
.two-col { margin: 16px 0; }
.ph { font-size: 1.15rem; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ph .opt { font-weight: 400; font-size: .9rem; }
.step-no { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: var(--panel); font-size: .85rem; flex: none; }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.fgrid .wide { grid-column: 1 / -1; }
.lbl { display: block; font-size: .82rem; font-weight: 600; margin-bottom: 4px; }
input[type=text], textarea, select { width: 100%; font: inherit; font-size: .95rem; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 7px 9px; }
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus, .pill:focus-visible, .chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.note { background: var(--chip); border-left: 3px solid var(--tape-a); padding: 6px 10px; border-radius: 4px; }
.note.warn-note { border-left-color: var(--warn); color: var(--warn); font-weight: 600; }
.verdict-row { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0 4px; }
.verdict-row p { margin: 2px 0 0; }
.badge { display: inline-block; flex: none; font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 4px 10px; border-radius: 4px; background: var(--chip); color: var(--ink); border: 1px solid var(--line); white-space: nowrap; }
.v-fresh { background: var(--v-fresh-bg); color: var(--v-fresh); border-color: transparent; }
.v-durable { background: var(--v-durable-bg); color: var(--v-durable); border-color: transparent; }
.v-patch { background: var(--v-patch-bg); color: var(--v-patch); border-color: transparent; }
.v-recarve { background: var(--v-recarve-bg); color: var(--v-recarve); border-color: transparent; }
.mini-h { font-size: .95rem; margin: 14px 0 6px; }
.drift-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.drift-list li.none { color: var(--muted); font-size: .875rem; }
.dchip { display: inline-block; border-radius: 4px; padding: 2px 8px; font-size: .85rem; color: var(--k-ink); background: var(--chip); }
.k-name { background: var(--k-name); } .k-date { background: var(--k-date); } .k-slang { background: var(--k-slang); }
.k-shout { background: var(--k-shout); } .k-in-joke { background: var(--k-joke); } .k-brand { background: var(--k-brand); }
.dchip span { opacity: .85; }
/* The marker */
.mark-wrap { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.stele-box { display: flex; justify-content: center; padding: 6px 0 0; min-width: 0; }
.stele { position: relative; width: 100%; max-width: 440px; padding: 46px 30px 26px; border-radius: 50% 50% 6px 6px / 70px 70px 6px 6px; color: var(--cut);
  background: radial-gradient(circle at 20% 18%, rgba(255,255,255,.10) 0 2px, transparent 3px) 0 0 / 23px 19px,
    radial-gradient(circle at 70% 60%, rgba(0,0,0,.10) 0 1.5px, transparent 2.5px) 0 0 / 17px 29px,
    linear-gradient(170deg, var(--stone-1), var(--stone-2) 55%, var(--stone-3));
  background-color: var(--stone-2);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.18), inset 0 -10px 18px rgba(0,0,0,.18), 0 12px 0 -4px var(--line); text-align: center; }
.st-crown { position: absolute; top: 18px; left: 50%; width: 60px; margin-left: -30px; height: 3px; border-radius: 2px; background: var(--cut); opacity: .35; }
.st-foot { height: 4px; margin: 18px -30px -26px; background: var(--stone-3); border-radius: 0 0 6px 6px; }
.st-line { margin: 0 0 10px; font-family: Georgia, "Times New Roman", serif; text-shadow: 0 1px 0 var(--cut-hi); overflow-wrap: anywhere; }
.st-line.l1 { font-size: 1.32rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; line-height: 1.25; }
.st-line.l2 { font-size: 1rem; }
.st-line.l3 { font-size: .9rem; margin-bottom: 4px; text-align: left; }
.st-line.l4, .st-line.draft { font-size: .82rem; text-align: left; line-height: 1.45; }
.st-line.draft { font-size: .95rem; text-align: center; }
.st-lab { font-family: system-ui, sans-serif; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; opacity: .75; margin-right: 6px; }
.w { transition: opacity .5s, filter .5s; }
.w.worn { opacity: .14; filter: blur(1.4px); text-shadow: none; }
.st-pics { display: flex; justify-content: center; gap: 10px; margin: 4px 0 14px; flex-wrap: wrap; }
.picto { width: 46px; height: 46px; flex: none; }
.picto .ps { fill: none; stroke: var(--cut); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.picto .ps.pf { fill: var(--cut); }
.picto.small { width: 30px; height: 30px; }
.picto-key .picto .ps, .picto-list .picto .ps { stroke: var(--ink); }
.picto-key .picto .ps.pf, .picto-list .picto .ps.pf { fill: var(--ink); }
.mark-side input[type=range] { width: 100%; accent-color: var(--accent); }
.ticks { display: flex; justify-content: space-between; margin-top: -2px; }
.picto-key { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.picto-key li { display: flex; gap: 8px; align-items: center; font-size: .85rem; }
.key-line { margin: 14px 0 0; }
/* Run */
.runrow { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.gate { background: var(--v-patch-bg); color: var(--v-patch); padding: 8px 12px; border-radius: 6px; }
.gate .pill { margin-left: 6px; }
.steps { list-style: none; padding: 0; margin: 0 0 8px; }
.step { padding: 3px 0; color: var(--muted); } .step.done { color: var(--ok); } .step.active { color: var(--ink); font-weight: 600; }
.step-ic { display: inline-block; width: 1.2em; font-family: ui-monospace, monospace; }
.raw { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .8rem; max-height: 320px; overflow: auto; background: var(--bg); padding: 10px; border-radius: 6px; }
/* Result */
.result h2 { font-family: Georgia, serif; margin: 2px 0 6px; overflow-wrap: anywhere; }
.res-kick { margin: 0; text-transform: uppercase; letter-spacing: .1em; }
.result h3 { font-size: 1rem; margin: 22px 0 8px; }
.levels { list-style: none; padding: 0; margin: 14px 0 0; border-top: 1px solid var(--line); }
.lv { display: grid; grid-template-columns: 44px 1fr; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.lv-no { font-family: Georgia, serif; font-weight: 700; font-size: 1.2rem; color: var(--accent); text-align: center; }
.lv-h { margin: 0 0 2px; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.lv-t { margin: 0; overflow-wrap: anywhere; }
.big-cut { font-family: Georgia, serif; font-size: 1.25rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.facts { display: grid; grid-template-columns: 70px 1fr; gap: 4px 10px; margin: 0; }
.facts dt { font-size: .8rem; font-weight: 700; color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.none { color: var(--muted); font-style: italic; }
.picto-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.pcard { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
.pcard b, .pcard span { display: block; } .pcard p { margin: 4px 0 0; }
.tbl-wrap { overflow-x: auto; }
.drift-tbl { width: 100%; border-collapse: collapse; font-size: .9rem; }
.drift-tbl th, .drift-tbl td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.drift-tbl th { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.tag-note { border: 1px solid var(--line); border-left: 4px solid var(--v-durable); border-radius: 6px; padding: 10px 14px; background: var(--bg); }
.tag-note.far { border-left-color: var(--accent); }
.tag-note h4 { margin: 0 0 4px; font-size: .85rem; } .tag-note p { margin: 0; }
.recon { margin: 0; padding-left: 20px; } .recon li.warn { color: var(--warn); }
.exports, .cardrow { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
/* History */
.saved { list-style: none; padding: 0; margin: 12px 0 0; }
.hrow { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.hrow.none { color: var(--muted); }
.mini-stone { width: 18px; height: 24px; border-radius: 9px 9px 2px 2px; flex: none; background: var(--stone-2); border: 2px solid var(--line); }
.mini-stone.v-fresh { border-color: var(--v-fresh); } .mini-stone.v-durable { border-color: var(--v-durable); } .mini-stone.v-patch { border-color: var(--v-patch); } .mini-stone.v-recarve { border-color: var(--v-recarve); }
.hinfo { flex: 1; min-width: 0; } .hinfo b, .hinfo span { display: block; overflow-wrap: anywhere; }
.hbtns { display: flex; gap: 6px; }
.foot { max-width: 1080px; margin: 0 auto; padding: 18px 20px 40px; font-size: .85rem; color: var(--muted); border-top: 1px solid var(--line); }
.toasts { position: fixed; bottom: 16px; right: 16px; left: 16px; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; pointer-events: none; z-index: 20; }
.toast { pointer-events: auto; max-width: 420px; background: var(--ink); color: var(--panel); padding: 10px 14px; border-radius: 8px; font-size: .875rem; transition: opacity .5s; }
.toast.err { background: var(--v-recarve-bg); color: var(--v-recarve); border: 1px solid var(--v-recarve); }
.toast a { color: inherit; font-weight: 700; } .toast.gone { opacity: 0; }
@media (max-width: 820px) { .two-col, .mark-wrap, .pair { grid-template-columns: 1fr; } }
@media (max-width: 520px) {
  main { padding: 4px 16px 32px; } .bar { padding: 8px 16px; gap: 8px; } .back-t { display: none; }
  .brand { font-size: .95rem; } .panel { padding: 14px; } .fgrid { grid-template-columns: 1fr 1fr; }
  .stele { padding: 40px 18px 22px; } .st-foot { margin: 16px -18px -22px; } .st-line.l1 { font-size: 1.12rem; }
  .lv { grid-template-columns: 30px 1fr; } .hrow { flex-wrap: wrap; } .hbtns { width: 100%; }
}
@media print {
  body.print-marker .bar, body.print-marker .tape, body.print-marker .foot, body.print-marker .toasts, body.print-marker main > *:not(.markbox) { display: none !important; }
  body.print-marker .markbox .mark-side, body.print-marker .key-line, body.print-marker .markbox .ph { display: none !important; }
  body.print-marker .mark-wrap { grid-template-columns: 1fr; } body.print-marker .panel { border: 0; }
}
