:root {
  --bg: #fff7f4;
  --surface: #ffffff;
  --surface-soft: #fff0ec;
  --text: #241f21;
  --muted: #6f6265;
  --border: rgba(36,31,33,.12);
  --accent: #d95550;
  --accent-strong: #bd3f3a;
  --accent-soft: rgba(217,85,80,.14);
  --success: #237b57;
  --warning: #9a651e;
  --shadow: 0 24px 70px rgba(81,38,35,.14);
  --radius-xl: 32px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --max: 1120px;
  --focus-ring: 0 0 0 4px rgba(217,85,80,.24);
  color-scheme: light;
}

body[data-mode="short"] {
  --bg: #f1f9fb;
  --surface-soft: #e7f5f8;
  --accent: #2f8aa4;
  --accent-strong: #1f6f86;
  --accent-soft: rgba(47,138,164,.14);
  --shadow: 0 24px 70px rgba(24,81,96,.14);
  --focus-ring: 0 0 0 4px rgba(47,138,164,.24);
}

body[data-mode="long"] {
  --bg: #f5f2ff;
  --surface-soft: #ede8ff;
  --accent: #7656c9;
  --accent-strong: #6043af;
  --accent-soft: rgba(118,86,201,.15);
  --shadow: 0 24px 70px rgba(69,45,130,.16);
  --focus-ring: 0 0 0 4px rgba(118,86,201,.24);
}

body[data-theme="dark"] {
  --bg: #171214;
  --surface: #221b1e;
  --surface-soft: #2c2225;
  --text: #fff7f3;
  --muted: #cbbec2;
  --border: rgba(255,255,255,.12);
  --shadow: 0 24px 70px rgba(0,0,0,.38);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, var(--accent-soft), transparent 30rem),
    linear-gradient(180deg, var(--bg), var(--surface));
  color: var(--text);
  line-height: 1.6;
  transition: background .25s ease, color .25s ease;
}

a { color: var(--accent-strong); text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: .14em; }

button, input, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: none; box-shadow: var(--focus-ring); }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -5rem;
  background: var(--surface);
  color: var(--text);
  padding: .7rem 1rem;
  border-radius: 999px;
  z-index: 99;
  border: 1px solid var(--border);
}
.skip-link:focus { top: 1rem; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--border);
}

.nav {
  max-width: var(--max);
  margin: 0 auto;
  padding: .9rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 850;
  letter-spacing: -.03em;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 12px 32px var(--accent-soft);
}

.brand-mark svg { width: 25px; height: 25px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: .35rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a, .ghost-button {
  color: var(--text);
  text-decoration: none;
  border: 1px solid transparent;
  background: transparent;
  padding: .55rem .8rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: .94rem;
}

.nav-links a:hover, .ghost-button:hover { background: var(--surface-soft); }

.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 3.1rem 1rem 1.5rem;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, .98fr);
  gap: 2rem;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  gap: .45rem;
  align-items: center;
  width: fit-content;
  padding: .38rem .72rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 850;
  font-size: .9rem;
  margin-bottom: 1rem;
}

h1, h2, h3 { line-height: 1.12; letter-spacing: -.045em; }
h1 { font-size: clamp(2.35rem, 5.8vw, 5.15rem); margin: 0 0 1rem; }
h2 { font-size: clamp(1.8rem, 3vw, 2.75rem); margin: 0 0 1rem; }
h3 { font-size: 1.35rem; margin: 0 0 .6rem; }

.lead {
  font-size: clamp(1.07rem, 1.7vw, 1.28rem);
  color: var(--muted);
  max-width: 63ch;
  margin: 0 0 1.3rem;
}

.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; align-items: center; }

.primary-link, .secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  border-radius: 999px;
  min-height: 46px;
  padding: .75rem 1.05rem;
  font-weight: 850;
  text-decoration: none;
}

.primary-link {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 14px 32px var(--accent-soft);
}

.secondary-link {
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
}

.trust-row {
  display: flex;
  gap: .7rem;
  flex-wrap: wrap;
  margin-top: 1.3rem;
  color: var(--muted);
  font-size: .95rem;
}

.trust-row span {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .42rem .65rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 65%, transparent);
}

.timer-card {
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: 1rem;
}

.timer-panel {
  background: linear-gradient(180deg, var(--surface-soft), var(--surface));
  border-radius: calc(var(--radius-xl) - 8px);
  padding: 1.1rem;
  border: 1px solid var(--border);
}

.mode-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .55rem;
  margin-bottom: 1rem;
}

.mode-tab {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: .68rem .55rem;
  font-weight: 850;
  font-size: .92rem;
}

.mode-tab[aria-pressed="true"] {
  color: #fff;
  background: var(--accent);
  border-color: transparent;
}

.time-display {
  min-height: 172px;
  display: grid;
  place-items: center;
  border-radius: 28px;
  background:
    radial-gradient(circle at center, rgba(255,255,255,.18), transparent 62%),
    var(--accent);
  color: #fff;
  margin: .7rem 0 1rem;
  box-shadow: inset 0 -22px 40px rgba(0,0,0,.08), 0 18px 42px var(--accent-soft);
}

.time-display strong {
  font-size: clamp(4.2rem, 12vw, 7.4rem);
  line-height: 1;
  letter-spacing: -.08em;
  font-variant-numeric: tabular-nums;
}

.cycle-status {
  display: flex;
  justify-content: space-between;
  gap: .8rem;
  flex-wrap: wrap;
  align-items: center;
  color: var(--muted);
  font-size: .93rem;
  margin: 0 0 1rem;
}

.timer-actions {
  display: grid;
  grid-template-columns: 1.35fr .8fr .8fr;
  gap: .7rem;
}

.action-button {
  border: 0;
  min-height: 52px;
  border-radius: 18px;
  font-weight: 900;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 16px 34px var(--accent-soft);
}

.small-button {
  border: 1px solid var(--border);
  min-height: 52px;
  border-radius: 18px;
  background: var(--surface);
  color: var(--text);
  font-weight: 850;
}

.small-button:hover, .action-button:hover, .primary-link:hover { transform: translateY(-1px); }

.settings {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .65rem;
  margin-top: .9rem;
}

.settings label {
  display: grid;
  gap: .32rem;
  font-size: .84rem;
  color: var(--muted);
  font-weight: 750;
}

.settings input {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 14px;
  padding: .62rem .7rem;
  font-weight: 800;
}

.option-row {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
  margin-top: .85rem;
}

.toggle-pill {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: .55rem .75rem;
  font-weight: 800;
  font-size: .9rem;
}

.toggle-pill[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
  color: var(--accent-strong);
}

.task-card {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.task-card h2 { font-size: 1.18rem; margin-bottom: .75rem; }

.task-form { display: grid; grid-template-columns: 1fr auto; gap: .55rem; }
.task-form input {
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface);
  color: var(--text);
  padding: .72rem .82rem;
  min-width: 0;
}
.task-form button { border: 0; border-radius: 15px; background: var(--text); color: var(--surface); padding: .72rem .9rem; font-weight: 900; }

.task-list { list-style: none; margin: .8rem 0 0; padding: 0; display: grid; gap: .5rem; }
.task-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: .65rem;
  align-items: center;
  padding: .64rem .7rem;
  background: var(--surface-soft);
  border-radius: 15px;
  border: 1px solid var(--border);
}
.task-item input { width: 18px; height: 18px; accent-color: var(--accent); }
.task-item span { font-weight: 750; overflow-wrap: anywhere; }
.task-item.done span { color: var(--muted); text-decoration: line-through; }
.delete-task { border: 0; background: transparent; color: var(--muted); font-size: 1.15rem; border-radius: 999px; width: 34px; height: 34px; }
.delete-task:hover { color: var(--accent-strong); background: var(--surface); }

.empty-state { margin: .85rem 0 0; color: var(--muted); font-size: .94rem; }

.privacy-notice {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 80;
  max-width: 980px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .9rem;
  align-items: center;
  padding: .95rem 1rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  box-shadow: 0 18px 50px rgba(0,0,0,.16);
  color: var(--muted);
  backdrop-filter: blur(18px);
}

.privacy-notice[hidden] { display: none; }

.privacy-notice p { margin: 0; font-size: .93rem; }
.privacy-notice strong { color: var(--text); }

.privacy-notice button {
  border: 0;
  border-radius: 999px;
  padding: .62rem .9rem;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
  white-space: nowrap;
}

.content-section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 3rem 1rem;
}

.section-grid {
  display: grid;
  grid-template-columns: .75fr 1.25fr;
  gap: 2rem;
  align-items: start;
}

.section-kicker {
  color: var(--accent-strong);
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-size: .82rem;
  margin-bottom: .7rem;
}

.prose {
  color: var(--muted);
  font-size: 1.04rem;
}

.prose p { margin: 0 0 1rem; }
.prose strong { color: var(--text); }

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.3rem;
}

.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.1rem;
  box-shadow: 0 14px 35px rgba(0,0,0,.04);
}

.info-card .icon {
  width: 42px;
  height: 42px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 950;
  margin-bottom: .85rem;
}

.steps {
  counter-reset: step;
  display: grid;
  gap: .8rem;
  padding: 0;
  margin: 1.2rem 0 0;
  list-style: none;
}

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: .85rem;
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: .9rem;
}

.steps li::before {
  content: counter(step);
  width: 44px;
  height: 44px;
  border-radius: 15px;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 950;
}

.faq-list { display: grid; gap: .8rem; }

details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 0;
  overflow: hidden;
}

summary {
  padding: 1rem 1.1rem;
  cursor: pointer;
  font-weight: 900;
  color: var(--text);
}

details p { margin: 0; padding: 0 1.1rem 1rem; color: var(--muted); }

.footer {
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  margin-top: 2rem;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem 1rem;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: .95rem;
}

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

.visually-hidden { position: absolute; left: -9999px; }

@media (max-width: 900px) {
  .hero, .section-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 2rem; }
  .timer-card { order: -1; }
  .cards-grid { grid-template-columns: 1fr; }
  .nav-links a { display: none; }
}

@media (max-width: 560px) {
  .nav { padding: .75rem .85rem; }
  .brand span:last-child { font-size: .95rem; }
  .hero, .content-section { padding-left: .85rem; padding-right: .85rem; }
  .mode-tabs, .settings, .timer-actions { grid-template-columns: 1fr; }
  .time-display { min-height: 150px; border-radius: 24px; }
  .time-display strong { font-size: 4.25rem; }
  .task-form { grid-template-columns: 1fr; }
  h1 { font-size: 2.45rem; }
  .privacy-notice { grid-template-columns: 1fr; align-items: stretch; }
  .privacy-notice button { width: 100%; }
}
