/* Generated from the Solved Problems in UX design system: tokens.json + components/bundle.css. Do not edit here. */
:root, [data-theme="paper"] {
  --paper: #f3ecdd;
  --card: #e9e0cc;
  --plate: #ddd3bf;
  --ink: #1d1a16;
  --ink-2: #5a5347;
  --ink-3: #857d6f;
  --link: #22305c;
  --focus: var(--link);
  --tomato: #b3371f;
  --orange: #e07b24;
  --mustard: #ddb03a;
  --pink: #e49aae;
  --olive: #5c6930;
  --teal: #2e7470;
  --navy: #22305c;
  --plum: #6d3b5c;
  --machine: #1d1a16;
  --error: var(--tomato);
}
[data-theme="night"], [data-theme="dark"] {
  --paper: #1d1a16;
  --card: #2a2620;
  --plate: #353028;
  --ink: #f3ecdd;
  --ink-2: #c9bfad;
  --ink-3: #8f8677;
  --link: #aab8e6;
  --focus: var(--link);
  --tomato: #e0694f;
  --orange: #e8914a;
  --mustard: #e2bd58;
  --pink: #e8a9bb;
  --olive: #9aa866;
  --teal: #5fa39e;
  --navy: #7f93cf;
  --plum: #b47ea0;
  --machine: #f3ecdd;
  --error: var(--tomato);
}
:root {
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 40px;
  --space-6: 64px;
  --dot: 14px;
  --dot-pitch: 22px;
  --radius-sm: 3px;
  --radius: 4px;
  --radius-round: 50%;
  --grain-opacity: 0.06;
  --misregister: 1.5px;
  --jitter: 0.6px;
  --tilt: 0.8deg;
  --roughness: 0.035;
  --font-label: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-explain: "Source Serif 4", Georgia, serif;
  --font-record: "IBM Plex Mono", "Courier New", monospace;
}

/* Solved Problems in UX — component styles. Token values come from tokens.css (var(--…)). */

.sp-page { background: var(--paper); color: var(--ink); font: 400 17px/1.45 var(--font-label); -webkit-font-smoothing: antialiased; }
.sp-page *, .sp-page *::before, .sp-page *::after { box-sizing: border-box; }
.sp-page a { color: var(--link); }
.sp-page :focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }

/* ---------- texture: the hand-made surface ---------- */
.sp-grain { position: relative; isolation: isolate; }
.sp-grain::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  opacity: var(--grain-opacity); mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .11  0 0 0 0 .10  0 0 0 0 .08  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.sp-grain > * { position: relative; z-index: 1; }
@media (prefers-contrast: more) { .sp-grain::after { display: none; } }

/* ---------- type ---------- */
.sp-title { margin: 0; font: 800 clamp(2.5rem, 5.4vw, 3.25rem)/.95 var(--font-label); font-stretch: 88%; letter-spacing: -.035em; max-width: 18ch; }
.sp-friction { margin: 0; font: 400 21px/1.4 var(--font-explain); color: var(--ink-2); max-width: 54ch; }
.sp-answer { margin: 0; font: 600 clamp(1.6rem, 2.8vw, 2.125rem)/1.12 var(--font-label); letter-spacing: -.02em; max-width: 28ch; }
.sp-heading { margin: 0 0 12px; font: 700 26px/1.1 var(--font-label); font-stretch: 88%; letter-spacing: -.02em; }
.sp-subhead { margin: 0 0 8px; font: 600 17px/1.3 var(--font-label); color: var(--ink-2); }
.sp-record { font: 500 13px/1.5 var(--font-record); letter-spacing: .01em; }
.sp-caption { font: 400 16px/1.45 var(--font-explain); color: var(--ink-2); }

/* ---------- meter: five dots and the word ---------- */
.sp-meter { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.sp-meter-word { font: 600 14px/1 var(--font-label); }
.sp-meter.lg .sp-meter-word { font-size: 17px; }

/* ---------- tag ---------- */
.sp-tag { display: inline-block; font: 500 12px/1 var(--font-record); background: var(--paper); color: var(--ink); padding: 6px 8px; border-radius: var(--radius-sm); white-space: nowrap; }

/* ---------- rule row ---------- */
.sp-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.sp-row { display: grid; grid-template-columns: minmax(0, 1fr) 5.5rem 2.75rem 8.5rem; gap: var(--space-3); align-items: center; background: var(--card); border-radius: var(--radius); padding: var(--space-3) 20px; min-height: 56px; }
.sp-row-t { all: unset; cursor: pointer; font: 400 17px/1.4 var(--font-label); color: var(--ink); }
.sp-row-t:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.sp-row-t:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; border-radius: 2px; }
.sp-row-tag { display: flex; justify-content: flex-end; }
.sp-see { all: unset; cursor: pointer; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); color: var(--ink); }
.sp-see:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
@media (max-width: 44rem) {
  .sp-row { grid-template-columns: auto minmax(0, 1fr) 2.75rem; grid-template-areas: "t t s" "m g ."; }
  .sp-row > .sp-row-t { grid-area: t; } .sp-row > .sp-row-slot { grid-area: s; } .sp-row > .sp-meter { grid-area: m; } .sp-row > .sp-row-tag { grid-area: g; justify-content: flex-start; }
}

/* ---------- case groups ---------- */
.sp-group + .sp-group { margin-top: var(--space-5); }
.sp-group.sub { margin: 20px 0 0 24px; }
.sp-group.sub + .sp-group.sub { margin-top: 20px; }

/* ---------- figure: the reel as a plate ---------- */
.sp-figure { margin: 0; }
.sp-panes { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--space-3); }
.sp-pane { position: relative; background: var(--plate); border-radius: var(--radius); min-height: 260px; display: grid; place-items: center; padding: 48px 20px 20px; }
.sp-mark { position: absolute; left: 14px; top: 14px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: var(--paper); }
.sp-mark.avoid { background: var(--tomato); }
.sp-mark.do { background: var(--ink); }
.sp-figcaption { margin-top: 12px; display: flex; gap: 12px; align-items: baseline; }
.sp-figcaption .sp-record { color: var(--ink); flex: none; }

/* ---------- problem header ---------- */
.sp-runhead { color: var(--paper); }
.sp-runhead-in { max-width: 1136px; margin: 0 auto; padding: 0 32px; min-height: 52px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.sp-back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: inherit !important; text-decoration: none; font: 600 15px/1 var(--font-label); }
.sp-back:hover { text-decoration: underline; }
.sp-head { max-width: 1136px; margin: 0 auto; padding: 48px 32px 0; }
.sp-head .sp-friction { margin-top: 20px; }
.sp-verdict { margin-top: 36px; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; }
.sp-head .sp-figure { margin-top: 40px; }

/* ---------- problem cover ---------- */
.sp-page .sp-cover { color: var(--ink); }
.sp-cover { display: flex; flex-direction: column; min-height: 420px; background: var(--paper); border-radius: var(--radius); overflow: hidden; color: var(--ink); text-decoration: none; }
.sp-cover:hover .sp-cover-title { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.sp-cover-band { padding: 16px 18px 20px; min-height: 148px; display: flex; flex-direction: column; gap: 10px; }
.sp-cover-band .sp-record { font-size: 12px; }
.sp-cover-title { font: 800 26px/1.02 var(--font-label); font-stretch: 88%; letter-spacing: -.025em; }
.sp-cover-art { flex: 1; padding: 22px 18px; display: flex; align-items: flex-start; justify-content: space-between; }
.sp-cover-foot { padding: 0 18px 18px; display: flex; justify-content: space-between; align-items: center; }
.sp-cover-foot .sp-record { color: var(--ink-2); }
/* band inks: paper text on dark inks, ink text on light inks */
.sp-band-tomato { background: var(--tomato); color: var(--paper); }
.sp-band-navy { background: var(--navy); color: var(--paper); }
.sp-band-teal { background: var(--teal); color: var(--paper); }
.sp-band-olive { background: var(--olive); color: var(--paper); }
.sp-band-plum { background: var(--plum); color: var(--paper); }
.sp-band-machine { background: var(--machine); color: var(--paper); }
.sp-band-orange { background: var(--orange); color: var(--ink); }
.sp-band-mustard { background: var(--mustard); color: var(--ink); }
.sp-band-pink { background: var(--pink); color: var(--ink); }

/* ---------- source card ---------- */
.sp-sources { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); grid-auto-rows: auto auto auto auto; gap: var(--space-2) var(--space-4); }
.sp-source { all: unset; box-sizing: border-box; cursor: pointer; display: grid; grid-row: span 4; grid-template-rows: subgrid; row-gap: 6px; background: var(--card); border-radius: var(--radius); padding: var(--space-3) 20px; margin-bottom: var(--space-2); }
.sp-source:hover .sp-source-t { text-decoration: underline; }
.sp-source:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.sp-source-t { font: 600 17px/1.3 var(--font-label); }
.sp-source-by { font: 500 13px/1.4 var(--font-record); color: var(--ink-2); }
.sp-source-d { font: 400 16px/1.45 var(--font-explain); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.sp-source-foot { font: 600 14px/1.3 var(--font-label); color: var(--link); align-self: end; }

/* ---------- buttons ---------- */
.sp-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border-radius: var(--radius); background: var(--ink); color: var(--paper); font: 600 15px/1 var(--font-label); border: 0; cursor: pointer; text-decoration: none; }
.sp-btn.quiet { background: var(--card); color: var(--ink); }
.sp-btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
