:root {
  --bg: #fdfaf6;
  --surface: #ffffff;
  --ink: #1f2937;
  --muted: #6b7280;
  --accent: #f97316;
  --accent-soft: #fff7ed;
  --line: #e5e7eb;
  --good: #16a34a;
  --warn: #d97706;
  --shadow: 0 1px 2px rgba(16,24,40,0.04), 0 4px 12px rgba(16,24,40,0.06);
  --radius: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
}
.brand h1 { font-size: 18px; margin: 0; }
.tagline { margin: 0; color: var(--muted); font-size: 13px; }
.site-nav { display: flex; gap: 16px; flex-wrap: wrap; }
.site-nav a { color: var(--ink); font-size: 14px; }

main { max-width: 1100px; margin: 0 auto; padding: 24px; }

section { margin-bottom: 40px; }

.hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.hero h2 { margin-top: 0; font-size: 28px; line-height: 1.2; }
.hero p { color: var(--muted); }
.hero-meta { font-size: 12px; color: var(--muted); margin-top: 8px; }

.planner {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  align-items: start;
}
.controls {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 80px;
}
.controls h3 { margin-top: 0; font-size: 16px; }
.controls label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
}
.controls input[type="text"],
.controls input[type="date"],
.controls select,
.controls textarea {
  width: 100%;
  padding: 8px 10px;
  margin-top: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
  color: var(--ink);
  background: #fff;
  font-family: inherit;
}
.presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.presets-label { width: 100%; font-size: 12px; color: var(--muted); }
.chip {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }

.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
}
.btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn.ghost { background: transparent; }
.btn:hover { filter: brightness(0.97); }
.save-status { font-size: 12px; color: var(--good); min-height: 16px; margin: 8px 0 0; }

.timeline-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.timeline-header h3 { margin: 0 0 4px; font-size: 18px; }
.timeline-header p { margin: 0 0 16px; color: var(--muted); font-size: 13px; }

.timeline { display: flex; flex-direction: column; gap: 16px; }
.week {
  border-left: 3px solid var(--accent);
  padding: 0 0 0 12px;
}
.week h4 { margin: 0 0 8px; font-size: 15px; }
.week ul { margin: 0; padding: 0; list-style: none; }
.week li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 6px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 14px;
}
.week li:last-child { border-bottom: none; }
.week li.done label { color: var(--muted); text-decoration: line-through; }
.week li input[type="checkbox"] { margin-top: 3px; accent-color: var(--accent); }
.week li label { flex: 1; }
.week li .due { font-size: 11px; color: var(--muted); white-space: nowrap; }

.progress { margin-top: 20px; }
.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar span {
  display: block;
  height: 100%;
  background: var(--accent);
  width: 0;
  transition: width 0.2s ease;
}
.progress p { margin: 6px 0 0; font-size: 12px; color: var(--muted); }

.content-notes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.content-notes article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
.content-notes h3 { margin-top: 0; font-size: 16px; }
.content-notes p, .content-notes li { color: var(--ink); font-size: 14px; }
.content-notes ul { padding-left: 18px; }

.reference { width: 100%; border-collapse: collapse; font-size: 14px; }
.reference th, .reference td {
  text-align: left;
  padding: 8px;
  border-bottom: 1px solid var(--line);
}
.reference th { background: var(--accent-soft); color: var(--ink); }

.about {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.about h3 { margin-top: 0; }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 20px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.site-footer nav { margin-top: 6px; display: flex; gap: 12px; justify-content: center; }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; }
  .planner { grid-template-columns: 1fr; }
  .controls { position: static; }
  .content-notes { grid-template-columns: 1fr; }
  .site-header { flex-direction: column; align-items: flex-start; gap: 8px; }
}

@media print {
  body { background: #fff; }
  .site-header, .site-footer, .controls, .actions, .save-status, .progress { display: none; }
  .planner { grid-template-columns: 1fr; }
  .timeline-wrap { box-shadow: none; border: none; padding: 0; }
  .content-notes { display: none; }
}



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