.upload-button { white-space: nowrap; min-height: 40px; }
.upload-help { margin: 0 0 18px; color: var(--text-secondary); font-size: 12px; line-height: 1.7; }
.upload-feedback { margin: 0 0 18px; overflow-wrap: anywhere; }
.pill.imported { color: #475467; background: #f2f4f7; border-color: #d0d5dd; white-space: nowrap; }
.row-transcribe .action-label { display: inline; color: var(--accent); font-weight: 600; }
.selected .row-transcribe .action-label { color: inherit; }
.library-tools { flex-wrap: wrap; }
@media (max-width: 600px) {
  .library-tools .upload-button { width: 100%; }
}

/* Model guidance keeps the accessible native select; details wrap on mobile. */
.reprocess-controls #reprocess-model {
  flex: 1 1 350px;
  min-width: 0;
  max-width: 100%;
}
.reprocess-controls #reprocess-language {
  flex: 1 1 240px;
  min-width: 0;
  max-width: 100%;
}
.model-details {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
}
.model-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.model-tag {
  display: inline-flex;
  padding: 3px 9px;
  border: 1px solid #dce2ea;
  border-radius: 999px;
  color: #344054;
  background: #fff;
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
}
.model-tag--accent {
  background: #eef0ff;
  border-color: #d9ddff;
  color: #3538cd;
}
.model-tag--warning {
  background: #fffaeb;
  border-color: #fedf89;
  color: #93370d;
}
.model-languages {
  color: var(--text);
  font-size: 13px;
  line-height: 21px;
}
.model-details .step-text {
  font-size: 12px;
  line-height: 20px;
}

/* Library redesign: self-hosted Inter and official Tabler outline icons. */
@font-face {
  font-family: Inter;
  src: url("assets/fonts/inter-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Inter;
  src: url("assets/fonts/inter-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Inter;
  src: url("assets/fonts/inter-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Inter;
  src: url("assets/fonts/inter-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Inter;
  src: url("assets/fonts/inter-cyrillic-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: Inter;
  src: url("assets/fonts/inter-cyrillic-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: Inter;
  src: url("assets/fonts/inter-cyrillic-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: Inter;
  src: url("assets/fonts/inter-cyrillic-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: Inter;
  src: url("assets/fonts/inter-cyrillic-ext-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0460-048F, U+0492-04AF, U+04B2-052F;
}
@font-face {
  font-family: Inter;
  src: url("assets/fonts/inter-cyrillic-ext-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
  unicode-range: U+0460-048F, U+0492-04AF, U+04B2-052F;
}
@font-face {
  font-family: Inter;
  src: url("assets/fonts/inter-cyrillic-ext-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
  unicode-range: U+0460-048F, U+0492-04AF, U+04B2-052F;
}
@font-face {
  font-family: Inter;
  src: url("assets/fonts/inter-cyrillic-ext-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
  unicode-range: U+0460-048F, U+0492-04AF, U+04B2-052F;
}
:root {
  --sidebar-width: 232px;
  --header-height: 72px;
  --text-muted: #667085;
  --font-mono: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
body {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
body.signed-in {
  background: #fff;
}
.icon {
  display: inline-block;
  flex: none;
  width: 20px;
  height: 20px;
  background: currentColor;
  mask: var(--icon) center/contain no-repeat;
  -webkit-mask: var(--icon) center/contain no-repeat;
  vertical-align: middle;
}
.i-file {
  --icon: url("assets/icons/file-text.svg");
}
.i-activity {
  --icon: url("assets/icons/chart-line.svg");
}
.i-chart {
  --icon: url("assets/icons/chart-bar.svg");
}
.i-trash {
  --icon: url("assets/icons/trash.svg");
}
.i-settings {
  --icon: url("assets/icons/settings.svg");
}
.i-search {
  --icon: url("assets/icons/search.svg");
}
.i-filter {
  --icon: url("assets/icons/filter.svg");
}
.i-chevron-right {
  --icon: url("assets/icons/chevron-right.svg");
}
.i-chevron-left {
  --icon: url("assets/icons/chevron-left.svg");
}
.i-chevron-down {
  --icon: url("assets/icons/chevron-down.svg");
}
.i-dots {
  --icon: url("assets/icons/dots-vertical.svg");
}
.i-arrow-down {
  --icon: url("assets/icons/arrow-down.svg");
}
.i-x {
  --icon: url("assets/icons/x.svg");
}
.i-menu {
  --icon: url("assets/icons/menu-2.svg");
}
.i-download {
  --icon: url("assets/icons/download.svg");
}
.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;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--accent);
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
}
.skip-link:focus {
  top: 12px;
}
:is(button, a, input, select):focus-visible {
  outline: 3px solid #a4a7ee;
  outline-offset: 3px;
}
button:disabled {
  cursor: not-allowed;
}
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border-color: transparent;
  background: transparent;
  color: var(--text-secondary);
}
.header-inner {
  max-width: none;
  height: var(--header-height);
  padding: 0 26px;
  gap: 16px;
}
.brand {
  font-size: 15px;
  gap: 14px;
  white-space: nowrap;
}
.brand-mark {
  width: 32px;
  height: 32px;
  font-family: Inter, sans-serif;
  font-size: 16px;
  border-radius: 8px;
}
.brand .org {
  color: #7c88a2;
}
#user-box {
  margin-left: auto;
  gap: 14px;
  color: var(--text);
  font-size: 14px;
}
#user-trigger {
  gap: 14px;
  font-weight: 400;
  padding: 4px;
}
#user-trigger > .icon {
  width: 16px;
  height: 16px;
  margin-left: 2px;
}
.avatar {
  width: 40px;
  height: 40px;
  font-size: 14px;
}
.badge-admin {
  font-size: 12px;
  border: 0;
  padding: 4px 10px;
}
.nav {
  position: fixed;
  top: var(--header-height);
  bottom: 0;
  left: 0;
  width: var(--sidebar-width);
  border-bottom: 0;
  border-right: 1px solid var(--border);
  background: #fafbfe;
  display: flex;
  flex-direction: column;
  padding: 12px 12px 20px;
  z-index: 9;
}
.nav-inner {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: none;
}
.nav a {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 13px 16px;
  border: 0;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 400;
  min-height: 46px;
  margin: 0;
}
.nav a > .icon {
  width: 22px;
  height: 22px;
}
.nav a.active {
  background: #eaeaff;
  color: var(--accent);
  font-weight: 500;
}
.nav a:hover {
  background: var(--accent-soft);
}
.nav-settings {
  margin-top: auto;
  border: 0;
  border-top: 1px solid var(--border);
  border-radius: 0;
  padding: 24px 8px 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-secondary);
  background: transparent;
  font-size: 12px;
  white-space: nowrap;
  min-height: 60px;
}
.connection-icon { position: relative; display: inline-flex; flex: 0 0 auto; }
.connection-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; min-width: 0; }
.connection-state { font-size: 11px; line-height: 1.4; white-space: normal; text-align: left; }
.connection-dot { position: absolute; right: -3px; top: -3px; width: 7px; height: 7px; border-radius: 50%; background: #b54708; border: 1px solid #fffaeb; }
.nav-settings.needs-authorization {
  padding: 14px 10px;
  margin-bottom: 2px;
  border: 1px solid #fedf89;
  border-radius: 8px;
  background: #fffaeb;
  color: #93370d;
  white-space: normal;
  text-align: left;
  animation: connection-attention 1.6s ease-in-out 3;
}
.nav-settings.needs-authorization:hover { background: #fef0c7; border-color: #fdb022; }
.nav-settings.needs-authorization .connection-state { font-weight: 600; }
.connection-required { padding: 14px 16px; margin: 0 0 20px; border: 1px solid #fedf89; border-radius: 8px; background: #fffaeb; color: #93370d; font-size: 14px; }
.connection-required p { margin: 5px 0 0; font-size: 13px; line-height: 1.6; }
/* Three gentle pulses (<5 s); the visible prompt remains after motion stops.
   The global prefers-reduced-motion rule below removes animation entirely. */
@keyframes connection-attention {
  0%, 100% { box-shadow: 0 0 0 0 rgba(247, 144, 9, 0); }
  50% { box-shadow: 0 0 0 4px rgba(247, 144, 9, .2); }
}
body.signed-in main {
  max-width: none;
  margin: 0 0 0 var(--sidebar-width);
  padding: 36px 28px 48px;
}
.mobile-menu {
  display: none;
}
.library {
  min-width: 0;
}
.library-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}
.library h1 {
  font-size: 34px;
  line-height: 1.2;
  letter-spacing: -1.1px;
  font-weight: 700;
  margin: 0 0 5px;
}
.library-header p {
  margin: 0;
  color: #5d6d89;
  font-size: 16px;
  line-height: 24px;
}
.library-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 10px;
}
.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  height: 44px;
  width: 355px;
  padding: 0 14px;
  color: #536585;
  background: var(--surface);
}
.search-field:focus-within {
  border-color: var(--accent);
  outline: 3px solid var(--accent-soft);
}
.search-field input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  box-shadow: none !important;
  background: none;
  font-size: 14px;
  color: var(--text);
  font-family: inherit;
}
.search-field input:focus-visible {
  outline: 0;
}
.search-field input::placeholder {
  color: #60718f;
  opacity: 1;
}
.filter-button {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 44px;
  padding: 0 15px;
  font-weight: 500;
  border-radius: 7px;
  white-space: nowrap;
}
.filter-button[aria-expanded="true"] {
  background: var(--accent-soft);
  border-color: #c7c9f7;
}
#filters-count {
  min-width: 19px;
  line-height: 20px;
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  text-align: center;
}
.filter-panel {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  padding: 18px 20px;
  margin: -10px 0 24px;
  background: #f8f9fc;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.filter-panel label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  flex: 1;
}
.filter-panel select {
  width: 100%;
  height: 38px;
}
.text-button {
  background: transparent;
  border: 0;
  color: var(--accent);
  height: 38px;
}
.jobs-count {
  margin: 0 0 16px;
  font-size: 14px;
  color: #5d6d89;
  line-height: 24px;
}
.library-table-wrap {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
#jobs-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 14px;
}
#jobs-table th {
  height: 57px;
  padding: 14px 22px;
  color: #526483;
  background: #fafbfe;
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
#jobs-table th:nth-child(1) {
  width: 29%;
}
#jobs-table th:nth-child(2) {
  width: 15%;
}
#jobs-table th:nth-child(3) {
  width: 12%;
}
#jobs-table th:nth-child(4) {
  width: 11%;
}
#jobs-table th:nth-child(5) {
  width: 10%;
}
#jobs-table th:nth-child(6) {
  width: 23%;
}
.sort-button {
  border: 0;
  background: none;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  font-size: inherit;
  font-weight: 500;
}
.sort-button:hover {
  background: none;
  color: var(--accent);
}
.sort-button .icon {
  width: 17px;
  height: 17px;
  color: #334462;
}
[aria-sort="ascending"] .icon {
  transform: rotate(180deg);
}
#jobs-table td {
  padding: 16px 22px;
  height: 82px;
  border-bottom: 1px solid var(--border);
  color: #526483;
  font-variant-numeric: tabular-nums;
  vertical-align: middle;
}
#jobs-table tr:last-child td {
  border-bottom: 0;
}
#jobs-table tr:hover {
  background: #fafbfe;
}
#jobs-table tr.selected {
  background: #f0f1ff;
}
#jobs-table .record-name {
  min-width: 0;
  color: var(--text);
  overflow: hidden;
}
a.record-link {
  display: block;
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
  line-height: 22px;
}
a.record-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.record-filename {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
  line-height: 19px;
  color: #647694;
  margin-top: 2px;
}
.record-date {
  white-space: nowrap;
}
.pill {
  font-size: 12px;
  font-weight: 500;
  border: 0;
  gap: 6px;
  padding: 4px 10px;
  white-space: nowrap;
}
.pill.completed {
  background: #e9fcf3;
  color: #08765b;
}
.pill::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  margin-right: 6px;
}
#jobs-table td.record-actions {
  padding-right: 12px;
  padding-left: 4px;
}
.row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}
.row-open {
  height: 40px;
  min-width: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  text-decoration: none;
  color: #526483;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 500;
}
.action-label {
  display: none;
}
.selected .row-open {
  background: var(--accent);
  color: #fff;
  padding: 0 16px;
  box-shadow: 0 1px 2px #1b1c541a;
}
.selected .row-open:hover {
  background: var(--accent-hover);
}
.selected .row-open > .icon {
  display: none;
}
.selected .action-label {
  display: inline;
}
.record-more {
  width: 28px;
  flex: none;
  opacity: 0;
}
.selected .record-more,
tr:hover .record-more,
tr:focus-within .record-more {
  opacity: 1;
}
.row-open:hover {
  background: var(--accent-soft);
}
.library-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 30px;
  gap: 20px;
}
.library-footer p {
  font-size: 14px;
  color: #60718f;
  margin: 0;
}
#jobs-pages {
  display: flex;
  gap: 8px;
  align-items: center;
}
.page-button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border: 0;
  border-radius: 5px;
  color: #536585;
  background: none;
  font-size: 14px;
}
.page-button[aria-current="page"] {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 4px #3538cd20;
}
.page-button:disabled {
  opacity: 0.35;
}
.page-button .icon {
  width: 20px;
  height: 20px;
}
.record-menu {
  position: fixed;
  z-index: 50;
  width: 186px;
  padding: 6px;
  border: 1px solid var(--border);
  background: white;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
}
.record-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  padding: 10px;
  font-size: 13px;
  text-align: left;
}
.record-menu .icon {
  width: 18px;
  height: 18px;
}
.library-empty {
  padding: 64px 24px;
  text-align: center;
  border: 1px dashed var(--border-strong);
  border-radius: 8px;
}
.library-empty > .icon {
  width: 32px;
  height: 32px;
  color: var(--accent);
  margin-bottom: 10px;
}
.library-empty h2 {
  font-size: 18px;
  margin: 0 0 8px;
  color: var(--text);
}
.library-empty p {
  margin: 0 auto 20px;
  max-width: 450px;
  font-size: 14px;
  line-height: 24px;
}
.library-table-wrap:has(table[hidden]) {
  display: none;
}
.list-error {
  padding: 22px;
  border: 1px solid var(--error-bd);
  border-radius: 8px;
  background: var(--error-bg);
  color: var(--error-fg);
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
}
.portal-notice {
  position: fixed;
  right: 24px;
  bottom: 24px;
  max-width: min(420px, calc(100vw - 48px));
  z-index: 100;
  padding: 16px 20px;
  border-radius: 8px;
  background: #101828;
  color: white;
  box-shadow: var(--shadow-lg);
}
#onboarding-card:not([hidden]) {
  margin-bottom: 28px;
}
.library[aria-busy="true"] .library-table-wrap {
  opacity: 0.55;
  pointer-events: none;
}
.card {
  box-shadow: none;
}
body.signed-in main:not(#app-view) .card-title {
  font-size: 19px;
  letter-spacing: -0.4px;
}
body.signed-in main:not(#app-view) > .card {
  margin-bottom: 24px;
}
.meta-grid {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}
.meta-item .v {
  overflow-wrap: anywhere;
}
.record-title-row {
  gap: 12px;
}
#record-title {
  font-family: inherit;
  font-size: 26px;
  font-weight: 600;
  min-width: 0;
}
.step-actions {
  flex-wrap: wrap;
}
#record-view .transcript {
  max-width: 940px;
}
.seg .s {
  font-size: 15px;
  line-height: 1.8;
}
#settings-dialog {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  width: min(840px, calc(100vw - 32px));
  max-height: 90vh;
  box-shadow: var(--shadow-lg);
}
#settings-dialog::backdrop {
  background: #10182855;
}
.settings-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.settings-heading h2 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.6px;
}
#settings-dialog #onboarding-card {
  border: 0;
  margin: 0;
}
#settings-dialog .card-header,
#settings-dialog .card-body {
  padding-left: 0;
  padding-right: 0;
}
/* Match the selected desktop reference's denser heading and roomier rows. */
@media (min-width: 1231px) {
  body.signed-in main {
    padding-top: 32px;
  }
  .library-header {
    margin-bottom: 22px;
  }
  #jobs-table td {
    height: 85px;
  }
  #jobs-table .record-link {
    font-size: 15px;
  }
  .row-open {
    font-size: 14px;
  }
  #jobs-table .pill {
    min-height: 30px;
    padding: 5px 11px;
  }
  #jobs-table .pill::before {
    margin-right: 0;
  }
}
@media (min-width: 1600px) {
  body.signed-in main {
    padding-left: 40px;
    padding-right: 40px;
  }
  #jobs-table th:nth-child(1) {
    width: 32%;
  }
  #jobs-table th:nth-child(6) {
    width: 20%;
  }
}
@media (max-width: 1230px) {
  :root {
    --sidebar-width: 210px;
  }
  .nav a {
    gap: 10px;
    padding: 12px 10px;
    font-size: 13px;
  }
  .nav-settings {
    font-size: 11px;
    gap: 8px;
  }
  .library-header {
    align-items: flex-start;
    gap: 16px;
  }
  .library-tools {
    padding-top: 0;
  }
  .search-field {
    width: 240px;
  }
  .library h1 {
    font-size: 30px;
  }
  .library-header p {
    font-size: 14px;
  }
  body.signed-in main {
    padding: 28px 22px;
  }
  #jobs-table th,
  #jobs-table td {
    padding-left: 14px;
    padding-right: 14px;
  }
  #jobs-table th:nth-child(1) {
    width: 29%;
  }
  #jobs-table th:nth-child(2) {
    width: 17%;
  }
  #jobs-table th:nth-child(3) {
    width: 14%;
  }
  #jobs-table th:nth-child(4) {
    width: 12%;
  }
  #jobs-table th:nth-child(5) {
    width: 13%;
  }
  #jobs-table th:nth-child(6) {
    width: 15%;
  }
  .selected .row-open {
    padding: 0 6px;
    background: var(--accent-soft);
    color: var(--accent);
  }
  .selected .row-open > .icon {
    display: inline-block;
  }
  .selected .action-label {
    display: none;
  }
  .record-more {
    opacity: 1;
  }
}
@media (max-width: 960px) {
  :root {
    --sidebar-width: 188px;
  }
  .nav a {
    font-size: 12px;
    gap: 8px;
  }
  .nav a .icon {
    width: 19px;
    height: 19px;
  }
  .nav-settings {
    white-space: normal;
    text-align: left;
  }
  .library-header {
    flex-direction: column;
    gap: 22px;
  }
  .library-tools {
    width: 100%;
  }
  .search-field {
    flex: 1;
    width: auto;
  }
  .library-header {
    margin-bottom: 24px;
  }
  #jobs-table td,
  #jobs-table th {
    padding-left: 10px;
    padding-right: 10px;
    font-size: 12px;
  }
  #jobs-table th {
    font-size: 11px;
  }
  .record-link {
    font-size: 13px;
  }
  .record-filename {
    font-size: 11px;
  }
  .pill {
    font-size: 11px;
    padding: 3px 6px;
  }
  .badge-admin {
    display: none;
  }
  .filter-panel {
    flex-wrap: wrap;
  }
  .filter-panel label {
    min-width: 140px;
  }
}
@media (max-width: 720px) {
  :root {
    --header-height: 64px;
    --sidebar-width: 240px;
  }
  .header-inner {
    padding: 0 16px;
    gap: 12px;
  }
  .brand {
    font-size: 14px;
    gap: 8px;
  }
  .brand .org {
    display: none;
  }
  .brand-mark {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }
  .mobile-menu:not([hidden]) {
    display: flex;
    margin-left: -6px;
    width: 30px;
  }
  .nav {
    transform: translateX(-100%);
    transition: transform 0.16s;
  }
  .nav-open .nav {
    transform: translateX(0);
    box-shadow: 12px 0 36px #10182820;
  }
  .nav a {
    font-size: 14px;
    gap: 16px;
  }
  .nav-settings {
    font-size: 12px;
  }
  .nav a .icon {
    width: 22px;
    height: 22px;
  }
  #user-trigger > span:first-child {
    display: none;
  }
  #user-trigger {
    gap: 8px;
  }
  .avatar {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }
  #user-box {
    gap: 0;
  }
  body.signed-in main {
    margin-left: 0;
    padding: 26px 18px 36px;
  }
  .library h1 {
    font-size: 30px;
  }
  .library-header p {
    font-size: 14px;
  }
  .library-header {
    margin-bottom: 24px;
  }
  .search-field {
    height: 44px;
    padding: 0 12px;
  }
  .filter-button {
    padding: 0 12px;
    font-size: 13px;
    gap: 6px;
  }
  .library-tools {
    gap: 8px;
  }
  .jobs-count {
    font-size: 12px;
    margin-bottom: 14px;
  }
  .library-table-wrap {
    border-radius: 8px;
  }
  #jobs-table,
  #jobs-table tbody {
    display: block;
  }
  #jobs-table thead {
    display: block;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
  }
  #jobs-table thead tr {
    display: flex;
    justify-content: space-between;
  }
  #jobs-table th {
    display: none !important;
  }
  #jobs-table th:nth-child(1),
  #jobs-table th:nth-child(2) {
    display: block !important;
    width: auto !important;
    height: auto;
    padding: 0;
    border: 0;
    font-size: 12px;
    background: transparent;
  }
  #jobs-table tbody tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 16px;
    padding: 18px 14px;
    border-bottom: 1px solid var(--border);
  }
  #jobs-table tbody tr:last-child {
    border: 0;
  }
  #jobs-table td {
    display: block;
    height: auto;
    border: 0;
    padding: 0;
    font-size: 13px;
  }
  #jobs-table td.record-name {
    grid-column: 1/-1;
  }
  .record-link {
    font-size: 15px;
    line-height: 24px;
  }
  .record-filename {
    font-size: 11px;
  }
  #jobs-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 10px;
    line-height: 15px;
    color: #667085;
    margin-bottom: 3px;
  }
  #jobs-table td.record-actions {
    grid-column: 1/-1;
    padding: 0;
  }
  .row-actions {
    justify-content: space-between;
  }
  .row-open,
  .selected .row-open {
    padding: 0 14px;
    min-height: 42px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 12px;
  }
  .selected .row-open {
    background: var(--accent);
    color: white;
  }
  .action-label,
  .selected .action-label {
    display: inline;
  }
  .row-open > .icon,
  .selected .row-open > .icon {
    display: none;
  }
  .record-more {
    width: 42px;
    height: 42px;
    opacity: 1;
  }
  .library-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
    margin-top: 24px;
  }
  .library-footer p {
    font-size: 12px;
  }
  #jobs-pages {
    align-self: center;
    gap: 8px;
  }
  .page-button {
    height: 38px;
    min-width: 38px;
  }
  .filter-panel {
    padding: 14px;
    gap: 14px;
  }
  .filter-panel label {
    min-width: 100%;
    width: 100%;
  }
  .filter-panel .text-button {
    padding-left: 0;
  }
  #settings-dialog {
    padding: 18px;
  }
  .settings-heading h2 {
    font-size: 20px;
  }
  .meta-grid {
    grid-template-columns: 1fr 1fr;
  }
  #record-title {
    font-size: 19px;
  }
  .card-body {
    padding: 18px;
  }
  .card-header {
    padding: 18px 18px 0;
  }
  .record-title-row {
    flex-wrap: wrap;
  }
  .seg {
    grid-template-columns: 48px 1fr;
  }
  .seg .s {
    font-size: 14px;
  }
  .login-card {
    width: calc(100% - 36px);
    max-width: 400px;
  }
  #settings-dialog .substeps {
    padding-left: 20px;
  }
  .card-body .table-wrap {
    max-width: 100%;
    overflow: auto;
  }
  .user-menu {
    width: 240px;
  }
  .library-empty {
    padding: 36px 16px;
  }
}
@media (max-width: 1230px) {
  #jobs-table .record-date {
    white-space: normal;
  }
}
@media (min-width: 721px) and (max-width: 960px) {
  #jobs-table,
  #jobs-table tbody {
    display: block;
  }
  #jobs-table thead {
    display: block;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
  }
  #jobs-table thead tr {
    display: flex;
    justify-content: space-between;
  }
  #jobs-table th {
    display: none !important;
  }
  #jobs-table th:nth-child(1),
  #jobs-table th:nth-child(2) {
    display: block !important;
    width: auto !important;
    height: auto;
    padding: 0;
    border: 0;
    font-size: 12px;
    background: transparent;
  }
  #jobs-table tbody tr {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px 12px;
    padding: 20px 18px;
    border-bottom: 1px solid var(--border);
  }
  #jobs-table tbody tr:last-child {
    border: 0;
  }
  #jobs-table td {
    display: block;
    height: auto;
    border: 0;
    padding: 0;
    font-size: 13px;
  }
  #jobs-table td.record-name {
    grid-column: 1/-1;
  }
  #jobs-table .record-link {
    font-size: 15px;
  }
  #jobs-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 10px;
    line-height: 15px;
    color: #667085;
    margin-bottom: 3px;
  }
  #jobs-table td.record-actions {
    grid-column: 1/-1;
    padding: 0;
  }
  .row-actions {
    justify-content: space-between;
  }
  .row-open,
  .selected .row-open {
    padding: 0 14px;
    min-height: 42px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 13px;
  }
  .selected .row-open {
    background: var(--accent);
    color: white;
  }
  .action-label,
  .selected .action-label {
    display: inline;
  }
  .row-open > .icon,
  .selected .row-open > .icon {
    display: none;
  }
  .record-more {
    width: 42px;
    height: 42px;
    opacity: 1;
  }
}
@media (max-width: 720px) {
  .nav {
    visibility: hidden;
  }
  .nav-open .nav {
    visibility: visible;
  }
  .mobile-menu:not([hidden]) {
    width: 36px;
    min-height: 44px;
  }
  .record-more,
  .row-open,
  .selected .row-open {
    min-height: 44px;
  }
  .page-button {
    min-height: 44px;
    min-width: 40px;
  }
}
.queue-header, .queue-pagination, .queue-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.queue-actions button { border: 1px solid var(--border-strong); border-radius: 6px; background: var(--surface); }
.queue-actions button:hover:not(:disabled) { background: var(--accent-soft); }
.queue-header, .queue-pagination { justify-content: space-between; }
.queue-pagination { margin-top: 16px; }
.queue-help { max-width: 800px; line-height: 1.6; margin: 12px 0 20px; }
.queue-error { color: #a42a2a; padding: 12px; border: 1px solid #e8cccc; border-radius: 6px; }
.queue-name { min-width: 180px; max-width: 300px; overflow-wrap: anywhere; }
.queue-name a { color: var(--text); text-decoration: none; }
.queue-name a:hover { text-decoration: underline; }
#queue-table { table-layout: fixed; }
#queue-table th, #queue-table td { padding: 14px 10px; white-space: normal; overflow-wrap: anywhere; vertical-align: top; }
#queue-table th:first-child { width: 25%; }
#queue-table th:nth-child(2) { width: 17%; }
#queue-table th:nth-child(3) { width: 20%; }
#queue-table th:nth-child(4) { width: 20%; }
#queue-table th:last-child { width: 18%; }
#queue-table .cell-muted { white-space: normal; font-size: 12px; margin-top: 4px; }
#queue-table .pill { white-space: normal; }
#queue-table button { white-space: normal; max-width: 100%; border: 1px solid var(--border-strong); border-radius: 6px; }
.queue-started { margin-top: 8px; }
.job-progress { margin-top: 20px; padding: 16px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.job-progress-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 13px; color: var(--text); }
.job-progress-heading strong { font-variant-numeric: tabular-nums; white-space: nowrap; }
.job-progress progress { display: block; width: 100%; height: 6px; margin: 10px 0; border: 0; border-radius: 4px; overflow: hidden; accent-color: #626262; background: #ededed; }
.job-progress progress::-webkit-progress-bar { background: #ededed; border-radius: 4px; }
.job-progress progress::-webkit-progress-value { background: #626262; border-radius: 4px; }
.job-progress progress::-moz-progress-bar { background: #626262; border-radius: 4px; }
.job-progress progress:indeterminate { background: repeating-linear-gradient(120deg, #eee 0, #eee 8px, #d5d5d5 8px, #d5d5d5 16px); }
.job-progress-detail, .job-progress-note { margin-top: 6px; color: var(--text-secondary); font-size: 12px; line-height: 1.5; }
.job-progress.compact { margin-top: 12px; padding: 0; border: 0; background: transparent; }
.job-progress.compact .job-progress-heading { font-size: 12px; }
#queue-state { font-weight: 600; }
@media (max-width: 720px) {
  .queue-actions button, #queue-table button { min-height: 44px; }
  #queue-table, #queue-table tbody { display: block; }
  #queue-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  #queue-table tr { display: grid; gap: 10px; padding: 16px 0; border-bottom: 1px solid var(--border); }
  #queue-table td { display: block; border: 0; padding: 0; max-width: none; }
  #queue-table td[data-label]::before { content: attr(data-label) ": "; color: var(--text-secondary); font-size: 12px; }
  #queue-table .queue-job-action button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
.transcript-versions { margin-bottom: 28px; padding: 16px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); }
.transcript-model-line { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 12px; color: var(--text-secondary); }
.transcript-model-tag { display: inline-block; max-width: 100%; overflow-wrap: anywhere; padding: 4px 8px; background: #f3f3f3; border: 1px solid var(--border); border-radius: 4px; color: var(--text); font-weight: 600; }
.transcript-version-control { display: grid; gap: 6px; margin-top: 14px; min-width: 0; }
.transcript-version-control label { font-size: 12px; color: var(--text-secondary); }
.transcript-version-control .select { width: 100%; min-width: 0; max-width: 100%; font-size: 12px; min-height: 36px; text-overflow: ellipsis; }
.transcript-version-control .select:disabled { opacity: 1; color: var(--text-secondary); background: #fafafa; cursor: default; }
#transcript-version-note { margin: 10px 0 0; font-size: 12px; line-height: 1.6; color: var(--text-secondary); }
.speaker-setting { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.speaker-setting label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; }
.speaker-setting input { width: 16px; height: 16px; accent-color: #333; }
.speaker-setting p { margin: 8px 0 0; line-height: 1.6; }
.speaker-note { margin: 0 0 22px; font-size: 12px; line-height: 1.6; color: var(--text-secondary); }
.speaker-label { display: block; width: fit-content; margin: 0 0 5px; padding: 2px 7px; border-radius: 4px; background: #f3f3f3; color: #555; font: 600 11px/1.5 Inter,sans-serif; }
