/* Carbonle — Neo-brutalist theme. Thick borders, hard offset shadows, chunky type,
   green/yellow accents. Light (paper) is the base; dark is an override. Zero external fonts. */
:root {
  --bg: #f4f1e8; --panel: #ffffff; --ink: #15140f; --line: #15140f; --dim: #6b6657;
  --green: #16a34a; --green-ink: #ffffff; --yellow: #facc15;
  --far: #e7e2d6; --far-ink: #15140f; --close-ink: #15140f;
  --sh: #15140f;                 /* hard shadow colour */
  --accent: #16a34a; --accent-ink: #ffffff;
  --maxw: 460px; --bw: 3px; --rad: 7px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #16150f; --panel: #211f17; --ink: #f5f1e6; --line: #f5f1e6; --dim: #9a9486;
    --green: #2bd46e; --green-ink: #08210f; --yellow: #f5cf3a;
    --far: #2c2a20; --far-ink: #f5f1e6; --close-ink: #08210f;
    --sh: #2bd46e; --accent: #2bd46e; --accent-ink: #08210f;
  }
}
:root[data-theme="dark"] {
  --bg: #16150f; --panel: #211f17; --ink: #f5f1e6; --line: #f5f1e6; --dim: #9a9486;
  --green: #2bd46e; --green-ink: #08210f; --yellow: #f5cf3a;
  --far: #2c2a20; --far-ink: #f5f1e6; --close-ink: #08210f;
  --sh: #2bd46e; --accent: #2bd46e; --accent-ink: #08210f;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); min-height: 100vh;
  font: 16px/1.45 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
.wrap { max-width: var(--maxw); margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 52px max(16px, env(safe-area-inset-left)); }
a { color: var(--ink); }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* header */
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border-bottom: var(--bw) solid var(--line); padding: 4px 0 14px; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand .leaf { width: 40px; height: 40px; border-radius: 6px; display: grid; place-items: center; font-size: 20px;
  background: var(--green); border: var(--bw) solid var(--line); box-shadow: 3px 3px 0 var(--sh); flex: 0 0 auto; }
.brand-text { min-width: 0; }
.brand-name { font-size: 26px; font-weight: 900; letter-spacing: -.5px; text-transform: uppercase; display: block; line-height: 1; }
.brand-text small { display: block; color: var(--dim); font-weight: 700; font-size: 10.5px; text-transform: uppercase; letter-spacing: 1px; margin-top: 3px; }
.hdr-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex: 0 0 auto; }
.hdr-meta { color: var(--ink); font-size: 12px; font-weight: 800; text-align: right; line-height: 1.15; font-variant-numeric: tabular-nums; }
.hdr-actions { display: flex; gap: 8px; }
.icon-btn { width: 40px; height: 40px; border-radius: 6px; background: var(--panel); border: var(--bw) solid var(--line);
  color: var(--ink); font-size: 17px; cursor: pointer; display: grid; place-items: center; box-shadow: 3px 3px 0 var(--sh); }
.icon-btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--sh); }

/* game */
.theme-line { display: inline-block; background: var(--yellow); color: #15140f; border: var(--bw) solid var(--line);
  box-shadow: 3px 3px 0 var(--sh); border-radius: 6px; padding: 5px 12px; font-weight: 900; font-size: 12px;
  text-transform: uppercase; letter-spacing: .3px; margin: 20px 0 10px; }
.replay-banner { background: var(--panel); border: var(--bw) solid var(--line); box-shadow: 4px 4px 0 var(--sh);
  border-radius: 6px; padding: 10px 13px; font-size: 13px; font-weight: 700; margin-top: 14px; }
.sub { color: var(--dim); font-size: 13px; font-weight: 600; margin: 0 0 16px; }
.attempts { display: flex; gap: 6px; margin-bottom: 16px; }
.attempts .dot { flex: 1; height: 8px; border-radius: 3px; background: var(--panel); border: 2px solid var(--line); }
.attempts .dot.used { background: var(--yellow); }
.attempts .dot.now { background: var(--green); }

.board { list-style: none; margin: 0; padding: 0; }
.row { display: flex; align-items: center; gap: 12px; background: var(--panel);
  border: var(--bw) solid var(--line); border-radius: var(--rad); padding: 14px 14px; margin-bottom: 13px;
  box-shadow: 5px 5px 0 var(--sh); outline: none; }
#board .row { touch-action: none; user-select: none; cursor: grab; }
#board .row:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
#board .row.dragging { cursor: grabbing; transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--sh); z-index: 5; position: relative; }
.board .row.revealed a { display: block; }
.row .handle { color: var(--dim); font-size: 18px; letter-spacing: -3px; width: 16px; text-align: center; }
.row .ico { width: 34px; height: 34px; border-radius: 6px; background: var(--bg); border: 2px solid var(--line);
  display: grid; place-items: center; font-size: 19px; flex: 0 0 auto; }
.row .name { font-weight: 800; flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: -.2px; }
.row .name span { display: block; color: var(--dim); font-weight: 600; font-size: 12px; margin-top: 3px; text-transform: none; letter-spacing: 0; }
.row .pos { width: 24px; text-align: center; font-weight: 900; font-size: 17px; font-variant-numeric: tabular-nums; }
.row .val { font-variant-numeric: tabular-nums; font-weight: 900; font-size: 17px; text-align: right; min-width: 92px; }
.row .val small { display: block; color: var(--dim); font-weight: 700; font-size: 10px; text-transform: uppercase; letter-spacing: .5px; }
.row .fb { width: 34px; height: 34px; border-radius: 6px; border: 2px solid var(--line); display: grid; place-items: center;
  font-weight: 900; font-size: 17px; flex: 0 0 auto; }
.fb-correct .fb { background: var(--green); color: var(--green-ink); }
.fb-close .fb { background: var(--yellow); color: var(--close-ink); }
.fb-far .fb { background: var(--far); color: var(--far-ink); }
.row.fb-correct { box-shadow: 5px 5px 0 var(--green); }
.row.fb-close { box-shadow: 5px 5px 0 var(--yellow); }

.legend { display: flex; gap: 14px; flex-wrap: wrap; margin: 4px 0; color: var(--dim); font-size: 12px; font-weight: 700; }
.legend .chip { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 14px; height: 14px; border-radius: 3px; border: 2px solid var(--line); display: inline-block; }
.sw-correct { background: var(--green); } .sw-close { background: var(--yellow); } .sw-far { background: var(--far); }

.btn { display: block; width: 100%; margin-top: 16px; background: var(--ink); color: var(--yellow);
  border: var(--bw) solid var(--line); border-radius: var(--rad); padding: 16px; font-weight: 900; font-size: 16px;
  text-transform: uppercase; letter-spacing: .5px; cursor: pointer; box-shadow: 6px 6px 0 var(--green); }
.btn:active { transform: translate(3px, 3px); box-shadow: 3px 3px 0 var(--green); }
.btn:disabled { opacity: .5; cursor: default; box-shadow: 6px 6px 0 var(--sh); }
.btn-inline { display: inline-block; width: auto; padding: 12px 18px; text-decoration: none; margin-top: 0; }
.btn.share { background: var(--green); color: var(--green-ink); box-shadow: 6px 6px 0 var(--sh); }

.message { margin-top: 16px; font-weight: 900; text-align: center; min-height: 1.2em; text-transform: uppercase; }
.message.win { color: var(--green); }
.message.lose { color: #d8552e; }

.reveal { margin-top: 20px; border-top: var(--bw) solid var(--line); padding-top: 18px; }
.reveal h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .8px; margin: 0 0 14px; font-weight: 900; }
.reveal-list .row { cursor: default; touch-action: auto; }

.toast { position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: var(--bg); border: var(--bw) solid var(--line); padding: 12px 18px; font-weight: 800;
  border-radius: 6px; box-shadow: 4px 4px 0 var(--green); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* content pages (SEO) */
.article { line-height: 1.65; }
.article h1 { font-size: 30px; line-height: 1.05; font-weight: 900; text-transform: uppercase; letter-spacing: -.5px; margin: 6px 0 12px; }
.article h2 { font-size: 14px; text-transform: uppercase; letter-spacing: .6px; font-weight: 900; margin: 22px 0 10px; }
.article p { font-weight: 500; }
.article .big { display: inline-block; font-size: 22px; font-weight: 900; background: var(--yellow); color: #15140f;
  border: var(--bw) solid var(--line); box-shadow: 4px 4px 0 var(--sh); border-radius: 6px; padding: 6px 14px; margin-bottom: 8px; }
.crumbs { color: var(--dim); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; margin: 4px 0 10px; }
.crumbs a { color: var(--dim); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.article .src { color: var(--dim); font-size: 12.5px; font-weight: 600; border-top: var(--bw) solid var(--line); margin-top: 24px; padding-top: 14px; }
.related { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.related a { background: var(--panel); border: var(--bw) solid var(--line); box-shadow: 3px 3px 0 var(--sh); border-radius: 6px;
  padding: 8px 13px; text-decoration: none; font-size: 13px; font-weight: 800; color: var(--ink); }
.related a:active { transform: translate(2px,2px); box-shadow: 1px 1px 0 var(--sh); }

/* shareable shock card (footprint pages) */
.share-card { margin: 16px 0 12px; background: var(--panel); border: var(--bw) solid var(--line);
  box-shadow: 7px 7px 0 var(--sh); border-radius: 12px; padding: 18px 18px 16px; }
.share-card[data-band="high"] { box-shadow: 7px 7px 0 #d8552e; }
.share-card[data-band="low"] { box-shadow: 7px 7px 0 var(--green); }
.sc-head { display: flex; align-items: center; justify-content: space-between; }
.sc-brand { display: flex; align-items: center; gap: 7px; font-weight: 900; text-transform: uppercase; letter-spacing: -.3px; font-size: 17px; }
.sc-leaf { width: 26px; height: 26px; border-radius: 6px; background: var(--green); border: 2px solid var(--line); display: grid; place-items: center; font-size: 14px; }
.sc-rank { font-weight: 900; font-size: 12px; background: var(--yellow); color: #15140f; border: 2px solid var(--line);
  border-radius: 999px; padding: 4px 11px; font-variant-numeric: tabular-nums; }
.sc-row { display: flex; align-items: center; gap: 16px; margin: 16px 0 8px; }
.sc-ico { width: 72px; height: 72px; border-radius: 12px; background: var(--bg); border: var(--bw) solid var(--line);
  display: grid; place-items: center; font-size: 44px; flex: 0 0 auto; }
.sc-id { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sc-kick { color: var(--dim); font-weight: 800; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }
.sc-name { font-weight: 900; font-size: 30px; text-transform: uppercase; letter-spacing: -.6px; line-height: 1; }
.sc-num { display: inline-block; font-size: 46px; font-weight: 900; font-variant-numeric: tabular-nums; line-height: 1;
  background: var(--yellow); color: #15140f; border: var(--bw) solid var(--line); box-shadow: 4px 4px 0 var(--sh);
  border-radius: 10px; padding: 8px 16px; margin: 10px 0 4px; }
.sc-num .sc-unit { font-size: 16px; font-weight: 800; margin-left: 6px; }
.sc-shock { font-weight: 900; font-size: 18px; text-transform: uppercase; letter-spacing: -.2px; margin-top: 12px; }
.sc-foot { color: var(--dim); font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; margin-top: 10px; }

/* comparison pages */
.vs { display: flex; align-items: stretch; gap: 12px; margin: 16px 0 10px; }
.vs-item { flex: 1; background: var(--panel); border: var(--bw) solid var(--line); box-shadow: 5px 5px 0 var(--sh);
  border-radius: var(--rad); padding: 16px 10px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.vs-item .ico { width: 52px; height: 52px; border-radius: 6px; background: var(--bg); border: 2px solid var(--line);
  display: grid; place-items: center; font-size: 30px; }
.vs-item .vs-name { font-weight: 900; text-transform: uppercase; font-size: 15px; }
.vs-item .vs-val { font-size: 26px; font-weight: 900; font-variant-numeric: tabular-nums; }
.vs-item .vs-val small { display: block; font-size: 10px; color: var(--dim); font-weight: 700; text-transform: uppercase; }
.vs-sep { align-self: center; font-weight: 900; font-size: 16px; }
.compare-list .name a { display: block; padding: 2px 0; font-weight: 700; }

/* footer */
.site-footer { margin-top: 30px; border-top: var(--bw) solid var(--line); padding-top: 16px;
  display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .2px; }
.site-footer a { color: var(--dim); text-decoration: none; }
.site-footer a:hover { color: var(--ink); }

/* modal */
.overlay { position: fixed; inset: 0; background: rgba(21,20,15,.6); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal-card { position: relative; width: 100%; max-width: 430px; max-height: 90vh; overflow: auto;
  background: var(--bg); border: var(--bw) solid var(--line); box-shadow: 8px 8px 0 var(--green); border-radius: 8px; padding: 24px 20px; }
.modal-card h2 { margin: 0 0 14px; font-size: 22px; font-weight: 900; text-transform: uppercase; }
.modal-card h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .6px; margin: 18px 0 8px; font-weight: 900; }
.modal-card p { color: var(--ink); font-weight: 500; }
.modal-close { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; background: var(--panel);
  border: var(--bw) solid var(--line); box-shadow: 2px 2px 0 var(--sh); border-radius: 6px; color: var(--ink);
  font-size: 20px; font-weight: 900; line-height: 1; cursor: pointer; }
.stat-grid { display: flex; gap: 8px; text-align: center; margin: 6px 0 4px; }
.stat-grid > div { flex: 1; background: var(--panel); border: 2px solid var(--line); border-radius: 6px; padding: 8px 4px; }
.stat-grid b { display: block; font-size: 26px; font-weight: 900; font-variant-numeric: tabular-nums; }
.stat-grid small { color: var(--dim); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.dist-row { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
.dist-row .k { width: 14px; font-weight: 900; font-variant-numeric: tabular-nums; }
.dist-bar { background: var(--far); color: var(--far-ink); height: 26px; border: 2px solid var(--line); border-radius: 5px;
  display: flex; align-items: center; justify-content: flex-end; padding: 0 8px; font-weight: 900; font-variant-numeric: tabular-nums; }
.dist-bar.hl { background: var(--green); color: var(--green-ink); }
.countdown { text-align: center; margin-top: 18px; border-top: var(--bw) solid var(--line); padding-top: 14px; }
.countdown small { color: var(--dim); display: block; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.countdown .t { font-size: 30px; font-weight: 900; font-variant-numeric: tabular-nums; }

@media (max-width: 420px) {
  .brand .leaf { width: 36px; height: 36px; font-size: 18px; }
  .brand-name { font-size: 22px; }
  .brand-text small { display: none; }
  .icon-btn { width: 38px; height: 38px; }
  .article h1 { font-size: 25px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
