:root {
  --paper: #fafbfc;
  --white: #fff;
  --ink: #191d28;
  --muted: #626a7b;
  --accent: #3456d6;
  --line: #dfe3eb;
  --wash: #eef2ff;
  --sans: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html.reading-switching { scroll-behavior: auto; }
[data-reading-depth] { overflow-anchor: none; }
html { scroll-behavior: smooth; scroll-padding-top: 26px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-underline-offset: 4px; text-decoration-thickness: 1px; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 600; line-height: 1.18; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }
svg { vertical-align: middle; }
a svg, button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; flex-shrink: 0; }
.wrap { max-width: 1264px; padding-inline: 44px; margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip { position: fixed; z-index: 10; left: 16px; top: -80px; padding: 10px 18px; background: var(--ink); color: white; }
.skip:focus { top: 12px; }
.site-header { display: flex; justify-content: space-between; align-items: center; min-height: 82px; gap: 24px; border-bottom: 1px solid var(--line); }
.site-header > a { text-decoration: none; }
.brand { font-size: 28px; font-weight: 750; letter-spacing: -1.5px; line-height: 1; }
.brand > span { color: var(--accent); }
.site-header nav { display: flex; align-items: center; gap: 28px; font-size: 13px; }
.site-header nav a { text-decoration: none; }
.site-header nav a:hover { color: var(--accent); }
.nav-contact { display: inline-flex; align-items: center; gap: 10px; }
.nav-contact svg { width: 16px; }
.small-label { font: 11px/1.5 var(--mono); }
.open-dot { display: inline-block; width: 7px; height: 7px; border: 2px solid var(--accent); border-radius: 50%; flex-shrink: 0; }
.hero { display: grid; grid-template-columns: 1.12fr 1fr; gap: 76px; align-items: center; padding-block: 64px 68px; }
.hero h1 { font-size: clamp(52px, 5.5vw, 76px); letter-spacing: -.065em; line-height: 1.06; }
.hero h1 span { color: var(--accent); }
.hero-description { font-size: 16px; line-height: 1.75; color: var(--muted); margin-top: 25px; max-width: 460px; }
.text-link { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-size: 13px; font-weight: 500; }
.text-link:hover { color: var(--accent); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px 28px; margin-top: 25px; }
.starting-point { padding: 26px 30px; background: var(--wash); border: 1px solid #cdd6f5; border-radius: 6px; box-shadow: 6px 6px 0 #e2e8f8; }
.starting-point h2 { font-size: 28px; letter-spacing: -.04em; max-width: 410px; }
.starting-point h2 a { text-decoration: none; }
.starting-point h2 a:hover { color: var(--accent); }
.starting-summary { font-size: 14px; line-height: 1.8; color: #566591; margin-top: 18px; }
.starting-link { font-size: 12px; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 26px; text-decoration: none; color: var(--accent); }
.catalog { padding-block: 30px 48px; border-top: 1px solid var(--line); }
.catalog-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.catalog-heading :is(h1, h2) { font-size: 34px; letter-spacing: -.04em; margin-top: 7px; overflow-wrap: anywhere; }
.result-count { font: 12px/1.5 var(--mono); color: var(--muted); white-space: nowrap; }
.discovery-form { margin-bottom: 26px; }
.search-box { display: flex; align-items: center; gap: 14px; background: var(--white); border: 1px solid #c6ccd9; border-radius: 5px; padding: 7px 8px 7px 18px; min-height: 60px; }
.search-box > svg { width: 20px; height: 20px; stroke: var(--muted); fill: none; stroke-width: 1.5; flex-shrink: 0; }
.search-box input { min-width: 0; flex: 1; padding: 8px 0; height: 42px; border: 0; outline: 0; background: transparent; font-size: 14px; }
.search-box input::placeholder { color: #78808f; opacity: 1; }
.search-box:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
.search-box input:focus-visible { outline: none; }
.search-box button, .button { display: inline-flex; align-items: center; justify-content: center; gap: 20px; min-height: 44px; padding: 8px 20px; background: var(--ink); border: 0; border-radius: 3px; color: white; font-size: 12px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.search-box button:hover, .button:hover { background: var(--accent); }
.browse-controls { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-top: 18px; }
.topic-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.topic-nav a { border: 1px solid transparent; border-radius: 4px; font-size: 12px; padding: 7px 10px; text-decoration: none; }
.topic-nav a:hover { background: #edf0f5; }
.topic-nav a[aria-current] { color: var(--accent); background: #e8edff; border-color: #d4ddff; }
.sort-control { display: flex; gap: 3px; flex-shrink: 0; }
.sort-control select { background: transparent; border: 1px solid var(--line); border-radius: 4px; padding: 7px 22px 7px 8px; min-height: 36px; font-size: 11px; max-width: 170px; }
.sort-control button { border: 0; background: transparent; min-height: 36px; min-width: 30px; padding: 4px; }
.sort-control button:hover { color: var(--accent); }
.sort-control svg { width: 16px; }
.reset-link { font-size: 12px; color: var(--muted); margin-bottom: 24px; }
.problem-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.problem-card { padding: 27px 30px 20px; border: 1px solid var(--line); border-radius: 5px; background: var(--white); display: flex; flex-direction: column; min-width: 0; }
.problem-card:hover { border-color: #b1bce3; }
.problem-card h3 { font-size: 26px; letter-spacing: -.035em; line-height: 1.28; }
.problem-card h3 a { display: block; text-decoration: none; position: relative; padding-right: 24px; }
.problem-card h3 a:hover { color: var(--accent); }
.problem-card h3 svg { position: absolute; right: 0; top: 6px; width: 17px; }
.card-summary { font-size: 13px; color: var(--muted); line-height: 1.75; margin-top: 15px; }
.membership-note { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 15px; font-size: 12px; line-height: 1.75; color: var(--muted); }
.collection-previews { padding-block: 28px 32px; border-top: 1px solid var(--line); }
.collection-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 18px; margin-bottom: 20px; }
.collection-heading h2 { font-size: 25px; letter-spacing: -.035em; }
.collection-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.collection-card { min-width: 0; padding: 22px; border: 1px solid var(--line); border-radius: 5px; background: var(--white); }
.collection-card .small-label { display: block; margin-top: 18px; color: var(--muted); }
.collection-card :is(h2, h3) { font-size: 21px; letter-spacing: -.025em; line-height: 1.3; }
.collection-card :is(h2, h3) a { display: block; text-decoration: none; position: relative; padding-right: 22px; }
.collection-card a:hover { color: var(--accent); }
.collection-card a svg { width: 16px; position: absolute; right: 0; top: 5px; }
.collection-card p { color: var(--muted); font-size: 12px; line-height: 1.8; margin-top: 12px; overflow-wrap: anywhere; }
.collections-page { padding-block: 28px 64px; min-height: 65vh; }
.collection-page-header { padding-block: 32px; max-width: 900px; }
.collection-page-header h1 { font-size: clamp(38px, 4.7vw, 61px); letter-spacing: -.05em; line-height: 1.12; margin-top: 12px; overflow-wrap: anywhere; }
.collection-description { font-size: 14px; line-height: 1.85; color: var(--muted); margin-top: 18px; max-width: 800px; }
.collection-members { border-top: 1px solid var(--line); padding-top: 28px; }
.collection-reading { border-top: 1px solid var(--line); margin-top: 38px; padding-top: 30px; max-width: 800px; }
.collection-reading h2 { font-size: 28px; letter-spacing: -.035em; margin-top: 10px; }
.collections-empty { color: var(--muted); font-size: 14px; }
.collection-back { margin-top: 32px; }
.collection-back .text-link + .text-link { margin-left: 24px; }
.subject-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.subject-card { min-width: 0; background: var(--white); border: 1px solid var(--line); border-radius: 5px; padding: 22px; }
.subject-card :is(h2, h3) { font-size: 22px; letter-spacing: -.025em; line-height: 1.3; }
.subject-card :is(h2, h3) a { display: block; text-decoration: none; position: relative; padding-right: 24px; }
.subject-card a:hover { color: var(--accent); }
.subject-card a svg { width: 16px; position: absolute; right: 0; top: 5px; }
.subject-card p { font-size: 12px; color: var(--muted); line-height: 1.8; margin-top: 12px; }
.subject-card .small-label { display: block; margin-top: 20px; color: var(--muted); }
.subject-search { margin-top: 28px; max-width: 800px; }
.explorer-section { padding-block: 28px 34px; border-top: 1px solid var(--line); }
.explorer-section > h2 { font-size: 25px; letter-spacing: -.035em; margin-bottom: 20px; }
.alternate-paths, .search-scope { font-size: 12px; color: var(--muted); margin-top: 18px; line-height: 1.9; }
.search-scope { margin-bottom: 18px; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 28px; border-top: 1px solid var(--line); padding-top: 24px; font-size: 12px; }
.pagination > span { color: var(--muted); }
.pagination a { color: var(--accent); }
.empty { padding: 46px 24px; text-align: center; border: 1px dashed #bdc6db; border-radius: 5px; }
.empty > span { font-size: 46px; color: var(--accent); font-weight: 500; }
.empty h3 { font-size: 25px; margin-top: 12px; letter-spacing: -.03em; }
.empty p { color: var(--muted); font-size: 14px; margin-top: 14px; }
.empty-actions { display: flex; align-items: center; justify-content: center; gap: 24px; flex-wrap: wrap; margin-top: 24px; font-size: 12px; }
.detail { padding-block: 28px 64px; }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; color: var(--muted); font-size: 11px; }
.breadcrumb a { text-decoration: none; }
.problem-header { padding-block: 24px 18px; max-width: 970px; }
.archive-note { margin-bottom: 28px; padding: 12px 16px; border-left: 2px solid var(--line); background: var(--white); color: var(--muted); font-size: 12px; }
.problem-header h1 { font-size: clamp(38px, 4.7vw, 61px); letter-spacing: -.05em; line-height: 1.12; overflow-wrap: anywhere; }
.problem-collections { font-size: 11px; color: var(--muted); margin-top: 8px; line-height: 1.9; }
.problem-collections a { text-decoration-color: #c4cad8; }
.reading-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 12px; font-size: 11px; color: var(--muted); }
.reading-status strong { color: var(--ink); font-weight: 500; }
.reading-status > span:last-child { margin-left: 4px; }
.reading-controls { position: sticky; top: 12px; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 16px; max-width: 800px; padding: 6px; margin-bottom: 24px; border: 1px solid var(--line); border-radius: 6px; background: var(--white); box-shadow: 0 3px 10px #191d2808; }
.reading-controls fieldset { display: flex; flex-wrap: wrap; gap: 4px; padding: 0; margin: 0; min-width: 0; border: 0; }
.reading-controls button { min-height: 44px; padding: 9px 15px; border: 0; border-radius: 3px; background: transparent; font-size: 12px; }
.reading-controls button:hover { background: #f1f3f8; }
.reading-controls button[aria-pressed="true"] { background: var(--wash); color: var(--accent); font-weight: 600; }
.reading-shortcuts { padding-right: 10px; font: 10px var(--mono); color: var(--muted); white-space: nowrap; }
.source-refs { font-size: 11px; color: var(--accent); margin-left: 7px; }
.source-refs a { white-space: nowrap; text-decoration: none; margin-right: 4px; }
.source-refs a:hover { text-decoration: underline; }
.reading-disclosure > summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.reading-disclosure[open] > summary { margin-bottom: 18px; }
.reading-disclosure + .reading-disclosure { margin-top: 20px; }
.reading-layout { display: grid; grid-template-columns: minmax(0, 800px) minmax(170px, 1fr); gap: 72px; border-top: 1px solid var(--line); }
.problem-body > section { padding-block: 28px 30px; border-bottom: 1px solid var(--line); scroll-margin-top: 100px; }
.problem-body h2 { font-size: 28px; letter-spacing: -.035em; margin-bottom: 18px; }
.problem-visual { display: block; margin-top: 18px; }
.problem-visual > svg { display: block; width: 100%; height: auto; user-select: text; }
.problem-visual > .problem-visual-narrow { display: none; }
.problem-visual:where(figure) { margin-inline: 0; }
.problem-visual > .problem-visual-single { max-width: 440px; margin-inline: auto; }
.problem-visual figcaption { margin-top: 12px; font-size: 15px; line-height: 1.6; color: var(--muted); }
.problem-visual[data-problem-visual="mcgurk-effect"] > .problem-visual-narrow,
.problem-visual[data-problem-visual="roomtempsc"] > .problem-visual-narrow { max-width: 360px; margin-inline: auto; }
@media (max-width: 580px) {
  .problem-visual > .problem-visual-wide { display: none; }
  .problem-visual > .problem-visual-narrow { display: block; }
}
/* Match Consciousness to the available column width beside the reading sidebar. */
@media (max-width: 681px), (min-width: 721px) and (max-width: 882px) {
  .problem-visual[data-problem-visual="consciousness"] > .problem-visual-wide { display: none; }
  .problem-visual[data-problem-visual="consciousness"] > .problem-visual-narrow { display: block; max-width: 360px; margin-inline: auto; }
}
/* Choose this diagram by its available column width; narrow is the fallback. */
.problem-visual[data-problem-visual="online-bin-packing-competitive-ratio"] { container-type: inline-size; container-name: bin-packing; }
.problem-visual[data-problem-visual="online-bin-packing-competitive-ratio"] > .problem-visual-wide { display: none; }
.problem-visual[data-problem-visual="online-bin-packing-competitive-ratio"] > .problem-visual-narrow { display: block; max-width: 320px; margin-inline: auto; }
@container bin-packing (min-width: 640px) {
  .problem-visual[data-problem-visual="online-bin-packing-competitive-ratio"] > .problem-visual-wide { display: block; }
  .problem-visual[data-problem-visual="online-bin-packing-competitive-ratio"] > .problem-visual-narrow { display: none; }
}

.problem-visual[data-problem-visual="collatz"] { container-type: inline-size; container-name: collatz; }
.problem-visual[data-problem-visual="collatz"] > .problem-visual-wide { display: none; }
.problem-visual[data-problem-visual="collatz"] > .problem-visual-narrow { display: block; max-width: 320px; margin-inline: auto; }
@container collatz (min-width: 640px) {
  .problem-visual[data-problem-visual="collatz"] > .problem-visual-wide { display: block; }
  .problem-visual[data-problem-visual="collatz"] > .problem-visual-narrow { display: none; }
}
.problem-visual[data-problem-visual="roomtempsc"] { container-type: inline-size; container-name: roomtempsc; }
.problem-visual[data-problem-visual="roomtempsc"] > .problem-visual-wide { display: none; }
.problem-visual[data-problem-visual="roomtempsc"] > .problem-visual-narrow { display: block; max-width: 320px; margin-inline: auto; }
@container roomtempsc (min-width: 640px) {
  .problem-visual[data-problem-visual="roomtempsc"] > .problem-visual-wide { display: block; }
  .problem-visual[data-problem-visual="roomtempsc"] > .problem-visual-narrow { display: none; }
}
/* The function map follows its actual reading column; narrow is the fallback. */
.problem-visual[data-problem-visual="artificial-photosynthesis"] { container-type: inline-size; container-name: solar-water-splitting; }
.problem-visual[data-problem-visual="artificial-photosynthesis"] > .problem-visual-wide { display: none; }
.problem-visual[data-problem-visual="artificial-photosynthesis"] > .problem-visual-narrow { display: block; max-width: 320px; margin-inline: auto; }
@container solar-water-splitting (min-width: 640px) {
  .problem-visual[data-problem-visual="artificial-photosynthesis"] > .problem-visual-wide { display: block; }
  .problem-visual[data-problem-visual="artificial-photosynthesis"] > .problem-visual-narrow { display: none; }
}
.problem-visual[data-problem-visual="artificial-photosynthesis"] > [data-diagram-introduction] { margin-bottom: 12px; }
.problem-visual[data-problem-visual="artificial-photosynthesis"] figcaption p + p { margin-top: 8px; }
.problem-visual[data-problem-visual="artificial-photosynthesis"] [data-mechanism-note] { margin-top: 10px; }
.problem-visual[data-problem-visual="artificial-photosynthesis"] [data-mechanism-note] > summary { min-height: 44px; padding-block: 8px; font-size: 16px; cursor: pointer; }
.problem-visual[data-problem-visual="artificial-photosynthesis"] [data-mechanism-note] > p { margin-top: 8px; font-size: 16px; }
.reading-prose p + p { margin-top: 16px; }
.reading-prose { max-width: 70ch; font-size: 17px; line-height: 1.8; color: #51596b; overflow-wrap: anywhere; }
.math-inline { white-space: nowrap; }
.math-inline math { font-size: 1.08em; }
.math-display { display: block; max-width: 100%; overflow-x: auto; padding: 18px 4px; margin-block: 8px; font-size: 1.2em; }
.math-display math { margin-inline: auto; }
.math-fallback { font-family: var(--mono); font-size: .9em; }
.term-link { color: inherit; text-decoration: underline dotted; text-underline-offset: 4px; }
.term-link:hover, .term-link:focus-visible { color: var(--accent); }
.term-popover { display: none; position: fixed; inset: auto; width: min(344px, calc(100vw - 24px)); max-height: calc(100vh - 24px); overflow: auto; padding: 16px 18px 18px; margin: 0; border: 1px solid #d8deea; border-radius: 10px; color: var(--ink); background: var(--white); box-shadow: 0 8px 30px #191d2818; overflow-wrap: anywhere; }
.term-popover:popover-open { display: block; }
.term-popover-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.term-popover h3 { font-size: 17px; line-height: 1.4; }
.term-popover p { font-size: 14px; line-height: 1.65; color: #51596b; }
.term-popover button { flex: 0 0 32px; min-height: 32px; padding: 2px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); font-size: 23px; line-height: 1; }
.term-popover button:hover { background: var(--wash); color: var(--ink); }
.glossary > summary { color: var(--ink); }
.glossary[open] > summary { margin-bottom: 8px; }
.term-list { max-width: 70ch; }
.term-definition { padding-block: 9px; border-top: 1px solid var(--line); }
.term-definition + .term-definition { margin-top: 0; }
.term-definition > summary { color: var(--ink); scroll-margin-top: 100px; }
.term-definition[open] > summary { margin-bottom: 0; }
.term-definition p { font-size: 14px; line-height: 1.7; color: #51596b; padding-top: 8px; }
.scope { border: 1px solid var(--line); border-radius: 4px; margin-top: 24px; padding: 13px 18px; background: var(--white); }
.scope summary { cursor: pointer; font-size: 12px; font-weight: 500; }
.scope[open] summary { margin-bottom: 10px; }
.scope p { color: var(--muted); font-size: 13px; line-height: 1.8; }
.subproblem-list { display: grid; gap: 14px; margin-top: 25px; }
.subproblem { display: flex; align-items: flex-start; gap: 20px; background: var(--white); border: 1px solid var(--line); border-radius: 5px; padding: 23px 24px; scroll-margin-top: 100px; }
.subproblem:target { border-color: var(--accent); box-shadow: 0 0 0 3px #e5eaff; }
.subproblem-number { font: 10px var(--mono); color: var(--accent); padding-top: 5px; }
.subproblem > div { min-width: 0; }
.subproblem-parent:hover { color: var(--accent); }
.subproblem h3 { font-size: 19px; letter-spacing: -.025em; line-height: 1.4; }
.subproblem h3 a { text-decoration: none; }
.subproblem h3 a:hover { color: var(--accent); }
.subproblem p { font-size: 13px; line-height: 1.8; color: var(--muted); margin-top: 10px; }
.subproblem-sources { margin-top: 13px; font-size: 10px; line-height: 1.8; color: #5265a2; }
.subproblem-sources a { text-decoration-color: #bcc6e3; overflow-wrap: anywhere; }
.reading-sidebar > div { position: sticky; top: 100px; padding-top: 30px; }
.reading-sidebar nav { display: flex; flex-direction: column; gap: 14px; font-size: 12px; }
.reading-sidebar nav a { display: flex; justify-content: space-between; gap: 14px; text-decoration: none; }
.reading-sidebar nav a:hover { color: var(--accent); }
.reading-sidebar nav span { font: 10px var(--mono); color: var(--accent); }
.reading-sidebar .text-link { margin-top: 24px; font-size: 11px; }
.reading-sidebar .text-link svg { transform: rotate(180deg); width: 14px; }
.source-list { padding-left: 20px; margin: 16px 0 0; }
.source-list li { scroll-margin-top: 100px; padding: 12px 0 14px 8px; border-top: 1px solid var(--line); font-size: 13px; }
.source-list li::marker { font: 10px var(--mono); color: var(--muted); }
.source-list a { display: inline-block; font-weight: 500; text-decoration-color: #b5bfd8; }
.source-list a svg { width: 14px; height: 14px; margin-left: 6px; transform: rotate(-35deg); }
.source-list p { font-size: 12px; color: var(--muted); line-height: 1.8; margin-top: 8px; }
.source-meta { display: block; color: var(--muted); font: 10px/1.8 var(--mono); margin-top: 8px; }
.source-access { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; font-size: 16px; }
.source-note { margin-top: 8px; }
.source-note summary { width: fit-content; color: var(--muted); font-size: 12px; cursor: pointer; }
.source-note summary:hover { color: var(--accent); }
.source-note summary::marker { font-size: 9px; }
.progress[id] { scroll-margin-top: 100px; }
.progress { border-left: 2px solid var(--accent); padding-left: 18px; margin-block: 25px; }
.progress p { font-size: 13px; color: #51596b; line-height: 1.8; margin-top: 9px; }
.progress > span:not(.small-label), .progress > a { display: inline-block; font-size: 10px; color: var(--muted); margin-top: 9px; margin-right: 12px; }
.related-list { display: grid; gap: 13px; overflow-wrap: anywhere; }
.related-list > a { display: block; text-decoration: none; padding: 22px 25px; border: 1px solid var(--line); border-radius: 4px; background: var(--white); }
.related-list > a:hover { border-color: #a4b3df; }
.related-list h3 { display: flex; align-items: baseline; justify-content: space-between; gap: 22px; font-size: 20px; letter-spacing: -.025em; line-height: 1.4; }
.related-list h3 svg { align-self: center; width: 17px; }
.related-list p { color: var(--muted); font-size: 12px; line-height: 1.8; margin-top: 10px; }
.correction { margin-top: 25px; }
.correction a { font-size: 12px; display: inline-flex; align-items: center; gap: 10px; }
.correction svg { width: 15px; }
.prose-page { max-width: 910px; min-height: 65vh; padding-block: 58px 70px; }
.prose-page h1 { font-size: clamp(40px, 5vw, 59px); letter-spacing: -.05em; margin-top: 18px; line-height: 1.15; }
.prose-lead { max-width: 710px; color: var(--muted); font-size: 20px; line-height: 1.6; margin-top: 23px; }
.prose-page section { border-top: 1px solid var(--line); margin-top: 35px; padding-top: 30px; }
.prose-page h2 { font-size: 27px; letter-spacing: -.035em; margin-bottom: 21px; }
.prose-page section p { font-size: 14px; line-height: 1.9; color: #51596b; margin-bottom: 18px; }
.prose-page > .button, .prose-page > .text-link { margin-top: 25px; }
.context-note { color: var(--muted); font-size: 13px; margin-top: 22px; }
.muted { color: var(--muted); font-size: 11px !important; margin-top: 17px; }
@media (max-width: 1000px) {
  .wrap { padding-inline: 28px; }
  .hero { gap: 32px; padding-block: 48px 52px; }
  .hero h1 { font-size: 61px; }
  .hero-description { font-size: 14px; }
  .starting-point { padding: 24px; }
  .starting-point h2 { font-size: 24px; }
  .browse-controls { gap: 16px; flex-wrap: wrap; }
  .reading-layout { gap: 36px; grid-template-columns: minmax(0, 1fr) 165px; }
  .problem-card { padding: 25px; }
  .problem-card h3 { font-size: 23px; }
}
@media (max-width: 720px) {
  .hero { grid-template-columns: 1fr 1fr; gap: 25px; }
  .hero h1 { font-size: 50px; }
  .hero-description br { display: none; }
  .starting-point { padding: 20px; }
  .starting-point h2 { font-size: 22px; }
  .site-header nav { gap: 20px; font-size: 12px; }
  .nav-contact { display: none; }
  .collection-grid { grid-template-columns: 1fr; gap: 14px; }
  .subject-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .collection-card { padding: 20px 22px; }
  .problem-card { padding: 22px; }
  .problem-card h3 { font-size: 21px; }
  .reading-shortcuts { display: none; }
  .reading-controls { width: fit-content; max-width: 100%; }
  .reading-layout { display: block; }
  .reading-sidebar { display: none; }
}
@media (max-width: 560px) {
  .wrap { padding-inline: 20px; }
  .site-header { min-height: 68px; gap: 14px; flex-wrap: wrap; padding-block: 18px; }
  .brand { font-size: 24px; letter-spacing: -1.2px; }
  .site-header nav { gap: 12px; font-size: 11px; }
  .hero { display: block; padding-block: 30px 35px; }
  .hero h1 { font-size: 53px; margin-top: 16px; }
  .hero-description { font-size: 13px; margin-top: 19px; max-width: 320px; }
  .hero-actions { margin-top: 20px; }
  .hero .text-link { font-size: 12px; }
  .starting-point { display: none; }
  .catalog { padding-block: 24px 30px; }
  .catalog-heading { gap: 18px; margin-bottom: 20px; }
  .catalog-heading :is(h1, h2) { font-size: 30px; }
  .result-count { font-size: 10px; }
  .search-box { gap: 10px; padding-left: 13px; min-height: 55px; }
  .search-box input { font-size: 12px; height: 37px; }
  .search-box button { font-size: 0; padding: 0; min-width: 38px; min-height: 38px; gap: 0; }
  .search-box button svg { width: 17px; }
  .browse-controls { gap: 12px; margin-top: 12px; }
  .topic-nav { gap: 3px; }
  .topic-nav a { padding: 6px 8px; font-size: 11px; }
  .sort-control select { font-size: 10px; }
  .discovery-form { margin-bottom: 20px; }
  .problem-grid { grid-template-columns: 1fr; gap: 14px; }
  .subject-grid { grid-template-columns: 1fr; }
  .collection-back .text-link { margin-bottom: 12px; }
  .collection-back .text-link + .text-link { margin-left: 0; display: flex; }
  .problem-card { padding: 23px; }
  .problem-card h3 { font-size: 24px; }
  .card-summary { font-size: 12px; }
  .collection-previews { padding-block: 25px 28px; }
  .collection-heading { flex-wrap: wrap; gap: 10px; }
  .collection-heading h2 { font-size: 23px; }
  .collection-heading .text-link { font-size: 12px; }
  .collections-page { padding-block: 24px 40px; }
  .collection-page-header { padding-block: 24px 28px; }
  .collection-page-header h1 { font-size: 38px; }
  .collection-page-header .prose-lead { font-size: 17px; }
  .detail { padding-block: 24px 40px; }
  .problem-header { padding-block: 20px 18px; }
  .problem-header h1 { font-size: clamp(32px, 8.5vw, 38px); }
  .reading-controls button { padding-inline: 13px; }
  .reading-status { gap: 7px 10px; }
  .reading-status > span:last-child { flex-basis: 100%; margin-left: 0; }
  .problem-body > section { padding-block: 28px; }
  .problem-body h2 { font-size: 28px; }
  .reading-prose { font-size: 16px; }
  .subproblem { padding: 20px 18px; gap: 14px; }
  .subproblem h3 { font-size: 18px; }
  .subproblem p { font-size: 12px; }
  .related-list > a { padding: 20px; }
  .related-list h3 { font-size: 19px; }
  .prose-page { padding-block: 36px 45px; }
  .prose-page h1 { font-size: 40px; }
  .prose-lead { font-size: 18px; }
  .prose-page h2 { font-size: 25px; }
  .empty { padding: 30px 20px; }
  .empty-actions { flex-direction: column; gap: 18px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* This finite counter is shared by both reading modes; narrow is its only layout. */
.normality-window { width: min(100%, 320px); margin-inline: auto !important; }
.normality-window [hidden] { display: none !important; }
.normality-window [data-counter-case] + [data-counter-case] { margin-top: 24px; }
.normality-window [data-visual] > svg { display: block; width: 100%; height: auto; user-select: text; }
.normality-window [data-controls] { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.normality-window [data-controls] > div { grid-column: 1 / -1; }
.normality-window label { display: block; margin-bottom: 6px; }
.normality-window select, .normality-window button { font: inherit; color: inherit; width: 100%; min-width: 0; min-height: 44px; padding: 9px 10px; background: #fff; border: 1px solid #7d9b8b; border-radius: 6px; }
.normality-window button { cursor: pointer; padding-inline: 6px; font-size: 14px; }
.normality-window button:disabled { cursor: default; color: #626a7b; }
.normality-window button:focus-visible, .normality-window select:focus-visible { outline: 3px solid #3456d6; outline-offset: 3px; }

.superconductivity-graphs h3 { font-size: 22px; margin-bottom: 16px; }
.superconductivity-graphs > figure + figure { margin-top: 32px; }
.superconductivity-data { margin-top: 18px; }
.superconductivity-data > summary { min-height: 44px; padding-block: 10px; cursor: pointer; font-size: 16px; }
.superconductivity-data p { margin-block: 12px; }
.superconductivity-table { max-width: 100%; overflow-x: auto; margin-block: 16px; }
.superconductivity-table table { border-collapse: collapse; min-width: 680px; width: 100%; font-size: 16px; text-align: left; }
.superconductivity-table th, .superconductivity-table td { padding: 12px; vertical-align: top; border-bottom: 1px solid var(--line); }
.superconductivity-table tbody th { width: 22%; font-weight: 600; }
.superconductivity-table small { display: block; margin-top: 6px; font-size: 14px; color: var(--muted); }
