@font-face {
  font-family: "Lexend";
  src: url("assets/fonts/lexend-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

/* Every color comes from the app icon, apart from the orange warning, which is the app's own. */
:root {
  color-scheme: dark;
  --page: #121133;
  --surface: #1e1d4c;
  --well: #121133;
  --line: #45447a;
  --heading: #ffffff;
  --text: #d3d4e8;
  --accent: #f1c797;
  --on-accent: #121133;
  --warning: #ff9f0a;
  --warning-text: #ff9f0a;
  --font: "Lexend", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --body-weight: 350;
  --heading-weight: 500;
  font-family: var(--font);
  font-weight: var(--body-weight);
  font-size: 106.25%;
  line-height: 1.6;
  background: var(--page);
  color: var(--text);
  scroll-behavior: smooth;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--page); }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 3px; }
button, input { font: inherit; color: inherit; }
button, summary, input[type="checkbox"] { cursor: pointer; }
strong { font-weight: 600; color: var(--heading); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3, p, ul, figure { margin: 0; }
h1, h2, h3 { color: var(--heading); font-weight: var(--heading-weight); text-wrap: balance; }
section[id] { scroll-margin-top: 1.5rem; }
.wrap { width: min(100% - 36px, 1140px); margin-inline: auto; }
.skip { position: fixed; z-index: 3; top: 12px; left: 12px; transform: translateY(-200%); background: var(--accent); color: var(--on-accent); padding: .65rem 1rem; border-radius: 8px; }
.skip:focus { transform: none; }

.masthead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .35rem 1.5rem; padding-block: 1.1rem .4rem; }
.brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; }
.brand-icon { width: 54px; flex: none; }
.brand-word { width: min(58vw, 250px); }
.masthead nav { width: 100%; display: flex; gap: 1.6rem; font-size: .9rem; font-weight: 400; }
.masthead nav a { min-height: 44px; display: inline-flex; align-items: center; color: var(--text); text-decoration: none; }
.masthead nav a:hover, .masthead nav a[aria-current="page"] { color: var(--accent); }

/* The icon stays beside the text at every width and shrinks with its column. */
.hero { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(.9rem, 4vw, 3rem); align-items: center; padding-block: clamp(1.75rem, 4.5vw, 3.5rem) clamp(2.5rem, 5.5vw, 4.5rem); }
.availability { color: var(--accent); font-size: clamp(.9rem, 1.5vw, 1rem); }
.hero h1 { font-size: clamp(1.05rem, .45rem + 2.8vw, 2.4rem); font-weight: 400; line-height: 1.24; letter-spacing: -.015em; margin-block: .5rem 1.2rem; text-wrap: pretty; }
.price { margin-top: 1.25rem; }
.price strong { font-size: 1.9rem; font-weight: 500; color: var(--accent); margin-right: .25rem; }
.requirements { font-size: .92rem; margin-top: .15rem; }
.hero-mark { width: 100%; max-width: 440px; margin-inline: auto 0; }

.topic { display: grid; gap: 1.1rem; padding-block: clamp(2.25rem, 4.6vw, 3.75rem); }
.topic h2 { font-size: clamp(1.7rem, 3.3vw, 2.5rem); line-height: 1.14; letter-spacing: -.02em; }
.topic-body { display: grid; gap: 1rem; min-width: 0; max-width: 70ch; }
.topic-body > p:first-child { font-size: 1.06em; }
.pair { display: grid; gap: 2rem; margin-top: 1rem; }
.pair > div { display: grid; gap: .7rem; align-content: start; min-width: 0; }
h3 { font-size: 1.1rem; line-height: 1.3; }

.text-button { justify-self: start; display: inline-flex; align-items: center; min-height: 44px; background: none; border: 0; padding: 0; color: var(--accent); font-size: .94rem; text-align: left; text-decoration: underline; text-underline-offset: 3px; }
.button { display: inline-flex; align-items: center; min-height: 48px; padding: .6rem 1.1rem; border-radius: 10px; background: var(--accent); color: var(--on-accent); font-size: .95rem; font-weight: 500; text-decoration: none; overflow-wrap: anywhere; }
.button:hover { filter: brightness(1.07); }

.sensor { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; max-width: 220px; border: 1.5px solid var(--line); border-radius: 6px; font-size: .78rem; }
.sensor > span { position: absolute; top: .4rem; left: .6rem; }
.sensor-crop { width: 50%; height: 50%; display: grid; place-items: center; border: 1.5px solid var(--accent); border-radius: 3px; color: var(--accent); }

.share-form { display: grid; gap: .9rem; min-width: 0; margin: .5rem 0; padding: clamp(1rem, 3vw, 1.5rem); border: 0; border-radius: 16px; background: var(--surface); }
.share-form legend { float: left; width: 100%; padding: 0; color: var(--heading); font-weight: 500; }
.formats { display: flex; flex-wrap: wrap; gap: .4rem; clear: both; }
.formats button { min-height: 44px; padding: .3rem .85rem; border: 1px solid var(--line); border-radius: 9px; background: transparent; font-size: .88rem; }
.formats button:hover { border-color: var(--accent); }
.formats button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 500; }
.identity-choice { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .7rem; font-size: .92rem; line-height: 1.5; cursor: pointer; }
.identity-choice input { width: 22px; height: 22px; margin: .05rem 0 0; accent-color: var(--accent); }
.identity-choice strong { display: block; }
.share-preview { display: grid; gap: .55rem; padding: .9rem 1rem; border-radius: 10px; background: var(--well); }
.share-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; }
.file-label { font-size: .76rem; }
.file-name { font-family: var(--mono); font-size: .9rem; color: var(--heading); overflow-wrap: anywhere; }
.identity-chip { display: inline-flex; align-items: center; gap: .4rem; min-height: 32px; padding: .2rem .6rem; border-radius: 8px; background: var(--warning); color: #000; font-size: .82rem; font-weight: 500; }
.identity-chip svg { flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.share-summary { font-size: .92rem; }
.identity-notice { color: var(--warning-text); font-size: .88rem; font-weight: 500; }

.plain-list { display: grid; gap: .6rem; padding-left: 1.15rem; }
.plain-list li::marker { color: var(--accent); }
.questions { margin-top: .75rem; }
.questions summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 52px; padding-block: .6rem; color: var(--heading); font-weight: 400; list-style: none; }
.questions summary::-webkit-details-marker { display: none; }
.questions summary::after { content: "+"; color: var(--accent); font-size: 1.3rem; line-height: 1; }
.questions details[open] summary::after { content: "−"; }
.questions details p { padding: 0 2rem 1rem 0; font-size: .95rem; }

.site-footer { padding-block: 2.5rem 3rem; }
.footer-content { display: grid; gap: 1.5rem; font-size: .9rem; }
.footer-content .brand-icon { width: 46px; }
.footer-content .brand-word { width: min(52vw, 220px); }
.footer-content .brand + p { margin-top: .7rem; }
.footer-content p { max-width: 62ch; }
.footer-links { display: flex; gap: 1.5rem; margin-top: .6rem; }
.footer-links a { min-height: 44px; display: inline-flex; align-items: center; }

dialog { width: min(560px, 100% - 32px); max-height: calc(100% - 32px); color: var(--text); background: var(--surface); border: 0; border-radius: 16px; padding: clamp(1.25rem, 4vw, 2rem); }
dialog::backdrop { background: #07071ccc; }
dialog h2 { font-size: 1.5rem; line-height: 1.2; padding-right: 2.5rem; }
.iphone-list { display: grid; gap: .3rem; margin-block: 1rem; padding-left: 1.15rem; }
.close-dialog { position: absolute; top: .6rem; right: .6rem; width: 44px; height: 44px; background: none; border: 0; font-size: 1.6rem; line-height: 1; }
.close-dialog:hover { color: var(--accent); }

.policy-main { max-width: 760px; padding-block: 3rem 4.5rem; }
.policy-main h1 { font-size: clamp(2.3rem, 6vw, 3.5rem); line-height: 1.1; letter-spacing: -.02em; margin-bottom: .75rem; }
.policy-main h2 { font-size: 1.3rem; margin-block: 2rem .6rem; }
.policy-main p + p { margin-top: .7rem; }
.policy-main .brand { margin-bottom: 2rem; }
.micro { font-size: .88rem; }

@media (min-width: 640px) {
  .wrap { width: min(100% - 64px, 1140px); }
  .masthead { flex-wrap: nowrap; padding-block: 1.4rem .6rem; }
  .masthead nav { width: auto; }
  .brand { gap: .9rem; }
  .brand-icon { width: 72px; }
  .brand-word { width: clamp(260px, 32vw, 360px); }
  .footer-content { grid-template-columns: minmax(0, .8fr) minmax(0, 1fr); }
  .footer-content .brand-icon { width: 54px; }
  .footer-content .brand-word { width: 260px; }
  .pair { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem; }
}

@media (min-width: 900px) {
  .topic { grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr); gap: clamp(2.5rem, 5vw, 4.5rem); }
}

/* On a phone the icon sits beside the statement, and the short lines around it use the full width. */
@media (max-width: 639px) {
  .hero { grid-template-areas: "availability availability" "statement icon" "price price" "requirements requirements"; row-gap: 0; }
  .hero-copy { display: contents; }
  .availability { grid-area: availability; }
  .hero h1 { grid-area: statement; margin-bottom: 0; }
  .hero-mark { grid-area: icon; }
  .price { grid-area: price; }
  .requirements { grid-area: requirements; }
}

@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
}
