@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,300..600;1,14..32,300..500&family=Geist+Mono:wght@300..500&display=swap');

/* ─── Tokens ─── */

:root {
  --bg:        #EDEAE4;
  --surface:   #F4F1EC;
  --text:      #27211B;
  --muted:     #7A726A;
  --faint:     #B0A89E;
  --border:    #D5CFC8;
  --border-faint: #E2DDD7;

  --sans:   'Inter', system-ui, -apple-system, sans-serif;
  --mono:   'Geist Mono', ui-monospace, 'SF Mono', monospace;

  --width:  620px;
  --pad:    clamp(1.5rem, 6vw, 2.5rem);

  --ease:   cubic-bezier(0.22, 0.61, 0.18, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #131110;
    --surface:   #1C1917;
    --text:      #E4DDD5;
    --muted:     #857D76;
    --faint:     #544E49;
    --border:    #2B2723;
    --border-faint: #201D1A;
  }
}

/* ─── Reset ─── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-optical-sizing: auto;
  line-height: 1.55;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }

::selection { background: var(--border); color: var(--text); }

/* ─── Nav ─── */

.nav {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.375rem var(--pad);
  max-width: calc(var(--width) + var(--pad) * 2);
  margin: 0 auto;
  width: 100%;
}

.nav-brand {
  font-family: var(--sans);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--text);
  white-space: nowrap;
  transition: color 0.25s var(--ease-soft);
}

.nav-brand:hover { color: var(--muted); }

.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  position: relative;
  font-family: var(--sans);
  font-size: 0.76rem;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0;
  transition: color 0.25s var(--ease-soft);
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  opacity: 0.5;
  transition: transform 0.3s var(--ease);
}

.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-links a.active { color: var(--text); }
.nav-links a.active::after { transform: scaleX(1); }

/* ─── Language switcher ─── */

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding-left: 0.4rem;
  border-left: 1px solid var(--border-faint);
}

.lang-option {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  color: var(--muted);
  opacity: 0.6;
  transition: color 0.25s var(--ease-soft), opacity 0.25s var(--ease-soft);
}

.lang-option:hover { color: var(--text); opacity: 1; }

.lang-option.active {
  color: var(--text);
  opacity: 1;
  font-weight: 500;
}

/* ─── Main container ─── */

.container {
  flex: 1;
  max-width: calc(var(--width) + var(--pad) * 2);
  margin: 0 auto;
  width: 100%;
  padding: 0 var(--pad);
  transition: opacity 0.35s var(--ease), filter 0.35s var(--ease);
}

.container.is-leaving {
  opacity: 0;
  filter: blur(6px);
}

/* Same blur-out used while the page content swaps languages. */
.container.lang-switching {
  opacity: 0;
  filter: blur(6px);
}

/* ─── Footer ─── */

footer {
  padding: 2rem var(--pad);
  max-width: calc(var(--width) + var(--pad) * 2);
  margin: 0 auto;
  width: 100%;
}

.footer-inner {
  border-top: 1px solid var(--border-faint);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.footer-text {
  font-size: 0.73rem;
  color: var(--faint);
}

.footer-links {
  display: flex;
  gap: 1.25rem;
}

.footer-links a {
  font-size: 0.73rem;
  color: var(--faint);
  transition: color 0.25s var(--ease-soft);
}

.footer-links a:hover { color: var(--muted); }

/* ─── Utility ─── */

[hidden] { display: none !important; }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

/* ─── Admin panel ─── */

.admin-panel {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--text);
  color: var(--bg);
  border-radius: 6px;
  padding: 1rem 1.125rem;
  min-width: 220px;
  z-index: 100;
  box-shadow: 0 8px 40px rgba(0,0,0,0.22);
  animation: blurReveal 0.5s var(--ease) both;
}

.admin-panel p.eyebrow {
  color: var(--bg);
  opacity: 0.45;
  margin-bottom: 0.75rem;
}

.admin-actions { display: flex; flex-direction: column; gap: 0.35rem; }

.admin-btn {
  background: var(--bg);
  color: var(--text);
  border: none;
  border-radius: 3px;
  font-family: var(--sans);
  font-size: 0.78rem;
  padding: 0.45rem 0.7rem;
  cursor: pointer;
  text-align: left;
  transition: opacity 0.2s, transform 0.2s var(--ease-soft);
  width: 100%;
}

.admin-btn:hover:not(:disabled) { opacity: 0.78; transform: translateX(2px); }
.admin-btn:disabled { opacity: 0.35; cursor: not-allowed; }

.admin-status {
  font-size: 0.7rem;
  opacity: 0.5;
  font-style: italic;
  margin-top: 0.6rem;
  min-height: 0.9rem;
}

/* ══════════════════════════════════════
   ANIMATIONS — blur-in reveal system
══════════════════════════════════════ */

@keyframes blurReveal {
  from {
    opacity: 0;
    filter: blur(14px);
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}

@keyframes wordReveal {
  from {
    opacity: 0;
    filter: blur(10px);
    transform: translateY(0.4em);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Each page blurs in from top to bottom. Sections carry staggered delays so
   the clarity sweeps downward like a focus pull. */
/* `backwards` (not `both`): the from-state holds during the staggered delay,
   but the end-state must NOT persist — a filled `filter: blur(0)` would
   override the cascade and silently defeat focus-mode's blur on the chrome. */
.reveal {
  animation: blurReveal 1s var(--ease) backwards;
  animation-delay: var(--reveal-delay, 0s);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-delay: 0s !important;
    transition-duration: 0.001s !important;
  }
  body.is-leaving { opacity: 1; filter: none; }
}

/* ══════════════════════════════════════
   HOME PAGE
══════════════════════════════════════ */

.home-wrap {
  padding-top: clamp(3.5rem, 8vh, 6rem);
  padding-bottom: 6rem;
}

.home-eyebrow {
  margin-bottom: 1.25rem;
  animation: blurReveal 0.7s var(--ease) both;
}

.question-text {
  font-family: var(--sans);
  font-size: clamp(1.35rem, 2.6vw, 1.7rem);
  line-height: 1.34;
  font-weight: 400;
  letter-spacing: -0.014em;
  color: var(--text);
  text-wrap: balance;
}

/* The quiet frame that tells a first-time visitor what they're taking part in,
   without explaining the whole project. Eases in after the question settles. */
.question-frame {
  margin-top: 1.25rem;
  max-width: 30rem;
  font-size: 0.82rem;
  line-height: 1.6;
  font-style: italic;
  color: var(--muted);
  animation: blurReveal 0.85s var(--ease) backwards;
  animation-delay: 0.6s;
}

/* word-by-word blur-in */
.word {
  display: inline-block;
  opacity: 0;
  will-change: transform, filter, opacity;
  animation: wordReveal 0.6s var(--ease) forwards;
}

.response-area {
  margin-top: 3rem;
}

/* The input region blurs in gently, top to bottom, like everything else —
   the rule, the field, then the controls each clarify in sequence.
   `backwards` fill keeps them hidden until their turn, then hands control
   back to the base styles so focus/typing transitions stay free. */
.response-rule,
.response-textarea-wrap,
.response-footer {
  animation: blurReveal 0.85s var(--ease) backwards;
}

.response-rule         { animation-delay: 0.22s; }
.response-textarea-wrap { animation-delay: 0.32s; }
.response-footer       { animation-delay: 0.42s; }
.response-note         { animation: blurReveal 0.85s var(--ease) backwards; animation-delay: 0.55s; }

.response-rule {
  border: none;
  border-top: 1px solid var(--border);
  margin-bottom: 1.75rem;
}

.response-textarea-wrap {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1rem 1.125rem;
  background: var(--surface);
  cursor: text;
  transition: border-color 0.3s var(--ease-soft),
              box-shadow 0.3s var(--ease-soft),
              transform 0.3s var(--ease);
}

/* accent line that draws in when the field is engaged */
.response-textarea-wrap::after {
  content: '';
  position: absolute;
  left: 1.125rem;
  right: 1.125rem;
  bottom: -1px;
  height: 1.5px;
  background: var(--muted);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: center;
  opacity: 0;
  transition: transform 0.45s var(--ease), opacity 0.3s var(--ease-soft);
}

.response-textarea-wrap:focus-within {
  border-color: var(--muted);
  box-shadow: 0 6px 28px -18px rgba(0,0,0,0.4);
  transform: translateY(-1px);
}

.response-textarea-wrap:focus-within::after {
  transform: scaleX(1);
  opacity: 0.55;
}

/* ─── Typing feedback ───
   While the field is actively being typed in it settles onto a slightly
   deeper shadow and the accent line lifts — the page feels like it's
   listening. Transition-driven, so it never blocks a keystroke. */
.response-textarea-wrap.typing {
  box-shadow: 0 9px 34px -16px rgba(0, 0, 0, 0.5);
}

.response-textarea-wrap.typing::after {
  opacity: 0.85;
}

/* Each keystroke sends a soft glow rippling along the accent line. Only
   opacity and a faint bloom animate — the line's draw-in transform is left
   untouched — so typing stays instant. */
.response-textarea-wrap.type-pulse::after {
  animation: typePulse 0.5s var(--ease);
}

@keyframes typePulse {
  0%   { opacity: 0.85; box-shadow: 0 0 0 0 rgba(122, 114, 106, 0); }
  35%  { opacity: 1;    box-shadow: 0 1px 11px 0 rgba(122, 114, 106, 0.4); }
  100% { opacity: 0.85; box-shadow: 0 0 0 0 rgba(122, 114, 106, 0); }
}

.response-textarea {
  font-family: var(--mono);
  font-size: 0.9rem;
  line-height: 1.78;
  letter-spacing: -0.01em;
  color: var(--text);
  background: transparent;
  border: none;
  outline: none;
  width: 100%;
  resize: none;
  min-height: 7.5rem;
  overflow: hidden;
  display: block;
}

.response-textarea::placeholder {
  color: var(--faint);
  transition: color 0.3s var(--ease-soft);
}

.response-textarea:disabled {
  color: var(--muted);
  -webkit-text-fill-color: var(--muted);
}

/* ghost layer used for the fly-away animation on send */
.fly-ghost {
  position: absolute;
  top: 1rem;
  left: 1.125rem;
  right: 1.125rem;
  font-family: var(--mono);
  font-size: 0.9rem;
  line-height: 1.78;
  letter-spacing: -0.01em;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  pointer-events: none;
  margin: 0;
}

.fly-ghost span {
  display: inline-block;
  white-space: pre;
  will-change: transform, filter, opacity;
}

.response-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.875rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease),
              filter 0.9s var(--ease);
}

.response-footer.fading {
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
}

.email-input {
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: -0.01em;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 5px;
  outline: none;
  padding: 0.7rem 0.85rem;
  /* take whatever width is left over beside the Send control */
  flex: 1 1 auto;
  min-width: 0;
  transition: border-color 0.25s var(--ease-soft),
              box-shadow 0.25s var(--ease-soft);
}

.email-input:focus {
  border-color: var(--muted);
  box-shadow: 0 4px 20px -16px rgba(0,0,0,0.4);
}

.email-input::placeholder { color: var(--faint); }

.send-btn {
  background: var(--text);
  border: 1px solid var(--text);
  border-radius: 5px;
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--bg);
  cursor: pointer;
  padding: 0.62rem 1.5rem;
  letter-spacing: 0;
  flex: 0 0 auto;
  /* muted until there is something to send */
  opacity: 0.4;
  transform: translateY(0);
  transition: opacity 0.3s var(--ease-soft),
              box-shadow 0.25s var(--ease-soft),
              transform 0.2s var(--ease);
  pointer-events: none;
}

.response-area.ready .send-btn {
  opacity: 1;
  pointer-events: auto;
}

.send-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px -14px rgba(0,0,0,0.55);
}

.send-btn:active:not(:disabled) { transform: translateY(0); box-shadow: none; }
.send-btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* The line under the controls explaining what becomes of a response. */
.response-note {
  margin-top: 1.5rem;
  font-size: 0.72rem;
  line-height: 1.6;
  color: var(--faint);
  max-width: 34rem;
}

.response-note a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: var(--border);
  transition: color 0.25s var(--ease-soft), text-decoration-color 0.25s;
}

.response-note a:hover { color: var(--text); text-decoration-color: var(--text); }

/* Submitted state */
.submitted-state {
  margin-top: 1.5rem;
  animation: blurReveal 0.7s var(--ease) both;
}

.submitted-note {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text);
  max-width: 32rem;
  margin-bottom: 1rem;
}

.submitted-link {
  font-size: 0.78rem;
  color: var(--faint);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--border);
  transition: color 0.25s var(--ease-soft), text-decoration-color 0.25s;
}

.submitted-link:hover { color: var(--muted); text-decoration-color: var(--muted); }

/* ══════════════════════════════════════
   FOCUS MODE — when the response field is engaged, the whole page
   recedes: nav, footer, the rule and the controls all soften out of
   focus and dim, so only the question and the field stay sharp.
   Everything eases back the instant the field is released.
══════════════════════════════════════ */

/* The chrome — header and footer — fully recedes: heavy blur, well dimmed.
   An explicit blur(0) start lets the filter animate smoothly (transitioning
   from `none` is unreliable across engines). translateZ(0) forces a
   compositing layer — without it Safari silently refuses to render the blur. */
.nav,
footer {
  filter: blur(0);
  transform: translateZ(0);
  will-change: filter;
  transition: filter 0.9s var(--ease), opacity 0.9s var(--ease);
}

/* The controls stay legible — they only soften slightly so the field clearly
   sits in front of them. The field itself lifts on a deeper shadow. */
.response-rule,
.response-footer,
.response-note,
.submitted-state {
  transition: opacity 0.9s var(--ease);
}

.question-text,
.response-textarea-wrap {
  transition: filter 0.9s var(--ease), opacity 0.9s var(--ease),
              transform 0.6s var(--ease), border-color 0.3s var(--ease-soft),
              box-shadow 0.5s var(--ease-soft);
}

body.focus-mode .nav,
body.focus-mode footer {
  filter: blur(8px);
  opacity: 0.2;
  pointer-events: none;
}

/* Email + Send stay readable, just quieted a little behind the live field. */
body.focus-mode .response-rule,
body.focus-mode .response-footer,
body.focus-mode .response-note,
body.focus-mode .submitted-state {
  opacity: 0.55;
}

body.focus-mode .question-text {
  opacity: 0.92;
}

/* The input box reads as the single foreground surface while typing. */
body.focus-mode .response-textarea-wrap {
  box-shadow: 0 18px 60px -22px rgba(0, 0, 0, 0.55);
}

/* ══════════════════════════════════════
   ARCHIVE PAGE
══════════════════════════════════════ */

.archive-wrap {
  padding-top: clamp(3rem, 7vh, 5rem);
  padding-bottom: 6rem;
}

.archive-heading {
  font-family: var(--sans);
  font-size: clamp(1.3rem, 3vw, 1.55rem);
  font-weight: 500;
  letter-spacing: -0.022em;
  margin-bottom: 0.5rem;
}

.archive-subhead {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.archive-intro {
  font-size: 0.9rem;
  line-height: 1.66;
  color: var(--text);
  max-width: 34rem;
  margin-bottom: 3.5rem;
}

.archive-list {
  list-style: none;
}

.archive-item {
  border-top: 1px solid var(--border-faint);
  padding: 1.75rem 0;
}

.archive-item:last-child {
  border-bottom: 1px solid var(--border-faint);
}

.archive-item-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.6rem;
}

.archive-q-num {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--faint);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.archive-meta {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--faint);
  letter-spacing: 0.04em;
  text-align: right;
  white-space: nowrap;
}

.archive-question {
  font-family: var(--sans);
  font-size: 0.96rem;
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.archive-question.no-reflection {
  color: var(--muted);
}

.archive-toggle {
  background: none;
  border: none;
  font-family: var(--sans);
  font-size: 0.76rem;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--border);
  transition: color 0.25s var(--ease-soft), text-decoration-color 0.25s;
}

.archive-toggle:hover { color: var(--text); text-decoration-color: var(--text); }

/* When the toggle is scrolled to the top, leave a little air above it. */
.archive-toggle { scroll-margin-top: clamp(1rem, 3vh, 1.75rem); }

.archive-status {
  font-size: 0.76rem;
  color: var(--faint);
  font-style: italic;
}

.archive-question-teased {
  font-family: var(--sans);
  font-size: 0.96rem;
  line-height: 1.5;
  color: transparent;
  background: var(--border);
  border-radius: 2px;
  user-select: none;
  filter: blur(4px);
  pointer-events: none;
  margin-bottom: 0.75rem;
  /* text is a placeholder never sent from server */
}

.archive-teased-label {
  font-size: 0.76rem;
  color: var(--faint);
  font-style: italic;
}

.reflection-block {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-faint);
  overflow: hidden;
}

/* Each rendered block clarifies in sequence — the same gentle blur-in as the
   rest of the page, cascading line by line rather than landing all at once. */
.reflection-block > * {
  font-family: var(--sans);
  font-size: 0.93rem;
  line-height: 1.72;
  color: var(--text);
  margin-bottom: 1.15em;
  opacity: 0;
  filter: blur(8px);
  transform: translateY(10px);
  animation: blurReveal 0.8s var(--ease) forwards;
  animation-delay: var(--reveal-delay, 0s);
}

.reflection-block > *:last-child { margin-bottom: 0; }

/* Collapse: the reverse of the blur-in reveal — the reflection lifts, blurs and
   fades out as one before it's removed from the flow. */
.reflection-block.collapsing {
  animation: blurCollapse 0.5s var(--ease) forwards;
}

@keyframes blurCollapse {
  from { opacity: 1; filter: blur(0); transform: translateY(0); }
  to   { opacity: 0; filter: blur(8px); transform: translateY(-8px); }
}

.reflection-block h4 {
  font-size: 1.02rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  margin-bottom: 0.7em;
}

.reflection-block h5 {
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 0.6em;
}

.reflection-block ul,
.reflection-block ol {
  padding-left: 1.25em;
}

.reflection-block li { margin-bottom: 0.4em; }

.reflection-block blockquote {
  border-left: 2px solid var(--border);
  padding-left: 1em;
  color: var(--muted);
  font-style: italic;
}

.reflection-block strong { font-weight: 600; color: var(--text); }
.reflection-block em { font-style: italic; }

.reflection-block a {
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: var(--border);
  transition: text-decoration-color 0.25s;
}

.reflection-block a:hover { text-decoration-color: var(--text); }

.reflection-block code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--surface);
  padding: 0.05em 0.35em;
  border-radius: 3px;
}

/* ══════════════════════════════════════
   ABOUT PAGE
══════════════════════════════════════ */

.about-wrap {
  padding-top: clamp(3rem, 7vh, 5rem);
  padding-bottom: 6rem;
  max-width: 560px;
}

.about-heading {
  font-family: var(--sans);
  font-size: clamp(1.3rem, 3vw, 1.55rem);
  font-weight: 500;
  letter-spacing: -0.022em;
  margin-bottom: 2.5rem;
}

.about-body p {
  font-family: var(--sans);
  font-size: 0.95rem;
  line-height: 1.72;
  color: var(--text);
  margin-bottom: 1.3em;
}

.about-body p:last-child { margin-bottom: 0; }

.about-body .note {
  font-style: italic;
  color: var(--muted);
}

.about-cta {
  margin-top: 3rem;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.about-cta a {
  font-size: 0.8rem;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--border);
  transition: color 0.25s var(--ease-soft), text-decoration-color 0.25s;
}

.about-cta a:hover { color: var(--text); text-decoration-color: var(--text); }

/* ─── Mic button (main page → navigates to /record.html) ─── */

.voice-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.62rem 1.1rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 5px;
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--muted);
  white-space: nowrap;
  transition: color 0.2s var(--ease-soft), border-color 0.2s var(--ease-soft);
}

.voice-btn:hover {
  color: var(--text);
  border-color: var(--muted);
}

/* ══════════════════════════════════════
   RECORD PAGE
══════════════════════════════════════ */

.record-wrap {
  padding-top: clamp(3.5rem, 8vh, 6rem);
  padding-bottom: 6rem;
}

.record-eyebrow {
  margin-bottom: 1.25rem;
}

.record-rule {
  margin-bottom: 2rem;
}

/* Spectrogram canvas */
.waveform {
  display: block;
  width: 100%;
  height: 140px;
  border-radius: 3px;
}

/* Meta row: status text left, timer right */
.record-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 1rem;
}

.record-status {
  font-size: 0.8rem;
  color: var(--faint);
  letter-spacing: 0.01em;
  transition: color 0.4s var(--ease-soft);
}

.record-status.rec-status-live {
  color: #c0392b;
}

.record-timer {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.05em;
  color: var(--faint);
}

/* Thin time-progress bar */
.record-progress {
  width: 100%;
  height: 1px;
  background: var(--border-faint);
  border-radius: 1px;
  margin-top: 0.6rem;
  overflow: hidden;
}

.record-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--muted);
  border-radius: 1px;
  transition: width 1s linear;
}

/* The big record / stop button */
.record-btn-wrap {
  display: flex;
  justify-content: center;
  margin-top: 2.5rem;
}

.record-btn {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.25s var(--ease-soft),
              color 0.25s var(--ease-soft),
              background 0.25s var(--ease-soft),
              transform 0.2s var(--ease);
}

.record-btn:hover:not(:disabled) {
  border-color: var(--muted);
  color: var(--text);
  transform: scale(1.04);
}

.record-btn:disabled { opacity: 0.35; cursor: not-allowed; }

/* Recording state: red ring pulse */
.record-btn.is-recording {
  border-color: rgba(192, 57, 43, 0.55);
  color: #c0392b;
  background: rgba(192, 57, 43, 0.06);
  animation: recRing 1.8s ease-out infinite;
}

.record-btn.is-uploading {
  border-color: rgba(192, 57, 43, 0.3);
  color: #c0392b;
  opacity: 0.5;
}

@keyframes recRing {
  0%   { box-shadow: 0 0 0 0   rgba(192, 57, 43, 0.30); }
  65%  { box-shadow: 0 0 0 14px rgba(192, 57, 43, 0);   }
  100% { box-shadow: 0 0 0 0   rgba(192, 57, 43, 0);    }
}

/* Icon swap */
.rec-icon-mic  { display: block; }
.rec-icon-stop { display: none;  }
.record-btn.is-recording .rec-icon-mic,
.record-btn.is-uploading .rec-icon-mic  { display: none;  }
.record-btn.is-recording .rec-icon-stop,
.record-btn.is-uploading .rec-icon-stop { display: block; }

/* Permission-denied / error note */
.record-denied {
  font-size: 0.8rem;
  color: var(--muted);
  font-style: italic;
  text-align: center;
  margin-top: 1.75rem;
}

/* Submitted state on the record page */
.record-submitted {
  margin-top: 2.5rem;
  animation: blurReveal 0.7s var(--ease) both;
}

.rec-back-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.78rem;
  color: var(--faint);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--border);
  transition: color 0.25s var(--ease-soft), text-decoration-color 0.25s;
}

.rec-back-link:hover { color: var(--muted); text-decoration-color: var(--muted); }

/* ─── Mobile ─── */

@media (max-width: 540px) {
  .response-footer { flex-direction: column; align-items: stretch; gap: 0.75rem; }
  .email-input { width: 100%; }
  .send-btn { width: 100%; text-align: center; }
  .voice-btn { width: 100%; justify-content: center; }
  .archive-item-header { flex-direction: column; gap: 0.25rem; }
  .archive-meta { text-align: left; }
  .admin-panel { bottom: 1rem; right: 1rem; left: 1rem; min-width: 0; }
  .footer-inner { flex-direction: column; gap: 0.5rem; }
}
