:root {
  --tone-base: #ffffff;
  --tone-panel: #f5f7fa;
  --tone-raise: #ffffff;
  --tone-well: #ffffff;
  --tone-edge: rgba(0, 0, 0, 0.08);
  --tone-text: #1d1d1f;
  --tone-muted: #6e6e73;
  --hue-cyan: #5b98ff;
  --hue-lime: #34495e;
  --hue-alert: #d93036;
  --face-ui: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --face-data: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, Menlo, monospace;
  --curve: 10px;
}

*, *::before, *::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body { margin: 0; color: var(--tone-text); font: 14.5px/1.5 var(--face-ui); }

.shell { max-width: 1240px; margin: 0 auto; padding: 0 32px 48px; }

.masthead { padding: 48px 0 24px; }

.masthead h1 { margin: 0; }

.cc-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.cc-ico { width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.cc-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 26px; align-items: start; }

.cc-form { display: grid; min-width: 0; }

.cc-panel { display: grid; gap: 20px; min-width: 0; margin: 0; padding: 0; border: 0; }

.cc-panel > .skw-lbl { margin-bottom: -12px; }

.cc-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

.cc-line select { flex: 1 1 180px; width: auto; min-width: 0; }

.skw textarea.cc-data {
  display: block;
  height: 210px;
  min-height: 120px;
  font: 12.5px/1.55 var(--face-data);
  white-space: pre;
  overflow: auto;
  tab-size: 12;
}

.cc-drop { position: relative; display: grid; gap: 8px; }

.dropping .cc-data { background: rgba(91, 141, 239, 0.08); box-shadow: 0 0 0 1.5px var(--sk-accent, #5b8def); }

.cc-hint { margin: 0; padding-left: 3px; font-size: 13px; color: var(--sk-muted, #6e6e73); }

.cc-hint.is-bad { color: #d93036; }

.cc-sheet-wrap { max-height: 250px; overflow: auto; border-radius: 12px; background: rgba(118, 118, 128, 0.07); }

.cc-sheet-wrap:focus-visible { outline: 2px solid var(--sk-accent, #5b8def); outline-offset: 2px; }

.sheet { width: 100%; border-collapse: collapse; font-size: 12.5px; line-height: 1.4; font-variant-numeric: tabular-nums; }

.sheet th, .sheet td { max-width: 170px; padding: 7px 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; border-bottom: 1px solid rgba(0, 0, 0, 0.06); }

.sheet th { position: sticky; top: 0; background: #f1f3f6; font-weight: 600; color: var(--sk-ink, #1d1d1f); }

.sheet th small { margin-left: 6px; padding: 1px 6px; border-radius: 999px; background: rgba(91, 141, 239, 0.14); font-size: 11px; font-weight: 600; color: #3a66c4; }

.sheet th small.plain { background: rgba(118, 118, 128, 0.14); color: var(--sk-muted, #6e6e73); }

.sheet td { color: #3a3a3c; }

.sheet .num { text-align: right; }

.sheet tr:last-child td { border-bottom: 0; }

.cc-picks { gap: 12px; }

.cc-picks label { position: relative; }

.cc-picks .skw-thumb { display: grid; place-items: center; width: 84px; height: 58px; }

.cc-picks .skw-thumb svg { width: 56px; height: 36px; }

.cc-picks input:focus-visible ~ .skw-thumb { outline: 2px solid var(--sk-accent, #5b8def); outline-offset: 3px; }

.cc-t-a { fill: #8e99a6; }

.cc-t-b { fill: #c7ced6; }

.cc-t-l { fill: none; stroke: #8e99a6; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

.cc-picks input:checked ~ .skw-thumb .cc-t-a { fill: var(--sk-accent, #5b8def); }

.cc-picks input:checked ~ .skw-thumb .cc-t-l { stroke: var(--sk-accent, #5b8def); }

.cc-chips { display: flex; flex-wrap: wrap; gap: 8px; min-height: 34px; font-size: 13.5px; color: var(--sk-muted, #6e6e73); }

.cc-chip { position: relative; display: inline-flex; margin: 0; cursor: pointer; }

.cc-chip input { position: absolute; opacity: 0; pointer-events: none; }
main .cc-chip input[type=checkbox]:not(.skw-sw) { position: absolute; width: 1px; height: 1px; margin: 0; border: 0; opacity: 0; }

.cc-chip span { display: inline-flex; align-items: center; gap: 6px; max-width: 220px; padding: 6px 13px; border-radius: 999px; background: rgba(118, 118, 128, 0.1); font-size: 13.5px; font-weight: 500; color: var(--sk-ink-2, #3a3a3c); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: background 0.15s, color 0.15s; }

.cc-chip span::before { content: ""; width: 8px; height: 8px; flex: none; border-radius: 50%; box-shadow: inset 0 0 0 1.5px rgba(60, 60, 67, 0.35); }

.cc-chip input:checked + span { background: rgba(91, 141, 239, 0.14); color: #2c5bc0; font-weight: 600; }

.cc-chip input:checked + span::before { background: var(--sk-accent, #5b8def); box-shadow: none; }

.cc-chip input:disabled + span { opacity: 0.45; cursor: default; }

.cc-chip input:focus-visible + span { outline: 2px solid var(--sk-accent, #5b8def); outline-offset: 2px; }

.cc-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }

.cc-fld { display: grid; gap: 6px; min-width: 0; }

.cc-fld > span { padding-left: 3px; font-size: 12.5px; font-weight: 600; color: var(--sk-muted, #6e6e73); }

.cc-wide { grid-column: 1 / -1; }

.skw-row select { flex: none; }

.skw-row .skw-seg { flex: none; }

.cc-block { display: grid; gap: 10px; min-width: 0; }

.cc-block > .skw-lbl { margin: 0; }

.cc-pals { gap: 12px; }

.cc-pals label { position: relative; }

.cc-pals .skw-thumb { display: flex; width: 92px; height: 34px; padding: 7px; gap: 3px; }

.cc-pals .skw-thumb i { flex: 1; border-radius: 3px; }

.cc-pals b { max-width: 96px; font-weight: 500; text-align: center; line-height: 1.25; }

.cc-pals input:checked ~ b { font-weight: 600; }

.cc-pals input:focus-visible ~ .skw-thumb { outline: 2px solid var(--sk-accent, #5b8def); outline-offset: 3px; }

.cc-tints { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

.cc-tints input { width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: none; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08); cursor: pointer; overflow: hidden; }

.cc-tints input::-webkit-color-swatch-wrapper { padding: 0; }

.cc-tints input::-webkit-color-swatch { border: 0; border-radius: 50%; }

.cc-tints input::-moz-color-swatch { border: 0; border-radius: 50%; }

.cc-tints input:focus-visible { outline: 2px solid var(--sk-accent, #5b8def); outline-offset: 3px; }

.cc-empty { min-height: 200px; }

.cc-preview { position: relative; display: grid; gap: 10px; min-width: 0; }

.cc-prevbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 2px; font-size: 12.5px; font-weight: 600; color: var(--sk-muted, #6e6e73); }

.stage.cc-stage { display: grid; place-items: center; min-height: 320px; padding: 14px; border-radius: 14px; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 12px 32px rgba(20, 40, 70, 0.08), 0 0 0 0.5px rgba(0, 0, 0, 0.05); }

.stage.cc-stage.dim { background: #10161d; }

.stage svg { display: block; width: auto; height: auto; max-width: 100%; max-height: calc(100vh - 260px); border-radius: 6px; }

.stage.clear svg { background: repeating-conic-gradient(#eceff3 0 25%, #ffffff 0 50%) 0 0 / 18px 18px; }

.stage.clear.dim svg { background: repeating-conic-gradient(#1b242e 0 25%, #10161d 0 50%) 0 0 / 18px 18px; }

.stage [data-tip] { cursor: crosshair; }

.stage [data-tip]:hover { opacity: 0.82; }

.stage .hit:hover { opacity: 1; }

.stage .skw-empty { min-height: 280px; }

.stage .skw-empty span { max-width: 320px; font-size: 14px; }

.tip { position: fixed; top: 0; left: 0; z-index: 10; max-width: 260px; padding: 7px 10px; border-radius: 10px; background: #1d1d1f; color: #fff; font-size: 12px; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18); pointer-events: none; }

.tip b { display: block; font-weight: 600; }

.tip span { font-variant-numeric: tabular-nums; color: #c9d6e6; }

#chartNote:empty::before { content: "The chart updates as you change anything."; }

.guide { max-width: 820px; margin: 48px auto 0; font-size: 15px; line-height: 1.65; }

.guide h2 { margin: 36px 0 8px; font-size: 20px; }

.guide h3 { margin: 20px 0 4px; font-size: 15.5px; }

.guide p, .guide ol, .guide ul { margin: 0 0 12px; }

.guide ol, .guide ul { padding-left: 22px; }

.guide li { margin-bottom: 5px; }

.guide code { padding: 1px 5px; border-radius: 4px; background: rgba(118, 118, 128, 0.12); font: 13px var(--face-data); }

.kinds { width: 100%; border-collapse: collapse; font-size: 14px; }

.kinds th, .kinds td { padding: 8px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--tone-edge); }

.kinds th { white-space: nowrap; }

.colophon { max-width: 820px; margin: 40px auto 0; padding-top: 16px; font-size: 12.5px; color: var(--tone-muted); }

.yk{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0;font-size:13.5px;color:var(--ink-soft)}
.yk-use{display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 14px;border:1px solid var(--rule-strong);border-radius:999px;background:var(--paper);color:var(--ink);font:600 13.5px var(--stack);cursor:pointer}
.yk-use:hover{border-color:var(--tang);background:var(--tang-wash)}
.yk-use:focus-visible,.yk-shut:focus-visible{outline:2px solid var(--tang);outline-offset:2px}
.yk-note a,.yk-hint a{color:var(--tang-ink)}
.yk-shut{min-height:34px;padding:0 10px;border:0;border-radius:8px;background:transparent;color:var(--ink-soft);font:600 13px var(--stack);cursor:pointer}
.yk-shut:hover{background:var(--tang-wash);color:var(--ink)}

@media (max-width: 1180px) {
  .cc-split { grid-template-columns: minmax(0, 1fr); }
  .cc-preview { order: -1; }
  .stage svg { max-height: 70vh; }
}

@media (max-width: 560px) {
  .shell { padding: 0 16px 36px; }
  .masthead { padding: 32px 0 18px; }
  .cc-fields { grid-template-columns: minmax(0, 1fr); }
  .skw textarea.cc-data { height: 150px; font-size: 16px; }
  .skw input.text, .skw select { font-size: 16px; }
  .stage.cc-stage { min-height: 200px; padding: 6px; }
  .cc-picks .skw-thumb { width: 72px; height: 52px; }
  .skw-foot .skw-acts { width: 100%; }
  .skw-foot .skw-acts .btn { flex: 1 1 auto; justify-content: center; }
  .kinds th { white-space: normal; }
}

:root[data-theme="dark"] {
  --tone-base: #000000;
  --tone-panel: #0F0E0D;
  --tone-raise: #171614;
  --tone-well: #0A0909;
  --tone-edge: #24221F;
  --tone-text: #FFFFFF;
  --tone-muted: #A8A39C;
}
.masthead { display: block; padding: 48px 0 28px; }
.masthead h1 { padding: 0; border: 0; font-size: clamp(30px, 4.6vw, 44px); line-height: 1.08; letter-spacing: -0.03em; font-weight: 650; color: var(--tone-text); max-width: 22ch; text-wrap: balance; }
.skw-frame .skw .cc-picks label,.skw-frame .skw .cc-pals label{margin:0}
.cc-pals .skw-thumb{box-sizing:border-box}
@media (max-width: 640px) {
  .masthead { padding: 32px 0 20px; }
}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.skw#cc-win{overflow:clip}
@media (min-width:1181px){.cc-preview{position:sticky;top:12px}}
.skw .cc-pals .skw-thumb{display:flex;width:92px;height:34px;padding:7px;gap:3px}
.skw .cc-picks .skw-thumb{display:grid;place-items:center}

:root {
  --face-ui: var(--pl-sans);
}
