/* ===========================================================================
   AI in 30 Days — a course for Ken Staab
   Design priorities: readability first (large type, high contrast, generous
   spacing), warm + calm, works great on iPad and laptop, prints cleanly.
   =========================================================================== */

:root {
  --ink:        #1d2330;   /* near-black, softer than pure black */
  --ink-soft:   #44506a;
  --ink-faint:  #6b7691;
  --paper:      #fbf9f5;   /* warm off-white */
  --card:       #ffffff;
  --line:       #e6e1d7;
  --brand:      #c2410c;   /* warm terracotta — friendly, high contrast */
  --brand-deep: #9a3209;
  --accent:     #1f6f5c;   /* calm green for "do this" / success */
  --accent-soft:#e8f3ef;
  --gold:       #b88746;
  --gold-soft:  #f6efe2;
  --shadow:     0 1px 2px rgba(29,35,48,.06), 0 8px 24px rgba(29,35,48,.06);
  --radius:     16px;
  --maxw:       760px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  font-size: 20px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---- Top bar ------------------------------------------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251,249,245,.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand-mark {
  font-family: -apple-system, system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: -.01em;
  font-size: 17px;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.brand-mark .dot { color: var(--brand); }
.progress-wrap { flex: 1; display: flex; align-items: center; gap: 10px; }
.progress-track {
  flex: 1;
  height: 10px;
  background: #ece7dc;
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--brand), var(--gold));
  border-radius: 999px;
  transition: width .4s ease;
}
.progress-label {
  font-family: -apple-system, system-ui, sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  white-space: nowrap;
}
.btn-map {
  font-family: -apple-system, system-ui, sans-serif;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: 999px;
  padding: 7px 14px;
  cursor: pointer;
}
.btn-map:hover { border-color: var(--brand); color: var(--brand); }

/* ---- Layout -------------------------------------------------------------- */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 40px 20px 120px;
}

.sans { font-family: -apple-system, system-ui, "Segoe UI", sans-serif; }

/* ---- Landing ------------------------------------------------------------- */
.hero { text-align: center; padding: 24px 0 8px; }
.hero .eyebrow {
  font-family: -apple-system, system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: 13px;
  color: var(--brand);
}
.hero h1 {
  font-size: clamp(34px, 6vw, 52px);
  line-height: 1.08;
  margin: 14px 0 8px;
  letter-spacing: -.02em;
}
.hero .lede {
  font-size: 22px;
  color: var(--ink-soft);
  max-width: 600px;
  margin: 0 auto 28px;
}
.hero .signature {
  font-size: 18px;
  color: var(--ink-faint);
  font-style: italic;
  margin-top: 8px;
}

.cta {
  display: inline-block;
  font-family: -apple-system, system-ui, sans-serif;
  font-weight: 700;
  font-size: 19px;
  background: var(--brand);
  color: #fff;
  text-decoration: none;
  padding: 16px 34px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  transition: transform .12s ease, background .2s ease;
}
.cta:hover { background: var(--brand-deep); transform: translateY(-1px); }
.cta.secondary { background: var(--card); color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.cta.secondary:hover { border-color: var(--brand); color: var(--brand); background: #fff; }

.cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }

.promise {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 30px;
  margin: 40px 0;
}
.promise h2 { font-size: 24px; margin: 0 0 12px; }
.promise ul { margin: 0; padding-left: 22px; }
.promise li { margin: 10px 0; }

.how-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 28px 0; }
.how-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow);
}
.how-card .num {
  font-family: -apple-system, system-ui, sans-serif;
  font-weight: 800; color: var(--brand); font-size: 14px; letter-spacing: .04em;
}
.how-card h3 { margin: 6px 0 6px; font-size: 20px; }
.how-card p { margin: 0; font-size: 17px; color: var(--ink-soft); }

.builds-section { margin: 44px 0 8px; }
.builds-head {
  font-size: clamp(22px, 4vw, 28px); letter-spacing: -.01em; color: var(--ink);
  margin: 0 0 6px; text-align: center;
}
.builds-sub { text-align: center; color: var(--ink-soft); font-size: 18px; margin: 0 auto 24px; max-width: 520px; }
.builds-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.build-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 18px; box-shadow: var(--shadow); transition: transform .12s ease, border-color .2s ease;
}
.build-card:hover { transform: translateY(-2px); border-color: var(--gold); }
.build-ic { font-size: 30px; display: block; margin-bottom: 8px; }
.build-card h3 { margin: 0 0 6px; font-size: 18px; }
.build-card p { margin: 0; font-size: 15px; color: var(--ink-soft); line-height: 1.5; }
@media (max-width: 760px) { .builds-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .builds-grid { grid-template-columns: 1fr; } }

.weeks-overview { margin: 36px 0; }
.week-row {
  display: flex; gap: 16px; align-items: baseline;
  padding: 16px 0; border-bottom: 1px solid var(--line);
}
.week-row .wk {
  font-family: -apple-system, system-ui, sans-serif; font-weight: 800;
  color: var(--gold); font-size: 14px; min-width: 70px; letter-spacing: .03em;
}
.week-row .wk-body h3 { margin: 0 0 4px; font-size: 20px; }
.week-row .wk-body p { margin: 0; color: var(--ink-soft); font-size: 17px; }

/* ---- Day page ------------------------------------------------------------ */
.day-head { margin-bottom: 8px; }
.kicker {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  font-family: -apple-system, system-ui, sans-serif;
  font-size: 14px; font-weight: 700; letter-spacing: .03em;
  color: var(--ink-faint); text-transform: uppercase;
}
.pill {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 800; letter-spacing: .04em;
}
.pill.week  { background: var(--gold-soft); color: var(--gold); }
.pill.type-foundation { background: #eef1fb; color: #3a4ba8; }
.pill.type-practice   { background: var(--accent-soft); color: var(--accent); }
.pill.type-capstone   { background: #fdeede; color: var(--brand-deep); }
.pill.time { background: #f0ece3; color: var(--ink-soft); }

.day-title {
  font-size: clamp(30px, 5vw, 42px);
  line-height: 1.12; letter-spacing: -.02em;
  margin: 14px 0 24px;
}

.section { margin: 30px 0; }
.section > h2 {
  font-family: -apple-system, system-ui, sans-serif;
  font-size: 15px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: var(--brand); margin: 0 0 12px;
  display: flex; align-items: center; gap: 9px;
}
.section > h2 .ic { font-size: 18px; }
.section p { margin: 0 0 16px; }
.section ul, .section ol { margin: 0 0 16px; padding-left: 26px; }
.section li { margin: 9px 0; }
.section strong { color: var(--ink); }

.callout {
  border-radius: var(--radius);
  padding: 20px 22px; margin: 22px 0;
  border: 1px solid var(--line); background: var(--card);
  box-shadow: var(--shadow);
}
.callout .ttl {
  font-family: -apple-system, system-ui, sans-serif;
  font-weight: 800; font-size: 14px; letter-spacing: .04em;
  text-transform: uppercase; margin-bottom: 8px; display: flex; gap: 8px; align-items: center;
}
.callout.do      { border-left: 5px solid var(--accent); }
.callout.do .ttl { color: var(--accent); }
.callout.try     { background: var(--gold-soft); border-left: 5px solid var(--gold); }
.callout.try .ttl{ color: var(--brand-deep); }
.callout.watch   { background: #fdecec; border-left: 5px solid #c0392b; }
.callout.watch .ttl { color: #a5281b; }

.prompt-box {
  font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  font-size: 16px; line-height: 1.55;
  background: #2b2f3a; color: #f3efe6;
  border-radius: 12px; padding: 16px 18px; margin: 14px 0;
  white-space: pre-wrap; word-break: break-word;
}
.prompt-box .lbl {
  display: block; font-family: -apple-system, system-ui, sans-serif;
  font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: #b88746; margin-bottom: 8px; font-weight: 700;
}

/* Optional terminal-track block, hidden unless toggled on */
.terminal-block {
  border: 1px dashed var(--ink-faint);
  border-radius: var(--radius);
  padding: 20px 22px; margin: 24px 0;
  background: #f4f1ec;
}
.terminal-block .tag {
  font-family: -apple-system, system-ui, sans-serif;
  font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  color: var(--ink-soft); background: #e4ded3; padding: 3px 10px; border-radius: 999px;
}
body:not(.track-terminal) .terminal-block { display: none; }

.go-deeper {
  display: flex; gap: 12px; align-items: flex-start;
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; margin: 22px 0; background: var(--card);
}
.go-deeper .ic { font-size: 22px; }
.go-deeper a { color: var(--brand-deep); font-weight: 700; }
.go-deeper .meta { font-family: -apple-system, system-ui, sans-serif; font-size: 14px; color: var(--ink-faint); }

/* ---- Completion + journal ----------------------------------------------- */
.complete-card {
  margin: 40px 0 10px; padding: 24px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.check-row { display: flex; align-items: center; gap: 14px; cursor: pointer; }
.check-box {
  width: 34px; height: 34px; border-radius: 9px; flex: none;
  border: 2px solid var(--accent); background: #fff;
  display: grid; place-items: center; font-size: 22px; color: #fff;
  transition: background .15s ease;
}
.check-row.done .check-box { background: var(--accent); }
.check-row .check-label { font-family: -apple-system, system-ui, sans-serif; font-weight: 700; font-size: 18px; }
.journal { margin-top: 18px; }
.journal label {
  display: block; font-family: -apple-system, system-ui, sans-serif;
  font-size: 14px; font-weight: 600; color: var(--ink-soft); margin-bottom: 8px;
}
.journal textarea {
  width: 100%; min-height: 80px; resize: vertical;
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
  font-family: inherit; font-size: 17px; color: var(--ink); background: var(--paper);
}
.journal textarea:focus { outline: 2px solid var(--gold); border-color: var(--gold); }
.saved-hint { font-family: -apple-system, system-ui, sans-serif; font-size: 13px; color: var(--accent); margin-top: 6px; min-height: 18px; }

/* ---- Day nav ------------------------------------------------------------- */
.day-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 30px; }
.day-nav a {
  font-family: -apple-system, system-ui, sans-serif; font-weight: 700; font-size: 16px;
  text-decoration: none; color: var(--ink); border: 1px solid var(--line);
  background: var(--card); border-radius: 12px; padding: 12px 18px; max-width: 48%;
}
.day-nav a:hover { border-color: var(--brand); color: var(--brand); }
.day-nav a.disabled { opacity: .35; pointer-events: none; }
.day-nav a small { display: block; font-size: 12px; color: var(--ink-faint); font-weight: 600; }

/* ---- Map drawer ---------------------------------------------------------- */
.drawer-scrim {
  position: fixed; inset: 0; background: rgba(29,35,48,.4);
  opacity: 0; pointer-events: none; transition: opacity .25s ease; z-index: 90;
}
.drawer-scrim.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: min(420px, 90vw);
  background: var(--paper); box-shadow: -10px 0 40px rgba(0,0,0,.18);
  transform: translateX(100%); transition: transform .28s ease; z-index: 100;
  overflow-y: auto; padding: 22px 22px 60px;
}
.drawer.open { transform: translateX(0); }
.drawer h2 { font-size: 22px; margin: 4px 0 16px; }
.drawer .drawer-week {
  font-family: -apple-system, system-ui, sans-serif; font-weight: 800; font-size: 13px;
  letter-spacing: .04em; text-transform: uppercase; color: var(--gold);
  margin: 22px 0 8px;
}
.drawer a.map-item {
  display: flex; gap: 12px; align-items: center; text-decoration: none;
  color: var(--ink); padding: 10px 10px; border-radius: 10px;
}
.drawer a.map-item:hover { background: #fff; }
.drawer a.map-item.current { background: #fff; border: 1px solid var(--gold); }
.map-item .mi-num {
  font-family: -apple-system, system-ui, sans-serif; font-weight: 800; font-size: 13px;
  width: 30px; height: 30px; border-radius: 8px; flex: none; display: grid; place-items: center;
  background: #ece7dc; color: var(--ink-soft);
}
.map-item.done .mi-num { background: var(--accent); color: #fff; }
.map-item .mi-title { font-family: -apple-system, system-ui, sans-serif; font-size: 15px; font-weight: 600; }
.drawer-close {
  position: absolute; top: 16px; right: 16px; border: none; background: #fff;
  width: 38px; height: 38px; border-radius: 999px; font-size: 20px; cursor: pointer;
  box-shadow: var(--shadow);
}

/* ---- Track toggle -------------------------------------------------------- */
.track-toggle {
  display: inline-flex; background: #ece7dc; border-radius: 999px; padding: 4px;
  margin: 8px 0 4px; font-family: -apple-system, system-ui, sans-serif;
}
.track-toggle button {
  border: none; background: transparent; font-weight: 700; font-size: 14px;
  padding: 7px 16px; border-radius: 999px; cursor: pointer; color: var(--ink-soft);
}
.track-toggle button.active { background: #fff; color: var(--ink); box-shadow: var(--shadow); }

/* ---- Responsive ---------------------------------------------------------- */
@media (max-width: 600px) {
  body { font-size: 18px; }
  .how-grid { grid-template-columns: 1fr; }
  .hero .lede { font-size: 19px; }
  main { padding: 28px 18px 100px; }
}

/* ---- Print --------------------------------------------------------------- */
@media print {
  .topbar, .day-nav, .drawer, .drawer-scrim, .complete-card .saved-hint, .track-toggle { display: none !important; }
  body { background: #fff; font-size: 12pt; }
  .terminal-block { display: block !important; }
  .callout, .promise, .how-card { box-shadow: none; }
  main { padding: 0; max-width: 100%; }
  a { color: var(--ink); text-decoration: underline; }
}
