:root {
  color-scheme: light;
  --ink: #17242a;
  --ink-soft: #314047;
  --cloud: #eef3f5;
  --paper: #fbfcfd;
  --voice: #3559e8;
  --voice-dark: #2545c7;
  --voice-pale: #e9edff;
  --signal: #d9972f;
  --signal-pale: #fff4df;
  --slate: #65757d;
  --line: #dce4e7;
  --line-strong: #cbd6da;
  --success: #237a57;
  --danger: #b33a3a;
  --shadow: 0 18px 50px rgba(23, 36, 42, 0.09);
  --display: "Avenir Next", Avenir, "Segoe UI", sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background: var(--cloud);
  color: var(--ink);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}

button,
a {
  touch-action: manipulation;
}

button {
  color: inherit;
}

a {
  color: inherit;
}

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--ink);
  color: white;
  transform: translateY(-150%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.login-page {
  min-height: 100%;
  overflow: auto;
  background:
    radial-gradient(circle at 18% 24%, rgba(53, 89, 232, 0.12), transparent 34%),
    var(--cloud);
}

.login-shell {
  display: grid;
  width: min(920px, calc(100% - 40px));
  min-height: 560px;
  margin: max(28px, calc((100dvh - 560px) / 2)) auto;
  grid-template-columns: minmax(260px, 0.9fr) minmax(360px, 1.1fr);
  grid-template-rows: minmax(560px, auto);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.login-signal {
  display: grid;
  padding: 44px;
  align-content: center;
  justify-items: center;
  gap: 24px;
  background: var(--ink);
  color: white;
}

.login-signal p {
  margin: 0;
  color: rgba(255, 255, 255, 0.66);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.login-wave {
  display: flex;
  height: 126px;
  align-items: center;
  gap: 9px;
}

.login-wave span {
  width: 5px;
  border-radius: 99px;
  background: currentColor;
}

.login-wave span:nth-child(1),
.login-wave span:nth-child(9) { height: 22px; opacity: 0.45; }
.login-wave span:nth-child(2),
.login-wave span:nth-child(8) { height: 50px; opacity: 0.65; }
.login-wave span:nth-child(3),
.login-wave span:nth-child(7) { height: 86px; opacity: 0.8; }
.login-wave span:nth-child(4),
.login-wave span:nth-child(6) { height: 112px; }
.login-wave span:nth-child(5) { height: 62px; color: #8ea3ff; }

.login-card {
  display: flex;
  padding: 58px clamp(36px, 6vw, 72px);
  justify-content: center;
  flex-direction: column;
}

.login-brand {
  display: flex;
  margin-bottom: 44px;
  align-items: center;
  gap: 11px;
}

.login-brand strong {
  font-family: var(--display);
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.025em;
}

.login-card h1 {
  margin: 0;
  font-size: clamp(32px, 4vw, 44px);
}

.login-intro {
  max-width: 330px;
  margin: 10px 0 0;
  color: var(--slate);
  font-size: 14px;
}

.login-form {
  display: grid;
  margin-top: 32px;
  gap: 8px;
}

.login-form label {
  margin-top: 6px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 650;
}

.login-form input {
  width: 100%;
  height: 48px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: white;
  color: var(--ink);
}

.login-form input:focus {
  border-color: var(--voice);
  outline: 3px solid rgba(53, 89, 232, 0.12);
  outline-offset: 0;
}

.login-error {
  margin: 4px 0 0;
  color: var(--danger);
  font-size: 12px;
  font-weight: 600;
}

.login-button {
  min-height: 48px;
  margin-top: 12px;
  border: 0;
  border-radius: 11px;
  background: var(--voice);
  color: white;
  cursor: pointer;
  font-weight: 650;
}

.login-button:hover {
  background: var(--voice-dark);
}

.login-footnote {
  margin: 18px 0 0;
  color: var(--slate);
  font-size: 11px;
  text-align: center;
}

.app-shell {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  height: 100dvh;
}

.sidebar {
  position: relative;
  z-index: 10;
  display: flex;
  min-height: 0;
  padding: 22px 16px 18px;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: rgba(251, 252, 253, 0.94);
}

.brand {
  display: flex;
  min-height: 54px;
  padding: 7px 9px;
  align-items: center;
  gap: 12px;
  border-radius: 12px;
  text-decoration: none;
}

.brand strong,
.mobile-brand strong {
  display: block;
  font-family: var(--display);
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.025em;
}

.brand small {
  display: block;
  margin-top: 1px;
  color: var(--slate);
  font-size: 10px;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.brand-mark {
  display: flex;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-radius: 11px;
  background: var(--voice);
  color: white;
}

.brand-mark span {
  display: block;
  width: 2px;
  border-radius: 99px;
  background: currentColor;
}

.brand-mark span:nth-child(1),
.brand-mark span:nth-child(5) {
  height: 8px;
  opacity: 0.7;
}

.brand-mark span:nth-child(2),
.brand-mark span:nth-child(4) {
  height: 15px;
}

.brand-mark span:nth-child(3) {
  height: 22px;
}

.sidebar nav {
  display: grid;
  margin-top: 30px;
  gap: 5px;
}

.nav-link {
  display: grid;
  min-height: 44px;
  padding: 0 10px;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 11px;
  border-radius: 11px;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 560;
  text-decoration: none;
  transition: color 150ms ease, background-color 150ms ease;
}

.nav-link svg {
  width: 20px;
  height: 20px;
  color: var(--slate);
}

.nav-link:hover {
  background: #f2f6f7;
}

.nav-link.is-active {
  background: var(--voice-pale);
  color: var(--voice-dark);
}

.nav-link.is-active svg {
  color: var(--voice);
}

.nav-count {
  min-width: 23px;
  padding: 2px 6px;
  border-radius: 99px;
  background: #e8eef0;
  color: var(--slate);
  font-family: var(--mono);
  font-size: 10px;
  text-align: center;
}

.nav-link.is-active .nav-count {
  background: white;
  color: var(--voice-dark);
}

.health-state {
  min-width: 32px;
  padding: 2px 6px;
  border-radius: 99px;
  background: #e2f1e9;
  color: #176844;
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
}

.health-state.is-syncing {
  background: var(--voice-pale);
  color: var(--voice-dark);
}

.health-state.has-warning {
  background: var(--signal-pale);
  color: #805000;
}

.health-state.has-error {
  background: #fbe8e8;
  color: var(--danger);
}

.sidebar-footer {
  display: grid;
  margin-top: auto;
  gap: 10px;
}

.source-state {
  display: flex;
  padding: 11px 9px;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--line);
}

.source-state small,
.source-state strong {
  display: block;
}

.source-state small {
  color: var(--slate);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.source-state strong {
  max-width: 145px;
  overflow: hidden;
  font-size: 12px;
  font-weight: 620;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-pulse {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 1px var(--success);
}

.status-pulse.is-syncing {
  background: var(--voice);
  box-shadow: 0 0 0 1px var(--voice);
  animation: status-pulse 1.4s ease-in-out infinite;
}

.status-pulse.has-error {
  background: var(--danger);
  box-shadow: 0 0 0 1px var(--danger);
}

@keyframes status-pulse {
  50% { box-shadow: 0 0 0 5px rgba(53, 89, 232, 0.13); }
}

.quiet-button,
.primary-button,
.text-button,
.icon-button,
.timestamp-button,
.tab-button,
.recording-row,
.source-link {
  border: 0;
  cursor: pointer;
}

.quiet-button {
  display: inline-flex;
  min-height: 42px;
  padding: 0 12px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--paper);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
}

.quiet-button:hover {
  border-color: var(--line-strong);
  background: white;
}

.quiet-button svg,
.icon-button svg {
  width: 18px;
  height: 18px;
}

.sync-button.is-syncing svg,
.mobile-sync.is-syncing svg {
  animation: rotate 900ms linear infinite;
}

@keyframes rotate {
  to { transform: rotate(360deg); }
}

main {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-rows: 72px minmax(0, 1fr);
}

.topbar {
  display: flex;
  padding: 0 26px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(238, 243, 245, 0.9);
  backdrop-filter: blur(14px);
}

.search {
  display: grid;
  width: min(560px, 58vw);
  height: 42px;
  padding: 0 11px;
  grid-template-columns: 21px 1fr auto;
  align-items: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: rgba(251, 252, 253, 0.82);
  transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

.search:focus-within {
  border-color: rgba(53, 89, 232, 0.35);
  background: white;
  box-shadow: 0 0 0 3px rgba(53, 89, 232, 0.08);
}

.search svg {
  width: 18px;
  height: 18px;
  color: var(--slate);
}

.search input {
  min-width: 0;
  height: 38px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.search input::placeholder {
  color: #87959b;
}

.search kbd {
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-bottom-color: var(--line-strong);
  border-radius: 6px;
  background: var(--cloud);
  color: var(--slate);
  font-family: var(--mono);
  font-size: 10px;
}

.mobile-brand,
.mobile-nav {
  display: none;
}

.icon-button.mobile-sync {
  display: none;
}

.workspace-grid {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-columns: minmax(360px, 450px) minmax(420px, 1fr);
  margin: 0 20px 20px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.list-pane,
.detail-pane {
  min-width: 0;
  min-height: 0;
}

.list-pane {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  border-right: 1px solid var(--line);
  background: var(--paper);
}

.view-header {
  display: flex;
  min-height: 136px;
  padding: 27px 28px 20px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--voice);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  font-family: var(--display);
  letter-spacing: -0.03em;
  text-wrap: balance;
}

p,
li {
  text-wrap: pretty;
}

h1 {
  margin: 0;
  font-size: clamp(26px, 2.4vw, 34px);
  font-weight: 620;
  line-height: 1.12;
}

.view-description {
  margin: 8px 0 0;
  color: var(--slate);
  font-size: 13px;
}

.icon-button {
  display: inline-flex;
  width: 42px;
  height: 42px;
  padding: 0;
  flex: 0 0 42px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: transparent;
}

.icon-button:hover {
  background: var(--cloud);
}

.back-button {
  display: none;
}

.filters {
  display: grid;
  padding: 13px 18px;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  border-bottom: 1px solid var(--line);
  background: #f7f9fa;
}

.filters label {
  display: grid;
  gap: 4px;
}

.filters label span {
  color: var(--slate);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.filters input,
.filters select {
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  color: var(--ink-soft);
  font-size: 12px;
}

.text-button {
  min-height: 32px;
  padding: 0 6px;
  justify-self: start;
  background: transparent;
  color: var(--voice-dark);
  font-size: 12px;
  font-weight: 650;
}

.text-button:hover,
.tab-button:hover {
  color: var(--voice-dark);
}

.completed-toggle {
  display: flex;
  min-height: 43px;
  padding: 0 22px;
  align-items: center;
  gap: 9px;
  border-bottom: 1px solid var(--line);
  color: var(--slate);
  cursor: pointer;
  font-size: 12px;
}

.completed-toggle input,
.action-check input,
.review-control input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--voice);
}

.content-list {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.loading-row {
  display: grid;
  min-height: 132px;
  padding: 24px 27px;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}

.loading-row span {
  height: 11px;
  border-radius: 5px;
  background: #e8edef;
  animation: loading 1.4s ease-in-out infinite alternate;
}

.loading-row span:nth-child(1) { width: 34%; }
.loading-row span:nth-child(2) { width: 82%; }
.loading-row span:nth-child(3) { width: 58%; }

@keyframes loading {
  to { opacity: 0.45; }
}

.recording-row {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 134px;
  padding: 22px 27px 20px;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
  transition: background-color 150ms ease;
}

.recording-row::before {
  position: absolute;
  top: 16px;
  bottom: 16px;
  left: 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: transparent;
  content: "";
}

.recording-row:hover {
  background: #f7f9fa;
}

.recording-row.is-selected {
  background: var(--voice-pale);
}

.recording-row.is-selected::before {
  background: var(--voice);
}

.recording-row.is-reviewed .recording-title {
  color: var(--ink-soft);
}

.row-top,
.row-meta,
.row-footer {
  display: flex;
  align-items: center;
  gap: 8px;
}

.row-top {
  justify-content: space-between;
}

.row-date,
.row-duration {
  color: var(--slate);
  font-family: var(--mono);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.025em;
}

.new-label,
.meta-pill,
.tag-pill,
.count-pill,
.language-pill {
  display: inline-flex;
  min-height: 22px;
  padding: 2px 7px;
  align-items: center;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 650;
}

.new-label {
  background: var(--voice);
  color: white;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.recording-title {
  margin: 0;
  color: var(--ink);
  font-family: var(--display);
  font-size: 17px;
  font-weight: 620;
  letter-spacing: -0.018em;
  line-height: 1.3;
}

.recording-summary {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--slate);
  font-size: 12px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.row-footer {
  min-height: 22px;
  justify-content: space-between;
}

.count-pill {
  background: #edf1f2;
  color: var(--ink-soft);
}

.count-pill.has-actions {
  background: var(--signal-pale);
  color: #8b5a0e;
}

.row-tags {
  display: flex;
  min-width: 0;
  gap: 5px;
  overflow: hidden;
}

.tag-pill {
  max-width: 105px;
  overflow: hidden;
  background: #edf1f2;
  color: var(--slate);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.action-row {
  display: grid;
  min-height: 104px;
  padding: 19px 24px;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background: transparent;
  transition: opacity 170ms ease, background-color 150ms ease;
}

.action-row:hover {
  background: #f7f9fa;
}

.action-row.is-completed {
  opacity: 0.58;
}

.action-row.is-completed .action-text {
  text-decoration: line-through;
}

.action-check {
  display: flex;
  padding-top: 3px;
  align-items: flex-start;
}

.action-body {
  min-width: 0;
}

.action-text {
  display: block;
  margin: 0;
  color: var(--ink);
  cursor: pointer;
  font-size: 14px;
  font-weight: 560;
  line-height: 1.45;
}

.source-link {
  display: inline-flex;
  max-width: 100%;
  min-height: 34px;
  margin-top: 8px;
  padding: 0;
  align-items: center;
  gap: 7px;
  background: transparent;
  color: var(--slate);
  font-size: 11px;
  text-align: left;
}

.source-link:hover {
  color: var(--voice-dark);
}

.source-link span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty-list,
.error-state {
  display: grid;
  min-height: 280px;
  padding: 44px 30px;
  place-content: center;
  text-align: center;
}

.empty-list h2,
.error-state h2 {
  margin: 0;
  font-size: 21px;
  font-weight: 620;
}

.empty-list p,
.error-state p {
  max-width: 320px;
  margin: 8px auto 0;
  color: var(--slate);
  font-size: 13px;
}

.primary-button {
  display: inline-flex;
  min-height: 42px;
  margin-top: 18px;
  padding: 0 16px;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: var(--voice);
  color: white;
  font-size: 13px;
  font-weight: 650;
}

.primary-button:hover {
  background: var(--voice-dark);
}

.detail-pane {
  position: relative;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #fff;
  scrollbar-gutter: stable;
}

.empty-detail {
  display: grid;
  min-height: 100%;
  padding: 40px;
  place-content: center;
  text-align: center;
}

.empty-detail h2 {
  margin: 0;
  font-size: 27px;
  font-weight: 600;
}

.empty-detail > p:last-child {
  max-width: 360px;
  margin: 9px auto 0;
  color: var(--slate);
  font-size: 13px;
}

.empty-signal {
  display: flex;
  width: 92px;
  height: 54px;
  margin: 0 auto 22px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: 17px;
  background: var(--voice-pale);
  color: var(--voice);
}

.empty-signal span {
  width: 3px;
  border-radius: 99px;
  background: currentColor;
}

.empty-signal span:nth-child(1),
.empty-signal span:nth-child(7) { height: 8px; }
.empty-signal span:nth-child(2),
.empty-signal span:nth-child(6) { height: 18px; }
.empty-signal span:nth-child(3),
.empty-signal span:nth-child(5) { height: 30px; }
.empty-signal span:nth-child(4) { height: 42px; }

.detail-header {
  padding: 28px clamp(24px, 4vw, 50px) 24px;
  border-bottom: 1px solid var(--line);
}

.detail-mobile-bar {
  display: none;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.meta-pill,
.language-pill {
  background: var(--cloud);
  color: var(--slate);
  font-family: var(--mono);
  font-size: 9px;
}

.language-pill {
  background: var(--voice-pale);
  color: var(--voice-dark);
}

.detail-title {
  max-width: 850px;
  margin: 13px 0 9px;
  font-size: clamp(27px, 3vw, 42px);
  font-weight: 600;
  line-height: 1.13;
}

.detail-summary {
  max-width: 760px;
  margin: 0;
  color: var(--slate);
  font-size: 14px;
  line-height: 1.6;
}

.detail-controls {
  display: flex;
  margin-top: 21px;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.review-control {
  display: inline-flex;
  min-height: 42px;
  padding: 0 13px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}

.drive-link {
  display: inline-flex;
  min-height: 42px;
  padding: 0 13px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.drive-link:hover {
  border-color: var(--line-strong);
  background: var(--cloud);
}

.drive-link svg {
  width: 15px;
  height: 15px;
}

.audio-shell {
  display: grid;
  margin: 0 clamp(24px, 4vw, 50px);
  padding: 20px 0;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 17px;
  border-bottom: 1px solid var(--line);
}

.audio-label {
  display: flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-radius: 14px;
  background: var(--ink);
  color: white;
}

.audio-label span {
  width: 2px;
  border-radius: 99px;
  background: currentColor;
}

.audio-label span:nth-child(1),
.audio-label span:nth-child(5) { height: 8px; }
.audio-label span:nth-child(2),
.audio-label span:nth-child(4) { height: 16px; }
.audio-label span:nth-child(3) { height: 24px; }

.audio-shell audio {
  width: 100%;
  height: 40px;
}

.detail-tabs {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  min-height: 53px;
  padding: 0 clamp(24px, 4vw, 50px);
  align-items: end;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.93);
  backdrop-filter: blur(12px);
}

.tab-button {
  position: relative;
  min-height: 52px;
  padding: 0 1px;
  background: transparent;
  color: var(--slate);
  font-size: 12px;
  font-weight: 650;
}

.tab-button::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  border-radius: 2px;
  background: transparent;
  content: "";
}

.tab-button.is-active {
  color: var(--ink);
}

.tab-button.is-active::after {
  background: var(--voice);
}

.detail-content {
  padding: 30px clamp(24px, 4vw, 50px) 70px;
}

.notes-grid {
  display: grid;
  max-width: 860px;
  gap: 30px;
}

.notes-section h3,
.tag-editor h3 {
  display: flex;
  margin: 0 0 12px;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 650;
}

.section-index {
  color: var(--voice);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.05em;
}

.notes-section > p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.72;
  white-space: pre-line;
}

.notes-list {
  display: grid;
  margin: 0;
  padding: 0;
  gap: 9px;
  list-style: none;
}

.notes-list li {
  position: relative;
  padding-left: 19px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.58;
}

.notes-list li::before {
  position: absolute;
  top: 0.66em;
  left: 1px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--voice);
  content: "";
}

.detail-actions {
  display: grid;
  gap: 8px;
}

.detail-action {
  display: grid;
  padding: 12px 14px;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fafcfc;
  cursor: pointer;
  font-size: 13px;
  line-height: 1.5;
}

.detail-action input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--voice);
}

.detail-action.is-completed span {
  color: var(--slate);
  text-decoration: line-through;
}

.tag-editor {
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.tag-form {
  display: flex;
  max-width: 560px;
  gap: 8px;
}

.tag-form input {
  min-width: 0;
  min-height: 42px;
  padding: 0 12px;
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink);
}

.tag-form .primary-button {
  margin: 0;
}

.tag-hint {
  margin: 7px 0 0;
  color: var(--slate);
  font-size: 11px;
}

.transcript-list {
  position: relative;
  display: grid;
  max-width: 920px;
  padding-left: 0;
  gap: 0;
}

.transcript-list::before {
  position: absolute;
  top: 17px;
  bottom: 22px;
  left: 43px;
  width: 1px;
  background: var(--line-strong);
  content: "";
}

.transcript-segment {
  position: relative;
  display: grid;
  min-height: 68px;
  padding: 7px 0 18px;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 18px;
  border-radius: 12px;
  contain-intrinsic-size: auto 68px;
  content-visibility: auto;
  transition: background-color 150ms ease;
}

.transcript-segment.is-active {
  background: var(--voice-pale);
}

.timestamp-button {
  position: relative;
  z-index: 1;
  align-self: start;
  min-height: 32px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  color: var(--voice-dark);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.timestamp-button:hover {
  border-color: var(--voice);
}

.transcript-copy {
  padding: 2px 16px 0 0;
}

.speaker {
  display: block;
  margin-bottom: 4px;
  color: #8a5700;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.transcript-copy p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.62;
}

.health-page {
  display: grid;
  padding: 28px;
  gap: 14px;
}

.health-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fafcfc;
}

.health-card.is-warning {
  border-color: #efd49e;
  background: var(--signal-pale);
}

.health-card.is-error {
  border-color: #efb4b4;
  background: #fff0f0;
}

.health-card h2,
.health-card h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 650;
}

.health-card p {
  margin: 6px 0 0;
  color: var(--slate);
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-line;
}

.health-metric {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}

.health-metric strong {
  font-family: var(--display);
  font-size: 25px;
  font-weight: 620;
}

.incomplete-list {
  display: grid;
  margin: 12px 0 0;
  padding: 0;
  gap: 8px;
  list-style: none;
}

.incomplete-list li {
  padding: 9px 11px;
  border-radius: 9px;
  background: white;
  font-size: 11px;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 80;
  max-width: min(380px, calc(100vw - 32px));
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--ink);
  color: white;
  box-shadow: 0 12px 30px rgba(23, 36, 42, 0.2);
  font-size: 12px;
}

@media (max-width: 1099px) {
  .app-shell {
    grid-template-columns: 78px minmax(0, 1fr);
  }

  .sidebar {
    padding-inline: 11px;
  }

  .brand {
    justify-content: center;
  }

  .brand > span:last-child,
  .nav-link > span:not(.nav-count):not(.health-state),
  .source-state > span:last-child,
  .sync-button span {
    display: none;
  }

  .sidebar nav {
    margin-top: 24px;
  }

  .nav-link {
    padding: 0;
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .nav-count,
  .health-state {
    position: absolute;
    margin: -24px 0 0 24px;
  }

  .health-state {
    min-width: 15px;
    height: 15px;
    padding: 0;
    overflow: hidden;
    font-size: 0;
    line-height: 15px;
  }

  .health-state::after {
    color: inherit;
    content: attr(data-compact);
    font-size: 9px;
  }

  .source-state {
    justify-content: center;
  }

  .workspace-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .list-pane {
    border-right: 0;
  }

  .detail-pane {
    position: absolute;
    inset: 0;
    z-index: 15;
    display: block;
    visibility: hidden;
    transform: translateX(102%);
    transition: transform 220ms cubic-bezier(.2, .8, .2, 1);
  }

  body.detail-open .detail-pane {
    visibility: visible;
    transform: translateX(0);
  }

  body.detail-open .list-pane {
    visibility: hidden;
  }

  .detail-mobile-bar {
    display: flex;
    min-height: 54px;
    padding: 0 18px;
    align-items: center;
    border-bottom: 1px solid var(--line);
  }

  .detail-mobile-bar button {
    display: inline-flex;
    min-height: 40px;
    padding: 0 10px;
    align-items: center;
    gap: 7px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--voice-dark);
    font-weight: 650;
  }

  .detail-mobile-bar svg {
    width: 17px;
    height: 17px;
  }
}

@media (max-width: 699px) {
  .login-shell {
    display: block;
    width: 100%;
    min-height: 100dvh;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .login-signal {
    display: none;
  }

  .login-card {
    min-height: 100dvh;
    padding: max(28px, env(safe-area-inset-top)) 24px max(28px, env(safe-area-inset-bottom));
  }

  .login-brand {
    margin-bottom: clamp(48px, 12vh, 88px);
  }

  .login-card h1 {
    font-size: 36px;
  }

  body {
    overflow: hidden;
  }

  body.login-page {
    overflow: auto;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    display: none;
  }

  main {
    height: calc(100dvh - 66px);
    grid-template-rows: 60px minmax(0, 1fr);
  }

  .topbar {
    padding: 0 14px;
    gap: 10px;
  }

  .mobile-brand {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .mobile-brand .brand-mark {
    width: 31px;
    height: 31px;
    flex-basis: 31px;
    border-radius: 10px;
  }

  .mobile-brand strong {
    font-size: 15px;
  }

  .search {
    width: auto;
    height: 44px;
    min-width: 0;
    flex: 1;
    grid-template-columns: 19px minmax(0, 1fr);
  }

  .search kbd {
    display: none;
  }

  .icon-button.mobile-sync {
    display: inline-flex;
  }

  .icon-button {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }

  .search input,
  .filters input,
  .filters select,
  .quiet-button,
  .primary-button,
  .text-button,
  .completed-toggle,
  .source-link,
  .review-control,
  .drive-link,
  .tag-form input,
  .detail-mobile-bar button {
    min-height: 44px;
  }

  .search input,
  .filters input,
  .filters select,
  .audio-shell audio {
    height: 44px;
  }

  .workspace-grid {
    height: 100%;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .view-header {
    min-height: 116px;
    padding: 20px 19px 17px;
  }

  h1 {
    font-size: 26px;
  }

  .view-description {
    margin-top: 5px;
  }

  .recording-row {
    min-height: 126px;
    padding: 19px;
  }

  .action-row {
    grid-template-columns: 44px minmax(0, 1fr);
    padding-inline: 19px;
  }

  .action-check {
    min-width: 44px;
    min-height: 44px;
    padding-top: 0;
    align-items: center;
    justify-content: center;
  }

  .filters {
    padding-inline: 14px;
  }

  .detail-pane {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 66px;
    left: 0;
    z-index: 40;
  }

  body.detail-open .topbar {
    visibility: hidden;
  }

  .detail-header {
    padding: 22px 19px 19px;
  }

  .detail-title {
    font-size: 29px;
  }

  .audio-shell {
    margin-inline: 19px;
    grid-template-columns: 1fr;
  }

  .audio-label {
    display: none;
  }

  .detail-tabs {
    padding-inline: 19px;
  }

  .detail-content {
    padding: 24px 19px 55px;
  }

  .tag-form {
    display: grid;
  }

  .transcript-segment {
    grid-template-columns: 69px minmax(0, 1fr);
    gap: 11px;
  }

  .transcript-list::before {
    left: 34px;
  }

  .timestamp-button {
    min-height: 44px;
    padding-inline: 5px;
  }

  .mobile-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 50;
    display: grid;
    height: 66px;
    padding: 4px max(8px, env(safe-area-inset-right)) max(4px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid var(--line);
    background: rgba(251, 252, 253, 0.96);
    backdrop-filter: blur(14px);
  }

  .mobile-nav a {
    display: flex;
    min-width: 0;
    min-height: 54px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 3px;
    border-radius: 10px;
    color: var(--slate);
    font-size: 9px;
    font-weight: 650;
    text-decoration: none;
  }

  .mobile-nav a.is-active {
    color: var(--voice);
  }

  .mobile-nav svg {
    width: 20px;
    height: 20px;
  }

  .toast {
    right: 16px;
    bottom: 80px;
    left: 16px;
  }
}

@media (max-width: 359px) {
  .mobile-brand strong {
    display: none;
  }

  .filters {
    grid-template-columns: 1fr;
  }

  .row-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .detail-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .review-control,
  .drive-link {
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
