/* Every page but the home page: the Dive's surface and shallows for reading, with the sea floor
   as the footer. Colors and type come from the home page's Dive. */
@font-face { font-family: "Bricolage Grotesque"; src: url("/assets/fonts/BricolageGrotesque.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("/assets/fonts/InstrumentSans.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Martian Mono"; src: url("/assets/fonts/MartianMono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Martian Mono"; src: url("/assets/fonts/MartianMono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  color-scheme: light;
  --sky-1: #F2FBF9; --sky-2: #C3ECEE; --sun: #FFE7A8; --sun-glow: rgba(255, 226, 150, .5);
  --w0: #94DEE2; --w1a: #7FD5DE; --w1: #6CCDDC; --w2: #4BB5D3; --w4: #17558D; --w6: #08214A; --floor: #070B12;
  --sand-1: #151B22; --sand-2: #1D242C;
  --t1: #062630; --t2: #0F3B47; --ta: #6B2006; --line: rgba(6, 38, 48, .2); --on: #F2FBF9;
  --field: rgba(242, 251, 249, .55);
  --apple: #000; --on-apple: #fff;
  --shaft: rgba(255, 255, 255, .34); --caustic: .12;
  --f-display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --f-body: "Instrument Sans", "Helvetica Neue", "Segoe UI", system-ui, sans-serif;
  --f-mono: "Martian Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --gl: max(16px, env(safe-area-inset-left, 0px));
  --gr: max(16px, env(safe-area-inset-right, 0px));
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --sky-1: #08131B; --sky-2: #13303A; --sun: #E6EEEA; --sun-glow: rgba(220, 236, 230, .16);
    --w0: #1A5961; --w1a: #165059; --w1: #134651; --w2: #0F3B48; --w4: #0A2634; --w6: #05131F; --floor: #05080D;
    --t1: #EAF5F3; --t2: #B6D2CF; --ta: #FFB08F; --line: rgba(234, 245, 243, .18); --on: #062630;
    --field: rgba(8, 19, 27, .35);
    --apple: #fff; --on-apple: #000;
    --shaft: rgba(200, 235, 230, .09); --caustic: 0;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --sky-1: #08131B; --sky-2: #13303A; --sun: #E6EEEA; --sun-glow: rgba(220, 236, 230, .16);
  --w0: #1A5961; --w1a: #165059; --w1: #134651; --w2: #0F3B48; --w4: #0A2634; --w6: #05131F; --floor: #05080D;
  --t1: #EAF5F3; --t2: #B6D2CF; --ta: #FFB08F; --line: rgba(234, 245, 243, .18); --on: #062630;
  --field: rgba(8, 19, 27, .35);
  --apple: #fff; --on-apple: #000;
  --shaft: rgba(200, 235, 230, .09); --caustic: 0;
}

* { box-sizing: border-box; }
html { background: var(--floor); }
body {
  margin: 0; background: var(--sky-1); color: var(--t1);
  font-family: var(--f-body); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--ta); }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: 1120px; margin-inline: auto; padding-left: var(--gl); padding-right: var(--gr); position: relative; }
.skip { position: absolute; left: var(--gl); top: 8px; z-index: 50; padding: 8px 12px; border-radius: 8px; background: var(--t1); color: var(--on); transform: translateY(-200%); }
.skip:focus { transform: none; }

/* ---------- surface */
.surface { position: relative; overflow: hidden; background: linear-gradient(180deg, var(--sky-1), var(--sky-2)); padding-top: env(safe-area-inset-top, 0px); }
.sun { position: absolute; right: max(6%, 24px); top: calc(env(safe-area-inset-top, 0px) + 64px); width: clamp(96px, 13vw, 190px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, var(--sun) 0 34%, var(--sun-glow) 37%, transparent 100%); pointer-events: none; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 18px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--f-display); font-weight: 720; font-size: 20px; letter-spacing: -0.02em; text-decoration: none; }
.brand img { width: 30px; height: 30px; }
.top nav { display: flex; gap: 18px; margin-left: auto; font-size: 15.5px; font-weight: 500; }
.top .dl { padding: 7px 14px; border-radius: 999px; background: var(--t1); color: var(--on); font-size: 15.5px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.top .dl:hover { color: var(--on); }
/* on phones the links take a second row and Download stays beside the name */
@media (max-width: 559px) {
  .top { flex-wrap: wrap; row-gap: 4px; padding-block: 14px 4px; }
  .top nav { order: 2; width: 100%; gap: 22px; margin-left: 0; }
  .top .dl { margin-left: auto; }
}
.top nav a { text-decoration: none; padding-block: 6px; }
.top nav a[aria-current] { box-shadow: inset 0 -2px 0 var(--t1); }
.title { padding-block: clamp(28px, 6vw, 72px) clamp(28px, 4vw, 48px); }
h1, h2 { font-family: var(--f-display); letter-spacing: -0.03em; text-wrap: balance; margin: 0; }
h1 { font-weight: 780; font-size: clamp(40px, 6vw, 80px); line-height: .96; letter-spacing: -0.04em; max-width: 14ch; }
.say { margin: 18px 0 0; font-size: clamp(18px, 1.6vw, 21px); line-height: 1.45; max-width: 40ch; color: var(--t2); }
.meta { margin: 18px 0 0; font-family: var(--f-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--t2); }
.meta b { font-weight: 500; letter-spacing: 0; text-transform: none; font-size: 14px; color: var(--ta); margin-left: 2px; }

.surf { position: relative; height: 40px; background: var(--sky-2); overflow: hidden; }
.surf svg { position: absolute; left: 0; bottom: 0; width: 200%; height: 40px; }
.surf path { fill: var(--w0); }
.surf .crest { fill: none; stroke: #fff; stroke-opacity: .75; stroke-width: 1.5; }
.wv2 { opacity: .5; }
.on .wv1 { animation: roll 14s linear infinite; }
.on .wv2 { animation: roll 22s linear infinite reverse; }
@keyframes roll { to { transform: translateX(-50%); } }

/* ---------- shallows: sunlight at the top, the cuttlefish's lane, then the reading column */
.water { position: relative; overflow: clip; background: linear-gradient(180deg, var(--w0), var(--w1a) 900px, var(--w1a)); }
.light { position: absolute; inset: 0 0 auto; height: 560px; overflow: hidden; pointer-events: none; -webkit-mask-image: linear-gradient(transparent, #000 90px, #000 40%, transparent); mask-image: linear-gradient(transparent, #000 90px, #000 40%, transparent); }
.caustics { position: absolute; left: -280px; top: -280px; right: 0; bottom: 0; opacity: var(--caustic); background: url("/assets/img/caustic.svg") 0 0 / 280px 280px; }
.on .caustics { animation: drift 26s linear infinite; }
@keyframes drift { to { transform: translate(280px, 280px); } }
.shafts i { position: absolute; top: -20%; width: 150px; height: 130%; background: radial-gradient(50% 100% at 50% 0%, var(--shaft), transparent); transform-origin: 50% 0; transform: rotate(16deg); }
.shafts i:nth-child(1) { left: 10%; }
.shafts i:nth-child(2) { left: 46%; width: 110px; animation-delay: -3s; }
.shafts i:nth-child(3) { left: 78%; width: 90px; animation-delay: -6s; }
.on .shafts i { animation: sway 10s ease-in-out infinite alternate; }
@keyframes sway { from { transform: rotate(12deg); } to { transform: rotate(20deg); } }

/* It crosses in about a minute, turns, and comes back; it never swims behind the text. */
.lane { position: relative; height: clamp(84px, 10vw, 120px); container-type: inline-size; pointer-events: none; }
.swimmer { position: absolute; left: 0; top: 14%; width: clamp(64px, 8vw, 96px); transform: translateX(6cqw); }
.cuttle { display: block; width: 100%; height: auto; overflow: visible; }
.on .swimmer { animation: swim 64s ease-in-out infinite; }
.on .cuttle { animation: bob 3.6s ease-in-out infinite alternate; }
.on .cuttle .eye { transform-origin: 124px 55px; animation: blink 5s infinite; }
@keyframes swim {
  0% { transform: translateX(6cqw); }
  46% { transform: translateX(calc(94cqw - 100%)); }
  50% { transform: translateX(calc(94cqw - 100%)) scaleX(-1); }
  96% { transform: translateX(6cqw) scaleX(-1); }
  100% { transform: translateX(6cqw); }
}
@keyframes bob { from { transform: translateY(-3px); } to { transform: translateY(4px); } }
@keyframes blink { 0%, 95%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.1); } }

/* ---------- reading */
.read { position: relative; padding-bottom: clamp(56px, 8vw, 96px); }
.read > * { max-width: 68ch; }
.read p, .read ul, .read ol { margin: 0 0 1em; }
.read h2 { font-weight: 720; font-size: clamp(26px, 2.6vw, 34px); line-height: 1.08; margin: 2em 0 .55em; }
.read h3 { font-family: var(--f-body); font-weight: 650; font-size: 18px; letter-spacing: 0; margin: 1.6em 0 .4em; }
.read > :first-child { margin-top: 0; }
.lead { font-size: clamp(18px, 1.5vw, 20px); line-height: 1.55; }
.read ul { padding: 0; list-style: none; }
.read li { position: relative; padding-left: 22px; margin-bottom: .5em; }
.read li::before { content: ""; position: absolute; left: 3px; top: .62em; width: 7px; height: 7px; border-radius: 50%; background: var(--ta); }
strong { font-weight: 650; }

.address { display: inline-block; margin-bottom: 10px; font-family: var(--f-display); font-weight: 700; font-size: clamp(24px, 3.4vw, 40px); letter-spacing: -0.02em; text-underline-offset: 6px; text-decoration-thickness: 2px; overflow-wrap: anywhere; }
.soon { display: inline-block; padding: 8px 14px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); font-size: 15px; font-weight: 500; }

.table-wrap { overflow-x: auto; margin: 0 0 1em; }
.data { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 15.5px; }
.data th, .data td { text-align: left; vertical-align: top; padding: 11px 16px 11px 0; border-bottom: 1px solid var(--line); }
.data thead th { font-family: var(--f-mono); font-weight: 500; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--t2); border-bottom-color: var(--t1); }
.data tbody th { font-weight: 650; }
/* Comparison tables stay whole on a phone, since scrolling would hide the Cuttle column. */
.compare { min-width: 0; table-layout: fixed; }
.compare td, .compare th { overflow-wrap: break-word; }
@media (max-width: 560px) { .compare { font-size: 14px; } .compare th, .compare td { padding-right: 10px; } }

.build { border-top: 1px solid var(--line); }
.read .build h2 { margin-top: 1.1em; }
.when { margin: -.1em 0 1.1em; font-family: var(--f-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--t2); }
.next { border-top: 0; }
.read .next h2 { margin-top: 0; }
.next .when { display: inline-block; padding: 6px 12px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); color: var(--t1); }

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 16px 0; cursor: pointer; list-style: none; font-family: var(--f-display); font-weight: 650; font-size: clamp(19px, 1.7vw, 22px); letter-spacing: -0.015em; line-height: 1.25; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font-family: var(--f-mono); font-weight: 400; color: var(--ta); }
.faq details[open] summary::after { content: "\2212"; }
.answer { padding-bottom: 8px; }
.answer h3:first-child { margin-top: 0; }

.form { display: grid; gap: 8px; max-width: 420px; margin: 28px 0 0; }
.form label { font-weight: 600; font-size: 15px; }
.form input {
  font: inherit; color: var(--t1); background: var(--field); min-height: 50px; padding: 10px 14px;
  border: 0; border-radius: 12px; box-shadow: inset 0 0 0 1.5px var(--line);
}
.form input:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--t1); }
.form p { margin: 0 0 8px; }
.btn {
  justify-self: start; display: inline-flex; align-items: center; min-height: 50px; margin-top: 8px; padding: 8px 22px;
  border: 0; border-radius: 14px; cursor: pointer; background: var(--t1); color: var(--on); text-decoration: none;
  font: 700 17px/1.1 var(--f-display); letter-spacing: -0.01em; transition: transform .2s ease;
}
.btn:hover { color: var(--on); transform: translateY(-2px); }
.btn:disabled { opacity: .55; cursor: progress; transform: none; }
/* Apple's rule for its button: black on light pages, white on dark ones. */
.btn.apple { gap: 10px; margin-top: 28px; background: var(--apple); color: var(--on-apple); }
.btn.apple:hover { color: var(--on-apple); }
.btn.apple svg { width: 18px; height: 18px; fill: currentColor; }
.form-note { min-height: 1.6em; margin-top: 14px; color: var(--ta); font-weight: 500; }
[hidden] { display: none !important; }

/* ---------- setup guides */
code { font-family: var(--f-mono); font-size: .8em; overflow-wrap: anywhere; }
.read pre { margin: 0 0 1em; padding: 14px 16px; overflow-x: auto; border-radius: 12px; background: var(--field); box-shadow: inset 0 0 0 1px var(--line); font: 13px/1.7 var(--f-mono); }
.read pre code { font-size: inherit; }
.glance { display: grid; grid-template-columns: max-content 1fr; gap: 10px 24px; margin: 0 0 1.4em; padding: 18px 0; border-block: 1px solid var(--line); }
.glance dt { font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--t2); padding-top: .35em; }
.glance dd { margin: 0; }
.shots { display: grid; grid-template-columns: repeat(2, minmax(0, 220px)); gap: 20px; margin: 0 0 1.6em; }
.shots figure { margin: 0; }
.shots img { border-radius: 22px; }
.shots figcaption { margin-top: 8px; font-size: 14px; color: var(--t2); }
.read ol.steps { padding: 0; list-style: none; counter-reset: step; }
.read ol.steps > li { counter-increment: step; padding-left: 40px; margin-bottom: .8em; }
.read ol.steps > li::before { content: counter(step); left: 0; top: .1em; width: 26px; height: 26px; border-radius: 50%; background: none; box-shadow: inset 0 0 0 1.5px var(--ta); color: var(--ta); font: 500 12px/26px var(--f-mono); text-align: center; }
.data.kv { min-width: 0; }
.data.kv th { width: 40%; }
.read ul.guides { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 12px; max-width: none; margin-bottom: 1.6em; }
.read ul.guides li { padding: 0; margin: 0; }
.read ul.guides li::before { content: none; }
.guides a { display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 14px 16px; border-radius: 14px; background: var(--field); box-shadow: inset 0 0 0 1px var(--line); text-decoration: none; transition: transform .2s ease; }
.guides a:hover { color: inherit; transform: translateY(-2px); box-shadow: inset 0 0 0 1.5px var(--t1); }
.guides span { font-family: var(--f-display); font-weight: 680; font-size: 19px; letter-spacing: -0.015em; }
.guides small { font-size: 14.5px; line-height: 1.4; color: var(--t2); }
@media (max-width: 599px) {
  .glance { grid-template-columns: 1fr; gap: 2px; }
  .glance dd { margin-bottom: 10px; }
}

/* ---------- the dive down to the sea floor */
.floor { background: var(--floor); color: #C9D2D8; }
.descent { height: clamp(140px, 18vw, 240px); background: linear-gradient(180deg, var(--w1a), var(--w2) 22%, var(--w4) 52%, var(--w6) 80%, var(--floor)); }
.sand { display: block; width: 100%; height: clamp(48px, 7vw, 96px); }
.s1 { fill: var(--sand-1); }
.s2 { fill: var(--sand-2); }
.ground { background: var(--sand-2); padding-block: 8px calc(40px + env(safe-area-inset-bottom, 0px)); }
.foot { display: flex; flex-wrap: wrap; gap: 12px 30px; align-items: baseline; justify-content: space-between; font-size: 15px; }
.foot p { margin: 0; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.foot a { color: #EEF4F8; }
.foot a:hover { color: #FFB59C; }
.foot a[aria-current] { color: #FFB59C; }
.floor :focus-visible { outline-color: #EEF4F8; }

@media (max-width: 599px) {
  body { font-size: 16.5px; }
  .foot { flex-direction: column; gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
