:root {
  color-scheme: light;
  --paper: #f4f1ea;
  --paper-deep: #ebe6db;
  --ink: #17233b;
  --ink-soft: #5d6677;
  --accent: #2457e6;
  --accent-wash: #e5ebff;
  --line: #d6d1c7;
  --success: #24745b;
  --warning: #ad5b28;
  --rail-width: 220px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    linear-gradient(rgba(23, 35, 59, .025) 1px, transparent 1px),
    var(--paper);
  background-size: 100% 32px;
}

button, input, select, textarea { font: inherit; }
button:focus-visible, select:focus-visible, textarea:focus-visible, input:focus-visible, a:focus-visible {
  outline: 3px solid rgba(36, 87, 230, .35);
  outline-offset: 3px;
}
a { color: inherit; }
.app-shell { min-height: 100vh; }

.auth-loading {
  min-height: 100svh;
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  font-size: 13px;
  letter-spacing: .02em;
}
.login-screen {
  position: relative;
  min-height: 100svh;
  padding: clamp(24px, 4vw, 56px);
  overflow: hidden;
  background:
    linear-gradient(rgba(23, 35, 59, .03) 1px, transparent 1px),
    var(--paper);
  background-size: 100% 32px;
}
.login-screen::after {
  position: absolute;
  right: clamp(24px, 6vw, 96px);
  bottom: -16vh;
  width: 1px;
  height: 70vh;
  background: var(--accent);
  content: "";
  transform: rotate(24deg);
  transform-origin: bottom;
  opacity: .45;
}
.login-toolbar {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: flex-end;
}
.login-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
  gap: clamp(56px, 9vw, 150px);
  align-items: center;
  width: min(1240px, 100%);
  min-height: calc(100svh - 120px);
  margin: 0 auto;
}
.login-identity {
  display: flex;
  min-height: 470px;
  flex-direction: column;
  justify-content: space-between;
  animation: login-reveal .45s ease both;
}
.login-mark {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  color: #fff;
  background: var(--ink);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: .1em;
}
.login-identity h1 {
  max-width: 720px;
  font-size: clamp(48px, 7vw, 92px);
  font-weight: 500;
  line-height: .92;
  letter-spacing: -.055em;
}
.login-lede {
  max-width: 610px;
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.55;
}
.login-privacy {
  max-width: 480px;
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.55;
}
.login-form {
  padding: 20px 0 20px clamp(32px, 5vw, 76px);
  border-left: 1px solid var(--line);
  animation: login-reveal .45s .08s ease both;
}
.login-form-heading { margin-bottom: 46px; }
.login-form-heading h2 {
  margin-bottom: 0;
  font-size: clamp(36px, 4vw, 52px);
}
.login-field {
  display: grid;
  gap: 9px;
  margin-bottom: 24px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}
.login-field input {
  width: 100%;
  padding: 13px 0;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  color: var(--ink);
  background: transparent;
  font-size: 16px;
}
.login-field input:focus {
  border-bottom-color: var(--accent);
}
.login-message {
  min-height: 22px;
  margin: 2px 0 18px;
  color: #9b362f;
  font-size: 12px;
  line-height: 1.45;
}
.login-submit {
  display: flex;
  width: 100%;
  justify-content: space-between;
  padding: 14px 16px;
}
.login-submit:disabled {
  cursor: wait;
  opacity: .62;
}
@keyframes login-reveal {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.rail {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 10;
  width: var(--rail-width);
  display: flex;
  flex-direction: column;
  padding: 28px 20px 24px;
  border-right: 1px solid var(--line);
  background: rgba(244, 241, 234, .94);
  backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 56px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #fff;
  background: var(--ink);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .08em;
}

.brand-name {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.05;
}

nav { display: grid; gap: 8px; }
.nav-link {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 10px;
  border-left: 2px solid transparent;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 14px;
  transition: color .2s ease, background .2s ease, border-color .2s ease;
}
.nav-link:hover, .nav-link.active {
  border-left-color: var(--accent);
  color: var(--ink);
  background: linear-gradient(90deg, var(--accent-wash), transparent);
}
.nav-icon {
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
}
.rail-footer {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: auto;
  padding: 0;
  border: 0;
  color: var(--ink-soft);
  background: transparent;
  font-size: 12px;
  text-align: left;
  cursor: help;
}
.rail-footer:focus-visible,
.mobile-memory-status:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.mobile-memory-status { display: none; }
.status-dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--line);
}
.rail-footer.is-ready .status-dot,
.mobile-memory-status.is-ready .status-dot {
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(36, 116, 91, .12);
}
.memory-tooltip {
  position: fixed;
  z-index: 40;
  width: max-content;
  max-width: min(340px, calc(100vw - 32px));
  padding: 12px 14px;
  border: 1px solid var(--ink);
  color: var(--paper);
  background: var(--ink);
  box-shadow: 0 12px 32px rgba(31, 42, 68, .18);
  font-size: 12px;
  line-height: 1.5;
  animation: memory-tooltip-reveal 150ms ease-out both;
}
.memory-tooltip[hidden] { display: none; }
@keyframes memory-tooltip-reveal {
  from { opacity: 0; transform: translateY(4px); }
}

main {
  width: calc(100% - var(--rail-width));
  max-width: 1500px;
  margin-left: var(--rail-width);
  padding: 28px 48px 64px;
}

.topbar, .panel-heading, .section-intro {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
}
.topbar {
  align-items: center;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
h1, h2, h3, p { margin-top: 0; }
h1 {
  margin-bottom: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1;
}
h2 {
  margin-bottom: 16px;
  max-width: 900px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 5vw, 62px);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -.035em;
}
h3 {
  margin-bottom: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.15;
}
.eyebrow, .empty-kicker {
  margin-bottom: 7px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.topbar-actions { display: flex; gap: 14px; align-items: center; }
.sync-status { color: var(--ink-soft); font-size: 12px; }
.sync-status-online {
  padding-left: 14px;
  border-left: 1px solid var(--line);
}
.language-switcher {
  display: inline-grid;
  grid-template-columns: repeat(2, 1fr);
  padding: 2px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .22);
}
.language-switcher button {
  min-width: 34px;
  padding: 6px 8px;
  border: 0;
  color: var(--ink-soft);
  background: transparent;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  cursor: pointer;
  transition: color .18s ease, background .18s ease;
}
.language-switcher button:hover { color: var(--ink); }
.language-switcher button.active {
  color: #fff;
  background: var(--ink);
}
.icon-button, .primary-button { border: 1px solid var(--ink); cursor: pointer; }
.icon-button {
  width: 38px;
  height: 38px;
  color: var(--ink);
  background: transparent;
  font-size: 20px;
}
.icon-button:hover { color: #fff; background: var(--ink); }
.logout-button {
  padding: 8px 0 8px 12px;
  border: 0;
  border-left: 1px solid var(--line);
  color: var(--ink-soft);
  background: transparent;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  cursor: pointer;
}
.logout-button:hover { color: var(--ink); }

.view { display: none; padding-top: 38px; animation: reveal .32s ease both; }
.view.active { display: block; }
@keyframes reveal {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}

.hero-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, .46fr);
  grid-template-areas:
    "copy cefr"
    "session session";
  column-gap: 5vw;
  row-gap: 24px;
  align-items: start;
  padding: 26px 0 30px;
}
.hero-copy { grid-area: copy; }
.hero-copy h2 span { color: var(--accent); }
.lede {
  max-width: 740px;
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.65;
}
.session-cta {
  position: relative;
  display: grid;
  grid-area: session;
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: 20px;
  align-items: baseline;
  padding: 12px 0 12px 20px;
  border-left: 2px solid var(--accent);
}
.session-cta::before {
  content: "";
  position: absolute;
  top: -4px;
  left: -5px;
  width: 8px;
  height: 8px;
  background: var(--accent);
}
.session-cta strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
  white-space: nowrap;
}
.session-cta span:last-child {
  min-width: 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
}
.cta-index {
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .12em;
}

.hero-cefr {
  position: relative;
  grid-area: cefr;
  align-self: start;
  width: calc(100% + 80px);
  margin-top: 43px;
  margin-left: -80px;
}
.cefr-scale-trigger {
  display: block;
  width: 100%;
  padding: 3px 0 5px;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: help;
}
.cefr-scale-trigger:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}
.cefr-scale-trigger:hover .cefr-marker,
.cefr-scale-trigger[aria-expanded="true"] .cefr-marker { border-color: var(--accent); }
.cefr-scale {
  position: relative;
  display: block;
  width: 100%;
}
.cefr-scale-track {
  position: absolute;
  top: 5px;
  right: calc(100% / 12);
  left: calc(100% / 12);
  height: 2px;
  background: var(--line);
}
.cefr-scale-progress,
.cefr-scale-target {
  position: absolute;
  top: 0;
  left: 0;
  height: 2px;
}
.cefr-scale-progress {
  width: 0;
  background: var(--accent);
  transition: width 420ms ease;
}
.cefr-scale-target {
  width: 0;
  background: repeating-linear-gradient(90deg, var(--accent) 0 5px, transparent 5px 9px);
  opacity: .72;
  transition: left 420ms ease, width 420ms ease;
}
.cefr-levels {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.cefr-level {
  display: grid;
  justify-items: center;
  min-width: 0;
  color: var(--ink-soft);
  text-align: center;
}
.cefr-marker {
  position: relative;
  z-index: 1;
  display: block;
  width: 12px;
  height: 12px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  transition: border-color 220ms ease, background 220ms ease, box-shadow 220ms ease, transform 220ms ease;
}
.cefr-level.is-passed .cefr-marker {
  border: 3px solid var(--paper);
  background: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.cefr-level.is-current .cefr-marker {
  border: 3px solid var(--paper);
  background: var(--accent);
  box-shadow: 0 0 0 2px var(--accent), 0 0 0 5px var(--accent-wash);
  transform: scale(1.08);
}
.cefr-level.is-target:not(.is-current) .cefr-marker {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-wash);
}
.cefr-level-label {
  display: inline-flex;
  gap: 3px;
  align-items: baseline;
  justify-content: center;
  margin-top: 14px;
  white-space: nowrap;
}
.cefr-level strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  font-weight: 500;
}
.cefr-level.is-passed strong { color: var(--ink); }
.cefr-level.is-current strong,
.cefr-level.is-target strong { color: var(--accent); }
.cefr-level small {
  display: inline-flex;
  margin: 0;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.2;
}
.cefr-level small[hidden] { display: none; }
.cefr-level small span:first-child {
  color: var(--ink);
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.cefr-level small span:last-child { display: none; }
.cefr-level.is-current small span:first-child,
.cefr-level.is-target small span:first-child { color: var(--accent); }
.cefr-tooltip {
  position: absolute;
  z-index: 30;
  top: calc(100% + 12px);
  right: 0;
  width: min(390px, calc(100vw - 42px));
  padding: 18px 20px 19px;
  border: 1px solid var(--ink);
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 16px 36px rgba(23, 35, 59, .16);
}
.cefr-tooltip::before {
  position: absolute;
  top: -6px;
  right: 38px;
  width: 10px;
  height: 10px;
  border-top: 1px solid var(--ink);
  border-left: 1px solid var(--ink);
  background: var(--paper);
  content: "";
  transform: rotate(45deg);
}
.cefr-tooltip[hidden] { display: none; }
.cefr-tooltip > strong {
  display: block;
  margin: 2px 0 11px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
  line-height: 1.2;
}
.cefr-tooltip > p:not(.eyebrow) {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.5;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin-bottom: 34px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
}
.metric-strip div {
  display: grid;
  gap: 2px;
  padding: 20px 22px;
  border-right: 1px solid var(--line);
}
.metric-strip div:first-child { padding-left: 0; }
.metric-strip div:last-child { border-right: 0; }
.metric-strip strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  font-weight: 500;
}
.metric-strip span { color: var(--ink-soft); font-size: 12px; }

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, .9fr);
  gap: 22px;
}
.panel {
  padding: 26px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .28);
}
.panel-heading { align-items: center; margin-bottom: 28px; }
.panel-heading a { color: var(--accent); font-size: 12px; text-decoration: none; }
.legend {
  display: flex;
  gap: 7px;
  align-items: center;
  color: var(--ink-soft);
  font-size: 11px;
}
.legend i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.footnote { margin: 20px 0 0; color: var(--ink-soft); font-size: 11px; }

.skill-chart { display: grid; gap: 14px; }
.skill-row {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(150px, 2fr) 38px;
  gap: 14px;
  align-items: center;
}
.skill-label {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.skill-track {
  width: 100%;
  height: 4px;
  border: 0;
  appearance: none;
  background: var(--line);
}
.skill-track::-webkit-progress-bar { background: var(--line); }
.skill-track::-webkit-progress-value { background: var(--accent); }
.skill-track::-moz-progress-bar { background: var(--accent); }
.skill-score {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  text-align: right;
}

.pattern-list { margin: 0; padding: 0; list-style: none; counter-reset: pattern; }
.pattern-list li {
  counter-increment: pattern;
  display: grid;
  grid-template-columns: 25px 1fr auto;
  gap: 12px;
  align-items: baseline;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.pattern-list li::before {
  content: "0" counter(pattern);
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
}
.pattern-list strong { font-size: 13px; font-weight: 650; }
.pattern-list span { color: var(--ink-soft); font-size: 11px; }

.goal-list { display: grid; gap: 24px; }
.goal { display: grid; gap: 9px; }
.goal-line { display: flex; justify-content: space-between; gap: 18px; font-size: 13px; }
.goal-line span:last-child { color: var(--ink-soft); }
.progress {
  width: 100%;
  height: 5px;
  border: 0;
  overflow: hidden;
  appearance: none;
  background: var(--line);
}
.progress::-webkit-progress-bar { background: var(--line); }
.progress::-webkit-progress-value { background: var(--accent); }
.progress::-moz-progress-bar { background: var(--accent); }
.goal p { margin: 0; color: var(--ink-soft); font-size: 11px; line-height: 1.5; }

.mini-timeline { position: relative; display: grid; gap: 4px; }
.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 85px 14px 1fr;
  gap: 12px;
  min-height: 64px;
  color: inherit;
  text-decoration: none;
}
.timeline-item time { color: var(--ink-soft); font-size: 11px; }
.timeline-node { position: relative; }
.timeline-node::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  z-index: 1;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
.timeline-node::after {
  content: "";
  position: absolute;
  top: 11px;
  bottom: -5px;
  left: 7px;
  width: 1px;
  background: var(--line);
}
.timeline-item:last-child .timeline-node::after { display: none; }
.timeline-copy { display: grid; align-content: start; gap: 3px; }
.timeline-copy strong { font-size: 13px; }
.timeline-copy span { color: var(--ink-soft); font-size: 11px; }

.section-intro { align-items: end; margin: 10px 0 42px; }
.section-intro h2 { margin-bottom: 0; }
.section-intro > p {
  max-width: 380px;
  margin-bottom: 5px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.65;
}
.session-layout {
  display: grid;
  grid-template-columns: minmax(360px, .8fr) minmax(460px, 1.2fr);
  gap: 28px;
  align-items: start;
}
.session-list { display: grid; border-top: 1px solid var(--ink); }
.session-card {
  position: relative;
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 16px;
  align-items: start;
  width: 100%;
  padding: 20px 8px;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.session-card:hover, .session-card.selected { background: rgba(229, 235, 255, .7); }
.session-date {
  display: grid;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.2;
}
.session-date strong {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  font-weight: 500;
}
.session-date time {
  margin-top: 6px;
  color: var(--ink-soft);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .03em;
  white-space: nowrap;
}
.session-card-copy { display: grid; gap: 5px; }
.session-card-copy strong { font-family: Georgia, "Times New Roman", serif; font-size: 17px; }
.session-card-copy span { color: var(--ink-soft); font-size: 11px; }
.session-labels {
  display: grid;
  justify-items: end;
  gap: 6px;
}
.session-kind, .pill {
  padding: 5px 7px;
  color: var(--accent);
  background: var(--accent-wash);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.analysis-badge {
  display: inline-flex;
  width: fit-content;
  padding: 5px 7px;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .42);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .04em;
  line-height: 1.25;
  text-transform: uppercase;
}
.analysis-badge.pending_ai,
.analysis-badge.ai_running,
.analysis-badge.ai_failed {
  color: var(--accent);
  border-color: rgba(35, 77, 255, .22);
  background: var(--accent-wash);
}
.analysis-badge.ai_running { animation: sync-pulse 1.4s ease-in-out infinite; }
@keyframes sync-pulse {
  50% { opacity: .52; }
}
.session-detail {
  position: sticky;
  top: 28px;
  min-height: 300px;
  padding: 28px;
  border-top: 3px solid var(--ink);
  background: #ebe7dd;
}
.session-detail h3 { margin-bottom: 14px; font-size: 30px; }
.session-detail > p:not(.empty-kicker) { color: var(--ink-soft); line-height: 1.6; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 24px; }
.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-bottom: 25px;
  background: var(--line);
}
.detail-stat { padding: 13px; background: var(--paper); }
.detail-stat strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
}
.detail-stat span { color: var(--ink-soft); font-size: 10px; }
.detail-section { margin-top: 28px; }
.detail-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}
.detail-actions.confirming-delete { animation: delete-confirm-reveal 160ms ease-out; }
.danger-button {
  border: 1px solid #b85d4f;
  background: transparent;
  color: #8b3429;
  padding: 9px 13px;
  cursor: pointer;
}
.danger-button:hover { background: #fff0ed; }
.danger-button-confirm {
  border-color: #8b3429;
  background: #8b3429;
  color: #fff;
}
.danger-button-confirm:hover { background: #6f281f; }
.danger-button:disabled,
.cancel-button:disabled { cursor: wait; opacity: .58; }
.cancel-button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
  padding: 9px 13px;
  cursor: pointer;
}
.cancel-button:hover { border-color: var(--ink-soft); color: var(--ink); }
@keyframes delete-confirm-reveal {
  from { opacity: .45; transform: translateY(-2px); }
}
.paste-merged {
  border-left: 3px solid var(--accent);
  padding-left: 12px;
}
.detail-section h4 {
  margin: 0 0 12px;
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.transcript { display: grid; gap: 9px; max-height: 420px; overflow: auto; padding-right: 8px; }
.turn {
  padding: 12px 14px;
  border-left: 2px solid var(--line);
  background: rgba(244, 241, 234, .6);
  font-size: 12px;
  line-height: 1.55;
}
.turn.learner { border-left-color: var(--accent); }
.turn b {
  display: block;
  margin-bottom: 3px;
  color: var(--ink-soft);
  font-size: 9px;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.observation { padding: 10px 0; border-top: 1px solid var(--line); font-size: 12px; }
.observation-correction { display: block; margin-top: 3px; }
.observation del { color: var(--warning); }
.observation ins { color: var(--success); text-decoration: none; }

.observation-translation {
  display: block;
  color: var(--ink-soft);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  font-style: italic;
  line-height: 1.35;
}
.observation-translation { margin-top: 4px; }
.mastery-indicator {
  display: grid;
  justify-items: center;
  gap: 5px;
}
.mastery-score {
  position: relative;
  display: grid;
  width: 55px;
  height: 55px;
  place-items: center;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 750;
}
.mastery-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: none;
  stroke-width: 3px;
  transform: rotate(-90deg);
}
.mastery-ring-track { stroke: var(--line); }
.mastery-ring-value { stroke: var(--accent); }
.mastery-score span {
  position: relative;
  z-index: 1;
}
.mastery-label {
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1;
}
.empty-list { padding: 30px 0; color: var(--ink-soft); }

.review02-intro { margin-bottom: 34px; }
.review02-daily {
  position: relative;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) minmax(250px, .42fr);
  gap: 28px;
  align-items: stretch;
  margin-bottom: 32px;
  padding: 28px 30px;
  overflow: hidden;
  color: var(--paper);
  background: var(--ink);
}
.review02-daily::after {
  position: absolute;
  top: -82px;
  right: 22%;
  width: 1px;
  height: 280px;
  background: var(--accent);
  content: "";
  opacity: .85;
  transform: rotate(28deg);
}
.review02-daymark {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: space-between;
  padding-right: 26px;
  border-right: 1px solid rgba(244, 241, 234, .25);
}
.review02-daymark span {
  color: #aeb6c5;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.review02-daymark strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 64px;
  font-weight: 500;
  line-height: .9;
}
.review02-daily-copy { position: relative; z-index: 1; }
.review02-daily-copy .eyebrow { color: #93adff; }
.review02-daily-copy h3 {
  max-width: 650px;
  margin-bottom: 10px;
  color: #fff;
  font-size: clamp(25px, 3vw, 36px);
}
.review02-daily-copy > p:not(.eyebrow) {
  max-width: 670px;
  margin-bottom: 20px;
  color: #c7ceda;
  font-size: 12px;
  line-height: 1.55;
}
.review02-statline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  color: #aeb6c5;
  font-size: 10px;
}
.review02-statline strong { color: #fff; font-size: 14px; }
.review02-daily-action {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  gap: 10px;
  padding-left: 28px;
  border-left: 1px solid rgba(244, 241, 234, .25);
}
.review02-daily-action > span:first-child {
  color: #fff;
  font-size: 12px;
  font-weight: 750;
}
.review02-duration {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  color: #aeb6c5;
  font-size: 10px;
}
.review02-duration select {
  min-width: 92px;
  padding: 7px 9px;
  border: 1px solid rgba(244, 241, 234, .35);
  color: #fff;
  background: #222b39;
}
.review02-selection-note {
  min-height: 14px;
  color: #ffd2b5;
  font-size: 10px;
}
.review02-daily-action small {
  color: #aeb6c5;
  font-size: 10px;
  line-height: 1.45;
}
.review02-primary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  width: 100%;
  padding: 13px 15px;
  border: 1px solid #fff;
  color: var(--ink);
  background: #fff;
  font-weight: 750;
  cursor: pointer;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}
.review02-primary:hover { color: #fff; background: var(--accent); transform: translateY(-1px); }
.review02-primary:disabled { cursor: not-allowed; opacity: .42; transform: none; }

.review02-view.has-selection-dock { padding-bottom: 118px; }
.review02-selection-dock-shell {
  position: fixed;
  z-index: 80;
  right: 0;
  bottom: max(18px, env(safe-area-inset-bottom));
  left: var(--rail-width);
  display: flex;
  justify-content: center;
  padding: 0 28px;
  pointer-events: none;
}
.review02-selection-dock {
  display: grid;
  grid-template-columns: minmax(170px, .55fr) minmax(430px, 1fr);
  gap: 24px;
  align-items: center;
  width: min(900px, 100%);
  padding: 12px 12px 12px 18px;
  border: 1px solid rgba(255, 255, 255, .18);
  color: #fff;
  background: rgba(23, 35, 59, .96);
  box-shadow: 0 18px 48px rgba(23, 35, 59, .28);
  backdrop-filter: blur(14px);
  pointer-events: auto;
  animation: review02-selection-dock-in 180ms ease-out both;
}
@keyframes review02-selection-dock-in {
  from { opacity: 0; transform: translateY(12px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.review02-selection-dock-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.review02-selection-dock-copy strong { font-size: 12px; }
.review02-selection-dock-copy span {
  overflow: hidden;
  color: #aeb6c5;
  font-size: 9px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.review02-selection-dock-actions {
  display: grid;
  grid-template-columns: auto auto minmax(180px, 1fr);
  gap: 8px;
  justify-content: end;
}
.review02-selection-dock-actions button {
  min-height: 38px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, .28);
  color: #eef1f7;
  background: transparent;
  font-size: 10px;
  font-weight: 750;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}
.review02-selection-dock-actions button:hover {
  border-color: rgba(255, 255, 255, .72);
  background: rgba(255, 255, 255, .08);
}
.review02-selection-dock-actions button:disabled {
  cursor: default;
  opacity: .38;
}
.review02-selection-dock-actions .review02-selection-dock-primary {
  border-color: #fff;
  color: var(--ink);
  background: #fff;
}
.review02-selection-dock-actions .review02-selection-dock-primary:hover {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
  transform: translateY(-1px);
}

.review02-tabs {
  display: flex;
  gap: 26px;
  overflow-x: auto;
  border-bottom: 1px solid var(--ink);
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.review02-tabs::-webkit-scrollbar { display: none; }
.review02-tabs button {
  position: relative;
  flex: 0 0 auto;
  padding: 13px 0 14px;
  border: 0;
  color: var(--ink-soft);
  background: transparent;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}
.review02-tabs button::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 3px;
  background: var(--accent);
  content: "";
  opacity: 0;
  transform: scaleX(.3);
  transition: opacity 180ms ease, transform 180ms ease;
}
.review02-tabs button:hover,
.review02-tabs button.active { color: var(--ink); }
.review02-tabs button.active::after { opacity: 1; transform: scaleX(1); }

.review02-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 210px auto;
  gap: 24px;
  align-items: end;
  padding: 22px 0 18px;
  border-bottom: 1px solid var(--line);
}
.review02-search,
.review02-kind { display: grid; gap: 7px; }
.review02-search span,
.review02-kind span {
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.review02-search input,
.review02-kind select {
  width: 100%;
  padding: 9px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  background: transparent;
}
.review02-search input:focus,
.review02-kind select:focus { border-bottom-color: var(--accent); outline-offset: 0; }
.review02-result-count {
  padding-bottom: 10px;
  color: var(--ink-soft);
  font-size: 10px;
  white-space: nowrap;
}
.review02-result-count strong { color: var(--ink); font-size: 14px; }

.review02-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 245px;
  gap: clamp(34px, 5vw, 72px);
  align-items: start;
}
.review02-list { min-width: 0; }
.review02-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 170px;
  gap: 18px;
  align-items: start;
  padding: 22px 12px 22px 0;
  border-bottom: 1px solid var(--line);
  transition: background 180ms ease, padding 180ms ease;
}
.review02-item.is-selected {
  padding-left: 12px;
  background: rgba(229, 235, 255, .72);
}
.review02-select { padding-top: 2px; cursor: pointer; }
.review02-select input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}
.review02-select span {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--paper);
  transition: border-color 160ms ease, background 160ms ease;
}
.review02-select span::after {
  width: 8px;
  height: 4px;
  border-bottom: 2px solid #fff;
  border-left: 2px solid #fff;
  content: "";
  opacity: 0;
  transform: translateY(-1px) rotate(-45deg) scale(.6);
  transition: opacity 150ms ease, transform 150ms ease;
}
.review02-select input:focus-visible + span { outline: 3px solid rgba(36, 87, 230, .35); outline-offset: 3px; }
.review02-select input:checked + span { border-color: var(--accent); background: var(--accent); }
.review02-select input:checked + span::after { opacity: 1; transform: translateY(-1px) rotate(-45deg) scale(1); }
.review02-item-copy { display: grid; gap: 7px; min-width: 0; }
.review02-item-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.review02-item-copy > strong {
  overflow-wrap: anywhere;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.25;
}
.review02-reveal {
  display: flex;
  gap: 8px;
  align-items: center;
  width: fit-content;
  padding: 3px 0;
  border: 0;
  color: var(--accent);
  background: transparent;
  font-size: 10px;
  font-weight: 750;
  cursor: pointer;
}
.review02-reveal span { font-size: 14px; line-height: 1; }
.review02-answer {
  display: grid;
  gap: 5px;
  margin-top: 3px;
  padding: 10px 0 2px 14px;
  border-left: 2px solid var(--accent);
  animation: review02-answer-reveal 180ms ease-out both;
}
.review02-answer > span {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  font-style: italic;
}
.review02-answer p { margin: 0; color: var(--ink-soft); font-size: 11px; line-height: 1.5; }
@keyframes review02-answer-reveal {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.review02-item-state {
  display: grid;
  justify-items: end;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 9px;
  text-align: right;
}
.review02-item-state > span.is-due { color: var(--warning); font-weight: 750; }
.review02-mastery-indicator { justify-self: end; }

.review02-guide {
  position: sticky;
  top: 24px;
  margin-top: 22px;
  padding-left: 24px;
  border-left: 1px solid var(--line);
}
.review02-guide ol { display: grid; gap: 22px; margin: 24px 0 0; padding: 0; list-style: none; }
.review02-guide li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; }
.review02-guide li > span { color: var(--accent); font-size: 10px; font-weight: 800; }
.review02-guide p { display: grid; gap: 4px; margin: 0; }
.review02-guide strong { font-family: Georgia, "Times New Roman", serif; font-size: 16px; }
.review02-guide small { color: var(--ink-soft); font-size: 10px; line-height: 1.45; }

.review02-prompt-panel {
  position: relative;
  margin-top: 44px;
  padding: clamp(24px, 4vw, 42px);
  color: #fff;
  background: var(--ink);
  scroll-margin-top: 24px;
  animation: review02-prompt-reveal 240ms ease-out both;
}
@keyframes review02-prompt-reveal {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.review02-prompt-heading {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: start;
  margin-bottom: 22px;
}
.review02-prompt-heading .eyebrow { color: #93adff; }
.review02-prompt-heading h3 { color: #fff; font-size: 30px; }
.review02-prompt-heading button {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, .35);
  color: #fff;
  background: transparent;
  font-size: 23px;
  cursor: pointer;
}
.voice-prompt-layout {
  display: grid;
  min-width: 0;
}
.voice-prompt-help {
  margin: 10px 0 0;
  color: #aeb6c5;
  font-size: 10px;
  line-height: 1.45;
}
.voice-prompt-action-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(18px, 3vw, 30px);
  align-items: end;
  margin-top: 14px;
}
.voice-correction-control {
  display: grid;
  grid-template-columns: minmax(108px, .45fr) minmax(210px, 1fr);
  grid-template-areas:
    "heading scale"
    "copy copy";
  gap: 8px 18px;
  align-items: center;
  min-width: 0;
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, .24);
  border-bottom: 1px solid rgba(255, 255, 255, .13);
  color: #f7f5ef;
}
.voice-correction-heading {
  grid-area: heading;
  display: grid;
  gap: 5px;
}
.voice-correction-heading > span {
  color: #9eb5ff;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.voice-correction-heading strong {
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  line-height: 1.15;
}
.voice-correction-scale {
  grid-area: scale;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.voice-correction-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.voice-correction-track::before {
  position: absolute;
  top: 11px;
  right: calc(100% / 12);
  left: calc(100% / 12);
  height: 1px;
  background: rgba(255, 255, 255, .3);
  content: "";
}
.voice-correction-point {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: 23px auto;
  place-items: center;
  min-width: 0;
  cursor: pointer;
}
.voice-correction-point input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.voice-correction-point > span {
  width: 11px;
  height: 11px;
  border: 2px solid #8f99ab;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 4px var(--ink);
  transition: width .16s ease, height .16s ease, border-color .16s ease, background .16s ease;
}
.voice-correction-point small {
  color: #8f99ab;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .03em;
}
.voice-correction-point:hover > span {
  border-color: #c7d2e8;
}
.voice-correction-point:has(input:checked) > span {
  width: 17px;
  height: 17px;
  border-color: #c8d5ff;
  background: var(--accent);
}
.voice-correction-point:has(input:checked) small { color: #fff; }
.voice-correction-point:has(input:focus-visible) > span {
  outline: 3px solid rgba(158, 181, 255, .55);
  outline-offset: 4px;
}
.voice-correction-copy {
  grid-area: copy;
  display: flex;
  flex-wrap: wrap;
  gap: 7px 18px;
  align-items: center;
}
.voice-correction-description {
  flex: 1 1 210px;
  margin: 0;
  color: #c4cbd8;
  font-size: 10px;
  line-height: 1.5;
}
.voice-correction-language-note {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 9px;
  flex: 1 1 230px;
  align-items: center;
  margin: 0;
  color: #aeb6c5;
  font-size: 9px;
  line-height: 1.45;
}
.voice-correction-language-note > span:first-child {
  display: grid;
  place-items: center;
  min-height: 20px;
  border: 1px solid rgba(158, 181, 255, .55);
  color: #b8c8ff;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: .08em;
}
.review02-prompt-panel textarea {
  width: 100%;
  min-height: 360px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, .25);
  color: #eef1f7;
  background: #101a2d;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  line-height: 1.55;
  resize: vertical;
}
.prompt-intro { margin-bottom: 34px; }
.prompt-workbench {
  display: grid;
  grid-template-columns: minmax(360px, .78fr) minmax(500px, 1.22fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.prompt-controls {
  display: grid;
  gap: 30px;
  padding-top: 2px;
}
.focus-fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.focus-fieldset legend,
.prompt-field-heading > span {
  display: block;
  margin-bottom: 11px;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.focus-options { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--ink); }
.focus-option {
  position: relative;
  min-width: 0;
  padding: 15px 12px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: color .18s ease, background .18s ease;
}
.focus-option:nth-child(even) { border-right: 0; }
.focus-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.focus-option span { display: grid; gap: 4px; }
.focus-option b { font-family: Georgia, "Times New Roman", serif; font-size: 17px; }
.focus-option small { color: var(--ink-soft); font-size: 10px; line-height: 1.4; }
.focus-option:has(input:checked) {
  color: var(--accent);
  background: var(--accent-wash);
  box-shadow: inset 3px 0 0 var(--accent);
}
.focus-option:has(input:focus-visible) { outline: 3px solid rgba(36, 87, 230, .35); outline-offset: 2px; }
.prompt-field { display: grid; }
.prompt-field-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 11px;
}
.prompt-field-heading > span { margin-bottom: 0; }
.dictate-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
  background: transparent;
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
  transition: border-color .18s ease, color .18s ease, background .18s ease;
}
.dictate-button:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-wash);
}
.dictate-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}
.dictate-button.is-listening {
  border-color: var(--accent);
  color: white;
  background: var(--accent);
}
.dictate-button.is-listening svg { animation: dictation-pulse 1.1s ease-in-out infinite; }
.dictate-button:disabled { color: var(--ink-soft); cursor: not-allowed; opacity: .58; }
@keyframes dictation-pulse {
  50% { transform: scale(1.13); opacity: .72; }
}
.topic-suggestions {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--ink);
}
.topic-suggestions-label {
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.4;
}
.topic-accordions {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.topic-accordion { border-bottom: 1px solid var(--line); }
.topic-accordion:last-child { border-bottom: 0; }
.topic-accordion summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 16px;
  gap: 10px;
  align-items: center;
  min-height: 46px;
  padding: 10px 2px;
  list-style: none;
  cursor: pointer;
}
.topic-accordion summary::-webkit-details-marker { display: none; }
.topic-accordion summary span {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  font-weight: 700;
}
.topic-accordion summary small {
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.topic-accordion summary svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
  transition: transform .18s ease;
}
.topic-accordion[open] summary { color: var(--accent); }
.topic-accordion[open] summary svg { transform: rotate(180deg); }
.topic-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 2px 0 14px;
  animation: topic-reveal .2s ease both;
}
@keyframes topic-reveal {
  from { opacity: 0; transform: translateY(-3px); }
  to { opacity: 1; transform: translateY(0); }
}
.topic-chips button {
  min-height: 32px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink-soft);
  background: transparent;
  font-size: 10px;
  line-height: 1.25;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease, background .15s ease, transform .15s ease;
}
.topic-chips button:hover {
  border-color: var(--ink);
  color: var(--ink);
  transform: translateY(-1px);
}
.topic-chips button.is-selected {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-wash);
}
.topic-chips button.is-selected::before {
  margin-right: 5px;
  content: "✓";
}
.prompt-topic-input {
  border-bottom: 1px solid var(--line);
}
.prompt-field textarea {
  width: 100%;
  min-height: 112px;
  resize: vertical;
  padding: 14px 0;
  border: 0;
  border-radius: 0;
  color: var(--ink);
  background: transparent;
  line-height: 1.55;
}
.prompt-topic-input-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 40px;
  border-top: 1px solid var(--line);
}
.prompt-dictation-controls {
  display: flex;
  flex: 0 0 auto;
  align-self: stretch;
}
.prompt-dictation-controls select {
  min-height: 40px;
  padding: 0 30px 0 10px;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink-soft);
  background-color: transparent;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .04em;
  cursor: pointer;
}
.prompt-dictation-controls select:disabled {
  opacity: .45;
  cursor: not-allowed;
}
.prompt-topic-input-footer .dictate-button {
  flex: 0 0 auto;
  min-height: 40px;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
}
.prompt-field textarea::placeholder { color: #8b9099; }
.prompt-field > small {
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.45;
}
.prompt-duration-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 16px;
  align-items: center;
  padding: 15px 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
}
.prompt-duration-field > span {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.prompt-duration-field select {
  min-width: 126px;
  padding: 9px 30px 9px 11px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: transparent;
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
}
.prompt-duration-field > small {
  grid-column: 1 / -1;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.45;
}
.prompt-topic-input-footer .dictation-status {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding: 7px 10px 7px 0;
  color: var(--accent);
}
.prompt-topic-input-footer .dictation-status:empty { display: none; }
.prompt-topic-input-footer .dictation-status.is-error { color: var(--warning); }
.generate-button {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 14px 16px;
  transition: background .18s ease, transform .18s ease;
}
.generate-button:hover { background: var(--accent); transform: translateY(-1px); }
.prompt-result {
  position: sticky;
  top: 28px;
  min-width: 0;
  padding: 28px;
  border-top: 3px solid var(--accent);
  background: var(--ink);
  color: #f7f5ef;
  box-shadow: 0 18px 45px rgba(23, 35, 59, .12);
}
.prompt-result-heading {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 20px;
}
.prompt-result-heading .eyebrow { color: #9eb5ff; }
.prompt-result-heading h3 { color: #fff; }
.prompt-word-count { color: #aeb6c5; font-size: 10px; white-space: nowrap; }
.prompt-result textarea {
  display: block;
  width: 100%;
  height: min(54vh, 520px);
  min-height: 380px;
  resize: vertical;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 0;
  color: #e9edf5;
  background: rgba(0, 0, 0, .14);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
  line-height: 1.55;
}
.copy-button {
  flex: 0 0 auto;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, .5);
  color: #fff;
  background: transparent;
  cursor: pointer;
}
.copy-button:hover { color: var(--ink); background: #fff; }

.import-toast {
  position: fixed;
  right: 24px;
  bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  max-width: min(520px, calc(100vw - 48px));
  padding: 16px 20px;
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  overflow-wrap: anywhere;
  box-shadow: 0 8px 28px rgba(23, 35, 59, .22);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.import-toast[data-status="success"] { background: var(--success); }
.import-toast[data-status="error"] { background: #b33434; }
.import-toast[data-status="warning"] { background: #a65318; }
.import-toast.is-visible { opacity: 1; transform: translateY(0); }
.import-toast-icon {
  display: grid;
  place-items: center;
  flex: 0 0 24px;
  height: 24px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 16px;
}

.import-intro { margin-bottom: 34px; }
.import-workbench {
  display: grid;
  grid-template-columns: minmax(560px, 1.35fr) minmax(300px, .65fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.paste-import-form { display: grid; gap: 28px; }
.paste-meta-fields {
  display: grid;
  grid-template-columns: minmax(220px, 1.6fr) minmax(190px, 1fr) minmax(150px, .7fr);
  gap: 22px;
}
.paste-field,
.paste-transcript-field {
  display: grid;
  min-width: 0;
}
.paste-field > span,
.paste-transcript-field > label {
  display: block;
  margin-bottom: 9px;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.paste-field input,
.paste-field select {
  width: 100%;
  min-height: 42px;
  padding: 10px 8px;
  border: 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  background: transparent;
}
.paste-transcript-field textarea {
  width: 100%;
  min-height: 470px;
  height: min(57vh, 680px);
  resize: vertical;
  padding: 18px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--ink);
  border-bottom: 0;
  border-radius: 0;
  color: var(--ink);
  background: rgba(255, 255, 255, .3);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  line-height: 1.6;
}
.paste-transcript-field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.paste-transcript-field textarea[readonly] {
  color: var(--ink);
  background: var(--accent-wash);
}
.paste-dictation-footer {
  padding-left: 18px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.paste-input-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  margin-top: -12px;
}
.paste-input-footer p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 11px;
}
.paste-import-button {
  display: flex;
  flex: 0 0 auto;
  justify-content: space-between;
  gap: 26px;
  min-width: 220px;
  padding: 13px 16px;
}
.paste-import-button:hover { background: var(--accent); }
.paste-import-button:disabled {
  cursor: wait;
  opacity: .62;
}
.paste-result {
  position: sticky;
  top: 28px;
  min-height: 320px;
  padding: 28px;
  border-top: 3px solid var(--accent);
  color: #e9edf5;
  background: var(--ink);
}
.paste-result .eyebrow { color: #9eb5ff; }
.paste-result h3 { margin-bottom: 18px; color: #fff; font-size: 30px; }
.paste-result p { color: #b9c1cf; font-size: 12px; line-height: 1.65; }
.paste-guide {
  display: grid;
  gap: 14px;
  margin: 26px 0;
  padding: 0;
  list-style: none;
  counter-reset: paste-guide;
}
.paste-guide li {
  counter-increment: paste-guide;
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 10px;
  font-size: 12px;
  line-height: 1.5;
}
.paste-guide li::before {
  content: "0" counter(paste-guide);
  color: #9eb5ff;
  font-size: 10px;
  font-weight: 800;
}
.paste-privacy {
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, .16);
}
.import-session-history {
  margin-top: clamp(88px, 10vw, 156px);
  padding-top: clamp(42px, 5vw, 72px);
  border-top: 1px solid var(--ink);
  scroll-margin-top: 28px;
}
.import-session-history-intro { margin-top: 0; }
.paste-processing { padding-top: 36px; }
.paste-spinner {
  display: block;
  width: 54px;
  height: 54px;
  margin-bottom: 34px;
  border: 2px solid rgba(255, 255, 255, .16);
  border-top-color: #9eb5ff;
  border-radius: 50%;
  animation: paste-spin .9s linear infinite;
}
@keyframes paste-spin { to { transform: rotate(360deg); } }
.paste-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 22px 0;
}
.paste-topic {
  padding: 6px 8px;
  border: 1px solid rgba(255, 255, 255, .2);
  color: #dce4f5;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.paste-result-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 24px 0;
  border-top: 1px solid rgba(255, 255, 255, .16);
  border-bottom: 1px solid rgba(255, 255, 255, .16);
}
.paste-result-stats div {
  padding: 15px 10px;
  border-right: 1px solid rgba(255, 255, 255, .16);
}
.paste-result-stats div:first-child { padding-left: 0; }
.paste-result-stats div:last-child { border-right: 0; }
.paste-result-stats dt { color: #9ea8b8; font-size: 9px; }
.paste-result-stats dd {
  margin: 4px 0 0;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
}
.paste-structure {
  margin: -8px 0 10px;
  color: #c8f0dc !important;
  font-size: 11px !important;
}
.paste-provider { margin-bottom: 20px; font-size: 10px !important; }
.paste-analysis-state {
  margin: 0 0 20px;
  padding: 14px 0 14px 16px;
  border-left: 2px solid currentColor;
  color: var(--ink-soft);
  font-size: 12px !important;
  line-height: 1.55;
}
.paste-analysis-state.pending_ai { color: var(--accent); }
.paste-open-session { width: 100%; }

.loading-state {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-height: 55vh;
}
.loading-state span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse .9s ease infinite alternate;
}
.loading-state span:nth-child(2) { animation-delay: .15s; }
.loading-state span:nth-child(3) { animation-delay: .3s; }
@keyframes pulse { to { opacity: .25; transform: translateY(-5px); } }
.error-state { max-width: 620px; margin: 80px auto; padding: 36px; border: 1px solid var(--warning); }
.error-state h2 { font-size: 36px; }
.error-state > p:not(.eyebrow) { color: var(--ink-soft); }
.primary-button { padding: 10px 15px; color: #fff; background: var(--ink); }

@media (max-width: 1050px) {
  .login-layout { grid-template-columns: minmax(0, 1fr) minmax(300px, .85fr); gap: 56px; }
  :root { --rail-width: 78px; }
  .rail { padding-inline: 14px; }
  .brand-name, .rail-footer { display: none; }
  .mobile-memory-status {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    width: fit-content;
    margin-top: 10px;
    padding: 7px 0;
    border: 0;
    color: var(--ink-soft);
    background: transparent;
    font-size: 11px;
    cursor: help;
  }
  .brand { justify-content: center; }
  .nav-link { justify-content: center; padding-inline: 5px; font-size: 0; }
  .nav-icon { font-size: 10px; }
  main { padding-inline: 32px; }
  .dashboard-grid, .session-layout, .prompt-workbench, .import-workbench { grid-template-columns: 1fr; }
  .review02-daily { grid-template-columns: 90px minmax(0, 1fr); }
  .review02-daily-action {
    grid-column: 1 / -1;
    grid-template-columns: minmax(120px, .4fr) minmax(220px, 1fr);
    padding: 20px 0 0;
    border-top: 1px solid rgba(244, 241, 234, .25);
    border-left: 0;
  }
  .review02-daily-action small { grid-column: 2; }
  .review02-workspace { grid-template-columns: minmax(0, 1fr) 210px; gap: 34px; }
  .session-detail { position: static; }
  .session-card { padding-right: 38px; }
  .session-card::after {
    position: absolute;
    top: 26px;
    right: 14px;
    width: 8px;
    height: 8px;
    border-right: 1.5px solid var(--ink-soft);
    border-bottom: 1.5px solid var(--ink-soft);
    content: "";
    transform: rotate(45deg);
    transition: transform 180ms ease, border-color 180ms ease;
  }
  .session-card.selected::after {
    border-color: var(--ink);
    transform: translateY(4px) rotate(225deg);
  }
  .session-detail.session-detail-accordion {
    position: static;
    min-height: 0;
    margin-top: -1px;
    padding: 28px;
    border-top: 1px solid var(--ink);
    border-bottom: 1px solid var(--ink);
    animation: session-accordion-reveal 220ms ease-out both;
  }
  .session-detail[hidden] { display: none; }
  @keyframes session-accordion-reveal {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
  }
  .prompt-result, .paste-result { position: static; }
  .paste-meta-fields { grid-template-columns: repeat(2, 1fr); }
  .paste-field:last-child { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .login-screen { padding: 20px; }
  .login-layout {
    display: block;
    min-height: auto;
    padding: 44px 0 36px;
  }
  .login-identity {
    min-height: auto;
    gap: 34px;
    margin-bottom: 44px;
  }
  .login-mark { width: 52px; height: 52px; }
  .login-identity h1 { font-size: clamp(46px, 16vw, 66px); }
  .login-privacy { display: none; }
  .login-form {
    padding: 34px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
  .login-form-heading { margin-bottom: 34px; }
  :root { --rail-width: 0px; }
  .rail {
    position: fixed;
    inset: auto 0 0 0;
    width: auto;
    height: 62px;
    flex-direction: row;
    align-items: center;
    padding: 7px 14px;
    border-top: 1px solid var(--line);
    border-right: 0;
  }
  .brand, .rail-footer { display: none; }
  nav {
    width: 100%;
    grid-auto-columns: minmax(76px, 1fr);
    grid-auto-flow: column;
    gap: 2px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  nav::-webkit-scrollbar { display: none; }
  .nav-link {
    justify-content: center;
    width: 100%;
    min-width: 0;
    height: 48px;
    padding: 0 3px;
    border: 0;
    border-bottom: 2px solid transparent;
    font-size: clamp(10.5px, 3vw, 13px);
    font-weight: 650;
    line-height: 1.05;
    text-align: center;
  }
  .nav-link > span:not(.nav-icon) {
    width: 100%;
    hyphens: manual;
  }
  .nav-icon { display: none; }
  .nav-link:hover, .nav-link.active {
    border-bottom-color: var(--accent);
    background: var(--accent-wash);
  }
  main { width: 100%; margin: 0; padding: 20px 18px 94px; }
  .topbar { align-items: end; }
  .topbar-actions { gap: 8px; }
  .sync-status { display: none; }
  .logout-button {
    width: 38px;
    overflow: hidden;
    padding: 8px 0;
    border: 0;
    font-size: 0;
  }
  .logout-button::before {
    font-size: 17px;
    content: "↗";
  }
  .language-switcher button { min-width: 31px; padding-inline: 6px; }
  .hero-row {
    grid-template-columns: 1fr;
    grid-template-areas:
      "copy"
      "cefr"
      "session";
    gap: 22px;
    padding-bottom: 26px;
  }
  .hero-cefr { width: 100%; margin-top: 0; margin-left: 0; }
  .session-cta {
    grid-template-columns: 1fr;
    gap: 5px;
    align-items: start;
  }
  .session-cta span:last-child { white-space: normal; }
  .cefr-tooltip { right: auto; left: 0; }
  .cefr-tooltip::before { right: auto; left: 38px; }
  .metric-strip { grid-template-columns: repeat(2, 1fr); }
  .metric-strip div:nth-child(2n) { border-right: 0; }
  .metric-strip div:nth-child(2n+1) { padding-left: 0; }
  .metric-strip div:nth-child(-n+4) { border-bottom: 1px solid var(--line); }
  .metric-strip div:last-child { grid-column: 1 / -1; }
  .section-intro { display: block; }
  .section-intro > p { margin-top: 20px; }
  .session-layout { display: block; }
  .session-list { margin-bottom: 30px; }
  .session-card { grid-template-columns: 62px 1fr; }
  .session-labels { grid-column: 2; justify-items: start; }
  .session-detail.session-detail-accordion { padding: 24px 18px 30px; }
  .session-detail.session-detail-accordion h3 { font-size: 26px; }
  .session-detail.session-detail-accordion .detail-grid { grid-template-columns: 1fr; }
  .review02-daily {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 24px 22px;
  }
  .review02-daymark {
    grid-template-columns: 1fr auto;
    align-items: end;
    padding: 0 0 18px;
    border-right: 0;
    border-bottom: 1px solid rgba(244, 241, 234, .25);
  }
  .review02-daymark strong { font-size: 54px; }
  .review02-daily-action {
    grid-column: auto;
    grid-template-columns: 1fr;
    padding-top: 18px;
  }
  .review02-daily-action small { grid-column: auto; }
  .review02-tabs { gap: 20px; }
  .review02-toolbar { grid-template-columns: 1fr; gap: 14px; }
  .review02-result-count { padding-bottom: 0; }
  .review02-view.has-selection-dock { padding-bottom: 230px; }
  .review02-selection-dock-shell {
    bottom: calc(72px + env(safe-area-inset-bottom));
    padding: 0 10px;
  }
  .review02-selection-dock {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 13px;
  }
  .review02-selection-dock-copy span {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }
  .review02-selection-dock-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .review02-selection-dock-actions button { padding-inline: 8px; }
  .review02-selection-dock-primary { grid-column: 1 / -1; }
  .review02-workspace { display: block; }
  .review02-item {
    grid-template-columns: 30px minmax(0, 1fr);
    padding-right: 0;
  }
  .review02-item-state {
    grid-column: 2;
    grid-template-columns: minmax(110px, 1fr) auto;
    justify-items: start;
    text-align: left;
  }
  .review02-item-state > span:last-child { display: none; }
  .review02-mastery-indicator { justify-self: start; }
  .review02-guide {
    position: static;
    margin-top: 34px;
    padding: 24px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
  .review02-guide ol { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .review02-guide li { grid-template-columns: 1fr; }
  .review02-prompt-panel { margin-inline: -18px; }
  .voice-prompt-action-row { grid-template-columns: 1fr; }
  .voice-correction-track { max-width: 420px; }
  .skill-row { grid-template-columns: 115px minmax(80px, 1fr) 34px; gap: 8px; }
  .panel { padding: 20px; }
  .topic-chips {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .topic-chips button {
    min-height: 42px;
    text-align: left;
  }
  .topic-accordion summary {
    grid-template-columns: minmax(0, 1fr) auto 16px;
    min-height: 50px;
  }
  .prompt-dictation-controls select {
    max-width: 104px;
    padding-inline: 8px 24px;
  }
  .prompt-result { padding: 20px; }
  .prompt-result textarea { min-height: 440px; }
  .copy-button { width: 100%; }
  .paste-meta-fields { grid-template-columns: 1fr; gap: 18px; }
  .paste-field:last-child { grid-column: auto; }
  .paste-transcript-field textarea { min-height: 420px; height: 55vh; }
  .paste-input-footer { align-items: stretch; flex-direction: column; }
  .paste-import-button { width: 100%; }
}

@media (max-width: 480px) {
  .voice-correction-control {
    grid-template-columns: 1fr;
    grid-template-areas:
      "heading"
      "scale"
      "copy";
    gap: 12px;
  }
  .voice-correction-track { max-width: none; }
}
