:root {
  color-scheme: light dark;
  --bg: #0f172a;
  --bg2: #1f2937;
  --card: rgba(17, 24, 39, 0.95);
  --card-soft: rgba(255, 255, 255, 0.06);
  --text: #e5e7eb;
  --muted: #9ca3af;
  --accent: #22c55e;
  --accent-2: #38bdf8;
  --accent-3: #ef4444;
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  --radius: 20px;
}

* { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  overflow-x: clip;
}
body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: linear-gradient(135deg, var(--bg), var(--bg2));
  color: var(--text);
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
}

img {
  max-width: 100%;
}

.page {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) 16px max(28px, env(safe-area-inset-bottom));
  overflow-x: clip;
}

.bell-fill { fill: var(--bg); }
.watch-fill { fill: var(--accent); }
.face-fill { fill: var(--text); }
.detail-fill { fill: var(--bg); }
.outline { stroke: var(--text); 
  stroke-width: 14;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.topbar .eyebrow {
  margin-bottom: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 4px 12px 4px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  font-weight: 800;
  letter-spacing: 0.01em;
  color: var(--text);
  font-size: 1rem;
}

.brand-pill img {
  display: block;
  height: 36px;
  width: 36px;
  object-fit: contain;
  transform: translateY(-1px);
}

.toplinks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.toplinks a,
.chip,
.link-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.95rem;
}

.hero {
  display: grid;
  gap: 18px;
  align-items: start;
}

.card,
.panel,
.faq,
.page-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card,
.panel,
.faq {
  padding: 22px;
}

.eyebrow {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--card-soft);
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 10px;
}

h1, h2, h3 {
  margin: 0;
  line-height: 1.15;
}

h1 {
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  margin-bottom: 12px;
}

h2 {
  font-size: clamp(1.25rem, 2.4vw, 1.7rem);
  margin-bottom: 12px;
}

h3 {
  font-size: 1rem;
  margin-bottom: 6px;
}

p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.6;
}

.lede {
  font-size: 1.05rem;
}

.controls {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.field {
  display: grid;
  gap: 8px;
}

label {
  font-weight: 700;
  color: var(--text);
}

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

.interval-parts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.interval-part {
  display: grid;
  gap: 6px;
}

.interval-part label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--muted);
}

input[type="number"] {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  background: rgba(255,255,255,0.04);
}

@keyframes inputPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(56, 189, 248, 0);
    border-color: var(--border);
  }
  35% {
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.22);
    border-color: rgba(56, 189, 248, 0.85);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(56, 189, 248, 0);
    border-color: var(--border);
  }
}

input[type="number"].input-pulse {
  animation: inputPulse 320ms ease-out;
}

a {
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

@media (prefers-reduced-motion: reduce) {
  input[type="number"].input-pulse {
    animation: none;
  }
}

.suffix {
  color: var(--muted);
  font-size: 0.95rem;
  white-space: nowrap;
}

.preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  cursor: pointer;
  font: inherit;
  color: var(--text);
}

.button-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

button {
  border: 0;
  border-radius: 14px;
  min-height: 50px;
  padding: 12px 16px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.08s ease, opacity 0.2s ease;
}

button:active { transform: translateY(1px); }
button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.button-row button:disabled {
  background: rgba(255,255,255,0.12);
  color: var(--muted);
  opacity: 1;
}

.start { background: var(--accent); color: #052e16; }
.test { background: var(--accent-2); color: #082f49; }
.stop { background: var(--accent-3); color: white; }

.status-grid {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.status,
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  max-width: 100%;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: var(--text);
}

.status.running {
  background: rgba(34, 197, 94, 0.22);
  color: #bbf7d0;
}

.hint {
  font-size: 0.94rem;
  margin-top: 14px;
}

.ios-hint {
  margin-top: 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: #fde68a;
}

.section-stack {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.hero-side {
  display: grid;
  gap: 18px;
}

.bullets {
  display: grid;
  gap: 10px;
}

.bullet {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
}

.bullet strong,
.page-card strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
}

.pages-grid,
.feature-grid,
.use-grid,
.footer-grid {
  display: grid;
  gap: 12px;
}

.page-card {
  padding: 16px;
  transition: transform 0.12s ease, border-color 0.12s ease;
}

.page-card:hover,
.page-card:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(255,255,255,0.16);
}

.page-card span {
  display: inline-block;
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.5;
}

.faq-item + .faq-item {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.footer {
  margin-top: 18px;
  padding: 18px 0 6px;
  color: var(--muted);
  font-size: 0.94rem;
}

.footer small {
  display: block;
  margin-top: 8px;
  line-height: 1.5;
}

@media (min-width: 860px) {
  .hero {
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.95fr);
    align-items: stretch;
  }

  .hero-side > .panel {
    height: 100%;
  }

  .pages-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .feature-grid,
  .use-grid,
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .page {
    padding-left: 12px;
    padding-right: 12px;
  }

  .card,
  .panel,
  .faq {
    padding: 18px;
  }

  .button-row,
  .input-wrap {
    grid-template-columns: 1fr;
  }

  .status,
  .pill {
    width: 100%;
  }
}
