/* The home page in Norwegian and English ("Store First", chosen by the owner on 2026-11-30 and live since that evening;
   docs/DECISIONS.md). Loaded after styles.css, and only by the two pages built from content/<lang>/home-next.html
   (scripts/build-pages.mjs, `css: 'home'`); the other languages' home pages are still the earlier one. Everything new
   lives inside .home2; the header, the footer and the plain sections after it (Blundi in brief, the guides, the
   medical and trademark lines) keep the site's own styles.

   The phones: each is first a flat phone drawn here in CSS, with the capture as an ordinary picture. /tools/home.js
   draws the same phone in 3D on the canvas above it and fades the flat one out. Where the script, WebGL or a fast
   enough device is missing, the flat phone simply stays, so nothing here may depend on the script having run.

   Old browsers: no container queries, no color-mix(), no nesting, no aspect-ratio and no logical properties are used.
   A browser without clamp() or min() falls back to the fixed sizes written before them. A size kept in a custom
   property cannot fall back that way (the browser keeps the text it does not understand), so those are fixed sizes
   first and min() only inside @supports, which asks for min() inside calc(): that is how the sizes are used, and
   Safari 12 and 13.0 know the one without the other. */

/* ---------- colours: the app's own (apps/mobile/src/theme/tokens.ts), day and night ---------- */
/* On :root: this file is loaded by the new home page alone, and the names below are new ones (styles.css keeps its
   own --bg, --text, --accent and the rest, for the day and for a dark screen). */
:root {
  --backdrop: #ECE7DC; --text-muted: #6C665C; --text-faint: #8E877B; --on-accent: #FFFDF9;
  --night: #2B3A75; --night-ink: #2B3A75; --nap-edge: #178C9E; --nap-ink: #0F6E7C;
  --feed: #B98A1E; --feed-ink: #7E5D10; --diaper: #6A9478; --diaper-ink: #3C6A4E; --other: #A68A5B; --other-ink: #76603A;
  --hd-ink: #76603A; --scrim: #E9E6DF;
  /* the phone: its metal band, its back, the black glass round the screen, the lighter lip of the flat phone */
  --phone-frame: #48443E; --phone-back: #37342E; --phone-glass: #11100E; --phone-lip: #95928D;
  /* the shadow under a phone's foot, from its edge to its core, and the shadow under a picture */
  --shade-0: rgba(33, 31, 27, 0); --shade-1: rgba(33, 31, 27, 0.075); --shade-2: rgba(33, 31, 27, 0.21); --shade-card: rgba(33, 31, 27, 0.22);
}
@media (prefers-color-scheme: dark) {
  :root {
    --backdrop: #151413; --text-muted: #A59F93; --text-faint: #857F75; --on-accent: #1D1C1A;
    --night: #6D82CC; --night-ink: #9AAEE0; --nap-edge: #57CFE0; --nap-ink: #7FDCEA;
    --feed: #E2B24A; --feed-ink: #EEC676; --diaper: #8FB79A; --diaper-ink: #A9CDB2; --other: #C8AE80; --other-ink: #D6BF95;
    --hd-ink: #A59F93; --scrim: #151413;
    --phone-frame: #979287; --phone-back: #56524C; --phone-glass: #0C0B0A; --phone-lip: #B7B2A8;
    --shade-0: rgba(0, 0, 0, 0); --shade-1: rgba(0, 0, 0, 0.17); --shade-2: rgba(0, 0, 0, 0.48); --shade-card: rgba(0, 0, 0, 0.5);
  }
}
/* the night part of the day, and the dock while it lies over it: always the app's dark colours, the site's names too */
[data-theme="night"] {
  --bg: #1D1C1A; --surface: #272623; --surface-alt: #312F2B; --border: #3A3833; --text: #ECE7DE; --muted: #A59F93;
  --accent: #D98A6B; --accent-soft: #3C2C25; --accent-text: #D98A6B; --accent-fill: #D98A6B;
  --backdrop: #151413; --text-muted: #A59F93; --text-faint: #857F75; --on-accent: #1D1C1A;
  --night: #6D82CC; --night-ink: #9AAEE0; --nap-edge: #57CFE0; --nap-ink: #7FDCEA;
  --feed: #E2B24A; --feed-ink: #EEC676; --diaper: #8FB79A; --diaper-ink: #A9CDB2; --other: #C8AE80; --other-ink: #D6BF95;
  --hd-ink: #A59F93; --scrim: #151413;
  --phone-frame: #979287; --phone-back: #56524C; --phone-glass: #0C0B0A; --phone-lip: #B7B2A8;
  --shade-0: rgba(0, 0, 0, 0); --shade-1: rgba(0, 0, 0, 0.17); --shade-2: rgba(0, 0, 0, 0.48); --shade-card: rgba(0, 0, 0, 0.5);
}

/* ---------- the page inside the site's frame ---------- */
/* The new part runs the full width of the screen; what follows it keeps the site's measure. */
body.home main.wrap { max-width: none; padding: 0; }
/* the plain sections share the new part's frame and left edge, and keep a reading measure */
body.home main.wrap > section { max-width: 1440px; margin-left: auto; margin-right: auto; padding-left: 16px; padding-right: 16px; }
body.home main.wrap > section > * { max-width: 720px; }
body.home header.site { padding: 12px 0; }
body.home header.site .wrap { max-width: 1440px; padding: 0 16px; position: relative; }
body.home footer.site .wrap { max-width: 1440px; padding: 0 16px; }
.home2 { position: relative; color: var(--text); overflow-x: hidden; overflow-x: clip; }
.home2 .hw { position: relative; max-width: 1440px; margin: 0 auto; padding: 0 16px; }
.home2 section { position: relative; }
.home2 h1, .home2 h2 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.015em; line-height: 1.06; margin: 0; overflow-wrap: break-word; min-width: 0; text-wrap: balance; }
/* Korean breaks a line between words, never inside one (a word wider than the line still breaks). Japanese headings
   and the line under the headline break between phrases where the browser knows them (auto-phrase); elsewhere the
   headline breaks at its comma, and the rest as Japanese always has. The Chinese headline and last heading break at
   their punctuation and spaces, so a doubled word (試試) stays on one line. */
body.home:lang(ko) { word-break: keep-all; overflow-wrap: break-word; }
.home2:lang(ja) h1, .home2:lang(zh-TW) h1, .home2:lang(zh-TW) .get h2 { word-break: keep-all; }
.home2:lang(ja) h1, .home2:lang(ja) h2, .home2:lang(ja) .say { word-break: auto-phrase; }
.home2 p { margin: 0; }
.home2 figure { margin: 0; }
.home2 .sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.home2 .pluss { display: inline-block; padding: 0 8px; border-radius: 6px; background: var(--accent-soft); color: var(--accent-text); font: 600 0.88em/1.45 var(--sans); vertical-align: baseline; white-space: nowrap; }

/* ---------- the app's own pen ---------- */
/* The lines inside a drawing are named without .home2 in front: a drawing is shown through <use>, and a browser matches
   the copy it makes against the drawing alone, not against the page around it. These names are used nowhere else. */
.home2 .dr { width: 32px; height: 32px; flex: none; overflow: visible; }
.nb-wash { fill: var(--nb-wash); fill-opacity: 0.32; }
.nb-ink { fill: none; stroke: var(--nb-ink); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nb-pencil { fill: none; stroke: var(--nb-ink); stroke-opacity: 0.42; stroke-width: 0.8; stroke-linecap: round; stroke-linejoin: round; }
.home2 .dr--feed { --nb-ink: var(--feed-ink); --nb-wash: var(--feed); }
.home2 .dr--nap { --nb-ink: var(--nap-ink); --nb-wash: var(--nap-edge); }
.home2 .dr--night { --nb-ink: var(--night-ink); --nb-wash: var(--night); }
.home2 .dr--diaper { --nb-ink: var(--diaper-ink); --nb-wash: var(--diaper); }
.home2 .dr--other { --nb-ink: var(--other-ink); --nb-wash: var(--other); }
.home2 .hd { overflow: visible; }
.hd-ink { fill: none; stroke: var(--hd-ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.hd-pencil { fill: none; stroke: var(--hd-ink); stroke-opacity: 0.4; stroke-width: 0.9; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }

/* ---------- the store badges: both official ones side by side, the same height, never restyled or moved ---------- */
/* Apple's SVG has no margin. Google's PNG has clear space built in, different in each language's file (en 41 px all
   round, nb 29 px above and below, of 250); the negative margins line its ink up with Apple's. */
.home2 .stores { --badge: 52px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0; }
.home2 .stores .store-badge { display: block; border-radius: 9px; }
.home2 .stores .store-badge img { pointer-events: none; max-width: none; }
.home2 .stores .store-badge.apple img { height: 52px; height: var(--badge); width: auto; margin: 0; }
.home2 .stores .store-badge.en img { height: 77px; height: calc(var(--badge) * 1.488); width: auto; margin: -12px; margin: calc(var(--badge) * -0.244); }
.home2 .stores .store-badge.nb img { height: 68px; height: calc(var(--badge) * 1.302); width: auto; margin: -8px 0; margin: calc(var(--badge) * -0.151) 0; }
/* on an Android phone Google's badge comes first; the QR for a computer stays last */
.android .home2 .stores .store-badge:not(.apple) { order: -1; }
@media (max-width: 759px) { .home2 .stores { --badge: 44px; } }
@media (max-width: 349px) { .home2 .stores { --badge: 40px; gap: 8px; } }
/* Safari before 14.1 puts no gap between the items of a row like this one. It learned `inset` in the same version,
   which is the question a stylesheet can ask. */
@supports not (inset: 0) {
  .home2 .stores > * + * { margin-left: 12px; }
  .home2 .stop h2 .hour .dr { margin-right: 8px; }
}

/* the dock: on a phone, both badges in a slim strip once the ones under the headline have scrolled away. It steps
   aside while a row of the page's own badges is on screen, so there is never more than one pair in view. Without the
   script it never shows: the badges under the headline and at the end are always there. */
.home2 .dock { display: none; }
@media (max-width: 759px) {
  .js .home2 .dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; justify-content: center; padding: 8px 16px; padding-bottom: calc(8px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--border); transition: opacity 0.2s ease, visibility 0s; }
  .js .home2 .dock[data-theme="night"] { background: var(--backdrop); }
  .js .home2 .dock .stores { --badge: 40px; flex-wrap: nowrap; }
  .js .home2 .dock.is-off { opacity: 0; visibility: hidden; transition: opacity 0.2s ease, visibility 0s 0.2s; }
  /* room under the footer, so the dock never lies over its last lines */
  .js body.home { padding-bottom: 60px; padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
}

/* ---------- a phone standing in its day ---------- */
.home2 .obj { --sw: 272px; --gw: calc(var(--sw) * 1.42); --gk: 0.27; position: relative; width: var(--sw); margin: 0 auto calc(var(--gw) * var(--gk) / 2 + 8px); }
/* A finger moving sideways turns the phone, one moving up or down scrolls the page. The second line also keeps
   pinch-to-zoom; a browser that does not know it keeps the first. */
.home2 .slab { --rest: -8deg; position: relative; z-index: 2; display: block; width: var(--sw); height: calc(var(--sw) * 2.073); border-radius: calc(var(--sw) * 0.15); touch-action: pan-y; touch-action: pan-y pinch-zoom; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.has-3d.can-drag .home2 .slab { cursor: grab; }
.has-3d.can-drag .home2 .slab:active, .has-3d.can-drag .home2 .slab.is-grabbing { cursor: grabbing; }
/* a browser that does not know :focus-visible drops the first rule and keeps its own focus ring */
.home2 .slab:focus:not(:focus-visible) { outline: none; }
.home2 .slab:focus-visible { outline: 2px solid var(--accent-fill); outline-offset: 8px; }
.home2 .slab__flat { position: absolute; top: 0; right: 0; bottom: 0; left: 0; padding: calc(var(--sw) * 0.012); border-radius: inherit; background: var(--phone-frame); background: linear-gradient(100deg, var(--phone-lip), var(--phone-frame) 30%, var(--phone-frame) 72%, var(--phone-lip)); transition: opacity 0.12s ease; }
.home2 .slab__glass { height: 100%; padding: calc(var(--sw) * 0.016); border-radius: calc(var(--sw) * 0.138); background: var(--phone-glass); }
.home2 .screen { position: relative; height: 100%; border-radius: calc(var(--sw) * 0.122); overflow: hidden; background: var(--surface); }
.home2 .screen img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; -webkit-user-drag: none; }
.home2 .slab__gl { position: absolute; left: 0; top: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }
.home2 .slab.is-live .slab__gl { opacity: 1; }
.home2 .slab.is-live .slab__flat { opacity: 0; pointer-events: none; }
/* the ground: the hand-drawn day ring seen at a slant, the sun or the moon on it, the shadow under the foot */
.home2 .ground { position: absolute; left: 50%; top: 100%; z-index: 0; width: var(--gw); height: calc(var(--gw) * var(--gk)); transform: translate(-50%, -50%); pointer-events: none; }
.home2 .ground__ring { position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: visible; }
.ga { fill: none; stroke-width: 6; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.ga--night { stroke: var(--night); }
.ga--nap { stroke: var(--nap-edge); }
.ga--win { stroke: var(--accent); }
.home2 .ground__sun { position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; transform: translate(-50%, -50%) translate(calc(var(--gw) * -0.47 * var(--s, 0)), calc(var(--gw) * var(--gk) * 0.47 * var(--c, 1))); }
/* where the sun or the moon stands at each hour of the page (sine and cosine of the hour on the 24-hour ring); the
   script moves it there from the hour before */
.home2 .sun-0655 { --s: 0.9713; --c: -0.2377; } .home2 .sun-0928 { --s: 0.6156; --c: -0.788; } .home2 .sun-1815 { --s: -0.9979; --c: 0.0654; }
.home2 .sun-0310 { --s: 0.7373; --c: 0.6756; } .home2 .sun-0322 { --s: 0.7716; --c: 0.6361; }
.home2 .obj__shadow { position: absolute; left: 50%; top: 100%; z-index: 1; width: calc(var(--sw) * 1.18); height: calc(var(--sw) * 0.2); border-radius: 50%; background: radial-gradient(closest-side, var(--shade-2), var(--shade-1) 42%, var(--shade-0)); transform: translate(-47%, -56%) scaleX(var(--sh-sx, 1)); pointer-events: none; }
.home2 .obj__hint { display: none; }
.home2 .turnhint { display: none; text-align: center; font-size: 15px; color: var(--text-muted); }
/* the line that says the phone can be turned shows only while the first screen's phone really is the 3D one */
.has-3d.can-drag .home2 .obj.has-live-phone + .turnhint { display: block; }

/* a pair: Dad's phone stands on the back of the ring, just behind Mom's */
.home2 .obj--pair { --pw: 250px; --sw: var(--pw); width: calc(var(--pw) * 1.38); max-width: 100%; margin-bottom: calc(var(--gw) * var(--gk) / 2 + 24px); }
.home2 .obj--pair .slab--front { --sw: var(--pw); --rest: -10deg; margin-left: auto; }
.home2 .obj--pair .slab--back { --sw: calc(var(--pw) * 0.86); --rest: 24deg; position: absolute; left: 0; top: calc(var(--pw) * 0.24); z-index: 1; }
.home2 .obj--pair .obj__shadow--back { left: calc(var(--pw) * 0.43); top: calc(var(--pw) * 2.02); width: calc(var(--pw) * 0.8); z-index: 0; }
.home2 .obj--pair .obj__shadow--front { left: calc(100% - var(--pw) * 0.5); }

/* hanging and standing drawings: they sway a little when the page moves, and come to rest */
.home2 .charm { position: absolute; z-index: 3; display: flex; flex-direction: column; align-items: center; transform-origin: 50% 0; transform: rotate(calc(var(--tilt, 0deg) + var(--sway, 0deg))); pointer-events: none; }
.home2 .charm__thread { width: 10px; height: 70px; }
.home2 .charm__pic { width: 46px; height: 46px; margin-top: -4px; }
.home2 .charm--stand { transform-origin: 50% 100%; }
.home2 .charm--stand .charm__pic { width: 50px; height: 50px; margin-top: 0; }
.home2 .charm--stand ~ h2 { padding-right: 60px; min-height: 44px; }

/* ---------- the first screen: the name, one sentence, both store badges, the phone ---------- */
.home2 .top { padding: 8px 0 20px; }
.home2 .top__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.home2 .top h1 { font-size: 32px; font-size: clamp(30px, 8.4vw, 42px); line-height: 1.05; letter-spacing: -0.02em; max-width: 13ch; }
.home2 .say { font-size: 17px; line-height: 1.42; color: var(--text-muted); margin-top: 8px; max-width: 31ch; }
.home2 .top .stores { margin-top: 16px; }
/* the December line the Worker puts under the opening sentence on the days the notebook is open (src/december.ts) */
.home2 .top .stores-note { margin: 12px 0 0; max-width: 31ch; font-size: 15px; line-height: 1.4; color: var(--text-muted); }
.home2 .top .obj { --sw: 272px; }
/* who makes it, and that it is free: a quiet line under the badges */
.home2 .by { margin-top: 12px; max-width: 34ch; font-size: 14px; line-height: 1.4; color: var(--text-muted); }
.home2 .top__stage { min-width: 0; }
@media (max-width: 899px) { .home2 .top .slab { --rest: -13deg; } }

/* ---------- Blundi in numbers: live totals, filled in by the Worker (src/worker.ts) ---------- */
/* One larger card for the babies asleep right now, with the app's own drawing of a baby asleep in the moon (the file the
   old home page showed), and two smaller figures beside it, each with a drawing from the app as a mask. */
.home2 .numbers-home { max-width: 1440px; margin: 0 auto; padding: 12px 16px 28px; }
.home2 .numbers-home[hidden] { display: none; }
.home2 .numbers-home h2 { font-size: 22px; line-height: 1.2; }
.home2 .numbers-home .numbers { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 0 16px; margin: 16px 0 12px; padding: 0; list-style: none; }
.home2 .numbers-home .numbers li { position: relative; margin: 0; padding: 12px 0 12px 44px; background: none; border: 0; border-radius: 0; }
.home2 .numbers-home .numbers li::before { content: ''; position: absolute; left: 0; top: 16px; width: 32px; height: 32px; background: var(--diaper-ink); -webkit-mask-image: url(/img/home/draw-diaper.svg); -webkit-mask-position: center; -webkit-mask-size: contain; -webkit-mask-repeat: no-repeat; mask-image: url(/img/home/draw-diaper.svg); mask-position: center; mask-size: contain; mask-repeat: no-repeat; }
.home2 .numbers-home .numbers li:nth-child(2)::before { background: var(--nap-ink); -webkit-mask-image: url(/img/home/draw-nap.svg); mask-image: url(/img/home/draw-nap.svg); }
.home2 .numbers-home .numbers li:nth-child(3) { border-top: 1px solid var(--border); }
.home2 .numbers-home .numbers li:first-child { grid-row: 1 / 3; min-height: 196px; padding: 16px 16px 84px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; }
.home2 .numbers-home .numbers li:first-child::before { display: none; }
.home2 .numbers-home .numbers li:first-child::after { content: ''; position: absolute; right: 8px; bottom: 8px; width: 72px; height: 72px; background: url(/img/onboarding-next-nap.webp) no-repeat center; background-size: contain; }
/* a figure stays on one line; the Worker marks the ones too long for that (class long) and the words it shows in
   place of a number too small to show (class few) */
.home2 .numbers-home .numbers strong { display: block; font: 500 26px/1.1 var(--serif); font-size: clamp(22px, 6.6vw, 36px); font-variant-numeric: tabular-nums; white-space: nowrap; }
.home2 .numbers-home .numbers li:first-child strong { font-size: 48px; font-size: clamp(44px, 14vw, 68px); line-height: 1; font-variant-numeric: tabular-nums; }
.home2 .numbers-home .numbers strong.few, .home2 .numbers-home .numbers strong.long { font-size: 20px; line-height: 1.2; }
.home2 .numbers-home .numbers strong.few { white-space: normal; overflow-wrap: break-word; }
.home2 .numbers-home .numbers span { display: block; margin-top: 4px; color: var(--text-muted); font-size: 14px; line-height: 1.3; }
.home2 .numbers-home .numbers li:first-child span { max-width: 9em; font-size: 15px; }
.home2 .numbers-home p { font-size: 14px; line-height: 1.45; color: var(--text-muted); max-width: 46ch; }

/* ---------- the day, hour by hour ---------- */
.home2 .stop { padding: 48px 0 32px; }
.home2 .stop__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.home2 .stop__text { display: grid; gap: 12px; align-content: center; max-width: 544px; position: relative; }
.home2 .stop h2 .hour { display: flex; align-items: center; gap: 8px; font-size: 44px; font-size: clamp(40px, 11.5vw, 54px); line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.home2 .stop h2 .hour .dr { width: 0.6em; height: 0.6em; }
.home2 .stop h2 .line { display: block; font-size: 23px; font-size: clamp(22px, 5.7vw, 29px); line-height: 1.16; margin-top: 8px; }
.home2 .stop h2.solo, .home2 .cozy h2, .home2 .ask h2 { font-size: 30px; font-size: clamp(29px, 7.7vw, 38px); line-height: 1.08; }
.home2 .stop p, .home2 .cozy p, .home2 .ask p { color: var(--text-muted); }
.home2 .nightblock { position: relative; background: var(--backdrop); color: var(--text); }
.home2 .nightblock .stop:first-of-type { padding-top: 96px; }
.home2 .charm--moon { top: -96px; right: 32px; }
.home2 .charm--moon .charm__thread { height: 84px; }

/* Ask Blundi: the conversation is the picture */
.home2 .ask { padding: 48px 0 32px; }
.home2 .ask__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.home2 .ask__text { display: grid; gap: 12px; max-width: 544px; position: relative; }
.home2 .ask small { display: block; font-size: 15px; color: var(--text-muted); }
.home2 .crop { width: 100%; height: auto; border-radius: 22px; border: 1px solid var(--border); box-shadow: 0 14px 30px -18px var(--shade-card); background: var(--bg); }
.home2 .convo__stack { display: grid; gap: 16px; align-items: start; }
.js:not(.still) .home2 .convo__stack > * { grid-area: 1 / 1; }
.js:not(.still) .home2 .convo__img--after { opacity: 0; transition: opacity 0.35s ease; }
.js:not(.still) .home2 .convo__a { transition: opacity 0.35s ease; }
.js:not(.still) .home2 .convo.is-saved .convo__img--after { opacity: 1; }
.js:not(.still) .home2 .convo.is-saved .convo__a { opacity: 0; }

/* the cosy things: sounds, first foods, firsts */
.home2 .cozy { padding: 48px 0 32px; }
.home2 .cozy__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.home2 .cozy__text { display: grid; gap: 12px; max-width: 544px; position: relative; }
.home2 .charm--rain { top: -96px; right: 24px; }
.home2 .charm--rain .charm__thread { height: 34px; }
.home2 .cozy--rain { padding-top: 96px; }
.home2 .charm--carrot { right: 0; top: -8px; --tilt: -8deg; }
.home2 .charm--sprout { right: 0; top: -8px; }
.home2 .charm--heart { right: 0; top: -2px; --tilt: 8deg; }
.home2 .charm--speech { right: 0; top: -10px; --tilt: -6deg; }
@media (max-width: 899px) { .home2 .cozy__text { order: -1; } }

/* the last screen: the download, and the app's own drawing of a hand with a phone */
.home2 .get { padding: 56px 0 56px; background: var(--scrim); border-top: 1px solid var(--border); }
.home2 .get__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.home2 .get__text { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; justify-items: start; }
.home2 .get h2 { font-size: 46px; font-size: clamp(42px, 12vw, 64px); line-height: 1; letter-spacing: -0.025em; max-width: 100%; }
.home2 .get p { color: var(--text-muted); max-width: 480px; }
.home2 .get__art { width: 220px; max-width: 60%; height: auto; margin: 0 auto; }

/* a phone as wide as the screen allows, where the browser can work that out */
@supports (width: calc(min(1vw, 1px) * 2)) {
  .home2 .obj { --sw: min(70vw, 300px); }
  .home2 .obj--pair { --pw: min(64vw, 272px); }
  .home2 .top .obj { --sw: min(70vw, 290px); }
}

/* ---------- the language menu: a sheet as wide as the screen, three names across (two on a narrow phone), never
   taller than the screen ---------- */
body.home nav.lang details { position: static; }
body.home nav.lang ul { top: 100%; left: 12px; right: 12px; z-index: 60; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; max-width: none; max-height: 70vh; max-height: min(468px, 100vh - 160px); max-height: min(468px, 100dvh - 84px); overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; margin: 4px 0 0; border-radius: 18px; }
body.home nav.lang li a, body.home nav.lang li span { padding: 0 12px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; display: block; line-height: 44px; }
body.home nav.lang li [aria-current] { background: var(--accent-soft); }
@media (max-width: 379px) { body.home nav.lang ul { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 70vh; max-height: calc(100vh - 160px); max-height: calc(100dvh - 84px); } }
@media (min-width: 760px) { body.home nav.lang ul { left: auto; right: 32px; width: 456px; } }

/* ---------- wide screens ---------- */
@media (min-width: 760px) {
  body.home header.site .wrap, body.home footer.site .wrap { padding: 0 32px; }
  .home2 .hw { padding: 0 32px; }
  body.home main.wrap > section { padding-left: 32px; padding-right: 32px; }
  .home2 .numbers-home { padding: 8px 32px 40px; }
  .home2 .numbers-home .numbers { max-width: 560px; gap: 0 24px; }
  .home2 .numbers-home .numbers li:first-child { min-height: 208px; padding-bottom: 96px; }
  .home2 .numbers-home .numbers li:first-child::after { width: 88px; height: 88px; }
}
@media (min-width: 900px) {
  .home2 { font-size: 18px; }
  .home2 .obj { --sw: 320px; --gw: calc(var(--sw) * 1.7); }
  .home2 .slab { --rest: -21deg; }
  /* the live numbers take the first screen's two columns: the heading and the note under the words, the figures under the phone */
  .home2 .numbers-home { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 12px 48px; align-items: start; padding-bottom: 64px; }
  .home2 .numbers-home h2 { grid-column: 1; grid-row: 1; align-self: end; font-size: 29px; }
  .home2 .numbers-home p { grid-column: 1; grid-row: 2; font-size: 15px; }
  .home2 .numbers-home .numbers { grid-column: 2; grid-row: 1 / 3; margin: 0; }
  .home2 .top { min-height: 640px; min-height: calc(100svh - 68px); display: grid; align-items: center; padding: 24px 0 48px; }
  .home2 .top__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: center; gap: 48px; }
  .home2 .top h1 { font-size: 64px; font-size: clamp(50px, 5.3vw, 90px); max-width: 11ch; }
  .home2 .say { font-family: var(--serif); font-size: 22px; font-size: clamp(21px, 1.7vw, 26px); line-height: 1.4; color: var(--text); margin-top: 20px; max-width: 416px; }
  .home2 .top .stores { margin-top: 32px; }
  .home2 .top .stores-note { margin-top: 16px; max-width: 416px; font-size: 16px; }
  .home2 .by { margin-top: 16px; max-width: 416px; font-size: 15px; }
  .home2 .top .obj { --sw: 340px; }
  .home2 .stop { padding: 96px 0; }
  .home2 .stop__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: center; gap: 48px; min-height: calc(100vh - 260px); }
  .home2 .stop h2 .hour { font-size: 96px; font-size: clamp(80px, 9vw, 134px); }
  .home2 .stop h2 .line { font-size: 32px; font-size: clamp(29px, 2.6vw, 42px); max-width: 16ch; }
  .home2 .stop h2.solo, .home2 .cozy h2, .home2 .ask h2 { font-size: 48px; font-size: clamp(42px, 4vw, 64px); max-width: 14ch; }
  .home2 .stop p, .home2 .cozy p, .home2 .ask p { font-size: 19px; max-width: 480px; }
  .home2 .nightblock .stop:first-of-type { padding-top: 160px; }
  .home2 .charm--moon { top: -160px; right: auto; left: 44%; }
  .home2 .charm--rain { right: auto; left: 80%; }
  .home2 .charm--rain .charm__thread { height: 90px; }
  .home2 .obj--pair { --pw: 280px; width: calc(var(--pw) * 1.6); }
  .home2 .obj--pair .slab--front { --rest: -18deg; }
  .home2 .obj--pair .slab--back { --rest: 32deg; }
  .home2 .ask, .home2 .cozy { padding: 96px 0; }
  .home2 .ask__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: center; gap: 64px; }
  .home2 .ask figure { max-width: 520px; justify-self: center; width: 100%; }
  .home2 .cozy__grid { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); align-items: center; gap: 64px; }
  .home2 .cozy figure { max-width: 480px; width: 100%; justify-self: center; }
  .home2 .cozy--flip .cozy__grid > figure { order: 2; }
  .home2 .get { padding: 96px 0 128px; }
  .home2 .get__grid { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); align-items: center; gap: 64px; }
  .home2 .get__art { order: -1; width: 360px; max-width: 80%; }
  .home2 .get h2 { font-size: 88px; font-size: clamp(72px, 8vw, 128px); }
  .home2 .get p { font-size: 20px; }
}
/* on a wide screen a phone is as tall as the window allows */
@supports (width: calc(max(1px, min(calc((100vh - 1px) / 2), 2px)) * 2)) {
  @media (min-width: 900px) {
    .home2 .obj { --sw: max(260px, min(calc((100vh - 300px) / 2.07), 350px)); }
    .home2 .top .obj { --sw: max(260px, min(calc((100vh - 230px) / 2.07), 380px)); }
    .home2 .obj--pair { --pw: max(250px, min(calc((100vh - 320px) / 2.07), 320px)); }
  }
}
/* a hand-drawn arrow from the words to the detail in the screen they are about, where there is room for it */
@media (min-width: 1100px) {
  .home2 .obj__hint--side { display: block; position: absolute; z-index: 3; pointer-events: none; right: calc(100% + 20px); top: 40%; width: 150px; width: min(10vw, 150px); height: 64px; transform: translateY(-80%); }
  .home2 .hint-y14 { top: 14%; } .home2 .hint-y65 { top: 65%; } .home2 .hint-y75 { top: 75%; } .home2 .hint-y56 { top: 56%; } .home2 .hint-y84 { top: 84%; } .home2 .hint-y37 { top: 37%; }
  .home2 .obj--pair .obj__hint--side { display: none; }
}
/* On a dark screen the app shows its painted drawings a little fainter, so their pale parts do not glare
   (apps/mobile/src/components/Artwork.tsx). */
@media (prefers-color-scheme: dark) {
  .home2 .get__art, .home2 .numbers-home .numbers li:first-child::after { opacity: 0.82; }
}

@media (prefers-reduced-motion: reduce) {
  .home2 *, .home2 *::before, .home2 *::after { transition: none !important; animation: none !important; }
}

/* ---------- Chinese, Japanese and Korean ----------
   The glyphs fill their square, so a head gets the air the rest of the site gives it (styles.css) and no tightened
   tracking, and the last head, the page's largest, is a size smaller: at its Latin size a line held five characters.
   Last in the file: these weigh the same as the rules they change. */
.home2:lang(ja) h1, .home2:lang(ja) h2, .home2:lang(ja) .stop h2, .home2:lang(ja) h2 .line,
.home2:lang(ko) h1, .home2:lang(ko) h2, .home2:lang(ko) .stop h2, .home2:lang(ko) h2 .line,
.home2:lang(zh-TW) h1, .home2:lang(zh-TW) h2, .home2:lang(zh-TW) .stop h2, .home2:lang(zh-TW) h2 .line { letter-spacing: 0; line-height: 1.3; }
.home2:lang(ja) .get h2, .home2:lang(ko) .get h2, .home2:lang(zh-TW) .get h2 { font-size: 32px; font-size: clamp(30px, 8.4vw, 42px); }
/* the Japanese headline's first phrase is nine glyphs: it gets the whole column, so a phone shows it in two lines */
.home2:lang(ja) .top h1 { max-width: none; }
@media (min-width: 900px) {
  .home2:lang(ja) .get h2, .home2:lang(ko) .get h2, .home2:lang(zh-TW) .get h2 { font-size: 60px; font-size: clamp(48px, 4.6vw, 76px); }
  /* a ch is about half a glyph here: ten glyphs to a line, so a short head stays whole */
  .home2:lang(ja) .stop h2.solo, .home2:lang(ja) .cozy h2, .home2:lang(ja) .ask h2,
  .home2:lang(ko) .stop h2.solo, .home2:lang(ko) .cozy h2, .home2:lang(ko) .ask h2,
  .home2:lang(zh-TW) .stop h2.solo, .home2:lang(zh-TW) .cozy h2, .home2:lang(zh-TW) .ask h2 { max-width: 10em; }
}
