:root {
  color-scheme: light;
  --ink: #212a26;
  --muted: #4f6057;
  --accent: #226444;
  --deep: #164b33;
  --border: #d5e0d8;
  --wash: #ebf3ed;
  --paper: #fff;
  font-family: system-ui, sans-serif;
  font-size: 16px;
  color: var(--ink);
  background: #f5f8f5;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
a { color: var(--accent); text-underline-offset: .16em; }
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 62px;
  padding: 0 max(22px, calc((100vw - 1110px) / 2));
  background: var(--paper);
  border-bottom: 1px solid var(--border);
}
header a { text-decoration: none; }
.brand { color: var(--ink); font-weight: 760; }
main, footer { width: min(calc(100% - 44px), 1110px); margin-left: auto; margin-right: auto; }
main { margin-top: 44px; }
.intro { margin-bottom: 25px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(1.85rem, 4.9vw, 3.35rem); line-height: 1.04; letter-spacing: -.055em; margin-bottom: 9px; }
.intro p, .meta { color: var(--muted); }
.workspace { display: grid; grid-template-columns: minmax(258px, .48fr) minmax(320px, 1fr); gap: 15px; }
.panel { min-width: 0; padding: 18px; border: 1px solid var(--border); border-radius: 12px; background: var(--paper); }
h2 { font-size: 1.13rem; letter-spacing: -.02em; }
button, input, select, textarea { font: inherit; }
button, .button {
  display: inline-flex;
  min-height: 37px;
  justify-content: center;
  align-items: center;
  border: 1px solid transparent;
  padding: 7px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 680;
  font-size: .83rem;
}
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .file-control:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.primary { color: white; background: var(--accent); }
.primary:hover:not(:disabled) { background: var(--deep); }
.secondary { color: var(--deep); background: var(--wash); border-color: var(--border); }
.secondary:hover:not(:disabled) { background: #dcebe1; }
button:disabled { opacity: .52; cursor: default; }
.source-actions, .run { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0 8px; }
.file-control { position: relative; }
.file-control input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.meta, #source-status, #export-status { font-size: .80rem; line-height: 1.45; overflow-wrap: anywhere; }
#source-status, #export-status { margin-top: 8px; }
.error { color: #9d2d2d; }
.field { color: var(--ink); font-size: .82rem; font-weight: 650; }
input[type="text"], textarea, select { color: var(--ink); border: 1px solid #b6c8ba; border-radius: 6px; background: var(--paper); padding: 7px 9px; }
label[for="title"] { display: block; margin: 18px 0 5px; }
input[type="text"] { width: 100%; }
audio { max-width: 100%; width: 100%; height: 40px; margin-top: 8px; }
.result-head { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.views { display: flex; gap: 2px; background: var(--wash); border-radius: 8px; padding: 2px; }
.views button { min-height: 29px; padding: 3px 9px; color: var(--deep); background: transparent; }
.views button[aria-pressed="true"] { background: var(--paper); border-color: var(--border); }
#transcript-pane, #minutes-pane { margin: 12px 0 0; min-height: 122px; border-radius: 8px; }
#transcript-pane { background: #f5f8f5; }
#segments { list-style: none; margin: 0; padding: 0; max-height: 380px; overflow: auto; }
#segments li { display: grid; grid-template-columns: 62px minmax(0, 1fr); align-items: start; gap: 8px; padding: 8px; border-bottom: 1px solid var(--border); }
#segments li:last-child { border-bottom: 0; }
.time { justify-self: start; color: var(--deep); background: var(--wash); border: 1px solid var(--border); font-variant-numeric: tabular-nums; padding: 4px 6px; min-height: 28px; }
textarea { display: block; width: 100%; resize: vertical; font-size: .90rem; line-height: 1.42; }
#segments textarea { min-height: 45px; }
#minutes { margin-top: 8px; min-height: 250px; }
.export { display: flex; align-items: end; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.export .field { display: flex; flex-direction: column; gap: 4px; margin-right: auto; }
footer { display: flex; gap: 14px; font-size: .80rem; margin-top: 14px; margin-bottom: 24px; }
.info { max-width: 710px; line-height: 1.55; }
.info section { margin: 22px 0; }
.info section p { margin-top: 8px; }
@media (max-width: 720px) {
  main, footer { width: calc(100% - 26px); }
  main { margin-top: 27px; }
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .panel { padding: 13px; }
}
