:root {
  --bg: #0f1115;
  --bg-2: #161922;
  --panel: #1c2030;
  --panel-2: #232838;
  --ink: #f4f6fb;
  --muted: #a4aab8;
  --line: #2b3044;
  --accent: #f5b14a;
  --accent-2: #d97a3a;
  --low: #6fb1ff;
  --med: #f5b14a;
  --high: #ff6f7c;
  --good: #6bd49a;
  --bad: #ff6f7c;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px rgba(0,0,0,0.35);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: radial-gradient(1200px 600px at 80% -10%, rgba(245,177,74,0.10), transparent 60%), var(--bg);
  color: var(--ink);
  line-height: 1.55;
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(15,17,21,0.85);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #1a1208;
  border-radius: 12px;
}
.brand-text strong { font-size: 16px; display: block; }
.brand-text small { color: var(--muted); font-size: 12px; }
.topnav { display: flex; gap: 18px; flex-wrap: wrap; }
.topnav a { color: var(--muted); font-size: 14px; }
.topnav a:hover { color: var(--ink); text-decoration: none; }

main { max-width: 1180px; margin: 0 auto; padding: 32px 24px 64px; }
section { margin-top: 56px; }
section:first-of-type { margin-top: 16px; }

.hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 28px;
  align-items: center;
}
.hero h1 {
  font-size: 40px;
  line-height: 1.1;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}
.hero p { color: var(--muted); font-size: 16px; max-width: 560px; }
.hero-cta { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.hero-stats {
  list-style: none;
  display: flex;
  gap: 24px;
  padding: 0;
  margin: 28px 0 0;
}
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 22px; color: var(--accent); }
.hero-stats span { color: var(--muted); font-size: 13px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  background: var(--panel);
  color: var(--ink);
  transition: transform .05s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #1a1208;
}
.btn.ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); }

.hero-card {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.card-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.badge {
  font-size: 12px;
  background: rgba(245,177,74,0.12);
  color: var(--accent);
  border: 1px solid rgba(245,177,74,0.35);
  padding: 4px 8px;
  border-radius: 999px;
}
.mini-timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mini-timeline li {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--line);
  font-size: 14px;
}
.mini-timeline li span {
  display: inline-grid;
  place-items: center;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--bg-2);
  font-size: 12px;
  color: var(--muted);
}
.mini-timeline li.t1 { border-left: 3px solid var(--low); }
.mini-timeline li.t2 { border-left: 3px solid var(--med); }
.mini-timeline li.t3 { border-left: 3px solid var(--high); }
.mini-timeline li.t4 { border-left: 3px solid var(--muted); }
.mini-timeline em { color: var(--muted); font-style: normal; font-size: 12px; }
.card-foot { margin-top: 12px; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot.good { background: var(--good); }

.section-head { margin-bottom: 24px; }
.section-head h2 { font-size: 28px; margin: 0 0 6px; letter-spacing: -0.01em; }
.section-head p { color: var(--muted); margin: 0; max-width: 620px; }

.builder-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.panel h3 { margin: 0 0 6px; font-size: 16px; }
.hint { color: var(--muted); font-size: 13px; margin: 0 0 12px; }

.slot-tabs { display: flex; gap: 4px; margin-bottom: 12px; background: var(--bg-2); padding: 4px; border-radius: 10px; }
.slot-tab {
  flex: 1;
  background: transparent;
  border: 0;
  color: var(--muted);
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
}
.slot-tab.active { background: var(--panel-2); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,0.3); }

.preset-list {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 320px;
  overflow: auto;
}
.preset-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  gap: 8px;
}
.preset-list li .meta { display: flex; flex-direction: column; }
.preset-list li .name { color: var(--ink); }
.preset-list li .sub { color: var(--muted); font-size: 11px; }
.preset-list .add-btn {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--accent);
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
}
.preset-list .add-btn:hover { border-color: var(--accent); }

.custom-form { border-top: 1px dashed var(--line); padding-top: 12px; margin-top: 4px; }
.custom-form summary { cursor: pointer; color: var(--accent); font-size: 13px; padding: 4px 0; }
.custom-form form { display: flex; flex-direction: column; gap: 10px; padding-top: 10px; }
.custom-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.custom-form input, .custom-form select {
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 14px;
}

.timeline-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.timeline-head h3 { margin: 0; font-size: 18px; }
#titleInput { background: var(--bg-2); border: 1px solid var(--line); color: var(--ink); padding: 6px 10px; border-radius: 8px; font-size: 16px; }
.timeline-controls { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.runtime { font-size: 14px; color: var(--muted); margin-right: 6px; }
.runtime strong { color: var(--ink); }

.timeline-wrap {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  min-height: 240px;
  position: relative;
}
.timeline {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
}
.timeline-row {
  display: grid;
  grid-template-columns: 36px 1fr auto auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: grab;
}
.timeline-row:active { cursor: grabbing; }
.timeline-row.dragging { opacity: 0.4; }
.timeline-row.drag-over { border-color: var(--accent); }
.timeline-row .pos { font-size: 12px; color: var(--muted); text-align: center; }
.timeline-row .name { font-weight: 600; font-size: 14px; }
.timeline-row .energy {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  text-transform: capitalize;
}
.energy.low { background: rgba(111,177,255,0.15); color: var(--low); }
.energy.medium { background: rgba(245,177,74,0.15); color: var(--med); }
.energy.high { background: rgba(255,111,124,0.15); color: var(--high); }
.timeline-row .len { color: var(--muted); font-size: 13px; }
.timeline-row .trans {
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  width: 140px;
}
.timeline-row .delete {
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  font-size: 18px;
}
.timeline-row .delete:hover { color: var(--bad); }

.empty-state {
  text-align: center;
  padding: 48px 12px;
  color: var(--muted);
}
.empty-state p { margin: 6px 0; }
.template-row { display: flex; gap: 8px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }

.pacing-readout { margin-top: 14px; }
.meter {
  height: 8px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.meter span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--good), var(--accent), var(--bad));
  transition: width .25s ease;
}
#pacingText { color: var(--muted); font-size: 13px; margin: 8px 0 0; }

.saved { margin-top: 20px; }
.saved-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}
.saved-list li {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.saved-list .saved-meta { display: flex; flex-direction: column; }
.saved-list .saved-name { font-weight: 600; font-size: 14px; }
.saved-list .saved-sub { color: var(--muted); font-size: 12px; }
.saved-list .saved-actions { display: flex; gap: 6px; }
.saved-list .saved-actions button {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
}
.saved-list .saved-actions button:hover { color: var(--accent); border-color: var(--accent); }
.saved-empty { grid-column: 1/-1; color: var(--muted); font-size: 13px; }

.example-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.example {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.example h3 { margin: 4px 0 12px; font-size: 16px; }
.example .eyebrow { color: var(--accent); }
.example-list { padding-left: 20px; margin: 0 0 10px; font-size: 13px; }
.example-list li { margin: 4px 0; color: var(--muted); }
.example-list li strong { color: var(--ink); }
.example-list li em { color: var(--muted); font-style: normal; }
.example .note { color: var(--muted); font-size: 12px; margin: 0; }

.pacing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.pacing-grid article {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.pacing-grid h3 { margin: 0 0 6px; font-size: 15px; color: var(--accent); }
.pacing-grid p { color: var(--muted); font-size: 13px; margin: 0; }

.mistakes {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.mistakes h3 { margin: 0 0 10px; font-size: 15px; }
.mistakes ul { margin: 0; padding-left: 20px; color: var(--muted); font-size: 13px; }
.mistakes li { margin: 4px 0; }

.sheet {
  background: #fdfdf7;
  color: #111;
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid #e8e8df;
}
.sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-bottom: 2px solid #111;
  padding-bottom: 12px;
  margin-bottom: 12px;
}
.sheet-title { font-size: 20px; font-weight: 800; }
.sheet-meta { font-size: 12px; color: #555; margin-top: 4px; }
.sheet-logo { font-size: 11px; color: #555; letter-spacing: 0.08em; text-transform: uppercase; }
.sheet-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.sheet-table th, .sheet-table td { border: 1px solid #111; padding: 8px; text-align: left; }
.sheet-table th { background: #f0f0e5; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; }
.sheet-table td.energy { text-transform: capitalize; }
.sheet-notes { margin-top: 16px; font-size: 13px; }
.sheet-notes ul { padding-left: 20px; margin: 6px 0 0; }

.walk { padding-left: 24px; color: var(--muted); font-size: 14px; }
.walk li { margin: 6px 0; }
.walk strong { color: var(--ink); }

.check { padding-left: 20px; color: var(--muted); font-size: 14px; }
.check li { margin: 4px 0; }
.version { margin-top: 16px; color: var(--muted); font-size: 12px; }

footer {
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  margin-top: 40px;
}
.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-inner strong { display: block; }
.footer-inner p { color: var(--muted); font-size: 13px; margin: 4px 0 0; }
.footer-inner nav { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero h1 { font-size: 32px; }
  .builder-grid { grid-template-columns: 1fr; }
  .timeline-row { grid-template-columns: 32px 1fr auto; grid-template-rows: auto auto; }
  .timeline-row .trans, .timeline-row .energy { grid-column: 1 / -1; width: 100%; }
  .timeline-row .len { grid-column: 2; }
  .timeline-row .delete { grid-column: 3; grid-row: 1; }
  .topnav { gap: 10px; }
}

@media print {
  body { background: #fff; color: #111; }
  .topnav, .hero-cta, .timeline-controls, .builder, .examples, .pacing, .walkthrough, .notes, footer { display: none; }
  .sheet { border: 0; }
  main { padding: 0; }
  section { margin-top: 0; }
}


/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
