:root {
  --bg: #fbf7f0;
  --surface: #ffffff;
  --text: #22302f;
  --muted: #586664;
  --accent: #1f6f6b;
  --accent-ink: #ffffff;
  --border: #e4ddd0;
  --sky-top: #f6e2c4;
  --sky-bottom: #fbf2e4;
  --hill: #d8e6d6;
  --figure: #2b4a52;
  --sun: #f2b866;
  --cover1: #1f6f6b;
  --cover2: #8a4b3a;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #161c1c; --surface: #1f2727; --text: #ecf0ee; --muted: #a8b4b1;
    --accent: #5fb8b1; --accent-ink: #0d1716; --border: #33403f;
    --sky-top: #2a3438; --sky-bottom: #1d2526; --hill: #2c3b34;
    --figure: #d9e6e3; --sun: #c99a52;
  }
}
:root[data-theme="dark"] {
  --bg: #161c1c; --surface: #1f2727; --text: #ecf0ee; --muted: #a8b4b1;
  --accent: #5fb8b1; --accent-ink: #0d1716; --border: #33403f;
  --sky-top: #2a3438; --sky-bottom: #1d2526; --hill: #2c3b34;
  --figure: #d9e6e3; --sun: #c99a52;
}

* { box-sizing: border-box; }
html { font-size: 19px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.6;
}
a { color: var(--accent); }
.wrap { max-width: 1000px; margin: 0 auto; padding: 0 16px; }

/* Header / nav */
.topbar { border-bottom: 1px solid var(--border); background: var(--surface); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
.brand { font-weight: bold; font-size: 1.1rem; color: var(--text); text-decoration: none; }
nav a { margin-left: 18px; text-decoration: none; font-family: Arial, Helvetica, sans-serif; font-size: .9rem; }
nav a:first-child { margin-left: 0; }

/* Hero */
.hero { background: linear-gradient(var(--sky-top), var(--sky-bottom)); }
.hero svg { display: block; width: 100%; height: auto; max-height: 360px; }
.hero-text { text-align: center; padding: 8px 16px 40px; }
.hero-text h1 { font-size: 2.2rem; margin: 0 0 8px; line-height: 1.2; }
.hero-text p { color: var(--muted); max-width: 640px; margin: 0 auto; font-size: 1.05rem; }

/* Books */
.books { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 28px; margin: 48px 0; }
.book { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 24px; display: flex; flex-direction: column; }
.cover {
  aspect-ratio: 2 / 3; max-width: 190px; width: 100%; margin: 0 auto 20px;
  border-radius: 4px 10px 10px 4px; color: #fff; padding: 20px 16px;
  display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: 6px 8px 18px rgba(0,0,0,.18); text-align: center;
}
.cover.manual { background: var(--cover1); }
.cover.workbook { background: var(--cover2); }
.cover strong { font-size: 1.25rem; line-height: 1.2; }
.cover small { font-family: Arial, sans-serif; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.book h2 { margin: 0 0 8px; font-size: 1.4rem; }
.book p { color: var(--muted); margin: 0 0 16px; flex: 1; }
.price { font-size: 1.4rem; font-weight: bold; margin-bottom: 14px; }

.btn {
  display: inline-block; text-align: center; background: var(--accent); color: var(--accent-ink);
  padding: 14px 22px; border-radius: 8px; text-decoration: none; font-family: Arial, sans-serif;
  font-weight: bold; font-size: 1rem; border: 0; cursor: pointer; width: 100%;
}
.btn:hover { filter: brightness(1.08); }
.btn.paypal { background: #ffc439; color: #111; }
.btn.stripe { background: #635bff; color: #fff; }

.bundle { background: var(--surface); border: 2px solid var(--accent); border-radius: 10px; padding: 24px; text-align: center; margin-bottom: 56px; }
.bundle h2 { margin-top: 0; }

/* Checkout */
.page-title { text-align: center; margin: 40px 0 8px; font-size: 2rem; }
.lead { text-align: center; color: var(--muted); margin: 0 auto 32px; max-width: 620px; }
.order { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 22px; margin-bottom: 20px; }
.order-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: baseline; margin-bottom: 14px; }
.order-head h2 { margin: 0; font-size: 1.25rem; }
.pay-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pay-row form { margin: 0; }
@media (max-width: 560px) { .pay-row { grid-template-columns: 1fr; } }
.order.selected { border: 2px solid var(--accent); }
.secure { text-align: center; color: var(--muted); font-size: .85rem; font-family: Arial, sans-serif; margin: 24px 0 56px; }

/* Downloads */
.dl-list { display: grid; gap: 18px; margin-bottom: 32px; }
.dl { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 22px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.dl h2 { margin: 0; font-size: 1.25rem; }
.dl .btn { width: auto; }
.notice { background: var(--surface); border-left: 4px solid var(--accent); padding: 16px 20px; border-radius: 6px; margin-bottom: 56px; color: var(--muted); }

footer { border-top: 1px solid var(--border); padding: 24px 0; text-align: center; color: var(--muted); font-size: .85rem; font-family: Arial, sans-serif; }

@media (max-width: 560px) {
  html { font-size: 17px; }
  .hero-text h1 { font-size: 1.7rem; }
  nav a { margin-left: 12px; }
}

/* Free guides */
.free-list { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 12px; }
.free-list li { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px 18px; }
.free-list strong { display: block; }
.free-list span { color: var(--muted); font-size: .95rem; }
.signup { background: var(--surface); border: 2px solid var(--accent); border-radius: 10px; padding: 22px; display: grid; gap: 8px; margin-bottom: 28px; }
.signup label { font-family: Arial, sans-serif; font-weight: bold; font-size: .9rem; }
.signup input { font: inherit; padding: 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); margin-bottom: 8px; }
.signup .btn { margin-top: 6px; }
[hidden] { display: none !important; }

/* What To Do Now opt-in */
.cover.whatnow { background: var(--cover2); }
.cover.workbook { background: #3c5a7a; }
.optin { display: grid; grid-template-columns: 190px 1fr; gap: 32px; align-items: center; margin: 40px 0 24px; }
.optin .cover { margin: 0; }
.optin h1 { font-size: 2rem; line-height: 1.2; margin: 0 0 12px; }
.kicker { font-family: Arial, sans-serif; text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; color: var(--accent); font-weight: bold; margin: 0 0 6px; }
.inside { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 22px 26px; margin-bottom: 28px; }
.inside h2 { margin-top: 0; }
.ticks { margin: 0; padding-left: 0; list-style: none; display: grid; gap: 10px; }
.ticks li { padding-left: 30px; position: relative; }
.ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: bold; }
@media (max-width: 600px) { .optin { grid-template-columns: 1fr; text-align: center; } .optin .cover { max-width: 150px; margin: 0 auto; } .optin .lead { text-align: center !important; } }
