/* ==========================================================================
   theme.css — Ayu Light
   Colour values extracted verbatim from Zed's bundled "Ayu Light" theme.
   Do not hand-tune these; regenerate with `bun run scripts/extract-theme.ts`.
   ========================================================================== */

/* ---- TX-02 (Berkeley Mono) ---------------------------------------------- */

@font-face {
  font-family: "TX-02";
  src: url("../fonts/TX-02-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "TX-02";
  src: url("../fonts/TX-02-Oblique.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "TX-02";
  src: url("../fonts/TX-02-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "TX-02";
  src: url("../fonts/TX-02-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "TX-02";
  src: url("../fonts/TX-02-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "TX-02";
  src: url("../fonts/TX-02-BoldOblique.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

/* ---- Tokens -------------------------------------------------------------- */

:root {
  /* Surfaces. Zed layers three greys: window chrome, panel, editor. */
  --bg-window: #dcddde; /* background          — title bar, status bar */
  --bg-panel: #ececed; /* surface.background  — docks, tab bar        */
  --bg-editor: #fcfcfc; /* editor.background   — prose, active tab     */
  --bg-elevated: #ececed; /* elevated_surface    — palette, popovers     */

  /* Borders */
  --border: #cfd1d2;
  --border-variant: #dfe0e1;
  --border-focused: #c4daf6;

  /* Text */
  --text: #5c6166;
  --text-muted: #8b8e92;
  --text-placeholder: #a9acae;
  --text-accent: #3b9ee5;
  --text-disabled: #b0b3b5;

  /* Interactive elements */
  --element-hover: #dfe0e1;
  --element-active: #cfd0d2;
  --element-selected: #cfd0d2;

  /* Editor furniture */
  --line-number: #b0b3b5;
  --line-number-active: #313435;
  --active-line: #ececedbf;
  --search-match: #3b9ee566;
  --scrollbar-thumb: #5c61664c;
  --scrollbar-track-border: #efeff0;

  /* Syntax — used by prose.css for code blocks and markdown accents */
  --syn-keyword: #fa8d3e;
  --syn-string: #86b300;
  --syn-function: #f2ad48;
  --syn-constant: #a37acc;
  --syn-comment: #abb0b6;
  --syn-operator: #ed9365;
  --syn-type: #389ee6;
  --syn-tag: #3b9ee5;
  --syn-punctuation: #73777b;
  --syn-link-uri: #85b304;
  --syn-link-text: #f98d3f;
  --syn-literal: #f98d3f; /* inline `code` */
  --syn-emphasis: #3b9ee5;
  --syn-error: #ff6666;
  --syn-added: #6cbf43;

  /* Typography */
  --font: "TX-02", ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;

  --ui-size: 14px; /* panel rows, tabs                */
  --ui-size-sm: 12px; /* status bar, section labels      */
  --buffer-size: 16px; /* prose                           */
  --ui-line: 1.4;
  --prose-line: 1.75;

  /* Metrics. Zed's own chrome heights. */
  --title-bar-h: 32px;
  --status-bar-h: 30px;
  --tab-h: 32px;
  --row-h: 26px; /* panel entry height              */

  /* Layout. `preferred_line_length: 74` from the user's Zed settings. */
  --measure: 74ch;
  --sidenote-w: 26ch;
  --sidenote-gap: 3ch;
  --dock-w: 260px;

  --radius: 4px;

  color-scheme: light;
}

/* Respect the OS reduced-motion setting — every transition here is decorative. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
