/* The app's palette (Shared/Palette.swift). The site is dark only, like the app. */
:root {
  --deep: #120e0b;
  --mid: #291d16;
  --glow: #9e6b42;
  --btn-top: #4d3626;
  --btn-bottom: #291c14;
  --sand: #f5e8d6;
  --muted: #b9a792;
  --line: rgba(245, 232, 214, 0.14);
  --panel: rgba(245, 232, 214, 0.05);
  --link: #e3b385;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--deep) radial-gradient(ellipse 90% 60% at 50% 0%, var(--mid), var(--deep) 70%) no-repeat;
  color: var(--sand);
  font: 17px/1.65 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  min-height: 100vh;
}
a { color: var(--link); text-underline-offset: 2px; }
a:hover { color: var(--sand); }
:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--sand); color: var(--deep); padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }

header.site, footer.site, main { max-width: 46rem; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
header.site { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; padding-top: 16px; padding-bottom: 8px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--sand); text-decoration: none; font-weight: 600; letter-spacing: 0.01em; }
.brand img { border-radius: 7px; }
header.site nav, footer.site nav { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14px; }
header.site nav a, footer.site nav a { color: var(--muted); text-decoration: none; }
header.site nav a:hover, header.site nav a[aria-current] { color: var(--sand); }
@media (max-width: 640px) { header.site nav { display: none; } }

main { padding-bottom: 48px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: clamp(30px, 6vw, 44px); margin: 28px 0 12px; }
h2 { font-size: 24px; margin: 40px 0 10px; }
h3 { font-size: 18px; margin: 22px 0 6px; }
p, li { color: #eadccb; }
.lede { font-size: 19px; color: var(--muted); max-width: 36rem; }

.hero { text-align: center; }
.hero .lede { margin: 0 auto; }

/* Player */
.player {
  margin: 28px auto 8px; padding: 28px 16px 22px; max-width: 34rem;
  background: var(--panel); border: 1px solid var(--line); border-radius: 28px; text-align: center;
}
.dial { position: relative; width: 168px; height: 168px; margin: 0 auto; }
.dial::before {
  content: ""; position: absolute; inset: -34px; border-radius: 50%;
  background: radial-gradient(circle, rgba(158, 107, 66, 0.45), transparent 65%);
  opacity: 0.35; transition: opacity 0.8s ease;
}
.is-playing .dial::before { opacity: 1; animation: breathe 6s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.06); } }
@media (prefers-reduced-motion: reduce) { .is-playing .dial::before { animation: none; } }
.play {
  position: relative; width: 168px; height: 168px; border-radius: 50%; cursor: pointer;
  background: linear-gradient(var(--btn-top), var(--btn-bottom));
  border: 1px solid rgba(245, 232, 214, 0.22); color: var(--sand);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(245, 232, 214, 0.12);
  transition: transform 0.15s ease;
}
.play:active { transform: scale(0.97); }
.play svg { width: 56px; height: 56px; fill: currentColor; }
.play .i-pause, .is-playing .play .i-play { display: none; }
.is-playing .play .i-pause { display: inline; }
.status { margin: 18px 0 0; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.blurb { margin: 2px 0 16px; color: var(--muted); font-size: 15px; }

.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.chip, .timer {
  font: inherit; font-size: 15px; color: rgba(245, 232, 214, 0.75); cursor: pointer;
  background: rgba(245, 232, 214, 0.09); border: 1px solid transparent; border-radius: 999px; padding: 8px 16px; min-height: 40px;
}
.chip[aria-checked="true"], .timer[aria-pressed="true"] { background: rgba(245, 232, 214, 0.92); color: var(--deep); font-weight: 600; }

.volume { display: flex; align-items: center; gap: 12px; max-width: 22rem; margin: 22px auto 0; font-size: 14px; color: var(--muted); }
.volume input { flex: 1; accent-color: var(--sand); min-height: 32px; }
.timers { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 8px; margin-top: 16px; font-size: 14px; color: var(--muted); }
.timers > span:first-child { margin-right: 4px; }
.timer { font-size: 13px; padding: 6px 12px; min-height: 34px; }
.countdown { width: 100%; min-height: 1.4em; font-variant-numeric: tabular-nums; }

/* Content */
.answer, .how { max-width: 40rem; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 12px; margin-top: 36px; }
.card { display: block; padding: 16px 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); color: var(--sand); text-decoration: none; }
.card:hover { border-color: rgba(245, 232, 214, 0.3); color: var(--sand); }
.card h2 { font-size: 18px; margin: 0 0 4px; }
.card p { margin: 0; font-size: 15px; color: var(--muted); }

.prose { max-width: 40rem; }
.answer-first { font-size: 18px; padding: 14px 18px; border-left: 3px solid var(--glow); background: var(--panel); border-radius: 0 14px 14px 0; }
.prose li { margin: 6px 0; }

.button {
  display: inline-block; padding: 11px 20px; border-radius: 999px; text-decoration: none; font-weight: 600;
  background: var(--sand); color: var(--deep);
}
.button:hover { background: #fff; color: var(--deep); }

.table-wrap { overflow-x: auto; margin: 20px 0; border: 1px solid var(--line); border-radius: 14px; }
table { border-collapse: collapse; width: 100%; min-width: 36rem; font-size: 15px; }
caption { text-align: left; padding: 10px 14px; color: var(--muted); font-size: 13px; }
th, td { text-align: left; vertical-align: top; padding: 10px 14px; border-top: 1px solid var(--line); }
thead th { color: var(--muted); font-weight: 600; font-size: 13px; }

.faq .qa { border-top: 1px solid var(--line); }
.faq .qa h3 { margin-top: 16px; }
.faq .qa p { margin-top: 4px; }

.sources ol { font-size: 14px; color: var(--muted); padding-left: 20px; }
.sources li { color: var(--muted); }

.cta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; margin: 44px 0 0; padding: 18px;
  border: 1px solid var(--line); border-radius: 22px; background: var(--panel);
}
.cta img { border-radius: 14px; }
.cta div { flex: 1 1 14rem; }
.cta p { margin: 0; font-size: 15px; color: var(--muted); }
.cta .cta-title { color: var(--sand); font-weight: 600; font-size: 16px; }

.shot { margin: 24px 0; }
.shot img { width: min(100%, 300px); height: auto; border-radius: 28px; border: 1px solid var(--line); }

footer.site { border-top: 1px solid var(--line); padding-top: 20px; padding-bottom: 40px; font-size: 13px; color: var(--muted); }
footer.site p { color: var(--muted); margin: 10px 0 0; }

/* Focus timer (study page) */
.focus {
  margin: 28px auto 0; padding: 22px 16px; max-width: 34rem; text-align: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: 28px;
}
.focus .phase { margin: 0; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.focus .clock { margin: 4px 0; font-size: clamp(56px, 16vw, 84px); font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.focus .round { margin: 0 0 16px; color: var(--muted); font-size: 15px; }
.focus[data-state="break"] .clock { color: var(--muted); }
.focus-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.focus .button { border: 0; font: inherit; font-weight: 600; cursor: pointer; min-height: 44px; }
.ghost {
  font: inherit; font-size: 15px; color: var(--sand); cursor: pointer; min-height: 44px; padding: 10px 18px;
  background: transparent; border: 1px solid var(--line); border-radius: 999px;
}
.ghost:disabled { opacity: 0.4; cursor: default; }
.focus + .player { margin-top: 12px; }
