:root {
  color-scheme: light;
  --ink: #17231c;
  --muted: #5d6f63;
  --leaf: #2f7d4f;
  --leaf-dark: #1f5f3b;
  --mint: #e9f7ed;
  --cream: #fffaf0;
  --card: #ffffff;
  --line: #dce8de;
  --gold: #d79b31;
  --shadow: 0 24px 70px rgba(28, 74, 45, 0.16);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(74, 153, 96, 0.18), transparent 34rem),
    linear-gradient(135deg, var(--cream), #eef8f0 72%, #e4f2e8);
  color: var(--ink);
}
main { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.hero { padding: 28px 0 22px; }
nav { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 34px; color: var(--muted); font-size: 0.95rem; }
nav a { color: var(--leaf-dark); font-weight: 800; text-decoration: none; }
nav a:hover { text-decoration: underline; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 28px; align-items: stretch; }
.intro, .timer-card, .settings, .info-card, .faq { background: rgba(255,255,255,0.86); border: 1px solid rgba(220,232,222,0.95); border-radius: 28px; box-shadow: var(--shadow); }
.intro { padding: clamp(28px, 5vw, 54px); }
.eyebrow { margin: 0 0 12px; color: var(--leaf-dark); text-transform: uppercase; font-size: 0.78rem; font-weight: 900; letter-spacing: 0.14em; }
h1 { margin: 0; font-size: clamp(2.5rem, 7vw, 5.5rem); line-height: 0.92; letter-spacing: -0.07em; }
.lede { color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.28rem); line-height: 1.65; max-width: 58ch; }
.preset-row, .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
button, select, input { font: inherit; }
.pill, .secondary, .primary { border: 0; border-radius: 999px; padding: 13px 18px; font-weight: 900; cursor: pointer; transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease; }
.pill { background: #f1f8f3; color: var(--leaf-dark); border: 1px solid #cfe5d5; }
.pill.active, .pill:hover { background: var(--leaf); color: white; transform: translateY(-1px); }
.timer-card { padding: clamp(24px, 4vw, 42px); display: flex; flex-direction: column; justify-content: center; text-align: center; min-height: 430px; }
.tea-name { color: var(--leaf-dark); font-weight: 1000; letter-spacing: 0.08em; text-transform: uppercase; }
.time-display { font-variant-numeric: tabular-nums; font-size: clamp(4.2rem, 14vw, 9.5rem); line-height: 1; font-weight: 1000; letter-spacing: -0.08em; margin: 16px 0; }
.progress-wrap { height: 18px; overflow: hidden; background: #e3efe6; border-radius: 999px; border: 1px solid #cfe2d4; }
#progressBar { height: 100%; width: 0%; background: linear-gradient(90deg, var(--leaf), #8ecf78, var(--gold)); border-radius: inherit; transition: width 0.2s linear; }
.steep-note { min-height: 54px; margin: 18px auto 0; color: var(--muted); line-height: 1.45; max-width: 42ch; }
.primary { background: var(--leaf); color: white; box-shadow: 0 12px 28px rgba(47, 125, 79, 0.28); }
.primary:hover, .secondary:hover { transform: translateY(-1px); }
.secondary { background: #edf6f0; color: var(--leaf-dark); border: 1px solid #cfe2d4; }
.actions { justify-content: center; }
.settings, .content-grid, .faq { margin-top: 24px; }
.settings { padding: 26px; }
h2 { margin: 0 0 18px; font-size: clamp(1.55rem, 3vw, 2.2rem); letter-spacing: -0.04em; }
.settings-grid { display: grid; grid-template-columns: 1.2fr 0.7fr 0.7fr; gap: 14px; }
label { display: grid; gap: 8px; color: var(--muted); font-weight: 800; }
input, select { width: 100%; border: 1px solid #cbded0; border-radius: 16px; padding: 13px 14px; background: white; color: var(--ink); font-weight: 900; }
.hint { color: var(--muted); line-height: 1.6; margin: 16px 0 0; }
.content-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.info-card, .faq { padding: 26px; }
.info-card p, li, .faq p { color: var(--muted); line-height: 1.65; }
ol { padding-left: 22px; }
.guide-table { display: grid; gap: 10px; }
.guide-table > div { display: grid; grid-template-columns: 1fr 0.7fr 1.15fr; gap: 10px; align-items: center; padding: 12px; border-radius: 16px; background: #f4faf5; color: var(--muted); }
.guide-table strong { color: var(--ink); }
.faq { margin-bottom: 26px; }
details { border-top: 1px solid var(--line); padding: 16px 0; }
details:first-of-type { border-top: 0; }
summary { cursor: pointer; font-weight: 900; color: var(--ink); }
footer { text-align: center; color: var(--muted); padding: 26px 16px 38px; }
.finished .time-display { color: var(--leaf-dark); }

@media (max-width: 820px) {
  main { width: min(100% - 22px, 680px); }
  nav { align-items: flex-start; flex-direction: column; margin-bottom: 18px; }
  .hero-grid, .content-grid, .settings-grid { grid-template-columns: 1fr; }
  .timer-card { min-height: 360px; }
  .guide-table > div { grid-template-columns: 1fr; }
  .pill, .secondary, .primary { width: 100%; }
}
