/* urn.css — project stylesheet for The Urn with Turnover.
   Loads after css/cc-base.css (commoncrawl/cc-web-tools). Layout and components follow STYLE-GUIDE.md and the
   Web Graph Statistics page. cc-base.css does not yet declare the documented --cc-* tokens, so they are declared here. */

/* Greek letters (α κ μ ν σ Δ ∂ ∞) come from a local font that has them; the brand fonts carry everything else. */
@font-face { font-family: "GreekLocal"; src: local("Helvetica Neue"), local("Helvetica"), local("Arial"), local("Segoe UI"), local("DejaVu Sans"), local("Noto Sans"), local("Liberation Sans"); unicode-range: U+0370-03FF, U+2202, U+221E; }

:root {
  --cc-text: #152a47; --cc-text-secondary: #64748b; --cc-text-muted: #94a3b8; --cc-text-subtle: #475569;
  --cc-accent: #2e5f8a; --cc-accent-hover: #1e4a6e;
  --cc-bg-page: #f5f7fa; --cc-bg-card: #ffffff; --cc-bg-inset: #f8fafb; --cc-bg-hover: #f8fafc; --cc-bg-active: #eef4fa; --cc-bg-code: #f1f5f9;
  --cc-border: #e2e8f0; --cc-border-input: #dde2e9; --cc-border-hover: #cbd5e1; --cc-border-subtle: #f1f5f9; --cc-border-accent: #b8c9e0;
  --cc-link-underline: #c0c8d4; --cc-link-underline-hover: #152a47;
  --cc-radius: 10px; --cc-radius-sm: 6px; --cc-radius-xs: 4px;
  --cc-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
  --cc-font-body: "GreekLocal", "Libre Franklin", "Segoe UI", system-ui, -apple-system, sans-serif;
  --cc-font-mono: "GreekLocal", "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;

  /* the names applet.js reads from the stylesheet, mapped onto the tokens above */
  --ink: var(--cc-text); --muted: var(--cc-text-secondary); --caption: var(--cc-text-muted);
  --paper: var(--cc-bg-card); --plot: var(--cc-bg-card);
  --border: var(--cc-border); --border-light: var(--cc-border-subtle);
  --accent: var(--cc-accent); --accent-soft: rgba(46, 95, 138, 0.5);   /* --cc-accent at half strength */
  --unseen: var(--cc-border-hover); --hidden: var(--cc-topaz-text); --sim: #e69f00;   /* the simulation in the charts: Wong orange, distinct from the reference's blue and the fit's red */ --core: var(--cc-amethyst-text); --red: var(--cc-ruby-text);
  --badge: #b36b00;                                        /* the numbered callouts of the reading guide */
  --outside: #e7ebf1; --outside-dot: #c9d1dc;            /* the web beyond reach */
  --sans: var(--cc-font-body); --mono: var(--cc-font-mono);
  /* the type scale, in pixels and independent of width: body, titles of cards, interface text (legend, keys, captions, help), chart lettering and chips */
  --fs-body: 16px; --fs-title: 15px; --fs-ui: 13px; --fs-chart: 12px;
}

/* ---------- base typography (cc-base.css resets margins and leaves these to the project) ---------- */
body { font-family: var(--cc-font-body); font-size: var(--fs-body); line-height: 1.65; background: var(--cc-bg-card); }
/* the page column follows the Common Crawl blog: a 48rem rich-text column with 2rem of page padding, 1.1rem text at a line height of 1.8,
   headings in the brand blue with the blog's sizes. The blog sets its display face only above 991 px and uses Libre Franklin 600 below; this page uses the latter throughout. */
.cc-twrap { max-width: 52rem; padding: 8px 2rem 48px; }
.cc-header-slim { padding: 18px 20px 16px; max-width: 52rem; }
.post-head { max-width: 52rem; margin: 0 auto; padding: 40px 2rem 8px; }
.post-meta { display: flex; align-items: center; gap: 14px; margin-bottom: 1rem; font-size: 1rem; color: var(--cc-text-secondary); }
.post-head h1 { margin: 0 0 20px; font-size: 50px; line-height: 1.05; font-weight: 600; letter-spacing: 0; }
.post-summary { margin: 0 0 1rem; font-size: 1.2rem; line-height: 1.5; color: var(--cc-text); }
.post-authors { margin: 0; font-size: 1rem; line-height: 1.6; color: var(--cc-text-secondary); }
.post-authors .sep::before { content: '·'; margin: 0 8px; }
.post-authors a { color: var(--cc-accent); font-weight: 600; }
.prose { font-size: 1.1rem; line-height: 1.8; }
.prose p { margin-bottom: 1rem; }
.prose a { color: var(--cc-accent); font-weight: 600; text-decoration: underline; }
.prose a:hover { color: var(--cc-accent-hover); }
main { flex: 1; }
h1, h2, h3, h4 { color: var(--cc-text); line-height: 1.25; }
h2 { font-size: 32px; line-height: 1.5; font-weight: 600; margin: 2rem 0 1rem; }
h3 { font-size: 24px; line-height: 1.45; font-weight: 600; margin: 1.5rem 0 0.75rem; }
h4 { font-size: 15px; margin: 0 0 6px; }
p { margin-bottom: 16px; }
ul, ol { margin-bottom: 16px; padding-left: 24px; }
li { margin-bottom: 4px; }
a { font-weight: 600; color: var(--cc-text); text-decoration: underline; text-decoration-color: var(--cc-link-underline); text-underline-offset: 2px; transition: text-decoration-color 0.15s; }
a:hover { text-decoration-color: var(--cc-link-underline-hover); }
code, .mono { font-family: var(--cc-font-mono); }
[id] { scroll-margin-top: 32px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
.cc-header a { display: inline-block; text-decoration: none; }
.cc-logo { display: block; margin: 0; }
mjx-container[display="true"] { margin: 10px 0 18px !important; overflow-x: auto; overflow-y: hidden; }

/* ---------- meta bar under the header, as on the Web Graph Statistics page ---------- */

/* ---------- prose ---------- */
.intro { margin: 8px 0 24px; }
ol.outline { margin: 12px 0 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 6px; }
ol.outline li { position: relative; padding-left: 32px; counter-increment: step; }
ol.outline li::before { content: counter(step); position: absolute; left: 0; top: 0.1em; width: 22px; height: 22px; border-radius: 50%; background: var(--cc-accent); color: #fff; font: 700 12px/22px var(--cc-font-body); text-align: center; }
ol.outline a { text-decoration: none; }
ol.outline a:hover b { text-decoration: underline; }
.takeaway { font-size: 1.1rem; font-weight: 600; line-height: 1.6; color: var(--cc-text); border-left: 3px solid var(--cc-accent); padding: 2px 0 2px 14px; margin: 8px 0 18px; }
/* the reading guide: numbered one-liners under the figure, keyed to the badges drawn on it */
ol.guide { margin: 12px 2px 0; padding: 0; list-style: none; counter-reset: g; display: grid; gap: 5px; line-height: 1.5; color: var(--cc-text-secondary); }
ol.guide li { position: relative; padding-left: 30px; counter-increment: g; }
ol.guide li b { color: var(--cc-text); }
ol.guide li::before { content: counter(g); position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%; background: var(--badge); color: #fff; font: 700 11px/20px var(--cc-font-body); text-align: center; }
table.fates.dict td.mono { white-space: normal; }
.essay code { font-family: var(--cc-font-mono); font-size: 13px; background: var(--cc-bg-active); padding: 1px 5px; border-radius: 3px; }
.intro p { margin: 0 0 8px; }
p.note { font-size: 14px; line-height: 1.55; color: var(--cc-text-subtle); border-left: 3px solid var(--cc-sapphire-border); padding-left: 14px; }
table.fates { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid var(--cc-border-input); border-radius: var(--cc-radius); background: var(--cc-bg-card); box-shadow: var(--cc-shadow-sm); overflow: hidden; margin: 8px 0 20px; font-size: 14px; line-height: 1.5; }
table.fates th { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--cc-text-secondary); background: var(--cc-bg-inset); border-bottom: 2px solid var(--cc-border); padding: 10px 14px; text-align: left; }
table.fates td { padding: 10px 14px; border-bottom: 1px solid var(--cc-border-subtle); vertical-align: top; }
table.fates tr:last-child td { border-bottom: 0; }
table.fates td.mono { white-space: nowrap; font-size: 13px; }

/* ---------- cards ---------- */
.info-card { background: var(--cc-bg-card); border: 1px solid var(--cc-border); border-radius: var(--cc-radius); padding: 18px 22px 20px; box-shadow: var(--cc-shadow-sm); }
.info-card h3 { margin: 0 0 10px; font-size: var(--fs-body); }
.info-card ul { margin: 0; }
.info-card li { margin-bottom: 8px; font-size: var(--fs-body); line-height: 1.5; color: var(--cc-text-subtle); }
.info-card li:last-child { margin-bottom: 0; }
.info-card b { color: var(--cc-text); font-weight: 600; }
ul.refs { list-style: none; padding-left: 0; }
ul.refs li { padding-left: 2.4em; text-indent: -2.4em; }

/* ---------- the demo ---------- */
.demo { margin: 0 0 36px; font-size: var(--fs-ui); line-height: 1.45; }
/* the four webs: a card row of the figure, the badge inside it, the panel 12 px below like the gap between the cards */
.modes { display: grid; grid-template-columns: auto repeat(4, minmax(0, 1fr)); gap: 8px; align-items: center; margin: 0 0 12px; padding: 8px 10px 8px 12px; background: var(--cc-bg-card); border: 1px solid var(--cc-border); border-radius: var(--cc-radius); box-shadow: var(--cc-shadow-sm); }
.modes button { min-width: 0; overflow: hidden; white-space: nowrap; }
.badge { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: var(--badge); color: #fff; font: 700 11px var(--cc-font-body); flex: none; }
.fig header .badge { position: absolute; right: 12px; top: 10px; }
.fig { position: relative; }
.modes button { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 12px; background: var(--cc-bg-inset); color: var(--cc-text); font: 600 14px var(--cc-font-body); border: 1px solid var(--cc-border-input); border-radius: var(--cc-radius-sm); cursor: pointer; transition: background 0.15s, border-color 0.15s, color 0.15s; }
.modes button:hover { border-color: var(--cc-border-hover); background: var(--cc-bg-hover); }
.modes button.on { background: var(--cc-bg-active); border-color: var(--cc-border-accent); color: var(--cc-accent); }   /* the accent variant of the style guide: outlined, no solid fill */
.headline { margin: 10px 2px 0; font-size: var(--fs-ui); line-height: 1.5; color: var(--cc-text-secondary); }   /* under the panel: the buttons and the three graphs stay on one screen */
/* one grid at every width: the animation spans two rows on the left, containment and discovery are two equal cards on the right,
   the key spans both columns underneath. The rows take their height from the animation column, so the charts end where it ends. */
.panel { display: grid; grid-template-columns: minmax(0, 46fr) minmax(0, 54fr); grid-template-rows: 1fr 1fr auto; gap: 12px 16px; align-items: stretch; }
.figcol { display: contents; }
.simcol { grid-row: 1 / span 2; grid-column: 1; }
#fig-containment { grid-row: 1; grid-column: 2; }
#fig-discovery { grid-row: 2; grid-column: 2; }
.figcap { grid-row: 3; grid-column: 1 / -1; }
.figcap { margin: 0; padding: 10px 14px 12px; font-size: var(--fs-ui); line-height: 1.45; color: var(--cc-text-secondary); background: var(--cc-bg-card); border: 1px solid var(--cc-border); border-radius: var(--cc-radius); box-shadow: var(--cc-shadow-sm); }
.simcol { background: var(--cc-bg-card); border: 1px solid var(--cc-border); border-radius: var(--cc-radius); box-shadow: var(--cc-shadow-sm); overflow: hidden; }
canvas#stage { display: block; width: 100%; aspect-ratio: 1; background: var(--outside); }
.legend { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 14px; padding: 10px 14px; border-top: 1px solid var(--cc-border); color: var(--cc-text-secondary); font-size: var(--fs-ui); line-height: 1.35; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend span.wide { grid-column: 1 / -1; }
.legend span.emph { gap: 10px; margin-top: 2px; flex-wrap: wrap; }
.legend span.emph .seg { display: inline-flex; }
.legend .sw.unseen { background: var(--unseen); }
.legend.unseen .sw.unseen { background: var(--hidden); width: 11px; height: 11px; }
.legend.unseen .sw:not(.unseen):not(.strip) { background: transparent !important; box-shadow: inset 0 0 0 1px var(--unseen); }
.sw { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.sw.disc { background: var(--cc-accent); box-shadow: 0 0 0 1.5px var(--cc-bg-card), 0 0 0 2.5px var(--red); width: 7px; height: 7px; margin: 0 2px; }
.sw.strip { border-radius: 2px; width: 16px; height: 10px; background: linear-gradient(90deg, rgba(46, 95, 138, 0.05), rgba(46, 95, 138, 0.25)); border: 1px solid var(--cc-border); }
.transport { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 10px 14px 12px; border-top: 1px solid var(--cc-border); }
.playbtn { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--cc-accent); background: var(--cc-bg-card); color: var(--cc-accent); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; transition: background 0.15s; }
.playbtn:hover { background: var(--cc-bg-active); }
.playbtn svg { width: 16px; height: 16px; fill: currentColor; }
.playbtn .ic-pause, .playbtn.playing .ic-play { display: none; }
.playbtn.playing .ic-pause { display: block; }
.playbtn:focus-visible, input:focus-visible, .modes button:focus-visible { outline: 2px solid var(--cc-border-accent); outline-offset: 2px; }
.timeline { position: relative; padding-top: 12px; }
.band { position: absolute; left: 0; right: 0; top: 0; height: 8px; border-radius: var(--cc-radius-xs); background: var(--cc-border); }
.band i { position: absolute; top: 0; height: 100%; background: var(--cc-sapphire-border); border-radius: var(--cc-radius-xs); }
.band em { position: absolute; top: -1px; width: 2px; height: 10px; background: var(--cc-accent); border-radius: 1px; }
input[type=range] { width: 100%; margin: 0; accent-color: var(--cc-accent); }
.tick { font-family: var(--cc-font-mono); font-size: var(--fs-chart); color: var(--cc-text-secondary); min-width: 7ch; text-align: right; font-variant-numeric: tabular-nums; }
.tick b { color: var(--cc-text); font-weight: 500; }

.fig { display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 10px 14px 10px; background: var(--cc-bg-card); border: 1px solid var(--cc-border); border-radius: var(--cc-radius); box-shadow: var(--cc-shadow-sm); }
.fig header { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin-bottom: 4px; }
.chips { min-height: 24px; }   /* the title on one line, the chips on the next; the chip row reserves the longest reading, see the width rules below */
.fig h4 { margin: 0; font-size: var(--fs-title); padding-right: 28px; }
.fig h4 small { font-weight: 400; font-size: var(--fs-ui); color: var(--cc-text-secondary); margin-left: 6px; }
.chips { display: flex; flex-wrap: wrap; align-items: flex-start; align-content: flex-start; gap: 5px; }
.chip { display: inline-flex; align-items: baseline; gap: 4px; padding: 2px 6px; border-radius: 999px; background: var(--cc-bg-inset); border: 1px solid var(--cc-border-subtle); font-family: var(--cc-font-mono); font-size: var(--fs-chart); color: var(--cc-text); font-variant-numeric: tabular-nums; }
.chip small { font-size: var(--fs-chart); color: var(--cc-text-muted); }
.chip sub, .headline sub, table.fates sub { font-size: 0.72em; line-height: 0; vertical-align: -0.25em; }
.chip i { font-style: normal; color: var(--cc-text-muted); }
.chip b { font-weight: 600; color: var(--cc-ruby-text); }
.fig svg { flex: 1 1 0; min-height: 0; width: 100%; display: block; }
.fig svg text { font-family: var(--cc-font-body); font-size: var(--fs-chart); fill: var(--cc-text-secondary); }
.fig svg .mono { font-family: var(--cc-font-mono); }
.fig svg .ink { fill: var(--cc-text); }
.fig svg .grid { stroke: var(--cc-border-subtle); }
.fig svg .axis { stroke: var(--cc-border); }
.figcap ul.key { list-style: none; margin: 0 0 4px; padding: 0; display: grid; gap: 3px; }
.figcap ul.key li { position: relative; padding-left: 18px; }
.figcap ul.key li b { color: var(--cc-text); font-weight: 600; }
.figcap ul.key .sw { position: absolute; left: 0; top: 0.35em; width: 10px; height: 10px; }
.figcap .k-sim { background: var(--sim); border-radius: 50%; box-shadow: 0 0 0 1.5px var(--cc-bg-card); }
.figcap .k-fit { background: transparent; border-radius: 0; height: 0; top: 0.68em; border-top: 2px dashed var(--red); }
.figcap .k-cc { background: var(--cc-accent); border-radius: 1px; }
.figcap .hint { color: var(--cc-text-muted); }

/* fine-tune */
.tune { margin-top: 16px; background: var(--cc-bg-card); border: 1px solid var(--cc-border); border-radius: var(--cc-radius); box-shadow: var(--cc-shadow-sm); }
.tune summary { padding: 12px 18px; font-weight: 600; font-size: var(--fs-title); color: var(--cc-text); cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px; }
.tune summary::-webkit-details-marker { display: none; }
.tune summary::before { content: ''; width: 7px; height: 7px; border-right: 2px solid var(--cc-text-muted); border-bottom: 2px solid var(--cc-text-muted); transform: rotate(-45deg); transition: transform 0.15s; margin-left: 2px; }
.tune[open] summary::before { transform: rotate(45deg); }
.tune[open] summary { border-bottom: 1px solid var(--cc-border); }
.tune-body { padding: 16px 18px 18px; }
.tune + .tune { margin-top: 12px; }
/* the derivations: a dropdown of the metrics section, prose at the body size */
.deriv p { margin: 0 0 10px; font-size: var(--fs-body); line-height: 1.6; }
.deriv p:last-child { margin-bottom: 0; }
.deriv table.fates { margin: 4px 0 14px; }
.deriv mjx-container[display="true"] { margin: 6px 0 14px !important; }
/* a display formula wider than a phone scrolls sideways instead of being cut */
.prose mjx-container[display="true"] { max-width: 100%; overflow-x: auto; overflow-y: hidden; padding: 2px 0; }
.tune-grid { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 18px 32px; align-items: start; }
.tune-group { min-width: 0; }
.tune-group h5 { margin: 0 0 8px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--cc-text-muted); }
.tune-help { margin: 0 0 10px; font-size: var(--fs-ui); line-height: 1.5; color: var(--cc-text-secondary); }
.tune-side { display: flex; flex-direction: column; gap: 16px; }
.tune-side .tune-group { padding: 12px 14px 14px; border: 1px solid var(--cc-border-subtle); border-radius: var(--cc-radius-sm); background: var(--cc-bg-plot, transparent); }
.tune-side .tune-help { margin: 8px 0 0; }
.tune-side .check { margin-top: 10px; }
.profile-wrap { max-width: 720px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
svg#profile { display: block; width: 100%; height: auto; touch-action: pan-y; user-select: none; }
svg#profile text { font-family: var(--cc-font-mono); font-size: 10px; fill: var(--cc-text-secondary); font-variant-numeric: tabular-nums; }
svg#profile text.head { font-family: var(--cc-font-body); font-weight: 700; letter-spacing: 0.04em; fill: var(--cc-text-muted); }
svg#profile text.rowname { font-family: var(--cc-font-body); font-size: 12px; font-weight: 600; fill: var(--cc-text); }
svg#profile text.tick { fill: var(--cc-text-muted); font-size: 9px; }
svg#profile .p-sep { stroke: var(--cc-border-subtle); }
svg#profile .p-grid { stroke: var(--cc-border); stroke-width: 1; }
svg#profile .h-jump { stroke-width: 12; stroke: transparent; cursor: pointer; }
svg#profile .p-whisker { stroke: var(--cc-text-muted); stroke-width: 1; }
svg#profile .p-median { stroke: var(--cc-accent); stroke-width: 2; }
svg#profile .p-cfill { stroke: var(--accent-soft); stroke-width: 4; }
svg#profile .h-T { fill: var(--cc-bg-active); stroke: var(--cc-accent); stroke-width: 1; cursor: ew-resize; touch-action: none; }
svg#profile .h-s { fill: var(--cc-text-muted); cursor: ew-resize; touch-action: none; }
svg#profile .h-c { fill: var(--cc-bg-card); stroke: var(--cc-accent); stroke-width: 2; cursor: ew-resize; touch-action: none; }
svg#profile .h-T:hover, svg#profile .h-c:hover { fill: var(--cc-sapphire-border); }
svg#profile .h-s:hover { fill: var(--cc-text); }
svg#profile [tabindex]:focus { outline: none; }
svg#profile [tabindex]:focus-visible { stroke: var(--cc-text); stroke-width: 2; }
.tune-item { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tune-item.scope { max-width: 720px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--cc-border-subtle); }
.tune-item.scope .tune-help { margin: 2px 0 0; }
.tune-item label { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.tune-item .cap { font-size: 13px; font-weight: 600; color: var(--cc-text); }
.tune-item .val { font-family: var(--cc-font-mono); font-size: var(--fs-chart); line-height: 1.4; color: var(--cc-text); font-variant-numeric: tabular-nums; text-align: right; min-width: 0; }
.tune-item .val span { white-space: nowrap; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--cc-text-subtle); }
.check input { accent-color: var(--cc-accent); }
.seg { display: inline-flex; border: 1px solid var(--cc-accent); border-radius: var(--cc-radius-xs); overflow: hidden; align-self: flex-start; }
.seg button { font: 600 11.5px var(--cc-font-body); padding: 5px 11px; background: var(--cc-bg-card); color: var(--cc-accent); border: 0; border-left: 1px solid var(--cc-accent); cursor: pointer; transition: background 0.15s, color 0.15s; }
.seg button:first-child { border-left: 0; }
.seg button:hover { background: var(--cc-bg-active); }
.seg button.on { background: var(--cc-bg-active); color: var(--cc-accent); font-weight: 700; }
.tip { position: fixed; display: none; z-index: 50; pointer-events: none; max-width: 300px; padding: 6px 10px; border-radius: 6px; background: var(--cc-text); color: #fff; font: 12px/1.4 var(--cc-font-body); box-shadow: var(--cc-shadow-sm); }
.fig svg [data-tip] { cursor: default; }
/* the URL-level containment chart */
.urlfig { margin: 18px 0 20px; background: var(--cc-bg-card); border: 1px solid var(--cc-border); border-radius: var(--cc-radius); box-shadow: var(--cc-shadow-sm); overflow: hidden; }
.urlfig .fig { flex: none; border: 0; box-shadow: none; border-radius: 0; }
.urlfig .chips { min-height: 24px; }   /* three chips always fit on one row */
.urlfig .fig svg { flex: none; height: 260px; }
.urlctl { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px 12px; align-items: center; padding: 8px 14px 10px; border-top: 1px solid var(--cc-border); }   /* play, slider, dates: like the panel's transport */
.urlctl input[type=range] { flex: 1 1 auto; min-width: 0; }
.urlctl .uwinlabel { flex: none; font-family: var(--cc-font-mono); font-size: var(--fs-chart); color: var(--cc-text-secondary); white-space: nowrap; }
.urlfig .figcap { border: 0; box-shadow: none; border-radius: 0; border-top: 1px solid var(--cc-border); }

/* ---------- responsive ---------- */
/* a text-wide frame, 680 to 900 px: still two columns, but the charts take the height they need instead of the animation's */
/* width rules. Wide: chips fit on one row. Narrow (a text column): the chip row reserves two rows, so the charts keep their height in every reading. */
@media (max-width: 900px) {
  .chips { min-height: 53px; }
  .modes { gap: 6px; }
  .modes button { padding: 9px 6px; font-size: var(--fs-ui); gap: 5px; }
  .legend { grid-template-columns: 1fr; }
  .urlctl { grid-template-columns: auto minmax(0, 1fr); }
  .urlctl .uwinlabel { grid-column: 2; white-space: normal; }
  .tune-grid { grid-template-columns: minmax(0, 1fr); }
  .tune-side { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
}
/* a phone: one column, the charts at a fixed height */
@media (max-width: 520px) {
  .panel { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; }
  .simcol, #fig-containment, #fig-discovery, .figcap { grid-row: auto; grid-column: 1; }
  .fig svg { flex: none; height: 230px; }
  .chips { min-height: 24px; }
  .modes { grid-template-columns: auto 1fr 1fr; }
  .modes > .badge { grid-row: 1 / span 2; }
  .modes button { font-size: var(--fs-ui); padding: 9px 10px; }
}
@media (max-width: 767px) {
  h2 { font-size: 30px; line-height: 1.3; }
  h3 { font-size: 1.5rem; }
  .post-head h1 { font-size: 40px; line-height: 1; }
  .post-head, .cc-twrap { padding-left: 1.3rem; padding-right: 1.3rem; }
  .cc-header-slim { padding: 14px 1.3rem 12px; }
}
@media (max-width: 600px) {
  table.fates, table.fates tbody, table.fates tr, table.fates td { display: block; }
  table.fates tr:first-child { display: none; }
  table.fates tr { padding: 8px 0; border-bottom: 1px solid var(--cc-border-subtle); }
  table.fates tr:last-child { border-bottom: 0; }
  table.fates td { padding: 3px 14px; border: 0; }
  table.fates td:first-child { font-weight: 600; color: var(--cc-text); padding-top: 6px; }
  table.fates td[data-th]:not(:first-child)::before { content: attr(data-th) ': '; color: var(--cc-text-muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }
  table.fates td.mono { white-space: normal; }
}
@media (max-width: 480px) {
  .post-head { padding-top: 28px; }
  p { margin-bottom: 12px; }
  .fig { padding: 10px 10px 12px; }
  .tune-side { grid-template-columns: minmax(0, 1fr); }
  .profile-wrap { margin: 0 -12px; padding: 0 12px; }
  svg#profile { min-width: 540px; touch-action: pan-x pan-y; }
  .tune-body { padding: 12px 12px 14px; }
  .info-card { padding: 16px 18px 18px; }
}
