/* Two-Key. Paper, ink and forest green from the app (Theme.swift), plus the
   orange of a digicam date stamp, used only where a date or count would glow.
   The sealed album is a darkroom: dark in both modes, so photos and stamps
   read like prints. System fonts only (New York and SF on Apple devices), so
   nothing blocks the first paint. */
:root {
  --paper: #F5F1EA;
  --surface: #FFFFFF;
  --ink: #1D1B18;
  --muted: #6F6A63;
  --hairline: rgba(29, 27, 24, 0.12);
  --accent: #2F5D46;
  --accent-soft: rgba(47, 93, 70, 0.10);
  --on-accent: #F5F1EA;
  --room: #1D1B18;            /* the darkroom */
  --room-2: #2A2723;
  --room-ink: #F2EEE8;
  --room-muted: #A39D94;
  --stamp: #FFA347;           /* digicam date stamp */
  --serif: "New York", ui-serif, "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --digits: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --gutter: max(20px, env(safe-area-inset-left), env(safe-area-inset-right));
  --radius: 22px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121110;
    --surface: #1D1B19;
    --ink: #F2EEE8;
    --muted: #9C968E;
    --hairline: rgba(255, 255, 255, 0.12);
    --accent: #6FA383;
    --accent-soft: rgba(111, 163, 131, 0.14);
    --on-accent: #121110;
    --room: #1D1B19;
    --room-2: #2A2724;
  }
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
img, svg, picture { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.muted { color: var(--muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: var(--gutter); top: -60px; z-index: 10; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 999px; }
.skip:focus { top: 12px; }
html:not(.js) .needs-js { display: none !important; }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; margin: 0; letter-spacing: -0.015em; text-wrap: balance; }
h1 { font-size: clamp(42px, 7.6vw, 92px); line-height: 0.98; letter-spacing: -0.03em; }
:lang(de) h1, :lang(fr) h1, :lang(pt-BR) h1, :lang(es) h1, :lang(it) h1 { font-size: clamp(38px, 6.4vw, 80px); line-height: 1.02; }
h2 { font-size: clamp(30px, 4.6vw, 48px); line-height: 1.05; letter-spacing: -0.02em; }
h3 { font-size: 22px; line-height: 1.2; }
p { margin: 0 0 14px; }
:lang(ja) h1, :lang(ko) h1, :lang(zh-Hant) h1 { font-size: clamp(34px, 5.6vw, 62px); line-height: 1.18; letter-spacing: 0; }
:lang(ja) h2, :lang(ko) h2, :lang(zh-Hant) h2 { line-height: 1.25; letter-spacing: 0; }
/* Break CJK headings only between phrases (marked with <wbr>), or between words in Korean. */
:lang(ja) :is(h1, h2), :lang(zh-Hant) :is(h1, h2), :lang(ko) :is(h1, h2, h3) { word-break: keep-all; overflow-wrap: anywhere; }

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.narrow { width: 100%; max-width: 700px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.lede { font-size: clamp(18px, 2.2vw, 21px); line-height: 1.5; color: var(--muted); max-width: 32em; margin: 22px 0 0; }
.section { padding: clamp(48px, 7vw, 88px) 0; }
.section-head { max-width: 40em; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head p { color: var(--muted); font-size: 18px; margin-top: 14px; }

/* Mark: the app icon's keyhole, split down the middle */
.keyhole .half { transition: transform 600ms cubic-bezier(.2,.8,.2,1); }

/* Header */
.site-header { padding-top: max(14px, env(safe-area-inset-top)); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--ink); text-decoration: none; font-weight: 650; font-size: 18px; letter-spacing: -0.01em; white-space: nowrap; }
.wordmark svg { width: 30px; height: 30px; flex: none; }
.site-header nav { display: flex; gap: 4px; }
.site-header nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; color: var(--muted); text-decoration: none; font-size: 15px; border-radius: 999px; }
.site-header nav a:hover { color: var(--ink); background: var(--accent-soft); }
@media (max-width: 600px) { .site-header nav .optional { display: none; } .site-header nav a { padding: 0 9px; } }

/* Buttons and pills */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px;
  border: 0; border-radius: 999px; font: 600 16px/1.2 var(--sans); text-decoration: none; cursor: pointer;
  background: var(--accent); color: var(--on-accent);
}
.button.quiet { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--hairline); }
.button.quiet:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.pills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.pill { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 7px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; line-height: 1.3; }
.pill svg { width: 16px; height: 16px; flex: none; }
.pill.soon { box-shadow: inset 0 0 0 1px var(--hairline); color: var(--muted); }
.pill.founding { background: var(--accent-soft); color: var(--accent); }

/* Hero */
.hero { padding: clamp(24px, 5vw, 64px) 0 clamp(40px, 6vw, 72px); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero .cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
@media (max-width: 880px) { .hero .wrap { grid-template-columns: minmax(0, 1fr); } }

/* The sealed album (try-it demo) */
.album {
  position: relative; background: var(--room); color: var(--room-ink); border-radius: 30px;
  padding: clamp(16px, 2.4vw, 22px); max-width: 440px; width: 100%; justify-self: center;
  box-shadow: 0 40px 80px -40px rgba(29, 27, 24, 0.55), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.album-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.album-title { font-family: var(--serif); font-size: clamp(26px, 3.4vw, 32px); line-height: 1.05; }
.album-rule { font-size: 14px; color: var(--room-muted); margin: 6px 0 0; }
.album-rule span { display: block; font-size: 13px; opacity: .75; margin-top: 2px; }
.album .keyhole { width: 52px; height: 52px; flex: none; color: var(--room-ink); }
.album .keyhole .left { transform: translateX(calc((1 - var(--progress, 0)) * -9px)); }
.album .keyhole .right { transform: translateX(calc((1 - var(--progress, 0)) * 9px)); }
.album[data-ready="true"] .keyhole { color: var(--stamp); filter: drop-shadow(0 0 10px rgba(255, 163, 71, .45)); }

.prints { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; border-radius: 14px; overflow: hidden; }
.print { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--room-2); }
.print img { width: 100%; height: 100%; object-fit: cover; }
.js .album .print img { filter: blur(16px) saturate(0.2) brightness(0.45) contrast(1.1); transform: scale(1.15); transition: filter 1.4s ease, transform 1.4s ease; transition-delay: calc(var(--i) * 110ms); }
.js .album[data-state="open"] .print img { filter: none; transform: none; }
.js .album .print::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .55; transition: opacity 1.4s ease calc(var(--i) * 110ms);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}
.js .album[data-state="open"] .print::after { opacity: 0; }

.album-stats { display: flex; flex-wrap: wrap; gap: 4px 16px; min-height: 22px; margin: 12px 2px 0; font: 600 13px/1.4 var(--digits); color: var(--stamp); text-shadow: 0 0 8px rgba(255, 163, 71, .5); }
.js .album:not([data-state="open"]) .album-stats { visibility: hidden; }
.album-status { margin: 10px 2px 0; font-size: 15px; color: var(--room-muted); min-height: 24px; }
.album[data-state="open"] .album-status { color: var(--room-ink); }
.album-status:focus { outline: none; }
.friends { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.friend {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px 0 6px; border-radius: 999px;
  border: 0; font: 600 15px/1 var(--sans); color: var(--room-ink); background: rgba(255,255,255,.07); cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); transition: background .2s, box-shadow .2s;
}
.friend .face { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; background: rgba(255,255,255,.12); color: var(--room-ink); }
.friend .tick { display: none; font-size: 12px; font-weight: 600; color: var(--room-muted); }
.friend[aria-pressed="true"] { background: rgba(111, 163, 131, .22); box-shadow: inset 0 0 0 1px rgba(111, 163, 131, .7); }
.friend[aria-pressed="true"] .face { background: #6FA383; color: #121110; }
.friend[aria-pressed="true"] .tick { display: inline; }
.friend[data-friend="you"] { cursor: default; }
html:not(.js) .friend { cursor: default; }
.album .open-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.album .button { background: #6FA383; color: #121110; }
.album[data-state="open"] [data-open] { display: none; }
.album .button:disabled { background: rgba(255,255,255,.08); color: var(--room-muted); cursor: not-allowed; }
.album :focus-visible { outline-color: var(--stamp); }
.try-hint { margin: 14px 4px 0; font-size: 15px; color: var(--muted); text-align: center; }

/* How it works: a real sequence, so it's numbered */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); counter-reset: step; }
.steps li { counter-increment: step; border-top: 2px solid var(--ink); padding-top: 18px; }
.steps li::before { content: counter(step); display: block; font: 500 clamp(44px, 6vw, 64px)/1 var(--serif); color: var(--accent); margin-bottom: 18px; }
.steps p { color: var(--muted); margin-top: 8px; }
@media (max-width: 760px) { .steps { grid-template-columns: minmax(0, 1fr); } }

/* Your rule (try-it demo) */
.rule { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
@media (max-width: 880px) { .rule { grid-template-columns: minmax(0, 1fr); } }
.rule-panel { background: var(--surface); border-radius: 28px; padding: clamp(20px, 3.4vw, 36px); box-shadow: inset 0 0 0 1px var(--hairline); }
.people { display: flex; flex-wrap: wrap; gap: 10px; min-height: 48px; margin-bottom: 22px; }
.person { width: 44px; height: 44px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--hairline); display: grid; place-items: center; transition: background .25s, box-shadow .25s; }
.person svg { width: 22px; height: 22px; color: var(--muted); }
.person.needed { background: var(--accent); box-shadow: none; }
.person.needed svg { color: var(--on-accent); }
.rule-text { margin: 0 0 24px; }
.rule-sentence { font: 500 clamp(24px, 3vw, 32px)/1.15 var(--serif); letter-spacing: -0.01em; min-height: 2.3em; margin: 0; }
.rule-detail { color: var(--muted); margin: 6px 0 0; min-height: 1.5em; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 999px; background: var(--accent-soft); border: 0; margin: 0 0 22px; min-width: 0; }
.segmented legend { padding: 0; }
.segmented label { position: relative; display: flex; align-items: center; justify-content: center; text-align: center; min-height: 44px; padding: 6px 12px; border-radius: 999px; font-weight: 600; font-size: 15px; line-height: 1.2; cursor: pointer; color: var(--muted); }
.segmented input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.segmented label:has(input:checked) { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.segmented label:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.size-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "label output" "range range"; align-items: center; column-gap: 16px; }
.size-row label { grid-area: label; font-weight: 600; font-size: 15px; }
.size-row output { grid-area: output; font: 600 15px var(--sans); color: var(--muted); text-align: right; white-space: nowrap; }
input[type="range"] { grid-area: range; width: 100%; min-width: 0; height: 44px; margin: 0; accent-color: var(--accent); cursor: pointer; background: transparent; }

/* What's inside: features beside a contact sheet that develops */
.inside { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
@media (max-width: 880px) { .inside { grid-template-columns: minmax(0, 1fr); } }
.features { margin: 0; }
.feature { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 4px 16px; padding: 20px 0; border-top: 1px solid var(--hairline); }
.feature:last-child { border-bottom: 1px solid var(--hairline); }
.feature dt { grid-column: 2; font: 500 21px/1.25 var(--serif); }
.feature dd { grid-column: 2; margin: 0; color: var(--muted); }
.feature .icon { grid-row: 1 / span 2; grid-column: 1; width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.feature .icon svg { width: 22px; height: 22px; }
.sheet { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 6px; background: var(--room); border-radius: 18px; }
.sheet .print { border-radius: 4px; }
.js .sheet .print img { filter: sepia(1) saturate(0.4) brightness(0.32) blur(3px); transition: filter 1.8s ease; transition-delay: calc(var(--i) * 120ms); }
.js .sheet.developed .print img { filter: none; }
.sheet-caption { margin-top: 12px; font-size: 15px; color: var(--muted); }

/* Made for: a list of the guides, not a wall of cards */
.guides { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(24px, 4vw, 56px); }
@media (max-width: 700px) { .guides { grid-template-columns: minmax(0, 1fr); } }
.guides a { display: block; padding: 18px 0; border-top: 1px solid var(--hairline); text-decoration: none; color: var(--ink); }
.guides a:hover .guide-title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.guide-title { display: block; font: 500 21px/1.25 var(--serif); }
.guide-text { display: block; color: var(--muted); font-size: 16px; margin-top: 4px; }

/* Privacy: the darkroom */
.darkroom { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06); background: var(--room); color: var(--room-ink); border-radius: clamp(24px, 4vw, 40px); padding: clamp(32px, 6vw, 72px) clamp(22px, 5vw, 64px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: start; }
@media (max-width: 820px) { .darkroom { grid-template-columns: minmax(0, 1fr); } }
.darkroom h2 { color: var(--room-ink); }
.darkroom p { color: var(--room-muted); margin-top: 16px; max-width: 30em; }
.darkroom ul { list-style: none; padding: 0; margin: 0; }
.darkroom li { display: flex; gap: 12px; align-items: flex-start; padding: 14px 0; border-top: 1px solid rgba(255,255,255,.12); }
.darkroom li:first-child { border-top: 0; padding-top: 0; }
.darkroom li svg { width: 20px; height: 20px; flex: none; margin-top: 3px; color: #6FA383; }

/* FAQ */
.faq > * { max-width: 760px; }
details { border-top: 1px solid var(--hairline); }
details:last-of-type { border-bottom: 1px solid var(--hairline); }
summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; padding: 12px 0; cursor: pointer; font-weight: 600; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; width: 12px; height: 12px; flex: none; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translate(-3px, -3px); transition: transform .2s; }
details[open] summary::after { transform: rotate(-135deg) translate(-3px, -3px); }
details p { margin: 0 0 18px; color: var(--muted); max-width: 40em; }

/* Footer */
.site-footer { border-top: 1px solid var(--hairline); padding: 28px 0 max(36px, env(safe-area-inset-bottom)); font-size: 15px; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 0 18px; align-items: center; }
.site-footer a { color: var(--muted); display: inline-flex; align-items: center; min-height: 44px; }
.site-footer .spacer { flex: 1; }
.languages { display: flex; flex-wrap: wrap; gap: 0 14px; margin-top: 6px; font-size: 14px; }
.languages a, .languages span { display: inline-flex; align-items: center; min-height: 44px; }
.languages a { text-decoration: none; }
.languages a:hover { color: var(--ink); text-decoration: underline; }
.languages [aria-current] { color: var(--ink); font-weight: 600; }

/* Article and text pages */
main.narrow { padding-top: clamp(24px, 5vw, 56px); padding-bottom: 72px; }
main.narrow h1 { font-size: clamp(36px, 6vw, 56px); line-height: 1.04; margin-bottom: 6px; }
main.narrow h2 { font-size: clamp(25px, 3.2vw, 30px); margin: 48px 0 12px; }
main.narrow h3 { margin: 28px 0 8px; }
main.narrow ul { padding-left: 22px; }
main.narrow li { margin: 8px 0; }
main.narrow li::marker { color: var(--accent); }
.mark, .breadcrumb { font-size: 15px; font-weight: 600; color: var(--accent); margin: 0 0 12px; }
.breadcrumb a { text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.breadcrumb a:hover { text-decoration: underline; }
.strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; padding: 5px; margin: 32px 0 8px; background: var(--room); border-radius: 14px; }
.strip .print { border-radius: 3px; }
.article-cta { margin: 48px 0 8px; padding: clamp(22px, 4vw, 32px); border-radius: var(--radius); background: var(--room); color: var(--room-ink); }
main.narrow .article-cta h2 { color: var(--room-ink); font-size: 24px; margin: 0 0 8px; }
.article-cta p { color: var(--room-muted); }
.article-cta .button { background: #6FA383; color: #121110; margin-top: 6px; }
.related { margin-top: 40px; }
main.narrow .related ul { list-style: none; padding: 0; }
.related li { margin: 0; }
.related a { display: inline-flex; align-items: center; min-height: 44px; }
.table-scroll { overflow-x: auto; margin: 8px 0 14px; }
.compare { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 520px; }
.compare th, .compare td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--hairline); }
.compare thead th { font-weight: 600; color: var(--muted); }
.compare tbody th { font-weight: 600; width: 28%; }

/* Motion: everything works instantly for people who prefer less */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; transition-delay: 0s !important; animation: none !important; }
}
