:root {
  --bg: #f7f1e8;
  --bg-soft: #f1e7d6;
  --ink: #2a1d2c;
  --ink-soft: #4a3a4d;
  --muted: #7a6a7d;
  --line: #d9c9b1;
  --plum: #4b1d3f;
  --plum-ink: #f8efff;
  --gold: #b8860b;
  --gold-soft: #e8c976;
  --stage: #fffaf0;
  --keep: #2f6b4f;
  --cut: #a94442;
  --pause: #b8860b;
  --shadow: 0 1px 2px rgba(42, 29, 44, 0.08), 0 8px 24px rgba(42, 29, 44, 0.08);
  --radius: 14px;
  --radius-sm: 8px;
  --max: 1180px;
  --font: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--plum);
  color: var(--plum-ink);
  padding: 8px 12px;
  z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; }

.site-header {
  background: var(--plum);
  color: var(--plum-ink);
  padding: 14px clamp(12px, 3vw, 32px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  background: var(--gold);
  color: var(--plum);
  border-radius: 50%;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-size: 1.15rem; letter-spacing: 0.3px; }
.brand-sub { font-size: 0.78rem; opacity: 0.85; }

.site-nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-nav a {
  color: var(--plum-ink);
  text-decoration: none;
  font-weight: 600;
  padding: 4px 2px;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover, .site-nav a:focus { border-bottom-color: var(--gold-soft); }

.layout {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(20px, 4vw, 48px) clamp(12px, 3vw, 32px);
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.section-head h1, .section-head h2 {
  font-family: var(--serif);
  color: var(--plum);
  margin: 0 0 6px;
  letter-spacing: -0.5px;
}
.section-head h1 { font-size: clamp(1.8rem, 3.2vw, 2.4rem); }
.section-head h2 { font-size: clamp(1.4rem, 2.4vw, 1.8rem); }
.lede { color: var(--ink-soft); margin: 0 0 20px; max-width: 60ch; }

.planner-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr);
  gap: 24px;
  align-items: start;
}

.script-panel, .timing-panel {
  background: var(--stage);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--ink-soft);
}
input[type="text"], input[type="number"], select, textarea {
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  width: 100%;
}
textarea {
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.6;
  resize: vertical;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
  border-color: var(--gold);
}

.row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
  padding: 10px;
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
}
.presets-label { font-size: 0.85rem; color: var(--muted); margin-right: 4px; }
.chip {
  font: inherit;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 0.85rem;
}
.chip:hover, .chip:focus { border-color: var(--gold); color: var(--plum); }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}
.btn {
  font: inherit;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--plum);
  background: #fff;
  color: var(--plum);
  cursor: pointer;
}
.btn:hover { background: var(--bg-soft); }
.btn.primary {
  background: var(--plum);
  color: var(--plum-ink);
  border-color: var(--plum);
}
.btn.primary:hover { background: #3a1630; }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--ink-soft); }

.timing-panel h2 { font-family: var(--serif); color: var(--plum); margin: 0 0 14px; }
.timing-panel h3 { font-size: 0.95rem; color: var(--ink-soft); margin: 18px 0 8px; }

.big-clock {
  background: var(--plum);
  color: var(--plum-ink);
  border-radius: var(--radius-sm);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.clock-row { display: flex; justify-content: space-between; align-items: baseline; }
.clock-label { font-size: 0.85rem; opacity: 0.85; }
.clock-value { font-family: var(--serif); font-size: 1.2rem; font-weight: 700; }
.clock-value.over { color: #f6c0b6; }
.clock-value.under { color: var(--gold-soft); }

.meter {
  position: relative;
  height: 14px;
  background: var(--bg-soft);
  border-radius: 999px;
  margin: 14px 0 6px;
  overflow: hidden;
}
.meter-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--keep), var(--gold));
  transition: width 0.25s ease;
}
.meter-target {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 2px;
  background: var(--plum);
}
.meter-note { font-size: 0.85rem; color: var(--ink-soft); margin: 0 0 8px; }

.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 0.85rem; color: var(--ink-soft); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }
.dot.keep { background: var(--keep); }
.dot.cut { background: var(--cut); }
.dot.pause { background: var(--pause); }

.cut-list, .saved-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cut-list li, .saved-list li {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.cut-list li.cut-empty { color: var(--muted); font-style: italic; justify-content: flex-start; }
.cut-list li .cut-actions { display: flex; gap: 6px; }
.cut-list li button, .saved-list li button {
  font: inherit;
  font-size: 0.78rem;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  cursor: pointer;
}
.cut-list li button:hover, .saved-list li button:hover { border-color: var(--gold); }
.saved-list li .saved-name { font-weight: 600; }
.saved-list li .saved-meta { color: var(--muted); font-size: 0.8rem; }

.script-output {
  margin-top: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.script-output h3 { font-family: var(--serif); color: var(--plum); margin: 0 0 12px; }
.marked-line { margin: 0 0 10px; line-height: 1.7; font-family: var(--serif); }
.marked-line .kept { color: var(--ink); }
.marked-line .cut { color: var(--cut); text-decoration: line-through; opacity: 0.7; }
.marked-line .pause { color: var(--pause); font-style: italic; }

.example-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.example {
  background: var(--stage);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.example h3 { font-family: var(--serif); color: var(--plum); margin: 0 0 4px; }
.example-meta { color: var(--muted); font-size: 0.85rem; margin: 0 0 10px; }
.example blockquote { margin: 0 0 10px; padding: 0; border: 0; font-family: var(--serif); }
.example blockquote p { margin: 0; line-height: 1.6; }
.example-note { font-size: 0.9rem; color: var(--ink-soft); margin: 0; }
.example .kept { color: var(--ink); }
.example .cut { color: var(--cut); text-decoration: line-through; opacity: 0.7; }
.example .pause { color: var(--pause); font-style: italic; }

.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.guide-block, .note-card {
  background: var(--stage);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.guide-block h3, .note-card h3 { font-family: var(--serif); color: var(--plum); margin: 0 0 10px; }
.guide-block ul, .guide-block ol { margin: 0; padding-left: 20px; }
.guide-block li { margin-bottom: 6px; }
.guide-block dl { margin: 0; }
.guide-block dt { font-weight: 700; margin-top: 8px; color: var(--ink); }
.guide-block dd { margin: 2px 0 0; color: var(--ink-soft); }
.note-card { background: var(--bg-soft); }

.muted { color: var(--muted); }
.small { font-size: 0.85rem; }

.site-footer {
  background: var(--plum);
  color: var(--plum-ink);
  margin-top: 32px;
  padding: 24px clamp(12px, 3vw, 32px);
}
.footer-inner { max-width: var(--max); margin: 0 auto; display: flex; flex-direction: column; gap: 8px; }
.footer-inner nav { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-inner a { color: var(--plum-ink); }
.footer-inner a:hover { color: var(--gold-soft); }

@media (max-width: 880px) {
  .planner-grid { grid-template-columns: 1fr; }
}

@media print {
  body { background: #fff; color: #000; }
  .site-header, .site-footer, .toolbar, .presets, .timing-panel, .examples, .guide, .skip-link, .site-nav { display: none; }
  .script-panel { box-shadow: none; border: 0; padding: 0; }
  .script-output { box-shadow: none; border: 0; padding: 0; }
  .marked-line .cut { opacity: 0.5; }
}



/* 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;
}
