:root {
  color-scheme: light;
  --canvas: #f4f1eb;
  --canvas-deep: #eae5dc;
  --paper: #fffdf9;
  --paper-soft: #f9f6f0;
  --ink: #1e2922;
  --ink-soft: #5f6962;
  --ink-faint: #89918c;
  --pine: #416451;
  --pine-deep: #2f4c3d;
  --pine-soft: #dfe8e1;
  --sage: #829686;
  --clay: #b66e50;
  --clay-soft: #f1dfd6;
  --gold: #9a7740;
  --gold-soft: #f0e7d4;
  --danger: #a94f48;
  --danger-soft: #f4dfdc;
  --line: #ddd9d0;
  --line-strong: #c9c4b9;
  --shadow-soft: 0 5px 20px rgba(40, 49, 43, 0.07);
  --shadow: 0 18px 48px rgba(40, 49, 43, 0.11);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --content: 1180px;
  --serif: Iowan Old Style, Baskerville, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  font-family: var(--sans);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--canvas);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 14% 2%, rgba(255, 255, 255, 0.86), transparent 28rem),
    var(--canvas);
  font-family: var(--sans);
  line-height: 1.48;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
}

a {
  color: inherit;
}

img,
svg {
  display: block;
}

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

svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

h1,
.editorial-title {
  margin-bottom: 12px;
  font-family: var(--serif);
  font-size: clamp(38px, 6vw, 66px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 0.99;
}

h2 {
  margin-bottom: 10px;
  font-family: var(--serif);
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.08;
}

h3 {
  margin-bottom: 7px;
  font-size: 17px;
  font-weight: 680;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  color: #fff;
  background: var(--pine-deep);
  border-radius: 8px;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  z-index: 40;
  top: 0;
  display: grid;
  min-height: 72px;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  padding: 0 max(24px, env(safe-area-inset-left));
  background: rgba(244, 241, 235, 0.82);
  border-bottom: 1px solid rgba(201, 196, 185, 0.64);
  backdrop-filter: blur(22px) saturate(135%);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-button {
  width: fit-content;
  padding: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  color: #fff;
  background: var(--pine-deep);
  border-radius: 12px 12px 12px 5px;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 600;
  line-height: 1;
  box-shadow: 0 5px 14px rgba(47, 76, 61, 0.2);
}

.brand-copy {
  display: grid;
  line-height: 1.05;
}

.brand-copy strong {
  font-size: 17px;
}

.brand-copy small {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.topbar-center {
  max-width: 440px;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 13px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 5px;
}

.icon-button {
  display: inline-grid;
  width: 42px;
  height: 42px;
  padding: 0;
  flex: 0 0 auto;
  place-items: center;
  color: var(--ink-soft);
  background: transparent;
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
}

.icon-button:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.64);
}

.icon-button:focus-visible,
.button:focus-visible,
.tab-button:focus-visible,
.meeting-card:focus-visible,
.filter-control:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(65, 100, 81, 0.24);
  outline-offset: 2px;
}

.icon-button svg {
  width: 20px;
  height: 20px;
}

.icon-button.small {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

.icon-button.small svg {
  width: 17px;
  height: 17px;
}

.icon-button.danger:hover {
  color: var(--danger);
  background: var(--danger-soft);
}

.save-indicator {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-right: 8px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 650;
}

.save-dot {
  width: 7px;
  height: 7px;
  background: var(--sage);
  border-radius: 50%;
}

.save-indicator.is-saving .save-dot {
  background: var(--gold);
  animation: breathe 1s ease-in-out infinite;
}

.save-indicator.is-error {
  color: var(--danger);
}

.save-indicator.is-error .save-dot {
  background: var(--danger);
}

#main-content {
  min-height: calc(100vh - 72px);
}

.page-shell {
  width: min(calc(100% - 40px), var(--content));
  margin: 0 auto;
  padding: clamp(38px, 6vw, 78px) 0 84px;
}

.page-shell.narrow {
  max-width: 900px;
}

.page-shell.wide {
  --content: 1320px;
}

.eyebrow {
  margin-bottom: 10px;
  color: var(--pine);
  font-size: 11px;
  font-weight: 780;
  letter-spacing: 0.14em;
  line-height: 1.4;
  text-transform: uppercase;
}

.lead {
  max-width: 680px;
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.55;
}

.muted {
  color: var(--ink-soft);
}

.fine-print {
  color: var(--ink-faint);
  font-size: 12px;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 17px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

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

.button svg {
  width: 18px;
  height: 18px;
}

.button-primary {
  color: #fff;
  background: var(--pine-deep);
  box-shadow: 0 7px 18px rgba(47, 76, 61, 0.17);
}

.button-primary:hover:not(:disabled) {
  background: #263f33;
  box-shadow: 0 10px 22px rgba(47, 76, 61, 0.22);
}

.button-secondary {
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 2px 8px rgba(40, 49, 43, 0.04);
}

.button-secondary:hover:not(:disabled) {
  border-color: var(--line-strong);
}

.button-quiet {
  min-height: 38px;
  padding: 0 11px;
  color: var(--pine);
  background: transparent;
}

.button-quiet:hover:not(:disabled) {
  background: var(--pine-soft);
}

.button-danger {
  color: var(--danger);
  background: var(--danger-soft);
}

.button-sm {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 12px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 36px;
  margin-bottom: 58px;
}

.home-hero h1 {
  max-width: 760px;
}

.home-create {
  margin-bottom: 7px;
}

.home-create .button {
  min-height: 52px;
  padding: 0 21px;
}

.section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.section-header h2 {
  margin-bottom: 0;
  font-size: clamp(27px, 3.5vw, 40px);
}

.section-header.compact h2 {
  font-size: 29px;
}

.section-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}

.filters {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) repeat(2, minmax(150px, 190px));
  gap: 10px;
  margin-bottom: 20px;
}

.filters.expanded {
  grid-template-columns: minmax(220px, 1.4fr) repeat(4, minmax(130px, 0.7fr));
}

.filter-field {
  position: relative;
}

.filter-field svg {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 14px;
  width: 17px;
  height: 17px;
  color: var(--ink-faint);
  transform: translateY(-50%);
  pointer-events: none;
}

.filter-control {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  color: var(--ink);
  background: rgba(255, 253, 249, 0.82);
  border: 1px solid var(--line);
  border-radius: 12px;
  appearance: none;
}

.filter-field.has-icon .filter-control {
  padding-left: 42px;
}

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

.meeting-card {
  position: relative;
  display: grid;
  min-height: 112px;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  padding: 18px 20px 18px 16px;
  color: var(--ink);
  background: rgba(255, 253, 249, 0.86);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 2px 9px rgba(40, 49, 43, 0.035);
  text-align: left;
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
}

.meeting-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.meeting-card-main {
  min-width: 0;
  cursor: pointer;
}

.date-tile {
  display: grid;
  width: 76px;
  min-height: 76px;
  align-content: center;
  justify-items: center;
  color: var(--pine-deep);
  background: var(--pine-soft);
  border-radius: 13px 13px 13px 5px;
  line-height: 1;
}

.date-tile span {
  margin-bottom: 5px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.date-tile strong {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 500;
}

.date-tile small {
  margin-top: 4px;
  font-size: 10px;
  font-weight: 700;
}

.meeting-card h3 {
  overflow: hidden;
  margin-bottom: 8px;
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meeting-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 14px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.meeting-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.meeting-meta svg {
  width: 14px;
  height: 14px;
}

.meeting-card-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.status-badge {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  color: var(--ink-soft);
  background: var(--canvas-deep);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 780;
  letter-spacing: 0.035em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-badge::before {
  width: 6px;
  height: 6px;
  background: currentColor;
  border-radius: 50%;
  content: "";
}

.status-badge.status-draft,
.status-badge.status-missing {
  color: var(--gold);
  background: var(--gold-soft);
}

.status-badge.status-processing {
  color: var(--pine);
  background: var(--pine-soft);
}

.status-badge.status-processing::before {
  animation: breathe 1.2s ease-in-out infinite;
}

.status-badge.status-choice {
  color: #765681;
  background: #ece2ef;
}

.status-badge.status-ready,
.status-badge.status-final {
  color: var(--pine-deep);
  background: #d9e9de;
}

.status-badge.status-review {
  color: var(--clay);
  background: var(--clay-soft);
}

.status-badge.status-error {
  color: var(--danger);
  background: var(--danger-soft);
}

.status-badge.status-archived {
  color: #6f7471;
  background: #e4e5e3;
}

.empty-state {
  display: grid;
  min-height: 310px;
  place-items: center;
  padding: 52px 24px;
  background: rgba(255, 253, 249, 0.56);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  text-align: center;
}

.empty-state-inner {
  max-width: 420px;
}

.empty-mark {
  display: grid;
  width: 58px;
  height: 58px;
  margin: 0 auto 20px;
  place-items: center;
  color: var(--pine);
  background: var(--pine-soft);
  border-radius: 18px 18px 18px 7px;
}

.empty-mark svg {
  width: 26px;
  height: 26px;
}

.empty-state h2 {
  margin-bottom: 8px;
  font-size: 29px;
}

.empty-state p {
  margin-bottom: 22px;
  color: var(--ink-soft);
}

.page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 36px;
}

.page-heading-copy {
  min-width: 0;
}

.page-heading h1 {
  max-width: 820px;
  font-size: clamp(38px, 5vw, 58px);
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 22px;
  padding: 0;
  color: var(--ink-soft);
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
}

.back-button:hover {
  color: var(--pine);
}

.back-button svg {
  width: 16px;
  height: 16px;
}

.editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  align-items: start;
  gap: 28px;
}

.editor-main {
  display: grid;
  min-width: 0;
  gap: 18px;
}

.editor-aside {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 14px;
}

.aside-card {
  padding: 18px;
  background: rgba(255, 253, 249, 0.74);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.aside-card h3 {
  font-size: 14px;
}

.aside-card p {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.editor-steps {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.editor-steps li {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 650;
}

.editor-steps li::before {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  color: var(--ink-faint);
  background: var(--canvas-deep);
  border-radius: 50%;
  content: "";
  font-size: 10px;
}

.editor-steps li.is-complete {
  color: var(--pine-deep);
}

.editor-steps li.is-complete::before {
  color: #fff;
  background: var(--pine);
  content: "✓";
}

.form-card,
.content-card {
  padding: clamp(22px, 3vw, 34px);
  background: rgba(255, 253, 249, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 3px 14px rgba(40, 49, 43, 0.035);
}

.form-card-head,
.content-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 24px;
}

.form-card-head h2,
.content-card-head h2 {
  margin-bottom: 6px;
  font-size: 29px;
}

.form-card-head p,
.content-card-head p {
  max-width: 620px;
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.form-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.field.full {
  grid-column: 1 / -1;
}

.field > span:first-child,
.field-label {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 720;
}

.field small {
  color: var(--ink-faint);
  font-size: 11px;
}

.field input,
.field select,
.field textarea,
.table-input,
.inline-input,
.script-textarea {
  width: 100%;
  color: var(--ink);
  background: #fffefa;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: 0;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.field input,
.field select,
.inline-input {
  min-height: 44px;
  padding: 0 12px;
}

.field textarea {
  min-height: 132px;
  padding: 12px;
  line-height: 1.55;
  resize: vertical;
}

.field textarea.tall {
  min-height: 210px;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.table-input:focus,
.inline-input:focus,
.script-textarea:focus {
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(65, 100, 81, 0.11);
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.choice-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.choice-card {
  position: relative;
  display: grid;
  min-height: 92px;
  align-content: start;
  gap: 5px;
  padding: 15px;
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: 13px;
  cursor: pointer;
}

.choice-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice-card strong {
  font-size: 13px;
}

.choice-card small {
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.4;
}

.choice-card:has(input:checked) {
  background: var(--pine-soft);
  border-color: var(--pine);
  box-shadow: inset 0 0 0 1px var(--pine);
}

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

.transcript-card {
  padding: 18px;
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.transcript-head {
  display: grid;
  grid-template-columns: minmax(180px, 0.85fr) minmax(180px, 1.15fr) auto;
  align-items: end;
  gap: 11px;
  margin-bottom: 12px;
}

.transcript-card textarea {
  min-height: 180px;
  background: #fff;
}

.capture-dropzone {
  position: relative;
  display: grid;
  min-height: 220px;
  place-items: center;
  padding: 36px 24px;
  color: var(--ink-soft);
  background:
    linear-gradient(135deg, rgba(223, 232, 225, 0.48), rgba(255, 253, 249, 0.7));
  border: 1.5px dashed var(--sage);
  border-radius: var(--radius);
  text-align: center;
  transition: background 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.capture-dropzone.is-dragging {
  background: var(--pine-soft);
  border-color: var(--pine-deep);
  transform: scale(1.005);
}

.capture-dropzone-inner {
  max-width: 460px;
}

.capture-dropzone .drop-icon {
  display: grid;
  width: 54px;
  height: 54px;
  margin: 0 auto 16px;
  place-items: center;
  color: var(--pine);
  background: rgba(255, 255, 255, 0.72);
  border-radius: 17px;
}

.capture-dropzone .drop-icon svg {
  width: 25px;
  height: 25px;
}

.capture-dropzone strong {
  display: block;
  margin-bottom: 7px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
}

.capture-dropzone p {
  margin-bottom: 16px;
  font-size: 13px;
}

.capture-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 17px;
}

.capture-card {
  overflow: hidden;
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: 13px;
}

.capture-preview {
  display: grid;
  width: 100%;
  height: 142px;
  padding: 0;
  place-items: center;
  overflow: hidden;
  background: #e9e8e3;
  cursor: zoom-in;
}

.capture-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 180ms ease;
}

.capture-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 8px;
}

.capture-index {
  padding-left: 4px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
}

.capture-tools {
  display: flex;
  gap: 2px;
}

.sticky-submit {
  position: sticky;
  z-index: 20;
  bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
  background: rgba(255, 253, 249, 0.9);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.sticky-submit p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.tabs-wrap {
  position: sticky;
  z-index: 24;
  top: 72px;
  margin: 0 calc((100vw - min(calc(100vw - 40px), var(--content))) / -2) 30px;
  padding: 0 max(20px, calc((100vw - var(--content)) / 2));
  overflow: hidden;
  background: rgba(244, 241, 235, 0.91);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.tabs {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab-button {
  position: relative;
  min-height: 53px;
  padding: 0 13px;
  flex: 0 0 auto;
  color: var(--ink-soft);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 690;
  white-space: nowrap;
}

.tab-button::after {
  position: absolute;
  right: 11px;
  bottom: 0;
  left: 11px;
  height: 2px;
  background: transparent;
  border-radius: 2px 2px 0 0;
  content: "";
}

.tab-button:hover,
.tab-button.is-active {
  color: var(--ink);
}

.tab-button.is-active::after {
  background: var(--pine);
}

.result-stack {
  display: grid;
  gap: 18px;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.overview-card {
  min-height: 155px;
  padding: 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.overview-card.featured {
  color: #fff;
  background: var(--pine-deep);
  border-color: var(--pine-deep);
}

.overview-card .eyebrow {
  color: inherit;
  opacity: 0.72;
}

.overview-card h3 {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
}

.overview-card p:last-child {
  margin-bottom: 0;
  color: inherit;
  opacity: 0.74;
  font-size: 13px;
}

.summary-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.summary-stat {
  min-height: 102px;
  padding: 20px;
  background: var(--paper);
}

.summary-stat span {
  display: block;
  margin-bottom: 7px;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.summary-stat strong {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
}

.alert-list,
.source-list,
.version-list,
.correction-list,
.script-section-list,
.metaphor-grid,
.processing-steps {
  display: grid;
  gap: 12px;
}

.alert-card {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 12px;
  padding: 16px;
  color: #73583a;
  background: var(--gold-soft);
  border: 1px solid #dfcea9;
  border-radius: 13px;
}

.alert-card.error {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: #e6c3bf;
}

.alert-card svg {
  width: 21px;
  height: 21px;
}

.alert-card h3 {
  margin-bottom: 4px;
  font-size: 13px;
}

.alert-card p {
  margin-bottom: 0;
  color: inherit;
  font-size: 12px;
  opacity: 0.85;
}

.processing-shell {
  max-width: 820px;
  margin: 0 auto;
}

.processing-intro {
  margin-bottom: 36px;
  text-align: center;
}

.processing-orbit {
  position: relative;
  display: grid;
  width: 82px;
  height: 82px;
  margin: 0 auto 25px;
  place-items: center;
  color: var(--pine);
  background: var(--pine-soft);
  border-radius: 50%;
}

.processing-orbit::before {
  position: absolute;
  inset: -6px;
  border: 1px solid rgba(65, 100, 81, 0.24);
  border-top-color: var(--pine);
  border-radius: 50%;
  content: "";
  animation: spin 2.2s linear infinite;
}

.processing-orbit svg {
  width: 34px;
  height: 34px;
}

.processing-intro h1 {
  font-size: clamp(37px, 5vw, 54px);
}

.processing-intro p {
  max-width: 560px;
  margin-right: auto;
  margin-bottom: 0;
  margin-left: auto;
  color: var(--ink-soft);
}

.processing-step {
  display: grid;
  min-height: 72px;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 13px 17px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 13px;
}

.step-indicator {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: var(--ink-faint);
  background: var(--canvas-deep);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 750;
}

.processing-step.is-running {
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(65, 100, 81, 0.07);
}

.processing-step.is-running .step-indicator {
  color: var(--pine);
  background: var(--pine-soft);
}

.processing-step.is-running .step-indicator::after {
  width: 9px;
  height: 9px;
  background: var(--pine);
  border-radius: 50%;
  content: "";
  animation: breathe 1.1s ease-in-out infinite;
}

.processing-step.is-completed .step-indicator {
  color: #fff;
  background: var(--pine);
}

.processing-step.is-attention .step-indicator {
  color: var(--gold);
  background: var(--gold-soft);
}

.processing-step.is-error .step-indicator {
  color: var(--danger);
  background: var(--danger-soft);
}

.processing-step h3 {
  margin-bottom: 2px;
  font-size: 13px;
}

.processing-step p {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 11px;
}

.step-state {
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.processing-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 25px;
}

.data-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 13px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.data-table th,
.data-table td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.data-table th {
  color: var(--ink-soft);
  background: var(--paper-soft);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.data-table td.actions-cell {
  width: 42px;
  text-align: right;
}

.table-input {
  min-width: 90px;
  min-height: 36px;
  padding: 6px 8px;
  border-color: transparent;
  border-radius: 8px;
}

.table-input:hover,
.table-input:focus {
  border-color: var(--line);
}

.confidence {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 11px;
  white-space: nowrap;
}

.confidence-bar {
  width: 42px;
  height: 5px;
  overflow: hidden;
  background: var(--canvas-deep);
  border-radius: 999px;
}

.confidence-bar span {
  display: block;
  height: 100%;
  background: var(--pine);
  border-radius: inherit;
}

.confidence.is-low .confidence-bar span {
  background: var(--clay);
}

.ocr-thumb {
  display: grid;
  width: 48px;
  height: 38px;
  padding: 0;
  place-items: center;
  overflow: hidden;
  background: var(--canvas-deep);
  border: 1px solid var(--line);
  border-radius: 7px;
  cursor: zoom-in;
}

.ocr-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.check-control {
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.check-control input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--pine);
}

.check-control span {
  font-size: 13px;
}

.applied-summary {
  padding: 13px 15px;
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: 11px;
}

.applied-summary summary {
  cursor: pointer;
  font-weight: 700;
}

.applied-list {
  display: grid;
  gap: 8px;
  margin-top: 13px;
}

.applied-list p {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.applied-list svg,
.compact-success > svg {
  width: 20px;
  height: 20px;
  color: var(--pine);
  flex: 0 0 auto;
}

.decision-list {
  display: grid;
  gap: 11px;
}

.decision-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.7fr);
  gap: 18px;
  padding: 17px;
  background: var(--gold-soft);
  border: 1px solid #dfcea9;
  border-radius: 13px;
}

.decision-card h3,
.decision-card p {
  margin: 0;
}

.decision-card p {
  margin-top: 6px;
  color: var(--ink-muted);
}

.uncertainty-choice {
  padding: 13px;
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: 11px;
}

.compact-success {
  display: flex;
  align-items: center;
  gap: 14px;
}

.compact-success h2,
.compact-success p {
  margin: 0;
}

.compact-success p {
  margin-top: 4px;
  color: var(--ink-muted);
}

.conflict-list {
  display: grid;
  gap: 10px;
}

.conflict-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 0.65fr);
  gap: 18px;
  padding: 17px;
  background: var(--gold-soft);
  border: 1px solid #dfcea9;
  border-radius: 13px;
}

.conflict-card h3 {
  margin-bottom: 5px;
  font-size: 13px;
}

.conflict-card p {
  margin-bottom: 0;
  color: #73583a;
  font-size: 12px;
}

.metaphor-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.metaphor-card {
  position: relative;
  display: grid;
  min-height: 300px;
  align-content: start;
  padding: 25px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
}

.metaphor-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.metaphor-card.is-selected {
  background: linear-gradient(145deg, #f6faf7, var(--paper));
  border-color: var(--pine);
  box-shadow: inset 0 0 0 1px var(--pine), var(--shadow-soft);
}

.metaphor-number {
  display: grid;
  width: 35px;
  height: 35px;
  margin-bottom: 19px;
  place-items: center;
  color: var(--pine);
  background: var(--pine-soft);
  border-radius: 11px 11px 11px 4px;
  font-family: var(--serif);
  font-size: 18px;
}

.metaphor-card h3 {
  margin-bottom: 8px;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
}

.metaphor-card > p {
  color: var(--ink-soft);
  font-size: 13px;
}

.metaphor-detail {
  display: grid;
  gap: 9px;
  margin: 6px 0 20px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.metaphor-detail p {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 11px;
}

.metaphor-detail strong {
  color: var(--ink);
}

.metaphor-card .button {
  align-self: end;
  justify-self: start;
  margin-top: auto;
}

.script-section {
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.script-section.is-locked {
  border-color: #c7d6ca;
  box-shadow: inset 4px 0 0 var(--pine);
}

.script-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 17px;
  background: var(--paper-soft);
  border-bottom: 1px solid var(--line);
}

.script-section-title {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.script-section-title time {
  color: var(--pine);
  font-size: 11px;
  font-weight: 760;
}

.script-section-title h3 {
  overflow: hidden;
  margin: 0;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.script-section-tools {
  display: flex;
  align-items: center;
  gap: 3px;
}

.script-textarea {
  display: block;
  min-height: 180px;
  padding: 20px;
  background: #fffefa;
  border: 0;
  border-radius: 0;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.65;
  resize: vertical;
}

.script-section.is-locked .script-textarea {
  color: #46534b;
  background: #fbfcfa;
}

.timeline {
  position: relative;
  display: grid;
  gap: 0;
  padding-left: 30px;
}

.timeline::before {
  position: absolute;
  top: 24px;
  bottom: 24px;
  left: 12px;
  width: 1px;
  background: var(--line-strong);
  content: "";
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) auto;
  align-items: start;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.timeline-item::before {
  position: absolute;
  top: 23px;
  left: -24px;
  width: 11px;
  height: 11px;
  background: var(--paper);
  border: 3px solid var(--pine);
  border-radius: 50%;
  content: "";
}

.timeline-item:last-child {
  border-bottom: 0;
}

.timeline-time {
  color: var(--pine-deep);
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
}

.timeline-copy h3 {
  margin-bottom: 4px;
  font-size: 14px;
}

.timeline-copy p {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.duration-pill {
  padding: 5px 8px;
  color: var(--ink-soft);
  background: var(--canvas-deep);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.notes-sheet {
  padding: clamp(26px, 5vw, 54px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.note-block {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 22px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.note-block:last-child {
  border-bottom: 0;
}

.note-block time {
  color: var(--pine);
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
}

.note-content {
  white-space: pre-wrap;
}

.note-content strong {
  display: block;
  margin-bottom: 6px;
}

.note-content p {
  margin-bottom: 0;
  color: var(--ink-soft);
}

.correction-card,
.source-card,
.version-card {
  padding: 21px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.correction-card-head,
.source-card-head,
.version-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.correction-card-head h3,
.source-card h3 {
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 500;
}

.correction-meta,
.source-meta,
.version-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 14px;
  color: var(--ink-soft);
  font-size: 11px;
}

.correction-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.correction-quote {
  grid-column: 1 / -1;
  padding: 17px;
  color: var(--pine-deep);
  background: var(--pine-soft);
  border-radius: 12px;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.55;
}

.source-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--pine);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.source-link:hover {
  text-decoration: underline;
}

.source-link svg {
  width: 14px;
  height: 14px;
}

.version-card h3 {
  margin-bottom: 5px;
  font-size: 14px;
}

.version-card p {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 11px;
}

.initial-loading,
.fatal-state {
  display: grid;
  min-height: calc(100vh - 72px);
  align-content: center;
  justify-items: center;
  padding: 40px 20px;
  text-align: center;
}

.initial-loading p {
  margin: 16px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.spinner {
  width: 29px;
  height: 29px;
  border: 2px solid var(--line-strong);
  border-top-color: var(--pine);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

.fatal-state {
  max-width: 620px;
  margin: 0 auto;
}

.fatal-icon {
  display: grid;
  width: 52px;
  height: 52px;
  margin-bottom: 20px;
  place-items: center;
  color: var(--danger);
  background: var(--danger-soft);
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 30px;
}

.fatal-state h1 {
  font-size: 46px;
}

.fatal-state p:not(.eyebrow) {
  margin-bottom: 23px;
  color: var(--ink-soft);
}

.modal-backdrop {
  position: fixed;
  z-index: 200;
  inset: 0;
  display: grid;
  padding: 22px;
  place-items: center;
  background: rgba(28, 37, 31, 0.46);
  backdrop-filter: blur(7px);
}

.modal {
  position: relative;
  width: min(100%, 540px);
  max-height: min(88vh, 760px);
  overflow: auto;
  padding: 31px;
  background: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-lg);
  box-shadow: 0 28px 80px rgba(25, 34, 28, 0.24);
}

.modal.modal-wide {
  width: min(100%, 940px);
}

.modal-close {
  position: absolute;
  z-index: 2;
  top: 13px;
  right: 13px;
}

.modal h2 {
  padding-right: 36px;
}

.modal-copy {
  margin-bottom: 24px;
  color: var(--ink-soft);
  font-size: 13px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 23px;
}

.image-modal {
  display: grid;
  max-height: 74vh;
  place-items: center;
  overflow: auto;
  background: #e9e8e3;
  border-radius: 13px;
}

.image-modal img {
  max-width: 100%;
  height: auto;
}

.toast-region {
  position: fixed;
  z-index: 300;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  display: grid;
  width: min(380px, calc(100vw - 40px));
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr);
  gap: 10px;
  padding: 13px 15px;
  color: #fff;
  background: var(--pine-deep);
  border-radius: 12px;
  box-shadow: var(--shadow);
  animation: toast-in 180ms ease-out;
  pointer-events: auto;
}

.toast.is-error {
  background: #7e3935;
}

.toast svg {
  width: 20px;
  height: 20px;
}

.toast p {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
}

.form-error {
  padding: 10px 12px;
  color: var(--danger);
  background: var(--danger-soft);
  border-radius: 9px;
  font-size: 12px;
}

.noscript {
  position: fixed;
  z-index: 999;
  inset: 0;
  display: grid;
  padding: 30px;
  place-items: center;
  color: #fff;
  background: var(--pine-deep);
  text-align: center;
}

/* Connexion */
.login-page {
  background: var(--paper);
}

.login-layout {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(0, 1.08fr) minmax(430px, 0.92fr);
}

.login-story {
  position: relative;
  display: grid;
  min-height: 100vh;
  align-items: center;
  overflow: hidden;
  padding: clamp(45px, 8vw, 120px);
  color: #f7f4ed;
  background:
    radial-gradient(circle at 18% 18%, rgba(166, 190, 172, 0.34), transparent 28rem),
    linear-gradient(145deg, #395849, #243d31);
}

.login-story::after {
  position: absolute;
  right: -16%;
  bottom: -30%;
  width: 70%;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  box-shadow:
    0 0 0 70px rgba(255, 255, 255, 0.035),
    0 0 0 140px rgba(255, 255, 255, 0.025);
  content: "";
}

.login-story-inner {
  position: relative;
  z-index: 1;
  max-width: 690px;
}

.login-brand {
  margin-bottom: clamp(70px, 13vh, 150px);
  color: #fff;
}

.login-brand .brand-mark {
  color: var(--pine-deep);
  background: #f7f4ed;
}

.login-story .eyebrow {
  color: #cad8cd;
}

.login-story h1 {
  margin-bottom: 24px;
  font-size: clamp(45px, 6.5vw, 82px);
}

.login-lead {
  max-width: 570px;
  margin-bottom: 40px;
  color: rgba(247, 244, 237, 0.72);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.58;
}

.login-motif {
  display: flex;
  align-items: center;
  gap: 8px;
}

.login-motif span {
  width: 36px;
  height: 4px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 999px;
}

.login-motif span:first-child {
  width: 70px;
  background: #cedbcf;
}

.login-panel {
  display: grid;
  min-height: 100vh;
  align-items: center;
  padding: clamp(34px, 7vw, 100px);
  background:
    radial-gradient(circle at 86% 8%, rgba(241, 223, 214, 0.48), transparent 24rem),
    var(--paper);
}

.login-card {
  width: min(100%, 430px);
  margin: 0 auto;
}

.login-card h2 {
  margin-bottom: 11px;
  font-size: clamp(34px, 4vw, 46px);
}

.login-card-intro {
  margin-bottom: 32px;
  color: var(--ink-soft);
  font-size: 14px;
}

.login-form {
  display: grid;
  gap: 18px;
}

.password-wrap {
  position: relative;
  display: block;
}

.password-wrap input {
  padding-right: 84px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  padding: 5px 7px;
  color: var(--pine);
  background: transparent;
  border-radius: 7px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  transform: translateY(-50%);
}

.password-toggle:hover {
  background: var(--pine-soft);
}

.login-button {
  min-height: 51px;
  justify-content: space-between;
  margin-top: 4px;
  padding: 0 19px;
}

.login-security {
  margin: 24px 0 0;
  color: var(--ink-faint);
  font-size: 11px;
  text-align: center;
}

/* Mode président */
body.presenter-mode {
  overflow: hidden;
  background: #f4f0e8;
}

body.presenter-mode .topbar {
  display: none;
}

body.presenter-mode #main-content {
  min-height: 100vh;
}

.presenter {
  --presenter-scale: 1;
  display: grid;
  min-height: 100vh;
  grid-template-rows: auto 1fr auto;
  color: #1f2923;
  background:
    radial-gradient(circle at 8% 2%, rgba(255, 255, 255, 0.86), transparent 35rem),
    #f4f0e8;
  font-size: calc(16px * var(--presenter-scale));
}

.presenter.is-dark {
  color: #edf0ec;
  background:
    radial-gradient(circle at 8% 2%, rgba(88, 118, 96, 0.19), transparent 38rem),
    #17211b;
  color-scheme: dark;
}

.presenter-topbar {
  display: grid;
  min-height: 72px;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 15px;
  padding: 10px max(18px, env(safe-area-inset-left));
  border-bottom: 1px solid rgba(110, 121, 113, 0.24);
}

.presenter-title {
  font-family: var(--serif);
  font-size: calc(20px * var(--presenter-scale));
  font-weight: 600;
}

.presenter-clock {
  font-family: var(--serif);
  font-size: calc(30px * var(--presenter-scale));
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.presenter-controls {
  display: flex;
  justify-content: flex-end;
  gap: 3px;
}

.presenter .icon-button {
  color: inherit;
}

.presenter .icon-button:hover {
  background: rgba(128, 145, 133, 0.14);
}

.presenter-body {
  display: grid;
  min-height: 0;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: clamp(24px, 4vw, 58px);
  padding: clamp(28px, 5vw, 70px) max(24px, 6vw);
  overflow: auto;
}

.presenter-current {
  display: grid;
  align-content: center;
}

.presenter-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  color: var(--sage);
  font-size: calc(11px * var(--presenter-scale));
  font-weight: 780;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.presenter-kicker::before {
  width: 28px;
  height: 2px;
  background: currentColor;
  content: "";
}

.presenter-current h1 {
  max-width: 900px;
  margin-bottom: 18px;
  font-size: calc(clamp(43px, 6.5vw, 88px) * var(--presenter-scale));
}

.presenter-person {
  margin-bottom: 22px;
  color: var(--pine);
  font-size: calc(18px * var(--presenter-scale));
  font-weight: 650;
}

.is-dark .presenter-person {
  color: #a9c5b0;
}

.presenter-notes {
  max-width: 880px;
  white-space: pre-wrap;
  font-size: calc(19px * var(--presenter-scale));
  line-height: 1.65;
}

.presenter-notes ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 22px;
}

.presenter-side {
  display: grid;
  align-content: center;
  gap: 14px;
}

.presenter-panel {
  padding: 22px;
  background: rgba(255, 253, 249, 0.64);
  border: 1px solid rgba(115, 125, 118, 0.22);
  border-radius: 18px;
}

.is-dark .presenter-panel {
  background: rgba(255, 255, 255, 0.045);
}

.presenter-panel .eyebrow {
  color: var(--sage);
}

.presenter-panel h2 {
  font-size: calc(28px * var(--presenter-scale));
}

.presenter-panel p {
  margin-bottom: 0;
  color: inherit;
  font-size: calc(13px * var(--presenter-scale));
  opacity: 0.72;
}

.timing-readout {
  display: inline-flex;
  margin-top: 12px;
  padding: 6px 10px;
  color: var(--pine-deep);
  background: var(--pine-soft);
  border-radius: 999px;
  font-size: calc(10px * var(--presenter-scale));
  font-weight: 780;
}

.is-dark .timing-readout {
  color: #b8d0bd;
  background: rgba(108, 151, 119, 0.16);
}

.presenter-script details {
  font-size: calc(13px * var(--presenter-scale));
}

.presenter-script summary {
  cursor: pointer;
  font-weight: 720;
}

.presenter-script-text {
  max-height: 260px;
  margin-top: 14px;
  overflow: auto;
  white-space: pre-wrap;
  line-height: 1.6;
}

.presenter-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 13px max(18px, env(safe-area-inset-left)) max(13px, env(safe-area-inset-bottom));
  border-top: 1px solid rgba(110, 121, 113, 0.24);
}

.presenter-progress {
  color: inherit;
  font-size: calc(11px * var(--presenter-scale));
  opacity: 0.62;
}

.presenter-nav {
  display: flex;
  gap: 9px;
}

.presenter-nav .button {
  min-width: 135px;
}

.presenter-shortcuts {
  justify-self: end;
  color: inherit;
  font-size: calc(10px * var(--presenter-scale));
  opacity: 0.5;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes breathe {
  0%, 100% { opacity: 0.46; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.08); }
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1050px) {
  .filters.expanded {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .filters.expanded .filter-field:first-child {
    grid-column: span 2;
  }

  .editor-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .editor-aside {
    position: static;
    grid-row: 1;
    grid-template-columns: 1fr 1fr;
  }

  .presenter-body {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.55fr);
  }
}

@media (max-width: 820px) {
  .topbar {
    min-height: 64px;
    grid-template-columns: 1fr auto;
    padding: 0 15px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    font-size: 19px;
  }

  .brand-copy small,
  .topbar-center,
  .save-indicator span:last-child {
    display: none;
  }

  #main-content {
    min-height: calc(100vh - 64px);
  }

  .page-shell {
    width: min(calc(100% - 28px), var(--content));
    padding-top: 38px;
  }

  .home-hero {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 24px;
    margin-bottom: 43px;
  }

  .home-create {
    margin: 0;
  }

  .filters,
  .filters.expanded {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filters .filter-field:first-child,
  .filters.expanded .filter-field:first-child {
    grid-column: 1 / -1;
  }

  .meeting-card {
    grid-template-columns: 70px minmax(0, 1fr) auto;
    gap: 14px;
    padding: 14px 12px;
  }

  .date-tile {
    width: 64px;
    min-height: 70px;
  }

  .meeting-card-actions .icon-button:not(:last-child) {
    display: none;
  }

  .form-grid.three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .choice-grid {
    grid-template-columns: 1fr;
  }

  .tabs-wrap {
    top: 64px;
    margin-right: -14px;
    margin-left: -14px;
    padding: 0 14px;
  }

  .overview-grid {
    grid-template-columns: 1fr 1fr;
  }

  .overview-card.featured {
    grid-column: 1 / -1;
  }

  .summary-band {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metaphor-grid {
    grid-template-columns: 1fr;
  }

  .presenter-body {
    grid-template-columns: 1fr;
    align-content: start;
  }

  .presenter-current {
    align-content: start;
  }

  .presenter-footer {
    grid-template-columns: 1fr auto;
  }

  .presenter-shortcuts {
    display: none;
  }

  .login-layout {
    grid-template-columns: 1fr;
  }

  .login-story {
    min-height: auto;
    padding: 42px 28px 52px;
  }

  .login-brand {
    margin-bottom: 60px;
  }

  .login-story h1 {
    font-size: clamp(42px, 11vw, 64px);
  }

  .login-panel {
    min-height: auto;
    padding: 52px 28px 65px;
  }
}

@media (max-width: 600px) {
  h1,
  .editorial-title {
    font-size: 42px;
  }

  .brand-copy strong {
    font-size: 15px;
  }

  .page-heading {
    display: grid;
    gap: 18px;
  }

  .page-heading .section-actions {
    justify-content: flex-start;
  }

  .section-header {
    display: grid;
    align-items: start;
  }

  .section-actions {
    justify-content: flex-start;
  }

  .filters,
  .filters.expanded {
    grid-template-columns: 1fr;
  }

  .filters .filter-field:first-child,
  .filters.expanded .filter-field:first-child {
    grid-column: auto;
  }

  .meeting-card {
    grid-template-columns: 58px minmax(0, 1fr) auto;
    min-height: 96px;
    gap: 11px;
  }

  .date-tile {
    width: 55px;
    min-height: 64px;
  }

  .date-tile strong {
    font-size: 25px;
  }

  .meeting-card h3 {
    margin-bottom: 6px;
    font-size: 19px;
  }

  .meeting-meta .secondary-meta,
  .meeting-card .status-badge {
    display: none;
  }

  .form-card,
  .content-card {
    padding: 20px 16px;
    border-radius: var(--radius);
  }

  .form-card-head,
  .content-card-head {
    display: grid;
  }

  .form-grid,
  .form-grid.three,
  .choice-grid.two {
    grid-template-columns: 1fr;
  }

  .field.full {
    grid-column: auto;
  }

  .transcript-head {
    grid-template-columns: 1fr auto;
  }

  .transcript-head .field:first-child {
    grid-column: 1 / -1;
  }

  .capture-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .capture-preview {
    height: 120px;
  }

  .editor-aside {
    grid-template-columns: 1fr;
  }

  .editor-aside .aside-card:last-child {
    display: none;
  }

  .sticky-submit {
    bottom: 10px;
    display: grid;
  }

  .sticky-submit .button {
    width: 100%;
  }

  .overview-grid,
  .summary-band,
  .correction-grid {
    grid-template-columns: 1fr;
  }

  .overview-card.featured,
  .correction-quote {
    grid-column: auto;
  }

  .conflict-card,
  .decision-card {
    grid-template-columns: 1fr;
  }

  .timeline-item {
    grid-template-columns: 62px minmax(0, 1fr);
  }

  .timeline-item .duration-pill {
    display: none;
  }

  .note-block {
    grid-template-columns: 60px minmax(0, 1fr);
    gap: 14px;
  }

  .correction-card-head,
  .source-card-head,
  .version-card {
    display: grid;
  }

  .modal-backdrop {
    align-items: end;
    padding: 0;
  }

  .modal {
    width: 100%;
    max-height: 92vh;
    padding: 27px 20px max(27px, env(safe-area-inset-bottom));
    border-radius: 22px 22px 0 0;
  }

  .presenter-topbar {
    grid-template-columns: 1fr auto;
  }

  .presenter-clock {
    grid-column: 2;
    grid-row: 1;
  }

  .presenter-controls {
    grid-column: 1 / -1;
    justify-content: flex-start;
    border-top: 1px solid rgba(110, 121, 113, 0.2);
    padding-top: 7px;
  }

  .presenter-body {
    gap: 26px;
    padding: 28px 20px;
  }

  .presenter-current h1 {
    font-size: calc(43px * var(--presenter-scale));
  }

  .presenter-footer {
    display: grid;
    grid-template-columns: 1fr;
  }

  .presenter-progress {
    text-align: center;
  }

  .presenter-nav {
    width: 100%;
  }

  .presenter-nav .button {
    min-width: 0;
    flex: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .topbar,
  .tabs-wrap,
  .button,
  .icon-button,
  .sticky-submit {
    display: none !important;
  }

  body,
  .page-shell,
  .content-card,
  .notes-sheet {
    color: #000;
    background: #fff;
    border: 0;
    box-shadow: none;
  }

  .page-shell {
    width: 100%;
    padding: 0;
  }
}
