:root {
  color-scheme: light;
  --bg: #f7f8f5;
  --surface: #fff;
  --ink: #203b34;
  --muted: #718078;
  --faint: #859189;
  --line: #e3e9e2;
  --green: #226449;
  --green-ink: #fff;
  --pale: #edf4ed;
  --mark: #f9efc8;
  --mark-line: #d1b958;
  --mark-strong: #efd77d;
  --warn: #956321;
  --warn-bg: #faf1dc;
  --danger: #ac4d42;
  --stage: #142820;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans:
    -apple-system, BlinkMacSystemFont, "PingFang SC", "Segoe UI",
    "Noto Sans SC", sans-serif;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.65 var(--sans);
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
button,
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
  text-decoration: none;
  transition:
    background 0.15s,
    border-color 0.15s;
}
button:hover,
.button-link:hover {
  border-color: var(--green);
  background: var(--pale);
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
button.primary {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
button.primary:hover {
  background: #194b36;
}
button.ghost {
  border-color: transparent;
  background: transparent;
}
a {
  color: var(--green);
}
input,
select {
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}
:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}
main:focus {
  outline: none;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 32px;
  line-height: 1.35;
  letter-spacing: -1px;
  margin-bottom: 10px;
  font-weight: 650;
}
h2 {
  font-size: 17px;
  line-height: 1.5;
  margin-bottom: 8px;
}
h3 {
  font-size: 14px;
}
.sub {
  color: var(--muted);
  margin-bottom: 24px;
}
.eyebrow {
  font: 10px/1.5 var(--mono);
  letter-spacing: 1.8px;
  color: var(--muted);
  margin-bottom: 14px;
}
.hint,
.format-note,
.note {
  font-size: 12px;
  color: var(--muted);
}
.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 99;
  padding: 10px;
  background: #fff;
}
.skip-link:focus {
  top: 12px;
}
/* A quiet studio shell; primary actions belong to the work area. */
.app {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  min-height: 100vh;
}
.side {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 32px 18px 24px;
  background: #163e35;
  color: #eaf3e9;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -1px;
  text-decoration: none;
  color: inherit;
  padding: 0 14px;
}
.brand i {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  width: 26px;
  height: 27px;
}
.brand i b {
  flex: 1;
  background: #b2d6a8;
  border-radius: 2px;
}
.side-label {
  font-size: 10px;
  letter-spacing: 2px;
  color: #9ebaae;
  padding: 0 14px;
  margin: 9px 0 42px;
}
.nav {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 14px;
  border-radius: 7px;
  text-decoration: none;
  color: #c0d1c7;
}
.nav a:hover {
  background: #204c3f;
}
.nav a[aria-current="page"] {
  background: #2d5746;
  color: #fff;
}
.nav a > span:first-child {
  white-space: nowrap;
}
.nav-icon {
  display: inline-block;
  width: 23px;
  opacity: 0.8;
  font-size: 16px;
}
.count {
  font: 11px var(--mono);
  color: #b9d1bd;
}
.side-project {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: auto 8px 28px;
  padding: 20px 14px;
  border: 1px solid #3b5b4c;
  border-radius: 8px;
  color: #d6e6d4;
  text-decoration: none;
}
.side-project .eyebrow {
  color: #a3bba3;
  margin: 0;
  font-size: 9px;
}
.side-project strong {
  font-size: 14px;
  line-height: 1.8;
  font-weight: 500;
}
.side-project > span:last-child {
  font-size: 11px;
  color: #accca9;
}
.who {
  padding: 20px 14px 0;
  border-top: 1px solid #345449;
  font-size: 11px;
  color: #b7cbbc;
  overflow-wrap: anywhere;
}
.who button {
  color: #c9d9ce;
  background: none;
  border: 0;
  min-height: 28px;
  padding: 0;
  margin-top: 5px;
  font-size: 11px;
}
main {
  width: 100%;
  max-width: 1440px;
  padding: 0 clamp(24px, 4.3vw, 72px) 48px;
}
.topbar {
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 38px;
}
.topbar-divider {
  padding: 0 12px;
  color: #a8b4a9;
}
.sync {
  display: flex;
  gap: 7px;
  align-items: center;
}
.sync i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #77a374;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}
.page-heading .eyebrow {
  margin-bottom: 10px;
}
.page-heading h1 {
  font-size: 35px;
}
.workspace-tag {
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 30px;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}
/* Upload and recording have separate, persistent controls. */
.create-panel {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
  box-shadow: 0 4px 22px #18352a03;
}
.upload-pane,
.record-pane {
  padding: 27px 30px;
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  min-width: 0;
}
.upload-pane {
  border-right: 1px dashed #d7e1d3;
}
.record-pane {
  background: #f1f5ee;
}
.create-panel h2 {
  font-size: 19px;
  margin: 15px 0 6px;
  letter-spacing: -0.3px;
}
.create-panel p {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 18px;
}
.create-panel .eyebrow {
  margin-bottom: 20px;
  font-size: 9px;
}
.upload-symbol,
.record-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  color: var(--green);
  background: #edf4e9;
}
.record-icon {
  background: #e1ebd9;
}
.create-panel .format-note {
  margin-top: 15px;
  font-size: 10px;
}
.create-footer {
  grid-column: 1/-1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 24px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
}
.lang {
  display: flex;
  gap: 10px;
  align-items: center;
  white-space: nowrap;
}
.lang select {
  min-height: 30px;
  padding: 3px 20px 3px 8px;
  font-size: 11px;
  border-color: transparent;
  background: var(--pale);
}
.create-panel.over {
  outline: 3px solid #83a17a;
  outline-offset: 3px;
}
.upload-message {
  margin: 10px 0 25px;
  min-height: 20px;
  font-size: 12px;
  color: var(--muted);
}
.msg.error {
  color: var(--danger);
}
.rec,
#rec-draft {
  width: 100%;
}
.rec-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.rec-status strong {
  margin-left: auto;
  font: 19px var(--mono);
}
.dot {
  width: 7px;
  height: 7px;
  background: #bf554a;
  border-radius: 50%;
  animation: pulse 1.2s infinite;
}
.rec meter {
  width: 100%;
  height: 12px;
  margin: 12px 0;
  accent-color: var(--green);
}
#rec-preview {
  width: 100%;
  height: 40px;
  margin: 0 0 12px;
}
.rec .row button,
#rec-draft button {
  font-size: 12px;
  min-height: 34px;
  padding: 6px 10px;
}
.record-pane:has(.rec:not([hidden])) .record-icon,
.record-pane:has(#rec-draft:not([hidden])) .record-icon {
  display: none;
}
.record-pane:has(.rec:not([hidden])) h2,
.record-pane:has(#rec-draft:not([hidden])) h2 {
  margin-top: 0;
}
/* Lists */
.library-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.library-heading h2 {
  margin: 0;
  font-size: 18px;
}
.library-heading h2 > span {
  margin-left: 7px;
  font: 11px var(--mono);
  color: var(--muted);
  padding: 3px 7px;
  background: #e9eee6;
  border-radius: 4px;
}
.library-stats {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 11px;
  color: var(--muted);
}
.library-stats b {
  color: var(--ink);
  font-family: var(--mono);
  margin-right: 4px;
}
.library-stats button {
  font-size: 11px;
  min-height: 30px;
  padding: 4px;
}
.list-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
}
.list-toolbar > select {
  margin-left: auto;
  font-size: 12px;
  min-width: 120px;
}
.search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 360px;
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 12px;
}
.search-field span {
  font-size: 22px;
  line-height: 1;
  color: var(--muted);
}
.search-field input {
  border: 0;
  min-width: 0;
  width: 100%;
  padding: 8px 0;
  font-size: 12px;
  background: transparent;
}
.search-field:focus-within {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}
.search-field input:focus {
  outline: 0;
}
.list {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 10px;
  overflow: hidden;
}
.list-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 11px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}
.filter {
  display: flex;
  gap: 3px;
}
.filter button {
  min-height: 27px;
  padding: 3px 10px;
  border-color: transparent;
  background: transparent;
  font-size: 11px;
  color: var(--muted);
}
.filter button[aria-pressed="true"] {
  background: var(--pale);
  color: var(--green);
}
.filter .c {
  font-size: 10px;
  opacity: 0.7;
  margin-left: 2px;
}
.item {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto auto 12px;
  gap: 15px;
  align-items: center;
  padding: 17px 20px;
  border-bottom: 1px solid var(--line);
}
.item:last-child {
  border-bottom: 0;
}
.item.link {
  cursor: pointer;
}
.item.link:hover {
  background: #f6f9f3;
}
.thumb {
  display: grid;
  place-items: center;
  align-self: start;
  width: 40px;
  height: 43px;
  border-radius: 8px;
  background: #eef3ea;
  color: #618260;
  font: 10px var(--mono);
  border: 1px solid #e4ecde;
}
.name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 550;
  font-size: 13px;
}
.meta {
  font-size: 10px;
  color: var(--muted);
  margin-top: 4px;
}
.chip {
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 10px;
  white-space: nowrap;
}
.chip.ok {
  background: #edf5eb;
  color: #477946;
}
.chip.ok:before {
  content: "✓";
  margin-right: 4px;
}
.chip.run {
  background: var(--pale);
  color: var(--green);
}
.chip.idle {
  background: var(--warn-bg);
  color: var(--warn);
}
.chev {
  font-size: 21px;
  color: #859984;
}
.item > button {
  font-size: 11px;
  min-height: 30px;
  padding: 4px 9px;
}
.trash {
  color: var(--muted);
  border-color: transparent;
  opacity: 0;
}
.item:hover .trash,
.trash:focus-visible {
  opacity: 1;
}
.empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
  font-size: 13px;
}
.empty button {
  margin-top: 15px;
}
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--muted);
  margin: 14px 1px;
}
.pagination > div {
  display: flex;
  gap: 14px;
  align-items: center;
}
.pagination button {
  min-height: 28px;
  padding: 2px 9px;
}
.note {
  font-size: 10px;
  margin-bottom: 0;
}
.notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--warn-bg);
  color: var(--warn);
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 18px;
  font-size: 12px;
}
.notice button {
  font-size: 11px;
  flex-shrink: 0;
}
.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  max-width: 380px;
  margin-top: 9px;
}
.step {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.step i {
  position: relative;
  height: 4px;
  background: var(--line);
  border-radius: 3px;
  overflow: hidden;
}
.step span {
  font-size: 9px;
  color: var(--faint);
}
.step.done i {
  background: #86a782;
}
.step.running i:after {
  content: "";
  position: absolute;
  inset: 0;
  width: var(--p, 40%);
  background: var(--green);
  border-radius: 3px;
}
.step.running.indet i:after {
  animation: slide 1.6s infinite;
}
.step.queued i {
  background: repeating-linear-gradient(-45deg, #ccaf74 0 4px, #f4e9cf 4px 8px);
}
.step.failed i {
  background: var(--danger);
}
.step.failed span {
  color: var(--danger);
}
.now {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 7px;
  font-size: 10px;
  color: var(--muted);
}
.now b {
  font-weight: 500;
  color: var(--ink);
}
.engine {
  font-size: 9px;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 0 4px;
}
/* Reader */
.reader-back {
  display: inline-block;
  font-size: 12px;
  text-decoration: none;
  margin-bottom: 22px;
  color: var(--muted);
}
.rhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.reader-title {
  min-width: 0;
}
.reader-title .eyebrow {
  margin-bottom: 8px;
}
.reader-title h1 {
  font-size: 25px;
  overflow-wrap: anywhere;
  letter-spacing: -0.5px;
}
.reader-title .sub {
  font-size: 11px;
  margin: 0;
}
.menu {
  position: relative;
  flex-shrink: 0;
}
.menu > button {
  font-size: 12px;
}
.menu-pop {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 7;
  min-width: 205px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 12px 35px #18352a1a;
  border-radius: 9px;
}
.menu-pop button {
  width: 100%;
  border: 0;
  justify-content: flex-start;
  font-size: 12px;
}
.menu-pop hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 5px;
}
.danger {
  color: var(--danger);
}
.reader {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  align-items: start;
  gap: 24px;
}
.reader-main {
  min-width: 0;
}
.media-card {
  container: vox-media / inline-size;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  margin-bottom: 22px;
}
.media-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.media-heading .eyebrow {
  margin: 0;
  font-size: 9px;
}
.media-format {
  font-size: 10px;
  color: var(--muted);
}
.stage {
  position: relative;
  min-width: 0;
}
.stage audio {
  display: block;
  width: 100%;
  height: 45px;
}
.stage video {
  display: block;
  width: 100%;
  max-height: 55vh;
  border-radius: 7px;
  background: #10251d;
}
.media-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0;
}
.media-tools button {
  min-height: 29px;
  padding: 3px 9px;
  font-size: 11px;
  background: var(--bg);
}
.media-tools label {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
}
.media-tools select {
  min-height: 29px;
  padding: 2px 5px;
  font-size: 11px;
  border: 0;
  background: var(--bg);
}
.media-feedback {
  display: flex;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: 11px;
  font-size: 10px;
  color: var(--muted);
}
.media-status {
  flex: 1;
  min-width: 120px;
}
.media-feedback button {
  min-height: 25px;
  padding: 2px 7px;
  font-size: 10px;
}
.media-card[data-state="error"] .media-status {
  color: var(--danger);
}
.stage-exit {
  display: none;
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  padding: 8px 14px;
  color: #fff;
  background: #14201a;
  border-color: #738278;
}
.cap {
  position: absolute;
  left: 50%;
  bottom: 88px;
  transform: translateX(-50%);
  width: max-content;
  max-width: min(90%, 66ch);
  font-size: 18px;
  text-align: center;
  pointer-events: none;
}
.cap p {
  margin: 0;
  padding: 10px 16px;
  border-radius: 7px;
  background: #101b16f5;
  color: #fff;
  font-size: 18px;
  font-weight: 550;
  line-height: 1.6;
  overflow-wrap: anywhere;
  text-wrap: pretty;
  box-shadow: 0 2px 12px #0003;
}
/* The white caption color must never inherit into a pale vocabulary highlight. */
.cap .vocab-mark {
  color: #17261b;
  background: #f4dc82;
  border-bottom: 0;
  border-radius: 3px;
  padding: 1px 3px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.caption-words {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid #e9e2c9;
  border-radius: 8px;
  background: #fcfaf2;
}
.caption-words-label {
  display: block;
  font-size: 10px;
  color: #867648;
  margin-bottom: 9px;
}
.caption-words ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  padding: 0;
  margin: 0;
  max-height: 112px;
  overflow: auto;
  list-style: none;
}
.caption-words li {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 8px;
  font-size: 12px;
  line-height: 1.75;
  color: #44543c;
}
.caption-words li b {
  color: #283a29;
  font-size: 13px;
}
.stage.audio .cap {
  position: static;
  transform: none;
  width: auto;
  max-width: 100%;
  text-align: left;
  margin-top: 16px;
}
.stage.audio .cap p {
  background: var(--pale);
  color: var(--ink);
  font-size: 15px;
  font-weight: 400;
  box-shadow: none;
}
.stage:fullscreen {
  display: flex;
  align-items: center;
  background: #000;
  margin: 0;
  width: 100%;
  height: 100%;
}
.stage:fullscreen video {
  max-height: 100%;
  height: 100%;
  width: 100%;
}
.stage:fullscreen .cap p {
  font-size: clamp(20px, 2.1vw, 30px);
}
.stage:fullscreen .stage-exit {
  display: inline-flex;
}
.stage:fullscreen .cap {
  font-size: clamp(20px, 2.1vw, 30px);
  bottom: max(100px, 10vh);
}
.transcript-panel {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 10px;
  overflow: hidden;
}
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 17px 20px;
  border-bottom: 1px solid var(--line);
}
.panel-heading h2 {
  font-size: 14px;
  margin: 0;
}
.panel-heading span {
  font-size: 10px;
  color: var(--muted);
}
.panel-heading h2 span {
  margin-left: 7px;
}
.tscript-wrap {
  position: relative;
}
.tscript {
  display: flex;
  flex-direction: column;
  position: relative;
  max-height: 560px;
  gap: 8px;
  overflow: auto;
  scrollbar-gutter: stable;
  scroll-padding-block: 16px;
  overscroll-behavior: contain;
  padding: 16px;
}
.seg {
  /* Keep every paragraph at its natural height inside the scrolling flex list. */
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 45px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  width: 100%;
  padding: 18px 16px;
  text-align: left;
  line-height: 1.85;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  font-size: 15px;
}
.seg:hover {
  background: #f7f9f4;
  border-color: var(--line);
}
.seg.on {
  background: var(--pale);
  border-color: #cddfc7;
  box-shadow: inset 3px 0 var(--green);
}
.seg time {
  font: 11px/2.5 var(--mono);
  color: #52734c;
}
.seg span {
  overflow-wrap: anywhere;
}
.vocab-mark {
  background: var(--mark);
  border-bottom: 1px solid var(--mark-line);
  border-radius: 2px;
  color: inherit;
  padding: 0 1px;
}
.plain {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.9;
  padding: 12px;
}
.backnow {
  position: static;
  flex-shrink: 0;
  min-height: 32px;
  padding: 5px 10px;
  border-radius: 6px;
  background: var(--pale);
  border-color: #cddfc7;
  color: var(--green);
  font-size: 11px;
}
.panel-heading:has(.backnow:not([hidden])) > span {
  display: none;
}
.words {
  position: sticky;
  top: 25px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f1f4ec;
  padding: 22px 20px;
}
.words .eyebrow {
  font-size: 8px;
  margin-bottom: 15px;
}
.words h2 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 16px;
}
.words h2 span {
  font-size: 10px;
  font-weight: 400;
  color: var(--muted);
}
.words .hint {
  font-size: 10px;
  margin-bottom: 18px;
}
.words ul {
  padding: 0;
  margin: 0;
  list-style: none;
  max-height: 65vh;
  overflow: auto;
}
.words li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 8px;
  padding: 14px 0;
  border-bottom: 1px solid #dfe7d8;
}
.words li:last-child {
  border: 0;
}
.words .w {
  font-size: 13px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.words .n {
  font: 10px var(--mono);
  color: var(--muted);
  align-self: center;
}
.words .t {
  grid-column: 1/-1;
  font-size: 11px;
  color: var(--muted);
}
.words li.here .w {
  color: var(--green);
}
/* Sign-in */
.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 8vw;
  align-items: center;
  padding: 8vw;
  background: linear-gradient(110deg, #e9efe2 0%, #f6f8f2 60%, #fff 100%);
}
.auth-story .eyebrow {
  font-size: 10px;
  color: #4c7456;
  margin-bottom: 30px;
}
.auth-story h1 {
  font-size: clamp(30px, 3.6vw, 50px);
  line-height: 1.5;
  letter-spacing: -2px;
  margin-bottom: 20px;
}
.auth-story p {
  font-size: 13px;
  line-height: 2;
  color: #6a806c;
}
.sound-art {
  display: flex;
  gap: 5px;
  align-items: center;
  height: 110px;
  max-width: 400px;
  margin: 25px 0;
}
.sound-art i {
  flex: 1;
  height: 25%;
  background: #a5bd91;
  border-radius: 4px;
}
.sound-art i:nth-child(3n) {
  height: 62%;
  background: #739966;
}
.sound-art i:nth-child(4n) {
  height: 90%;
  background: #427753;
}
.sound-art i:nth-child(5n) {
  height: 42%;
}
.auth-features {
  display: flex;
  gap: 25px;
  font-size: 10px;
  color: #527654;
}
.auth form {
  width: 100%;
  max-width: 380px;
  justify-self: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 35px;
  box-shadow: 0 14px 50px #2c48270a;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.auth .brand {
  padding: 0;
  margin-bottom: 16px;
}
.auth .brand i b {
  background: var(--green);
}
.auth h2 {
  font-size: 25px;
  margin: 0;
}
.auth-intro {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 10px;
}
.auth label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 12px;
}
.auth input {
  width: 100%;
  min-height: 43px;
  background: #f8faf6;
}
.auth .primary {
  margin-top: 8px;
  min-height: 43px;
}
.auth .msg {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.auth .switch {
  font-size: 11px;
  text-align: center;
  color: var(--muted);
  margin: 0;
}
.auth .switch button {
  min-height: 25px;
  padding: 0;
  border: 0;
  color: var(--green);
}
@keyframes pulse {
  50% {
    opacity: 0.4;
  }
}
@keyframes slide {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(320%);
  }
}
/* about, faq */
.prose {
  max-width: 880px;
}
.prose .lede {
  max-width: 68ch;
  margin: 0 0 26px;
  font-size: 17px;
  line-height: 1.75;
}
.prose h2 {
  margin: 30px 0 10px;
  font-size: 15px;
}
.arch {
  margin: 0;
  padding: 14px;
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.arch svg {
  display: block;
  width: 100%;
  min-width: 640px;
  height: auto;
  color: var(--ink);
}
.arch figcaption {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}
.stackgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}
.stackgrid div {
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.stackgrid h3 {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.stackgrid p {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}
.stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.stack li {
  padding: 3px 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
}
.faq details {
  margin-bottom: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "+";
  font-weight: 400;
  color: var(--faint);
}
.faq details[open] summary::after {
  content: "−";
}
.faq details p {
  margin: 0;
  padding: 0 16px 14px;
  line-height: 1.75;
  color: var(--muted);
}

dialog {
  width: min(560px, calc(100vw - 32px));
  padding: 0;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
}
dialog::backdrop {
  background: rgb(10 20 18 / 45%);
}
dialog header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
}
dialog pre {
  max-height: 60vh;
  margin: 0;
  padding: 16px 18px;
  overflow: auto;
  font-family: var(--mono);
  font-size: 12px;
  white-space: pre-wrap;
}
#toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  z-index: 20;
  max-width: calc(100vw - 32px);
  padding: 12px 20px;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--bg);
  border-radius: 8px;
  font-size: 13px;
}

@media (min-width: 1600px) {
  main {
    margin: auto;
  }
  .reader {
    grid-template-columns: minmax(0, 1fr) 290px;
  }
}
@media (max-width: 1100px) {
  .app {
    grid-template-columns: 190px minmax(0, 1fr);
  }
  .side {
    padding-inline: 12px;
  }
  main {
    padding-inline: 28px;
  }
  .reader {
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 16px;
  }
  .upload-pane,
  .record-pane {
    padding: 24px;
  }
  .workspace-tag {
    display: none;
  }
  .words {
    padding: 18px 14px;
  }
  .create-footer > span {
    font-size: 10px;
  }
}
@media (max-width: 860px) {
  .app {
    display: block;
  }
  .side {
    position: relative;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    height: auto;
    padding: 15px 20px;
    flex-wrap: wrap;
  }
  .side > .brand {
    font-size: 23px;
    padding: 0;
  }
  .side-label,
  .side-project {
    display: none;
  }
  .nav {
    flex: 1;
    flex-direction: row;
    gap: 3px;
    overflow: auto;
  }
  .nav a {
    padding: 7px 10px;
    font-size: 12px;
  }
  .nav-icon,
  .nav .count {
    display: none;
  }
  .who {
    padding: 0;
    margin: 0;
    border: 0;
  }
  .who > span,
  .who br {
    display: none;
  }
  .who button {
    font-size: 10px;
    margin: 0;
  }
  .topbar {
    height: 65px;
    margin-bottom: 25px;
  }
  main {
    padding-inline: 24px;
  }
  .reader {
    grid-template-columns: minmax(0, 1fr) 220px;
  }
  .library-stats {
    gap: 12px;
  }
  .trash {
    opacity: 1;
  }
  .auth {
    gap: 35px;
    padding: 40px;
  }
  .auth-features {
    flex-direction: column;
    gap: 8px;
  }
}
@media (max-width: 650px) {
  .side {
    gap: 14px;
    padding: 13px 16px;
  }
  .nav a {
    padding: 6px 7px;
    font-size: 11px;
  }
  .brand i {
    width: 20px;
    height: 23px;
  }
  .who {
    margin-left: auto;
  }
  .side .brand {
    font-size: 22px;
  }
  main {
    padding: 0 16px 30px;
  }
  .topbar {
    margin-bottom: 25px;
    font-size: 10px;
  }
  .topbar-divider {
    padding-inline: 6px;
  }
  .page-heading h1 {
    font-size: 29px;
  }
  .page-heading .sub {
    font-size: 12px;
  }
  .eyebrow {
    font-size: 9px;
  }
  .create-panel {
    grid-template-columns: 1fr;
  }
  .upload-pane,
  .record-pane {
    padding: 22px 24px;
  }
  .upload-pane {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .create-panel .eyebrow {
    margin-bottom: 14px;
  }
  .create-panel h2 {
    font-size: 18px;
  }
  .create-footer {
    padding: 12px 20px;
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }
  .create-footer > span {
    font-size: 10px;
  }
  .library-heading {
    gap: 7px;
  }
  .library-heading h2 {
    font-size: 16px;
  }
  .library-stats {
    gap: 8px;
    font-size: 10px;
  }
  .library-stats button {
    font-size: 10px;
  }
  .library-stats b {
    margin-right: 1px;
  }
  .list-toolbar {
    gap: 8px;
  }
  .list-toolbar > select {
    min-width: 100px;
    font-size: 11px;
  }
  .search-field {
    padding-inline: 10px;
  }
  .search-field input {
    font-size: 11px;
  }
  .list-head {
    padding: 10px 12px;
  }
  .filter button {
    padding: 3px 7px;
    font-size: 10px;
  }
  .filter .c {
    display: none;
  }
  .item {
    grid-template-columns: 32px minmax(0, 1fr) auto auto 8px;
    gap: 7px;
    padding: 14px 12px;
  }
  .thumb {
    width: 32px;
    height: 36px;
    font-size: 8px;
  }
  .name {
    font-size: 12px;
  }
  .meta {
    font-size: 9px;
  }
  .chip {
    padding: 3px 6px;
    font-size: 9px;
  }
  .item > button {
    font-size: 10px;
    padding: 3px 5px;
  }
  .item > span:empty {
    display: none;
  }
  .now {
    font-size: 9px;
    gap: 3px;
  }
  .engine {
    display: none;
  }
  .reader {
    grid-template-columns: 1fr;
  }
  .rhead {
    align-items: flex-start;
    gap: 10px;
  }
  .reader-title h1 {
    font-size: 21px;
  }
  .menu > button {
    font-size: 10px;
    padding: 6px 9px;
    white-space: nowrap;
  }
  .reader-title .sub {
    font-size: 10px;
  }
  .media-card {
    padding: 15px;
  }
  .words {
    position: static;
    padding: 20px;
  }
  .words ul {
    max-height: 300px;
  }
  .tscript {
    max-height: 460px;
    padding: 8px;
  }
  .panel-heading {
    padding: 15px;
  }
  .panel-heading > span {
    font-size: 9px;
  }
  .seg {
    grid-template-columns: 36px minmax(0, 1fr);
    padding: 14px 10px;
    gap: 10px;
    font-size: 14px;
  }
  .stage:not(:fullscreen) .cap {
    position: static;
    transform: none;
    width: auto;
    max-width: 100%;
    margin-top: 12px;
    text-align: left;
  }
  .cap p {
    font-size: 15px;
    padding: 12px 14px;
  }
  .caption-words {
    padding: 12px 14px;
  }
  .media-tools {
    flex-wrap: wrap;
  }
  .auth {
    display: block;
    padding: 36px 20px;
    background: #f2f5ed;
  }
  .auth-story {
    max-width: 380px;
    margin: 0 auto 32px;
  }
  .auth-story h1 {
    font-size: 29px;
    letter-spacing: -1px;
  }
  .auth-story .eyebrow {
    margin-bottom: 16px;
  }
  .auth-story p,
  .auth-features,
  .sound-art {
    display: none;
  }
  .auth form {
    margin: auto;
    padding: 26px;
  }
  .note {
    font-size: 9px;
  }
  .notice {
    font-size: 11px;
  }
  .arch {
    padding: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
.track-switch {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  font-size: 11px;
  color: var(--muted);
}
.track-switch select {
  font-size: 11px;
  min-height: 30px;
  padding: 3px 8px;
}

.auth-project-link {
  text-align: center;
  color: var(--green);
  font-size: 11px;
  text-decoration: none;
  padding: 7px 0;
  border-top: 1px solid var(--line);
}
@media (max-width: 650px) {
  .side {
    gap: 8px;
  }
  .side .nav {
    order: 3;
    flex-basis: 100%;
    justify-content: space-between;
  }
  .side .nav a {
    padding: 7px;
  }
}

/* A narrow reader column needs the same breathing room as a phone viewport. */
@container vox-media (max-width: 560px) {
  .stage:not(:fullscreen) .cap {
    position: static;
    transform: none;
    width: auto;
    max-width: 100%;
    margin-top: 12px;
    text-align: left;
  }
}
