/* Capitol Hill Coding: night blue, robot teal, lamp yellow and paper cream. */
@font-face {
  font-family: "Fredoka";
  src: url(fonts/Fredoka-Variable.ttf) format("truetype");
  font-weight: 300 700;
  font-display: swap;
}
:root {
  --night: #2b3a67;
  --night-deep: #14213d;
  --dusk: #2ec4b6;
  --porch: #ffc857;
  --flame: #ffd97a;
  --mud: #12716a;
  --mud-dark: #0d5650;
  --bg: #fffbf0;
  --card: #ffffff;
  --ink: #2d2a32;
  --muted: #666170;
  --soft: #fdf1d6;
  --line: #ecdfc2;
  --link: #0f6b64;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171d26;
    --card: #1f2733;
    --ink: #f3ecdc;
    --muted: #a9b3c0;
    --soft: #222c3a;
    --line: #313c4c;
    --link: #ffc857;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
h1, h2, h3, .brand, .kicker { font-family: "Fredoka", ui-rounded, sans-serif; }
img { max-width: 100%; display: block; }
a { color: var(--link); }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* Top bar */
.bar { background: var(--night-deep); color: #fff8e7; }
.bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff8e7; text-decoration: none; font-weight: 600; font-size: 22px; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.bar nav { display: flex; gap: 18px; font-size: 15px; }
.bar nav a { color: #fff8e7; opacity: .85; text-decoration: none; font-weight: 600; }
.bar nav a:hover { opacity: 1; text-decoration: underline; }

/* Hero: the sunburst from the app icon, on ink blue */
.hero {
  color: #fff8e7; padding: 48px 0 56px; overflow: hidden; position: relative; isolation: isolate;
  background:
    radial-gradient(520px 380px at 74% 58%, rgba(255,243,208,.38), transparent 70%),
    linear-gradient(180deg, var(--night-deep) 0%, var(--night) 62%, #5b83a8 100%);
}
.hero::before {  /* slow rays */
  content: ""; position: absolute; left: 74%; top: 58%; width: 2400px; height: 2400px; margin: -1200px 0 0 -1200px;
  z-index: -1; opacity: .07; pointer-events: none;
  background: repeating-conic-gradient(#fff8e7 0 11.25deg, transparent 11.25deg 22.5deg);
  animation: rays 90s linear infinite;
}
@keyframes rays { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .hero::before { animation: none; } }
.hero .wrap { display: grid; grid-template-columns: 1fr 1.25fr; gap: 44px; align-items: center; }
.hero-icon { width: 92px; height: 92px; border-radius: 22px; box-shadow: 0 8px 28px rgba(0,0,0,.45); margin-bottom: 18px; }
.hero h1 { font-size: clamp(38px, 5.6vw, 58px); line-height: 1.04; margin: 0 0 14px; font-weight: 600; }
.hero h1 em { font-style: normal; color: var(--porch); }
.hero p { font-size: 19px; opacity: .92; margin: 0 0 26px; max-width: 32em; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.badge {
  display: inline-flex; align-items: center; gap: 10px; background: #000; color: #fff; min-height: 56px;
  border: 1px solid #555; border-radius: 12px; padding: 9px 18px; text-decoration: none; font-weight: 700;
}
.badge small { display: block; font-size: 11px; font-weight: 500; opacity: .8; line-height: 1.1; }
.badge span { line-height: 1.15; }
.note { font-size: 14px; opacity: .8; flex-basis: 100%; }
.device {
  background: #131c26; border-radius: 30px; padding: 10px; box-shadow: 0 22px 60px rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.12);
}
.device img { border-radius: 21px; width: 100%; }

/* Pills */
.pills { list-style: none; padding: 0; margin: 48px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.pills li { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; }
.pills strong { display: block; font-size: 18px; }
.pills .e { font-size: 26px; display: block; margin-bottom: 4px; }

/* Feature rows: copy beside one landscape screenshot */
.feature { display: grid; grid-template-columns: 1fr 1.3fr; gap: 48px; align-items: center; padding: 64px 0; border-bottom: 1px solid var(--line); }
.feature.flip > figure { order: -1; }
.feature h2 { font-size: 36px; line-height: 1.12; margin: 0 0 12px; font-weight: 600; }
.kicker { color: var(--mud); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: 15px; margin: 0 0 6px; }
@media (prefers-color-scheme: dark) { .kicker { color: var(--porch); } }
.feature ul { padding-left: 20px; margin: 12px 0 0; }
.feature li { margin-bottom: 8px; }
.feature figure { margin: 0; display: grid; gap: 14px; }
.shot { border-radius: 18px; border: 1px solid var(--line); box-shadow: 0 12px 34px rgba(30,40,60,.18); width: 100%; }
.shot.small { width: 78%; justify-self: end; margin-top: -18%; position: relative; border: 4px solid var(--bg); }

/* The ten pieces */
.chapters { padding: 64px 0 8px; }
.chapters h2 { font-size: 36px; margin: 0 0 8px; font-weight: 600; text-align: center; }
.chapters > p { text-align: center; max-width: 40em; margin: 0 auto 28px; color: var(--muted); }
.chapters ol { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; counter-reset: ch; }
#path ol { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.chapters li { counter-increment: ch; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px 12px 58px; position: relative; font-size: 15.5px; line-height: 1.45; }
.chapters li::before {
  content: counter(ch); position: absolute; left: 14px; top: 14px; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; font: 600 16px "Fredoka", ui-rounded, sans-serif;
  background: var(--night); color: var(--porch); box-shadow: 0 0 0 3px rgba(255,200,87,.25);
}
.chapters figure { margin: 22px 0 18px; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.chapters figure .shot, .chapters figure .shot.small { width: 100%; margin: 0; justify-self: stretch; border: 1px solid var(--line); }
.chapters strong { display: block; font-family: "Fredoka", ui-rounded, sans-serif; font-weight: 600; font-size: 17px; }
.chapters .free { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--mud); margin-left: 4px; }
@media (prefers-color-scheme: dark) { .chapters .free { color: var(--porch); } }

/* Trailer: a band under the hero */
.watch { margin: 18px 0 0; font-family: "Fredoka", ui-rounded, sans-serif; font-weight: 600; font-size: 18px; }
.watch a { color: var(--flame); text-decoration: none; }
.watch a:hover { text-decoration: underline; }
.trailer { background: linear-gradient(180deg, #3a4f8a 0%, var(--night-deep) 100%); color: #fff8e7; padding: 44px 0 52px; text-align: center; }
.trailer .kicker { color: var(--porch); margin: 0 0 6px; }
.trailer h2 { font-size: clamp(28px, 4vw, 40px); line-height: 1.1; margin: 0 0 22px; font-weight: 600; }
.trailer video { width: 100%; max-width: 960px; height: auto; aspect-ratio: 16 / 9; margin: 0 auto; display: block; border-radius: 20px; background: #000; box-shadow: 0 18px 50px rgba(0,0,0,.5); }
.trailer-note { margin: 14px auto 0; font-size: 15px; opacity: .75; }

/* Grown-ups */
.grownups { padding: 64px 0 24px; }
.grownups h2 { font-size: 36px; margin: 0 0 8px; font-weight: 600; text-align: center; }
.grownups > p { text-align: center; max-width: 40em; margin: 0 auto 28px; color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 22px 22px 10px; }
.card h3 { margin: 0 0 6px; font-size: 20px; font-weight: 600; }
.card p { margin: 0 0 12px; }

/* Closing */
.closing { background: var(--soft); border-radius: 28px; padding: 40px 28px; text-align: center; margin: 40px 0 64px; }
.closing h2 { font-size: 32px; margin: 0 0 8px; font-weight: 600; }
.closing p { margin: 0 auto 8px; max-width: 38em; }
.meta { color: var(--muted); font-size: 15px; margin: 0 0 12px; }

/* Document pages */
.doc { max-width: 780px; margin: 0 auto; padding: 40px 20px 64px; }
.doc h1 { font-size: 42px; margin: 0 0 4px; font-weight: 600; }
.doc section { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 26px 26px 14px; margin: 24px 0; }
.doc h2 { font-size: 25px; margin: 0 0 6px; font-weight: 600; }
.doc h3 { font-size: 18px; margin: 20px 0 4px; font-weight: 600; }
.doc p, .doc ul, .doc ol { margin: 0 0 14px; }
.doc ul, .doc ol { padding-left: 22px; }
.doc li { margin-bottom: 4px; }

footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; padding-top: 22px; padding-bottom: 32px; }
footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
footer a { color: var(--muted); }
.fine { flex-basis: 100%; font-size: 12.5px; }

@media (max-width: 820px) {
  .bar nav { gap: 12px; font-size: 14px; }
  .bar nav .wide { display: none; }
  .hero { padding: 32px 0 40px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 28px; }
  .device { border-radius: 20px; padding: 6px; }
  .device img { border-radius: 15px; }
  .feature { grid-template-columns: 1fr; gap: 24px; padding: 44px 0; }
  .feature.flip > figure { order: 0; }
  .feature h2, .grownups h2, .chapters h2 { font-size: 29px; }
  .doc section { padding: 20px 18px 8px; }
}
@media (max-width: 440px) {
  .wrap { padding: 0 16px; }
  .brand { font-size: 14px; white-space: nowrap; gap: 6px; }
  .brand img { width: 28px; height: 28px; border-radius: 7px; }
  .bar nav { gap: 10px; font-size: 13px; }
}

/* A sample of the fix-up: a draft line and the same line fixed. */
.fixdemo { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 18px; margin: 16px 0 0; font-size: 20px; }
.fixdemo span { display: block; }
.fixdemo .before { color: var(--muted); }
.fixdemo .after mark { background: var(--porch); color: #2d2a32; border-radius: 5px; padding: 0 3px; }

/* A little program, shown as code. */
.code { background: #0b1328; color: #fff8e7; border-radius: 16px; padding: 14px 18px; margin: 16px 0 0; font: 16px/1.5 ui-monospace, "SF Mono", Menlo, Consolas, monospace; white-space: pre; overflow-x: auto; }
.code .k { color: #ffc857; }
.code .s { color: #9cf6ec; }
.code .n { color: #8d99ae; }
.say { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 16px; margin: 14px 0 0; }
.say b { color: var(--link); }
