/* ============================================================
   Interject site styles
   Base reset + page chrome carried over from the design's inline
   <style>, plus the DC "style-hover"/"style-active" attributes
   converted into real CSS. Loaded after tokens.css.
   ============================================================ */

/* ---- The single accent knob -------------------------------
   The Claude Design prototype renders with its component prop
   default (#2563eb). Overriding --accent on :root here lets every
   color-mix() token in tokens.css recompute from it automatically.
   Swap this hex to re-theme the whole site (design offered:
   #7c3aed #2563eb #06b6d4 #f43f5e #22c55e).
   ------------------------------------------------------------ */
:root { --accent: #2563eb; }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg-app);
  color: var(--text-1);
  font-family: var(--font-mono);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-text); text-decoration: none; }
a:hover { color: var(--text-1); }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

/* ---- Keyframes (union of both pages) ----------------------- */
@keyframes ij-eq    { 0%,100% { transform: scaleY(0.22); } 50% { transform: scaleY(1); } }
@keyframes ij-caret { 0%,49%  { opacity: 1; } 50%,100% { opacity: 0; } }
@keyframes ij-level { 0% { width: 8%; } 95% { width: 92%; } 100% { width: 8%; } }

/* ---- Interactions (were style-hover / style-active) -------- */

/* Brand wordmark in the header brightens on hover */
.brand { transition: filter var(--dur-base) var(--ease); }
.brand:hover { filter: brightness(1.2); }

/* Primary download / CTA buttons */
.dl-btn {
  transition: background var(--dur-base) var(--ease),
              box-shadow var(--dur-base) var(--ease),
              border-color var(--dur-base) var(--ease),
              transform var(--dur-fast) var(--ease);
}
.dl-btn:not(.dl-btn--ghost):hover { background: var(--accent-strong); }
.dl-btn:active { transform: translateY(1px); }

/* Demoted (non-matching-OS) download button — set by app.js */
.dl-btn--ghost {
  background: transparent;
  border-color: var(--border-1);
  color: var(--text-2);
  box-shadow: none;
}
.dl-btn--ghost:hover { background: var(--surface-2); border-color: var(--accent-line); }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; }
}

/* ---- Documentation article (rendered README) --------------- */
.doc { color: var(--text-2); font-size: 14px; line-height: 1.75; }
.doc > *:first-child { margin-top: 0 !important; padding-top: 0 !important; border-top: none !important; }
.doc h2 {
  margin: 40px 0 14px; padding-top: 28px; border-top: 1px solid var(--border-1);
  font-size: 20px; line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; color: var(--text-1);
}
.doc h3 { margin: 26px 0 10px; font-size: 15px; font-weight: 600; color: var(--text-1); }
.doc p { margin: 0 0 14px; }
.doc ul, .doc ol { margin: 0 0 14px; padding-left: 20px; }
.doc li { margin: 0 0 6px; line-height: 1.65; }
.doc li:last-child { margin-bottom: 0; }
.doc li > ul, .doc li > ol { margin-top: 6px; margin-bottom: 0; }
.doc a { color: var(--accent-text); }
.doc a:hover { color: var(--text-1); }
.doc strong { color: var(--text-1); font-weight: 600; }
.doc code {
  font-family: var(--font-mono); font-size: 0.9em; color: var(--accent-text);
  background: var(--surface-1); border: 1px solid var(--border-1); border-radius: 4px; padding: 1px 5px;
}
.doc pre {
  margin: 0 0 16px; padding: 14px 16px; background: var(--bg-void);
  border: 1px solid var(--border-1); border-radius: var(--radius-3); overflow-x: auto;
}
.doc pre code { background: none; border: none; padding: 0; color: var(--text-2); font-size: 12px; line-height: 1.65; }
.doc hr { border: none; border-top: 1px solid var(--border-1); margin: 36px 0; }
.doc table { width: 100%; border-collapse: collapse; margin: 0 0 18px; font-size: 13px; }
.doc th, .doc td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--border-1); vertical-align: top; }
.doc th { color: var(--text-1); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; white-space: nowrap; }
.doc td { color: var(--text-2); }
.doc-toc { display: flex; flex-wrap: wrap; gap: 8px 10px; margin: 0 0 8px; padding: 0; list-style: none; }
.doc-toc a {
  display: inline-block; padding: 6px 12px; font-size: 12px; color: var(--text-2);
  background: var(--surface-1); border: 1px solid var(--border-1); border-radius: var(--radius-pill);
}
.doc-toc a:hover { color: var(--accent-text); border-color: var(--accent-line); }

/* ---- Desktop reading size bump ------------------------------
   Body copy is set with literal px inline throughout the markup
   (no rem/em scale to nudge from one place), so the standard
   reading sizes are bumped a notch here instead: 12/13/14/15px -> +1px,
   past ~desktop width only. `!important` is required because it's
   overriding inline `style="font-size:…"`, which normal cascade rules
   can't beat regardless of selector specificity. Values below that
   (badges, timestamps, eyebrow labels) and the clamp()-based display
   headings are left alone. ------------------------------------ */
@media (min-width: 1024px) {
  [style*="font-size: 12px"] { font-size: 13px !important; }
  [style*="font-size: 13px"] { font-size: 14px !important; }
  [style*="font-size: 14px"] { font-size: 15px !important; }
  [style*="font-size: 15px"] { font-size: 16px !important; }
  .doc { font-size: 15px; }
}
