/* Overclocked — intro module styles (js/intro.js). Class prefix: in-
 * Header intro copy, the "About" pill row + expandable panels, and the time-compression hero. */

/* ================================================================ intro copy */
.intro-copy p { margin: 0 0 20px; }
.intro-copy p:last-of-type { margin-bottom: 0; }
.intro-copy strong { font-weight: 700; }
.in-new { color: var(--accent); white-space: nowrap; }
.in-old { white-space: nowrap; }

/* pill row (buttons use the shared .pill style from base.css) */
.in-pills { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 0; }
.in-pill { position: relative; }

/* ================================================================ panels */
.in-drawer { height: 0; overflow: hidden; }
.in-drawer.is-animating { transition: height 440ms var(--ease); }
/* note: never set `display` on .in-panel — the [hidden] attribute controls visibility */
.in-panel { padding: 22px 0 6px; font-size: 18px; line-height: 27px; color: var(--ink-2); }
.in-panel p { margin: 0 0 14px; }
.in-panel p:last-child { margin-bottom: 0; }
.in-panel a { color: var(--ink); }
.in-panel a:hover { color: var(--accent); }
.in-panel.in-enter { animation: in-panel-in 460ms var(--ease) both; }
.in-panel.in-leaving { opacity: 0; transition: opacity 260ms var(--ease); }
@keyframes in-panel-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* the 1.2× rule, set as a formula chip */
.in-formula {
  display: inline-block; font-family: var(--mono); font-size: 13px; line-height: 20px; color: var(--ink);
  background: var(--bg-sunk); border: 1.5px solid var(--ink); border-radius: var(--radius);
  padding: 6px 11px;
}
.in-f-lhs { color: var(--accent); font-weight: 700; }

/* milestone table in "How is it faster?" */
.in-table-wrap { overflow-x: auto; margin: 2px 0 16px; -webkit-overflow-scrolling: touch; }
.in-table { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 12px; line-height: 16px; color: var(--ink); }
.in-table th {
  text-align: left; font-weight: 400; font-size: 10px; letter-spacing: .05em; text-transform: uppercase;
  color: var(--muted); padding: 0 10px 6px 0; border-bottom: 1.5px solid var(--ink); white-space: nowrap;
}
.in-table td { padding: 6px 10px 6px 0; border-bottom: 1px solid var(--rule); vertical-align: top; white-space: nowrap; }
.in-table td.in-t-name { white-space: normal; min-width: 9em; }
.in-table .in-t-num { text-align: right; padding-right: 0; }
.in-table .in-acc { color: var(--accent); font-weight: 700; }
.in-table tr.is-race .in-acc { color: var(--red); }
.in-table tr.is-fixed td { color: var(--muted); }
.in-table tr.is-fixed .in-acc { font-weight: 400; }

/* ================================================================ hero: time compression */
.hero-compress { position: relative; max-width: 1100px; margin: 40px 0 0; }
.in-hero-head {
  display: flex; align-items: center; gap: 12px;
  border-top: 1.5px solid var(--ink); padding-top: 9px; margin-bottom: 8px;
  font-family: var(--mono); font-size: 11px; line-height: 16px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted);
}
.in-hero-kicker { color: var(--ink); font-weight: 700; white-space: nowrap; }
.in-hero-sub { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.in-replay {
  flex: 0 0 auto; margin-left: auto;
  font: inherit; font-size: 10px; letter-spacing: .05em; text-transform: uppercase; color: var(--ink);
  background: transparent; border: 1.5px solid var(--ink); border-radius: 4px; padding: 1px 7px 1px 6px; cursor: pointer;
  transition: background .18s var(--ease), color .18s var(--ease);
}
.in-replay span { display: inline-block; transition: transform .5s var(--ease); }
.in-replay:hover { background: var(--ink); color: var(--bg); }
.in-replay:hover span { transform: rotate(-180deg); }

.in-hero-stage { position: relative; width: 100%; height: 176px; }
.in-hero-dots, .in-hero-svg { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
.in-hero-dots { pointer-events: none; }
.in-hero-svg { display: block; overflow: visible; cursor: pointer; -webkit-tap-highlight-color: transparent; }

/* --- svg: structure --- */
.in-layer-grid, .in-layer-lines, .in-layer-axis { pointer-events: none; }
.in-hero-svg text { font-family: var(--mono); }
.in-grid { stroke: var(--rule); stroke-width: 1; stroke-dasharray: 2 3; }
.in-anchor { stroke: var(--ink); stroke-width: 1.5; }
.in-line { stroke: var(--ink); stroke-width: 1.5; }
.in-arrow { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.in-lane rect { fill: var(--bg); stroke: var(--ink); stroke-width: 1.5; }
.in-lane text { fill: var(--ink); font-weight: 700; }
.in-lane.is-fast rect { fill: var(--accent); stroke: var(--accent); }
.in-lane.is-fast text { fill: var(--bg); }
.in-lane .in-lane-sub { fill: var(--muted); font-weight: 400; }
.in-axis { fill: var(--muted); }

/* --- svg: milestones --- */
.in-conn { stroke: var(--accent); stroke-width: 1.25; stroke-linecap: round; }
.in-conn.is-race { stroke: var(--red); }
.in-conn.is-fixed { stroke: var(--muted); stroke-dasharray: 3 3; }
.in-trail { stroke: var(--accent); stroke-width: 4; stroke-linecap: round; opacity: .28; }
.in-trail.is-race { stroke: var(--red); }
.in-ghost { stroke: var(--muted); stroke-width: 1; }
.in-tick-top { fill: var(--bg); stroke: var(--ink); stroke-width: 1.5; }
.in-tick-top.is-fixed { fill: var(--muted); stroke: var(--bg); stroke-width: 1; }
.in-twin { fill: var(--accent); stroke: var(--bg); stroke-width: 1.5; }
.in-twin.is-race { fill: var(--red); }
.in-twin.is-fixed { fill: var(--muted); stroke: var(--bg); }
.in-lead { stroke: var(--ink); stroke-width: 1; opacity: .4; }
.in-lab {
  font-weight: 700; fill: var(--ink);
  paint-order: stroke; stroke: var(--bg); stroke-width: 3px; stroke-linejoin: round;
}
.in-lab-top.is-race { fill: var(--red); }
.in-lab-top.is-fixed { fill: var(--ink-2); font-weight: 400; }
.in-lab-bot { fill: var(--accent); }
.in-lab-bot.is-race { fill: var(--red); }
.in-lab-bot.is-fixed { fill: var(--muted); font-weight: 400; }
.in-hit { stroke: transparent; stroke-width: 16; fill: none; pointer-events: stroke; }

/* --- svg: today --- */
.in-today-link { stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 0 4; stroke-linecap: round; }
.in-today-ring { fill: var(--bg); stroke: var(--accent); stroke-width: 1.5; }
.in-today-stem { stroke: var(--ink); stroke-width: 1; }
.in-today-dot { fill: var(--ink); stroke: var(--bg); stroke-width: 1.5; }
.in-today-pill rect { fill: var(--ink); }
.in-today-pill text { fill: var(--bg); font-weight: 700; }

/* --- hover / tap highlight: dim everything but the hot milestone --- */
.in-hero-svg [data-i] { transition: opacity .2s var(--ease), stroke-width .2s var(--ease); }
.in-hero-svg.is-hot [data-i]:not(.is-on) { opacity: .16; }
.in-hero-svg.is-hot .in-trail.is-on { opacity: .45; }
.in-hero-svg .in-conn.is-on { stroke-width: 2.25; }
.in-hero-svg .in-tick-top.is-on:not(.is-fixed) { stroke: var(--accent); }
.in-hero-svg .in-tick-top.is-race.is-on { stroke: var(--red); }
.in-hero-svg .in-lab-top.is-on:not(.is-fixed):not(.is-race) { fill: var(--accent); }
.in-hero-svg .in-lead.is-on { opacity: .8; }

/* --- caption / readout --- */
.in-hero-cap {
  margin: 8px 0 0; min-height: 16px;
  font-family: var(--mono); font-size: 11px; line-height: 16px; color: var(--ink-2);
}
.in-hero-cap b { color: var(--ink); font-weight: 700; }
.in-hero-cap .in-acc { color: var(--accent); }
.in-hero-cap .in-red { color: var(--red); }
.in-hint { color: var(--muted); }

/* screen-reader-only text version of the graphic */
.in-sr {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* ================================================================ responsive */
@media (max-width: 960px) {
  .in-pills { gap: 8px; margin-top: 22px; }
  .in-panel { font-size: 17px; line-height: 26px; }
  .hero-compress { margin-top: 32px; }
}
@media (max-width: 600px) {
  .in-hero-sub { display: none; }
  .in-hero-cap { min-height: 32px; }   /* reserve two lines so hover/tap readouts don't shift the page */
  .in-table { font-size: 11px; }
  .in-table td.in-t-name { min-width: 7.5em; }
  .in-formula { font-size: 12px; display: block; }
}
@media (hover: none) {
  .in-hero-svg { cursor: default; }
}
@media (prefers-reduced-motion: reduce) {
  .in-drawer.is-animating { transition: none; }
  .in-panel.in-enter { animation: none; }
}
