/* Hallmark · genre: modern-minimal (product site) · macrostructure: Product tour · theme: custom · enrichment: real app and teacher screenshots, a few class photos with faces blurred · nav: utility row + main row · footer: navy sitemap
 * tone: plain corporate · anchor hue: 262 (high-altitude blue)
 * 2026-11-10 pass: flat colour instead of gradients, no section eyebrows, no side stripe, tight shadows
 * Hallmark · pre-emit critique: P4 H4 E4 S4 R5 V4
 */
@import url("tokens.css?v=plain1");

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--space-md); }
body {
  margin: 0;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.7;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--color-accent); }
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }

/* One language shows at a time; the others stay in the markup for search and no-JS. */
html:not([data-lang="en"]) body [lang="en"],
html:not([data-lang="ja"]) body [lang="ja"],
html:not([data-lang="id"]) body [lang="id"],
html:not([data-lang="ne"]) body [lang="ne"],
html:not([data-lang="ru"]) body [lang="ru"] { display: none !important; }
[data-lang="ja"] body,
[data-lang="ne"] body { line-height: 1.85; }
[data-lang="ne"] { --font-display: "IBM Plex Sans", "IBM Plex Sans Devanagari", system-ui, sans-serif; --font-body: var(--font-display); }
[data-lang="ne"] h1 { line-height: 1.35; }

.wrap { width: min(72rem, 100% - 2 * var(--space-md)); margin-inline: auto; }
@media (min-width: 48rem) { .wrap { width: min(72rem, 100% - 2 * var(--space-xl)); } }

h1, h2, h3 { font-family: var(--font-display); font-style: normal; font-weight: 700; margin: 0; letter-spacing: -0.01em; overflow-wrap: anywhere; min-width: 0; }
/* Break Japanese headings between phrases, not inside a word like データ. */
[data-lang="ja"] :is(h1, h2, h3) { word-break: auto-phrase; letter-spacing: 0.01em; }
.h1-rest { display: block; font-size: max(0.62em, 1.35rem); margin-top: var(--space-sm); }
h1 { font-size: var(--text-display); line-height: 1.15; }
[data-lang="ja"] h1 { font-size: clamp(1.75rem, 1.15rem + 2.8vw, 3.1rem); line-height: 1.35; }
h2 { font-size: var(--text-2xl); line-height: 1.3; }
.mark { color: var(--color-accent); }

/* ---------- Pills ---------- */
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs);
  min-height: 48px; padding: var(--space-xs) var(--space-lg);
  border-radius: var(--radius-pill); border: 2px solid var(--color-accent);
  background: var(--color-accent); color: var(--color-accent-ink);
  font-weight: 700; font-size: var(--text-base); text-decoration: none; white-space: nowrap;
  transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.pill::after { content: "›"; font-size: 1.2em; line-height: 1; }
.pill:hover { background: var(--color-navy); border-color: var(--color-navy); color: var(--color-navy-ink); }
.pill:active { transform: translateY(1px); }
.pill--ghost { background: var(--color-card); color: var(--color-accent); }
.pill--ghost:hover { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-accent-ink); }
.pill--sm { min-height: 44px; padding-inline: var(--space-md); font-size: var(--text-sm); }
.pill--sm::after { display: none; }
.pill-row { display: flex; flex-wrap: wrap; gap: var(--space-sm); }

/* ---------- Header: utility row + main row ---------- */
.site-head { background: var(--color-card); border-bottom: var(--rule-hair); }
.util { background: var(--color-paper-2); font-size: var(--text-sm); }
.util-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); min-height: 44px; }
.util-tag { margin: 0; color: var(--color-ink-2); display: none; }
@media (min-width: 48rem) { .util-tag { display: block; } }
.util-links { list-style: none; margin: 0 0 0 auto; padding: 0; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 0 var(--space-md); }
.util-links a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; color: var(--color-ink-2); white-space: nowrap; }
.util-links a:hover { color: var(--color-accent); text-decoration: underline; }
.lang {
  font: 600 var(--text-sm) / 1 var(--font-body);
  background: var(--color-card); border: var(--rule-hair); border-radius: var(--radius-pill);
  color: var(--color-ink); padding: var(--space-xs) var(--space-md); cursor: pointer; white-space: nowrap;
  min-height: 36px;
}
select.lang { appearance: none; field-sizing: content; padding-right: calc(var(--space-md) + 0.9em); background: var(--color-card) no-repeat right var(--space-sm) center / 0.6em url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23556' stroke-width='1.5'/%3E%3C/svg%3E"); }
.lang:hover { border-color: var(--color-accent); color: var(--color-accent); }
.lang:active { transform: translateY(1px); }

.nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 var(--space-md); padding-top: var(--space-sm); }
.wordmark { display: inline-flex; align-items: center; gap: var(--space-xs); font-family: var(--font-display); font-weight: 700; font-size: var(--text-lg); text-decoration: none; white-space: nowrap; letter-spacing: -0.01em; min-height: 48px; }
.wordmark img { width: 28px; height: 28px; }
.nav-actions { display: flex; align-items: center; gap: var(--space-xs); }
.nav-actions .pill--ghost { display: none; }
@media (min-width: 40rem) { .nav-actions .pill--ghost { display: inline-flex; } }
.nav-links { order: 3; flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 0 var(--space-lg); margin-top: var(--space-xs); }
.nav-links a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; font-size: var(--text-sm); text-decoration: none; white-space: nowrap; border-bottom: 3px solid transparent; }
.nav-links a:hover { color: var(--color-accent); border-bottom-color: var(--color-sky); }
.nav-links a[aria-current="page"] { color: var(--color-accent); border-bottom-color: var(--color-accent); }
@media (min-width: 80rem) {
  .nav { flex-wrap: nowrap; padding-block: var(--space-sm); }
  .nav-links { order: 0; flex-basis: auto; margin: 0 0 0 auto; gap: var(--space-lg); padding-right: var(--space-md); }
  .nav-links a { font-size: var(--text-base); min-height: 48px; }
  /* Russian labels are the longest; a narrower gap keeps them on one row. */
  html[data-lang="ru"] .nav-links { gap: var(--space-md); }
}
/* Below the one-row width the links stay on a single line and scroll sideways,
   so the header costs one row instead of two or three on a phone. The download
   link is dropped there: the button beside the wordmark already goes to it. */
@media (max-width: 79.99rem) {
  .nav-links { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; margin-inline: calc(-1 * var(--space-md)); padding-inline: var(--space-md); scroll-padding-inline: var(--space-md); }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a[href="/download"] { display: none; }
}
@media (max-width: 30rem) {
  .util-row { min-height: 40px; }
  .util { font-size: 0.8125rem; }
  .util-links { gap: 0 var(--space-xs); width: 100%; justify-content: space-between; }
  .util-links .lang { font-size: 0.8125rem; padding-left: var(--space-sm); }
  .nav { padding-top: var(--space-2xs); flex-wrap: wrap; gap: 0 var(--space-xs); }
  /* Wordmark and download button share one row down to a 320px screen. */
  .wordmark { font-size: var(--text-base); min-width: 0; }
  .wordmark img { width: 24px; height: 24px; }
  .nav-actions .pill--sm { min-height: 40px; padding-inline: var(--space-sm); }
  .nav-links { margin-top: 0; gap: 0 var(--space-md); }
}
/* Sticky main row (site.js adds .is-sticky and measures the utility row, which
   scrolls away). It slides out while reading down and comes back on any scroll
   up, so the download button is always one flick away on a long page. */
.site-head.is-sticky { position: sticky; top: calc(-1 * var(--head-util-h, 0px)); z-index: 20; transition: transform 200ms ease-out; }
.site-head.is-sticky.is-away { transform: translateY(-100%); }

/* ---------- Section heads ---------- */
.sec { padding-block: var(--space-2xl); }
@media (min-width: 48rem) { .sec { padding-block: var(--space-3xl); } }
.sec--tint { background: var(--color-paper-2); }
/* Two untinted sections in a row: one gap between them, not two. */
.sec:not(.sec--tint) + .sec:not(.sec--tint) { padding-top: 0; }
.sec-head { max-width: 46rem; margin-bottom: var(--space-xl); }
.sec-head--center { margin-inline: auto; text-align: center; }
.sec-head p { color: var(--color-ink-2); margin: var(--space-md) 0 0; }
.sec-foot { margin-top: var(--space-xl); }
.sec-foot--center { display: flex; justify-content: center; }

/* ---------- Hero ---------- */
.hero { background: var(--color-sky); overflow: hidden; }
.hero-inner { display: grid; gap: var(--space-xl); padding-block: var(--space-2xl) 0; }
.hero-copy { padding-bottom: var(--space-md); }
.hero-catch { margin: 0 0 var(--space-sm); font-size: var(--text-lg); font-weight: 700; line-height: 1.5; color: var(--color-accent); text-wrap: balance; }
/* Break between phrases, not inside a word like 学べる. */
[data-lang="ja"] .hero-catch { word-break: auto-phrase; }
.hero .lede { font-size: var(--text-lg); color: var(--color-ink-2); max-width: 36rem; margin: var(--space-lg) 0 var(--space-xl); }
.hero-shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-md); align-items: end; max-width: 26rem; margin-inline: auto; width: 100%; }
.hero-shots figure { margin: 0; }
.hero-shots img { border-radius: var(--radius-md) var(--radius-md) 0 0; box-shadow: var(--shadow-card); border: var(--rule-hair); border-bottom: 0; }
.hero-shots figure:first-child { transform: translateY(var(--space-xl)); }
.hero-shots figure:first-child img { margin-bottom: calc(-1 * var(--space-xl)); }
@media (min-width: 56rem) {
  .hero-inner { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: end; padding-top: var(--space-3xl); }
  .hero-copy { padding-bottom: var(--space-3xl); }
  .hero-shots { max-width: none; }
}

/* Fact strip: plain facts, no invented numbers */
/* ---------- What we do: three steps right under the hero ---------- */
.doing { background: var(--color-card); border-bottom: var(--rule-hair); padding-block: var(--space-xl); }
.doing-title { font-size: var(--text-2xl); line-height: 1.3; margin: 0 0 var(--space-lg); }
.doing-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-lg); }
.doing-list li { min-width: 0; display: flex; flex-direction: column; gap: var(--space-xs); padding-top: var(--space-md); border-top: var(--rule-ink); }
.doing-list h3 { font-size: var(--text-lg); line-height: 1.4; margin: 0; }
.doing-list p { margin: 0; color: var(--color-ink-2); }
.doing-list a { align-self: flex-start; display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; white-space: nowrap; color: var(--color-accent); }
.doing-list a::after { content: "›"; margin-left: var(--space-2xs); }
.doing-list a:hover { color: var(--color-navy); }
/* ---------- Issue: why this app exists ---------- */
.issue { background: var(--color-paper-2); border-bottom: var(--rule-hair); padding-block: var(--space-xl); }
/* Heading across the top, then the problem and the app's answer side by side. */
.issue-head { margin-bottom: var(--space-lg); }
.issue-head h2 { margin: 0; text-wrap: balance; }
.issue-answer .issue-turn { text-wrap: balance; }
[data-lang="ja"] .issue-head h2, [data-lang="ja"] .issue-turn { word-break: auto-phrase; }
.issue-cols { display: grid; gap: var(--space-lg); color: var(--color-ink-2); }
.issue-cols p { margin: 0 0 var(--space-md); }
.issue-cols p:last-of-type { margin-bottom: 0; }
.issue-answer { padding-top: var(--space-md); border-top: var(--rule-ink); }
.issue-answer .issue-turn { margin-bottom: var(--space-sm); font-size: var(--text-lg); font-weight: 700; line-height: 1.5; color: var(--color-accent); }
.issue-answer .about-link { margin-top: var(--space-xs); }
@media (min-width: 48rem) {
  .issue { padding-block: var(--space-2xl); }
  .issue-head { margin-bottom: var(--space-xl); }
  .issue-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2xl); }
  /* Side by side the two columns start on one line: no rule above the answer. */
  .issue-answer { padding-top: 0; border-top: 0; }
}

.about { border-bottom: var(--rule-hair); padding-block: var(--space-xl); }
.about-title { font-size: var(--text-2xl); line-height: 1.3; margin: 0 0 var(--space-lg); }
.about-list { margin: 0; display: grid; gap: var(--space-lg); }
.about-list > div { min-width: 0; display: grid; gap: var(--space-2xs); padding-top: var(--space-md); border-top: var(--rule-ink); }
.about-list dt { font-weight: 700; color: var(--color-accent); }
.about-list dd { margin: 0; color: var(--color-ink-2); }
.about-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: var(--space-md); font-weight: 600; white-space: nowrap; color: var(--color-accent); }
.about-link::after { content: "›"; margin-left: var(--space-2xs); }
.about-link:hover { color: var(--color-navy); }
@media (min-width: 48rem) {
  .about { padding-block: var(--space-2xl); }
  .about-list > div { grid-template-columns: 10rem minmax(0, 1fr); gap: var(--space-lg); }
}
@media (min-width: 48rem) {
  .doing { padding-block: var(--space-2xl); }
  .doing-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-xl); }
}

/* ---------- Fork: learning alone, or with a school ---------- */
.fork { border-bottom: var(--rule-hair); padding-block: var(--space-xl); }
.fork-title { font-size: var(--text-2xl); line-height: 1.3; margin: 0 0 var(--space-lg); }
.fork-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-lg); }
.fork-card { min-width: 0; display: flex; flex-direction: column; padding: var(--space-lg); background: var(--color-card); border-radius: var(--radius-md); box-shadow: var(--shadow-card); }
.fork-tag { margin: 0; font-size: var(--text-sm); font-weight: 700; color: var(--color-accent); }
.fork-card--org .fork-tag { color: var(--color-navy); }
.fork-card h3 { font-size: var(--text-lg); line-height: 1.4; margin: var(--space-2xs) 0 var(--space-sm); }
.fork-card p:not(.fork-tag) { margin: 0 0 var(--space-lg); color: var(--color-ink-2); }
.fork-card .pill-row { margin-top: auto; }
.fork .photo { margin: var(--space-xl) 0 0; }
@media (min-width: 48rem) {
  .fork { padding-block: var(--space-2xl); }
  .fork-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.factstrip { background: var(--color-card); border-bottom: var(--rule-hair); }
.factstrip-title { margin-block: 0; padding-block: var(--space-xl) var(--space-md); font-size: var(--text-lg); line-height: 1.4; text-align: center; }
/* Keep .wrap's centring: only reset the list's block margin. */
.factstrip ul { list-style: none; margin-block: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.factstrip li { display: flex; flex-direction: column; align-items: center; gap: var(--space-sm); padding: var(--space-lg) var(--space-sm); text-align: center; border-top: var(--rule-hair); }
.factstrip li:nth-child(odd) { border-right: var(--rule-hair); }
.factstrip li:nth-child(-n+2) { border-top: 0; }
.factstrip b { display: block; align-self: stretch; font: 700 var(--text-2xl) / 1.25 var(--font-display); color: var(--color-accent); }
.factstrip .fact-unit { font-size: var(--text-lg); }
.factstrip li > span { max-width: 16rem; font-size: var(--text-sm); line-height: 1.6; color: var(--color-ink-2); text-wrap: balance; }
[data-lang="ja"] .factstrip li > span { word-break: auto-phrase; }
@media (min-width: 48rem) {
  .factstrip ul { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .factstrip li { border-top: 0; border-right: var(--rule-hair); padding-block: var(--space-xl); }
  .factstrip li:last-child { border-right: 0; }
}

/* ---------- Feature rows: screenshot on one side, text on the other ---------- */
.rows { display: grid; gap: var(--space-2xl); }
.row { display: grid; gap: var(--space-lg); align-items: center; }
.row figure { margin: 0; background: var(--color-accent-soft); border-radius: var(--radius-lg); padding: var(--space-lg) var(--space-lg) 0; overflow: hidden; }
.row figure img { width: min(15rem, 100%); margin-inline: auto; border-radius: var(--radius-md) var(--radius-md) 0 0; border: var(--rule-hair); border-bottom: 0; box-shadow: var(--shadow-card); }
.row-num { font: 700 var(--text-sm) / 1 var(--font-body); color: var(--color-accent); letter-spacing: 0.1em; }
.row h3 { font-size: var(--text-2xl); line-height: 1.35; margin: var(--space-sm) 0 var(--space-md); }
.row p { margin: 0 0 var(--space-lg); color: var(--color-ink-2); max-width: 34rem; }
/* Phones: the four screens sit side by side and are swiped through, like
   store screenshots, instead of stacking into four screens' worth of scroll.
   The next card peeks in from the right so it is clear there is more. */
@media (max-width: 47.99rem) {
  .rows { grid-auto-flow: column; grid-auto-columns: min(80%, 19rem); gap: var(--space-md); align-items: start; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; margin-inline: calc(-1 * var(--space-md)); padding-inline: var(--space-md); scroll-padding-inline: var(--space-md); }
  .rows::-webkit-scrollbar { display: none; }
  .row { scroll-snap-align: start; gap: var(--space-md); align-items: start; }
  .row figure { padding: var(--space-md) var(--space-md) 0; }
  .row h3 { font-size: var(--text-lg); margin-top: 0; }
  .row p { margin-bottom: var(--space-md); }
}
@media (min-width: 48rem) {
  .row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-2xl); }
  .row:nth-child(even) figure { order: 2; }
}

/* ---------- The map: phone, classroom box, internet ---------- */
.map { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.node { position: relative; padding: var(--space-lg); border-radius: var(--radius-md); background: var(--color-card); box-shadow: var(--shadow-card); }
.node-tag { display: inline-block; font: 700 var(--text-xs) / 1 var(--font-body); text-transform: uppercase; letter-spacing: 0.1em; color: var(--color-accent); background: var(--color-accent-soft); padding: var(--space-2xs) var(--space-sm); border-radius: var(--radius-pill); }
.node h3 { font-size: var(--text-lg); line-height: 1.35; margin: var(--space-sm) 0; }
.node p { margin: 0; color: var(--color-ink-2); }
.node--hub { outline: 2px solid var(--color-accent); }
.node--off { background: none; box-shadow: none; border: 2px dashed var(--color-rule); }
.node--off .node-tag { color: var(--color-off); background: var(--color-paper-2); }

.edge { position: relative; display: flex; align-items: center; justify-content: center; min-height: 4.5rem; padding: var(--space-sm) 0; }
.edge span { font: 600 var(--text-sm) / 1.3 var(--font-body); color: var(--color-ink-2); background: var(--color-paper-2); padding: 0 var(--space-xs); position: relative; text-align: center; }
.edge::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; border-left: 2px solid var(--color-accent); }
.edge--once::before { border-left: 2px dashed var(--color-off); }
@media (min-width: 60rem) {
  .map { grid-template-columns: minmax(0, 1fr) 6.5rem minmax(0, 1fr) 6.5rem minmax(0, 1fr); align-items: stretch; }
  .edge { min-height: 0; }
  .edge::before { top: 50%; bottom: auto; left: 0; right: 0; border-left: 0; border-top: 2px solid var(--color-accent); }
  .edge--once::before { border-left: 0; border-top: 2px dashed var(--color-off); }
}

/* ---------- Cards (log, download) ---------- */
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-lg); }
@media (min-width: 48rem) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.card { background: var(--color-card); border-radius: var(--radius-md); box-shadow: var(--shadow-card); padding: var(--space-lg); display: flex; flex-direction: column; gap: var(--space-sm); }
.card h3 { font-size: var(--text-lg); line-height: 1.4; }
.card p { margin: 0; color: var(--color-ink-2); }
.card time { font: 600 var(--text-sm) / 1.4 var(--font-body); color: var(--color-ink-2); }
.badge { align-self: flex-start; font: 700 var(--text-xs) / 1 var(--font-body); letter-spacing: 0.06em; padding: var(--space-2xs) var(--space-sm); border-radius: var(--radius-pill); background: var(--color-accent-soft); color: var(--color-accent); white-space: nowrap; }
.badge--wait { background: var(--color-paper-2); color: var(--color-off); }
.badge--done { background: var(--color-navy); color: var(--color-navy-ink); }
.card .pill-row { margin-top: auto; padding-top: var(--space-sm); }
/* Log entries: one full-width row each, all the same height, date and status on the left. */
.cards--log { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 48rem) {
  .cards--log { grid-auto-rows: 1fr; }
  .cards--log .card { display: grid; grid-template-columns: 10rem minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: var(--space-lg); align-content: start; }
  .cards--log .card time { grid-area: 1 / 1; }
  .cards--log .card .badge { grid-area: 2 / 1; align-self: start; justify-self: start; }
  .cards--log .card h3 { grid-area: 1 / 2; }
  .cards--log .card p { grid-area: 2 / 2; }
}

/* ---------- FAQ ---------- */
.faq { max-width: 52rem; margin-inline: auto; display: grid; gap: var(--space-sm); }
.faq details { background: var(--color-card); border-radius: var(--radius-md); box-shadow: var(--shadow-card); }
.faq summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--space-sm); align-items: center; padding: var(--space-md) var(--space-lg); font-weight: 700; min-height: 56px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "Q"; color: var(--color-accent); font-weight: 700; }
.faq summary::after { content: "+"; color: var(--color-accent); font-size: 1.4em; line-height: 1; transition: transform var(--dur-fast) var(--ease-out); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { color: var(--color-accent); }
.faq .ans { padding: 0 var(--space-lg) var(--space-lg) calc(var(--space-lg) + 1.4rem); color: var(--color-ink-2); }
.faq .ans p { margin: 0; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--color-accent); color: var(--color-accent-ink); }
.cta-inner { display: grid; gap: var(--space-lg); padding-block: var(--space-2xl); align-items: center; }
.cta-band p { margin: var(--space-sm) 0 0; max-width: 36rem; }
.cta-band .pill { background: var(--color-card); border-color: var(--color-card); color: var(--color-accent); }
.cta-band .pill:hover { background: var(--color-navy); border-color: var(--color-navy); color: var(--color-navy-ink); }
.cta-band .pill--ghost { background: none; border-color: var(--color-accent-ink); color: var(--color-accent-ink); }
@media (min-width: 56rem) { .cta-inner { grid-template-columns: minmax(0, 1fr) auto; } }

/* ---------- Footer: navy sitemap ---------- */
.site-foot { background: var(--color-navy); color: var(--color-navy-ink); font-size: var(--text-sm); }
.site-foot a { color: var(--color-navy-ink); text-decoration: none; }
.site-foot a:hover { color: var(--color-navy-ink); text-decoration: underline; }
.foot-map { display: grid; gap: var(--space-xl); padding-block: var(--space-2xl) var(--space-xl); }
@media (min-width: 48rem) { .foot-map { grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 1fr)); } }
.foot-brand { font: 700 var(--text-lg) / 1.3 var(--font-display); margin: 0 0 var(--space-xs); }
.foot-map p { margin: 0; color: var(--color-navy-ink-2); max-width: 22rem; }
.foot-social { list-style: none; margin: var(--space-md) 0 0; padding: 0; display: flex; gap: var(--space-sm); }
.site-foot .foot-social a { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--color-navy-rule); }
.site-foot .foot-social a:hover { background: var(--color-card); color: var(--color-navy); }
.foot-social svg { width: 20px; height: 20px; fill: currentColor; }
.foot-h { font-size: var(--text-sm); letter-spacing: 0.04em; color: var(--color-navy-ink-2); margin: 0 0 var(--space-xs); padding-bottom: var(--space-xs); border-bottom: 1px solid var(--color-navy-rule); }
.foot-map ul { list-style: none; margin: 0; padding: 0; }
.foot-map li a { display: inline-flex; align-items: center; min-height: 40px; white-space: nowrap; }
.foot-legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-xs) var(--space-lg); padding-block: var(--space-md) var(--space-lg); border-top: 1px solid var(--color-navy-rule); color: var(--color-navy-ink-2); }
.foot-legal p { margin: 0; }
.foot-legal .foot-marks { order: 3; flex-basis: 100%; font-size: var(--text-xs); }
.foot-legal ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-xs) var(--space-lg); }
.foot-legal a { color: var(--color-navy-ink-2); white-space: nowrap; }

/* ---------- Inner pages ---------- */
.page-head { background: var(--color-sky); }
.page-head .wrap { padding-block: var(--space-2xl); }
.page-head h1 { max-width: 24ch; text-wrap: balance; }
/* A ch is half a kanji, so the cap would leave one word alone on the last line. */
[data-lang="ja"] .page-head h1 { max-width: none; }
.page-head .lede { font-size: var(--text-lg); color: var(--color-ink-2); max-width: 40rem; margin: var(--space-md) 0 0; }
.page-head-actions { margin-top: var(--space-lg); }
/* Phones: a shorter head, so what the page is for (the store buttons on
   /download, the first figure on /how) starts within the first screen or two. */
@media (max-width: 47.99rem) {
  .page-head .wrap { padding-block: var(--space-xl); }
  .page-head .lede { font-size: var(--text-base); }
  .page-head + .sec { padding-top: var(--space-xl); }
}
.crumbs { list-style: none; margin: 0 0 var(--space-md); padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-xs); font-size: var(--text-sm); color: var(--color-ink-2); }
.crumbs li + li::before { content: "›"; margin-right: var(--space-xs); }
.crumbs a { white-space: nowrap; }

.prose { max-width: 40rem; }
.prose p { margin: 0 0 var(--space-md); }
.more { margin: var(--space-lg) 0 0; font-weight: 700; }
.more a { color: var(--color-accent); }

.see { display: grid; gap: var(--space-xl); }
@media (min-width: 48rem) {
  .see { grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); align-items: center; gap: var(--space-2xl); }
  .see .prose { max-width: none; }
}
.see figure { margin: 0; max-width: 15rem; }
.see img { border-radius: var(--radius-md); border: var(--rule-hair); box-shadow: var(--shadow-card); }
figcaption { font-size: var(--text-sm); color: var(--color-ink-2); margin-top: var(--space-xs); }
.see h2 { margin-bottom: var(--space-md); }

.facts { list-style: none; padding: 0; margin: var(--space-lg) 0 0; }
.facts li { position: relative; padding: var(--space-sm) 0 var(--space-sm) var(--space-lg); border-bottom: var(--rule-hair); }
.facts li::before { content: ""; position: absolute; left: 0; top: 1.25em; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--color-accent); }
@media (min-width: 56rem) { .facts { max-width: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--space-2xl); } }

.steps { list-style: none; counter-reset: step; margin: var(--space-lg) 0 0; padding: 0; display: grid; gap: var(--space-md); }
.steps li { counter-increment: step; display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); column-gap: var(--space-md); padding: var(--space-lg); background: var(--color-card); border-radius: var(--radius-md); box-shadow: var(--shadow-card); }
.steps li::before { content: counter(step); grid-row: span 2; display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 50%; background: var(--color-accent); color: var(--color-accent-ink); font-weight: 700; }
.steps h3 { font-size: var(--text-lg); line-height: 1.4; margin-bottom: var(--space-2xs); }
.steps p { margin: 0; color: var(--color-ink-2); }
/* Short links inside running text stay on one line. */
:is(.steps p, .spec dd) a { white-space: nowrap; }

/* A command to copy: scrolls sideways inside itself instead of widening the page. */
.cmd { display: flex; align-items: stretch; gap: var(--space-xs); margin-top: var(--space-sm); min-width: 0; }
.steps .cmd { grid-column: 2; }
.cmd code { flex: 1 1 auto; min-width: 0; overflow-x: auto; white-space: nowrap; padding: var(--space-sm) var(--space-md); border-radius: var(--radius-md); background: var(--color-navy); color: var(--color-navy-ink); font: var(--text-sm) / 1.6 var(--font-mono); }
.cmd-copy { flex: none; min-height: 44px; padding: 0 var(--space-md); border: 1px solid var(--color-accent); border-radius: var(--radius-md); background: var(--color-card); color: var(--color-accent); font: 700 var(--text-sm) / 1 var(--font-body); white-space: nowrap; cursor: pointer; }
.cmd-copy:hover { background: var(--color-accent-soft); }
.cmd-copy:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.cmd-copy[data-done] { background: var(--color-accent); color: var(--color-accent-ink); }

.spec dl { margin: 0; background: var(--color-card); border-radius: var(--radius-md); box-shadow: var(--shadow-card); overflow: hidden; }
.spec dl > div { display: grid; gap: var(--space-2xs) var(--space-xl); padding: var(--space-md) var(--space-lg); border-top: var(--rule-hair); }
.spec dl > div:first-child { border-top: 0; }
@media (min-width: 48rem) { .spec dl > div { grid-template-columns: 11rem minmax(0, 1fr); } }
.spec dt { font-weight: 700; color: var(--color-accent); }
.spec dd { margin: 0; }

.cols { display: grid; gap: var(--space-lg); }
@media (min-width: 48rem) { .cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cols > div { background: var(--color-card); border-radius: var(--radius-md); box-shadow: var(--shadow-card); padding: var(--space-lg); }
.cols h3 { font-size: var(--text-lg); margin-bottom: var(--space-sm); color: var(--color-accent); }
.cols p:last-child { margin-bottom: 0; }

.planned { color: var(--color-accent); font-weight: 700; }

/* Log article */
.article { padding-block: var(--space-2xl); }
.article-meta { margin: 0 0 var(--space-sm); font-size: var(--text-sm); color: var(--color-ink-2); }
.article h1 { font-size: var(--text-2xl); max-width: 30ch; margin-bottom: var(--space-xl); }
.article figure { margin: var(--space-lg) 0; }
.article img { border-radius: var(--radius-md); border: var(--rule-hair); }

/* ---------- Get the app: recommend the store apps ---------- */
.getapp { background: var(--color-navy); color: var(--color-navy-ink); }
.getapp-inner { display: grid; gap: var(--space-xl); padding-block: var(--space-2xl); }
.getapp h2 { max-width: 22ch; }
.getapp-mark { color: var(--color-sky); }
.getapp-why { list-style: none; margin: var(--space-lg) 0 0; padding: 0; display: grid; gap: var(--space-md); }
.getapp-why li { min-width: 0; display: grid; gap: var(--space-2xs); padding-top: var(--space-md); border-top: 1px solid var(--color-navy-rule); }
.getapp-why b { font-size: var(--text-lg); line-height: 1.4; }
.getapp-why li > span { color: var(--color-navy-ink-2); max-width: 38rem; }
.getapp-stores { display: grid; gap: var(--space-md); align-content: start; min-width: 0; }
.store-row { display: flex; flex-wrap: wrap; gap: var(--space-lg); }
.store { display: grid; gap: var(--space-sm); justify-items: start; min-width: 0; }
.store-req { margin: 0; font-size: var(--text-sm); color: var(--color-navy-ink-2); }
/* Official artwork: keep it unmodified, at least 40px tall, with clear space of a quarter of its height. */
.store-badge { display: inline-block; line-height: 0; border-radius: var(--radius-sm); }
.store-badge img { display: block; width: auto; height: 3rem; }
.store-badge:hover { outline: 2px solid var(--color-sky); outline-offset: 3px; }
.store-badge:active { transform: translateY(1px); }
.getapp-note { margin: var(--space-xs) 0 0; font-size: var(--text-sm); color: var(--color-navy-ink-2); }
.getapp-note a { color: var(--color-navy-ink); font-weight: 600; }
.getapp-note a:hover { color: var(--color-sky); }
@media (min-width: 56rem) {
  .getapp-inner { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: var(--space-2xl); align-items: center; padding-block: var(--space-3xl); }
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0ms !important; }
}
.pill--off { background: var(--color-paper-2); border-color: var(--color-rule); color: var(--color-off); cursor: default; white-space: nowrap; }
.pill--off::after { display: none; }
.pill--off:hover { background: var(--color-paper-2); border-color: var(--color-rule); color: var(--color-off); }

/* Contact page */
.contact-grid { display: grid; gap: var(--space-xl); }
@media (min-width: 56rem) { .contact-grid { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: start; } }
.contact-form, .contact-side { background: var(--color-card); border: var(--rule-hair); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); padding: var(--space-lg); min-width: 0; }
.contact-form h2, .contact-side h2 { font-size: var(--text-lg); margin: 0 0 var(--space-md); }
.contact-side p { margin: var(--space-md) 0 0; }
@media (min-width: 56rem) {
  /* :not([hidden]): site.js hides the form after sending, and display: grid would undo that. */
  form.contact-form:not([hidden]) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--space-lg); }
  form.contact-form > * { grid-column: 1 / -1; }
  form.contact-form > .field--half { grid-column: auto; }
  form.contact-form > .pill { justify-self: start; }
  .contact-form .choices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-side { position: sticky; top: var(--space-lg); }
}
.field { display: grid; gap: var(--space-xs); margin: 0 0 var(--space-lg); padding: 0; border: 0; min-width: 0; }
.field label, .field legend { font-weight: 700; padding: 0; }
.field small { font-weight: 400; color: var(--color-ink-2); }
.field input[type="text"], .field input[type="email"], .field textarea { width: 100%; min-height: 44px; padding: var(--space-sm) var(--space-md); border: 1px solid var(--color-rule); border-radius: var(--radius-md); background: var(--color-paper); color: var(--color-ink); font: var(--text-base) / 1.5 var(--font-body); }
.field textarea { resize: vertical; }
.field input:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 1px; border-color: var(--color-accent); }
.choices { display: grid; gap: var(--space-2xs); margin-top: var(--space-xs); }
.choices label { display: flex; align-items: center; gap: var(--space-xs); min-height: 44px; font-weight: 400; cursor: pointer; }
.choices input { width: 1.15rem; height: 1.15rem; accent-color: var(--color-accent); }
.field-hint { margin: var(--space-sm) 0 0; font-size: var(--text-sm); color: var(--color-ink-2); }
.form-error { margin: 0 0 var(--space-md); color: oklch(50% 0.18 25); font-weight: 700; }
.contact-form .pill { cursor: pointer; font-family: inherit; white-space: normal; text-align: center; }
.contact-form .pill:disabled { cursor: progress; opacity: 0.7; }
.contact-form .when-busy, .contact-form [aria-busy="true"] .when-idle { display: none; }
.contact-form [aria-busy="true"] .when-busy { display: inline; }
.contact-done p { margin: 0 0 var(--space-lg); }
.contact-done:focus { outline: none; }
/* Spam trap: off-screen, not display:none, so simple bots still see and fill it. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Class photos and a few more screens ---------- */
.photo { margin: 0 0 var(--space-xl); max-width: 44rem; min-width: 0; }
.photo--small { max-width: 24rem; }
@media (min-width: 56rem) {
  .photo--side { max-width: none; display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: center; gap: var(--space-lg); }
  .photo--side figcaption { margin-top: 0; font-size: var(--text-base); }
}
.facts + .photo { margin: var(--space-xl) 0 0; }
/* Text and one picture side by side on PC; below that they stack in source order. */
@media (min-width: 56rem) {
  .media-split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-2xl); align-items: start; }
  .media-split .facts { margin-top: 0; grid-template-columns: minmax(0, 1fr); }
  .media-split .photo { margin: 0; max-width: none; }
  .media-split--steps { grid-template-columns: minmax(0, 1fr) minmax(0, 20rem); gap: var(--space-xl); }
  .media-split--steps .steps { margin-top: 0; }
  .media-split--steps .photo { order: 2; }
  /* Beside the photo a command may not fit one line: wrap it so all of it stays visible. */
  .media-split--steps .cmd code { white-space: normal; overflow-wrap: anywhere; }
}
.photo-pair { display: grid; gap: var(--space-lg); margin-bottom: var(--space-xl); }
.photo-pair figure, .shot-pair figure { margin: 0; min-width: 0; }
.shot-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-md); max-width: 30rem; margin: var(--space-xl) auto 0; }
@media (min-width: 56rem) {
  .shot-pair { max-width: none; gap: var(--space-xl); }
  .shot-pair figure { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); align-items: center; gap: var(--space-md); }
  .shot-pair figcaption { margin-top: 0; font-size: var(--text-base); }
}
:is(.photo, .photo-pair, .shot-pair) img { width: 100%; border-radius: var(--radius-md); border: var(--rule-hair); box-shadow: var(--shadow-card); }
.doing-split { display: grid; gap: var(--space-xl); }
.doing-split .photo { margin: 0; max-width: none; }
@media (min-width: 56rem) {
  .doing-split { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: var(--space-2xl); align-items: start; }
  .doing-split .doing-list { grid-template-columns: minmax(0, 1fr); gap: var(--space-lg); }
}
@media (min-width: 48rem) {
  .photo-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  /* The two photos differ slightly in shape; one ratio lines up their captions. */
  .photo-pair img { aspect-ratio: 16 / 9; object-fit: cover; }
}
/* Long button labels in id and ru: smaller at the narrowest phones, so they stay on one line. */
@media (max-width: 22.5rem) { .pill { font-size: 0.875rem; padding-inline: var(--space-sm); } }
@media (max-width: 22.5rem) {
  .wordmark { font-size: 0.9375rem; gap: var(--space-2xs); }
  .nav-actions .pill--sm { font-size: 0.8125rem; padding-inline: var(--space-xs); }
}
