:root {
  --bg: #ffffff;
  --bg-soft: #f5f7fb;
  --text: #14182b;
  --muted: #5b6478;
  --border: #e3e7ef;
  --primary: #2f5bea;
  --primary-ink: #ffffff;
  --primary-soft: #e8eeff;
  --day: #fde9a8;   --day-ink: #6b4c00;
  --eve: #ffd3b5;   --eve-ink: #7a3300;
  --night: #c9d4ff; --night-ink: #1f2c70;
  --off: #f1f3f7;   --off-ink: #9aa2b4;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(20,24,43,.06), 0 8px 24px rgba(20,24,43,.06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1220; --bg-soft: #161a2c; --text: #e9ecf5; --muted: #9aa3b8;
    --border: #2a3049; --primary: #6d8cff; --primary-ink: #0f1220; --primary-soft: #1f2748;
    --day: #5a4a14; --day-ink: #ffe9a3;
    --eve: #5c3418; --eve-ink: #ffd0ae;
    --night: #263063; --night-ink: #cbd5ff;
    --off: #1b2034; --off-ink: #5d667e;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font-family: var(--font); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.nav .container { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--text); }
.logo:hover { text-decoration: none; }
.logo-img { width: 34px; height: 34px; display: block; }
.nav-links { display: flex; align-items: center; gap: 24px; font-size: 15px; }
.nav-links a { color: var(--muted); }
.nav-links a.btn { color: var(--primary-ink); }
@media (max-width: 720px) { .nav-links a:not(.btn) { display: none; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 10px; font-weight: 600; font-size: 15px; border: 1px solid transparent; cursor: pointer; font-family: inherit; transition: transform .05s, background .15s; }
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: var(--primary-ink); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--bg-soft); }
.btn-lg { padding: 14px 24px; font-size: 16px; }

/* Sections */
section { padding: 80px 0; }
.section-soft { background: var(--bg-soft); }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--primary); background: var(--primary-soft); padding: 4px 10px; border-radius: 999px; }
h1 { font-size: clamp(34px, 5vw, 56px); line-height: 1.1; letter-spacing: -0.02em; margin: 16px 0; }
h2 { font-size: clamp(26px, 3.4vw, 38px); line-height: 1.2; letter-spacing: -0.01em; margin: 12px 0 16px; }
h3 { font-size: 19px; margin: 0 0 8px; }
.lead { font-size: 19px; color: var(--muted); max-width: 620px; }
.center { text-align: center; }
.center .lead { margin: 0 auto; }
.muted { color: var(--muted); }

/* Hero */
.hero { padding: 72px 0 64px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 28px 0 14px; }
.hero-note { font-size: 14px; color: var(--muted); }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

.preview-card { background: var(--bg); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); padding: 16px; overflow: hidden; }
.preview-card .bar { display: flex; gap: 6px; margin-bottom: 12px; }
.preview-card .bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--border); }

/* Cards */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 40px; }
@media (max-width: 860px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }
.card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.card p { margin: 0; color: var(--muted); }
.icon { width: 40px; height: 40px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; margin-bottom: 14px; font-size: 20px; }
.pattern-card { display: flex; flex-direction: column; gap: 10px; color: var(--text); transition: border-color .15s, transform .15s; }
.pattern-card:hover { border-color: var(--primary); text-decoration: none; transform: translateY(-2px); }
.pattern-card .meta { font-size: 13px; color: var(--muted); }
.pattern-card .go { margin-top: auto; font-weight: 600; color: var(--primary); font-size: 14px; }
.strip { display: flex; gap: 2px; }
.strip span { flex: 1; height: 14px; border-radius: 3px; }

/* Steps */
.steps { counter-reset: step; }
.steps .card { position: relative; padding-top: 56px; }
.steps .card::before { counter-increment: step; content: counter(step); position: absolute; top: 20px; left: 24px; width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: var(--primary-ink); font-weight: 700; font-size: 14px; display: grid; place-items: center; }

/* Industries */
.tags { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 28px; }
.tag { padding: 8px 16px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg); font-size: 15px; }

/* Waitlist */
.waitlist { max-width: 640px; margin: 0 auto; text-align: center; }
.form-row { display: flex; gap: 10px; margin-top: 24px; }
.form-row input { flex: 1; min-width: 0; }
@media (max-width: 560px) { .form-row { flex-direction: column; } }
.form-msg { margin-top: 12px; font-size: 14px; min-height: 1.4em; }

/* Inputs */
input, select, textarea { font-family: inherit; font-size: 15px; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary); outline-offset: 0; border-color: var(--primary); }
label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.hint { font-size: 13px; color: var(--muted); margin-top: 4px; font-weight: 400; }

/* FAQ */
.faq { max-width: 760px; margin: 40px auto 0; }
.faq details { border-bottom: 1px solid var(--border); padding: 18px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 17px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); margin: 10px 0 0; }

/* Footer */
footer { border-top: 1px solid var(--border); padding: 32px 0; font-size: 14px; color: var(--muted); }
footer .container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
footer a { color: var(--muted); }

/* ---------- Generator ---------- */
.gen-header { padding: 48px 0 24px; }
.gen-layout { display: grid; grid-template-columns: 320px 1fr; gap: 24px; align-items: start; padding-bottom: 64px; }
@media (max-width: 960px) { .gen-layout { grid-template-columns: 1fr; } }
.panel { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.controls { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 84px; }
@media (max-width: 960px) { .controls { position: static; } }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pattern-desc { font-size: 14px; color: var(--muted); background: var(--bg-soft); border-radius: 10px; padding: 10px 12px; margin-top: 8px; }

.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.toolbar .btn { padding: 8px 14px; font-size: 14px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
@media (max-width: 700px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat { background: var(--bg-soft); border-radius: 10px; padding: 12px 14px; }
.stat b { display: block; font-size: 22px; }
.stat small { color: var(--muted); font-size: 12px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table.schedule { border-collapse: separate; border-spacing: 0; font-size: 13px; width: max-content; min-width: 100%; }
.schedule th, .schedule td { padding: 0; text-align: center; border-bottom: 1px solid var(--border); }
.schedule thead th { position: sticky; top: 0; background: var(--bg-soft); font-weight: 600; padding: 6px 2px; min-width: 40px; }
.schedule thead th .dow { display: block; font-size: 11px; color: var(--muted); font-weight: 500; }
.schedule thead th.weekend { color: var(--primary); }
.schedule th.name, .schedule td.name { position: sticky; left: 0; background: var(--bg); text-align: left; padding: 6px 12px; min-width: 150px; z-index: 1; border-right: 1px solid var(--border); white-space: nowrap; }
.schedule thead th.name { background: var(--bg-soft); z-index: 2; }
.schedule td.name small { color: var(--muted); display: block; font-size: 11px; }
.schedule td.cell { padding: 3px; }
.schedule td.cell span { display: block; border-radius: 6px; padding: 6px 0; font-weight: 700; }
.c-D { background: var(--day); color: var(--day-ink); }
.c-E { background: var(--eve); color: var(--eve-ink); }
.c-N { background: var(--night); color: var(--night-ink); }
.c-O { background: var(--off); color: var(--off-ink); font-weight: 500 !important; }
.schedule tr.team-start td { border-top: 2px solid var(--border); }
.schedule td.total { padding: 6px 12px; font-weight: 600; white-space: nowrap; }
.schedule tfoot td { background: var(--bg-soft); font-size: 12px; color: var(--muted); padding: 6px 2px; }
.schedule tfoot td.name { background: var(--bg-soft); }
.cov-ok { color: #1a8a4a; }
.cov-low { color: #c0392b; font-weight: 700; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 10px; font-size: 14px; opacity: 0; transition: all .2s; pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.seo-content { max-width: 760px; }
.seo-content h2 { font-size: 26px; margin-top: 40px; }
.seo-content p, .seo-content li { color: var(--muted); }

@media print {
  .nav, .controls, .toolbar .actions, footer, .gen-header p, .seo-section, .no-print { display: none !important; }
  .gen-layout { display: block; padding: 0; }
  body { background: #fff; color: #000; }
  .table-wrap { overflow: visible; border: none; }
  .schedule { font-size: 10px; }
  .schedule th.name, .schedule td.name { position: static; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Text pages (About, Privacy, Terms, Contact) */
.page-header { padding: 56px 0 8px; }
.prose { max-width: 760px; padding-bottom: 72px; }
.prose h2 { font-size: 24px; margin: 36px 0 10px; }
.prose p, .prose li { color: var(--muted); }
.prose strong { color: var(--text); }
.prose .updated { font-size: 14px; color: var(--muted); }
.contact-box { display: flex; flex-direction: column; gap: 6px; margin-top: 24px; }
.contact-box .email { font-size: 22px; font-weight: 700; }
