:root {
  --bg: #f6f5f2;
  --surface: #ffffff;
  --surface-2: #efeee9;
  --text: #16171b;
  --muted: #62646c;
  --line: #e2e0d9;
  --accent: #2456e8;
  --accent-ink: #ffffff;
  --ok: #157a46;
  --ok-bg: #e2f4ea;
  --warn: #8a5a00;
  --warn-bg: #fbefd4;
  --muted-bg: #ecebe6;
  --code-bg: #15171c;
  --code-text: #e8e9ee;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 20, 30, .05), 0 4px 16px rgba(20, 20, 30, .05);
  --tile-l: 58%;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0d12; --surface: #13161d; --surface-2: #1a1e27; --text: #eceef3; --muted: #9a9fac;
    --line: #262b36; --accent: #6b93ff; --accent-ink: #0b0d12; --ok: #5fd39a; --ok-bg: #12301f;
    --warn: #f2c063; --warn-bg: #33270e; --muted-bg: #20242d; --code-bg: #0a0c10;
    --shadow: none; --tile-l: 46%; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0d12; --surface: #13161d; --surface-2: #1a1e27; --text: #eceef3; --muted: #9a9fac;
  --line: #262b36; --accent: #6b93ff; --accent-ink: #0b0d12; --ok: #5fd39a; --ok-bg: #12301f;
  --warn: #f2c063; --warn-bg: #33270e; --muted-bg: #20242d; --code-bg: #0a0c10;
  --shadow: none; --tile-l: 46%; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 700; }
h2 { font-size: 1.45rem; margin-top: 0; }
h3 { font-size: 1.05rem; }
code, kbd { font: .9em/1.4 ui-monospace, "SF Mono", Menlo, monospace; }
:not(pre) > code, kbd { background: var(--surface-2); padding: .1em .35em; border-radius: 5px; }
kbd { border: 1px solid var(--line); }
.i { width: 1em; height: 1em; vertical-align: -0.12em; flex: none; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
main.wrap { padding-top: 24px; padding-bottom: 64px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 10; background: var(--surface); padding: 8px 12px; }
.muted { color: var(--muted); }
.fine { font-size: .85rem; color: var(--muted); }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 62ch; }
.eyebrow { font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 .6rem; }

/* header */
.site-header { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid var(--line); }
.header-in { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); text-decoration: none; letter-spacing: -0.01em; white-space: nowrap; }
.brand-mark { width: 26px; height: 26px; border-radius: 8px; background: conic-gradient(from 200deg, #ff7a59, #f5c84b, #58c48c, #4f8cff, #a46bff, #ff7a59); }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 8px; font-size: .95rem; }
.nav a:hover { color: var(--text); background: var(--surface-2); }
.theme-btn { background: none; border: 0; color: var(--muted); padding: 8px; border-radius: 8px; cursor: pointer; font-size: 1.05rem; display: grid; }
.theme-btn:hover { background: var(--surface-2); color: var(--text); }

/* hero */
.hero { padding: 56px 0 28px; }
.hero h1 { max-width: 22ch; }
.search { position: relative; max-width: 620px; margin-top: 28px; }
.search .i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 1.15rem; }
.search input { width: 100%; font: inherit; font-size: 1.05rem; padding: 15px 16px 15px 46px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.search input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.chip { font: inherit; font-size: .9rem; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }

/* starters */
.starters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 28px 0 8px; }
.starters-col { grid-template-columns: repeat(2, 1fr); }
.starter { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); text-decoration: none; color: var(--text); box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.starter:hover { border-color: var(--accent); transform: translateY(-1px); }
.starter span { color: var(--muted); font-size: .92rem; }

/* grid */
.versions { margin-top: 40px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.card { display: flex; gap: 14px; align-items: center; padding: 14px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); text-decoration: none; color: var(--text); box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.card:hover { border-color: var(--accent); transform: translateY(-1px); }
.card h3 { margin: 0 0 6px; font-size: 1rem; }
.card .ver { color: var(--muted); font-weight: 500; }
.card-meta { margin: 0 0 2px; font-size: .8rem; color: var(--muted); }
.card-body { min-width: 0; }
.card-ad { grid-column: 1 / -1; }
.card[hidden], .card-ad[hidden] { display: none; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }

.tile { --s: 64px; width: var(--s); height: var(--s); flex: none; border-radius: 16px; display: grid; place-items: center; position: relative; overflow: hidden;
  background: radial-gradient(120% 90% at 20% 10%, hsl(calc(var(--h) + 40) 90% calc(var(--tile-l) + 18%)), transparent 60%),
              linear-gradient(145deg, hsl(var(--h) 75% var(--tile-l)), hsl(calc(var(--h) + 35) 70% calc(var(--tile-l) - 14%)));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.tile::after { content: ""; position: absolute; inset: auto -20% -55% -20%; height: 80%; border-radius: 50%; background: hsl(calc(var(--h) - 20) 60% calc(var(--tile-l) - 22%) / .55); }
.tile.has-img { background: linear-gradient(rgba(0,0,0,.08), rgba(0,0,0,.32)), var(--img) center / cover, hsl(var(--h) 60% var(--tile-l)); }
.tile.has-img::after { content: none; }
.tile-num { position: relative; z-index: 1; color: #fff; font-weight: 700; font-size: 1.15rem; letter-spacing: -0.03em; text-shadow: 0 1px 6px rgba(0,0,0,.25); }
.tile-lg { --s: 112px; border-radius: 26px; }
.tile-lg .tile-num { font-size: 2rem; }

.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill, .tag { font-size: .75rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.pill-ok { color: var(--ok); background: var(--ok-bg); }
.pill-warn { color: var(--warn); background: var(--warn-bg); }
.pill-muted { color: var(--muted); background: var(--muted-bg); }
.tag { color: var(--muted); border: 1px solid var(--line); font-weight: 500; }

/* tables */
.block { margin-top: 44px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; background: var(--surface-2); }
tr:last-child td { border-bottom: 0; }

/* version page */
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 20px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.v-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: start; }
.v-hero { display: flex; gap: 28px; align-items: center; margin-bottom: 28px; }
.v-hero h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); }
.v-hero .lede { margin: 0 0 14px; }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.facts div { padding: 14px 16px; border-right: 1px solid var(--line); }
.facts div:last-child { border-right: 0; }
.facts dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-weight: 600; }
.methods { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.method { padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.method p { margin: 0 0 14px; color: var(--muted); }
.m-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.m-head h3 { margin: 0; }
.m-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--accent); font-size: 1.1rem; }
.m-appstore, .m-dmg { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.src { margin: 10px 0 0 !important; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 10px; font-weight: 600; text-decoration: none;
  border: 1px solid var(--line); color: var(--text); background: var(--surface-2); }
.btn:hover { border-color: var(--accent); }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-primary:hover { filter: brightness(1.08); }
.code { display: flex; align-items: center; gap: 10px; background: var(--code-bg); color: var(--code-text); border-radius: 10px; padding: 10px 10px 10px 16px; margin: 0 0 14px; }
.code code { flex: 1; overflow-x: auto; white-space: pre; padding: 4px 0; background: none; }
.copy { font: inherit; font-size: .8rem; font-weight: 600; background: rgba(255,255,255,.1); color: var(--code-text); border: 0; border-radius: 7px; padding: 6px 12px; cursor: pointer; flex: none; }
.copy:hover { background: rgba(255,255,255,.18); }
.ticks { padding: 0; list-style: none; display: grid; gap: 8px; }
.ticks li { padding-left: 28px; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 4px; top: .55em; width: 12px; height: 7px; border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok); transform: rotate(-45deg); }
details { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 0 18px; margin-bottom: 10px; }
summary { cursor: pointer; padding: 14px 0; font-weight: 600; }
details p { margin: 0 0 16px; color: var(--muted); }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 48px; }
.pg { display: flex; flex-direction: column; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-decoration: none; color: var(--text); font-weight: 600; }
.pg span { font-size: .8rem; color: var(--muted); font-weight: 500; }
.pg-older { text-align: right; }
.pg:hover { border-color: var(--accent); }

.v-side { position: sticky; top: 84px; display: grid; gap: 18px; }
.side-card { padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); display: grid; gap: 6px; }
.side-card a { color: var(--muted); text-decoration: none; font-size: .92rem; }
.side-card a:hover { color: var(--accent); }
.side-title { margin: 0 0 4px; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }

/* prose */
.prose h2 { margin-top: 40px; }
.prose h3 { margin-top: 28px; }
.prose li { margin-bottom: 6px; }
.narrow { max-width: 720px; }

/* ads: labelled, fixed-size, never covering content */
.ad { margin: 32px 0; text-align: center; }
.ad-label { display: block; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.ad-top .ad-ph, .ad-top ins { min-height: 90px; }
.ad-inline .ad-ph, .ad-inline ins { min-height: 250px; }
.ad-sidebar .ad-ph, .ad-sidebar ins { min-height: 600px; }
.ad-sidebar { margin: 0; }
.ad-ph { display: grid; place-items: center; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); font-size: .85rem; background: repeating-linear-gradient(45deg, transparent 0 10px, var(--surface-2) 10px 11px); }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0 28px; margin-top: 40px; }
.footer-in { display: flex; justify-content: space-between; gap: 32px; margin-bottom: 18px; }
.footer-in .fine { max-width: 60ch; }
.footer-brand { font-weight: 700; margin: 0 0 6px; }
.footer-nav { display: flex; gap: 18px; flex-wrap: wrap; align-content: flex-start; }
.footer-nav a { color: var(--muted); text-decoration: none; font-size: .92rem; }

@media (max-width: 900px) {
  .v-layout { grid-template-columns: minmax(0, 1fr); }
  .v-side { position: static; }
  .ad-sidebar { display: none; }
  .starters { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .hero { padding-top: 36px; }
  .nav a:not([href="/mac-lookup/"]) { display: none; }
  .nav a { font-size: .9rem; padding: 6px 8px; white-space: nowrap; }
  .brand { font-size: .95rem; gap: 8px; }
  .header-in { gap: 8px; }
  .v-hero { flex-direction: column; align-items: flex-start; gap: 18px; }
  .tile-lg { --s: 84px; border-radius: 20px; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .facts div:nth-child(2) { border-right: 0; }
  .facts div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .starters-col { grid-template-columns: 1fr; }
  .footer-in { flex-direction: column; }
  .pager { grid-template-columns: 1fr; }
  .pg-older { text-align: left; }
}

/* mac lookup */
.lookup-search { margin-top: 20px; }
.lookup-examples { align-items: center; }
.lookup-msg { margin: 18px 0 0; padding: 12px 16px; border-radius: 12px; background: var(--surface-2); color: var(--text); }
.lookup-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; margin-top: 18px; }
.lookup-results .card h3 { margin-bottom: 4px; }
.lookup-results .card-meta strong { color: var(--text); }
.where { margin-top: 48px; }
.fam { padding: 0 18px 4px; }
.fam .table-wrap { margin-bottom: 14px; }
.lookup-os { display: flex; gap: 16px; align-items: center; text-decoration: none; color: var(--text); margin-bottom: 16px; }
.lookup-os:hover { border-color: var(--accent); }
.lookup-os span { display: block; color: var(--muted); font-size: .92rem; }
.cols { columns: 2; padding-left: 20px; }
.parts { line-height: 2; }
.parts code { white-space: nowrap; }

/* blog */
pre.code { margin: 0 0 18px; }
.post-list { display: grid; gap: 14px; margin-top: 28px; }
.post-card { display: block; padding: 22px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; color: var(--text); box-shadow: var(--shadow); transition: border-color .15s; }
.post-card:hover { border-color: var(--accent); }
.post-card h2 { font-size: 1.3rem; margin: 4px 0 8px; }
.post-card p { margin: 0 0 10px; color: var(--muted); }
.post-card .read { color: var(--accent); font-weight: 600; font-size: .92rem; }
.post .lede { margin-bottom: 28px; }
@media (max-width: 640px) { .cols { columns: 1; } .lookup-results { grid-template-columns: minmax(0, 1fr); } }

/* resellers + useful links */
.resellers { margin: 28px 0; padding: 20px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.resellers ul { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 14px; }
.resellers li { line-height: 1.5; }
.resellers .tag { margin-left: 4px; vertical-align: 1px; }
.resellers .muted { font-size: .92rem; }
.link-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.link-card { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); text-decoration: none; color: var(--text); transition: border-color .15s; }
.link-card:hover { border-color: var(--accent); }
.link-card span { color: var(--muted); font-size: .92rem; flex: 1; }
.link-card code { font-size: .78rem; color: var(--muted); background: none; padding: 0; margin-top: 6px; }
@media (max-width: 640px) { .link-grid { grid-template-columns: minmax(0, 1fr); } }

/* blog figures */
.post figure { margin: 24px 0; }
.post figure img { display: block; width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); }
.post figcaption { margin-top: 8px; font-size: .88rem; color: var(--muted); }
