:root {
  --bg: #F6F7FB;
  --surface: #FFFFFF;
  --panel: #F6F7FB;
  --text: #14161F;
  --text-2: #454B5A;
  --muted: #6A7080;
  --line: #E4E7EE;
  --accent: #4F5FE8;
  --accent-ink: #3A48C9;
  --accent-hover: #3A48C9;
  --accent-soft: #EDEFFD;
  --record: #E5372C;
  --record-soft: #FDECEB;
  --success: #18804A;
  --success-soft: #E8F6EE;
  --warning: #9A5B00;
  --warning-soft: #FEF3E2;
  --speaker-1: #5B6B8C;
  --speaker-2: #B9773A;
  --speaker-3: #2F8A7C;
  --speaker-4: #8A5BC2;
  --shadow-sm: 0 2px 8px rgba(20, 22, 31, 0.04);
  --shadow-md: 0 12px 32px rgba(20, 22, 31, 0.08);
  --shadow-lg: 0 20px 48px rgba(20, 22, 31, 0.14);
  --card-hairline: rgba(20, 22, 31, 0.055);
  --shadow-card: 0 1px 2px rgba(20, 22, 31, 0.04), 0 4px 16px rgba(20, 22, 31, 0.025);
  --fw-body: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 720;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  color-scheme: light;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0E1016;
    --surface: #151821;
    --panel: #1C202B;
    --text: #F3F4F8;
    --text-2: #C2C7D6;
    --muted: #9CA3B5;
    --line: #282D3B;
    --accent: #5868DF;
    --accent-hover: #4655C9;
    --accent-ink: #8C98F8;
    --accent-soft: #232946;
    --record: #F04B40;
    --record-soft: #3A1D20;
    --success: #28A865;
    --success-soft: #183327;
    --warning: #D98A26;
    --warning-soft: #382916;
    --card-hairline: rgba(255, 255, 255, 0.06);
    --shadow-card: 0 2px 10px rgba(0, 0, 0, 0.24);
    --fw-body: 350;
    --fw-medium: 440;
    --fw-semibold: 520;
    --fw-bold: 620;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.55);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0E1016;
  --surface: #151821;
  --panel: #1C202B;
  --text: #F3F4F8;
  --text-2: #C2C7D6;
  --muted: #9CA3B5;
  --line: #282D3B;
  --accent: #5868DF;
  --accent-hover: #4655C9;
  --accent-ink: #8C98F8;
  --accent-soft: #232946;
  --record: #F04B40;
  --record-soft: #3A1D20;
  --success: #28A865;
  --success-soft: #183327;
  --warning: #D98A26;
  --warning-soft: #382916;
  --card-hairline: rgba(255, 255, 255, 0.06);
  --shadow-card: 0 2px 10px rgba(0, 0, 0, 0.24);
  --fw-body: 350;
  --fw-medium: 440;
  --fw-semibold: 520;
  --fw-bold: 620;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.55);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-weight: var(--fw-body);
  overflow-x: clip;
}

h1, h2, h3, h4 {
  font-weight: var(--fw-bold);
  text-wrap: balance;
}

p, li, blockquote, .segment-text-view {
  text-wrap: pretty;
}

strong, th {
  font-weight: var(--fw-semibold);
}

kbd, .playbar-time, .rec-timer, .cite-pill, .quota-card-top span, .chapter-range, .num, .status-pill {
  font-variant-numeric: tabular-nums;
}

a {
  color: var(--accent-ink);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.12rem 0.42rem;
  font-size: 0.75rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: var(--fw-medium);
  color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  line-height: 1.2;
}

/* Marketing Header & Layout (W01) */
header, main, footer, body > nav {
  max-width: 76rem;
  margin: auto;
  padding: 1.2rem 1.75rem;
}

header {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.site-header {
  max-width: 100%;
  padding: 0.9rem max(1.75rem, calc((100vw - 76rem) / 2));
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text);
}

.brand-link:hover {
  text-decoration: none;
}

.brand-mark-wrap, .logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  flex-shrink: 0;
}

.brand-wordmark {
  font-size: 1.05rem;
  font-weight: var(--fw-bold);
  letter-spacing: 0.04em;
  color: var(--text);
}

.logo {
  height: 1.85rem;
  width: auto;
  display: block;
}

header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.85rem;
  align-items: center;
}

header nav a {
  color: var(--text-2);
  font-weight: var(--fw-medium);
  font-size: 0.95rem;
  text-decoration: none;
}

header nav a:hover {
  color: var(--text);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.signin-link {
  color: var(--text);
  font-weight: var(--fw-semibold);
  font-size: 0.95rem;
  padding: 0.45rem 0.6rem;
  text-decoration: none;
}

/* Buttons & Controls */
.button, button, .secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.5rem;
  padding: 0.55rem 1.05rem;
  border-radius: 10px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: 0.92rem;
  font-weight: var(--fw-semibold);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.button:hover,
button:not([class]):hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
  text-decoration: none;
}

.pill-btn:hover {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent);
}

.pill-btn.active:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.secondary, button.secondary, a.secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--line);
}

.secondary:hover, button.secondary:hover, a.secondary:hover {
  background: var(--panel);
  border-color: var(--muted);
  text-decoration: none;
}

button.ghost, .ghost {
  background: transparent;
  color: var(--text-2);
  border-color: transparent;
  min-height: 2.1rem;
  padding: 0.35rem 0.65rem;
}

button.ghost:hover, .ghost:hover {
  background: var(--panel);
  color: var(--text);
}

button.danger, .danger {
  background: var(--record-soft);
  color: var(--record);
  border-color: transparent;
}

button.danger:hover, .danger:hover {
  background: var(--record);
  color: #fff;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea {
  min-height: 2.5rem;
  padding: 0.5rem 0.75rem;
  font: inherit;
  font-size: 0.92rem;
  color: var(--text);
  background: var(--panel);
  border: 1px solid transparent;
  box-shadow: inset 0 0 0 1px var(--card-hairline);
  border-radius: 10px;
  transition: box-shadow 0.16s ease, background-color 0.16s ease;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):focus, select:focus, textarea:focus {
  outline: none;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--card-hairline), 0 8px 24px rgba(20, 22, 31, 0.12);
}

input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
  -webkit-appearance: none;
  appearance: none;
}

input[type="checkbox"], input[type="radio"] {
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 1.05rem;
  height: 1.05rem;
  min-width: 1.05rem;
  min-height: 1.05rem;
  padding: 0;
  margin: 0;
  border: 1.5px solid var(--card-hairline, rgba(128, 134, 155, 0.42));
  background: var(--surface);
  border-radius: 5px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  vertical-align: middle;
  flex-shrink: 0;
  transition: background-color 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

input[type="radio"] {
  border-radius: 999px;
}

input[type="checkbox"]:hover, input[type="radio"]:hover {
  border-color: var(--accent);
}

input[type="checkbox"]:checked, input[type="radio"]:checked {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: none;
}

input[type="checkbox"]:checked::after {
  content: "";
  width: 0.62rem;
  height: 0.36rem;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translate(0.5px, -1px);
}

input[type="checkbox"]:indeterminate {
  background: var(--accent);
  border-color: var(--accent);
}

input[type="checkbox"]:indeterminate::after {
  content: "";
  width: 0.55rem;
  height: 2px;
  border-radius: 99px;
  background: #fff;
}

input[type="radio"]:checked::after {
  content: "";
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 999px;
  background: #fff;
}

input[type="checkbox"]:focus-visible, input[type="radio"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  box-shadow: none;
}

/* Marketing Hero (W01) */
.hero {
  display: grid;
  grid-template-columns: minmax(18rem, 1fr) minmax(20rem, 1.08fr);
  gap: 3rem;
  align-items: center;
  padding: 3rem 0 2.5rem;
}

h1 {
  font-size: clamp(2.35rem, 4.4vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0 0 1.1rem;
  font-weight: var(--fw-bold);
}

h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero > div > p {
  font-size: 1.12rem;
  color: var(--text-2);
  max-width: 34rem;
  margin: 0 0 1.5rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin: 1.35rem 0;
}

.actions .button, .actions .secondary {
  min-height: 2.9rem;
  padding: 0.7rem 1.35rem;
  font-size: 0.98rem;
  border-radius: 12px;
}

.trust {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  color: var(--muted);
  font-size: 0.92rem;
  margin: 1rem 0 0;
  font-weight: var(--fw-medium);
}

.lecture {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}

/* W01 Interactive Demo Card */
.audio-demo {
  position: relative;
  padding: 1.35rem 1.5rem 1.5rem;
  border: none;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-md), 0 0 0 1px var(--card-hairline);
}

.demo-card-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.demo-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.demo-head-text {
  flex: 1;
  min-width: 0;
}

.audio-demo h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: var(--fw-bold);
}

.demo-summary {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.demo-badge {
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: var(--fw-semibold);
}

.demo-waveform {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3px;
  height: 44px;
  padding: 0.5rem 0.75rem;
  background: var(--panel);
  border-radius: 10px;
  margin-bottom: 0.65rem;
  cursor: pointer;
}

.demo-waveform span {
  flex: 1;
  min-width: 3px;
  border-radius: 99px;
  background: var(--line);
  transition: background-color 0.15s ease;
}

.demo-waveform span.active {
  background: var(--accent);
}

.audio-demo audio {
  width: 100%;
  height: 2.1rem;
  margin: 0.25rem 0 0.85rem;
}

.demo-section-label {
  font-size: 0.72rem;
  font-weight: var(--fw-bold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.demo-takeaway-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  display: grid;
  gap: 0.55rem;
}

.demo-takeaway-list li {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--text);
}

.demo-takeaway-list li span::before {
  content: "• ";
  color: var(--accent);
  font-weight: var(--fw-bold);
}

.cite-pill, .audio-demo blockquote button {
  min-height: 1.65rem;
  padding: 0.15rem 0.55rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: var(--fw-semibold);
  font-variant-numeric: tabular-nums;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid transparent;
  flex-shrink: 0;
}

.audio-demo [aria-current="time"] {
  background: var(--accent);
  color: #fff;
}

@media (hover: hover) and (pointer: fine) {
  .cite-pill:not([aria-current]):hover,
  .audio-demo blockquote button:not([aria-current]):hover {
    background: var(--panel);
    color: var(--accent-ink);
  }
}

.demo-transcript-float {
  margin-top: 0.75rem;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  border: none;
  background: var(--panel);
  box-shadow: var(--shadow-md), 0 0 0 1px var(--card-hairline);
}

@media (min-width: 64rem) {
  .demo-transcript-float {
    position: relative;
    margin-left: 1.75rem;
    margin-right: -1rem;
    margin-bottom: -0.5rem;
  }
}

.demo-speaker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  font-size: 0.84rem;
  margin-bottom: 0.45rem;
}

.speaker-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--speaker-1);
}

.speaker-dot.s1 { background: var(--speaker-1); }
.speaker-dot.s2 { background: var(--speaker-2); }
.speaker-dot.s3 { background: var(--speaker-3); }
.speaker-dot.s4 { background: var(--speaker-4); }

.audio-demo blockquote {
  margin: 0.45rem 0;
  padding: 0.45rem 0.6rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 0.86rem;
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
}

.demo-credit {
  display: block;
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.75rem;
}

/* W01 Pillars */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
  margin: 1.5rem 0 2.75rem;
}

.pillar {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  padding: 1.15rem 1.3rem;
  border: none;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.pillar-icon {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pillar div {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.pillar strong {
  font-size: 1rem;
  font-weight: var(--fw-bold);
}

.pillar span {
  color: var(--muted);
  font-size: 0.9rem;
}

.below {
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.below details {
  background: var(--surface);
  border: none;
  box-shadow: var(--shadow-card);
  border-radius: 12px;
  padding: 0.85rem 1.1rem;
  margin-bottom: 0.65rem;
}

.below details .faq-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.22s ease-out;
}

.below details[open] .faq-body {
  grid-template-rows: 1fr;
}

.below details .faq-body > div {
  overflow: hidden;
}

.below summary {
  font-weight: var(--fw-semibold);
  cursor: pointer;
}

/* Footer */
.site-footer {
  padding-top: 2.75rem;
  padding-bottom: 2rem;
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 3rem;
}

.footer-top {
  display: flex;
  align-items: flex-start;
  gap: clamp(2rem, 6vw, 5rem);
  padding-bottom: 2rem;
}

.footer-brand { flex: none; min-height: 44px; }

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
  flex: 1;
  min-width: 0;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.footer-col h3 {
  font-size: 0.9rem;
  color: var(--text);
  margin: .65rem 0 .75rem;
}

.footer-col a {
  color: var(--muted);
  text-decoration: none;
  min-height: 36px;
  display: flex;
  align-items: center;
  overflow-wrap: anywhere;
}

.footer-col a:hover {
  color: var(--text);
}

.footer-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .5rem 2rem;
  padding-top: 1.5rem;
  box-shadow: 0 -1px 0 var(--card-hairline);
}

.footer-legal { grid-column: 1; display: flex; flex-wrap: wrap; gap: 0 1.5rem; }
.footer-legal a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); text-decoration: none; }
.footer-legal a:hover, .footer-col a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 4px; }
.footer-copyright { grid-column: 1; font-size: .85rem; }
.footer-language { grid-column: 2; grid-row: 1 / span 2; position: relative; display: flex; align-items: center; align-self: start; gap: .6rem; width: 18rem; max-width: 100%; min-height: 44px; padding-inline: .85rem; color: var(--text-2); background: var(--panel); border-radius: var(--radius-sm); }
.footer-language > svg { flex: none; pointer-events: none; }
.footer-language select { min-width: 0; width: 100%; padding-block: .6rem; padding-inline: 2.4rem 1.25rem; position: absolute; inset: 0; height: 100%; appearance: none; -webkit-appearance: none; background: transparent; box-shadow: none; border: 0; color: inherit; font-size: .9rem; cursor: pointer; text-overflow: ellipsis; }
.footer-language select:focus { background: transparent; box-shadow: inset 0 0 0 1px var(--card-hairline), 0 8px 24px rgba(20,22,31,.08); }
.footer-language-chevron { margin-inline-start: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

@media (max-width: 56rem) {
  .footer-top { flex-direction: column; gap: 1.25rem; }
  .footer-grid { width: 100%; }
  .footer-bottom { gap: .75rem 1rem; }
  .footer-legal { grid-column: 1 / -1; grid-row: 2; }
  .footer-language { grid-column: 2; grid-row: 1; }
  .footer-copyright { grid-column: 1; grid-row: 1; align-self: center; }
}

@media (max-width: 47.99rem) {
  .site-footer { padding-top: 1.75rem; margin-top: 2rem; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 1rem; }
  .footer-col a { min-height: 44px; }
  .footer-bottom { display: flex; flex-direction: column; align-items: flex-start; gap: .75rem; }
  .footer-language { order: 0; width: 100%; max-width: 20rem; }
  .footer-language select { font-size: 1rem; }
  .footer-legal { order: 1; gap: 0 1.25rem; }
  .footer-copyright { order: 2; align-self: auto; }
}

/* ==========================================================================
   WORKSPACE SHELL (W07 - W22)
   ========================================================================== */
.workspace-bar {
  max-width: none;
  min-height: 3.75rem;
  height: auto;
  padding: 0.45rem 1.25rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  position: sticky;
  top: 0;
  z-index: 30;
}

@media (max-width: 62rem) and (min-width: 48rem) {
  .workspace-bar {
    padding: 0.45rem 1rem;
    gap: 0.65rem;
  }
  .workspace-search {
    min-width: 10rem;
    max-width: 18rem;
  }
  .workspace-search kbd {
    display: none;
  }
}

.workspace-search {
  flex: 1;
  max-width: 30rem;
  height: 2.35rem;
  padding: 0 0.85rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.9rem;
  text-decoration: none;
}

.workspace-search:hover {
  border-color: var(--accent);
  text-decoration: none;
  color: var(--text);
}

.workspace-search span {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.workspace-top-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.rec-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
}

.avatar-btn {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: var(--fw-bold);
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: 1px solid var(--line);
}

.avatar-btn:hover {
  border-color: var(--accent);
  text-decoration: none;
}

#menu-toggle {
  display: none;
}

.desk {
  max-width: none;
  min-height: calc(100vh - 3.75rem);
  padding: 0;
  display: grid;
  grid-template-columns: 14.5rem minmax(0, 1fr);
  transition: grid-template-columns 0.16s ease-out;
}

.workspace-bar-left {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.sidebar-collapse-btn {
  width: 2.15rem;
  height: 2.15rem;
  min-height: 2.15rem;
  padding: 0;
  border-radius: 8px;
  color: var(--muted);
}

.sidebar-collapse-btn:hover {
  color: var(--text);
}

:root.sidebar-collapsed .desk {
  grid-template-columns: 4.25rem minmax(0, 1fr);
}

:root.sidebar-collapsed #workspace-nav {
  padding: 0.95rem 0.5rem;
  align-items: center;
}

:root.sidebar-collapsed #workspace-nav .nav-label,
:root.sidebar-collapsed #workspace-nav kbd,
:root.sidebar-collapsed .nav-folders-section,
:root.sidebar-collapsed .sidebar-quota-card {
  display: none;
}

:root.sidebar-collapsed #workspace-nav a[data-nav] {
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
}

:root.sidebar-collapsed #workspace-nav .nav-group {
  align-items: center;
}

@media (max-width: 56rem) {
  .sidebar-collapse-btn {
    display: none;
  }
}

#workspace-nav {
  border-right: 1px solid var(--line);
  background: var(--surface);
  padding: 0.95rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  height: calc(100vh - 3.75rem);
  position: sticky;
  top: 3.75rem;
  overflow-y: auto;
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

#workspace-nav a[data-nav] {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.7rem;
  border-radius: 9px;
  color: var(--text-2);
  font-size: 0.92rem;
  font-weight: var(--fw-medium);
  text-decoration: none;
}

#workspace-nav a[data-nav]:hover {
  background: var(--panel);
  color: var(--text);
}

#workspace-nav a[data-nav][aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: var(--fw-semibold);
}

#workspace-nav a[data-nav] .nav-label {
  flex: 1;
}

.nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: currentColor;
  opacity: 0.85;
}

.nav-folders-section {
  padding-top: 0.5rem;
  border-top: 1px solid var(--line);
}

.nav-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.7rem 0.35rem;
  font-size: 0.7rem;
  font-weight: var(--fw-bold);
  letter-spacing: 0.06em;
  color: var(--muted);
}

.folder-manage-link {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: var(--fw-bold);
  text-decoration: none;
}

.sidebar-folders-list {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.sidebar-folder-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
  color: var(--text-2);
  font-size: 0.88rem;
  text-decoration: none;
}

.sidebar-folder-item:hover {
  background: var(--panel);
  color: var(--text);
  text-decoration: none;
}

.sidebar-folder-item span:nth-child(2) {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-folder-item small {
  color: var(--muted);
  font-size: 0.78rem;
}

.nav-more {
  padding-top: 0.35rem;
  border-top: 1px solid var(--line);
}

.sidebar-quota-card {
  margin-top: auto;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--text);
  display: block;
}

.sidebar-quota-card:hover {
  border-color: var(--accent);
  text-decoration: none;
}

.quota-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  margin-bottom: 0.45rem;
}

.quota-card-top span {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.quota-bar {
  height: 6px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}

.quota-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
}

.workspace-content {
  padding: 1.75rem 2.25rem 3rem;
  max-width: 72rem;
  width: 100%;
  margin: 0 auto;
}

.view-loading { display: grid; place-items: center; min-height: calc(100dvh - 9rem); margin: 0; }
.view-loading-wave { display: flex; align-items: center; justify-content: center; gap: .3rem; height: 2.25rem; }
.view-loading-wave > span { width: .25rem; height: 1rem; border-radius: 999px; background: var(--accent); animation: loading-audio-wave 1s ease-in-out infinite; }
.view-loading-wave > span:nth-child(1), .view-loading-wave > span:nth-child(5) { height: .65rem; }
.view-loading-wave > span:nth-child(2), .view-loading-wave > span:nth-child(4) { height: 1.3rem; }
.view-loading-wave > span:nth-child(2) { animation-delay: -.8s; }
.view-loading-wave > span:nth-child(3) { height: 2rem; animation-delay: -.6s; }
.view-loading-wave > span:nth-child(4) { animation-delay: -.4s; }
.view-loading-wave > span:nth-child(5) { animation-delay: -.2s; }
@keyframes loading-audio-wave { 0%, 100% { transform: scaleY(.45); opacity: .55; } 50% { transform: scaleY(1); opacity: 1; } }
@media (max-width: 767px) { .view-loading { min-height: calc(100dvh - 12rem); } }
@media (prefers-reduced-motion: reduce) { .view-loading-wave > span { animation: none; } }

#status:not(:empty) {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 0.9rem;
  font-weight: var(--fw-medium);
}

/* ==========================================================================
   W07 WORKSPACE HOME
   ========================================================================== */
.home-greeting {
  font-size: 1.65rem;
  font-weight: var(--fw-bold);
  letter-spacing: -0.02em;
  margin: 0 0 1.25rem;
}

.home-top-grid, .home-bottom-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.card, .surface-card {
  background: var(--surface);
  border: none;
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.5rem;
  box-shadow: var(--shadow-card);
}

.record-hero-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 14.5rem;
}

.big-mic-btn {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: 6px solid var(--accent-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-bottom: 0.7rem;
  box-shadow: 0 8px 20px rgba(79, 95, 232, 0.28);
  transition: transform 0.15s ease;
}

@media (hover: hover) and (pointer: fine) {
  .big-mic-btn:hover {
    transform: scale(1.04);
    background: var(--accent-ink);
  }
}

.record-hero-card h2 {
  margin: 0 0 0.65rem;
  font-size: 1.15rem;
}

.scenario-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  margin-bottom: 0.7rem;
}

.pill-btn {
  min-height: 1.9rem;
  padding: 0.25rem 0.75rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: var(--fw-semibold);
  background: var(--panel);
  color: var(--text-2);
  border: 1px solid var(--line);
}

.pill-btn.active, .pill-btn[aria-pressed="true"] {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent);
}

.mic-inline-select {
  font-size: 0.82rem;
  color: var(--muted);
  border: none;
  background: transparent;
  min-height: auto;
  padding: 0.2rem 0.4rem;
  cursor: pointer;
}

.dropzone-card {
  border: 1.5px dashed var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 14.5rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.dropzone-card:hover, .dropzone-card.dragover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.dropzone-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 12px;
  background: var(--panel);
  color: var(--text-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.65rem;
}

.dropzone-card h2 {
  margin: 0 0 0.25rem;
  font-size: 1.12rem;
}

.dropzone-card p {
  margin: 0.15rem 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.card-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.card-head-row h2 {
  margin: 0;
  white-space: nowrap;
  font-size: 1.05rem;
  font-weight: var(--fw-bold);
}

.recent-rows, .processing-rows {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.recent-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.65rem;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  transition: background 0.12s ease;
}

.recent-item:hover {
  background: var(--panel);
  text-decoration: none;
}

.template-badge-ico {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.recent-item-meta {
  flex: 1;
  min-width: 0;
}

.recent-item-meta strong {
  display: block;
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recent-item-meta small {
  color: var(--muted);
  font-size: 0.8rem;
}

/* Semantic Status Pills */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: var(--fw-semibold);
  white-space: nowrap;
}

.status-pill.ready {
  background: var(--success-soft);
  color: var(--success);
}

.status-pill.processing {
  background: var(--accent-soft);
  color: var(--accent);
}

.status-pill.failed {
  background: var(--record-soft);
  color: var(--record);
}

.status-pill.warning, .status-pill.local {
  background: var(--warning-soft);
  color: var(--warning);
}

.proc-card-item {
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  flex-wrap: wrap;
  row-gap: 0.5rem;
}

.proc-card-item > div {
  min-width: 0;
}

.proc-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.9rem;
  margin-bottom: 0.45rem;
}

.step-bars {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  margin-bottom: 0.4rem;
}

.step-bars span {
  height: 5px;
  border-radius: 99px;
  background: var(--line);
}

.step-bars span.done {
  background: var(--accent);
}

.step-bars span.failed {
  background: var(--record);
}

/* ==========================================================================
   W08 WEB RECORDER
   ========================================================================== */
.recorder-shell {
  max-width: 44rem;
  margin: 1rem auto;
  text-align: center;
  padding: 2rem 1.75rem;
  background: var(--surface);
  border: none;
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
}

.rec-live-toggle { display: grid; grid-template-columns: auto 1fr; gap: .15rem .65rem; align-items: center; max-width: 24rem; margin: 1rem auto; text-align: left; cursor: pointer; }
.rec-live-toggle input { grid-row: 1 / span 2; width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.rec-live-toggle span { font-weight: var(--fw-semibold); }
.rec-live-toggle small { grid-column: 2; color: var(--muted); font-size: .84rem; }
.rec-live-panel { margin-top: 1.25rem; padding: 1rem 1.1rem; border-radius: 14px; background: var(--panel); text-align: left; }
.rec-live-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .3rem 1rem; }
.rec-live-heading h2 { font-size: 1rem; font-weight: var(--fw-semibold); margin: 0; }
.rec-live-status { color: var(--muted); font-size: .82rem; }
.rec-live-status[data-state="error"] { color: var(--warning); }
.rec-live-scroll { min-height: 6rem; max-height: 24rem; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.rec-live-empty { color: var(--muted); font-size: .94rem; margin-bottom: .5rem; }
.rec-live-paragraph { display: grid; grid-template-columns: 3.4rem minmax(0, 1fr); gap: .65rem; margin-top: 1.1rem; }
.rec-live-paragraph time { padding-top: .2rem; color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; }
.rec-live-paragraph p, .rec-live-draft { margin: 0; font-size: 1rem; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
.rec-live-final.is-new-final { animation: rec-utterance-in .16s ease-out both; }
.rec-live-draft { margin: .65rem 0 0 4.05rem; color: var(--muted); }
.rec-live-draft:empty { display: none; }
.rec-cloud-status { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .5rem .75rem; margin-top: 1rem; font-size: .9rem; color: var(--text-2); }
.rec-cloud-status[hidden] { display: none; }
.rec-cloud-status svg { flex: none; }
@keyframes rec-utterance-in { from { opacity: .5; filter: blur(2px); } to { opacity: 1; filter: blur(0); } }
@media (prefers-reduced-motion: reduce) { .rec-live-final.is-new-final { animation: none; } }

.rec-floating { position: fixed; inset: auto 1.25rem 1.25rem auto; z-index: 90; display: flex; align-items: center; gap: .75rem; width: min(23rem, calc(100vw - 2rem)); padding: 1rem; border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-md); }
.rec-floating[hidden] { display: none; }
.rec-floating-info { flex: 1; min-width: 0; }
.rec-floating-title { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-size: .95rem; font-weight: var(--fw-semibold); }
.rec-floating-meta { display: flex; flex-wrap: wrap; gap: .25rem .75rem; margin-top: .35rem; font-size: .84rem; color: var(--muted); }
.rec-floating-time { font-variant-numeric: tabular-nums; }
.rec-floating-state::before { content: ''; display: inline-block; width: .45rem; height: .45rem; border-radius: 50%; background: var(--record); margin-right: .4rem; }
.rec-floating .rec-circle-btn { flex: none; width: 2.5rem; height: 2.5rem; }
@media (max-width: 767px) { .rec-floating { right: 1rem; bottom: calc(4.75rem + env(safe-area-inset-bottom)); } }

.rec-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: var(--record-soft);
  color: var(--record);
  font-size: 0.82rem;
  font-weight: var(--fw-bold);
  margin-bottom: 0.75rem;
}

.rec-status-pill.idle {
  background: var(--accent-soft);
  color: var(--accent);
}

.rec-title-input {
  font-size: 1.35rem;
  font-weight: var(--fw-bold);
  text-align: center;
  border: 1px solid transparent;
  background: transparent;
  width: 100%;
  max-width: 28rem;
  margin: 0 auto 0.25rem;
}

.rec-title-input:hover, .rec-title-input:focus {
  border-color: var(--line);
  background: var(--panel);
}

.rec-meta-line {
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 1.25rem;
}

.rec-timer {
  font-size: clamp(2.75rem, 6vw, 4rem);
  font-weight: var(--fw-bold);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  margin: 0.5rem 0 1rem;
}

.rec-waveform-canvas {
  width: 100%;
  height: 6rem;
  background: var(--panel);
  border-radius: 14px;
  margin: 0.75rem 0 1.5rem;
  display: block;
}

.rec-controls-row {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 2rem;
  margin: 1.25rem 0 1.5rem;
}

.rec-action-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.rec-circle-btn {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  border: 1.5px solid var(--line);
  font-size: 1.1rem;
  padding: 0;
}

.rec-circle-btn.stop-btn {
  width: 4.1rem;
  height: 4.1rem;
  background: var(--record);
  color: #fff;
  border: 5px solid var(--record-soft);
}

.rec-circle-btn.start-btn {
  width: 4.25rem;
  height: 4.25rem;
  background: var(--accent);
  color: #fff;
  border: 5px solid var(--accent-soft);
}

.rec-warning-banner {
  margin-top: 1.5rem;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  background: var(--warning-soft);
  color: var(--warning);
  font-size: 0.86rem;
  font-weight: var(--fw-medium);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.rec-settings-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

/* ==========================================================================
   W09-10 IMPORT & QUEUE
   ========================================================================== */
.import-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(18rem, 0.95fr);
  gap: 1.5rem;
  align-items: start;
}

.import-drop-box {
  border: 1.5px dashed var(--line);
  border-radius: 16px;
  background: var(--surface);
  padding: 2rem 1.5rem;
  text-align: center;
  margin-bottom: 1.25rem;
  cursor: pointer;
}

.import-drop-box:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.queue-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.25rem;
}

.queue-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.queue-item {
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.queue-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.queue-progress-bar {
  height: 6px;
  border-radius: 99px;
  background: var(--line);
  overflow: hidden;
  margin: 0.45rem 0;
}

.queue-progress-bar > span {
  display: block;
  height: 100%;
  background: var(--accent);
  transition: width 0.2s ease;
}

.template-grid-2x2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin: 0.4rem 0 1rem;
}

.tpl-choice-btn {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: var(--fw-semibold);
}

.tpl-choice-btn:hover, .tpl-choice-btn.active {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent);
}

.quota-summary-box {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.35rem;
  font-size: 0.88rem;
}

.quota-summary-row {
  display: flex;
  justify-content: space-between;
  color: var(--text-2);
}

/* ==========================================================================
   W11 RECORDING LIBRARY
   ========================================================================== */
.page-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.15rem;
}

.page-top-row h1 {
  font-size: 1.6rem;
  margin: 0;
}

.library-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.filter-pills-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.filter-controls-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.filter-toggle {
  display: none;
}

@media (max-width: 47.99rem) {
  .library-filter-bar {
    position: relative;
    flex-wrap: nowrap;
    gap: 0.5rem;
  }
  .filter-pills-group {
    flex: 1;
    min-width: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    mask-image: linear-gradient(to left, transparent 0, #000 1.25rem);
  }
  .filter-pills-group::-webkit-scrollbar {
    display: none;
  }
  .filter-pills-group .pill-btn {
    flex: none;
  }
  .filter-toggle {
    display: inline-flex;
    flex: none;
    gap: 0.35rem;
    padding-inline: 0.7rem;
  }
  .filter-toggle.active {
    color: var(--accent-ink);
    background: var(--accent-soft);
  }
  .filter-controls-group {
    display: none;
    position: absolute;
    inset-inline: 0;
    top: calc(100% + 0.4rem);
    z-index: 25;
    padding: 0.75rem;
    background: var(--surface);
    border-radius: 14px;
    box-shadow: var(--shadow-md);
    flex-direction: column;
    align-items: stretch;
  }
  .library-filter-bar.open .filter-controls-group {
    display: flex;
  }
  .filter-controls-group > * {
    width: 100%;
  }
}

.library-table-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 0.9rem;
}

th {
  font-size: 0.74rem;
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  background: var(--panel);
}

tr:last-child td {
  border-bottom: none;
}

tbody tr:hover {
  background: var(--panel);
}

.title-cell-link {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  font-weight: var(--fw-semibold);
  text-decoration: none;
}

.title-cell-link:hover {
  color: var(--accent);
  text-decoration: none;
}

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 1rem;
}

/* ==========================================================================
   W13 GLOBAL SEARCH SPOTLIGHT MODAL & PAGE
   ========================================================================== */
.search-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 17, 23, 0.45);
  backdrop-filter: blur(3px);
  z-index: 100;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 5rem 1rem 2rem;
}

.search-modal-card {
  width: 100%;
  max-width: 42rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.search-input-bar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid var(--line);
}

.search-input-bar input, .search-input-bar input:focus {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 1.05rem;
  padding: 0.2rem 0;
  min-height: auto;
  box-shadow: none;
}

.search-chips-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 1.15rem;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.search-results-list {
  max-height: 22rem;
  overflow-y: auto;
  padding: 0.5rem;
}

.search-hit-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
}

.search-hit-item:hover, .search-hit-item.active {
  background: var(--accent-soft);
  text-decoration: none;
}

.search-hit-item mark, mark {
  background: #FEF08A;
  color: #14161F;
  padding: 0.05rem 0.2rem;
  border-radius: 4px;
  font-weight: var(--fw-semibold);
}

.search-modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1.15rem;
  border-top: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  font-size: 0.8rem;
}

/* ==========================================================================
   W14 & W15 NOTE DETAIL, SUMMARY, Q&A & TRANSCRIPT EDITOR
   ========================================================================== */
.note-top-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.note-breadcrumb {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.note-title-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.note-title-row h1 {
  font-size: 1.5rem;
  margin: 0;
}

.note-meta-sub {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

.note-playbar {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
}

.play-toggle-btn {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  padding: 0;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.playbar-time {
  font-size: 0.84rem;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  min-width: 2.8rem;
}

.playbar-wave {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 2px;
  height: 44px;
  cursor: pointer;
}

.playbar-wave span {
  flex: 1;
  min-width: 2px;
  background: var(--line);
  border-radius: 99px;
}

.playbar-wave span.played {
  background: var(--accent);
}

.note-tabs-bar {
  display: flex;
  gap: 1.25rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.25rem;
}

.note-tab-btn {
  background: transparent;
  border: none;
  border-bottom: 2.5px solid transparent;
  border-radius: 0;
  color: var(--muted);
  font-weight: var(--fw-semibold);
  padding: 0.55rem 0.25rem;
  min-height: auto;
}

.note-tab-btn:hover {
  background: transparent;
  color: var(--text);
}

.note-tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.note-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(18.5rem, 0.95fr);
  gap: 1.25rem;
  align-items: start;
}

.summary-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.summary-subgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.chapter-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}

.chapter-row:last-child {
  border-bottom: none;
}

.chapter-range {
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  font-weight: var(--fw-semibold);
  font-size: 0.82rem;
  min-width: 5.5rem;
}

.ask-sidebar-card, .speakers-sidebar-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.15rem;
  position: sticky;
  top: 4.75rem;
}

.ask-messages {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 0.85rem 0;
  max-height: 22rem;
  overflow-y: auto;
}

.ask-bubble-user {
  align-self: flex-end;
  background: var(--accent);
  color: #fff;
  padding: 0.55rem 0.85rem;
  border-radius: 12px 12px 2px 12px;
  font-size: 0.88rem;
  max-width: 88%;
}

.ask-bubble-ai {
  align-self: flex-start;
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 0.7rem 0.85rem;
  border-radius: 12px 12px 12px 2px;
  font-size: 0.88rem;
}

.ask-not-found-pill {
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.84rem;
}

/* W15 Transcript Editor */
.transcript-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 0.85rem;
}

.transcript-search-box {
  flex: 1;
  min-width: 12rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.transcript-search-box input {
  width: 100%;
  min-height: 2.15rem;
}

.transcript-segments-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.segment-card {
  padding: 0.85rem 1.05rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: border-color 0.12s ease, background 0.12s ease;
}

.segment-card.is-playing, .segment-card.is-editing {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.segment-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.35rem;
  font-size: 0.84rem;
}

.segment-speaker-btn {
  background: transparent;
  border: none;
  padding: 0;
  min-height: auto;
  color: var(--text);
  font-weight: var(--fw-bold);
  font-size: 0.86rem;
}

.segment-speaker-btn:hover {
  background: transparent;
  color: var(--accent);
}

.segment-time-btn {
  background: transparent;
  border: none;
  padding: 0.1rem 0.35rem;
  min-height: auto;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
}

.segment-time-btn:hover {
  background: var(--panel);
  color: var(--accent);
}

.segment-tag-pill {
  margin-left: auto;
  padding: 0.12rem 0.5rem;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: var(--fw-semibold);
}

.segment-tag-pill.low-conf {
  background: var(--warning-soft);
  color: var(--warning);
}

.segment-tag-pill.edited {
  background: var(--accent-soft);
  color: var(--accent);
}

.segment-text-view {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text);
  cursor: text;
}

.low-conf-underline {
  text-decoration: underline wavy var(--warning);
  text-underline-offset: 3px;
}

.speaker-list-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--line);
}

.speaker-avatar-circle {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  color: #fff;
  font-weight: var(--fw-bold);
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ==========================================================================
   W20-21 BILLING & PLANS
   ========================================================================== */
.billing-top-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14.5rem, 1fr));
  gap: 1rem;
  margin: 1rem 0 1.5rem;
}

.plan-grid article, .plan-card {
  position: relative;
  padding: 1.35rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.plan-card.is-popular {
  border: 2px solid var(--accent);
  box-shadow: var(--shadow-sm);
}

.badge-popular {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  padding: 0.18rem 0.55rem;
  border-radius: 99px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: var(--fw-bold);
}

.plan-card ul {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 1rem;
  display: grid;
  gap: 0.4rem;
  font-size: 0.88rem;
  color: var(--text-2);
}

.plan-card > .button, .plan-card > button, .plan-card > .plan-action {
  margin-top: auto;
}

.plan-card ul li::before {
  content: "✓ ";
  color: var(--accent);
  font-weight: var(--fw-bold);
}

/* Dialog / Modal (M08 etc.) */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 17, 23, 0.5);
  backdrop-filter: blur(2px);
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-box {
  width: 100%;
  max-width: 28rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
}

.modal-box h2 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.25rem;
}

@media (max-width: 56rem) {
  .hero, .pillars, .home-top-grid, .home-bottom-grid, .import-grid, .note-main-grid, .billing-top-grid, .summary-subgrid {
    grid-template-columns: 1fr;
  }
  .desk {
    grid-template-columns: 1fr;
  }
  #menu-toggle {
    display: inline-flex;
  }
  #workspace-nav {
    display: none;
    height: auto;
    position: static;
  }
  #workspace-nav.open {
    display: flex;
  }
  .workspace-content {
    padding: 1.25rem;
  }
}

/* ==========================================================================
   MOTION, MICRO-INTERACTIONS & KEYFRAMES
   ========================================================================== */
@keyframes recPulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}

@keyframes micBreath {
  0%, 100% {
    box-shadow: 0 8px 20px rgba(79, 95, 232, 0.25), 0 0 0 0 rgba(79, 95, 232, 0.18);
  }
  50% {
    box-shadow: 0 12px 26px rgba(79, 95, 232, 0.35), 0 0 0 10px rgba(79, 95, 232, 0);
  }
}

@keyframes modalPop {
  from {
    opacity: 0.92;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes backdropFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.rec-dot {
  animation: none;
}

.rec-status-pill:not(.idle):not(.paused) .rec-dot {
  animation: recPulse 1.8s ease-in-out infinite;
}

.big-mic-btn {
  animation: none;
  transition: transform 0.16s ease-out, box-shadow 0.16s ease-out;
}

@media (hover: hover) and (pointer: fine) {
  .big-mic-btn:hover {
    box-shadow: 0 12px 28px rgba(79, 95, 232, 0.34), 0 0 0 8px var(--accent-soft);
  }
}

@keyframes inkReveal {
  from {
    opacity: 0;
    filter: blur(6px);
    transform: translateY(2px);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}

.ink-reveal {
  animation: inkReveal 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.demo-takeaway-list.ink-reveal {
  animation: none;
}

@keyframes copySpring {
  0% { transform: scale(0.86); opacity: 0.6; }
  60% { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.copy-badge-pop {
  color: var(--success) !important;
  background: var(--success-soft) !important;
}

.copy-badge-pop .lucide-icon {
  animation: copySpring 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lucide-icon svg, .nav-icon svg, .rec-icon-chip svg {
  vertical-align: -0.125em;
}

.segment-card, .ask-sidebar-card, .speakers-sidebar-card, .queue-card, .library-table-wrap, .plan-grid article, .plan-card {
  border-color: transparent;
  box-shadow: var(--shadow-card);
}

.plan-card.is-popular {
  box-shadow: 0 0 0 2px var(--accent), var(--shadow-sm);
  border-color: transparent;
}

.mobile-bottom-nav {
  display: none;
}

@media (max-width: 47.99rem) {
  .mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 45;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    background: var(--surface);
    border-top: 1px solid var(--card-hairline);
    box-shadow: 0 -4px 18px rgba(20, 22, 31, 0.08);
    padding: 0.35rem 0.25rem calc(0.35rem + env(safe-area-inset-bottom, 0px));
  }
  .mobile-bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    min-height: 2.85rem;
    min-width: 0;
    font-size: 0.7rem;
    font-weight: var(--fw-medium);
    color: var(--muted);
    text-decoration: none;
    border-radius: 8px;
  }
  .mobile-bottom-nav a span {
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  .mobile-bottom-nav a[aria-current="page"] {
    color: var(--accent);
    font-weight: var(--fw-semibold);
  }
  .mobile-bottom-nav a.mobile-nav-record svg {
    color: var(--record);
  }
  .workspace-content {
    padding-bottom: 5.75rem;
  }
  .recent-item {
    flex-wrap: wrap;
    row-gap: 0.35rem;
  }
  .recent-item-meta strong {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
}

.button:active, button:active, .secondary:active, .pill-btn:active, .cite-pill:active {
  transform: scale(0.97);
}

.card, .pillar, .plan-card, .segment-card {
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

@media (hover: hover) and (pointer: fine) {
  .pillar:hover, .plan-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
  }
}

.recent-item, .library-table-wrap tbody tr, #workspace-nav a[data-nav], .sidebar-folder-item {
  transition: background-color 0.14s ease, color 0.14s ease, transform 0.14s ease;
}

@media (hover: hover) and (pointer: fine) {
  .recent-item:hover {
    transform: translateX(2px);
  }
}

.playbar-wave span, .demo-waveform span {
  transition: background-color 0.15s ease, transform 0.15s ease;
}

@media (hover: hover) and (pointer: fine) {
  .playbar-wave span:hover, .demo-waveform span:hover {
    transform: scaleY(1.22);
    background: var(--accent-ink);
  }
}

.queue-progress-bar > span {
  background: var(--accent);
}

.search-backdrop, .modal-overlay {
  animation: backdropFade 0.18s ease-out;
}

.search-modal-card, .modal-box {
  animation: modalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

#status:not(:empty) {
  animation: toastIn 0.22s ease-out;
}

.rec-circle-btn {
  transition: transform 0.14s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

@media (hover: hover) and (pointer: fine) {
  .rec-circle-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
  }
}

html[data-motion-paused] .view-loading-wave > span,
html[data-motion-paused] .rec-dot,
[data-motion-offscreen],
[data-motion-offscreen] * {
  animation-play-state: paused !important;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .button:active, button:active, .secondary:active, .pill-btn:active,
  .cite-pill:active, .pillar:hover, .plan-card:hover, .recent-item:hover,
  .rec-circle-btn:hover, .big-mic-btn:hover,
  .playbar-wave span:hover, .demo-waveform span:hover {
    transform: none !important;
  }
  .ink-reveal {
    filter: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Shared Lucide icons, modal behaviour and honest recorder states */
.lucide-icon { display: inline-flex; align-items: center; justify-content: center; line-height: 0; flex: none; }
body.modal-open { overflow: hidden; }
.modal-body-text { color: var(--text-2); font-size: 0.92rem; margin: 0.35rem 0 1rem; }
.rec-circle-btn { display: inline-flex; align-items: center; justify-content: center; }
.rec-circle-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.rec-status-pill.paused { background: var(--warning-soft); color: var(--warning); }
.rec-status-pill.idle .rec-dot { background: currentColor; animation: none; }
.rec-error-banner { display: flex; gap: 0.75rem; align-items: flex-start; text-align: left; margin: 0 auto 1rem; max-width: 32rem; padding: 0.85rem 1rem; border-radius: 12px; background: var(--record-soft); color: var(--record); }
.rec-error-banner[hidden] { display: none; }
.rec-error-banner p { margin: 0.2rem 0 0.4rem; color: var(--text-2); font-size: 0.88rem; }
.rec-error-banner a { font-weight: var(--fw-semibold); font-size: 0.88rem; }
.template-badge-ico, .rec-icon-chip { display: inline-flex; align-items: center; justify-content: center; color: var(--accent); }
.table-scroll { overflow-x: auto; }
.speakers-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.speakers-table th { text-align: left; font-size: 0.7rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); font-weight: var(--fw-semibold); padding: 0.45rem 0.35rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.speakers-table td { padding: 0.5rem 0.35rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.speakers-table td input { width: 100%; min-width: 5.25rem; padding: 0.35rem 0.55rem; min-height: 2.15rem; font-size: 0.85rem; }
.speakers-table .num, .speaker-id-cell { color: var(--muted); white-space: nowrap; }
.speakers-note { margin: 0.85rem 0 0; color: var(--muted); font-size: 0.8rem; }
.empty-state-card { text-align: center; padding: 2.5rem 1.5rem; }
.empty-state-card p { color: var(--text-2); max-width: 32rem; margin: 0.5rem auto 1rem; }
.speakers-table th, .speakers-table .cite-pill { white-space: nowrap; }

.billing-note { color: var(--muted); font-size: 0.86rem; margin: 0.75rem 0 0; }
.plan-card .plan-minutes { display: block; margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--line); font-size: 0.9rem; }

/* §05 responsive: tablet/mobile workspace never scrolls sideways */
@media (max-width: 56rem) {
  .desk { grid-template-columns: minmax(0, 1fr); }
  .workspace-content { min-width: 0; }
  .library-table-wrap, .table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .scenario-pills, .rec-settings-bar, .page-top-row { flex-wrap: wrap; }
}
@media (max-width: 47.99rem) {
  .workspace-bar { gap: 0.5rem; padding: 0 0.75rem; flex-wrap: nowrap; }
  .workspace-bar .logo { height: 1.35rem; width: auto; }
  .workspace-search { flex: 0 0 auto; width: 2.6rem; height: 2.6rem; padding: 0; justify-content: center; }
  .workspace-search span, .workspace-search kbd { display: none; }
  .workspace-top-actions { gap: 0.4rem; margin-left: auto; }
  .top-import-btn { display: none; }
  .top-record-btn, #menu-toggle, .avatar-btn { min-height: 2.75rem; }
  .avatar-btn { width: 2.75rem; height: 2.75rem; }
  #workspace-nav.open { position: fixed; inset: 3.75rem 0 0 0; z-index: 40; height: auto; overflow-y: auto; }
  .workspace-content { padding: 1rem; }
  /* Library rows: keep title, status and actions; details stay one tap away in the note */
  .recordings-table th:nth-child(3), .recordings-table td:nth-child(3),
  .recordings-table th:nth-child(4), .recordings-table td:nth-child(4),
  .recordings-table th:nth-child(5), .recordings-table td:nth-child(5),
  .recordings-table th:nth-child(6), .recordings-table td:nth-child(6) { display: none; }
  .rec-controls-row { gap: 1.25rem; }
  .modal-box { width: 100%; max-width: none; border-radius: 18px 18px 0 0; margin-top: auto; }
  .modal-overlay { align-items: flex-end; padding: 0; }
}
@media (max-width: 56rem) {
  .hero, .pillars, .home-top-grid, .home-bottom-grid, .import-grid, .note-main-grid, .billing-top-grid, .summary-subgrid, .plan-grid { grid-template-columns: minmax(0, 1fr); }
  .card, .workspace-content > #view > * { min-width: 0; }
  .playbar-wave { min-width: 0; flex: 1 1 0; overflow: hidden; }
}
@media (max-width: 47.99rem) {
  .avatar-btn { display: none; }
  #menu-toggle { padding: 0 0.75rem; }
  .playbar .playbar-extra, .playbar kbd { display: none; }
}
@media (max-width: 47.99rem) {
  .queue-item-head { flex-wrap: wrap; row-gap: 0.5rem; }
  .queue-item-head > * { min-width: 0; }
}

/* ==========================================================================
   CUSTOM AUDIO PLAYER, CUSTOM SELECT & NON-NATIVE CONTROLS (Light + Dark)
   ========================================================================== */
summary {
  list-style: none;
}
summary::-webkit-details-marker {
  display: none;
}

.cite-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.export-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.v-native-audio {
  position: absolute !important;
  width: 0 !important;
  height: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.v-audio-player {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  min-height: 2.85rem;
  padding: 0.45rem 0.75rem;
  margin: 0.35rem 0 0.85rem;
  border-radius: 12px;
  background: var(--panel);
  box-shadow: inset 0 0 0 1px var(--card-hairline);
}

.v-audio-player.is-compact {
  width: auto;
  min-width: 13.5rem;
  min-height: 2.25rem;
  margin: 0;
  padding: 0.3rem 0.55rem;
  gap: 0.5rem;
  border-radius: 10px;
}

.v-audio-play {
  width: 2rem;
  height: 2rem;
  min-height: 2rem;
  padding: 0;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: none;
  box-shadow: 0 2px 8px rgba(79, 95, 232, 0.32);
}

.v-audio-player.is-compact .v-audio-play {
  width: 1.65rem;
  height: 1.65rem;
  min-height: 1.65rem;
}

.v-audio-play:hover {
  background: var(--accent-hover, var(--accent));
}

.v-audio-time {
  font-size: 0.79rem;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.v-audio-track {
  position: relative;
  flex: 1 1 0;
  min-width: 3.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  cursor: pointer;
  touch-action: none;
}

.v-audio-track:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

.v-audio-rail {
  position: relative;
  width: 100%;
  height: 5px;
  border-radius: 99px;
  background: var(--line);
}

.v-audio-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  border-radius: 99px;
  background: var(--accent);
}

.v-audio-thumb {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--accent);
  transform: translate(-50%, -50%) scale(0.85);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  transition: transform 0.14s ease;
}

.v-audio-track:focus-visible .v-audio-thumb {
  transform: translate(-50%, -50%) scale(1.1);
}

@media (hover: hover) and (pointer: fine) {
  .v-audio-track:hover .v-audio-thumb {
    transform: translate(-50%, -50%) scale(1.1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .v-audio-track:hover .v-audio-thumb,
  .v-audio-track:focus-visible .v-audio-thumb {
    transform: translate(-50%, -50%);
  }
}

.v-audio-rate,
.v-audio-mute {
  min-height: 1.75rem;
  height: 1.75rem;
  padding: 0 0.45rem;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  border: 1px solid transparent;
  font-size: 0.76rem;
  font-weight: var(--fw-semibold);
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.v-audio-mute {
  width: 1.85rem;
  padding: 0;
}

.v-audio-rate:hover,
.v-audio-mute:hover {
  background: var(--surface);
  color: var(--text);
  border-color: var(--card-hairline);
}

/* Custom Select Combobox & Floating Popover Menu */
.v-select {
  position: relative;
  display: inline-block;
  max-width: 100%;
}

.v-native-select {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  min-height: 0 !important;
}

.v-select-trigger {
  width: 100%;
  min-height: 2.5rem;
  padding: 0.45rem 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: var(--fw-medium);
  color: var(--text);
  background: var(--panel);
  border: 1px solid transparent;
  box-shadow: inset 0 0 0 1px var(--card-hairline);
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  transition: box-shadow 0.16s ease, background-color 0.16s ease;
}

.v-select-trigger:hover:not(:disabled) {
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.v-select-trigger:focus-visible,
.v-select.is-open .v-select-trigger {
  outline: none;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--card-hairline), 0 8px 24px rgba(20, 22, 31, 0.12);
}

.v-select.is-inline .v-select-trigger {
  min-height: 2rem;
  padding: 0.25rem 0.65rem;
  font-size: 0.82rem;
  color: var(--muted);
  background: transparent;
  box-shadow: none;
  border-radius: 8px;
}

.v-select.is-inline .v-select-trigger:hover:not(:disabled) {
  color: var(--text);
  background: var(--panel);
  box-shadow: inset 0 0 0 1px var(--card-hairline);
}

.v-select-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v-select-arrow {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  flex-shrink: 0;
  transition: transform 0.16s ease;
}

.v-select.is-open .v-select-arrow {
  transform: rotate(180deg);
  color: var(--accent);
}

.v-select-menu {
  position: fixed;
  z-index: 950;
  max-height: 280px;
  overflow-y: auto;
  padding: 0.35rem;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--card-hairline);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.04);
  display: grid;
  gap: 0.15rem;
}

.v-select-option {
  width: 100%;
  min-height: 2.15rem;
  padding: 0.42rem 0.65rem;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  border: none;
  font: inherit;
  font-size: 0.88rem;
  font-weight: var(--fw-medium);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  text-align: left;
  cursor: pointer;
}

.v-select-option:hover:not(:disabled),
.v-select-option.is-focused:not(:disabled) {
  background: var(--panel);
}

.v-select-option.is-selected {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: var(--fw-semibold);
}

.v-select-check {
  display: inline-flex;
  align-items: center;
  color: var(--accent);
  flex-shrink: 0;
}

/* Custom Disclosure Summary (speaker edit / languages footer) */
.demo-speaker details summary {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
  color: var(--accent);
  font-size: 0.84rem;
  font-weight: var(--fw-semibold);
  margin-left: 0.35rem;
}
.demo-speaker details summary::after {
  content: "";
  width: 0.42rem;
  height: 0.42rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  transition: transform 0.15s ease;
}
.demo-speaker details[open] summary::after {
  transform: rotate(-135deg) translateY(-1px);
}
.signed-out #workspace-nav,
.signed-out #mobile-bottom-nav,
.signed-out .workspace-search,
.signed-out .workspace-top-actions,
.signed-out #menu-toggle,
.signed-out #sidebar-collapse-btn {
  display: none;
}

body.signed-out .desk {
  display: block;
}


.google-sign-in-status {
  min-height: 2.75em;
  margin: .5rem 0 .35rem;
  color: var(--text-2);
  font-size: .86rem;
}

.email-login {
  display: grid;
  gap: .65rem;
  margin-block: 1rem;
}

.email-login label {
  display: grid;
  gap: .25rem;
}

.email-login [hidden] {
  display: none !important;
}

.shared-note {
  max-width: 48rem;
  margin: 2rem auto;
}

.skip-link {
  position: fixed;
  top: .5rem;
  left: 1rem;
  z-index: 1000;
  transform: translateY(-200%);
  padding: .75rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
}
.skip-link:focus { transform: none; }
.site-header { position: relative; flex-wrap: nowrap; }
.site-menu-toggle, .site-header .mobile-signin { display: none; }
.hero-compact { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 2rem 0 1.5rem; }
.hero-compact h1 { max-width: 22ch; font-size: clamp(2rem, 4vw, 3rem); }
.hero-compact .trust { display: none; }
@media (min-width: 56.01rem) {
  .hero:not(.hero-compact) { min-height: calc(100svh - 5.7rem); }
}
.product-preview {
  min-width: 0;
  padding: clamp(1.25rem, 3vw, 2rem);
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}
.product-preview h2 { font-size: 1.25rem; margin: 1.5rem 0 1rem; }
.product-preview ul { padding-left: 1.25rem; display: grid; gap: .75rem; }
.product-preview > a { display: inline-flex; align-items: center; min-height: 44px; margin-top: 1rem; }
.preview-top, .preview-tabs, .shared-note-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.preview-tabs { justify-content: flex-start; font-size: .9rem; color: var(--muted); margin-top: 1.5rem; }
.preview-tabs span:first-child { color: var(--text); }
.preview-passage { padding: 1rem; background: var(--panel); border-radius: var(--radius-md); margin-top: 1.5rem; }
.preview-passage > span { float: right; color: var(--muted); }
.preview-passage p { margin-bottom: 0; }
.recorder-preview { text-align: center; }
.preview-timer { font-size: 2.5rem; letter-spacing: -.03em; padding: 1.5rem 0; }
.download-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.download-options h2 { font-size: 1.25rem; }
.resource { max-width: 72ch; padding-top: 2.5rem; padding-bottom: 3rem; }
.resource h1 { font-size: clamp(2rem, 4vw, 3rem); }
.resource h2 { margin-top: 2rem; font-size: 1.3rem; }
.resource p, .resource li { line-height: 1.75; overflow-wrap: anywhere; }
.resource details, .recording-options { margin-block: .75rem; background: var(--surface); border-radius: var(--radius-md); padding: 0 1rem; box-shadow: var(--shadow-card); }
.resource summary, .recording-options > summary, .below summary { min-height: 44px; padding-block: .75rem; padding-right: 2rem; position: relative; cursor: pointer; }
.resource summary::after, .recording-options > summary::after, .below summary::after { content: '+'; position: absolute; right: 0; top: .75rem; color: var(--muted); }
.resource details[open] > summary::after, .recording-options[open] > summary::after, .below details[open] > summary::after { content: '−'; }
.resource details > p { padding-bottom: 1rem; margin-top: .25rem; }
.resource label { display: grid; gap: .5rem; }
.resource input { width: 100%; }
.field-label { display: grid; gap: .35rem; min-width: 0; font-size: .9rem; }
.field-label > input { width: 100%; }
.demo-workspace-notice { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; padding: .85rem 1rem; margin-bottom: 1.25rem; background: var(--accent-soft); border-radius: var(--radius-md); font-size: .9rem; }
.demo-workspace-notice span { color: var(--text-2); }
.demo-workspace-notice a { margin-left: auto; }
[hidden] { display: none !important; }
.note-seek { position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; touch-action: none; }
.playbar-wave:focus-within { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
.playbar-extra { display: flex; gap: .25rem; align-items: center; color: var(--muted); font-size: .86rem; }
.playbar-extra button { padding-inline: .5rem; min-width: 44px; }
.note-ask-link { display: none; }
.note-tabs-bar { overflow-x: auto; gap: 1rem; }
.note-tab-btn { min-height: 44px; white-space: nowrap; }
.billing-summary { display: grid; grid-template-columns: 1fr 1.4fr; gap: 1.5rem; margin-bottom: 1.5rem; align-items: start; }
.billing-summary h2 { font-size: 1.25rem; margin: 0; }
.billing-summary p { color: var(--text-2); margin: .5rem 0 1rem; }
.import-settings { display: grid; gap: 1rem; align-content: start; }
.import-grid .import-settings { grid-column: 2; grid-row: 1 / span 2; }
.import-queue { grid-column: 1; }
.import-queue:has(.queue-list:empty) { display: none; }
.import-settings > label:not(:has([type="checkbox"])) { display: grid; gap: .4rem; }
.import-settings > label:has([type="checkbox"]) { display: flex; align-items: flex-start; gap: .5rem; }
.import-settings input[type="checkbox"] { flex: none; }
.import-drop-box input[type="file"] { max-width: 100%; width: 100%; font-size: .9rem; }
.import-drop-box { cursor: default; }
.queue-list li, .queue-item-head, .proc-card-item { min-width: 0; overflow-wrap: anywhere; }
.queue-list li > button { flex-shrink: 0; }
.rec-settings-bar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); text-align: left; }
.rec-settings-bar .v-select { width: 100%; min-width: 0; }
.recording-options { text-align: left; background: var(--panel); box-shadow: none; }
.recording-options > summary { font-weight: var(--fw-medium); }
.shared-note h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); line-height: 1.2; margin-top: 1rem; }
.shared-note-header { margin-bottom: 1rem; }
.share-status { min-height: 1.6em; margin: .5rem 0; color: var(--text-2); }
.share-dialog form { display: grid; gap: 1rem; }
.share-dialog fieldset { display: grid; gap: .75rem; padding: 1rem; border: 0; border-radius: var(--radius-md); background: var(--panel); }
.share-dialog fieldset label { display: flex; gap: .5rem; align-items: center; }
.share-dialog input[readonly] { max-width: 100%; width: 100%; }
#google-sign-in { width: 100%; display: flex; justify-content: center; }
.ink-word { display: inline-block; animation: inkReveal .38s ease-out both; animation-delay: var(--ink-delay, 0ms); }

@media (max-width: 56rem) {
  .site-header { padding: .75rem 1rem; gap: .75rem; }
  .site-menu-toggle { display: inline-flex; min-width: 44px; min-height: 44px; padding: .5rem; }
  .site-header .signin-link { display: none; }
  .site-header .header-actions { margin-left: auto; }
  .site-header > nav { display: none; }
  .site-header > nav.is-open { display: flex; position: absolute; inset: 100% 0 auto; min-height: calc(100dvh - 72px); padding: 1rem; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: .25rem; background: var(--surface); z-index: 80; }
  .site-header > nav a { min-height: 56px; display: flex; align-items: center; padding: .5rem 1rem; }
  .site-header .mobile-signin { display: flex; }
  .download-options, .billing-summary { grid-template-columns: minmax(0, 1fr); }
  .import-grid .import-settings { grid-column: 1; grid-row: auto; }
  .note-ask-link { display: inline-flex; min-height: 44px; align-items: center; margin-bottom: 1rem; }
  #note-questions { scroll-margin-top: 5rem; }
}

@media (max-width: 47.99rem) {
  .site-header .brand-wordmark { font-size: .95rem; }
  .site-header .header-actions .button { min-height: 44px; padding-inline: .75rem; white-space: nowrap; }
  main, footer, body > nav { padding-inline: 1rem; }
  .hero { padding-top: 2rem; gap: 1.5rem; }
  .hero h1 { font-size: 2.25rem; }
  .hero-compact { padding-top: 1.5rem; gap: 0; }
  .hero-compact h1 { font-size: 2rem; }
  .hero > div > p { font-size: 1rem; }
  .trust { font-size: .86rem; gap: .75rem; }
  .actions { gap: .65rem; }
  .actions > a { width: 100%; }
  .recordings-table, .recordings-table tbody { display: block; width: 100%; }
  .recordings-table thead { display: none; }
  .recordings-table tbody tr { display: grid; grid-template-columns: 2.25rem minmax(0, 1fr) 2.75rem; gap: .25rem .5rem; padding: .85rem .5rem; }
  .recordings-table td { display: block; border: 0; padding: 0; min-width: 0; }
  .recordings-table td:first-child { grid-column: 1; grid-row: 1 / 3; width: auto !important; display: flex; align-items: center; justify-content: center; }
  .recordings-table td:nth-child(2) { grid-column: 2; }
  .recordings-table td:nth-child(7) { grid-column: 2; }
  .recordings-table td:nth-child(8) { grid-column: 3; grid-row: 1 / 3; width: auto !important; }
  .recordings-table .title-cell-link { gap: .5rem; align-items: flex-start; }
  .recordings-table .title-cell-link > span:last-child { overflow-wrap: anywhere; }
  .recordings-table .template-badge-ico { display: none; }
  .recordings-table .status-pill { max-width: 100%; white-space: normal; }
  .recordings-table summary { min-width: 44px; min-height: 44px; display: grid; place-items: center; }
  .trash-table, .trash-table tbody, .trash-table tr, .trash-table td { display: block; width: 100%; }
  .trash-table thead { display: none; }
  .trash-table tr { padding: 1rem; border-bottom: 1px solid var(--line); }
  .trash-table td { border: 0; padding: .35rem 0; }
  .trash-table td:last-child > div { flex-wrap: wrap; }
  .note-playbar { display: grid; grid-template-columns: 44px 1fr 1fr auto; gap: .5rem; padding: .75rem; }
  .note-playbar .play-toggle-btn { width: 44px; height: 44px; }
  .note-playbar > .playbar-time:nth-child(4) { text-align: right; }
  .note-playbar > .playbar-wave { grid-column: 1 / -1; grid-row: 2; width: 100%; min-width: 0; }
  .note-playbar > .playbar-extra { display: none; }
  .note-playbar > button.secondary { min-width: 44px; min-height: 44px !important; }
  .v-audio-player { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto 44px; gap: .5rem; padding: .75rem; }
  .v-audio-play, .v-audio-player.is-compact .v-audio-play { width: 44px; height: 44px; min-height: 44px; }
  .v-audio-track { grid-column: 1 / -1; grid-row: 2; width: 100%; min-width: 0; height: 44px; }
  .v-audio-rate, .v-audio-mute { min-width: 44px; min-height: 44px; height: 44px; }
  .v-audio-player.is-compact { width: 100%; min-width: 0; grid-template-columns: 44px minmax(0, 1fr) 44px; }
  .recorder-shell { margin-block: 0; padding: 1.25rem 1rem; }
  .rec-timer { font-size: 3rem; margin-block: .75rem; }
  .rec-waveform-canvas { height: 4rem; margin-block: .5rem; }
  .rec-controls-row { gap: 1.25rem; margin-block: 1rem; }
  .rec-action-col > kbd { display: none; }
  .rec-warning-banner { margin-top: 1rem; }
  .rec-settings-bar { gap: .75rem; padding-bottom: 1rem; }
  .rec-settings-bar > label:nth-child(2) { grid-column: 1 / -1; }
  .import-drop-box { padding: 1.25rem 1rem; }
  .speakers-table, .speakers-table tbody { display: block; width: 100%; }
  .speakers-table thead { display: none; }
  .speakers-table tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; padding-block: 1rem; border-bottom: 1px solid var(--line); }
  .speakers-table td { display: block; min-width: 0; padding: 0; border: 0; }
  .speakers-table td[data-label]::before { content: attr(data-label); display: block; margin-bottom: .3rem; color: var(--muted); }
  .speakers-table td:last-child { grid-column: 1 / -1; }
  .speakers-table td:last-child button { width: 100%; }
  .speakers-table input { min-width: 0 !important; }
  .speakers-table .speaker-id-cell { align-self: center; }
  .transcript-toolbar { gap: .5rem; }
  .transcript-search-box { flex-basis: 100%; }
  .transcript-toolbar button, .cite-pill, .segment-time-btn, .segment-speaker-btn { min-height: 44px !important; }
  .transcript-toolbar button { flex: 1 1 auto; }
  .field-label { flex: 1 1 100%; }
  .demo-workspace-notice { align-items: flex-start; }
  .demo-workspace-notice a { margin-left: 0; min-height: 44px; display: flex; align-items: center; }
  .demo-workspace-notice span { display: none; }
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea, .v-select-trigger { font-size: 1rem; }
  button, .button, .secondary, .v-select-trigger { min-height: 44px; }
  .shared-note { margin-block: .5rem; padding: 1rem; }
  .shared-note-header { gap: .5rem; }
  .shared-note h1 { font-size: 1.65rem; }
}

@media (prefers-reduced-motion: reduce) {
  .ink-word { animation: none; opacity: 1; filter: none; transform: none; }
  html { scroll-behavior: auto; }
}

.auth-page { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: calc(100vh - 8rem); padding: 2rem 1rem; }
.auth-panel { width: min(100%, 24rem); padding: clamp(1.5rem, 5vw, 2.25rem); background: var(--surface); border-radius: var(--radius-lg); box-shadow: 0 0 0 1px var(--card-hairline), var(--shadow-card); }
.auth-panel h1 { margin: 0 0 1.5rem; font-size: 1.5rem; font-weight: var(--fw-bold); letter-spacing: -0.01em; }
.auth-form { display: grid; gap: 1rem; }
.auth-field { display: grid; grid-template-columns: 1fr auto; align-items: baseline; row-gap: .375rem; }
.auth-field > :not(label):not(.auth-link) { grid-column: 1 / -1; }
.auth-field label { font-size: .875rem; font-weight: var(--fw-medium); color: var(--text-2); }
.auth-panel input { width: 100%; height: 2.75rem; padding: 0 .875rem; border: 0; border-radius: var(--radius-md); background: var(--panel); color: var(--text); font-size: 1rem; box-shadow: inset 0 0 0 1px var(--card-hairline); transition: box-shadow .16s ease, background-color .16s ease; }
.auth-panel input:focus { outline: none; background: var(--surface); box-shadow: 0 0 0 1px rgba(79, 95, 232, .26), 0 6px 18px rgba(79, 95, 232, .12); }
.auth-panel input[aria-invalid="true"] { box-shadow: inset 0 0 0 1px rgba(229, 55, 44, .45); }
.auth-panel .auth-code { font-size: 1.5rem; font-variant-numeric: tabular-nums; letter-spacing: .5em; text-align: center; padding-inline-start: 1.375rem; direction: ltr; }
.auth-reveal-slot { position: relative; display: block; }
.auth-reveal-slot input { padding-inline-end: 2.75rem; }
.auth-panel .auth-reveal { position: absolute; top: 50%; inset-inline-end: .25rem; transform: translateY(-50%); display: inline-flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; min-height: 0; padding: 0; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--muted); box-shadow: none; }
.auth-panel .auth-reveal:hover { color: var(--text); background: transparent; }
.auth-hint, .auth-error { margin: 0; font-size: .8125rem; }
.auth-hint { color: var(--muted); transition: color .16s ease; }
.auth-hint.is-met { color: var(--success); }
.auth-error { color: var(--record); }
.auth-error[hidden] { display: none; }
.auth-error-actions { display: flex; gap: 1rem; margin: 0; }
.auth-field:not([data-code="email_already_registered"]) .auth-error-actions { display: none; }
.auth-panel .auth-primary { display: inline-flex; align-items: center; justify-content: center; width: 100%; height: 2.75rem; margin-top: .25rem; border: 0; border-radius: var(--radius-md); background: var(--accent); color: #fff; font-size: 1rem; font-weight: var(--fw-semibold); transition: background-color .14s ease, transform .14s ease; }
.auth-panel .auth-primary:hover { background: var(--accent-hover); }
.auth-panel .auth-primary:active { transform: scale(.98); }
.auth-panel .auth-primary:disabled { opacity: 1; cursor: progress; }
.auth-link, .auth-demo { min-height: 0; padding: 0; border: 0; background: none; box-shadow: none; font-size: .875rem; font-weight: var(--fw-medium); cursor: pointer; }
.auth-link { color: var(--accent-ink); }
.auth-link:hover { background: none; text-decoration: underline; text-underline-offset: 3px; }
.auth-locked { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .625rem .875rem; border-radius: var(--radius-md); background: var(--panel); font-size: 1rem; overflow-wrap: anywhere; }
.auth-footer { display: flex; justify-content: center; margin-top: 1.25rem; }
.auth-footer:empty { display: none; }
.auth-google { display: flex; justify-content: center; margin-top: 1.25rem; min-height: 2.75rem; }
.auth-panel .google-sign-in-status { min-height: 0; margin: .5rem 0 0; text-align: center; font-size: .8125rem; }
.auth-panel .google-sign-in-status:empty { display: none; }
.auth-switch { display: flex; flex-wrap: wrap; justify-content: center; gap: .375rem; margin: 1.5rem 0 0; color: var(--muted); font-size: .875rem; }
.auth-demo { margin-top: 1.5rem; padding: .5rem; color: var(--muted); font-size: .8125rem; }
.auth-demo:hover { color: var(--text); background: none; }
.view-loading-wave.is-inline { height: 1rem; gap: .14rem; }
.view-loading-wave.is-inline > span { width: .16rem; height: .55rem; background: currentColor; }
.view-loading-wave.is-inline > span:nth-child(1), .view-loading-wave.is-inline > span:nth-child(5) { height: .4rem; }
.view-loading-wave.is-inline > span:nth-child(2), .view-loading-wave.is-inline > span:nth-child(4) { height: .7rem; }
.view-loading-wave.is-inline > span:nth-child(3) { height: 1rem; }
@media (max-width: 47.99rem) {
  .auth-page { justify-content: flex-start; min-height: 0; padding: 1.5rem 1rem 6rem; }
  .auth-panel { padding: 1.5rem 1.25rem; }
}

.import-compress { width: 100%; height: .25rem; accent-color: var(--accent); }
button[aria-busy="true"]:disabled { opacity: 1; cursor: progress; }

.status-upgrade { font-weight: var(--fw-semibold); color: var(--accent-ink); text-decoration: underline; text-underline-offset: 2px; }

input[type="number"] { appearance: textfield; -moz-appearance: textfield; font-variant-numeric: tabular-nums; }
input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { appearance: none; margin: 0; }
