/* 够了没 — an instrument face. Cool slate ground, one brass band, and nothing
   else saturated: the band's *width* is the entire message of the page, so
   anything else competing for the eye is working against it. */
:root {
  --bg: #0e1216;
  --panel: #161b21;
  --sunk: #10151a;
  --line: #232b33;
  --ink: #e6ebef;
  --dim: #90a0ac;
  --faint: #5f6f7b;
  --accent: #d9a441;      /* the plausible range */
  --wide: #d97b5e;        /* too wide to use */
  --ok: #6fbf9a;
  --radius: 14px;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
b { font-weight: 600; }

.topbar { display: flex; align-items: center; gap: 10px;
  padding: max(10px, env(safe-area-inset-top)) 12px 10px;
  border-bottom: 1px solid var(--line); background: #121820; }
.mark { width: 34px; height: 34px; flex: none; border-radius: 10px; display: grid;
  place-items: center; font-weight: 700; color: #121820;
  background: linear-gradient(140deg, #f0cc86, var(--accent)); }
.titles { min-width: 0; }
.titles h1 { margin: 0; font-size: 17px; letter-spacing: .06em; }
.titles p { margin: 0; font-size: 11px; color: var(--faint); }

main { padding: 14px 12px 24px; max-width: 760px; margin: 0 auto; }
input, button { font: inherit; font-family: inherit; }

.panel { background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px; margin-bottom: 14px; }
.panel h2 { margin: 0 0 6px; font-size: 15px; }
.sub { color: var(--dim); font-size: 13.5px; margin: 0 0 4px; }
.tiny { color: var(--faint); font-size: 12px; line-height: 1.6; margin: 8px 0 0; }

/* ---- the two counts ---- */
.counts { display: flex; align-items: flex-end; gap: 10px; }
.cnt { flex: 1 1 0; min-width: 0; display: block; }
.cnt span { display: block; font-size: 12px; color: var(--faint); margin-bottom: 4px; }
.cnt input { width: 100%; padding: 12px; background: var(--sunk); color: var(--ink);
  border: 1px solid var(--line); border-radius: 11px; font-family: var(--mono);
  font-size: 22px; text-align: center; font-variant-numeric: tabular-nums; }
.cnt input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.of { color: var(--faint); font-family: var(--mono); font-size: 22px; padding-bottom: 12px; }

.quick { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.quick button { padding: 7px 11px; font-size: 12.5px; font-family: var(--mono);
  background: var(--sunk); color: var(--dim); border: 1px solid var(--line);
  border-radius: 999px; cursor: pointer; font-variant-numeric: tabular-nums; }
.quick button:active { border-color: var(--accent); color: var(--ink); }

/* ---- the hero: a range drawn to scale ---- */
.hero { background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px; margin-bottom: 14px; }
.ratio { display: flex; align-items: baseline; gap: 8px; font-family: var(--mono);
  color: var(--faint); font-size: 14px; font-variant-numeric: tabular-nums; }
.ratio b { color: var(--ink); font-size: 30px; font-weight: 600; }
.ratio i { font-style: normal; }
.ratio em { font-style: normal; color: var(--faint); font-size: 12px;
  font-family: inherit; margin-left: auto; text-align: right; }

.scale { margin: 14px 0 6px; }
/* The frame is an inset shadow rather than a border, so the track's content box
   *is* its visible width and a band at left:5.2% sits at 5.2% of what the eye
   measures. With a border it lands about a pixel off, which is exactly the kind
   of small lie this page has no business telling. */
.track { position: relative; height: 34px; border-radius: 9px; background: var(--sunk);
  box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
/* Quarter marks, so the band always sits on a ruler instead of floating free.
   They're elements rather than a background gradient because percentage
   background-position resolves against (box − tile), which would put these at
   18.75/43.75/68.75 while claiming to be quarters. */
.qm { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line); }
.band { position: absolute; top: 0; bottom: 0; background: var(--accent);
  border-radius: 4px; min-width: 2px; }
.hero.t-too_wide .band { background: var(--wide); }
.hero.t-usable .band { background: var(--ok); }
.hero.t-nothing .band { background: var(--line); }
.pt { position: absolute; top: -1px; bottom: -1px; width: 2px; margin-left: -1px;
  background: #0b0f12; }
.ticks { position: relative; height: 14px; margin-top: 5px; }
.ticks span { position: absolute; transform: translateX(-50%); font-size: 10.5px;
  color: var(--faint); font-family: var(--mono); }
.ticks span:first-child { transform: none; }
.ticks span:last-child { transform: translateX(-100%); }

.range { display: flex; flex-wrap: wrap; align-items: baseline;
  justify-content: space-between; gap: 2px 12px; margin-top: 10px;
  font-family: var(--mono); font-size: 19px; font-variant-numeric: tabular-nums; }
.range b { color: var(--accent); font-weight: 600; }
.hero.t-too_wide .range b { color: var(--wide); }
.hero.t-usable .range b { color: var(--ok); }
.hero.t-nothing .range b { color: var(--dim); }
.range .w { color: var(--faint); font-size: 13px; }

.says { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line);
  font-size: 13.5px; color: var(--dim); }
.says b { color: var(--ink); }

.conf { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; align-items: center; }
.conf > span { font-size: 12px; color: var(--faint); margin-right: 2px; }
.conf button { padding: 6px 10px; font-size: 12px; font-family: var(--mono);
  background: var(--sunk); color: var(--faint); border: 1px solid var(--line);
  border-radius: 999px; cursor: pointer; }
.conf button.on { color: #121820; background: var(--accent); border-color: var(--accent); }

/* ---- the growth table ---- */
.grow { display: grid; grid-template-columns: 4.5em 1fr 6.5em; align-items: center;
  gap: 10px; padding: 7px 0; }
.grow .k { font-family: var(--mono); font-size: 13px; color: var(--dim);
  font-variant-numeric: tabular-nums; }
.grow.now .k { color: var(--ink); }
.grow .t { position: relative; height: 12px; background: var(--sunk); border-radius: 999px;
  overflow: hidden; }
.grow .t > i { position: absolute; top: 0; bottom: 0; background: var(--faint);
  border-radius: 999px; }
.grow.now .t > i { background: var(--accent); }
.grow .v { text-align: right; font-family: var(--mono); font-size: 12.5px;
  color: var(--faint); font-variant-numeric: tabular-nums; }
.grow.now .v { color: var(--ink); }

/* ---- comparing two ---- */
.vs { display: grid; gap: 8px; margin: 10px 0; }
/* Grid, not flex: a flex container's intrinsic width comes from its items'
   content sizes, and a number input's default size is wide enough to push the
   whole page sideways however small you tell the item it may shrink. */
.side { display: grid; grid-template-columns: 1.6em 1fr auto 1fr; align-items: center;
  gap: 8px; }
.side b { color: var(--dim); }
.side span { color: var(--faint); font-family: var(--mono); text-align: center; }
.side input { width: 100%; min-width: 0; padding: 9px; background: var(--sunk);
  color: var(--ink); border: 1px solid var(--line); border-radius: 10px;
  font-family: var(--mono); text-align: center; font-variant-numeric: tabular-nums; }

.two { display: grid; gap: 8px; margin-top: 4px; }
.two .row2 { display: grid; grid-template-columns: 1.6em 5.5em 1fr; align-items: center;
  gap: 8px; }
.two .row2 > b { color: var(--dim); font-size: 13px; }
.two .row2 > .n { font-family: var(--mono); font-size: 12.5px; color: var(--dim);
  font-variant-numeric: tabular-nums; }
.two .row2 > .t { position: relative; height: 16px; background: var(--sunk);
  border-radius: 5px; overflow: hidden; }
.two .row2 > .t > i { position: absolute; top: 0; bottom: 0; background: #4c6070;
  border-radius: 3px; min-width: 2px; }
.two .row2.b > .t > i { background: #6a5a44; }

.call { margin-top: 10px; padding: 12px; border-radius: 11px; background: var(--sunk);
  border: 1px solid var(--line); font-size: 13.5px; color: var(--dim); }
.call b { display: block; color: var(--ink); font-size: 14.5px; margin-bottom: 3px; }
.call.no { border-color: #4a3d24; }
.call.no b { color: var(--accent); }
.call.yes { border-color: #2c4433; }
.call.yes b { color: var(--ok); }
.call .d { font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--ink); }

/* ---- the peeking demo ---- */
.ghost { min-height: 44px; padding: 10px 14px; cursor: pointer; border-radius: 11px;
  border: 1px solid var(--line); background: #1c242c; color: var(--ink); width: 100%;
  margin-top: 8px; }
.ghost:active { filter: brightness(1.2); }
.ghost[disabled] { color: var(--faint); cursor: default; }

.peek { margin-top: 12px; display: grid; gap: 10px; }
.pk { display: grid; grid-template-columns: 1fr 4.5em; gap: 8px; align-items: baseline; }
.pk .lab { font-size: 13px; color: var(--dim); }
.pk .num { text-align: right; font-family: var(--mono); font-size: 22px;
  font-variant-numeric: tabular-nums; }
.pk.once .num { color: var(--ok); }
.pk.many .num { color: var(--wide); }
.pk .t { grid-column: 1 / -1; height: 10px; background: var(--sunk); border-radius: 999px;
  overflow: hidden; }
.pk .t > i { display: block; height: 100%; border-radius: 999px; background: var(--ok); }
.pk.many .t > i { background: var(--wide); }

.foot { text-align: center; padding: 6px 12px max(18px, env(safe-area-inset-bottom));
  color: var(--faint); font-size: 11px; }
