/* Search pages (four walls, 17 Nov 2026): the hub, comparison, free-options and "what changed" pages in en/ and vi/.
   Loaded after styles.css and theme/first-light.css (the First Light look, 23 Nov 2026) and uses only their tokens, so the pages share the
   site's look in light and dark. The header carries the Sunrise wordmark (theme/logo.css, filled in by pages.js).
   Logical properties only (right-to-left safe); nothing has a fixed width, so every page fits a 320 px screen. */

.wall-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-2);
  padding: var(--s-3) var(--s-4); border-block-end: 1px solid var(--line); }
.wall-brand { display: inline-flex; align-items: center; gap: var(--s-2); color: var(--ink); font-weight: 600; text-decoration: none; min-block-size: var(--tap); }
.wall-top nav { display: flex; flex-wrap: wrap; gap: var(--s-3); font-size: var(--fs-sm); }
.wall-top nav a { display: inline-flex; align-items: center; min-block-size: var(--tap); }

.wall h1 { font-size: var(--fs-xl); }
.wall .lead { font-size: var(--fs-md); }
.wall .checked { font-size: var(--fs-sm); color: var(--ink-muted); }
.wall .cta { align-self: stretch; text-decoration: none; margin-block: var(--s-3) var(--s-2); }
.wall p a, .wall li a, .wall dd a { display: inline; } /* links inside sentences flow with the text (styles.css makes .guide links blocks) */
.wall .sources li + li { margin-block-start: var(--s-2); } /* source links are tapped: more room between them */
.wall h3 { margin-block-start: var(--s-2); }

/* one option per card on the hub and free pages */
.options { display: grid; grid-template-columns: 1fr; gap: var(--s-3); }
.option { gap: var(--s-2); }
.option h3 { margin: 0; }
.option dl { margin: 0; display: grid; grid-template-columns: 1fr; gap: var(--s-1); font-size: var(--fs-sm); }
.option dt { font-weight: 600; color: var(--ink-muted); font-size: var(--fs-xs); margin-block-start: var(--s-1); }
.option dd { margin: 0; }
.option.ours { border: 2px solid var(--brand); }

/* questions and answers: open with a tap, readable without JavaScript */
.faq details { border-block-end: 1px solid var(--line); }
.faq summary { min-block-size: var(--tap); display: flex; align-items: center; cursor: pointer; font-weight: 600; color: var(--ink); padding-block: var(--s-2); }
.faq details p { padding-block-end: var(--s-3); }

.wall-foot { padding: var(--s-4); border-block-start: 1px solid var(--line); display: flex; flex-direction: column; gap: var(--s-2); font-size: var(--fs-sm); color: var(--ink-muted); }
.wall-foot nav { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.wall-foot nav a { display: inline-flex; align-items: center; justify-content: center; min-block-size: var(--tap); min-inline-size: var(--tap); }

/* Laptops (UX check 21 Nov, minor 2): the brand, the content and the footer share the app's left edge, 32 px inside a 1120 px frame.
   Here, not in styles.css, because these rules must come after the phone padding above. */
@media (min-width: 1024px) {
  .wall-top, .wall-foot { padding-inline: var(--s-7); }
  body > .wall-top, body > .wall-foot { padding-inline: max(var(--s-7), calc((100% - 1120px) / 2 + var(--s-7))); }
}
@media (max-width: 340px) {
  .wall-top { padding-inline: var(--s-3); }
  .wall-langs summary .i-globe { display: none; } /* keeps brand and language menu on one row (Indonesian at 320 px, UX check 21 Nov, M1) */
  .wall-foot { padding: var(--s-3); }
}

/* Japanese page (ja/gaimen-kirikae, 17 Nov 2026): the phone's own Japanese fonts (Hiragino on iPhone, Noto Sans CJK JP on Android), no webfont */
html[lang="ja"] body { font-family: var(--font-ja); line-height: 1.8; line-break: strict; } /* strict: no line starts with a long-vowel mark or a small kana */
html[lang="ja"] :is(h1, h2, h3) { line-height: 1.5; }
/* Japanese headings and table headers break only at the <wbr> phrase marks (Chrome also uses auto-phrase); long words still wrap */
html[lang="ja"] :is(h1, h2, h3, .price-table th) { word-break: keep-all; overflow-wrap: anywhere; text-wrap: balance; }
@supports (word-break: auto-phrase) { html[lang="ja"] :is(h1, h2, h3, .price-table th) { word-break: auto-phrase; } }
html[lang="ja"] :is(p, li) { text-wrap: pretty; } /* avoids a last line of one or two characters */
/* the 8 language buttons: as many columns as fit (2 on phones, more on wide screens); a name never breaks inside a word, even at 200% text */
.lang-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9em), 1fr)); gap: var(--s-2); }
.lang-grid .btn { display: flex; align-items: center; justify-content: center; text-align: center; text-decoration: none; overflow-wrap: normal; word-break: keep-all; }
/* never one name alone on the last row (UX check 21 Nov, minor 5): on a phone an odd last button takes the whole row; from 1024 px
   the 404 page's nine buttons (8 languages + 日本語) sit three by three */
@media (max-width: 480px) { .lang-grid .btn:last-child:nth-child(odd) { grid-column: 1 / -1; } }
/* a grid of nine (the 404 page) is three by three; the page says so itself (data-cols), CSS does not count (no ":has()", see below) */
@media (min-width: 1024px) { .lang-grid.lang-grid[data-cols="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* price table: three short columns that fit 320 px; prices never split */
.price-table { border-collapse: collapse; inline-size: 100%; font-size: var(--fs-sm); background: var(--surface); }
.price-table th, .price-table td { text-align: start; vertical-align: top; padding: var(--s-2); border: 1px solid var(--line); }
.price-table thead th { background: var(--surface-2); }
.price-table .price { white-space: nowrap; font-weight: 600; }
/* each name in its own script's font, not the Japanese page font: the names stack of theme/first-light.css (.lang-grid [lang]) */

/* header language menu (search-pages.rb writes it): closed it is one line with a globe and the page's language. Open, the other
   languages hang from the button as a card OVER the page, one name per row, like the waiting list's lists: the button never
   moves when it is pressed (a second tap in the same place closes it) and nothing on the page is pushed down (owner's rule:
   no page jump when a list opens; UX gate 360, B3) */
.wall-langs { position: relative; }
.wall-langs summary { display: flex; align-items: center; gap: var(--s-2); min-block-size: var(--tap); cursor: pointer; color: var(--brand-ink); font-size: var(--fs-sm); font-weight: 600; list-style: none; }
.wall-langs summary::-webkit-details-marker { display: none; }
.wall-langs nav { position: absolute; inset-block-start: calc(100% + 6px); inset-inline-end: 0; z-index: 5; flex-direction: column; flex-wrap: nowrap; gap: 0;
  inline-size: max-content; min-inline-size: 200px; max-inline-size: calc(100vw - 24px); max-block-size: min(72svh, 440px); overflow-y: auto; padding: 6px;
  border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow-2); }
.wall-langs nav a, .wall-langs nav .chip-lang { justify-content: flex-start; min-block-size: 48px; padding: 8px 12px; border-radius: 9px; text-decoration: none; } /* 48 px rows, the whole row is the target */
@media (hover: hover) { .wall-langs nav a:hover, .wall-langs nav .chip-lang:not([aria-pressed="true"]):hover { background: var(--surface-2); } }
.wall-langs summary .i-down { inline-size: 1em; block-size: 1em; } /* the arrow shows the menu opens; it turns when open */
.wall-langs[open] summary .i-down { transform: rotate(180deg); }
@media (prefers-reduced-motion: no-preference) { .wall-langs summary .i-down { transition: transform .2s; } }
/* a key term that must not split across lines (外免切替 in Chinese headings, ဝက်ဘ်ဆိုက် in Burmese) */
.nw { white-space: nowrap; }

/* before launch (site-config.json "pre-launch", written by search-pages.rb): one quiet card at the top of the page with the launch date,
   one line and the button to the waiting list */
.launch-strip { display: flex; flex-direction: column; gap: var(--s-2); padding: var(--s-4); border: 1px solid var(--line);
  border-inline-start: 4px solid var(--brand); border-radius: var(--r-lg); background: var(--surface); }
.launch-strip p { margin: 0; }
.launch-strip .launch-date { font-weight: 600; color: var(--ink); }
.launch-strip .btn { align-self: stretch; text-decoration: none; margin-block-start: var(--s-1); }
@media (min-width: 600px) { .launch-strip .btn { align-self: flex-start; padding-inline: var(--s-5); } }
/* laptops: the launch card button is as wide as its words, not the whole card (UX gate 356, 18) */
@media (min-width: 600px) { .launch-strip .btn { inline-size: auto; } }
/* the launch line above a price (before launch only) */
.launch-note { color: var(--ink); }
/* the seller details page (legal/): label above its entry */
.legal { display: grid; gap: var(--s-1); }
.legal dt { font-weight: 600; margin-block-start: var(--s-3); }
.legal dd { margin: 0; }
/* the privacy page's language menu: the same header menu as the landing pages; its entries are buttons (privacy.js switches the
   language in place), drawn like the menu's links, 48 px tap size */
.wall-langs nav .chip-lang { display: flex; align-items: center; border: 0; background: none; color: var(--brand-ink); font: inherit; font-family: var(--font-names); font-size: var(--fs-sm); cursor: pointer; } /* font-family after "font: inherit": each name keeps the names fonts, never the phone's (audit M2) */
.wall-langs nav .chip-lang[aria-pressed="true"] { text-decoration: underline; text-underline-offset: .25em; }
/* the privacy page: a gap between paragraphs (UX re-check 2, S8), and room around the back button and each title (UX gate
   360, 5: the button touched the header line, the title sat tight under it, the section title had no air above it) */
main.text.wall p + p { margin-block-start: var(--s-3); }
main.text.wall > p:first-child { margin-block: var(--s-3) var(--s-4); }
main.text.wall section > h1 { margin-block: 0 var(--s-3); }
main.text.wall section > h2 { margin-block: var(--s-6) var(--s-3); }
/* the privacy page's title is the page headline in every language (h1, 24 Nov 2026); a long one breaks into even lines, never one
   short word alone on the last line */
main.text.wall section > h1 { text-wrap: balance; }

/* ---------- Screen sizes (final round, 23 Nov 2026, handover 358): phones keep the look above; tablets and laptops get a
   composed page instead of the phone page hung on the left of a wide window ---------- */
/* text size, always counted from the visitor's own setting: 17 px on phones, 18 px by 1024 px wide, then from 1440 px on up to
   21 px on a large monitor (Burmese one step larger, as in styles.css) */
:root { font-size: max(clamp(106.25%, 97.4% + 0.2358vw, 112.5%), min(67.5% + 0.5vw, 131.25%)); }
html[lang="my"] { font-size: max(clamp(112.5%, 103.65% + 0.2358vw, 118.75%), min(73.75% + 0.5vw, 137.5%)); }
/* the page headline and its opening paragraph grow with the window (25 px on a phone, about 36 px on a laptop, 47 px on a large monitor) */
.wall h1 { font-size: clamp(var(--fs-xl), 0.9rem + 1.5vw, 2.5rem); }
@media (min-width: 600px) { .wall h1 { text-wrap: balance; } }
.wall .lead { font-size: clamp(var(--fs-md), 0.9rem + 0.3vw, 1.18rem); }
@media (min-width: 1024px) {
  /* one reading column (about 75 letters a line) in the middle of the window; the header and the footer share its edges */
  #app { max-inline-size: calc(38rem + 2 * var(--s-7)); }
  .screen.wall, .screen.text.wall, .screen.guide.wall { max-inline-size: none; margin-inline: 0; }
  body > .wall-top, body > .wall-foot { padding-inline: var(--s-7); }
  /* a page with the launch card (before launch): the words on the left, the card on the right, where it stays in view while
     the page is read. The first section's parts join the page grid (display: contents), so the card can run the page's height.
     "has-launch" is written into such a page by tools/search-pages.rb. It is a plain class on purpose: the same rules written
     with ":has()" crashed the Safari-type engine on these pages (found by tools/test-sweep.py, 24 Nov 2026). */
  #app.has-launch { max-inline-size: calc(58rem + 2 * var(--s-7)); }
  main.wall.has-launch { display: grid; grid-template-columns: minmax(0, 1fr) 19rem; column-gap: 3rem; row-gap: 0; align-items: start; align-content: start; }
  main.wall.has-launch > section { grid-column: 1; margin-block-end: var(--s-4); }
  main.wall.has-launch > section:first-child { display: contents; }
  main.wall.has-launch > section:first-child > * { grid-column: 1; margin-block-end: var(--s-2); }
  main.wall.has-launch > section:first-child > .notice { margin-block-end: var(--s-4); }
  main.wall.has-launch > section:first-child > .launch-strip { grid-column: 2; grid-row: 1 / span 40; position: sticky; inset-block-start: var(--s-5); margin-block-end: 0; padding: var(--s-5); }
  main.wall.has-launch > section:first-child > .launch-strip .btn { align-self: stretch; inline-size: 100%; }
  /* the seller details: each label beside its entry */
  .legal { grid-template-columns: 13rem minmax(0, 1fr); column-gap: var(--s-5); row-gap: var(--s-3); }
  .legal dt { margin-block-start: 0; }
}
/* a link that opens another site in a new tab says so with a small arrow (audit P5). The arrow is the background picture of a
   small stretch at the end of the link that holds one invisible "word joiner" character: a joiner may not be parted from the
   letter before it, so the arrow never drops to the next line by itself and never hangs past the end of a full line (an empty
   box did both, in Chinese at 360 px and in Japanese at 420 px), and having no width it carries no underline.
   A picture in the link's own colour, not a mask filled with the text colour: the Safari-type engine does not cut a mask out of
   a stretch of text and drew the old arrow as a solid block (UX gate 360, B2). So the arrow's colour is written here once
   for each look, like the tick and the cross of theme/first-light.css: it is --brand-ink of that look. */
:root { --i-out: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237A3412' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13 4h7v7M20 4l-9 9M10 6H5v13h13v-5'/%3E%3C/svg%3E"); }
[data-theme="dark"] { --i-out: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFD3A8' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13 4h7v7M20 4l-9 9M10 6H5v13h13v-5'/%3E%3C/svg%3E"); }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) { --i-out: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFD3A8' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13 4h7v7M20 4l-9 9M10 6H5v13h13v-5'/%3E%3C/svg%3E"); } }
.wall a[target="_blank"]::after { content: "\2060"; padding-inline-start: 1.02em; background: var(--i-out) right center / .72em .72em no-repeat; } /* the room BEFORE the joiner: room after it could still hang past a full line */
