@import url("../../assets/fonts/fonts.css");

:root {
  --serif: "Newsreader", Georgia, serif;
  --prose: "Source Serif 4", Georgia, serif;
  --sans: "IBM Plex Sans", sans-serif;
  --mono: "IBM Plex Mono", monospace;
  --text-micro: 0.625rem;
  --text-label: 0.6875rem;
  --text-ui: 0.75rem;
  --text-data: 0.8125rem;
  --text-support: 0.875rem;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --container: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --response-fast: 120ms;
  --response-medium: 280ms;
  --response-slow: 520ms;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  color: inherit;
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

::selection {
  background: var(--accent-soft);
  color: var(--text);
}

.skip-link {
  position: fixed;
  top: var(--space-4);
  left: var(--space-4);
  z-index: 100;
  padding: 0.7rem 0.9rem;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: var(--text-ui);
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid transparent;
  transition: background-color 180ms var(--ease), border-color 180ms var(--ease);
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: var(--bg);
}

.header-inner,
.section-shell,
.site-footer {
  width: min(calc(100% - 3rem), var(--container));
  margin-inline: auto;
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  min-height: 4.5rem;
  font-family: var(--mono);
  font-size: var(--text-ui);
}

.brand {
  display: inline-flex;
  align-items: center;
  width: fit-content;
}

.brand-name {
  font-family: var(--serif);
  font-size: 1.18rem;
  font-weight: 500;
}

.site-nav {
  display: flex;
  gap: 1.6rem;
  justify-self: end;
  color: var(--muted);
}

.site-nav a {
  position: relative;
  padding-block: var(--space-2);
  transition: color 160ms ease;
}

.site-nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0.22rem;
  left: 0;
  height: 1px;
  background: var(--ink-soft);
  opacity: 0;
  transform: scaleX(0.3);
  transition: opacity 160ms ease, transform 180ms var(--ease);
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a.is-current,
.site-nav a[aria-current] {
  color: var(--accent);
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after,
.site-nav a.is-current::after,
.site-nav a[aria-current]::after {
  opacity: 1;
  transform: scaleX(1);
}

.header-place {
  justify-self: end;
  color: var(--faint);
  text-transform: uppercase;
}

.section-shell {
  scroll-margin-top: 5.5rem;
}

.opening {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(17rem, 0.42fr);
  column-gap: clamp(3rem, 9vw, 8.5rem);
  align-content: center;
  min-height: calc(100vh - 4.5rem);
  padding-block: clamp(4rem, 9vh, 7rem) 2.8rem;
}

.opening > * {
  min-width: 0;
}

.opening-copy {
  align-self: end;
}

.eyebrow,
.micro-label,
.article-state,
.model-symbol,
.model-target,
.model-live,
.model-facts,
.range-control,
.chart-data-state,
.source-note,
.market-clock,
.tool-state,
.site-footer {
  font-family: var(--mono);
}

.eyebrow,
.micro-label,
.article-state {
  color: var(--muted);
  font-size: var(--text-label);
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0 0 1.4rem;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1,
h2,
h3,
h4 {
  text-wrap: balance;
}

h1 {
  max-width: 11ch;
  margin-bottom: 1.6rem;
  font-family: var(--serif);
  font-size: clamp(3.8rem, 7.9vw, 7.7rem);
  font-weight: 400;
  letter-spacing: -0.052em;
  line-height: 0.86;
}

.opening-note {
  max-width: 40rem;
  margin-bottom: 0;
  color: var(--ink-soft);
  font-family: var(--prose);
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
}

.now-note {
  align-self: end;
  margin-bottom: 0.35rem;
  border-top: 1px solid var(--line-strong);
}

.now-note .micro-label {
  margin: 0;
  padding: 0.9rem 0 1.4rem;
}

.now-note p:not(.micro-label) {
  margin: 0;
  padding: 0.35rem 0;
  color: var(--ink-soft);
  font-family: var(--prose);
  font-size: 0.98rem;
}

.watchlist {
  grid-column: 1 / -1;
  align-self: end;
  margin-top: clamp(4rem, 10vh, 7.5rem);
  width: 100%;
  min-width: 0;
}

.watch-head {
  display: grid;
  grid-template-columns: auto minmax(2rem, 1fr) auto;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: center;
  padding: 0.5rem 0 0.85rem;
}

.watch-head::before {
  content: "";
  grid-column: 2;
  grid-row: 1;
  height: 1px;
  background: var(--line-strong);
}

.watch-head h2 {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
  font-family: var(--serif);
  font-size: 1.95rem;
  font-weight: 500;
}

.watch-actions {
  grid-column: 3;
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.market-clock {
  color: var(--faint);
  font-size: var(--text-data);
}

.watch-toggle {
  min-height: 2.75rem;
  border: 0;
  border-bottom: 1px solid transparent;
  padding: 0.35rem 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--mono);
  font-size: var(--text-data);
  transition: color 160ms ease, border-color 160ms ease;
}

.watch-toggle:hover,
.watch-toggle:focus-visible,
.watch-toggle[aria-expanded="true"] {
  border-color: var(--line-strong);
  color: var(--ink);
}

.watch-window {
  overflow: hidden;
}

.watch-grid {
  display: flex;
  width: max-content;
  min-width: 200%;
  will-change: transform;
  animation: watch-roll 300s linear infinite;
}

.watch-window:hover .watch-grid,
.watch-window:focus-within .watch-grid {
  animation-play-state: paused;
}

@keyframes watch-roll {
  to {
    transform: translateX(-50%);
  }
}

.watch-item {
  display: inline-flex;
  align-items: baseline;
  gap: 0.62rem;
  min-width: 0;
  border: 0;
  padding: 0.8rem 1.65rem 0.95rem;
  background: transparent;
  color: var(--muted);
  cursor: default;
  font-family: var(--mono);
  text-align: left;
  white-space: nowrap;
  opacity: 1;
  transition: color var(--response-fast) ease, opacity var(--response-medium) ease, transform var(--response-fast) var(--ease);
}

.watch-grid.is-engaged .watch-item {
  opacity: 0.4;
}

.watch-grid.is-engaged .watch-item.is-hovered,
.watch-grid.is-engaged .watch-item:focus-visible {
  opacity: 1;
}

button.watch-item {
  position: relative;
  cursor: pointer;
}

button.watch-item::after {
  content: "";
  position: absolute;
  right: 1.65rem;
  bottom: 0.48rem;
  left: 1.65rem;
  height: 1px;
  background: var(--ink-soft);
  opacity: 0.38;
  transform: scaleX(0.12);
  transform-origin: left center;
  transition: opacity var(--response-fast) ease, transform var(--response-medium) var(--ease);
}

button.watch-item .watch-item-symbol {
  color: var(--ink);
}

button.watch-item:hover,
button.watch-item:focus-visible {
  color: var(--ink);
  transform: translateY(-1px);
}

button.watch-item:hover::after,
button.watch-item:focus-visible::after,
button.watch-item.is-hovered::after {
  opacity: 0.9;
  transform: scaleX(1);
}

button.watch-item.is-activating {
  transform: translateY(1px);
}

button.watch-item.is-activating::after {
  opacity: 0;
  transform: translateY(0.35rem) scaleX(0.18);
}

.watch-item-symbol {
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 500;
}

.watch-item-price {
  color: var(--ink);
  font-size: 0.94rem;
}

.watch-item-change {
  font-size: var(--text-data);
}

.watch-item.is-up .watch-item-change {
  color: var(--positive);
}

.watch-item.is-down .watch-item-change {
  color: var(--negative);
}

.watch-details {
  display: none;
  grid-column: 1 / -1;
  gap: 0.7rem;
  color: var(--faint);
  font-size: var(--text-ui);
  white-space: nowrap;
}

.watchlist.is-expanded .watch-item {
  display: grid;
  grid-template-columns: auto auto auto;
  gap: 0.28rem 0.62rem;
}

.watchlist.is-expanded .watch-details {
  display: inline-flex;
}

.source-note {
  display: none;
  margin: 0;
  padding: 0.45rem 0 0.2rem;
  color: var(--faint);
  font-size: var(--text-micro);
}

.watchlist.is-expanded .source-note {
  display: block;
}

.content-section {
  padding-block: clamp(6rem, 11vw, 10rem);
}

.section-intro {
  max-width: none;
  margin-bottom: clamp(3rem, 6vw, 5.5rem);
}

.section-intro > div {
  --section-rule-gap: clamp(1.25rem, 3vw, 2.5rem);
  display: grid;
  grid-template-columns: auto minmax(2rem, 1fr);
  column-gap: var(--section-rule-gap);
  align-items: center;
}

.section-intro > div::after {
  content: "";
  grid-column: 2;
  grid-row: 1;
  height: 1px;
  margin-inline-end: var(--section-rule-gap);
  background: var(--line-strong);
}

.section-intro h2,
.contact-section h2 {
  margin-bottom: 0.7rem;
  font-family: var(--serif);
  font-size: clamp(3rem, 6vw, 6rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.88;
}

.section-intro h2 {
  grid-column: 1;
  grid-row: 1;
  margin-bottom: 0;
}

.section-intro h2 a {
  transition: color 140ms ease;
}

.section-intro h2 a:hover,
.section-intro h2 a:focus-visible {
  color: var(--accent);
}

.section-intro p:last-child,
.contact-section > div > p:last-child {
  grid-column: 1 / -1;
  grid-row: 2;
  max-width: 38rem;
  margin: 1rem 0 0;
  color: var(--muted);
  font-family: var(--prose);
  font-size: 1.08rem;
}

.article-shelves {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 7vw, 6.5rem);
}

.shelf-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0 0 1.4rem;
}

.shelf-head h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.65rem;
  font-weight: 500;
}

.article-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  min-height: 7.7rem;
  padding: var(--space-4) 0;
  transition: color var(--response-fast) ease;
}

a.article-row:hover h4,
a.article-row:focus-visible h4 {
  color: var(--accent);
}

.article-state {
  display: block;
  margin-bottom: 0.6rem;
}

.article-row.is-current .article-state {
  color: var(--clay);
}

.article-row h4 {
  max-width: 22ch;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2.3vw, 2rem);
  font-weight: 400;
  line-height: 1.05;
  transition: color var(--response-fast) ease;
}

.article-excerpt {
  max-width: 33rem;
  max-height: 0;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-family: var(--prose);
  font-size: 0.9rem;
  line-height: 1.45;
  opacity: 0;
  transform: translateY(0.35rem);
  transition: max-height var(--response-slow) var(--ease), margin-top var(--response-medium) var(--ease), opacity var(--response-medium) ease, transform var(--response-slow) var(--ease);
}

.article-row:hover .article-excerpt,
.article-row:focus-within .article-excerpt {
  max-height: 4rem;
  margin-top: 0.75rem;
  opacity: 1;
  transform: translateY(0);
}

@media (hover: none) {
  .article-row.is-current .article-excerpt {
    max-height: 4rem;
    margin-top: 0.75rem;
    opacity: 1;
    transform: translateY(0);
  }
}

.models-section {
  padding-bottom: clamp(7rem, 12vw, 11rem);
}

.models-intro {
  max-width: none;
}

.model-workbench {
  display: grid;
  grid-template-columns: minmax(16.5rem, 0.34fr) minmax(0, 1fr);
}

.model-list {
  border-right: 1px solid var(--line);
}

.model-option {
  position: relative;
  display: grid;
  grid-template-columns: 3.6rem minmax(0, 1fr) auto;
  gap: 0.35rem 0.8rem;
  align-items: baseline;
  width: 100%;
  min-height: 5.6rem;
  border: 0;
  padding: 1rem 1.25rem 1rem 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: padding-left 200ms var(--ease), background-color 160ms ease;
}

.model-option:last-child {
  border-bottom: 0;
}

.model-option::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  background: var(--accent);
  opacity: 0;
  transform: scaleY(0.2);
  transition: opacity 160ms ease, transform 220ms var(--ease);
}

.model-option:hover,
.model-option.is-active {
  padding-left: 1rem;
  background: var(--surface);
}

.model-option.is-active::before {
  opacity: 1;
  transform: scaleY(1);
}

.model-option.is-arriving {
  animation: model-arrival 700ms var(--ease) both;
}

@keyframes model-arrival {
  0% { background-color: var(--surface); }
  100% { background-color: transparent; }
}

.model-symbol {
  color: var(--ink-soft);
  font-size: var(--text-label);
}

.model-name {
  overflow: hidden;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 1.08rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-target {
  color: var(--target);
  font-size: var(--text-label);
}

.model-live {
  grid-column: 2 / -1;
  color: var(--muted);
  font-size: var(--text-micro);
}

.model-panel {
  min-width: 0;
  padding: clamp(1.25rem, 3vw, 2.3rem);
  background: transparent;
}

.model-panel-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-8);
  min-height: 8.8rem;
}

.model-copy {
  transition: opacity var(--response-medium) ease, transform var(--response-slow) var(--ease);
}

.model-copy.is-changing {
  opacity: 0.34;
  transform: translateY(0.25rem);
}

.model-copy h3 {
  margin: 0 0 0.55rem;
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.6rem);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 0.94;
}

.model-copy p {
  max-width: 37rem;
  margin-bottom: 0;
  color: var(--muted);
  font-family: var(--prose);
}

.model-facts {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: var(--space-6);
  align-content: start;
  margin: 0;
}

.model-summary {
  display: grid;
  gap: var(--space-4);
  align-content: start;
  justify-items: end;
}

.model-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem 1.1rem;
  font-family: var(--mono);
  font-size: var(--text-label);
}

.model-actions a {
  display: inline-flex;
  gap: 0.45rem;
  align-items: center;
  min-height: 2.25rem;
  border-bottom: 1px solid var(--line-strong);
  color: var(--ink-soft);
  transition: border-color var(--response-fast) ease, color var(--response-fast) ease;
}

.model-actions a:last-child {
  color: var(--muted);
}

.model-actions a:hover,
.model-actions a:focus-visible {
  border-color: var(--ink-soft);
  color: var(--ink);
}

#chart-price {
  color: var(--market);
}

#chart-target {
  color: var(--target);
}

.model-facts div {
  min-width: 5rem;
}

.model-facts dt {
  margin-bottom: 0.35rem;
  color: var(--faint);
  font-size: var(--text-micro);
  text-transform: uppercase;
}

.model-facts dd {
  margin: 0;
  color: var(--ink-soft);
  font-size: var(--text-data);
}

.model-facts dd.is-positive, .model-live .is-positive {
  color: var(--positive);
}

.model-facts dd.is-negative, .model-live .is-negative {
  color: var(--negative);
}

.chart-toolbar {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  align-items: center;
  margin-top: 1.1rem;
  padding-top: 0.35rem;
}

.range-control {
  display: flex;
  gap: var(--space-1);
  margin-top: 0.65rem;
}

.range-control button {
  min-width: 2.55rem;
  min-height: 1.9rem;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.28rem 0.55rem;
  background: transparent;
  color: var(--faint);
  cursor: pointer;
  font-size: var(--text-label);
  transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.range-control button:hover {
  color: var(--ink);
}

.range-control button.is-active {
  color: var(--accent);
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}

.chart-data-state {
  color: var(--faint);
  font-size: var(--text-micro);
}

.chart-stage {
  position: relative;
  min-height: 25rem;
  margin-top: 0.6rem;
  overflow: hidden;
  cursor: crosshair;
}

#model-chart {
  display: block;
  width: 100%;
  height: 25rem;
}

.chart-tooltip {
  position: absolute;
  z-index: 3;
  display: grid;
  gap: 0.08rem;
  min-width: 6.4rem;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  padding: 0.42rem 0.55rem;
  background: var(--bg);
  box-shadow: none;
  pointer-events: none;
  transform: translate(0.75rem, -50%);
  transition: left 70ms linear, top 70ms linear;
}

.chart-tooltip strong,
.chart-tooltip span {
  font-family: var(--mono);
  font-weight: 400;
}

.chart-tooltip strong {
  color: var(--ink);
  font-size: var(--text-ui);
}

.chart-tooltip span {
  color: var(--muted);
  font-size: var(--text-micro);
}

.chart-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--faint);
  font-family: var(--mono);
  font-size: var(--text-label);
}

.chart-empty[hidden],
.chart-tooltip[hidden] {
  display: none !important;
}

.tools-section {
  width: min(calc(100% - 3rem), var(--container));
  padding-bottom: clamp(6rem, 10vw, 9rem);
}

.tools-section .section-intro h2 {
  font-size: clamp(2.8rem, 5vw, 4.8rem);
}

.tool-list {
  display: grid;
  gap: clamp(1rem, 3vw, 2rem);
}

.tool-row {
  display: grid;
  grid-template-columns: minmax(16rem, 0.8fr) minmax(14rem, 1fr) 9rem;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  padding: 0.8rem 0;
}

.tool-row .micro-label {
  display: block;
  margin-bottom: var(--space-2);
  color: var(--muted);
}

.tool-row h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 400;
  transition: color var(--response-fast) ease;
}

.tool-row h3 a {
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent) 62%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.tool-row h3 a::after {
  content: " ↗";
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.62em;
}

.tool-row p {
  margin: 0;
  color: var(--muted);
  font-family: var(--prose);
}

.tool-state {
  justify-self: end;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 0.4rem 0.65rem;
  color: var(--faint);
  font-size: var(--text-micro);
  white-space: nowrap;
}

.tool-row h3 a:hover,
.tool-row h3 a:focus-visible,
.tool-row p a:hover,
.tool-row p a:focus-visible {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.tool-row p a {
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 0.2rem;
}

.contact-section {
  width: min(calc(100% - 3rem), var(--container));
  display: grid;
  grid-template-columns: auto minmax(2rem, 1fr) auto;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: center;
  padding-block: clamp(6rem, 11vw, 10rem);
}

.contact-section::before {
  content: "";
  grid-column: 2;
  grid-row: 1;
  height: 1px;
  background: var(--line-strong);
}

.contact-section > div {
  display: contents;
}

.contact-section h2 {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
  font-size: clamp(2.8rem, 5vw, 4.8rem);
}

.contact-section .micro-label {
  margin-bottom: var(--space-4);
}

.contact-link {
  grid-column: 3;
  grid-row: 1;
  display: inline-flex;
  gap: 1.3rem;
  align-items: center;
  margin: 0;
  border-bottom: 1px solid var(--line-strong);
  padding: 0.6rem 0;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: var(--text-ui);
  transition: color 160ms ease, border-color 160ms ease;
}

.contact-link:hover {
  border-color: var(--ink-soft);
  color: var(--ink);
}

/* Compatibility for the separate contact route while it shares this system. */
.brand-line {
  margin-left: var(--space-3);
  color: var(--faint);
  font-family: var(--mono);
  font-size: var(--text-micro);
}

.section-heading {
  max-width: 46rem;
  padding-top: clamp(7rem, 14vw, 11rem);
  padding-bottom: clamp(3rem, 7vw, 5rem);
}

.section-heading h1 {
  margin: 0 0 1rem;
  font-family: var(--serif);
  font-size: clamp(4rem, 10vw, 8rem);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 0.86;
}

.section-heading p:last-child {
  max-width: 42rem;
  color: var(--ink-soft);
  font-family: var(--prose);
  font-size: 1.08rem;
  line-height: 1.7;
}

.contact-fingerprint {
  color: var(--muted);
}

.section-heading a {
  color: var(--ink);
}

.section-kicker {
  margin: 0 0 1.2rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: var(--text-label);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.archive-list {
  border-top: 1px solid var(--line-strong);
}

.archive-list a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-6);
  align-items: center;
  min-height: 4rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  transition: color 160ms ease, padding-left 160ms var(--ease);
}

.archive-list a:hover {
  padding-left: 0.35rem;
  color: var(--ink);
}

.row-title {
  font-family: var(--prose);
  font-size: 1.05rem;
}

.row-meta {
  color: var(--faint);
  font-family: var(--mono);
  font-size: var(--text-label);
}

.contact-icon {
  display: block;
  opacity: 0.7;
  filter: invert(88%) sepia(8%) saturate(258%) hue-rotate(353deg) brightness(92%);
}

.contact-command {
  margin: 2rem 0 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  padding: 1rem 1.2rem;
  background: var(--paper-raised);
  color: var(--muted);
  font-family: var(--mono);
  font-size: var(--text-label);
}

.contact-fingerprint {
  margin: 1rem 0 clamp(6rem, 12vw, 10rem);
  font-family: var(--mono);
  font-size: var(--text-label);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: var(--space-8);
  padding: 1.4rem 0 6rem;
  color: var(--faint);
  font-size: var(--text-micro);
}

.site-footer p {
  margin: 0;
}

.radio-widget {
  position: fixed;
  right: var(--space-4);
  bottom: 1rem;
  z-index: 30;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--bg);
  box-shadow: none;
  font: var(--text-micro) var(--mono);
  transition: width 300ms cubic-bezier(0.2, 0, 0, 1);
}

.radio-widget.is-open { width: calc(40px + 12ch + 1rem); }
.radio-widget button {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  transition: transform 150ms ease, color 150ms ease;
}
.radio-widget button:active { transform: scale(0.96); }
.radio-widget button:hover { color: var(--ink); }
.radio-icon { width: 16px; height: 16px; fill: currentColor; }
.radio-loading {
  position: absolute;
  inset: 0;
  width: 38px;
  height: 38px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1;
  stroke-linecap: round;
  stroke-dasharray: 25 82;
  opacity: 0;
  transition: opacity 150ms ease;
  pointer-events: none;
}
.radio-widget.is-loading .radio-loading { opacity: 0.65; animation: radio-connect 1.2s linear infinite; }
@keyframes radio-connect { to { transform: rotate(360deg); } }
#music-label {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 14px;
  right: 40px;
  display: flex;
  align-items: center;
  overflow: hidden;
  white-space: nowrap;
  color: var(--muted);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateX(4px);
  transition: opacity 160ms ease, transform 260ms cubic-bezier(0.2, 0, 0, 1), visibility 0s linear 300ms;
}
.radio-widget.is-open #music-label { opacity: 1; visibility: visible; transform: translateX(0); transition-delay: 50ms, 0s, 0s; }
.radio-widget.is-error #music-label { color: var(--ink-soft); }

@media (max-width: 980px) {
  .opening {
    grid-template-columns: minmax(0, 1fr) minmax(15rem, 0.48fr);
    column-gap: 3rem;
  }

  .model-workbench {
    grid-template-columns: 14.5rem minmax(0, 1fr);
  }

  .model-panel-head {
    grid-template-columns: 1fr;
    gap: 1.4rem;
  }

  .model-facts {
    justify-content: start;
  }

  .model-summary {
    justify-items: start;
  }

  .model-actions {
    justify-content: flex-start;
  }

  .tool-row {
    grid-template-columns: 1fr 1fr;
  }

  .tool-state {
    grid-column: 2;
    justify-self: start;
  }
}

@media (max-width: 760px) {
  .header-inner,
  .section-shell,
  .site-footer {
    width: min(calc(100% - 2rem), var(--container));
  }

  .header-inner {
    grid-template-columns: 1fr auto;
  }

  .header-place {
    display: none;
  }

  .site-nav {
    gap: 0.9rem;
    font-size: var(--text-label);
  }

  .brand,
  .site-nav a {
    min-height: 2.75rem;
  }

  .site-nav a {
    display: inline-flex;
    align-items: center;
    padding-block: 0;
    white-space: nowrap;
  }

  .opening {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 5.5rem;
  }

  .opening-copy {
    align-self: start;
  }

  .now-note {
    margin-top: 3.5rem;
  }

  .watchlist {
    grid-column: 1;
    margin-top: 3.5rem;
  }

  .watch-item {
    width: 17rem;
    min-width: 17rem;
    padding-inline: 1rem;
  }

  .watchlist.is-expanded .watch-details {
    color: var(--muted);
    font-size: var(--text-ui);
    line-height: 1.5;
  }

  .watchlist.is-expanded .source-note {
    padding-top: 0.75rem;
    color: var(--muted);
    font-size: var(--text-ui);
    line-height: 1.5;
  }

  .article-shelves {
    grid-template-columns: 1fr;
  }

  .model-workbench {
    grid-template-columns: 1fr;
  }

  .model-actions a {
    min-height: 2.75rem;
  }

  .model-list {
    display: flex;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding-bottom: 0.7rem;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 0;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
  }

  .model-list::-webkit-scrollbar {
    display: none;
  }

  .model-option {
    flex: 0 0 min(20rem, calc(100vw - 4rem));
    border-right: 1px solid var(--line);
    border-bottom: 0;
    padding-left: 0.9rem;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  .model-option:hover,
  .model-option.is-active {
    padding-left: 0.9rem;
  }

  .model-option::before {
    top: auto;
    right: 0;
    bottom: 0;
    width: auto;
    height: 2px;
    transform: scaleX(0.2);
  }

  .model-option.is-active::before {
    transform: scaleX(1);
  }

  .chart-stage,
  #model-chart {
    min-height: 21rem;
    height: 21rem;
  }

  .contact-section {
    grid-template-columns: auto minmax(1rem, 1fr) auto;
  }

  .contact-link {
    justify-self: start;
    min-height: 2.75rem;
    margin-top: 0;
    padding-block: 0;
  }

  .tool-row h3 a {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
  }

  .site-footer {
    padding-bottom: 1rem;
  }

  .radio-widget {
    position: relative;
    right: auto;
    bottom: auto;
    margin: 0 1rem 2rem auto;
  }

}

@media (max-width: 540px) {
  .header-inner {
    grid-template-columns: minmax(0, 1fr);
    min-height: 5.5rem;
  }

  .brand-name {
    font-size: 1rem;
  }

  .site-nav {
    justify-content: space-between;
    justify-self: stretch;
    width: 100%;
    gap: 0;
    font-size: var(--text-ui);
  }

  .site-nav a:nth-child(3) {
    display: inline-flex;
  }

  h1 {
    font-size: clamp(3.45rem, 17vw, 5.3rem);
  }

  .watch-head {
    align-items: center;
  }

  .market-clock {
    display: none;
  }

  .article-row {
    min-height: 7rem;
  }

  .model-panel {
    padding-inline: 0;
  }

  .model-panel-head,
  .chart-toolbar {
    margin-inline: 1rem;
  }

  .model-facts {
    gap: 0.9rem;
  }

  .model-facts div {
    min-width: 0;
  }

  .chart-toolbar {
    align-items: flex-start;
  }

  .range-control {
    gap: 0;
  }

  .range-control button {
    min-width: 2.25rem;
  }

  .chart-data-state {
    max-width: 7rem;
    text-align: right;
  }

  .tool-row {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .tool-state {
    grid-column: 1;
  }

  .site-footer {
    display: grid;
  }

  .contact-section {
    grid-template-columns: auto minmax(0.25rem, 1fr) auto;
    gap: 0.5rem;
  }

  .contact-link {
    grid-column: 3;
    grid-row: 1;
    gap: 0.75rem;
    margin-top: 0;
  }
}

/* Main index: the horizontal header and marginal rail are two states of one navigation. */
.index-page .site-header {
  background: transparent;
  border-bottom-color: transparent;
  backdrop-filter: none;
  position: relative;
  width: 100%;
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 180ms ease,
    transform 260ms var(--ease),
    background-color 180ms var(--ease),
    border-color 180ms var(--ease);
}

/* Solid neutral backdrop keeps the navigation readable over the page. */
.index-page .site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  width: min(100%, calc(var(--container) + 5rem));
  margin-inline: auto;
  z-index: 0;
  pointer-events: none;
  background: var(--bg);
}

.index-page .site-header .header-inner { position: relative; z-index: 1; }

.index-page .site-header.is-transformed {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-0.5rem);
}

.index-page .site-header.is-compact {
  position: sticky;
  top: 0;
  visibility: visible;
  border-bottom-color: transparent;
  background: transparent;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  backdrop-filter: none;
}

.index-page .site-header.is-compact .header-inner {
  min-height: 3.75rem;
}

.section-rail {
  --rail-reveal: 0;
  position: fixed;
  top: 29vh;
  left: 1.2rem;
  z-index: 19;
  display: grid;
  grid-template-columns: minmax(5.3rem, auto) 1px;
  gap: var(--space-3);
  align-items: center;
  min-width: 6.4rem;
  visibility: hidden;
  color: var(--muted);
  font-family: var(--mono);
  font-size: var(--text-ui);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, visibility 0s linear 180ms;
}

.section-rail.is-active {
  visibility: visible;
  opacity: 1;
  transition-delay: 0s;
}

.section-rail.is-handoff {
  --rail-reveal: 1;
}

.section-rail-line {
  grid-column: 2;
  grid-row: 1;
  width: 1px;
  height: calc(3.4rem + (5.4rem * var(--rail-reveal)));
  justify-self: center;
  background: var(--ink-soft);
  opacity: calc(0.15 + (0.22 * var(--rail-reveal)));
  transition: height 360ms var(--ease), opacity 220ms ease;
}

.section-rail.is-awake .section-rail-line {
  opacity: calc(0.25 + (0.22 * var(--rail-reveal)));
}

.section-rail-nav {
  grid-column: 1;
  grid-row: 1;
  display: grid;
  gap: 0.18rem;
  justify-items: end;
  min-width: 0;
  text-align: right;
}

.section-rail-nav a {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 1.82rem;
  width: fit-content;
  padding-inline: 0 0.2rem;
  color: var(--ink-soft);
  opacity: var(--rail-reveal);
  pointer-events: none;
  transition:
    color var(--response-fast) ease,
    opacity 280ms ease;
}

.section-rail-nav a::after {
  content: "";
  position: absolute;
  right: 0.2rem;
  bottom: 0.2rem;
  left: 0;
  height: 1px;
  background: var(--ink-soft);
  opacity: 0;
  transform: scaleX(0.3);
  transform-origin: right center;
  transition: opacity var(--response-fast) ease, transform 180ms var(--ease);
}

.section-rail-nav a.is-current {
  margin-right: var(--space-1);
  color: var(--accent);
  opacity: var(--rail-reveal);
}

.section-rail-nav a.is-leaving {
  opacity: 0;
}

.section-rail.is-revealed .section-rail-nav a.is-leaving,
.section-rail.is-handoff .section-rail-nav a.is-leaving,
.section-rail:focus-within .section-rail-nav a.is-leaving {
  opacity: 0.42;
}

.section-rail:focus-within {
  --rail-reveal: 1;
}

.section-rail.is-revealed .section-rail-nav a,
.section-rail.is-handoff .section-rail-nav a,
.section-rail:focus-within .section-rail-nav a {
  pointer-events: auto;
  transition:
    color var(--response-fast) ease,
    opacity 180ms ease;
}

.section-rail-nav a:hover,
.section-rail-nav a:focus-visible {
  color: var(--ink);
  opacity: 0.9;
}

.section-rail-nav a:hover::after,
.section-rail-nav a:focus-visible::after {
  opacity: 1;
  transform: scaleX(1);
}

.index-page .opening {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-content: center;
  row-gap: clamp(5.5rem, 12vh, 7.5rem);
  min-height: calc(100svh - 4.5rem);
  padding-block: clamp(2.25rem, 5vh, 3.5rem);
}

.index-page .opening-copy {
  align-self: start;
}

.index-page h1 {
  max-width: 18ch;
  margin-bottom: 0.8rem;
  font-size: clamp(3.2rem, 6vw, 5.8rem);
  letter-spacing: -0.045em;
  line-height: 0.94;
}

.index-page .opening-note {
  width: fit-content;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: var(--text-support);
}

.index-page .watchlist {
  grid-column: 1;
  grid-row: 2;
  margin-top: 0;
}

.watch-toggle {
  display: inline-flex;
  gap: 0.45rem;
  align-items: center;
}

.watch-toggle-icon {
  width: 0.74rem;
  height: 0.62rem;
  overflow: visible;
}

.watch-toggle-icon path {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.25;

}

.watch-toggle-icon { transition: transform 260ms var(--ease); }
.watch-toggle[aria-expanded="true"] .watch-toggle-icon { transform: rotate(180deg); }

button.watch-item.is-selected {
  color: var(--ink);
}

button.watch-item.is-selected::after {
  opacity: 0.9;
  transform: scaleX(1);
}

.index-page .section-intro h2,
.index-page .contact-section h2 {
  font-size: clamp(2.55rem, 5.1vw, 5.1rem);
}

.index-page .tools-section .section-intro h2,
.index-page .contact-section h2 {
  font-size: clamp(2.38rem, 4.25vw, 4.1rem);
}

.index-page .models-section {
  padding-block: clamp(3.25rem, 6.5vh, 4.5rem);
}

.index-page .models-intro {
  margin-bottom: clamp(1.5rem, 3vh, 2.35rem);
}

.index-page .models-intro p:last-child {
  margin-top: 0.65rem;
  font-size: 0.98rem;
}

.index-page .model-workbench {
  grid-template-columns: minmax(14.5rem, 0.3fr) minmax(0, 1fr);
}

.index-page .model-option {
  min-height: 4.55rem;
  padding-block: 0.72rem;
}

.index-page .model-panel {
  padding: clamp(1rem, 2.1vw, 1.65rem);
}

.index-page .model-panel-head {
  gap: 1.4rem;
  min-height: 6.75rem;
}

.index-page .model-copy h3 {
  font-size: clamp(1.75rem, 3.15vw, 2.9rem);
}

.index-page .model-copy p {
  font-size: 0.92rem;
  line-height: 1.4;
}

.index-page .chart-toolbar {
  margin-top: 0.65rem;
}

.index-page .chart-stage,
.index-page #model-chart {
  min-height: 18rem;
  height: 18rem;
}

@media (min-width: 1360px) {
  .section-rail.is-available {
    display: grid;
  }
}

@media (max-width: 980px) {
  .index-page .model-panel-head {
    min-height: 0;
  }

  .index-page .model-workbench {
    grid-template-columns: 13.5rem minmax(0, 1fr);
  }

  .index-page .chart-stage,
  .index-page #model-chart {
    min-height: 19rem;
    height: 19rem;
  }
}

/* Touch controls are progressive enhancements; the existing links remain usable without JS. */
.mobile-nav-toggle,
.mobile-model-picker,
.watch-pause {
  display: none;
}

.watchlist.is-paused .watch-grid {
  animation-play-state: paused;
}

@media (max-width: 760px) {
  .index-page {
    --text-micro: 0.75rem;
    --text-label: 0.75rem;
    --text-ui: 0.875rem;
    --text-data: 0.875rem;
    padding-top: 5.5rem;
  }

  .index-page.mobile-ready {
    padding-top: 3.5rem;
  }

  .index-page .site-header,
  .index-page .site-header.is-transformed,
  .index-page .site-header.is-compact {
    position: fixed;
    top: 0;
    visibility: visible;
    border-bottom-color: transparent;
    background: transparent;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    backdrop-filter: none;
  }

  .index-page .site-header .header-inner,
  .index-page .site-header.is-compact .header-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 3.5rem;
  }

  .index-page .brand-name { font-size: 1.125rem; }

  .index-page .site-nav {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: space-between;
    gap: 0.5rem;
    font-family: var(--sans);
    font-size: 0.875rem;
  }

  .index-page.mobile-ready .site-nav { display: none; }
  .index-page.mobile-ready .is-menu-open .site-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 0.5rem 0 1rem;
  }

  .index-page .site-nav a { min-height: 2.75rem; }
  .index-page.mobile-ready .mobile-nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    min-height: 2.75rem;
    padding: 0.5rem 0 0.5rem 0.75rem;
    border: 0;
    background: transparent;
    font-family: var(--sans);
    font-size: 0.875rem;
    cursor: pointer;
  }
  .mobile-nav-toggle svg {
    width: 0.75rem;
    height: 0.625rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.25;
    transition: transform 160ms ease;
  }
  .mobile-nav-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
  .section-rail { display: none !important; }

  .index-page .section-shell { scroll-margin-top: 4.5rem; }
  .index-page .opening {
    align-content: start;
    row-gap: 0;
    min-height: auto;
    padding-block: 1.75rem 0;
  }
  .index-page h1 {
    max-width: 22ch;
    margin-bottom: 0.5rem;
    font-size: clamp(2rem, 5vw + 0.75rem, 2.5rem);
    letter-spacing: -0.03em;
    line-height: 1.08;
    text-wrap: pretty;
  }
  .index-page .opening-note { font-size: 0.875rem; }
  .index-page .watchlist { margin-top: 1.5rem; }
  .index-page .watch-head {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0;
  }
  .index-page .watch-head::before,
  .index-page .section-intro > div::after { display: none; }
  .index-page .watch-head h2 { font-size: 1.5rem; }
  .index-page .watch-actions { gap: 0.75rem; }
  .index-page .market-clock { display: none; }
  .index-page .watch-toggle,
  .index-page .watch-pause {
    min-width: 2.75rem;
    min-height: 2.75rem;
    padding: 0;
    font-family: var(--sans);
    font-size: 0.8125rem;
  }
  .index-page.mobile-ready .watch-pause {
    display: inline-flex;
    align-items: center;
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
  }
  .index-page .watch-item { width: auto; min-width: 0; padding-inline: 0.75rem; }
  .index-page .watchlist.is-expanded .watch-pause { display: none; }
  .index-page .watchlist.is-expanded .watch-window {
    max-height: 22rem;
    overflow: auto;
    mask-image: none;
    -webkit-mask-image: none;
    scrollbar-width: thin;
    scrollbar-color: var(--faint) var(--paper);
  }
  .index-page .watchlist.is-expanded .watch-grid {
    display: grid;
    width: 100%;
    min-width: 0;
    animation: none;
    transform: none;
    will-change: auto;
  }
  .index-page .watchlist.is-expanded .watch-item {
    width: 100%;
    grid-template-columns: 1fr 1fr 1fr;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--line);
  }
  .index-page .watchlist.is-expanded .watch-item[aria-hidden="true"] { display: none; }
  .index-page .watchlist.is-expanded .watch-details { justify-content: space-between; font-size: 0.75rem; }
  .index-page .watchlist.is-expanded .watch-item-price,
  .index-page .watchlist.is-expanded .watch-item-change { text-align: right; }
  .index-page .watchlist.is-expanded .watch-grid.is-engaged .watch-item { opacity: 1; }

  .index-page .content-section,
  .index-page .models-section,
  .index-page .contact-section { padding-block: 2.5rem 0; }
  .index-page .section-intro,
  .index-page .models-intro { margin-bottom: 1.25rem; }
  .index-page .section-intro > div { display: block; }
  .index-page .section-intro h2,
  .index-page .tools-section .section-intro h2,
  .index-page .contact-section h2 {
    font-size: 2rem;
    letter-spacing: -0.025em;
    line-height: 1.1;
  }
  .index-page .section-intro p:last-child {
    margin-top: 0.5rem;
    font-size: 1rem;
    line-height: 1.45;
  }
  .index-page .article-shelves { gap: 1.75rem; }
  .index-page .shelf-head { padding-bottom: 0.25rem; }
  .index-page .shelf-head h3 { font-size: 1.25rem; }
  .index-page .article-row { min-height: 0; padding-block: 0.75rem; }
  .index-page .article-state { margin-bottom: 0.35rem; }
  .index-page .article-row h4 { max-width: 30ch; font-size: 1.5rem; line-height: 1.15; }
  .index-page .article-row .article-excerpt {
    max-height: none;
    margin-top: 0.375rem;
    overflow: visible;
    font-size: 1rem;
    line-height: 1.45;
    opacity: 1;
    transform: none;
    transition: none;
  }

  .index-page.mobile-ready .mobile-model-picker {
    display: grid;
    gap: 0.375rem;
    margin-bottom: 1.25rem;
    color: var(--muted);
    font-size: 0.875rem;
  }
  .mobile-model-picker select {
    width: 100%;
    min-width: 0;
    min-height: 3rem;
    padding: 0.625rem;
    border: 1px solid var(--line-strong);
    border-radius: 0.25rem;
    background: var(--paper-raised);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 1rem;
  }
  .index-page.mobile-ready .model-list { display: none; }
  .index-page .model-workbench { grid-template-columns: minmax(0, 1fr); }
  .index-page .model-panel { display: flex; flex-direction: column; padding: 0; background: transparent; }
  .index-page .model-panel-head { margin: 0; min-height: 0; gap: 1rem; }
  .index-page .model-copy h3 { font-size: 1.75rem; line-height: 1.1; }
  .index-page .model-copy p { font-size: 1rem; line-height: 1.45; }
  .index-page .model-facts { gap: 1.25rem; }
  .index-page .model-facts dt { font-size: 0.75rem; }
  .index-page .model-facts dd { font-size: 1rem; }
  .index-page .model-actions { flex-wrap: wrap; gap: 0 1rem; }
  .index-page .model-actions a { font-size: 0.8125rem; }
  .index-page .chart-toolbar { display: contents; }
  .index-page .range-control {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.25rem;
    margin-top: 0.65rem;
  }
  .index-page .range-control button { min-width: 0; min-height: 2.75rem; font-size: 0.8125rem; }
  .index-page .chart-data-state { order: 2; max-width: none; margin-top: 0.75rem; text-align: left; font-size: 0.75rem; line-height: 1.5; }
  .index-page .chart-stage,
  .index-page #model-chart { min-height: 16rem; height: 16rem; }
  .index-page .chart-stage[aria-busy="true"] canvas { opacity: 0; }
  .index-page .chart-stage[aria-busy="true"]::after {
    content: "Cargando precios…";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: var(--paper);
    color: var(--muted);
    font-size: 0.875rem;
  }
  .index-page .tool-row { padding-block: 1rem; }
  .index-page .tool-row p { font-size: 1rem; line-height: 1.5; }
  .index-page .tool-state { font-size: 0.75rem; }
  .index-page .contact-section { margin-bottom: 2.5rem; }
  .index-page .contact-link { font-size: 0.8125rem; }
}

@media (max-width: 760px) and (prefers-reduced-motion: reduce) {
  .index-page .watch-grid { animation: none; transform: none; will-change: auto; }
  .index-page .watch-window { overflow-x: auto; }
  .index-page .watch-item[aria-hidden="true"],
  .index-page.mobile-ready .watch-pause { display: none; }
}

/* Desktop watchlist: one persistent tape, separate from the opening's layout. */
.desktop-watch-control,
.watch-nav,
.quote-panel { display: none; }
.quote-panel[hidden] { display: none !important; }

@media (min-width: 761px) {
  .index-page.ticker-ready { --ticker-height: 32px; }
  .index-page.desktop-watch-expanded { --ticker-height: 70px; }
  .index-page.ticker-ready .opening::after {
    content: "";
    grid-column: 1;
    grid-row: 2;
    height: var(--opening-watch-space, 8rem);
  }
  .ticker-ready .watchlist {
    position: fixed;
    inset: auto 0 0;
    z-index: 40;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    width: min(calc(100% - 3rem), var(--container));
    height: var(--ticker-height);
    margin: 0 auto;
    padding: 0;
    border: 0;
    background: transparent;
    backdrop-filter: none;
    color: var(--ink);
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    transition: height 260ms var(--ease), opacity 180ms ease, transform 240ms var(--ease), visibility 0s;
  }
  /* Solid neutral backdrop keeps quotes and controls readable. */
  .ticker-ready .watchlist::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: var(--bg);
  }
  .ticker-ready .watchlist.is-watch-hidden {
    opacity: 0;
    transform: translateY(100%);
    visibility: hidden;
    pointer-events: none;
    transition: opacity 180ms ease, transform 240ms var(--ease), visibility 0s 240ms;
  }
  .ticker-ready .watch-head { grid-column: 2; grid-row: 1; display: flex; padding: 0; gap: 0; }
  .ticker-ready .watch-head h2,
  .ticker-ready .watch-head::before,
  .ticker-ready .market-clock,
  .ticker-ready .watchlist .source-note { display: none; }
  .ticker-ready .watch-actions { display: flex; align-items: center; gap: 0.25rem; padding-left: 0.5rem; }
  .ticker-ready .watch-toggle { min-height: 30px; padding: 0 0.5rem; border: 0; font-size: 0.6875rem; }
  .ticker-ready .watch-window {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
  }
  .ticker-ready .watch-grid { min-width: 200%; animation-duration: 300s; }
  .ticker-ready .watch-item,
  .ticker-ready .watchlist.is-expanded .watch-item {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: max-content max-content minmax(6ch, 1fr);
    position: relative;
    grid-template-rows: 31px 0px;
    align-items: center;
    gap: 0 0.3rem;
    width: auto;
    min-width: 0;
    padding: 0 0.7rem;
    min-height: 31px;
    transition: grid-template-rows 260ms var(--ease), min-height 260ms var(--ease);
    font-size: 0.75rem;
    line-height: 1.5;
    font-variant-numeric: tabular-nums;
    transform: none;
  }
  .ticker-ready .watch-item::after { display: none; }
  .ticker-ready .watch-item-symbol,
  .ticker-ready button.watch-item .watch-item-symbol,
  .ticker-ready .watch-item-price { color: var(--ink); font-size: inherit; }
  .ticker-ready .watch-item-change { font-size: inherit; }
  .ticker-ready .watch-item.is-up .watch-item-change,
  .quote-panel .is-up { color: var(--positive); }
  .ticker-ready .watch-item.is-down .watch-item-change,
  .quote-panel .is-down { color: var(--negative); }
  .ticker-ready .watch-item.is-flat .watch-item-change,
  .quote-panel .is-flat { color: var(--muted); }
  .ticker-ready .watch-grid.is-engaged .watch-item { opacity: 1; }
  .ticker-ready .watch-item:hover { background: transparent; }
  .ticker-ready .watch-item:focus-visible { outline-offset: -2px; }
  .ticker-ready .watch-details {
    display: grid;
    grid-template-columns: max-content max-content;
    grid-column: auto;
    position: absolute;
    top: 31px;
    left: 0.7rem;
    right: 0.7rem;
    min-width: 0;
    max-height: 0;
    overflow: clip;
    opacity: 0;
    font-size: 0.6875rem;
    line-height: 1.5;
    gap: 0 0.45rem;
    transition: max-height 260ms var(--ease), opacity 180ms ease;
  }
  .ticker-ready .watchlist.is-expanded .watch-item { min-height: 69px; min-width: 0; grid-template-rows: 31px 37px; }
  .ticker-ready .watchlist.is-expanded .watch-details { display: grid; justify-content: start; max-height: 37px; opacity: 1; }
  .ticker-ready .watch-details [data-quote-volume] { grid-column: 1 / -1; }
  .ticker-ready .watch-item-price,
  .ticker-ready .watch-item-change { min-width: 6ch; }
  .ticker-ready .watch-item .quote-digit.is-padding { width: 0; flex-basis: 0; }
  .quote-number { display: inline-flex; white-space: pre; font-variant-numeric: tabular-nums; }
  .quote-digit { position: relative; display: inline-block; flex: 0 0 1ch; width: 1ch; height: 1.5em; overflow: hidden; vertical-align: bottom; }
  .quote-digit > span { display: block; }
  .quote-digit .quote-digit-old { position: absolute; inset: 0; }
  .ticker-ready .desktop-watch-control {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    min-height: 30px;
    border: 0;
    padding: 0.25rem;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
  }
  .desktop-watch-control svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
  .watch-pin[aria-pressed="true"] { color: var(--ink); background: transparent; }
  .watch-pin svg { transform: rotate(-35deg); transition: transform 180ms cubic-bezier(0.2, 0, 0, 1); }
  .watch-pin[aria-pressed="true"] svg { fill: currentColor; transform: rotate(0); }
  .watch-status { max-width: 8rem; min-width: 0; font-family: var(--mono); font-size: 0.625rem; cursor: default; }
  .watch-status:empty { display: none; }
  .ticker-ready .watch-nav { display: inline-flex; align-items: center; gap: 0.1rem; }
  .watch-nav button {
    min-height: 30px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--ink-soft);
    font: inherit;
    cursor: pointer;
    transition: color 150ms ease;
  }
  .watch-nav button:hover, .watch-nav button:focus-visible,
  .watch-nav button[aria-expanded="true"] { color: var(--ink); }
  .watch-stack-toggle { display: inline-flex; align-items: center; gap: 0.35rem; }
  .watch-stack-icon { opacity: 0.55; transition: opacity 150ms ease; }
  .watch-stack-values { opacity: 0; transition: opacity 150ms ease; }
  .watch-stack-toggle[aria-expanded="true"] .watch-stack-icon,
  .watch-stack-toggle[aria-expanded="true"] .watch-stack-values { opacity: 1; }
  .watch-nav .watch-pin { display: inline-flex; align-items: center; justify-content: center; width: 24px; }
  .watch-nav svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
  .section-rail .watch-nav { position: relative; padding-right: 0.2rem; opacity: var(--rail-reveal); pointer-events: none; transition: opacity 180ms ease; }
  .section-rail { left: 0.5rem; gap: 0.5rem; }
  .section-rail .watch-nav { gap: 0.25rem; }
  .section-rail .watch-nav .watch-pin { order: -1; }
  .section-rail:focus-within .watch-nav,
  .section-rail.is-revealed .watch-nav,
  .section-rail.is-handoff .watch-nav { pointer-events: auto; }
  .section-rail .watch-nav.is-recalling { opacity: 1; pointer-events: auto; }
  .section-rail-line { height: calc(3.4rem + (7.4rem * var(--rail-reveal))); }
  .ticker-ready .section-shell,
  .ticker-ready .site-footer {
    margin-left: max(1.5rem, calc((100% - var(--container)) / 2));
    margin-right: max(1.5rem, calc((100% - var(--container)) / 2));
    transition: width 280ms cubic-bezier(0.2, 0, 0, 1), margin-left 280ms cubic-bezier(0.2, 0, 0, 1), margin-right 280ms cubic-bezier(0.2, 0, 0, 1);
  }
  .ticker-ready .radio-widget { bottom: 1rem; }
  .index-page.ticker-ready .site-footer { padding-bottom: 4rem; }
}

@media (min-width: 761px) and (max-width: 1719px) {
  .index-page.has-quote-stack .section-shell,
  .index-page.has-quote-stack .site-footer {
    width: calc(100% - 296px);
    margin-left: 24px;
    margin-right: 272px;
  }
}
@media (min-width: 1360px) and (max-width: 1719px) {
  .index-page.has-quote-stack .section-shell,
  .index-page.has-quote-stack .site-footer { width: calc(100% - 416px); margin-left: 144px; }
}
@media (min-width: 761px) and (max-width: 1199px) {
  .index-page.has-quote-stack .article-shelves,
  .index-page.has-quote-stack .model-workbench,
  .index-page.has-quote-stack .model-panel-head,
  .index-page.has-quote-stack .tool-row { grid-template-columns: minmax(0, 1fr); }
  .index-page.has-quote-stack .tool-state { grid-column: 1; justify-self: start; }
  .index-page.has-quote-stack .model-facts { justify-content: start; }
  .index-page.has-quote-stack .model-summary { justify-items: start; }
  .index-page.has-quote-stack .opening h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
}

@media (min-width: 761px) and (prefers-reduced-motion: reduce) {
  .ticker-ready .watch-grid { animation: none; transform: none; will-change: auto; }
  .ticker-ready .watch-window { overflow-x: auto; scrollbar-width: thin; }
  .ticker-ready .watch-item[aria-hidden="true"] { display: none; }
}

/* Range pills unfold from the selected pill without moving the chart. */
.index-page .range-control.is-enhanced {
  --range-step: 2.7rem;
  --range-height: 2rem;
  position: relative;
  display: block;
  width: var(--range-step);
  max-width: 100%;
  height: var(--range-height);
}
.index-page .range-control.is-enhanced.is-expanded {
  width: calc(var(--range-step) * 5);
}
.index-page .range-control.is-enhanced button {
  position: absolute;
  inset: 0 auto auto 0;
  width: calc(var(--range-step) - 0.2rem);
  min-width: 0;
  min-height: var(--range-height);
  height: var(--range-height);
  padding: 0;
  border-color: transparent;
  background: var(--paper);
  opacity: 0;
  visibility: hidden;
  transform: translateX(0) scale(0.9);
  transition: transform 190ms cubic-bezier(0.22, 1, 0.36, 1), opacity 130ms ease,
    visibility 0s linear 190ms, color 160ms ease, border-color 160ms ease;
}
.index-page .range-control.is-enhanced button.is-active {
  z-index: 1;
  opacity: 1;
  visibility: visible;
  transform: translateX(0) scale(1);
  border-color: var(--line-strong);
  background: var(--paper-raised);
}
.index-page .range-control.is-enhanced.is-expanded button {
  opacity: 1;
  visibility: visible;
  transform: translateX(calc(var(--range-index) * var(--range-step))) scale(1);
  transition-duration: 320ms, 180ms, 0s, 160ms, 160ms;
  transition-delay: calc(var(--range-index) * 18ms), calc(var(--range-index) * 18ms), 0s, 0s, 0s;
}
@media (max-width: 760px), (pointer: coarse) {
  .index-page .range-control.is-enhanced {
    --range-step: 3rem;
    --range-height: 2.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .index-page .range-control.is-enhanced button {
    transition-delay: 0s;
  }

  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

}

/* Navigation moves only at the header/rail handoff, never during proximity reveals. */
.index-page .site-header.is-nav-morphing:not(.is-transformed) {
  opacity: 1;
  transform: none;
  transition: none;
}
.section-rail.is-nav-morphing.is-active { opacity: 1; transition: none; }

/* Blue identifies interaction; headings, metadata and ordinary values stay neutral. */
.model-option.is-active .model-symbol, .model-option:hover .model-symbol,
.watch-pin[aria-pressed="true"], .watch-nav button[aria-expanded="true"] { color: var(--accent); }
.index-page .range-control button.is-active { color: var(--accent); }
.contact-link, .tool-row p a { color: var(--accent); }
.model-actions a:hover, .model-actions a:focus-visible { color: var(--accent); border-color: currentColor; }
.radio-widget button:hover { color: var(--accent); }
.radio-widget.is-error #music-label { color: var(--danger); }

button.watch-item:hover .watch-item-symbol, button.watch-item:focus-visible .watch-item-symbol,
button.watch-item.is-selected .watch-item-symbol { color: var(--accent); }

/* Index surfaces stay open; overlapping controls use a strong neutral blur. */
body.index-page .site-header::before,
.index-page.ticker-ready .watchlist::before,
.index-page .chart-tooltip,
.index-page .radio-widget,
.index-page .theme-widget {
  background: color-mix(in srgb, var(--bg) 65%, transparent);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  border: 0;
  box-shadow: none;
}
.index-page .chart-tooltip { border-radius: 0; }
.index-page .model-option:hover,
.index-page .model-option.is-active { background: transparent; }
