/* Phoenix Feedback — precision-instrument
   ---------------------------------------------------------------
   Core ideas
   · dark-by-default, light via [data-theme="light"] on <html>
   · Geist (UI) + Geist Mono (ids, timestamps, numerics)
   · single coral accent (#ff6b4a) — used sparingly
   · surgical status bars (1px colored rail, not full borders)
   · subtle grain texture via inline SVG, no raster assets
   · motion: staggered list reveals, composed focus rings, crisp hovers
--------------------------------------------------------------- */

@import url("https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700&family=Geist+Mono:wght@400;500;600&display=swap");

/* --------------------------------------------------------------- *
 * Tokens
 * --------------------------------------------------------------- */
:root {
  color-scheme: dark;

  /* type */
  --font-ui: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;
  --text-xs: 11px;
  --text-sm: 12.5px;
  --text-base: 14px;
  --text-md: 15px;
  --text-lg: 17px;
  --text-xl: 22px;
  --text-2xl: 28px;
  --text-3xl: 36px;
  --tracking-wide: 0.14em;
  --tracking-loose: 0.06em;
  --leading: 1.55;

  /* dark surfaces */
  --bg: #0a0b0f;
  --surface: #111217;
  --surface-2: #161820;
  --surface-3: #1d2029;
  --line: #23262f;
  --line-2: #2d313c;

  /* text */
  --fg: #edeef2;
  --fg-2: #b2b5bf;
  --fg-3: #7a7d8a;
  --fg-4: #545764;

  /* accent — coral (warm, memorable, un-purple) */
  --accent: #ff6b4a;
  --accent-ink: #1a0c07;
  --accent-soft: color-mix(in oklab, var(--accent) 18%, transparent);
  --accent-glow: color-mix(in oklab, var(--accent) 35%, transparent);

  /* status */
  --status-open: #f4b740;
  --status-investigating: #5b9dff;
  --status-resolved: #3dd68c;
  --status-closed: #8a8d99;

  /* priority */
  --priority-low: #8a8d99;
  --priority-medium: #f4b740;
  --priority-high: #ff6b4a;

  /* feedback */
  --success: #3dd68c;
  --danger: #ff5277;

  /* shape & motion */
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --ring: 0 0 0 2px var(--bg), 0 0 0 3px var(--accent);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px -8px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 22px 60px -20px rgba(0, 0, 0, 0.7), 0 6px 16px rgba(0, 0, 0, 0.35);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur-fast: 120ms;
  --dur: 200ms;
  --dur-slow: 380ms;

  /* layout */
  --container: 1280px;
  --gutter: clamp(16px, 3vw, 32px);
  --nav-h: 56px;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f6f1;
  --surface: #ffffff;
  --surface-2: #f1efe8;
  --surface-3: #eae7df;
  --line: #e0ddd2;
  --line-2: #cecabf;
  --fg: #15161b;
  --fg-2: #4b4e58;
  --fg-3: #72757f;
  --fg-4: #9a9ca4;
  --accent-ink: #ffffff;
  --shadow-sm: 0 1px 2px rgba(25, 22, 16, 0.06);
  --shadow-md: 0 10px 30px -10px rgba(25, 22, 16, 0.18), 0 2px 6px rgba(25, 22, 16, 0.06);
  --shadow-lg: 0 24px 60px -20px rgba(25, 22, 16, 0.25), 0 6px 16px rgba(25, 22, 16, 0.08);
}

/* --------------------------------------------------------------- *
 * Reset + base
 * --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-ui);
  font-size: var(--text-base);
  line-height: var(--leading);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  /* grain — tiny SVG noise. barely-there texture that kills "flat website" feel */
  background-image:
    radial-gradient(1200px 600px at 10% -10%, color-mix(in oklab, var(--accent) 6%, transparent), transparent 60%),
    radial-gradient(900px 500px at 105% 10%, color-mix(in oklab, #5b9dff 5%, transparent), transparent 55%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.04 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-attachment: fixed;
  background-repeat: no-repeat, no-repeat, repeat;
}
[data-theme="light"] body {
  background-image:
    radial-gradient(1200px 600px at 10% -10%, color-mix(in oklab, var(--accent) 10%, transparent), transparent 60%),
    radial-gradient(900px 500px at 105% 10%, color-mix(in oklab, #5b9dff 8%, transparent), transparent 55%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.035 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

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

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

/* scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 99px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--line-2); }

/* --------------------------------------------------------------- *
 * Typography scale
 * --------------------------------------------------------------- */
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.012em; }
h1 { font-size: var(--text-2xl); line-height: 1.15; letter-spacing: -0.025em; }
h2 { font-size: var(--text-lg); line-height: 1.3; }
h3 { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: var(--tracking-wide); font-weight: 600; color: var(--fg-3); }
p { margin: 0; }

.mono { font-family: var(--font-mono); font-feature-settings: "ss02", "ss03"; font-variant-ligatures: none; }
.muted { color: var(--fg-3); }
.label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--fg-3);
  font-weight: 500;
}

/* --------------------------------------------------------------- *
 * Nav
 * --------------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 40;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  height: var(--nav-h);
  padding: 0 var(--gutter);
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.brand__mark {
  width: 22px; height: 22px;
  display: inline-grid; place-items: center;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 5px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--accent) 40%, transparent),
              0 6px 14px -4px var(--accent-glow);
}
.brand__word { font-size: var(--text-md); }
.brand__ver {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--fg-3);
  letter-spacing: 0.02em;
  padding-left: 2px;
}
.brand__status {
  margin-left: 10px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 8px;
  border-radius: 99px;
  background: color-mix(in oklab, var(--success) 12%, transparent);
  color: var(--success);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.02em;
}
.brand__status::before {
  content: "";
  width: 5px; height: 5px; border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px color-mix(in oklab, currentColor 20%, transparent);
  animation: pulse 2.4s var(--ease) infinite;
}

/* search */
.search {
  position: relative;
  max-width: 520px;
  width: 100%;
  justify-self: stretch;
  display: flex;
  align-items: center;
}
.search__input {
  width: 100%;
  height: 36px;
  padding: 0 80px 0 38px;
  background: var(--surface);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font: inherit;
  font-size: var(--text-sm);
  outline: none;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.search__input::placeholder { color: var(--fg-4); }
.search__input:focus {
  border-color: var(--accent);
  background: var(--surface-2);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.search__glyph {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--fg-3);
  font-family: var(--font-mono);
  font-size: 13px;
  pointer-events: none;
}
.search__kbd {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--fg-3);
  font-family: var(--font-mono);
  font-size: 10.5px;
}

.nav__right { display: inline-flex; align-items: center; gap: 10px; justify-self: end; }
.nav__user {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 10px 4px 4px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: var(--text-sm);
}

.form--inline { display: inline; }

/* --------------------------------------------------------------- *
 * Buttons
 * --------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 14px;
  height: 34px;
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--fg);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease),
              background var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease),
              color var(--dur) var(--ease);
}
.btn:hover { border-color: var(--line-2); background: var(--surface-3); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-soft); border-color: var(--accent); }

.btn--primary {
  background: linear-gradient(180deg, color-mix(in oklab, var(--accent) 100%, #fff 6%), var(--accent));
  color: var(--accent-ink);
  border-color: color-mix(in oklab, var(--accent) 60%, black);
  box-shadow: 0 1px 0 color-mix(in oklab, white 18%, transparent) inset,
              0 10px 24px -10px var(--accent-glow);
}
.btn--primary:hover { filter: brightness(1.05); border-color: color-mix(in oklab, var(--accent) 70%, black); background: linear-gradient(180deg, color-mix(in oklab, var(--accent) 100%, #fff 10%), var(--accent)); }

.btn--ghost { background: transparent; border-color: transparent; color: var(--fg-2); }
.btn--ghost:hover { background: var(--surface-2); color: var(--fg); border-color: var(--line); }

/* --------------------------------------------------------------- *
 * Deleted-state banner on the issue detail page
 * --------------------------------------------------------------- */
.deleted-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  margin: 14px 0 18px;
  background: color-mix(in oklab, var(--danger) 8%, var(--surface));
  border: 1px solid color-mix(in oklab, var(--danger) 30%, transparent);
  border-radius: var(--r-md);
  font-size: var(--text-sm);
}
.deleted-banner__mark {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  background: color-mix(in oklab, var(--danger) 20%, transparent);
  color: var(--danger);
  border-radius: 50%;
  font-size: 14px;
  flex: none;
}
.deleted-banner strong { display: block; margin-bottom: 2px; }

.btn--danger {
  color: var(--danger);
  border-color: color-mix(in oklab, var(--danger) 35%, transparent);
  background: color-mix(in oklab, var(--danger) 6%, transparent);
}
.btn--danger:hover {
  color: #fff;
  background: var(--danger);
  border-color: var(--danger);
  box-shadow: 0 4px 14px -4px color-mix(in oklab, var(--danger) 55%, transparent);
}
.btn--danger:active { transform: translateY(1px); }
.btn--danger:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--danger) 28%, transparent);
  border-color: var(--danger);
}

.btn--block { width: 100%; }
.btn--sm { height: 28px; padding: 4px 10px; font-size: var(--text-xs); letter-spacing: 0.01em; }

.btn__kbd { font-family: var(--font-mono); font-size: 10.5px; opacity: 0.7; }

/* --------------------------------------------------------------- *
 * Forms
 * --------------------------------------------------------------- */
.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > .label { margin-bottom: 0; }
.field__hint { font-size: var(--text-xs); color: var(--fg-3); }
.field__error { font-size: var(--text-xs); color: var(--danger); }

.ui-input {
  width: 100%;
  padding: 10px 12px;
  background: var(--surface);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font: inherit;
  font-size: var(--text-base);
  line-height: 1.45;
  outline: none;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.ui-input::placeholder { color: var(--fg-4); }
.ui-input:hover { border-color: var(--line-2); }
.ui-input:focus {
  border-color: var(--accent);
  background: var(--surface-2);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
textarea.ui-input { resize: vertical; min-height: 96px; line-height: 1.55; }
select.ui-input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--fg-3) 50%), linear-gradient(-45deg, transparent 50%, var(--fg-3) 50%); background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }

/* --------------------------------------------------------------- *
 * Layout
 * --------------------------------------------------------------- */
.container { max-width: var(--container); margin: 0 auto; padding: 32px var(--gutter); }
.container--narrow { max-width: 880px; }

.page-head {
  display: flex; align-items: end; justify-content: space-between; gap: 24px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.page-title {
  display: flex; align-items: baseline; gap: 14px;
}
.page-title h1 { font-size: clamp(28px, 3.2vw, 38px); letter-spacing: -0.028em; }
.page-title .count {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--fg-3);
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--surface);
}

/* --------------------------------------------------------------- *
 * Segmented tabs (status filter)
 * --------------------------------------------------------------- */
.tabs {
  display: inline-flex;
  padding: 3px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  gap: 2px;
}
.tab {
  position: relative;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px;
  border-radius: 7px;
  font-size: var(--text-sm);
  color: var(--fg-3);
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
  white-space: nowrap;
}
.tab:hover { color: var(--fg); background: var(--surface-2); text-decoration: none; }
.tab[data-active="true"] {
  color: var(--fg);
  background: var(--surface-3);
  box-shadow: inset 0 0 0 1px var(--line-2), 0 1px 0 rgba(255,255,255,0.02);
}
.tab__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--fg-4);
}
.tab[data-status="open"] .tab__dot { background: var(--status-open); }
.tab[data-status="investigating"] .tab__dot { background: var(--status-investigating); }
.tab[data-status="resolved"] .tab__dot { background: var(--status-resolved); }
.tab[data-status="all"] .tab__dot { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tab[data-status="deleted"] .tab__dot { background: var(--fg-4); }
.tab[data-status="deleted"][data-active="true"] { color: var(--danger); }
.tab__count { font-family: var(--font-mono); font-size: 10.5px; color: var(--fg-4); padding-left: 2px; }

/* --------------------------------------------------------------- *
 * Type groups on the issue list
 * --------------------------------------------------------------- */
.type-group + .type-group { margin-top: 28px; }
.type-group__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px;
  padding: 0 2px 10px;
  margin-bottom: 14px;
  border-bottom: 1px dashed var(--line);
}
.type-group__name {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--fg-3);
  font-weight: 600;
}
.type-group__count {
  font-size: 11px;
  color: var(--fg-4);
  padding: 2px 9px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--surface);
}

/* --------------------------------------------------------------- *
 * Cards — issue list
 * --------------------------------------------------------------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 14px;
}

.card {
  --rail: var(--fg-4);
  position: relative;
  display: flex; flex-direction: column;
  gap: 10px;
  padding: 16px 16px 14px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
  min-height: 150px;
  overflow: hidden;
  opacity: 0;
  animation: rise var(--dur-slow) var(--ease) forwards;
  animation-delay: calc(var(--stagger, 0) * 32ms);
}
.card::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--rail);
  opacity: 0.9;
  transition: width var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-2);
  text-decoration: none;
}
.card:hover::before { width: 3px; opacity: 1; }

.card[data-status="open"]           { --rail: var(--status-open); }
.card[data-status="investigating"]  { --rail: var(--status-investigating); }
.card[data-status="resolved"]       { --rail: var(--status-resolved); }
.card[data-status="closed"]         { --rail: var(--status-closed); }
.card[data-status="deleted"]        { --rail: var(--fg-4); opacity: 0.78; }
.card[data-status="deleted"]:hover  { opacity: 1; }

.card__meta-top {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--fg-4);
  letter-spacing: 0.03em;
}
.card__ids { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.card__id { text-transform: uppercase; }
.card__area {
  padding: 1px 6px;
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--fg-2);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

.card__title {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--fg);
  letter-spacing: -0.01em;
  line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card__desc {
  font-size: var(--text-sm);
  color: var(--fg-3);
  line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.card__foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px dashed color-mix(in oklab, var(--line) 60%, transparent);
  gap: 8px;
  flex-wrap: wrap;
}
.card__foot-left { display: inline-flex; align-items: center; gap: 8px; }
.card__time { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--fg-3); }

/* --------------------------------------------------------------- *
 * Pills, priority, avatars, tags
 * --------------------------------------------------------------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 9px 2px 8px;
  height: 22px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 99px;
  background: var(--surface-2);
  color: var(--fg-2);
  border: 1px solid var(--line);
}
.pill::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
}
.pill[data-status="open"]          { color: var(--status-open);          background: color-mix(in oklab, var(--status-open) 10%, transparent);          border-color: color-mix(in oklab, var(--status-open) 28%, transparent); }
.pill[data-status="investigating"] { color: var(--status-investigating); background: color-mix(in oklab, var(--status-investigating) 10%, transparent); border-color: color-mix(in oklab, var(--status-investigating) 28%, transparent); }
.pill[data-status="resolved"]      { color: var(--status-resolved);      background: color-mix(in oklab, var(--status-resolved) 10%, transparent);      border-color: color-mix(in oklab, var(--status-resolved) 28%, transparent); }
.pill[data-status="closed"]        { color: var(--status-closed);        background: color-mix(in oklab, var(--status-closed) 12%, transparent);        border-color: color-mix(in oklab, var(--status-closed) 28%, transparent); }
.pill[data-status="deleted"]       { color: var(--danger);               background: color-mix(in oklab, var(--danger) 10%, transparent);               border-color: color-mix(in oklab, var(--danger) 30%, transparent); }

.priority {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.priority::before {
  content: "·"; display: inline-block; margin-right: 6px; color: var(--priority-low);
  font-weight: 900; transform: translateY(-1px);
}
.priority[data-level="low"]::before     { content: "—"; color: var(--priority-low); }
.priority[data-level="medium"]::before  { content: "="; color: var(--priority-medium); }
.priority[data-level="high"]::before    { content: "≡"; color: var(--priority-high); }
.priority[data-level="high"] { color: var(--priority-high); font-weight: 500; }

.avatar {
  display: inline-grid; place-items: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--fg-4);
  color: white;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  flex: none;
  box-shadow: 0 0 0 1.5px var(--bg);
}
.avatar--sm { width: 20px; height: 20px; font-size: 9px; }
.avatar--lg { width: 34px; height: 34px; font-size: 12px; }

.tag {
  display: inline-flex; align-items: center;
  padding: 2px 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.02em;
  text-transform: lowercase;
  color: var(--fg-2);
  background: color-mix(in oklab, var(--tag-color, var(--accent)) 14%, transparent);
  border: 1px solid color-mix(in oklab, var(--tag-color, var(--accent)) 24%, transparent);
  border-radius: 4px;
}

/* --------------------------------------------------------------- *
 * Issue detail
 * --------------------------------------------------------------- */
.issue {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
}
@media (max-width: 900px) { .issue { grid-template-columns: 1fr; gap: 20px; } }

.issue__header {
  margin: 14px 0 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.crumb {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--fg-3);
  margin-bottom: 14px;
}
.crumb:hover { color: var(--fg); text-decoration: none; }
.crumb::before { content: "←"; color: var(--fg-4); }

.issue__id {
  display: inline-block;
  padding: 3px 9px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  color: var(--fg-3);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  margin-bottom: 8px;
}
.issue__title {
  font-size: clamp(26px, 3vw, 34px);
  letter-spacing: -0.028em;
  line-height: 1.15;
  margin-bottom: 14px;
}
.issue__meta {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: var(--text-sm);
  color: var(--fg-3);
}
.issue__meta .avatar { margin-right: -2px; }
.issue__actions { margin-top: 14px; display: inline-flex; gap: 8px; }

.prose {
  color: var(--fg);
  line-height: 1.6;
}
.prose p { margin: 0 0 12px; }
.prose p:last-child { margin: 0; }

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 16px;
}
.panel + .panel { margin-top: 14px; }
.panel h3 { margin-bottom: 10px; }

.side > * + * { margin-top: 14px; }

/* status segmented chooser in sidebar */
.status-switch {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}
.status-opt {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 10px;
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--fg-2);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--dur-fast) var(--ease);
}
.status-opt::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--clr, var(--fg-4));
}
.status-opt[data-status="open"]           { --clr: var(--status-open); }
.status-opt[data-status="investigating"]  { --clr: var(--status-investigating); }
.status-opt[data-status="resolved"]       { --clr: var(--status-resolved); }
.status-opt[data-status="closed"]         { --clr: var(--status-closed); }
.status-opt:hover { border-color: var(--line-2); background: var(--surface-3); color: var(--fg); }
.status-opt[data-current="true"] {
  border-color: color-mix(in oklab, var(--clr) 60%, transparent);
  background: color-mix(in oklab, var(--clr) 12%, var(--surface));
  color: var(--fg);
  box-shadow: 0 0 0 2px color-mix(in oklab, var(--clr) 18%, transparent);
}

.details {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 8px 12px;
  font-size: var(--text-sm);
}
.details dt { color: var(--fg-3); font-size: var(--text-xs); text-transform: uppercase; letter-spacing: var(--tracking-wide); padding-top: 2px; }
.details dd { margin: 0; color: var(--fg); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.history { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.history li { display: flex; align-items: center; gap: 8px; font-size: var(--text-xs); color: var(--fg-3); }

/* --------------------------------------------------------------- *
 * Comment thread
 * --------------------------------------------------------------- */
.thread { margin-top: 28px; }
.thread__head {
  display: flex; align-items: baseline; gap: 8px;
  margin-bottom: 14px;
}
.thread__head h2 {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--fg-3);
  font-weight: 600;
}
.thread__head .count { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--fg-4); }

.comment {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 12px;
  padding: 14px 14px 14px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  margin-bottom: 10px;
}
.comment__head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; font-size: var(--text-sm); }
.comment__author { font-weight: 600; color: var(--fg); }
.comment__time { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--fg-4); }
.comment__body { color: var(--fg); font-size: var(--text-base); line-height: 1.6; }

.composer {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 12px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  margin-top: 18px;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.composer:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.composer textarea { border: none; background: transparent; padding: 2px 0; min-height: 56px; box-shadow: none !important; }
.composer textarea:focus { box-shadow: none; }
.composer__actions { display: flex; justify-content: flex-end; margin-top: 8px; }

/* --------------------------------------------------------------- *
 * Auth
 * --------------------------------------------------------------- */
.auth {
  min-height: calc(100vh - var(--nav-h));
  display: grid; place-items: center;
  padding: 40px var(--gutter);
}
.auth__card {
  width: 100%;
  max-width: 400px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.auth__card::after {
  content: "";
  position: absolute; inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, color-mix(in oklab, var(--accent) 55%, transparent), transparent 40%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.6;
}
.auth__title { margin-bottom: 6px; font-size: var(--text-xl); letter-spacing: -0.02em; }
.auth__sub { color: var(--fg-3); font-size: var(--text-sm); margin-bottom: 20px; }
.auth__foot { margin-top: 18px; text-align: center; font-family: var(--font-mono); font-size: var(--text-xs); color: var(--fg-4); }

/* --------------------------------------------------------------- *
 * Messages, empty states
 * --------------------------------------------------------------- */
.messages {
  max-width: var(--container);
  margin: 12px auto 0;
  padding: 0 var(--gutter);
  display: flex; flex-direction: column; gap: 6px;
}
.message {
  padding: 10px 14px;
  font-size: var(--text-sm);
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-sm);
}
.message--success { border-left-color: var(--success); }
.message--error   { border-left-color: var(--danger); }

.empty {
  display: grid; place-items: center;
  padding: 80px 24px;
  background: var(--surface);
  border: 1px dashed var(--line-2);
  border-radius: var(--r-lg);
  text-align: center;
}
.empty__mark {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  font-family: var(--font-mono);
  color: var(--accent);
  margin-bottom: 14px;
  box-shadow: 0 10px 30px -10px var(--accent-glow);
}
.empty h2 { font-size: var(--text-lg); margin-bottom: 4px; }
.empty p { color: var(--fg-3); font-size: var(--text-sm); margin-bottom: 16px; }

/* pager */
.pager {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 24px;
  padding: 10px 0;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--fg-3);
}

/* --------------------------------------------------------------- *
 * Animations
 * --------------------------------------------------------------- */
@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px color-mix(in oklab, currentColor 20%, transparent); }
  50%      { box-shadow: 0 0 0 6px color-mix(in oklab, currentColor 0%, transparent); }
}
@keyframes fadein {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* --------------------------------------------------------------- *
 * Similar-issue panel on the create form
 * --------------------------------------------------------------- */
.similar {
  margin-top: -6px;
  padding: 12px 14px;
  background:
    linear-gradient(180deg, color-mix(in oklab, var(--accent) 8%, transparent), transparent 80%),
    var(--surface);
  border: 1px solid color-mix(in oklab, var(--accent) 35%, var(--line));
  border-radius: var(--r-md);
  animation: rise var(--dur-slow) var(--ease);
}
.similar__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  margin-bottom: 8px;
}
.similar__title { color: var(--accent); }
.similar__hint { font-size: 10.5px; }
.similar__list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.similar__item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
  text-decoration: none;
  color: var(--fg);
}
.similar__item:hover {
  background: var(--surface-2);
  border-color: var(--line);
  text-decoration: none;
}
.similar__id { font-size: 10.5px; color: var(--fg-4); text-transform: uppercase; letter-spacing: 0.03em; }
.similar__name { font-size: var(--text-sm); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.similar__meta { display: inline-flex; align-items: center; gap: 8px; }

/* --------------------------------------------------------------- *
 * Prose — rendered Markdown (description, comments)
 * --------------------------------------------------------------- */
.prose { color: var(--fg); line-height: 1.6; font-size: var(--text-base); }
.prose > * + * { margin-top: 0.85em; }
.prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6 {
  margin-top: 1.4em;
  letter-spacing: -0.01em;
  color: var(--fg);
  text-transform: none;
  font-weight: 600;
}
.prose h1 { font-size: 1.35em; }
.prose h2 { font-size: 1.18em; }
.prose h3 { font-size: 1.05em; letter-spacing: -0.005em; color: var(--fg); }
.prose h4, .prose h5, .prose h6 { font-size: 1em; color: var(--fg-2); }
.prose a { color: var(--accent); text-decoration: underline; text-decoration-color: color-mix(in oklab, var(--accent) 40%, transparent); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--accent); }
.prose code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  padding: 1px 6px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--fg);
}
.prose pre {
  font-family: var(--font-mono);
  font-size: 0.88em;
  padding: 14px 16px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow-x: auto;
  line-height: 1.55;
}
.prose pre code { padding: 0; background: transparent; border: 0; font-size: inherit; }
.prose blockquote {
  border-left: 2px solid var(--accent);
  padding: 2px 14px;
  color: var(--fg-2);
  background: color-mix(in oklab, var(--accent) 6%, transparent);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}
.prose ul, .prose ol { padding-left: 22px; }
.prose ul li, .prose ol li { margin: 3px 0; }
.prose hr { border: none; border-top: 1px dashed var(--line-2); margin: 1.4em 0; }
.prose img { max-width: 100%; height: auto; border-radius: var(--r-sm); border: 1px solid var(--line); }
.prose table {
  border-collapse: collapse;
  width: 100%;
  font-size: var(--text-sm);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  overflow: hidden;
}
.prose th, .prose td { padding: 8px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.prose th { background: var(--surface-2); font-weight: 600; color: var(--fg-2); text-transform: uppercase; letter-spacing: 0.04em; font-size: 10.5px; }
.prose tr:last-child td { border-bottom: 0; }

/* --------------------------------------------------------------- *
 * Attachments
 * --------------------------------------------------------------- */
.attachments { margin-top: 28px; }
.attach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.attach {
  position: relative;
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.attach:hover { border-color: var(--line-2); transform: translateY(-1px); box-shadow: var(--shadow-md); }

/* Hover-reveal delete button on each attachment */
.attach__delete {
  position: absolute;
  top: 6px; right: 6px;
  z-index: 2;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.attach:hover .attach__delete,
.attach__delete:focus-within { opacity: 1; transform: translateY(0); }

.attach__delete-btn {
  width: 26px; height: 26px;
  display: grid; place-items: center;
  background: color-mix(in oklab, #000 55%, transparent);
  color: #fff;
  border: 1px solid color-mix(in oklab, white 25%, transparent);
  border-radius: 50%;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: background var(--dur) var(--ease), transform var(--dur-fast) var(--ease), border-color var(--dur) var(--ease);
}
.attach__delete-btn:hover {
  background: var(--danger);
  border-color: var(--danger);
}
.attach__delete-btn:active { transform: scale(0.92); }

.attach__preview {
  display: block;
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--surface-2);
  overflow: hidden;
}
.attach__preview img, .attach__preview video {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.attach__preview--media video { object-fit: contain; background: #000; }
.attach__preview--audio {
  display: grid;
  grid-template-rows: 1fr auto;
  padding: 16px;
  aspect-ratio: auto;
  gap: 10px;
  background:
    radial-gradient(circle at 30% 30%, color-mix(in oklab, var(--accent) 14%, transparent), transparent 60%),
    var(--surface-2);
}
.attach__preview--audio audio { width: 100%; }
.attach__preview--file {
  display: grid; place-items: center;
  background:
    linear-gradient(135deg, var(--surface-2) 0%, color-mix(in oklab, var(--surface-2) 70%, var(--surface-3)) 100%);
}
.attach__kind-mark {
  font-family: var(--font-mono);
  font-size: 28px;
  color: var(--accent);
  text-shadow: 0 6px 20px var(--accent-glow);
  letter-spacing: 0;
}
.attach__cap {
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 12px;
  font-size: var(--text-sm);
  border-top: 1px solid var(--line);
}
.attach__name {
  font-weight: 500;
  color: var(--fg);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.attach__meta { font-size: 10.5px; color: var(--fg-3); }

/* --------------------------------------------------------------- *
 * Generic modal (for email form etc.) — native <dialog>
 * --------------------------------------------------------------- */
.modal {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--fg);
  padding: 0;
  border-radius: var(--r-md);
  max-width: 520px;
  width: 92vw;
  box-shadow: var(--shadow-lg);
  overflow: visible;
}
.modal::backdrop {
  background: color-mix(in oklab, #05070c 70%, transparent);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.modal[open] { animation: lightbox-pop 200ms var(--ease); }

.modal__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.modal__head h2 {
  font-size: var(--text-md);
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
}
.modal__close {
  background: none; border: none;
  color: var(--fg-3); cursor: pointer;
  font-size: 14px;
  padding: 4px 8px;
  border-radius: var(--r-xs);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.modal__close:hover { color: var(--fg); background: var(--surface-2); }

.modal__foot {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: 0 0 var(--r-md) var(--r-md);
}

.email-form {
  display: flex; flex-direction: column;
  gap: 14px;
  padding: 18px;
  margin: 0;
}
.email-form .modal__foot { margin: 4px -18px -18px; border-radius: 0 0 var(--r-md) var(--r-md); }

/* Checkbox row shared with any form */
.check {
  display: flex; align-items: center; gap: 10px;
  font-size: var(--text-sm);
  color: var(--fg);
  cursor: pointer;
  user-select: none;
}
.check input[type="checkbox"] {
  flex: none;
  width: 16px; height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}
.check input[disabled] { cursor: not-allowed; opacity: 0.5; }
.check input[disabled] ~ span { opacity: 0.6; }

/* --------------------------------------------------------------- *
 * Lightbox (native <dialog>)
 * --------------------------------------------------------------- */
.lightbox {
  position: relative;
  border: 0;
  padding: 0;
  background: transparent;
  color: #fff;
  max-width: 94vw;
  max-height: 94vh;
  overflow: visible;
}
.lightbox::backdrop {
  background: color-mix(in oklab, #05070c 88%, transparent);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: lightbox-in 160ms var(--ease);
}
.lightbox[open] { animation: lightbox-pop 200ms var(--ease); }

.lightbox__img {
  display: block;
  max-width: 94vw;
  max-height: 82vh;
  border-radius: var(--r-md);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.7);
  object-fit: contain;
  background: #000;
}
.lightbox__close {
  position: absolute;
  top: -44px;
  right: 0;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  background: color-mix(in oklab, white 6%, transparent);
  border: 1px solid color-mix(in oklab, white 20%, transparent);
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  transition: background var(--dur) var(--ease), transform var(--dur-fast) var(--ease), border-color var(--dur) var(--ease);
}
.lightbox__close:hover { background: color-mix(in oklab, white 14%, transparent); border-color: color-mix(in oklab, white 35%, transparent); }
.lightbox__close:active { transform: scale(0.94); }
.lightbox__caption {
  margin-top: 10px;
  text-align: center;
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.03em;
}

@keyframes lightbox-in  { from { opacity: 0; } to { opacity: 1; } }
@keyframes lightbox-pop { from { opacity: 0; transform: scale(0.985); } to { opacity: 1; transform: scale(1); } }

/* --------------------------------------------------------------- *
 * Uploader / Dropzone
 * --------------------------------------------------------------- */
.attach-tools {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}
.attach-tools .uploader { margin: 0; }

/* Record button — centered, typography matches the dropzone */
.record-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 22px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  color: var(--fg);
  cursor: pointer;
  font: inherit;
  text-align: center;
  transition: background var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              transform var(--dur-fast) var(--ease);
}
.record-btn:hover {
  background: color-mix(in oklab, var(--danger) 6%, var(--surface));
  border-color: color-mix(in oklab, var(--danger) 35%, var(--line));
}
.record-btn:hover .record-icon { transform: scale(1.06); }
.record-btn:active { transform: scale(0.997); }
.record-btn:focus-visible {
  outline: none;
  border-color: var(--danger);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--danger) 22%, transparent);
}
.record-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.record-btn:disabled:hover { background: var(--surface); border-color: var(--line); }

/* Icon + label + (collapsible) timer, centered on one row */
.record-btn__main {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

/* The morphing icon: red circle (record) → red square (stop) */
.record-icon {
  flex: none;
  width: 22px; height: 22px;
  background: var(--danger);
  border-radius: 50%;
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--danger) 16%, transparent);
  transition: border-radius var(--dur) var(--ease),
              transform var(--dur) var(--ease),
              width var(--dur) var(--ease),
              height var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease);
}

/* Typography matches the dropzone: --text-sm, weight 500, hint 11px/mono/fg-3 */
.record-btn__label {
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: 0;
}
.record-btn__hint {
  font-size: 11px;
  color: var(--fg-3);
  letter-spacing: 0.01em;
}
.record-btn__timer {
  font-size: var(--text-sm);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--fg-4);
  opacity: 0;
  max-width: 0;
  overflow: hidden;
  transition: opacity var(--dur) var(--ease),
              max-width var(--dur) var(--ease),
              color var(--dur) var(--ease);
}

/* Recording state — pink wash, morph the circle into a rounded square,
   slide the timer in from zero width, pulse a glow around the icon */
.record-btn.is-recording {
  border-color: color-mix(in oklab, var(--danger) 55%, transparent);
  background: color-mix(in oklab, var(--danger) 14%, var(--surface));
}
.record-btn.is-recording .record-icon {
  border-radius: 5px;
  width: 16px; height: 16px;
  animation: record-pulse 1.4s var(--ease) infinite;
}
.record-btn.is-recording .record-btn__label { color: var(--danger); }
.record-btn.is-recording .record-btn__hint  { color: var(--danger); opacity: 0.78; }
.record-btn.is-recording .record-btn__timer {
  opacity: 1;
  max-width: 80px;
  color: var(--danger);
}

@keyframes record-pulse {
  0%, 100% { box-shadow: 0 0 0 3px color-mix(in oklab, var(--danger) 30%, transparent); }
  50%      { box-shadow: 0 0 0 8px color-mix(in oklab, var(--danger) 0%, transparent); }
}

.uploader { margin-top: 4px; }
.dropzone {
  display: grid; place-items: center;
  padding: 28px 20px;
  text-align: center;
  background:
    radial-gradient(600px 200px at 50% 0%, color-mix(in oklab, var(--accent) 8%, transparent), transparent 70%),
    var(--surface);
  border: 1.5px dashed var(--line-2);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease), transform var(--dur) var(--ease);
  outline: none;
}
.dropzone:hover { border-color: var(--accent); }
.dropzone:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.dropzone.is-drop {
  border-color: var(--accent);
  border-style: solid;
  background:
    radial-gradient(600px 200px at 50% 0%, color-mix(in oklab, var(--accent) 20%, transparent), transparent 70%),
    color-mix(in oklab, var(--accent) 8%, var(--surface));
  transform: scale(1.005);
}
.dropzone.is-uploading { opacity: 0.6; pointer-events: none; }
.dropzone.is-uploading .dropzone__title::after { content: " — uploading…"; color: var(--fg-3); font-weight: 400; }

.dropzone__inner { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.dropzone__mark {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 22px;
  line-height: 1;
  transition: transform var(--dur) var(--ease);
}
.dropzone.is-drop .dropzone__mark { transform: scale(1.1); background: var(--accent); color: var(--accent-ink); }
.dropzone__title { font-size: var(--text-sm); font-weight: 500; }
.dropzone__hint { font-size: 11px; color: var(--fg-3); letter-spacing: 0.01em; }

/* composer tweaks (markdown hint on left) */
.composer__actions { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.composer__hint { font-size: 10.5px; }

/* respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-delay: 0ms !important; transition-duration: 0.001ms !important; }
}

/* --------------------------------------------------------------- *
 * Responsive
 * --------------------------------------------------------------- */
@media (max-width: 720px) {
  :root { --nav-h: 52px; }
  .brand__ver, .brand__status { display: none; }
  .search__kbd { display: none; }
  .nav__user .nav__user-name { display: none; }
  .container { padding: 20px var(--gutter); }
  .page-head { gap: 14px; }
  .tabs { overflow-x: auto; max-width: 100%; }
}
