html, body {
  background: var(--bg-000);
  color: var(--fg-000);
  overflow-x: hidden;
  max-width: 100%;
}
body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  font-feature-settings: "ss01","cv02","tnum";
  min-height: 100vh;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -.015em;
  line-height: 1.08;
  color: var(--fg-000);
}
h1 { font-size: clamp(2.1rem, 4vw, 3.2rem); letter-spacing: -.025em; }
h2 { font-size: clamp(1.35rem, 2.2vw, 1.75rem); }
h3 { font-size: 1.02rem; letter-spacing: 0; }
h4 { font-size: .9rem; letter-spacing: .04em; text-transform: uppercase; color: var(--fg-300); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

a {
  color: var(--fg-000);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .15s var(--ease), color .15s var(--ease);
}
a:hover { color: var(--accent); border-bottom-color: var(--accent); }

.prose a { border-bottom-color: var(--fg-500); }
.prose a:hover { border-bottom-color: var(--accent); color: var(--accent); }

.muted { color: var(--fg-500); }

hr { border: 0; border-top: 1px solid var(--rule); margin: 1.6rem 0; }

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

/* Section reveal */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .55s var(--ease), transform .55s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

section {
  padding: clamp(2rem, 4vw, 3.5rem) 0;
  border-top: 1px solid var(--rule-soft);
}
section:first-of-type { border-top: 0; }

code, .mono { font-family: var(--font-mono); }

/* Skip link */
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 12px; top: 12px; background: var(--fg-000); color: var(--bg-000); padding: 8px 12px; z-index: 1000; }

/* Reusable price chip */
.chip {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  align-items: stretch;
  padding: 8px 14px;
  background: var(--bg-150);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  min-width: 92px;
  text-align: left;
  overflow: hidden;
  transition: background .18s var(--ease), border-color .18s var(--ease), transform .12s var(--ease), box-shadow .2s var(--ease);
}
.chip::after {
  /* Soft amber glow that slides in from the left on hover */
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 0%, rgba(224,160,70,.0) 35%, rgba(224,160,70,.18) 55%, rgba(224,160,70,.0) 75%, transparent 100%);
  transform: translateX(-100%);
  transition: transform .55s var(--ease);
  pointer-events: none;
}
.chip:hover {
  background: var(--bg-200);
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(224,160,70,.25), 0 6px 14px -10px rgba(224,160,70,.5);
}
.chip:hover::after { transform: translateX(100%); }
.chip:active { transform: translateY(1px); }
.chip:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.chip__label { font-size: .78rem; color: var(--fg-300); letter-spacing: .01em; position: relative; z-index: 1; }
.chip__price { font-family: var(--font-mono); font-size: 1.06rem; font-weight: 700; color: var(--fg-000); font-feature-settings: "tnum"; position: relative; z-index: 1; }
.chip.is-up    .chip__price { color: var(--up); }
.chip.is-down  .chip__price { color: var(--down); }
/* Price-tick blip on the corner — subtle data-update indicator */
.chip.has-tick::before {
  content: "";
  position: absolute; top: 6px; right: 6px;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent);
  opacity: .6;
  animation: chip-tick 2.4s ease-in-out infinite;
}
@keyframes chip-tick {
  0%, 80%, 100% { opacity: .35; transform: scale(.85); }
  10%, 25%      { opacity: 1;    transform: scale(1.15); }
}
@media (prefers-reduced-motion: reduce) {
  .chip.has-tick::before { animation: none; }
  .chip::after { display: none; }
}

/* Pill — small status / category tag */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  padding: 3px 8px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--fg-300);
  background: transparent;
}
.pill.is-accent { color: var(--accent); border-color: var(--accent-soft); }
.pill.is-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
