:root {
  color-scheme: dark;
  --font-body: "Palatino Linotype", "Book Antiqua", Palatino, "Georgia",
    "Times New Roman", serif;
  --font-display: "Georgia", "Times New Roman", serif;
  --bg-1: #1c1512;
  --bg-2: #2a1f1a;
  --accent: #d9643f;
  --ink: #f4ede7;
  --muted: #c4b2a9;
  --card: #201a17;
  --panel: rgba(32, 26, 23, 0.85);
  --surface: #241e1a;
  --ring: rgba(217, 100, 63, 0.45);
  --shadow: 0 24px 60px rgba(8, 6, 5, 0.6);
  --radius-lg: 24px;
  --radius-md: 16px;
}

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

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: linear-gradient(135deg, var(--bg-1), var(--bg-2));
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  font-weight: 600;
}

a:hover {
  color: var(--accent);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 32px 7vw 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 16px;
  box-shadow: var(--shadow);
}

.brand-title {
  font-weight: 700;
  font-size: 20px;
}

.brand-subtitle {
  font-size: 14px;
  color: var(--muted);
}

.site-nav {
  display: flex;
  gap: 18px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

main {
  padding: 0 7vw 80px;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
  align-items: center;
  padding-top: 24px;
}

.hero-copy h1 {
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.05;
  margin-bottom: 18px;
}

.hero-copy p {
  font-size: 18px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 480px;
}

.timer-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 16px;
  justify-items: center;
  position: relative;
  isolation: isolate;
}

.mode-indicator {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.timer-display {
  font-family: var(--font-display);
  font-size: clamp(48px, 9vw, 88px);
  letter-spacing: 0.08em;
}

.session-meta {
  font-size: 14px;
  color: var(--muted);
}

.controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

button {
  border: none;
  border-radius: 999px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:focus {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

button:hover {
  transform: translateY(-1px);
}

.primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 20px var(--ring);
}

.secondary {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid rgba(47, 36, 31, 0.2);
}

.ghost {
  background: transparent;
  color: var(--muted);
  border: 1px dashed rgba(47, 36, 31, 0.3);
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(47, 36, 31, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), rgba(217, 100, 63, 0.5));
  transition: width 0.4s ease;
}

.panel {
  background: var(--panel);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
}

.panel-header h2 {
  font-size: 24px;
  margin-bottom: 6px;
}

.panel-header p {
  color: var(--muted);
  margin-bottom: 20px;
}

.seo-story {
  display: grid;
  gap: 24px;
}

.story-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.story-grid h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.story-grid p {
  color: var(--muted);
  line-height: 1.6;
}

.feature-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.feature-card {
  padding: 18px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid rgba(47, 36, 31, 0.15);
}

.feature-card h3 {
  margin-bottom: 8px;
  font-size: 18px;
}

.feature-card p {
  color: var(--muted);
  line-height: 1.6;
}

.stat-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin-bottom: 18px;
}

.stat-card {
  padding: 18px;
  border-radius: var(--radius-md);
  background: rgba(47, 36, 31, 0.2);
  border: 1px solid rgba(47, 36, 31, 0.2);
}

.stat-value {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
}

.stat-label {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.feature-list {
  list-style: disc;
  padding-left: 20px;
  color: var(--muted);
  display: grid;
  gap: 10px;
  line-height: 1.6;
}

.pill-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill-grid span {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(217, 100, 63, 0.12);
  border: 1px solid rgba(217, 100, 63, 0.35);
  font-size: 13px;
  letter-spacing: 0.02em;
}

.faq-item {
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid rgba(47, 36, 31, 0.2);
  padding: 14px 16px;
  margin-bottom: 12px;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 600;
}

.faq-item p {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.6;
}

.settings-grid {
  display: grid;
  gap: 18px;
}

.settings-grid label {
  display: grid;
  gap: 8px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.settings-grid input[type="number"],
.settings-grid select {
  border-radius: 12px;
  border: 1px solid rgba(47, 36, 31, 0.2);
  padding: 10px 12px;
  font-size: 16px;
  background: var(--surface);
  color: var(--ink);
}

.settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.history-list {
  display: grid;
  gap: 12px;
}

.history-item {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid rgba(47, 36, 31, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}

.history-item span {
  color: var(--muted);
  font-size: 12px;
}

.site-footer {
  padding: 0 7vw 48px;
  color: var(--muted);
}

.site-footer p {
  max-width: 520px;
  line-height: 1.6;
}

.noscript {
  margin: 24px 7vw;
  padding: 16px;
  background: var(--panel);
  border-radius: 12px;
}

.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(0px);
  opacity: 0.5;
  z-index: -1;
  animation: float 12s ease-in-out infinite;
}

.orb-a {
  width: 320px;
  height: 320px;
  background: rgba(217, 100, 63, 0.18);
  top: -120px;
  left: -80px;
}

.orb-b {
  width: 420px;
  height: 420px;
  background: rgba(47, 36, 31, 0.1);
  bottom: -140px;
  right: -120px;
  animation-delay: -4s;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(18px);
  }
}

@media (max-width: 720px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  main {
    padding: 0 6vw 72px;
    gap: 36px;
  }

  .hero-copy h1 {
    font-size: clamp(28px, 7vw, 44px);
  }

  .hero-copy p {
    font-size: 16px;
  }

  .site-nav {
    flex-wrap: wrap;
  }

  .timer-card {
    padding: 24px;
  }
}

@media (max-width: 520px) {
  .site-header {
    padding: 24px 6vw 8px;
  }

  main {
    padding: 0 6vw 64px;
  }

  .brand {
    gap: 10px;
  }

  .logo {
    width: 38px;
    height: 38px;
    font-size: 14px;
  }

  .controls {
    width: 100%;
  }

  .controls button {
    flex: 1 1 100%;
  }

  .timer-display {
    letter-spacing: 0.04em;
  }

  .panel {
    padding: 22px;
  }

  .history-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}
