/* Colours match the main site's App Store look (iOS system colours; see src/index.css). */
:root {
  color-scheme:light dark;
  --paper:#f2f2f7;
  --ink:#000000;
  --muted:rgba(60,60,67,.6);
  --line:rgba(60,60,67,.29);
  --link:#007aff;
  --card:#ffffff;
  --shadow:0 3px 20px rgba(0,0,0,.08);
  --sys:-apple-system,system-ui,"SF Pro","SF Pro Text","Helvetica Neue",Helvetica,Arial,sans-serif;
}
@media (prefers-color-scheme:dark) {
  :root {
    --paper:#000000;
    --ink:#ffffff;
    --muted:rgba(235,235,245,.6);
    --line:rgba(84,84,88,.65);
    --link:#0a84ff;
    --card:#1c1c1e;
    --shadow:none;
  }
}
* {
  box-sizing:border-box;
}
body {
  margin:0;
  color:var(--ink);
  background:var(--paper);
  font:17px/1.47 var(--sys);
  letter-spacing:-.43px;
  -webkit-font-smoothing:antialiased;
}
a {
  color:var(--link);
  text-underline-offset:.18em;
  text-decoration-thickness:1px;
}
a:focus-visible,button:focus-visible {
  outline:3px solid #256bc0;
  outline-offset:5px;
}
a:hover {
  text-decoration-thickness:2px;
}
header {
  border-bottom:1px solid var(--line);
}
.bar,main,footer {
  width:min(1080px,calc(100% - 48px));
  margin:auto;
}
.bar {
  min-height:64px;
  display:flex;
  gap:14px;
  align-items:center;
  justify-content:space-between;
}
.brand {
  font-size:20px;
  font-weight:750;
  letter-spacing:-.8px;
  color:var(--ink);
  text-decoration:none;
}
.crumb,.eyebrow,figcaption,.part-flag,footer {
  font:12px/1.45 ui-monospace,'SFMono-Regular',Consolas,monospace;
}
.crumb {
  color:var(--muted);
}
.crumb a {
  color:inherit;
}
.eyebrow {
  font-weight:600;
  color:var(--link);
  letter-spacing:.06em;
  text-transform:uppercase;
  margin:0 0 .85rem;
}
.intro,.guide-top {
  padding:42px 0;
  display:grid;
  align-items:center;
  grid-template-columns:minmax(0,1.12fr) minmax(0,1fr);
  gap:clamp(30px,6vw,82px);
}
h1,h2,h3,p {
  margin-top:0;
}
h1,h2,h3 {
  line-height:1.04;
  text-wrap:balance;
}
h1 {
  font-size:clamp(48px,6.6vw,86px);
  font-weight:680;
  letter-spacing:-.068em;
  margin-bottom:18px;
}
h2 {
  font-size:clamp(29px,3.6vw,43px);
  letter-spacing:-.052em;
  margin-bottom:22px;
}
h3 {
  font-size:23px;
  letter-spacing:-.04em;
  margin-bottom:6px;
}
.lead {
  font-size:clamp(17px,2vw,22px);
  line-height:1.48;
  color:var(--muted);
  max-width:39em;
  margin:0;
}
.intro figure,.guide-top figure {
  margin:0;
}
.photo {
  width:100%;
  height:auto;
  aspect-ratio:4/3;
  object-fit:cover;
  display:block;
  background:#e5e7dd;
  border-radius:3px;
}
figcaption {
  color:var(--muted);
  margin-top:7px;
}
.project-list {
  padding:27px 0 48px;
  border-top:1px solid var(--line);
}
.project-list>h2 {
  margin-bottom:25px;
}
.cards {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:32px 22px;
}
.card {
  color:var(--ink);
  text-decoration:none;
  display:block;
  min-width:0;
}
.card img {
  aspect-ratio:16/10;
}
.card .eyebrow {
  font-size:11px;
  margin:14px 0 6px;
}
.card h3 {
  margin-bottom:7px;
}
.card:hover h3 {
  text-decoration:underline;
  text-decoration-thickness:1px;
  text-underline-offset:.13em;
}
.card p:last-child {
  margin:0;
  color:var(--muted);
  font-size:15px;
  line-height:1.45;
}
.guide-top h1 {
  font-size:clamp(45px,5.5vw,70px);
}
.guide-body {
  display:grid;
  grid-template-columns:minmax(0,1.03fr) minmax(0,1.18fr);
  gap:clamp(30px,6vw,72px);
  align-items:start;
  border-top:1px solid var(--line);
  padding:35px 0;
}
.parts {
  padding:0;
  list-style:none;
  margin:0;
}
.part {
  padding:13px 0;
  border-bottom:1px solid var(--line);
}
.part:first-child {
  padding-top:0;
}
.part b,.part a {
  font-weight:650;
}
.part span {
  display:block;
  font-size:15px;
  color:var(--muted);
  line-height:1.45;
  margin-top:3px;
}
.steps {
  padding-left:1.45em;
  margin:0;
}
.steps li {
  padding-left:5px;
  margin:0 0 1em;
}
.steps li::marker {
  color:var(--link);
  font-family:ui-monospace,monospace;
  font-weight:600;
}
.steps strong {
  font-weight:680;
}
.proof {
  margin:24px 0 0;
  border-left:3px solid #608565;
  background:#edf0e6;
  padding:14px 18px;
}
.proof b {
  display:block;
}
.resources {
  margin:0;
  padding:18px 0 26px;
  line-height:1.7;
}
.resources a {
  display:inline-block;
  margin-right:18px;
}
.nav {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:15px;
  flex-wrap:wrap;
  border-top:1px solid var(--line);
  padding:18px 0 30px;
}
.nav a {
  font-weight:600;
}
.command {
  background:#182c24;
  color:#f4f9eb;
  padding:14px 16px;
  white-space:pre-wrap;
  word-break:break-word;
  font:13px/1.6 ui-monospace,monospace;
  margin:12px 0;
}
.note {
  color:var(--muted);
  font-size:15px;
  line-height:1.55;
  margin:18px 0 0;
}
footer {
  border-top:1px solid var(--line);
  color:var(--muted);
  padding:18px 0 30px;
}
footer a {
  color:inherit;
}
.skip {
  position:absolute;
  left:-10000px;
}
.skip:focus {
  left:12px;
  top:10px;
  background:white;
  padding:8px;
  z-index:4;
}
@media(max-width:750px) {
  .cards {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .guide-body {
    grid-template-columns:1fr;
    gap:32px;
  }
  .intro,.guide-top {
    gap:20px;
    grid-template-columns:1fr 0.85fr;
  }
  .bar,main,footer {
    width:calc(100% - 36px);
  }
  h1 {
    font-size:48px;
  }
}
@media(max-width:560px) {
  .bar {
    min-height:54px;
  }
  .intro,.guide-top {
    padding:26px 0 24px;
    grid-template-columns:1fr;
  }
  .intro h1,.guide-top h1 {
    font-size:47px;
  }
  .intro .photo,.guide-top .photo {
    aspect-ratio:1.9;
  }
  .cards {
    grid-template-columns:1fr;
    gap:0;
  }
  .card {
    padding:15px 0;
    border-top:1px solid var(--line);
    display:grid;
    grid-template-columns:minmax(0,1fr) 94px;
    column-gap:13px;
    align-items:center;
  }
  .card img {
    grid-column:2;
    grid-row:1 / 4;
    aspect-ratio:1;
  }
  .card .eyebrow {
    margin:0 0 3px;
  }
  .card h3,.card p {
    grid-column:1;
  }
  .card h3 {
    font-size:21px;
  }
  .card p:last-child {
    font-size:14px;
  }
  .guide-body {
    padding:25px 0;
  }
  .project-list {
    padding:23px 0 32px;
  }
  .project-list>h2 {
    margin-bottom:12px;
  }
  .crumb {
    font-size:11px;
  }
  .lead {
    font-size:18px;
  }
  figcaption {
    font-size:11px;
  }
}
@media(prefers-reduced-motion:reduce) {
  * {
    scroll-behavior:auto;
  }
}
@media print {
  .bar,.nav,footer {
    display:none;
  }
  .guide-top,.guide-body {
    display:block;
  }
  .guide-top img {
    max-width:270px;
  }
  .guide-body section {
    margin-top:30px;
  }
}

/* ---- App Store theme --------------------------------------------------------------
   Typography follows Apple's iOS text styles (34 large title, 22 title 2, 17 headline,
   13 footnote); surfaces are white grouped cards on the grey background, like the
   main jakesdata.com pages. Placed last so it overrides the layout rules above. */
a { color:var(--link); text-decoration:none; }
a:hover { text-decoration:underline; text-decoration-thickness:1px; }
header {
  position:sticky; top:0; z-index:5;
  background:color-mix(in srgb,var(--paper) 82%,transparent);
  -webkit-backdrop-filter:saturate(180%) blur(20px);
  backdrop-filter:saturate(180%) blur(20px);
  border-bottom:.5px solid var(--line);
}
.bar { min-height:44px; }
.brand { color:var(--link); font-size:17px; font-weight:400; letter-spacing:-.43px; }
.brand::before { content:"‹"; font-size:30px; line-height:0; margin-right:6px; position:relative; top:2px; }
.crumb,.eyebrow,figcaption,.part-flag,footer { font-family:var(--sys); letter-spacing:0; }
.crumb { font-size:13px; }
.eyebrow { font-size:13px; font-weight:600; color:var(--muted); letter-spacing:0; }
figcaption,footer { font-size:13px; }
h1,.intro h1,.guide-top h1 { font-size:clamp(34px,4.6vw,48px); font-weight:700; letter-spacing:.2px; line-height:1.15; }
h2 { font-size:22px; font-weight:700; letter-spacing:.35px; line-height:28px; }
h3 { font-size:17px; font-weight:600; letter-spacing:-.43px; line-height:22px; }
.lead { font-size:17px; line-height:1.4; }
.photo { border-radius:18px; background:var(--line); }
.project-list,.guide-body,.nav,footer { border-top:0; }

/* Project cards: white cards on wide screens, an App Store list on phones. */
.card { background:var(--card); border-radius:22px; box-shadow:var(--shadow); overflow:hidden; padding-bottom:16px; }
.card .photo { border-radius:0; }
.card .eyebrow,.card h3,.card p { padding:0 16px; }
.card:hover h3 { text-decoration:none; }
.card p:last-child { font-size:15px; }

/* Parts list and callouts as grouped cards. */
.parts { background:var(--card); border-radius:22px; box-shadow:var(--shadow); padding:0 16px; }
.part,.part:first-child { padding:12px 0; border-bottom:.5px solid var(--line); }
.part:last-child { border-bottom:0; }
.part span { font-size:13px; }
.steps li::marker { color:var(--link); font-family:var(--sys); font-weight:600; }
.proof { background:var(--card); border-left:0; border-radius:18px; box-shadow:var(--shadow); padding:14px 16px; }
.command { background:#1c1c1e; color:#ffffff; border-radius:12px; font:13px/1.6 ui-monospace,"SF Mono",Menlo,monospace; }
.note { font-size:13px; }

@media(max-width:560px) {
  .cards { background:var(--card); border-radius:26px; box-shadow:var(--shadow); padding:0 16px; gap:0; }
  .card { background:none; box-shadow:none; border-radius:0; padding:12px 0; border-top:.5px solid var(--line); grid-template-columns:minmax(0,1fr) 64px; }
  .card:first-child { border-top:0; }
  .card .photo { border-radius:22.5%; }
  .card .eyebrow,.card h3,.card p { padding:0; }
  .card h3 { font-size:17px; }
  .card p:last-child { font-size:13px; }
}
