/* montopo.app's own rules on top of the kit (kit/system.css and friends): the brand's tokens, then only what sits
   inside a visual (the phone, the browser, the map cards), a statement's size and the inner pages' columns.
   Colours come from the tokens below and nowhere else. */

@font-face {
  font-family: "Manrope";
  src: url("/site/fonts/Manrope-Variable.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

/* Montopo's brand (brand/tokens.css): White, Ink, Pine, Mist; the inverse ground is the brand's Night, its actions
   Fern. Printed by the kit's start.mjs brand, the inverse taken from the brand's own dark palette. */
:root {
  --p-bg: #ffffff; --p-surface: #e3e9e5; --p-ink: #17373a; --p-muted: #526663;
  --p-accent: #2d6650; --p-accent-ink: #ffffff; --p-action: #2d6650; --p-action-ink: #ffffff;
  --p-inv-bg: #10282b; --p-inv-surface: #1b373b; --p-inv-ink: #ffffff; --p-inv-muted: #b5c7c3;
  --p-inv-accent: #9ccdb0; --p-inv-accent-ink: #10282b; --p-inv-action: #9ccdb0; --p-inv-action-ink: #10282b;
  --font-display: "Manrope", system-ui, sans-serif;
  --font-text: "Manrope", system-ui, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --display-weight: 500;
  --display-tracking: -0.035em;
  --display-tracking-xl: -0.045em;
  --ly-scale: 0.97;
  --device-r: 44px;
  --device-edge: #0d1f21;
}

/* Scripts other than Latin keep their own spacing (brand guide: never force Latin letter spacing on them). */
:lang(ja), :lang(zh-Hant), :lang(ko), :lang(th), :lang(ar), :lang(fa), :lang(hi) { --display-tracking: 0; --display-tracking-xl: 0; }
/* Japanese: each character is a full em wide, so display sizes step down; lines break between phrases. */
:lang(ja) :is(h1, .t-h1) { font-size: clamp(30px, 2.4vw + 20px, 54px); line-height: 1.25; }
:lang(ja) :is(h2, .t-h2) { font-size: clamp(24px, 1.2vw + 19px, 38px); line-height: 1.25; }
:lang(ja) :is(h1, h2, h3, p, li, dd) { word-break: auto-phrase; }

.nav__logo img { display: block; height: 28px; width: auto; }

/* ---------- the phone: one app screen at its own proportions, in a thin dark edge */
.device {
  position: relative; aspect-ratio: 402 / 874; width: var(--device-w, 300px);
  border-radius: var(--device-r); border: 8px solid var(--device-edge); background: var(--device-edge);
  box-shadow: 0 24px 48px -24px rgb(16 40 43 / 0.45); overflow: hidden;
}
.device > img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: calc(var(--device-r) - 8px); }

/* the hero: the photograph fills the frame, the phone stands in it, cut by the frame's foot */
/* the phone stands right of centre, so the ski tourer in the photograph stays in sight on its left (the photograph
   isn't mirrored right to left, so neither is the phone) */
.hero__media--phone .device { position: absolute; right: 9%; top: var(--s-7); --device-w: min(300px, 52%); z-index: 1; }
.hero__media--phone .ly-float { z-index: 2; top: var(--s-5); bottom: auto; max-width: 260px; }
@media (max-width: 1279px) { .hero__media--phone .ly-float { display: none; } }
/* below 1024 the picture sits under the words: the phone stands whole inside it */
@media (max-width: 1023px) { .hero__media--phone .device { --device-w: min(216px, 40%); top: var(--s-5); } }
@media (max-width: 639px) { .hero__media--phone .device { --device-w: 50%; right: 6%; } }

/* the splits and the feature cards: the phone rises from the frame's foot */
.stage > .device { left: 50%; top: var(--s-7); translate: -50% 0; --device-w: min(300px, 70%); }
.panel--shot .stage > .device { top: var(--s-6); --device-w: min(280px, 64%); }
@media (max-width: 639px) { .stage > .device, .panel--shot .stage > .device { --device-w: 72%; left: 50%; top: var(--s-5); } }

/* ---------- the maps: six of the app's own map pictures, each with its name, then the figures */
.map-card { padding: var(--s-3); gap: var(--s-2); }
.map-card > img { display: block; width: 100%; height: auto; aspect-ratio: 1; border-radius: var(--r-md); object-fit: cover; }
.map-card > h3 { margin-top: var(--s-3); }
.map-card > p { margin: 0; color: var(--muted); }
.map-stats { margin-top: var(--s-8); align-items: end; }
.map-stats p { margin: 0; }
.map-stats .t-stat + p { margin-top: var(--s-2); }
.map-stats__rest { color: var(--muted); }
@media (max-width: 1023px) {
  .map-tiles > .map-card { grid-column: span 4; }
  .map-stats > * { grid-column: span 6; }
}
@media (max-width: 639px) {
  .map-tiles > .map-card { grid-column: span 6; }
  .map-tiles > .map-card:nth-child(n + 5) { display: none; }
  .map-stats { margin-top: var(--s-7); row-gap: var(--s-5); }
}

/* ---------- the splits' text */
.split__text > h2 + .t-lead { margin-top: var(--s-5); }
.facts { list-style: none; margin: var(--s-5) 0; padding: 0; }
.facts li { padding: var(--s-3) 0; border-bottom: 1px solid color-mix(in oklch, var(--ink) 13%, transparent); }

/* ---------- the statement: the brand's line set large, its fact under it */
.statement__type {
  font: var(--display-weight) clamp(64px, 12vw, 188px) / 0.98 var(--font-display);
  letter-spacing: var(--display-tracking-xl); max-width: 9ch; margin: 0; text-wrap: balance;
}
.statement__text { margin-top: var(--s-7); font-size: clamp(20px, 1.6vw, 26px); line-height: 1.45; max-width: 40ch; }
@media (max-width: 1023px) { .statement__type { font-size: 19vw; max-width: 6ch; } .statement__text { font-size: 24px; } }

/* ---------- the website: the browser window cut by the frame's right and bottom edges */
.browser {
  --ax: var(--s-8); --ay: var(--s-8); width: 900px; border-radius: 12px; overflow: hidden; background: var(--bg);
  border: 1px solid color-mix(in oklch, var(--ink) 14%, transparent); box-shadow: 0 24px 48px -28px rgb(16 40 43 / 0.5);
}
.browser__bar { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; background: var(--surface); font-size: 13px; color: var(--muted); }
.browser__bar i { width: 10px; height: 10px; border-radius: 50%; background: color-mix(in oklch, var(--ink) 18%, transparent); }
.browser__bar span { margin-left: var(--s-3); }
.browser > img { display: block; width: 100%; height: auto; }
@media (max-width: 639px) { .browser { --ax-sm: 16px; width: 640px; } }

/* ---------- the close: the two store badges are its action */
.stores { display: flex; flex-wrap: wrap; gap: var(--s-4); margin-top: var(--s-6); }
.store { display: inline-flex; border-radius: 10px; }
.store img { display: block; height: 56px; width: auto; }

/* ---------- inner pages: the title column and the content column */
.page-head { --h: auto; height: auto; min-height: 100svh; }
.toc ul { list-style: none; margin: var(--s-4) 0 0; padding: 0; display: grid; gap: var(--s-2); }
.help { display: grid; gap: var(--s-7); }
.help__topic h2 { font-size: var(--t-h3); margin: 0 0 var(--s-4); }
.help__topic p { margin: 0 0 var(--s-3); max-width: 62ch; }
.credits-list { margin: 0; padding-left: var(--s-5); display: grid; gap: var(--s-3); }

/* the contact form's field only robots fill: off screen, out of the tab order */
.contact-form__trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.contact-form textarea { min-height: 176px; resize: vertical; }
.contact-form > .field:has(textarea), .contact-form > .cf-turnstile { grid-column: 1 / -1; }
.cf-turnstile:empty { display: none; }

/* the questions: the app's icon over the heading */
.faq-head .app-icon { width: 96px; height: 96px; border-radius: 22px; border: 1px solid color-mix(in oklch, var(--ink) 12%, transparent); }

/* section heights at the tablet (640 to 1023) and on a phone: each section one screen or two */
@media (min-width: 640px) and (max-width: 1023px) {
  .map-tiles > .map-card { grid-column: span 2; padding: var(--s-2); }
  .map-tiles .t-card { font-size: var(--t-body); }
  #offline .frame--split, #website .frame--split { --ratio: 62.5%; }
}
@media (min-width: 640px) and (max-width: 1279px) {
  #questions .faq { grid-column: 1 / -1; columns: 2; column-gap: var(--s-5); margin-top: var(--s-6); }
  #questions .faq__item { break-inside: avoid; }
}
@media (max-width: 639px) {
  #maps, footer.closing { --hm: 2; }
  #questions .faq-head { position: relative; }
  #questions .faq-head .t-lead { display: none; }
  #questions .faq-head .app-icon { position: absolute; right: 0; top: 0; width: 44px; height: 44px; border-radius: 11px; margin: 0; }
  [dir="rtl"] #questions .faq-head .app-icon { right: auto; left: 0; }
  #questions .faq__item { padding-block: var(--s-3); }
  #questions .faq__item h3 { font-size: 17px; }
  #offline .facts, #website .facts { display: none; }
}
/* the tablet: the four feature cards two by two in one screen, their panels lower */
@media (min-width: 640px) and (max-width: 1023px) {
  main > section#features.g2 { --h: 1; }
  main > section#features.g2 > .wrap { display: block; }
  #features .grid > .card { grid-column: span 6; }
  #features .grid + .grid { margin-top: var(--s-5); }
  #features .card--open > .panel { --p-h: 260px; }
  .closing__links .grid > .footer__col { grid-column: span 4; }
}
/* the website's frame square on a wide screen, so the section's air matches its neighbours' */
@media (min-width: 1280px) { #website .frame--split { --ratio: 100%; } }
/* the store badges stand side by side on a phone too */
@media (max-width: 639px) { .stores { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } .store img { width: 100%; height: auto; } }
/* a 320 px screen keeps the menu button inside it */
@media (max-width: 359px) { .nav__logo img { height: 22px; } }

/* ---------- section heights (Pierre, 2026-11-28: too much white space between sections). The kit makes every
   section one or two screens tall; here a section takes its content and the same air above and below it. The hero
   keeps its screen. */
main > section.section:not(.hero), footer.closing { height: auto; min-height: 0; padding-block: clamp(64px, 6.5vw, 104px); }
main > section.section:not(.hero) > .wrap, footer.closing > .wrap { height: auto; }
main > section#features.g2 > .wrap { display: flex; flex-direction: column; gap: var(--s-8); }
#features .card--open > .panel { --p-h: 440px; }
#offline .frame--split, #website .frame--split { --ratio: 80%; }
@media (max-width: 1023px) { #features .card--open > .panel { --p-h: 300px; } }
@media (max-width: 639px) { #features .card--open > .panel { --p-h: 240px; } }

/* ---------- the hero's action: the store badges under the lead */
.hero__text .stores { margin-top: var(--s-6); }
.hero__text .store img { height: 52px; }

/* ---------- prices: every price is on the page in each currency; the switch shows one */
.price { display: none; }
html:has(input[name="currency"][value="USD"]:checked) .price[data-currency="USD"],
html:has(input[name="currency"][value="EUR"]:checked) .price[data-currency="EUR"],
html:has(input[name="currency"][value="JPY"]:checked) .price[data-currency="JPY"] { display: inline; }

.currency { display: inline-flex; align-self: flex-start; gap: 2px; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 999px; }
.currency__option { position: relative; display: flex; }
.currency__option input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.currency__option span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--muted); }
.currency__option input:checked + span { background: var(--ink); color: var(--bg); }
.currency__option input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- the plans (the kit's pricing-two): the free apps beside the cloud and its three prices */
.pricing-head { display: flex; flex-direction: column; gap: var(--s-5); align-self: stretch; }
.pricing-head > * { margin: 0; }
.pricing-note { color: var(--muted); }
.plans > .plan { align-self: stretch; }
.card.plan > .plan__price { font: 600 44px/1 var(--font-display); letter-spacing: -0.04em; color: var(--ink); }
.card.plan > .plan__price--from { font: 400 16px/1.4 var(--font-text); letter-spacing: 0; color: var(--muted); flex-wrap: wrap; }
.plan__price--from .price { font: 600 44px/1 var(--font-display); letter-spacing: -0.04em; color: var(--ink); }
:lang(ja) .plan__price--from .price, :lang(ar) .plan__price--from .price { letter-spacing: 0; }
.plan__tiers { margin: var(--s-5) 0 0; }
.plan__tiers > div { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-4); padding: var(--s-3) 0; border-top: 1px solid var(--line); }
.plan__tiers dt { font-weight: 600; }
.plan__tiers dt span { display: block; font-weight: 400; font-size: 14px; color: var(--muted); }
.plan__tiers dd { margin: 0; white-space: nowrap; }
.plan > .stores { margin-top: var(--s-5); gap: var(--s-3); }
.plan > .stores .store img { height: 44px; }
.plan > .plan__buy { margin-top: var(--s-5); align-self: flex-start; }
@media (max-width: 639px) { .card.plan > .plan__price, .card.plan > .plan__price--from .price { font-size: 34px; } }
@media (max-width: 1023px) {
  .plans > .pricing-head { grid-column: 1 / -1; }
  .plans > .plan { grid-column: span 6; }
}
@media (max-width: 639px) { .plans > .plan { grid-column: 1 / -1; } }

/* ---------- the comparison: a table on the grid's columns; a phone stacks each row's apps under its feature */
.compare { margin-top: var(--s-7); }
.compare__table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 15px; line-height: 1.4; }
.compare__table :is(th, td) { padding: var(--s-4) var(--s-3); text-align: start; vertical-align: top; border-top: 1px solid var(--line); }
.compare__table thead :is(th, td) { border-top: 0; padding-top: 0; font-weight: 600; }
.compare__table tbody th { font-weight: 600; }
.compare__table :is(th, td):nth-child(2) { background: color-mix(in oklab, var(--accent) 7%, transparent); }
.compare__table thead :is(th, td) { padding-top: var(--s-4); }
.compare__table thead th:nth-child(2) { border-radius: var(--r-md) var(--r-md) 0 0; }
.compare__plan { display: block; color: var(--muted); font-size: 14px; }
.compare__sources { margin-top: var(--s-5); font-size: 14px; color: var(--muted); }
.compare__sources summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.compare__sources ol { margin: var(--s-3) 0 0; padding-inline-start: var(--s-5); columns: 2; column-gap: var(--s-7); }
.compare__sources li { break-inside: avoid; margin-bottom: var(--s-2); }
@media (max-width: 1023px) { .compare__sources ol { columns: 1; } }
@media (max-width: 639px) {
  .compare__table, .compare__table tbody, .compare__table tr { display: block; }
  .compare__table thead { display: none; }
  .compare__table tbody tr { padding: var(--s-4) 0; border-top: 1px solid var(--line); }
  .compare__table tbody th { display: block; padding: 0 0 var(--s-3); border: 0; font-size: 17px; }
  .compare__table td { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: var(--s-3); padding: var(--s-2) 0; border: 0; background: none; }
  .compare__table td::before { content: attr(data-app); color: var(--muted); }
  .compare__table td:nth-child(2) { font-weight: 600; }
}

/* ---------- the help search: the field under the lead, then the topics it finds (public/help-search.js) */
.help-search { display: grid; gap: var(--s-3); margin-block: var(--s-5); }
.help-search__count:empty { display: none; }
.help-search__count { margin: 0; color: var(--muted); }
.help-search__results { list-style: none; margin: 0; padding: 0; display: grid; border-top: 1px solid var(--line); }
.help-search__results li { border-bottom: 1px solid var(--line); }
.help-result { display: grid; gap: var(--s-1); padding-block: var(--s-3); color: var(--ink); text-decoration: none; }
.help-result__title { font-weight: 500; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 4px; }
.help-result:hover .help-result__title { text-decoration-color: currentColor; }
.help-result__text { font-size: var(--t-small); line-height: 1.5; color: var(--muted); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.help-search__none { margin: 0; }
