/* ─────────────────────────────────────────────────────────────────────────────
   SermonScribe — glassmorphism cards over a warm, quiet gradient.
   Mobile-first: every rule below is the phone layout unless it sits inside a
   media query. Moyosore does this on her phone on a Sunday night.
   ──────────────────────────────────────────────────────────────────────────── */

:root {
  --bg-deep:      #1a1430;
  --bg-mid:       #2b1f47;
  --bg-warm:      #3b2545;

  --glass:        rgba(255, 255, 255, 0.07);
  --glass-strong: rgba(255, 255, 255, 0.11);
  --glass-border: rgba(255, 255, 255, 0.16);

  --ink:          #f4f0ff;
  --ink-soft:     rgba(244, 240, 255, 0.72);
  --ink-faint:    rgba(244, 240, 255, 0.48);

  --gold:         #e8c98a;
  --gold-deep:    #c9a45f;
  --amber:        #f0b45e;
  --sage:         #9fd6b4;

  --radius:       20px;
  --radius-sm:    12px;
  --pad:          20px;

  --font-display: 'Fraunces', Georgia, serif;
  --font-wordmark: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

/* The hidden attribute must win.
   `.results { display: flex }` is an author rule and beats the user-agent's
   `[hidden] { display: none }`, so the loading skeletons stayed on screen
   forever — three grey boxes under the last card that looked like output that
   had failed to render. Any element with `hidden` is now genuinely hidden. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  padding: 28px 16px 56px;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 17px;             /* medium-large body text, per the house style */
  line-height: 1.6;
  color: var(--ink);
  background:
    radial-gradient(1100px 700px at 15% -5%,  rgba(232, 201, 138, 0.16), transparent 60%),
    radial-gradient(900px 700px at 95% 10%,  rgba(159, 214, 180, 0.10), transparent 55%),
    linear-gradient(160deg, var(--bg-deep) 0%, var(--bg-mid) 55%, var(--bg-warm) 100%);
  background-attachment: fixed;
}

/* ── Page furniture ───────────────────────────────────────────────────────── */

.page-title {
  margin: 0 auto 4px;
  max-width: 780px;
  font-family: var(--font-display);
  font-size: clamp(2rem, 8vw, 2.9rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  text-align: center;
}

.page-tagline {
  margin: 0 auto 28px;
  max-width: 520px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 1rem;
}

.container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 780px;
  margin: 0 auto;
}

.page-footer {
  max-width: 780px;
  margin: 40px auto 0;
  text-align: center;
}

.notice {
  margin: 0 0 10px;
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--ink-faint);
}
.notice:empty { display: none; }

.copyline {
  margin: 22px 0 0;
  font-size: 0.85rem;
  color: var(--ink-faint);
}

/* ── Glass cards ──────────────────────────────────────────────────────────── */

.glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.22);
}

.card { padding: var(--pad); }

.card__title {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.card__hint {
  margin: 0 0 16px;
  font-size: 0.87rem;
  color: var(--ink-soft);
}

/* A card whose content broke a house rule gets an amber edge and a note.
   It is never auto-truncated — cutting is Moyosore's call, not the app's. */
.card--flagged { border-left: 3px solid var(--amber); }

/* ── Input ────────────────────────────────────────────────────────────────── */

.transcript,
.output-text {
  width: 100%;
  padding: 14px;
  font-family: var(--font-body);
  font-size: 16px;             /* 16px minimum stops iOS zooming on focus */
  line-height: 1.6;
  color: var(--ink);
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  resize: vertical;            /* the resize handle, deliberately left on */
}
.transcript::placeholder, .output-text::placeholder { color: var(--ink-faint); }
.transcript:focus-visible, .output-text:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-color: transparent;
}

.input-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 8px 0 18px;
}

.counter { font-size: 0.8rem; color: var(--ink-faint); }

.link-button {
  padding: 0;
  font: inherit;
  font-size: 0.85rem;
  color: var(--gold);
  background: none;
  border: 0;
  border-bottom: 1px solid rgba(232, 201, 138, 0.4);
  cursor: pointer;
}
.link-button:hover { border-bottom-color: var(--gold); }

/* ── Segmented control (three mutually exclusive options, all visible) ────── */

.segmented { margin: 0 0 18px; padding: 0; border: 0; }

.segmented__legend {
  padding: 0 0 8px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
}

.segmented__track {
  display: grid;
  /* Sized by however many translations are actually offered, so removing one
     does not leave a gap. */
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
}

.segmented__option { position: relative; }
.segmented__option input {
  position: absolute;
  opacity: 0;
  width: 100%; height: 100%;
  margin: 0;
  cursor: pointer;
}
.segmented__option span {
  display: block;
  padding: 9px 4px;
  text-align: center;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-soft);
  border-radius: 9px;
  transition: background 0.15s ease, color 0.15s ease;
}
.segmented__option input:checked + span {
  color: #241a3a;
  background: var(--gold);
  font-weight: 600;
}
.segmented__option input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.segmented__option input:disabled + span { opacity: 0.38; cursor: not-allowed; }

.segmented__note { margin: 8px 0 0; font-size: 0.78rem; color: var(--ink-faint); }

/* ── Buttons ──────────────────────────────────────────────────────────────── */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  font: inherit;
  font-weight: 600;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.15s ease;
}
.button:active { transform: translateY(1px); }
.button:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.button--primary {
  width: 100%;
  color: #241a3a;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-deep) 100%);
}
.button--primary:hover { filter: brightness(1.06); }
.button--primary:disabled { opacity: 0.55; cursor: progress; }

.button--ghost {
  padding: 7px 13px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink-soft);
  background: var(--glass-strong);
  border-color: var(--glass-border);
}
.button--ghost:hover { color: var(--ink); background: rgba(255, 255, 255, 0.16); }

.status { margin: 12px 0 0; min-height: 1.2em; font-size: 0.87rem; color: var(--ink-soft); }
.status--error { color: var(--amber); }

/* ── Scripture list ───────────────────────────────────────────────────────── */

.scripture-list { display: flex; flex-direction: column; gap: 10px; }

.verse {
  padding: 14px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
}
.verse--anchor { border-color: var(--gold); background: rgba(232, 201, 138, 0.09); }
.verse--pending { opacity: 0.5; }

.verse__head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}
.verse__ref { font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; }

.verse__translations {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin: 10px 0;
}

.translation-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 7px 10px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--glass-border);
  border-radius: 9px;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
}
.translation-toggle:hover:not(:disabled) { border-color: var(--gold); color: var(--ink); }
.translation-toggle:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.translation-toggle.is-selected {
  color: #241a3a;
  background: var(--gold);
  border-color: var(--gold);
}
.translation-toggle.is-loading { cursor: progress; opacity: 0.7; }
.translation-toggle:disabled { cursor: not-allowed; opacity: 0.38; }
.translation-toggle small {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  color: var(--gold);
  background: #241a3a;
  border-radius: 50%;
  font-size: 0.65rem;
  letter-spacing: 0;
}

.verse__versions { display: grid; gap: 8px; }
.verse__version {
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
}
.verse__version-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
  color: var(--ink-faint);
  font-size: 0.72rem;
}

.verse__evidence {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--glass-border);
}
.verse__evidence summary {
  width: fit-content;
  color: var(--sage);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}
.verse__evidence summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.verse__evidence-note {
  margin: 10px 0 8px;
  color: var(--ink-faint);
  font-size: 0.74rem;
  line-height: 1.5;
}
.verse__excerpt {
  margin: 8px 0 0;
  padding: 10px 12px;
  background: rgba(159, 214, 180, 0.08);
  border-left: 3px solid var(--sage);
  border-radius: 0 8px 8px 0;
}
.verse__excerpt p { margin: 0; color: var(--ink-soft); font-size: 0.82rem; line-height: 1.55; }
.verse__excerpt cite {
  display: block;
  margin-top: 6px;
  color: var(--ink-faint);
  font-size: 0.69rem;
  font-style: normal;
}

.pill {
  padding: 2px 9px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  color: var(--ink-soft);
}
.pill--gold  { background: rgba(232, 201, 138, 0.22); color: var(--gold); }
.pill--sage  { background: rgba(159, 214, 180, 0.18); color: var(--sage); }

.verse__text { margin: 0; font-size: 0.95rem; line-height: 1.65; color: var(--ink-soft); }
.verse__reason { margin: 8px 0 0; font-size: 0.82rem; color: var(--gold); }

.alert {
  margin-top: 14px;
  padding: 12px 14px;
  font-size: 0.84rem;
  line-height: 1.55;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.2);
  color: var(--ink-soft);
}
.alert--warn { border-color: rgba(240, 180, 94, 0.45); background: rgba(240, 180, 94, 0.10); }
.alert strong { color: var(--ink); }

/* ── Output cards ─────────────────────────────────────────────────────────── */

.results { display: flex; flex-direction: column; gap: 20px; }

.content-pack {
  position: relative;
  overflow: hidden;
  border-color: rgba(232, 201, 138, 0.52);
}
.content-pack::after {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 190px;
  height: 190px;
  border: 1px solid rgba(232, 201, 138, 0.3);
  border-radius: 50%;
  pointer-events: none;
}
.content-pack__eyebrow {
  margin: 0 0 7px;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}
.content-pack__button { position: relative; margin-top: 18px; }
.content-pack__status {
  min-height: 1.25em;
  margin: 9px 0 0;
  color: var(--ink-faint);
  font-size: 0.76rem;
  line-height: 1.45;
}

.output-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.output-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 0;
  font-size: 0.78rem;
  color: var(--ink-faint);
}

.output-warning { margin: 10px 0 0; font-size: 0.8rem; color: var(--amber); }

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--ink-soft);
  cursor: pointer;
}
.toggle input { width: 16px; height: 16px; accent-color: var(--gold); }

/* ── Skeletons (layout is known, so show its shape rather than a spinner) ─── */

.skeleton-card { display: flex; flex-direction: column; gap: 12px; }
.sk {
  height: 13px;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(255,255,255,0.07) 25%, rgba(255,255,255,0.14) 50%, rgba(255,255,255,0.07) 75%);
  background-size: 220% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}
.sk--title { height: 19px; width: 42%; }
.sk--short { width: 62%; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ── Toast ────────────────────────────────────────────────────────────────── */

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 20px);
  padding: 11px 20px;
  font-size: 0.88rem;
  font-weight: 500;
  color: #241a3a;
  background: var(--gold);
  border-radius: 999px;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast--show { opacity: 1; transform: translate(-50%, 0); }

/* ── Desktop ──────────────────────────────────────────────────────────────── */

@media (min-width: 720px) {
  body { padding: 44px 24px 72px; }
  :root { --pad: 26px; }
  .button--primary { width: auto; min-width: 220px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}


/* ── Verse card preview ───────────────────────────────────────────────────── */

.graphic-preview {
  margin-top: 14px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
}

.graphic-preview__canvas {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}

.graphic-preview__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.graphic-preview__note { font-size: 0.76rem; color: var(--ink-faint); }

.verse__narrowed {
  margin: 8px 0 0;
  font-size: 0.78rem;
  color: var(--sage);
}


/* ── Graphic style picker ─────────────────────────────────────────────────── */

.style-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 6px;
  margin-bottom: 12px;
}

.style-picker__option {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  text-align: left;
  font: inherit;
  color: var(--ink-soft);
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  cursor: pointer;
}
.style-picker__option:hover { background: rgba(255, 255, 255, 0.08); }
.style-picker__option.is-active {
  color: var(--ink);
  border-color: var(--gold);
  background: rgba(232, 201, 138, 0.10);
}
.style-picker__option:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.style-picker__name { font-size: 0.88rem; font-weight: 600; }
.style-picker__hint { font-size: 0.72rem; color: var(--ink-faint); line-height: 1.35; }

.graphic-preview__prompt { margin-top: 12px; }


/* ── Logo controls ────────────────────────────────────────────────────────── */

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.logo-controls {
  margin-top: 14px;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
}

.logo-controls__head { margin-bottom: 10px; }
.logo-controls__title {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink);
}
.logo-controls__hint {
  display: block;
  margin-top: 3px;
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--ink-faint);
}

.logo-controls__row { display: flex; flex-wrap: wrap; gap: 8px; }

/* The file input is inside its label, so the label behaves as the button. */
.logo-controls__row label { cursor: pointer; }

.logo-corners {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin-top: 10px;
}

.logo-corners__option {
  padding: 9px 10px;
  font: inherit;
  font-size: 0.8rem;
  color: var(--ink-soft);
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--glass-border);
  border-radius: 9px;
  cursor: pointer;
}
.logo-corners__option:hover { background: rgba(255, 255, 255, 0.08); }
.logo-corners__option.is-active {
  color: #241a3a;
  background: var(--gold);
  border-color: var(--gold);
  font-weight: 600;
}
.logo-corners__option:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

@media (min-width: 520px) {
  .logo-corners { grid-template-columns: repeat(4, 1fr); }
}

.logo-controls__head--spaced { margin-top: 16px; }

.logo-controls__field {
  width: 100%;
  padding: 11px 13px;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--ink);
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
}
.logo-controls__field::placeholder { color: var(--ink-faint); }
.logo-controls__field:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-color: transparent;
}

.segmented__track--wrap { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 560px) {
  .segmented__track--wrap { grid-template-columns: repeat(4, 1fr); }
}

/* ──────────────────────────────────────────────────────────────────────────
   Sunday Studio — warm editorial redesign

   The input screen follows the selected reference: an ink-black utility bar,
   bookish headline typography, paper tones, and two playful color moments.
   Existing result-building classes keep their behavior and inherit this same
   visual language.
   ────────────────────────────────────────────────────────────────────────── */

:root {
  --bg-deep: #f4eddf;
  --bg-mid: #f7f2e8;
  --bg-warm: #fbf8f0;
  --glass: #fffdf7;
  --glass-strong: #f5efe3;
  --glass-border: #d8cfbf;
  --ink: #1d1d19;
  --ink-soft: #5e5a52;
  --ink-faint: #7c766b;
  --gold: #f2c94c;
  --gold-deep: #e6b931;
  --amber: #c65d2f;
  --sage: #2f745b;
  --coral: #ee6b61;
  --paper: #fffdf7;
  --paper-deep: #eee5d5;
  --radius: 4px;
  --radius-sm: 3px;
  --pad: 22px;
}

html { background: var(--bg-mid); }

body {
  padding: 0 0 56px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg-mid);
  background-image: linear-gradient(rgba(29, 29, 25, 0.018) 1px, transparent 1px);
  background-size: 100% 26px;
  background-attachment: scroll;
}

a { color: inherit; }

.brand-bar {
  min-height: 52px;
  padding: 6px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: #fffdf7;
  background: #171714;
  border-bottom: 0;
}

.brand-link,
.transcript-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
}

.brand-link {
  gap: 7px;
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand-link strong { font-weight: 600; }

.brand-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.transcript-help {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
}

.transcript-link {
  justify-content: flex-end;
  max-width: 145px;
  text-align: right;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--gold);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.transcript-help__tip {
  position: relative;
  flex: 0 0 auto;
}

.transcript-help__trigger {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  list-style: none;
  border: 1px solid rgba(229, 184, 44, 0.78);
  border-radius: 50%;
  color: #171714;
  background: var(--gold);
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.transcript-help__trigger:hover { background: #f6d166; }

.transcript-help__trigger:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.transcript-help__panel {
  position: absolute;
  z-index: 30;
  top: calc(100% + 12px);
  right: 0;
  width: min(330px, calc(100vw - 32px));
  padding: 16px 17px 15px;
  border: 1px solid rgba(229, 184, 44, 0.48);
  border-radius: 12px;
  color: #f8f4e8;
  background: #25241f;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.34);
  font-size: 0.82rem;
  line-height: 1.45;
  text-align: left;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-5px);
  transition: opacity 140ms ease, transform 140ms ease, visibility 140ms ease;
}

.transcript-help__panel::before {
  position: absolute;
  right: 7px;
  bottom: 100%;
  width: 0;
  height: 0;
  border-right: 7px solid transparent;
  border-bottom: 8px solid #25241f;
  border-left: 7px solid transparent;
  content: '';
}

.transcript-help__tip.is-open .transcript-help__panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

@media (hover: hover) and (pointer: fine) {
  .transcript-help__tip:not(.is-dismissed):hover .transcript-help__panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }
}

.transcript-help__title {
  margin: 0 0 8px;
  color: var(--gold);
  font-weight: 700;
}

.transcript-help__panel ol {
  margin: 0;
  padding-left: 20px;
}

.transcript-help__panel li + li { margin-top: 7px; }

.transcript-help__note {
  margin: 11px 0 0;
  color: #d8d1c1;
  font-size: 0.74rem;
}

.brand-link:hover,
.transcript-link:hover { color: #fff; }

.brand-link:focus-visible,
.transcript-link:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.hero {
  max-width: 900px;
  margin: 0 auto;
  padding: 29px 20px 22px;
  text-align: center;
}

.eyebrow {
  display: none;
  margin: 0 0 13px;
  font-size: 0.69rem;
  font-weight: 600;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: #766f62;
}

.page-title {
  margin: 0;
  max-width: none;
  font-size: clamp(2.85rem, 13vw, 4.8rem);
  font-weight: 600;
  line-height: 0.94;
  letter-spacing: -0.055em;
  text-align: center;
}

.page-tagline {
  max-width: 520px;
  margin: 10px auto 0;
  font-family: var(--font-display);
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--ink-soft);
}

.container {
  gap: 22px;
  max-width: 900px;
  padding: 0 20px;
}

.glass {
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: 7px 7px 0 var(--paper-deep);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.card { padding: var(--pad); }

.card--input {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.card__title {
  margin-bottom: 7px;
  font-size: 1.12rem;
  line-height: 1.2;
}

.card__hint {
  margin-bottom: 11px;
  font-size: 0.8rem;
  color: var(--ink-soft);
  line-height: 1.55;
}

.transcript,
.output-text,
.logo-controls__field {
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid #272620;
  border-radius: var(--radius-sm);
  box-shadow: 4px 4px 0 #ddd3c1;
}

.transcript {
  height: 176px;
  min-height: 176px;
  padding: 13px 14px;
}

.transcript::placeholder,
.output-text::placeholder,
.logo-controls__field::placeholder { color: #8a8377; }

.transcript:focus-visible,
.output-text:focus-visible,
.logo-controls__field:focus-visible {
  outline: 3px solid rgba(242, 201, 76, 0.68);
  outline-offset: 2px;
  border-color: #272620;
}

.input-meta { margin: 6px 0 14px; }
.counter { color: var(--ink-faint); }

.link-button {
  min-height: 36px;
  color: #8a3f31;
  border-bottom-color: rgba(138, 63, 49, 0.45);
}

.link-button:hover { border-bottom-color: #8a3f31; }

.segmented { margin-bottom: 13px; }

.segmented__legend {
  padding-bottom: 8px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.segmented__track {
  gap: 0;
  padding: 0;
  background: transparent;
  border: 1.5px solid #2b2923;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.segmented__option + .segmented__option { border-left: 1px solid #bdb4a5; }

.segmented__option span {
  min-height: 38px;
  padding: 8px 5px;
  color: #4f4b43;
  background: var(--paper);
  border-radius: 0;
}

.segmented__option input:checked + span {
  color: #1d1d19;
  background: var(--gold);
}

#tone-group .segmented__option input:checked + span {
  color: #241d1c;
  background: var(--coral);
}

.segmented__track--wrap { grid-template-columns: repeat(4, minmax(0, 1fr)); }

#tone-group .segmented__option span {
  padding-inline: 2px;
  font-size: 0.78rem;
}

.segmented__option input:focus-visible + span {
  outline: 3px solid #171714;
  outline-offset: -4px;
}

.segmented__note {
  margin-top: 5px;
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--ink-faint);
}

.toggle { color: var(--ink-soft); }
.toggle input { accent-color: var(--coral); }

.toggle--block {
  margin-bottom: 13px;
  gap: 8px;
  padding: 8px 10px;
  color: var(--ink);
  background: rgba(238, 107, 97, 0.08);
  border: 1px solid rgba(139, 63, 51, 0.42);
  border-radius: var(--radius-sm);
}

.toggle--block strong { color: var(--ink); font-size: 0.8rem; }
.toggle--block em { color: var(--ink-soft); font-size: 0.62rem; line-height: 1.35; }

.button { border-radius: var(--radius-sm); }

.button--primary {
  min-height: 52px;
  color: #1d1d19;
  background: var(--gold);
  border: 1.5px solid #1d1d19;
  box-shadow: 4px 4px 0 #1d1d19;
}

.button--primary:hover {
  filter: none;
  background: #f7d665;
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 #1d1d19;
}

.button--primary:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 #1d1d19;
}

.button--primary:disabled {
  opacity: 0.62;
  cursor: progress;
}

.button--ghost {
  color: var(--ink);
  background: #f4eddf;
  border-color: #b9af9e;
  box-shadow: none;
}

.button--ghost:hover { color: var(--ink); background: #fffaf0; }

.button:focus-visible,
.style-picker__option:focus-visible,
.logo-corners__option:focus-visible,
.scene-tile:focus-visible {
  outline: 3px solid rgba(242, 201, 76, 0.75);
  outline-offset: 2px;
}

.privacy-note {
  margin: 10px 0 0;
  font-size: 0.69rem;
  line-height: 1.45;
  color: var(--ink-faint);
  text-align: center;
}

.status {
  min-height: 0;
  margin: 14px 0 0;
  color: var(--ink-soft);
}

.status:empty { display: none; }

.status--error,
.status--quota {
  padding: 12px 14px;
  color: #702d26;
  background: #fff2e9;
  border: 1px solid rgba(139, 63, 51, 0.42);
  border-left: 4px solid var(--coral);
}

.verse,
.alert,
.graphic-preview,
.style-picker__option,
.logo-controls,
.channel-run,
.logo-corners__option {
  color: var(--ink);
  background: #f7f1e5;
  border-color: var(--glass-border);
  border-radius: var(--radius-sm);
}

.verse--anchor,
.style-picker__option.is-active {
  color: var(--ink);
  background: rgba(242, 201, 76, 0.18);
  border-color: #b38c14;
}

.verse__text,
.style-picker__option,
.style-picker__hint,
.logo-controls__hint,
.graphic-preview__note,
.channel-run__cell figcaption,
.scene-gallery__head,
.scene-words summary,
.scene-words p { color: var(--ink-soft); }

.verse__reason,
.verse__narrowed,
.output-meta__note,
.scene-status { color: var(--sage); }

.pill { color: var(--ink-soft); background: #e8dfd0; }
.pill--gold { color: #6e5400; background: #f8e8ab; }
.pill--sage { color: #245a46; background: #dcebe4; }

.translation-toggle { color: var(--ink-soft); background: #fffaf0; }
.translation-toggle.is-selected { color: #241a3a; background: var(--gold); }
.verse__version { background: #fffaf0; }

.alert { background: #f7f1e5; }
.alert--warn { background: #fff1dd; border-color: #d8a24c; }
.alert strong { color: var(--ink); }

.card--flagged { border-left-color: var(--amber); }
.output-warning { color: #9a431f; }
.output-meta { color: var(--ink-faint); }

.sk {
  background: linear-gradient(90deg, #ede5d7 25%, #fffaf0 50%, #ede5d7 75%);
  background-size: 220% 100%;
}

.toast {
  color: #fff;
  background: #171714;
  border: 1px solid var(--gold);
  border-radius: var(--radius-sm);
}

.scene-tile { background: var(--paper); border-color: var(--glass-border); }
.scene-tile:hover { border-color: #b38c14; }
.scene-tile.is-active { border-color: #b38c14; box-shadow: 0 0 0 1px #b38c14; }
.scene-tile__name { color: var(--ink-soft); background: #eee6d8; }

@media (max-width: 719px) {
  .container { padding-inline: 30px; }
  .toggle--block { gap: 8px; margin-bottom: 7px; padding: 8px 10px; }
  .toggle--block strong { font-size: 0.8rem; }
  .toggle--block em { font-size: 0.62rem; line-height: 1.35; }
  .button--primary { min-height: 46px; padding: 9px 18px; border-radius: 999px; }
}

/* ──────────────────────────────────────────────────────────────────────────
   Editorial studio shell — split masthead, real hero artwork, and themes.
   This final cascade owns the page frame while the generated-content modules
   above keep their established structure and behavior.
   ────────────────────────────────────────────────────────────────────────── */

:root {
  --bg-deep: #eee5d6;
  --bg-mid: #f5efe4;
  --bg-warm: #faf6ee;
  --glass: #fffdf8;
  --glass-strong: #f0e8da;
  --glass-border: #c9bead;
  --ink: #1b1a17;
  --ink-soft: #554f47;
  --ink-faint: #6d655a;
  --gold: #e8b92f;
  --gold-deep: #bb8c08;
  --amber: #a94b28;
  --sage: #286c54;
  --coral: #df5c4f;
  --paper: #fffdf8;
  --paper-deep: #ded3c1;
  --header-bg: #171714;
  --header-ink: #fffaf0;
  --field-bg: #fffdf8;
  --field-border: #2b2923;
  --field-shadow: #d8cdbb;
  --soft-fill: #eee6d8;
  --hover-fill: #fff9ed;
  --gold-wash: #f8edc5;
  --coral-wash: #f9e5e0;
  --error-fill: #fff1e8;
  --rule: rgba(54, 50, 42, 0.075);
  --focus: #9a7100;
  --radius: 5px;
  --radius-sm: 4px;
  --pad: 26px;
}

:root[data-theme='dark'] {
  --bg-deep: #080806;
  --bg-mid: #11110e;
  --bg-warm: #171612;
  --glass: #1d1c18;
  --glass-strong: #27251f;
  --glass-border: #5f594e;
  --ink: #fff8e8;
  --ink-soft: #d7cdbb;
  --ink-faint: #b2a694;
  --gold: #f2c94c;
  --gold-deep: #e1ae18;
  --amber: #ff9468;
  --sage: #75cda5;
  --coral: #ff786b;
  --paper: #1d1c18;
  --paper-deep: #080806;
  --header-bg: #0c0c0a;
  --header-ink: #fff8e8;
  --field-bg: #1a1916;
  --field-border: #9f9687;
  --field-shadow: #050504;
  --soft-fill: #292720;
  --hover-fill: #353229;
  --gold-wash: #3b3219;
  --coral-wash: #3a2421;
  --error-fill: #3b211c;
  --rule: rgba(255, 248, 232, 0.07);
  --focus: #f2c94c;
}

html {
  background: var(--bg-mid);
  scroll-behavior: smooth;
}

body {
  padding: 0 0 72px;
  color: var(--ink);
  background-color: var(--bg-mid);
  background-image: none;
  transition: color 180ms ease, background-color 180ms ease;
}

button,
input,
textarea { font: inherit; }

.brand-bar {
  position: relative;
  z-index: 50;
  min-height: 60px;
  padding: 0 24px;
  color: var(--header-ink);
  background: var(--header-bg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.13);
}

.brand-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100%, 1320px);
  min-height: 60px;
  margin: 0 auto;
  gap: 24px;
}

.brand-link {
  min-height: 44px;
  color: var(--header-ink);
  font-size: 0.74rem;
  letter-spacing: 0.02em;
}

.brand-logo {
  width: 35px;
  height: 35px;
}

.utility-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  gap: 12px;
}

.transcript-link {
  min-height: 36px;
  max-width: none;
  padding: 7px 12px;
  color: var(--header-ink);
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  font-size: 0.72rem;
  text-decoration: none;
}

.transcript-link:hover {
  color: #171714;
  background: var(--gold);
  border-color: var(--gold);
}

.transcript-help__trigger {
  width: 32px;
  height: 32px;
  border-color: var(--gold);
  color: #171714;
  background: var(--gold);
}

.transcript-help__panel {
  color: #fff8e8;
  background: #24231f;
  border-color: #8f792f;
}

.transcript-help__panel::before { border-bottom-color: #24231f; }

.theme-toggle {
  display: grid;
  grid-template-columns: repeat(2, auto);
  align-items: center;
  min-height: 38px;
  padding: 3px;
  color: #d7d0c3;
  background: #2a2924;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  cursor: pointer;
}

.theme-toggle__option {
  min-width: 48px;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1;
  text-align: center;
}

.theme-toggle[data-theme='light'] [data-theme-label='light'],
.theme-toggle[data-theme='dark'] [data-theme-label='dark'] {
  color: #171714;
  background: var(--gold);
}

.theme-toggle:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.hero-shell {
  position: relative;
  min-height: 340px;
  overflow: hidden;
  background-color: var(--bg-warm);
  border-bottom: 1px solid var(--glass-border);
  isolation: isolate;
}

.hero-shell::after {
  position: absolute;
  z-index: -1;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: var(--rule);
  content: '';
}

.hero-decoration {
  position: absolute;
  z-index: -2;
  display: block;
  width: auto;
  max-width: none;
  height: auto;
  pointer-events: none;
  user-select: none;
}

.hero-decoration--orb {
  top: -92px;
  left: -380px;
  width: 660px;
  opacity: 0.92;
}

.hero-decoration--paper {
  top: -160px;
  right: -258px;
  width: 690px;
  opacity: 0.7;
}

:root[data-theme='dark'] .hero-decoration--orb {
  opacity: 0.84;
  filter: saturate(1.15) contrast(1.05) brightness(0.94);
}

:root[data-theme='dark'] .hero-decoration--paper {
  opacity: 0.24;
  filter: sepia(0.22) brightness(0.56) contrast(1.15);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.7fr);
  align-items: center;
  width: min(100%, 1240px);
  max-width: none;
  min-height: 340px;
  margin: 0 auto;
  padding: 42px 48px 38px;
  gap: 76px;
  text-align: left;
}

.hero__identity { min-width: 0; }

.eyebrow {
  display: block;
  margin: 0 0 20px;
  color: var(--ink-soft);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.title-lockup { display: inline-block; }

.page-title {
  max-width: none;
  color: var(--ink);
  font-size: clamp(4.2rem, 7.3vw, 7.15rem);
  font-weight: 900;
  line-height: 0.84;
  letter-spacing: -0.065em;
  text-align: left;
}

.title-rays {
  width: clamp(42px, 5vw, 69px);
  top: clamp(-23px, -1.8vw, -15px);
  left: clamp(-31px, -2.6vw, -18px);
}

.title-underline {
  width: clamp(220px, 25vw, 355px);
  right: -12px;
  bottom: -20px;
}

.page-tagline {
  max-width: 600px;
  margin: 32px 0 0;
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.4vw, 1.25rem);
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: -0.018em;
  text-align: left;
}

.workflow-steps {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--glass-border);
}

.workflow-steps li {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 15px 0;
  border-bottom: 1px solid var(--glass-border);
}

.workflow-steps__number {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #171714;
  background: var(--gold);
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
}

.workflow-steps strong,
.workflow-steps em { display: block; }

.workflow-steps strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.05rem;
}

.workflow-steps em {
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-style: normal;
  line-height: 1.35;
}

.container {
  width: min(100%, 1240px);
  max-width: none;
  margin-top: 48px;
  padding: 0 34px;
  gap: 28px;
}

.card--input {
  display: grid;
  grid-template-columns: 64px repeat(6, minmax(0, 1fr));
  column-gap: 22px;
  padding: 0;
}

.workspace-number {
  grid-column: 1;
  grid-row: 1 / span 5;
  align-self: stretch;
  padding: 5px 11px 0 0;
  color: var(--coral);
  border-right: 1px solid var(--glass-border);
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  text-align: right;
}

.workspace-heading,
.card--input > .transcript,
.card--input > .input-meta,
.card--input > .trust-strip,
.card--input > .channel-picker,
.card--input > .privacy-note,
.card--input > .status {
  grid-column: 2 / -1;
}

.workspace-kicker {
  margin: 0 0 4px;
  color: var(--coral);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.workspace-heading .card__title {
  margin: 0 0 8px;
  font-size: clamp(1.55rem, 2.4vw, 2.35rem);
  font-weight: 800;
}

.workspace-heading .card__hint {
  max-width: 880px;
  margin: 0 0 16px;
  color: var(--ink-soft);
  font-size: 0.8rem;
}

.transcript,
.output-text,
.logo-controls__field {
  color: var(--ink);
  background: var(--field-bg);
  border-color: var(--field-border);
  box-shadow: 5px 5px 0 var(--field-shadow);
}

.transcript {
  height: 190px;
  min-height: 190px;
  padding: 18px;
  font-size: 1rem;
  line-height: 1.65;
}

.transcript::placeholder,
.output-text::placeholder,
.logo-controls__field::placeholder { color: var(--ink-faint); }

.transcript:focus-visible,
.output-text:focus-visible,
.logo-controls__field:focus-visible {
  outline-color: var(--focus);
  border-color: var(--field-border);
}

.input-meta {
  margin: 11px 0 24px;
}

.counter { color: var(--ink-faint); }

.link-button {
  min-height: 40px;
  color: var(--amber);
  border-bottom-color: currentColor;
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 31px;
  background: var(--soft-fill);
  border: 1px solid var(--glass-border);
}

.trust-strip > div {
  min-width: 0;
  padding: 14px 16px;
}

.trust-strip > div + div { border-left: 1px solid var(--glass-border); }

.trust-strip strong,
.trust-strip span { display: block; }

.trust-strip strong {
  color: var(--ink);
  font-size: 0.74rem;
}

.trust-strip span {
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 0.64rem;
  line-height: 1.4;
}

.card--input > .segmented { margin-bottom: 25px; }
.segmented--translation { grid-column: 2 / span 2; }
.segmented--tone { grid-column: 4 / span 2; }
.segmented--summary { grid-column: 6 / span 2; }

.segmented__legend {
  color: var(--ink-soft);
  font-weight: 700;
}

.segmented__track {
  background: transparent;
  border-color: var(--field-border);
}

.segmented__option + .segmented__option { border-left-color: var(--glass-border); }

.segmented__option span {
  color: var(--ink-soft);
  background: var(--field-bg);
}

.segmented__option input:checked + span {
  color: #171714;
  background: var(--gold);
}

#tone-group .segmented__option input:checked + span {
  color: #171714;
  background: var(--coral);
}

.segmented__option input:focus-visible + span {
  outline-color: var(--focus);
}

.segmented__note { color: var(--ink-faint); }

.channel-picker {
  margin-top: 4px;
  margin-bottom: 22px;
}

.channel-picker__legend {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.02rem;
}

.channel-picker__master {
  color: var(--ink);
  background: var(--gold-wash);
  border-color: var(--gold-deep);
}

.channel-picker__master-copy em,
.channel-option em { color: var(--ink-soft); }

.channel-picker__count {
  color: #292108;
  background: var(--gold);
}

.channel-option,
.channel-option__check {
  color: var(--ink-soft);
  background: var(--field-bg);
  border-color: var(--glass-border);
}

.channel-option:hover { background: var(--hover-fill); }

.channel-option:has(input:checked) {
  color: var(--ink);
  background: var(--gold-wash);
  border-color: var(--gold-deep);
}

.channel-option input:checked + .channel-option__check {
  color: #171714;
  background: var(--gold);
  border-color: #171714;
}

.channel-picker__note { color: var(--ink-faint); }

.card--input > .toggle--block {
  grid-column: 2 / span 3;
  align-self: stretch;
  margin: 0 0 18px;
}

.toggle--block,
.logo-controls,
.channel-run {
  color: var(--ink);
  background: var(--coral-wash);
  border-color: var(--coral);
}

.toggle--block strong,
.logo-controls__title { color: var(--ink); }

.toggle--block em,
.logo-controls__hint,
.channel-run__cell figcaption,
.scene-gallery__head,
.scene-words summary,
.scene-words p { color: var(--ink-soft); }

.card--input > .button--primary {
  grid-column: 5 / -1;
  align-self: center;
  justify-self: stretch;
  width: auto;
  min-width: 0;
  margin: 0 0 18px;
}

.button--primary {
  color: #171714;
  background: var(--gold);
}

.button--primary:hover { background: #f7d55f; }

.button--ghost {
  color: var(--ink);
  background: var(--soft-fill);
  border-color: var(--glass-border);
}

.button--ghost:hover {
  color: var(--ink);
  background: var(--hover-fill);
}

.privacy-note {
  margin-top: 0;
  color: var(--ink-faint);
  text-align: left;
}

.glass {
  color: var(--ink);
  background: var(--glass);
  border-color: var(--glass-border);
  box-shadow: 7px 7px 0 var(--paper-deep);
}

.card--input {
  background: transparent;
  border: 0;
  box-shadow: none;
}

.verse,
.alert,
.graphic-preview,
.style-picker__option,
.logo-controls,
.channel-run,
.logo-corners__option {
  color: var(--ink);
  background: var(--soft-fill);
  border-color: var(--glass-border);
}

.verse--anchor,
.style-picker__option.is-active {
  color: var(--ink);
  background: var(--gold-wash);
  border-color: var(--gold-deep);
}

.verse__text,
.style-picker__option,
.style-picker__hint,
.logo-controls__hint,
.graphic-preview__note,
.channel-run__cell figcaption,
.scene-gallery__head,
.scene-words summary,
.scene-words p { color: var(--ink-soft); }

.pill { color: var(--ink-soft); background: var(--soft-fill); }
.pill--gold { color: var(--ink); background: var(--gold-wash); }
.pill--sage { color: var(--ink); background: var(--soft-fill); }
.translation-toggle { color: var(--ink-soft); background: var(--field-bg); }
.translation-toggle.is-selected { color: #171714; background: var(--gold); }
.verse__version { background: var(--field-bg); }
.alert { background: var(--soft-fill); }
.alert--warn { background: var(--error-fill); border-color: var(--amber); }
.alert strong { color: var(--ink); }
.output-warning { color: var(--amber); }
.output-meta { color: var(--ink-faint); }
.output-meta__note,
.verse__reason,
.verse__narrowed,
.scene-status { color: var(--sage); }

.status--error,
.status--quota {
  color: var(--ink);
  background: var(--error-fill);
  border-color: var(--coral);
}

.sk {
  background: var(--soft-fill);
  background-image: none;
}

.scene-tile,
.logo-controls__field,
.logo-corners__option { background: var(--field-bg); border-color: var(--glass-border); }
.scene-tile:hover,
.logo-corners__option:hover { background: var(--hover-fill); border-color: var(--gold-deep); }
.scene-tile.is-active,
.logo-corners__option.is-active {
  color: #171714;
  background: var(--gold);
  border-color: var(--gold-deep);
}
.scene-tile__name { color: var(--ink-soft); background: var(--soft-fill); }

.page-footer {
  width: min(100%, 1240px);
  max-width: none;
  margin-top: 64px;
  padding: 0 34px;
}

.notice,
.copyline { color: var(--ink-faint); }

.toast {
  color: #fff8e8;
  background: #171714;
  border-color: var(--gold);
}

@media (max-width: 1000px) {
  .hero {
    grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.75fr);
    padding-inline: 64px;
    gap: 46px;
  }

  .hero-decoration--orb { left: -340px; }
  .hero-decoration--paper { right: -330px; }

  .card--input {
    grid-template-columns: 52px repeat(6, minmax(0, 1fr));
    column-gap: 16px;
  }
}

@media (max-width: 819px) {
  .hero-shell,
  .hero { min-height: 0; }

  .hero {
    grid-template-columns: 1fr;
    padding: 54px 46px 44px;
    gap: 42px;
  }

  .hero-decoration--orb {
    top: -160px;
    left: -405px;
    width: 650px;
  }

  .hero-decoration--paper {
    top: 170px;
    right: -390px;
    width: 650px;
  }

  .workflow-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .workflow-steps li {
    grid-template-columns: 32px minmax(0, 1fr);
    padding: 13px 8px;
    border-bottom: 0;
  }

  .workflow-steps li + li { border-left: 1px solid var(--glass-border); }
  .workflow-steps__number { width: 30px; height: 30px; }
  .workflow-steps em { display: none; }

  .container { margin-top: 38px; padding-inline: 30px; }

  .card--input { display: block; }

  .workspace-number {
    display: inline-block;
    margin: 0 0 13px;
    padding: 0 0 7px;
    border-right: 0;
    border-bottom: 3px solid var(--coral);
    text-align: left;
  }

  .trust-strip { margin-bottom: 24px; }
  .card--input > .segmented { margin-bottom: 19px; }
  .card--input > .toggle--block { margin-bottom: 15px; }
  .card--input > .button--primary { width: 100%; margin-bottom: 13px; }
}

@media (max-width: 620px) {
  body { padding-bottom: 54px; }

  .brand-bar { padding-inline: 14px; }
  .brand-bar__inner { gap: 10px; }
  .brand-link span { display: none; }
  .brand-logo { width: 34px; height: 34px; }
  .utility-actions { gap: 7px; }
  .transcript-help { gap: 5px; }
  .transcript-link { padding-inline: 9px; font-size: 0.64rem; }
  .transcript-help__trigger { width: 30px; height: 30px; }

  .theme-toggle__option {
    min-width: 40px;
    padding-inline: 7px;
    font-size: 0.61rem;
  }

  .hero { padding: 48px 28px 37px; gap: 34px; }
  .page-title { font-size: clamp(3.3rem, 16.5vw, 5rem); }
  .page-tagline { margin-top: 27px; font-size: 0.94rem; }
  .title-underline { width: clamp(170px, 61vw, 265px); bottom: -16px; }
  .title-rays { width: 41px; left: -19px; }

  .hero-decoration--orb {
    top: -120px;
    left: -420px;
    width: 610px;
  }

  .hero-decoration--paper {
    top: 190px;
    right: -420px;
    width: 620px;
  }

  .workflow-steps {
    grid-template-columns: 1fr;
    border-bottom: 1px solid var(--glass-border);
  }

  .workflow-steps li { border-bottom: 0; }
  .workflow-steps li + li { border-left: 0; border-top: 1px solid var(--glass-border); }
  .workflow-steps em { display: block; }

  .container { margin-top: 32px; padding-inline: 20px; }
  .workspace-heading .card__hint { font-size: 0.76rem; }
  .transcript { height: 220px; }

  .trust-strip { grid-template-columns: 1fr; }
  .trust-strip > div + div { border-top: 1px solid var(--glass-border); border-left: 0; }

  .channel-picker__grid { grid-template-columns: 1fr; }
  .page-footer { padding-inline: 20px; }
}

@media (max-width: 410px) {
  .transcript-link {
    width: 86px;
    line-height: 1.15;
    text-align: center;
  }

  .theme-toggle__option { min-width: 34px; padding-inline: 5px; }
  .hero { padding-inline: 22px; }
  .container { padding-inline: 16px; }
  .page-title { font-size: clamp(2.9rem, 13.1vw, 3.2rem); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body { transition: none; }
}

/* Selected-reference refinements: real marker assets frame live, accessible text. */
.title-lockup {
  position: relative;
  display: inline-block;
  isolation: isolate;
}

.page-title {
  position: relative;
  z-index: 1;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.title-rays,
.title-underline,
.generate-button-burst {
  position: absolute;
  display: block;
  height: auto;
  pointer-events: none;
  user-select: none;
}

.title-rays {
  z-index: 2;
  width: clamp(31px, 8vw, 54px);
  top: clamp(-18px, -2.8vw, -11px);
  left: clamp(-25px, -4.8vw, -15px);
}

.title-underline {
  z-index: 2;
  width: clamp(132px, 39vw, 255px);
  right: -5px;
  bottom: clamp(-15px, -1.6vw, -9px);
}

.page-tagline {
  margin-top: 19px;
  font-family: var(--font-body);
  font-weight: 500;
  font-variant-ligatures: none;
  letter-spacing: -0.015em;
}

.button--primary {
  position: relative;
  width: 100%;
  min-height: 50px;
  padding: 11px 62px 11px 24px;
  overflow: visible;
  color: #1d1d19;
  background: #f4c542;
  border: 0;
  border-radius: 999px;
  box-shadow: none;
  font-size: 1.08rem;
  font-weight: 700;
}

.button--primary:hover {
  background: #f7cf58;
  filter: none;
  transform: translateY(-1px);
  box-shadow: none;
}

.button--primary:active {
  transform: translateY(1px);
  box-shadow: none;
}

.generate-button-burst {
  width: 28px;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}

@media (min-width: 720px) {
  .button--primary {
    width: 100%;
    min-height: 58px;
    padding: 14px 76px 14px 32px;
    border-radius: 999px;
    font-size: 1.18rem;
  }

  .generate-button-burst {
    width: 34px;
    right: 28px;
  }
}

@media (max-width: 440px) {
  .transcript-help__panel {
    position: fixed;
    top: 60px;
    right: 12px;
    left: 12px;
    width: auto;
  }

  .transcript-help__panel::before { right: 17px; }
}
.scene-tile.is-active .scene-tile__name { color: var(--ink); }

/* Keep the late-declared result builders on the Sunday Studio palette. */
.toggle--block,
.logo-controls,
.channel-run {
  color: var(--ink);
  background: #f7f1e5;
  border-color: var(--glass-border);
  border-radius: var(--radius-sm);
}

.toggle--block { background: rgba(238, 107, 97, 0.08); border-color: rgba(139, 63, 51, 0.42); }
.toggle--block strong,
.logo-controls__title { color: var(--ink); }
.toggle--block em,
.logo-controls__hint,
.channel-run__cell figcaption,
.scene-gallery__head,
.scene-words summary,
.scene-words p { color: var(--ink-soft); }

.logo-controls__field {
  color: var(--ink);
  background: var(--paper);
  border-color: #272620;
}

.logo-corners__option {
  color: var(--ink-soft);
  background: #f7f1e5;
  border-color: var(--glass-border);
}

.logo-corners__option:hover { background: #fffaf0; }
.logo-corners__option.is-active { color: var(--ink); background: var(--gold); border-color: #b38c14; }

.scene-tile { background: var(--paper); border-color: var(--glass-border); }
.scene-tile:hover { border-color: #b38c14; }
.scene-tile.is-active { border-color: #b38c14; box-shadow: 0 0 0 1px #b38c14; }
.scene-tile__name { color: var(--ink-soft); background: #eee6d8; }
.scene-tile.is-active .scene-tile__name { color: var(--ink); }

.logo-corners__option.is-active {
  color: var(--ink);
  background: var(--gold);
  border-color: #b38c14;
}

.page-footer {
  max-width: 900px;
  margin-top: 52px;
  padding: 0 20px;
}

.notice,
.copyline { color: var(--ink-faint); }

@media (min-width: 720px) {
  body { padding: 0 0 72px; }
  :root { --pad: 28px; }
  .brand-bar { min-height: 64px; padding: 9px 30px; }
  .brand-link { font-size: 0.82rem; }
  .brand-logo { width: 44px; height: 44px; }
  .transcript-link { max-width: none; font-size: 0.82rem; }
  .hero { padding: 56px 24px 42px; }
  .page-title { font-size: clamp(4.4rem, 8vw, 6.8rem); }
  .page-tagline { font-size: 1.2rem; }
  .container { padding: 0 28px; }
  .button--primary { width: auto; min-width: 260px; }
  .privacy-note { text-align: left; }
}

@media (min-width: 820px) {
  .card--input {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 22px;
  }

  .card--input > .card__title,
  .card--input > .card__hint,
  .card--input > .transcript,
  .card--input > .input-meta,
  .card--input > .channel-picker,
  .card--input > .toggle--block,
  .card--input > .button--primary,
  .card--input > .privacy-note,
  .card--input > .status { grid-column: 1 / -1; }

  .card--input > .segmented { margin-bottom: 22px; }
}

#scripture-rewrite {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.toggle--block {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 18px;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
}
.toggle--block input { margin-top: 3px; flex: none; }
.toggle--block strong { display: block; font-size: 0.88rem; font-weight: 600; color: var(--ink); }
.toggle--block em {
  display: block;
  margin-top: 3px;
  font-style: normal;
  font-size: 0.76rem;
  line-height: 1.45;
  color: var(--ink-faint);
}

/* ── Channel output picker ───────────────────────────────────────────────── */

.channel-picker {
  grid-column: 1 / -1;
  min-width: 0;
  margin: 0 0 18px;
  padding: 0;
  background: transparent;
  border: 0;
}

.channel-picker:focus-visible {
  outline: 3px solid rgba(242, 201, 76, 0.75);
  outline-offset: 5px;
  border-radius: var(--radius-sm);
}

.channel-picker__legend {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.channel-picker__master {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 13px 14px;
  color: var(--ink);
  background: rgba(242, 201, 76, 0.18);
  border: 1.5px solid #b38c14;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.channel-picker__master input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: #1d1d19;
}

.channel-picker__master input:focus-visible {
  outline: 3px solid rgba(139, 63, 51, 0.58);
  outline-offset: 3px;
}

.channel-picker__master:has(input:disabled),
.channel-option:has(input:disabled) {
  opacity: 0.62;
  cursor: progress;
}

.channel-picker__master-copy strong,
.channel-picker__master-copy em,
.channel-option strong,
.channel-option em {
  display: block;
}

.channel-picker__master-copy strong { font-size: 0.9rem; }
.channel-picker__master-copy em {
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-style: normal;
  line-height: 1.4;
}

.channel-picker__count {
  padding: 5px 9px;
  color: #3f3308;
  background: #f8e8ab;
  border-radius: 999px;
  font-size: 0.69rem;
  font-weight: 800;
  white-space: nowrap;
}

.channel-picker__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 9px;
}

.channel-option {
  position: relative;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 58px;
  padding: 10px 11px;
  color: var(--ink-soft);
  background: #f7f1e5;
  border: 1px solid var(--glass-border);
  border-radius: 11px;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.channel-option:hover {
  background: #fffaf0;
  border-color: #b38c14;
}

.channel-option:has(input:checked) {
  color: var(--ink);
  background: rgba(242, 201, 76, 0.13);
  border-color: #b38c14;
}

.channel-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.channel-option__check {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: transparent;
  background: #fffaf0;
  border: 1.5px solid #918879;
  border-radius: 7px;
  font-size: 0.76rem;
  font-weight: 900;
}

.channel-option input:checked + .channel-option__check {
  color: #1d1d19;
  background: var(--gold);
  border-color: #1d1d19;
}

.channel-option input:focus-visible + .channel-option__check {
  outline: 3px solid rgba(242, 201, 76, 0.75);
  outline-offset: 3px;
}

.channel-option strong { font-size: 0.8rem; }
.channel-option em {
  margin-top: 2px;
  color: var(--ink-faint);
  font-size: 0.66rem;
  font-style: normal;
  line-height: 1.35;
}

.channel-picker__note {
  margin: 8px 2px 0;
  color: var(--ink-faint);
  font-size: 0.7rem;
  line-height: 1.45;
}

.channel-picker.is-empty .channel-picker__count {
  color: #702d26;
  background: #fff2e9;
}

@media (min-width: 620px) {
  .channel-picker__grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .channel-option { grid-template-columns: 22px minmax(0, 1fr); }
}

@media (max-width: 520px) {
  .channel-picker__master {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .channel-picker__count {
    grid-column: 2;
    justify-self: start;
  }
}

.output-meta__note { color: var(--sage); }

/* ── One brief per channel ────────────────────────────────────────────────── */

.channel-run {
  margin-top: 14px;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
}

.channel-run__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin: 10px 0;
}
.channel-run__grid:empty { display: none; }

.channel-run__cell { margin: 0; }

.channel-run__canvas {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
}

.channel-run__cell figcaption {
  margin-top: 5px;
  font-size: 0.72rem;
  color: var(--ink-faint);
  text-align: center;
}

.scene-status {
  margin: 8px 0 0;
  font-size: 0.8rem;
  color: var(--sage);
}

.scene-words { margin-top: 10px; }
.scene-words summary {
  font-size: 0.78rem;
  color: var(--ink-faint);
  cursor: pointer;
}
.scene-words p {
  margin: 8px 0 0;
  font-size: 0.76rem;
  line-height: 1.6;
  color: var(--ink-faint);
}

/* ── Background picker ────────────────────────────────────────────────────── */

.scene-gallery__head {
  margin: 14px 0 8px;
  font-size: 0.78rem;
  color: var(--ink-faint);
}

.scene-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 8px;
}

.scene-tile {
  display: block;
  padding: 0;
  font: inherit;
  text-align: left;
  background: none;
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
}
.scene-tile:hover { border-color: rgba(232, 201, 138, 0.6); }
.scene-tile.is-active { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.scene-tile:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.scene-tile__art { display: block; width: 100%; height: auto; }

.scene-tile__name {
  display: block;
  padding: 6px 8px 7px;
  font-size: 0.7rem;
  line-height: 1.3;
  color: var(--ink-soft);
  background: rgba(0, 0, 0, 0.3);
}
.scene-tile.is-active .scene-tile__name { color: var(--ink); }

/* Final cascade guard for dynamically rendered controls declared above. */
.toggle--block,
.logo-controls,
.channel-run {
  color: var(--ink);
  background: #f7f1e5;
  border-color: var(--glass-border);
  border-radius: var(--radius-sm);
}
.toggle--block { background: rgba(238, 107, 97, 0.08); border-color: rgba(139, 63, 51, 0.42); }
.toggle--block strong,
.logo-controls__title { color: var(--ink); }
.toggle--block em,
.logo-controls__hint,
.channel-run__cell figcaption,
.scene-gallery__head,
.scene-words summary,
.scene-words p { color: var(--ink-soft); }
.logo-controls__field { color: var(--ink); background: var(--paper); border-color: #272620; }
.logo-corners__option { color: var(--ink-soft); background: #f7f1e5; border-color: var(--glass-border); }
.logo-corners__option:hover { background: #fffaf0; }
.logo-corners__option.is-active { color: var(--ink); background: var(--gold); border-color: #b38c14; }
.scene-tile { background: var(--paper); border-color: var(--glass-border); }
.scene-tile:hover { border-color: #b38c14; }
.scene-tile.is-active { border-color: #b38c14; box-shadow: 0 0 0 1px #b38c14; }
.scene-tile__name { color: var(--ink-soft); background: #eee6d8; }

@media (max-width: 719px) {
  .container { padding-inline: 30px; }
  .toggle--block { gap: 8px; margin-bottom: 7px; padding: 8px 10px; }
  .toggle--block strong { font-size: 0.8rem; }
  .toggle--block em { font-size: 0.62rem; line-height: 1.35; }
  .button--primary { min-height: 46px; padding: 9px 18px; border-radius: 999px; }
}

/* The result builders above predate the new shell and are intentionally kept.
   These last rules prevent their legacy desktop grid and light-only fills from
   taking ownership of the redesigned frame. */
.brand-bar {
  min-height: 60px;
  padding: 0 24px;
}

.hero {
  width: min(100%, 1240px);
  max-width: none;
  min-height: 340px;
  padding: 42px 48px 38px;
}

.hero-decoration--paper { right: -80px; }

.container {
  width: min(100%, 1240px);
  max-width: none;
  padding: 0 34px;
}

.page-footer {
  width: min(100%, 1240px);
  max-width: none;
  padding: 0 34px;
}

.toggle--block,
.logo-controls,
.channel-run {
  color: var(--ink);
  background: var(--coral-wash);
  border-color: var(--coral);
}

.logo-controls__field,
.logo-corners__option,
.scene-tile { background: var(--field-bg); border-color: var(--glass-border); }
.logo-corners__option:hover,
.scene-tile:hover { background: var(--hover-fill); border-color: var(--gold-deep); }
.scene-tile__name { color: var(--ink-soft); background: var(--soft-fill); }

.channel-picker__master {
  color: var(--ink);
  background: var(--gold-wash);
  border-color: var(--gold-deep);
}

.channel-picker__count {
  color: #292108;
  background: var(--gold);
}

.channel-option,
.channel-option__check {
  color: var(--ink-soft);
  background: var(--field-bg);
  border-color: var(--glass-border);
}

.channel-option:hover { background: var(--hover-fill); border-color: var(--gold-deep); }
.channel-option:has(input:checked) {
  color: var(--ink);
  background: var(--gold-wash);
  border-color: var(--gold-deep);
}

.channel-option input:checked + .channel-option__check {
  color: #171714;
  background: var(--gold);
  border-color: #171714;
}

@media (min-width: 820px) {
  .card--input {
    display: grid;
    grid-template-columns: 64px repeat(6, minmax(0, 1fr));
    column-gap: 22px;
  }

  .workspace-heading,
  .card--input > .transcript,
  .card--input > .input-meta,
  .card--input > .trust-strip,
  .card--input > .channel-picker,
  .card--input > .privacy-note,
  .card--input > .status { grid-column: 2 / -1; }

  .segmented--translation { grid-column: 2 / span 2; }
  .segmented--tone { grid-column: 4 / span 2; }
  .segmented--summary { grid-column: 6 / span 2; }
  .card--input > .toggle--block { grid-column: 2 / span 3; }
  .card--input > .button--primary { grid-column: 5 / -1; }
}

@media (max-width: 1000px) and (min-width: 820px) {
  .card--input {
    grid-template-columns: 52px repeat(6, minmax(0, 1fr));
    column-gap: 16px;
  }
}

@media (max-width: 819px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 54px 46px 44px;
  }

  .card--input { display: block; }
}

@media (max-width: 620px) {
  .brand-bar { padding-inline: 12px; }
  .brand-bar__inner { gap: 6px; }

  .brand-link {
    flex: 0 1 auto;
    min-width: 0;
    gap: 5px;
    font-size: 0.56rem;
  }

  .brand-link span {
    display: inline;
    white-space: nowrap;
  }

  .brand-logo {
    width: 27px;
    height: 27px;
  }

  .utility-actions {
    flex: 0 0 auto;
    gap: 5px;
  }

  .transcript-help { gap: 4px; }
  .transcript-link {
    width: 78px;
    padding-inline: 7px;
    font-size: 0.6rem;
    line-height: 1.15;
    text-align: center;
  }

  .transcript-help__trigger {
    width: 28px;
    height: 28px;
  }

  .theme-toggle__option {
    min-width: 29px;
    padding-inline: 4px;
    font-size: 0.58rem;
  }

  .hero-decoration--orb {
    top: -235px;
    left: -310px;
    width: 500px;
    opacity: 0.8;
  }

  .hero-decoration--paper {
    top: 20px;
    right: -75px;
    width: 420px;
    opacity: 0.44;
  }

  :root[data-theme='dark'] .hero-decoration--orb {
    opacity: 0.82;
  }

  :root[data-theme='dark'] .hero-decoration--paper {
    opacity: 0.3;
    filter: sepia(0.12) brightness(0.86) contrast(1.02);
  }

  .hero {
    position: relative;
    z-index: 1;
    padding: 48px 28px 37px;
  }

  .page-title {
    font-size: clamp(2.75rem, 11.4vw, 3.05rem);
  }

  .container,
  .page-footer { padding-inline: 20px; }
}

@media (max-width: 410px) {
  .hero { padding-inline: 22px; }
  .container { padding-inline: 16px; }
  .page-title { font-size: clamp(2.65rem, 11.4vw, 2.9rem); }
}

@media (max-width: 340px) {
  .brand-bar { padding-inline: 8px; }
  .brand-bar__inner { gap: 4px; }
  .brand-link { gap: 4px; font-size: 0.49rem; }
  .brand-logo { width: 23px; height: 23px; }
  .utility-actions { gap: 3px; }
  .transcript-help { gap: 3px; }
  .transcript-link { width: 68px; padding-inline: 4px; font-size: 0.55rem; }
  .transcript-help__trigger { width: 26px; height: 26px; }
  .theme-toggle__option { min-width: 26px; padding-inline: 3px; font-size: 0.54rem; }
}

/* Selected wordmark direction: a refined heritage serif with the marker clear
   of every letterform. Supporting display copy keeps the existing Fraunces. */
.page-title {
  font-family: var(--font-wordmark);
  font-weight: 500;
  line-height: 0.86;
  letter-spacing: 0;
}

.title-underline {
  width: clamp(150px, 25vw, 300px);
  right: 0;
  bottom: -10px;
}

.page-tagline { margin-top: 25px; }

@media (min-width: 1200px) {
  .hero {
    grid-template-columns: minmax(0, 1.95fr) minmax(380px, 1fr);
    width: min(100%, 1600px);
    gap: 140px;
  }

  .page-title { font-size: clamp(7rem, 8.05vw, 9.4rem); }
  .title-underline {
    width: clamp(300px, 19.2vw, 358px);
    bottom: -16px;
  }
}

@media (min-width: 621px) and (max-width: 819px) {
  .title-underline {
    width: clamp(164px, 23vw, 185px);
    bottom: -7px;
  }
}

@media (max-width: 620px) {
  .page-title {
    font-size: clamp(3.15rem, 13.45vw, 3.5rem);
    font-weight: 500;
    line-height: 0.9;
    letter-spacing: 0;
  }

  .title-underline {
    width: clamp(108px, 31vw, 130px);
    right: 0;
    bottom: -4px;
  }

  .page-tagline { margin-top: 25px; }
}

@media (max-width: 340px) {
  .page-title { font-size: 2.9rem; }
}
