/* frankly.is: the design system's tokens (docs/design/tokens.json), Day and Night. */
@font-face {
  font-family: "Fraunces";
  src: url("/fonts/Fraunces.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("/fonts/HankenGrotesk.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --paper: #f5efe6;
  --surface: #fffaf3;
  --surface-sunk: #ebe3d7;
  --ink: #1f1a17;
  --ink-muted: #675b52;
  --line: #8f8277;
  --pine: #2d5b45;
  --on-pine: #fffaf3;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s6: 24px; --s8: 32px; --s12: 48px;
  --radius-md: 16px;
  color-scheme: light;
}
.night {
  --paper: #141110;
  --surface: #1e1a18;
  --surface-sunk: #0d0b0a;
  --ink: #f3ece3;
  --ink-muted: #b3a69b;
  --line: #7a6d64;
  --pine: #6fae8c;
  --on-pine: #141110;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.45 "Hanken Grotesk", system-ui, sans-serif;
}

main {
  max-width: 480px;
  margin: 0 auto;
  padding: calc(var(--s12) + env(safe-area-inset-top)) var(--s6) calc(var(--s8) + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: var(--s8);
  min-height: 100dvh;
}

h1, h2 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0;
}
h1 { font-size: 30px; line-height: 1.15; }
h2 { font-size: 26px; line-height: 1.2; }
p { margin: 0; }
.eyebrow { font-size: 14px; font-weight: 600; color: var(--ink-muted); letter-spacing: 0.02em; }
.muted { color: var(--ink-muted); }
.note { font-size: 14px; color: var(--ink-muted); }

.sender { display: flex; flex-direction: column; gap: var(--s2); }
.avatar {
  width: 72px; height: 72px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface); color: var(--ink);
  font: 500 30px "Fraunces", serif;
  margin-bottom: var(--s2);
}

.listen { display: flex; flex-direction: column; gap: var(--s3); }
.wave { width: 100%; height: 72px; display: block; }
.clock { display: flex; justify-content: space-between; font-size: 14px; color: var(--ink-muted); font-variant-numeric: tabular-nums; }

.button, .play {
  appearance: none; border: 0; cursor: pointer;
  min-height: 52px; padding: 0 var(--s6);
  border-radius: 999px;
  font: 600 17px "Hanken Grotesk", system-ui, sans-serif;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  text-decoration: none; width: 100%;
}
.primary { background: var(--pine); color: var(--on-pine); }
.quiet { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.play svg { width: 22px; height: 22px; fill: currentColor; }
.play .icon-pause, .play.playing .icon-play { display: none; }
.play.playing .icon-pause { display: inline; }
:focus-visible { outline: 3px solid var(--pine); outline-offset: 3px; }

.after { display: flex; flex-direction: column; gap: var(--s4); }
.problem { color: var(--ink); background: var(--surface); padding: var(--s3) var(--s4); border-radius: var(--radius-md); }
.confirm { color: var(--pine); font-weight: 600; }

footer { margin-top: auto; text-align: center; }
footer a { color: var(--ink-muted); font-size: 14px; }

.home { justify-content: center; text-align: left; }
.home img { width: 180px; height: auto; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
