*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  --bg-grad-1: #f8f9fc;
  --bg-grad-2: #f4f6fb;
  --bg-grad-3: #eef1f7;
  --text-primary: #1b1c1f;
  --text-muted: #3d4047;
  --text-subtle: #5a5f6b;
  --surface: #ffffff;
  --surface-alt: #f6f7fb;
  --border: #d8dbe2;
  --border-strong: #cfd5e2;
  --border-subtle: #e2e4ea;
  --border-light: #edf0f5;
  --accent: #3b73ff;
  --accent-strong: #1c3f8f;
  --accent-soft: #e7edff;
  --accent-border: #c8d4ff;
  --focus-ring: #c6d4ff;
  --focus-border: #9ab2ff;
  --link: #1b3f94;
  --link-muted: #586074;
  --text-link-button: #2b2f38;
  --danger: #8a1f1f;
  --danger-bg: #fff2f2;
  --danger-border: #e7b8b8;
  --shadow-card: rgba(33, 39, 54, 0.05);
  --shadow-thumb: rgba(30, 51, 95, 0.2);
  --shadow-toast: rgba(15, 20, 30, 0.25);
  --slider-track: #d7dae1;
  --slider-thumb-bg: #ffffff;
  --progress-marker: #b7c1d6;
  --toast-bg: #1f2430;
  --toast-text: #f6f7fb;
  --table-header: #4a4f59;
  --archived-text: #6f7683;
  --text-on-accent: #ffffff;
  --nav-current-bg: var(--accent);
  --nav-current-border: var(--accent);
  --nav-current-text: var(--text-on-accent);
}

[hidden] {
  display: none !important;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg-grad-1: #0b0f17;
  --bg-grad-2: #121826;
  --bg-grad-3: #0f1420;
  --text-primary: #eef1f8;
  --text-muted: #c2cada;
  --text-subtle: #98a2b8;
  --surface: #151c2a;
  --surface-alt: #1b2334;
  --border: #2a3446;
  --border-strong: #2f3a50;
  --border-subtle: #253042;
  --border-light: #202837;
  --accent: #7aa2ff;
  --accent-strong: #dbe5ff;
  --accent-soft: #1c2948;
  --accent-border: #34508f;
  --focus-ring: #6f8dff;
  --focus-border: #7aa2ff;
  --link: #9cb7ff;
  --link-muted: #7c8aa4;
  --text-link-button: #e1e7f2;
  --danger: #ff8b8b;
  --danger-bg: #3a1f25;
  --danger-border: #6a2a36;
  --shadow-card: rgba(5, 8, 15, 0.5);
  --shadow-thumb: rgba(5, 8, 15, 0.6);
  --shadow-toast: rgba(0, 0, 0, 0.45);
  --slider-track: #2b3345;
  --slider-thumb-bg: #1b2334;
  --progress-marker: #3a4761;
  --toast-bg: #0f1420;
  --toast-text: #e7ebf5;
  --table-header: #b9c2d3;
  --archived-text: #7d879c;
  --text-on-accent: #ffffff;
  --nav-current-bg: var(--accent-border);
  --nav-current-border: var(--accent-border);
  --nav-current-text: var(--text-on-accent);
}

body {
  margin: 0;
  font-family: "DM Sans", "Avenir Next", "Trebuchet MS", sans-serif;
  background: radial-gradient(
    circle at 10% 10%,
    var(--bg-grad-1),
    var(--bg-grad-2) 55%,
    var(--bg-grad-3)
  );
  color: var(--text-primary);
}

html {
  scrollbar-gutter: stable;
}

.page {
  max-width: 1200px;
  margin: 32px auto 48px;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.page-nav {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  align-self: stretch;
}

.page-nav .link-button-group {
  margin-left: auto;
}

.page-header {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-end;
  justify-content: space-between;
}

.page-title {
  margin: 0 0 6px;
  font-size: 20px;
}

.dashboard-header {
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
}

.dashboard-header .header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
}

.field.field-full {
  max-width: none;
  width: 100%;
  flex: 0 0 auto;
}

.page-header h1 {
  margin: 0 0 6px;
  font-size: 22px;
}

.field {
  flex: 1 1 240px;
  max-width: 360px;
}

.field-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

.field-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  background: var(--surface);
  color: inherit;
}

.field-input:focus {
  outline: 2px solid var(--focus-ring);
  border-color: var(--focus-border);
}

.field-textarea {
  min-height: 110px;
  resize: vertical;
}

.progress {
  flex: 1 1 320px;
  min-width: 280px;
  position: relative;
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 8px;
  color: var(--text-muted);
}

.progress-track {
  display: flex;
  align-items: center;
  padding: 2px 0;
  position: relative;
}

.confetti-layer {
  pointer-events: none;
  overflow: hidden;
  z-index: 4;
}

.confetti-layer-page {
  position: fixed;
  inset: 0;
}

.confetti-layer-sandbox {
  position: absolute;
  inset: 0;
}

.confetti-piece {
  position: absolute;
  top: 0;
  left: var(--confetti-left, 50%);
  width: var(--confetti-width, 6px);
  height: var(--confetti-height, 10px);
  background: var(--confetti-color, var(--accent));
  border-radius: 2px;
  opacity: 0.95;
  transform: translate3d(0, -12px, 0) rotate(var(--confetti-rotate, 0deg));
  animation: confetti-fall var(--confetti-duration, 1200ms) ease-out
    var(--confetti-delay, 0ms) forwards;
}

@keyframes confetti-fall {
  to {
    transform: translate3d(0, var(--confetti-drop, 140px), 0)
      rotate(var(--confetti-rotate, 0deg));
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .confetti-piece {
    animation-duration: 1ms;
    opacity: 0;
  }
}

.progress-slider {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  appearance: none;
  background: linear-gradient(
    90deg,
    var(--accent) var(--progress, 0%),
    var(--slider-track) var(--progress, 0%)
  );
  outline: none;
  position: relative;
  z-index: 1;
}

.progress-slider::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--slider-thumb-bg);
  border: 2px solid var(--accent);
  box-shadow: 0 2px 6px var(--shadow-thumb);
}

.progress-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--slider-thumb-bg);
  border: 2px solid var(--accent);
  box-shadow: 0 2px 6px var(--shadow-thumb);
}

.progress-slider:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.progress-markers {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 10px;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 2;
}

.progress-marker {
  position: absolute;
  left: calc(var(--marker) * 1%);
  width: 2px;
  height: 10px;
  border-radius: 999px;
  background: var(--progress-marker);
  transform: translateX(-1px);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.debug-list {
  margin: 0;
  display: grid;
  gap: 10px;
}

.debug-row {
  display: grid;
  gap: 4px;
}

.debug-row dt {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}

.debug-row code {
  font-family: "DM Mono", "SFMono-Regular", "Menlo", "Monaco", "Consolas",
    monospace;
  font-size: 12px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 2px 6px;
  background: var(--surface-alt);
  color: var(--text-primary);
}

.debug-row dd {
  margin: 0;
  font-size: 13px;
  color: var(--text-primary);
  font-family: "DM Mono", "SFMono-Regular", "Menlo", "Monaco", "Consolas",
    monospace;
}

.debug-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.confetti-sandbox {
  position: relative;
  border: 1px dashed var(--border);
  border-radius: 12px;
  min-height: 160px;
  background: var(--surface-alt);
  padding: 16px;
  overflow: hidden;
}

.confetti-sandbox-label {
  font-size: 12px;
  color: var(--text-subtle);
}

.objective {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
}

.objective-graph {
  flex: 1 1 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
  align-self: stretch;
  position: relative;
  padding-top: 34px;
}

.graph-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: auto;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-alt);
  color: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  position: absolute;
  right: 0;
  top: 0;
}

.graph-toggle:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.graph-toggle-indicator {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
}

.graph-panel {
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 12px;
  background: var(--surface-alt);
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-self: stretch;
}

.graph-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

.graph-frame {
  position: relative;
  height: 160px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: linear-gradient(
      180deg,
      rgba(255, 255, 255, 0) 0%,
      rgba(0, 0, 0, 0.02) 100%
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 14%,
      rgba(0, 0, 0, 0.04) 14%,
      rgba(0, 0, 0, 0.04) 15%
    );
  overflow: hidden;
}

.graph-frame svg {
  width: 100%;
  height: 100%;
  display: block;
  position: absolute;
  inset: 0;
  z-index: 2;
}

.graph-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.graph-points circle {
  fill: var(--accent);
  stroke: var(--surface);
  stroke-width: 1;
}

.graph-axis {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.graph-axis-line {
  position: absolute;
  width: 1px;
  background: rgba(0, 0, 0, 0.08);
}

.graph-axis-labels {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  height: 16px;
  z-index: 3;
  pointer-events: none;
}

.graph-axis-label {
  position: absolute;
  transform: translateX(-50%);
  font-size: 11px;
  color: var(--text-subtle);
  white-space: nowrap;
}

.graph-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 16px;
  font-size: 12px;
  color: var(--text-muted);
  z-index: 4;
}

.action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border: 1px solid var(--accent-border);
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  text-decoration: none;
  line-height: 1.2;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.action-button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 16px;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 10px 20px var(--shadow-card);
}

.card-compact {
  min-height: auto;
}

.card h2 {
  margin: 0;
  font-size: 15px;
}

.section-list {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1 1 auto;
  display: grid;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.section-list.is-reordering {
  user-select: none;
}

.section-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px 26px 34px;
  border-radius: 6px;
  background: var(--surface-alt);
}

.section-item.is-dragging {
  opacity: 0.6;
  outline: 1px dashed var(--border);
  outline-offset: -1px;
}

.item-drag-handle {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 24px;
  border: none;
  background-color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
  border-radius: 6px 0 0 6px;
  opacity: 0;
  cursor: grab;
  touch-action: none;
}

.section-item:hover .item-drag-handle,
.section-item:focus-within .item-drag-handle,
.section-item.is-dragging .item-drag-handle {
  background-color: var(--border-light);
  opacity: 1;
}

.item-drag-handle:focus {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.item-drag-handle:active {
  cursor: grabbing;
}

.item-drag-handle:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.item-body {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
}

.item-text {
  flex: 1 1 auto;
  min-width: 0;
}

.item-date {
  font-size: 11px;
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  background: var(--surface);
  padding: 1px 6px;
  border-radius: 999px;
  white-space: nowrap;
}

.item-actions {
  position: absolute;
  right: 8px;
  bottom: 6px;
  display: inline-flex;
  gap: 6px;
  opacity: 0;
  pointer-events: none;
}

.section-item:hover .item-actions,
.section-item:focus-within .item-actions {
  opacity: 1;
  pointer-events: auto;
}

.item-action {
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
}

.item-action-save,
.item-action-cancel {
  display: none;
}

.section-item.is-editing .item-action-edit,
.section-item.is-editing .item-delete {
  display: none;
}

.section-item.is-editing .item-drag-handle,
.section-item.is-editing .item-action-move {
  opacity: 0.5;
  pointer-events: none;
}

.section-item.is-editing .item-action-save,
.section-item.is-editing .item-action-cancel {
  display: inline-flex;
}

.item-input {
  flex: 1 1 auto;
  font-size: 13px;
  padding: 4px 6px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  resize: none;
  overflow: hidden;
  background: var(--surface);
  color: inherit;
}

.item-input:focus {
  outline: 2px solid var(--focus-ring);
  border-color: var(--focus-border);
}

.inline-add {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: end;
}

.inline-add-input {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 13px;
  resize: none;
  overflow: hidden;
  background: var(--surface);
  color: inherit;
}

.inline-add-input:focus {
  outline: 2px solid var(--focus-ring);
  border-color: var(--focus-border);
}

.inline-add-button {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: inherit;
  font-size: 12px;
  cursor: pointer;
}

.inline-add-button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

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

.item-action:focus {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.item-delete {
  color: var(--danger);
  border-color: var(--danger-border);
  background: var(--danger-bg);
}

.add-button {
  align-self: flex-start;
  padding: 6px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: var(--surface);
  color: inherit;
  font-size: 12px;
  cursor: pointer;
}

.add-button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.hint {
  margin: 0;
  font-size: 13px;
  color: var(--text-subtle);
}

.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  text-decoration: none;
  font-size: 12px;
  color: var(--text-link-button);
  cursor: pointer;
}

.link-button.is-current {
  border-color: var(--nav-current-border);
  color: var(--nav-current-text);
  background: var(--nav-current-bg);
}

.link-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  background: var(--surface-alt);
  color: var(--text-subtle);
}

.link-button-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.link-button.small {
  padding: 4px 10px;
  font-size: 11px;
}

.theme-toggle {
  position: fixed;
  right: calc(20px + env(safe-area-inset-right));
  bottom: calc(20px + env(safe-area-inset-bottom));
  z-index: 20;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 12px 24px var(--shadow-card);
}

.theme-toggle:focus {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.questions {
  display: grid;
  gap: 8px;
}

.manage-card {
  gap: 16px;
}

.helper-text {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--text-subtle);
}

.helper-error {
  color: var(--danger);
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 12px;
}

.code {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.mono {
  font-family: "JetBrains Mono", "Menlo", "SFMono-Regular", monospace;
  font-size: 12px;
  word-break: break-all;
}

.stack {
  display: grid;
  gap: 16px;
}

.approval-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  background: var(--surface);
  display: grid;
  gap: 12px;
}

.approval-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.link-button.danger {
  border-color: var(--danger-border);
  color: var(--danger);
  background: var(--danger-bg);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  margin-left: 6px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--text-on-accent);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.manage-form {
  display: grid;
  gap: 8px;
}

.manage-form-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.manage-table-header {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: baseline;
  justify-content: space-between;
}

.table-wrapper {
  width: 100%;
  overflow-x: auto;
}

.project-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.project-table th,
.project-table td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--border-light);
}

.project-table th {
  color: var(--table-header);
  font-weight: 600;
}

.project-table .column-id {
  width: 60px;
  white-space: nowrap;
}

.project-table tbody tr:nth-child(even) {
  background: var(--surface-alt);
}

.project-table tbody tr:nth-child(even) td {
  border-bottom-color: transparent;
}

.table-sort {
  border: none;
  background: none;
  padding: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}

.table-sort:focus {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: 4px;
}

.table-sort-indicator {
  min-width: 1.5ch;
  color: var(--text-subtle);
}

.project-link {
  color: var(--link);
  text-decoration: none;
  font-weight: 600;
}

.project-link:hover,
.project-link:focus {
  text-decoration: underline;
}

.project-table tr.is-archived {
  color: var(--archived-text);
}

.project-table tr.is-archived .project-link {
  color: var(--link-muted);
}

.settings-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: center;
  justify-content: space-between;
}

.status-error {
  color: var(--danger);
  font-weight: 600;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  justify-content: flex-end;
  margin-top: 12px;
}

.pagination-status {
  font-size: 12px;
  color: var(--text-subtle);
}

.pagination-button {
  padding: 6px 12px;
  font-size: 12px;
}

.toast {
  position: fixed;
  left: 0;
  top: 0;
  transform: translate(-50%, 0);
  background: var(--toast-bg);
  color: var(--toast-text);
  padding: 10px 16px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  box-shadow: 0 12px 24px var(--shadow-toast);
  z-index: 10;
}

.toast[hidden] {
  display: none;
}

.toast-action {
  border: none;
  background: var(--accent);
  color: var(--text-on-accent);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

@media (max-width: 720px) {
  .page {
    margin-top: 24px;
  }

  .page-header {
    align-items: stretch;
  }

  .progress {
    width: 100%;
  }

  .theme-toggle {
    padding: 6px 10px;
    font-size: 11px;
  }
}

@media (min-width: 1280px) {
  .page {
    max-width: 1360px;
    gap: 16px;
  }

  .page-header {
    gap: 16px;
  }

  .card {
    min-height: 200px;
  }

  .card-compact {
    min-height: auto;
  }

  .cards {
    gap: 16px;
  }
}

@media (min-width: 1536px) {
  .page {
    max-width: 1480px;
  }
}

.transcript-dialog {
  width: min(760px, 92vw);
  border: none;
  padding: 0;
  border-radius: 12px;
  background: var(--surface);
  color: inherit;
  box-shadow: 0 24px 60px var(--shadow-toast);
}

.transcript-dialog::backdrop {
  background: rgba(15, 18, 28, 0.4);
  backdrop-filter: blur(2px);
}

.transcript-dialog-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 85vh;
  overflow: auto;
}

.transcript-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.dialog-close {
  border: 1px solid var(--border);
  background: var(--surface);
  color: inherit;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
}

.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.transcript-status {
  margin: 0;
}

.transcript-status[data-status="busy"] {
  color: var(--text-subtle);
}

.transcript-status[data-status="error"] {
  color: var(--danger);
}

.transcript-status[data-status="offline"] {
  color: var(--accent-strong);
}

.transcript-recorder [data-status="error"],
.transcript-upload [data-status="error"] {
  color: var(--danger);
}

.transcript-suggestions {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 12px;
}

.transcript-suggestion-list {
  display: grid;
  gap: 12px;
}

.transcript-suggestion {
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-alt);
  display: grid;
  gap: 8px;
}

.transcript-suggestion-body {
  display: grid;
  gap: 8px;
}

.transcript-suggestion-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
}

.transcript-suggestion-current {
  margin: 0;
  font-size: 12px;
  color: var(--text-subtle);
}

.transcript-suggestion-input {
  width: 100%;
}

.transcript-recorder,
.transcript-upload {
  display: grid;
  gap: 12px;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 12px;
  background: var(--surface-alt);
}

.transcript-recorder-header,
.transcript-upload-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.transcript-recorder-header h3,
.transcript-upload-header h3 {
  margin: 0 0 4px;
  font-size: 14px;
}

.transcript-recorder-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.recording-timer {
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: var(--text-subtle);
}

.transcript-recorder-preview,
.transcript-upload-preview {
  display: grid;
  gap: 8px;
}

.transcript-recorder-preview audio,
.transcript-upload-preview audio {
  width: 100%;
  height: 40px;
}

.transcript-upload label.link-button {
  cursor: pointer;
}

.audio-meter {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
}

.audio-meter-label {
  font-size: 12px;
  color: var(--text-subtle);
}

.audio-meter-track {
  height: 8px;
  border-radius: 999px;
  background: var(--border-light);
  overflow: hidden;
}

.audio-meter-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #4aa3ff, #2f6bff);
  transition: width 0.1s linear;
}
