/* Maastokartat sites — shared stylesheet, light + dark via the tokens below.
   Edit only the main-public copy; update-web-assets.py mirrors it to the
   company site. Design rationale: docs/websites.md */

@font-face {
  font-family: 'Familjen Grotesk';
  src: url('/assets/fonts/FamiljenGrotesk.woff2?v=414d5dfe') format('woff2');
  font-weight: 400 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/Inter.woff2?v=3100e775') format('woff2');
  font-weight: 100 900; font-style: normal; font-display: swap;
}

/* ---------- tokens: LIGHT (default) ---------- */
:root {
  color-scheme: light dark;

  --bg:          #FFFFFF;
  --surface:     #F4F7F1;
  --surface-2:   #E7EEE1;
  --fg:          #121710;
  --fg-soft:     #48523F;
  --fg-faint:    #67715D;

  --brand:       #225500;
  --brand-strong: #163800;
  --brand-tint:  #EEF4E5;
  --on-brand:    #FFFFFF;
  --focus-ring:  #225500;
  --plus:        #A0570F;
  --plus-tint:   #FBEFE0;
  --on-plus:     #FFFFFF;

  --rule:        #DDE4D8;
  --card-bg:     #FFFFFF;
  --card-line:   #DDE4D8;

  /* the app bar carries the brand colour, as it does in the app itself */
  --header-bg:      #225500;
  --header-fg:      #FFFFFF;
  --header-fg-soft: #D6E8D4;
  --header-line:    #163800;

  --phone-frame: #1B2118;
  --phone-frame-2: #394333;
  --phone-rim: rgba(18,23,16,.30);
  --phone-shadow: 0 24px 60px -18px rgba(18,23,16,.42);
  --shadow-card: 0 1px 2px rgba(18,23,16,.05), 0 8px 24px -12px rgba(18,23,16,.12);

  --font-display: 'Familjen Grotesk', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-body:    'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --measure:      64ch;
  --section-gap:  clamp(4rem, 8vw, 7rem);
  --radius:       10px;
  --radius-lg:    16px;
}

/* ---------- tokens: DARK ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:          #10140E;
    --surface:     #191F16;
    --surface-2:   #232B1F;
    --fg:          #ECF1E6;
    --fg-soft:     #B6C1AD;
    --fg-faint:    #93A08B;

    --brand:       #8FCC66;
    --brand-strong: #A5D685;
    --brand-tint:  #1B2412;
    --on-brand:    #0C1109;
    --focus-ring:  #B2FF59;
    --plus:        #F0932B;
    --plus-tint:   #2A2013;
    --on-plus:     #221604;

    --rule:        #2C3626;
    --card-bg:     #191F16;
    --card-line:   #2C3626;

    --header-bg:      #1B4200;
    --header-fg:      #EDF3EB;
    --header-fg-soft: #B9CFB6;
    --header-line:    #122E00;

    --phone-frame: #0B0F09;
    --phone-frame-2: #3A4433;
    --phone-rim: rgba(255,255,255,.20);
    --phone-shadow: 0 24px 60px -18px rgba(0,0,0,.7);
    --shadow-card: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.5);
  }
}
:root[data-theme="dark"] {
  --bg:          #10140E;
  --surface:     #191F16;
  --surface-2:   #232B1F;
  --fg:          #ECF1E6;
  --fg-soft:     #B6C1AD;
  --fg-faint:    #93A08B;

  --brand:       #8FCC66;
  --brand-strong: #A5D685;
  --brand-tint:  #1B2412;
  --on-brand:    #0C1109;
  --focus-ring:  #B2FF59;
  --plus:        #F0932B;
  --plus-tint:   #2A2013;
  --on-plus:     #221604;

  --rule:        #2C3626;
  --card-bg:     #191F16;
  --card-line:   #2C3626;

  --header-bg:      #1B4200;
  --header-fg:      #EDF3EB;
  --header-fg-soft: #B9CFB6;
  --header-line:    #122E00;

  --phone-frame: #0B0F09;
  --phone-frame-2: #3A4433;
  --phone-rim: rgba(255,255,255,.20);
  --phone-shadow: 0 24px 60px -18px rgba(0,0,0,.7);
  --shadow-card: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.5);
}

/* ============================================================
   BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}
/* height:auto is required — without it the HTML height attribute wins over the
   CSS width and every screenshot renders vertically stretched. */
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); }
:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; border-radius: 2px; }

.wrap { width: min(1200px, 100% - 2.5rem); margin-inline: auto; }
.section { padding-block: var(--section-gap); }
.section-flush { padding-top: 0; }
/* keep anchor targets clear of the sticky header (shorter on narrow screens) */
section[id], .layer-detail[id], .faq-group[id] { scroll-margin-top: 4.5rem; }
@media (min-width: 620px) { section[id], .layer-detail[id], .faq-group[id] { scroll-margin-top: 5.5rem; } }
.section-tint { background: var(--surface); }

h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; font-weight: 700; letter-spacing: -0.025em; }
h1 { font-size: clamp(2rem, 3.6vw, 3rem); line-height: 1.06; }
h2 { font-size: clamp(1.5rem, 2.4vw, 2.125rem); line-height: 1.14; }
h3 { font-size: 1.125rem; line-height: 1.3; letter-spacing: -0.015em; }
p  { margin: 0 0 1rem; max-width: var(--measure); }
.lede { font-size: clamp(1.0625rem, 1.6vw, 1.25rem); color: var(--fg-soft); line-height: 1.55; }
h2 + .lede { margin-top: 1rem; }
/* Longer section intros: body-size counterpart of .lede (cf. .trust) */
.section-intro { margin: 1rem 0 2.5rem; color: var(--fg-soft); max-width: 68ch; }
.eyebrow {
  font-size: .75rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--fg-faint); margin: 0 0 1rem;
}

/* ---------- brand lockup ---------- */
.lockup { display: inline-flex; align-items: center; gap: .875rem; text-decoration: none; color: inherit; }
.lockup img { width: 2.5rem; height: 2.5rem; border-radius: .5rem; }
.lockup-name { font-family: var(--font-body); font-weight: 700; letter-spacing: 0.04em; font-size: 1.35rem; line-height: 1; }
.lockup-hero { margin-bottom: 1.5rem; }
/* sizes shared with the company site's .feature-head — keep the two in step */
.lockup-hero img { width: clamp(3rem, 5.5vw, 4rem); height: clamp(3rem, 5.5vw, 4rem); border-radius: .8125rem; }
.lockup-hero .lockup-name { font-size: clamp(1.625rem, 3vw, 2.375rem); letter-spacing: 0.02em; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .9rem 1.5rem; border-radius: var(--radius);
  font: inherit; font-weight: 600; text-decoration: none;
  border: 2px solid transparent; cursor: pointer;
  transition: transform .12s ease, background-color .12s ease, border-color .12s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-strong); }
.btn-ghost { border-color: var(--rule); color: var(--fg); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
/* Official Play badge (Google's own SVG, unmodified). 48px keeps its small
   upper text line legible; every gap around it must stay >= 12px clear space. */
.play-badge { display: inline-block; line-height: 0; flex: none; }
.play-badge img { height: 3rem; width: auto; max-width: 100%; }
.play-badge:hover { opacity: .88; }

/* gap is 1rem so it clears the Play badge's required clear space */
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: 1.75rem; }
/* buttons beside the Play badge match its height so the row reads as one line */
.cta-row .btn { height: 3rem; padding-block: 0; }
.cta-note { font-size: .875rem; color: var(--fg-faint); margin: .875rem 0 0; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: var(--header-bg);
  color: var(--header-fg);
  border-bottom: 1px solid var(--header-line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding-block: .8125rem; }
@media (min-width: 400px) { .header-inner { gap: 1.25rem; } }
.site-header .lockup { color: var(--header-fg); }
/* Header and footer lockups share one fluid scale below 400px, so they match
   at every width: the header must shrink for the bar to fit at 320px, and the
   footer follows it rather than sitting visibly larger on phones. */
.site-header .lockup, .site-footer .lockup { gap: clamp(.5rem, -1rem + 7.5vw, .875rem); }
.site-header .lockup-name, .site-footer .lockup-name { font-size: clamp(1.1rem, .1rem + 5vw, 1.35rem); }
.site-header .lockup .mark, .site-footer .lockup .mark { height: clamp(1.5rem, .5rem + 5vw, 1.75rem); }
/* map glyph as a CSS mask so it takes currentColor; the hero and footer keep
   the full-colour app icon */
.site-header .mark, .site-footer .mark {
  display: inline-block; flex: none;
  /* width follows from aspect-ratio (mark.svg's own viewBox) */
  height: 1.75rem; aspect-ratio: 327.4375 / 244.625;
  background-color: var(--header-fg);
  -webkit-mask: url("/assets/img/mark.svg?v=743536cc") no-repeat center / contain;
  mask: url("/assets/img/mark.svg?v=743536cc") no-repeat center / contain;
}
.site-nav { display: none; gap: 1.75rem; font-size: .9375rem; }
.site-nav a { color: var(--header-fg-soft); text-decoration: none; }
.site-nav a:hover { color: var(--header-fg); text-decoration: underline; }
.site-nav a[aria-current] { color: var(--header-fg); font-weight: 600; }
.header-end { display: flex; align-items: center; gap: .25rem; }
@media (min-width: 400px) { .header-end { gap: 1rem; } }
@media (min-width: 880px) { .site-nav { display: flex; margin-inline: auto; } }
/* current language by weight/brightness only; padding keeps a >=24px tap
   target (WCAG 2.5.8) */
.lang { display: flex; align-items: center; gap: .25rem; font-size: .8125rem; }
.lang a {
  color: var(--header-fg-soft); text-decoration: none; border-radius: 5px;
  padding: .4375rem .3125rem; min-width: 1.625rem; text-align: center;
}
@media (min-width: 400px) { .lang a { padding: .4375rem .5625rem; } }
.lang a:hover { color: var(--header-fg); text-decoration: underline; }
.lang [aria-current="true"] { color: var(--header-fg); font-weight: 600; }
.lang .sep { color: var(--header-fg-soft); opacity: .55; }
.header-cta { display: none; }
@media (min-width: 620px) {
  .header-cta {
    display: inline-flex; padding: .5625rem 1.0625rem; font-size: .9375rem;
    background: var(--header-fg); color: var(--header-bg);
  }
  .header-cta:hover { background: #fff; color: var(--header-bg); }
}

/* ---------- narrow-screen menu ---------- */
/* a <details>, so the links work with site.js blocked or broken; the script
   only adds Escape, click-outside and closing after a same-page anchor jump */
.menu-btn {
  display: flex; align-items: center; justify-content: center;
  width: 2.75rem; height: 2.75rem;   /* 44px tap target */
  /* negative block margin keeps the hit area without growing the bar */
  margin-block: -.5rem;
  margin-right: -.5rem;
  cursor: pointer; list-style: none; border-radius: 6px;
}
.menu-btn::-webkit-details-marker { display: none; }
.menu-icon { position: relative; }
.menu-icon, .menu-icon::before, .menu-icon::after {
  display: block; width: 1.125rem; height: 2px; border-radius: 2px;
  background: var(--header-fg);
  transition: transform .15s ease, background-color .15s ease;
}
.menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 0; }
.menu-icon::before { top: -6px; }
.menu-icon::after  { top: 6px; }
.menu[open] .menu-icon { background: transparent; }
.menu[open] .menu-icon::before { transform: translateY(6px) rotate(45deg); }
.menu[open] .menu-icon::after  { transform: translateY(-6px) rotate(-45deg); }
@media (prefers-reduced-motion: reduce) {
  .menu-icon, .menu-icon::before, .menu-icon::after { transition: none; }
}

/* .site-header is sticky, so it is this panel's containing block. */
.menu-panel {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--header-bg); border-bottom: 1px solid var(--header-line);
  box-shadow: 0 12px 24px rgba(0, 0, 0, .18);
  padding-block: .5rem 1.25rem;
}
.menu-panel nav { display: grid; }
.menu-panel a {
  color: var(--header-fg-soft); text-decoration: none;
  padding-block: .75rem; font-size: 1.0625rem;
}
.menu-panel a:hover { color: var(--header-fg); }
.menu-panel a[aria-current] { color: var(--header-fg); font-weight: 600; }
/* scoped past `.menu-panel a`, which would otherwise flatten the padding */
.menu-panel .menu-cta {
  justify-self: start; margin-top: .875rem; padding: .8rem 1.25rem;
  background: var(--header-fg); color: var(--header-bg);
}
.menu-panel .menu-cta:hover { background: #fff; color: var(--header-bg); }
/* from 620px the bar shows .header-cta, so the panel's copy is redundant */
@media (min-width: 620px) { .menu-cta { display: none; } }
@media (min-width: 880px) { .menu { display: none; } }

/* ---------- hero ---------- */
.hero { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(2rem, 5vw, 4rem); }
.hero-grid { display: grid; gap: clamp(2.5rem, 5vw, 4rem); align-items: center; }
@media (min-width: 940px) { .hero-grid { grid-template-columns: 1fr 1fr; } }
/* the h1 is styled as an eyebrow above the app name but stays the page h1 —
   its text must still say what the app is */
.hero h1 {
  font-size: clamp(.9375rem, 1.25vw, 1.125rem);
  font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--brand);
  line-height: 1.3; margin-bottom: .875rem;
}
/* tighter above than below: the tagline belongs to the name, the lede does not */
.hero .lockup-hero { margin-bottom: 1.375rem; }
.hero .lede { max-width: 40ch; }

/* Three phones fanned. The layout box is narrower than the column on purpose:
   the rotated side phones paint wider than their boxes, and the spare width is
   what keeps that overhang from causing page-wide horizontal overflow. */
.phones {
  position: relative; display: flex; justify-content: center;
  width: 100%; max-width: 280px; margin-inline: auto;
  padding-block: 1rem 3rem;
}
.phone {
  position: relative;
  background: linear-gradient(158deg, var(--phone-frame-2) 0%, var(--phone-frame) 42%, var(--phone-frame) 100%);
  border-radius: 2.15rem; padding: .5rem;
  box-shadow: 0 0 0 1px var(--phone-rim), var(--phone-shadow);
}
.phone-front { z-index: 2; width: 100%; flex: none; }
.phone-side {
  display: none; position: absolute; top: 3.5rem;
  width: 52%; filter: brightness(.95);
}
.phone-left { left: 0; transform: rotate(-8deg); transform-origin: bottom right; }
.phone-right { right: 0; transform: rotate(4deg); transform-origin: bottom left; }
/* below this there is no room to fan; show the front phone alone */
@media (min-width: 560px) {
  .phones { width: 83%; max-width: 490px; }
  .phone-front { width: 55%; }
  .phone-side { display: block; }
}
.phone img {
  border-radius: 1.75rem; width: 100%; height: auto;
  box-shadow: 0 0 0 1px rgba(0,0,0,.45);
}
/* ---------- rating / social proof ---------- */
.proof { display: flex; flex-wrap: wrap; align-items: center; gap: .625rem 1.75rem; margin-top: 1.5rem; font-size: .875rem; color: var(--fg-soft); }
.proof-item { display: inline-flex; align-items: center; gap: .5rem; }
.stars { display: inline-flex; gap: .0625rem; }
.stars svg { width: 1.0625rem; height: 1.0625rem; fill: #E8A93A; }
/* the fifth star is filled 60%: 4.6 of 5 — keep in step with the rating */
.star-part .s-bg { fill: var(--rule); }
.star-part .s-fg { fill: #E8A93A; clip-path: inset(0 40% 0 0); }

/* ---------- value props ---------- */
/* exactly four cards: explicit columns so no row ever orphans one card */
.why { display: grid; gap: 1.25rem 2rem; grid-template-columns: 1fr; }
@media (min-width: 560px) { .why { grid-template-columns: 1fr 1fr; } }
@media (min-width: 940px) { .why { grid-template-columns: repeat(4, 1fr); } }
.why h2 { font-size: .9375rem; margin-bottom: .1875rem; letter-spacing: -0.015em; }
.why p { font-size: .875rem; line-height: 1.45; color: var(--fg-soft); margin: 0; }
.why-item { border-top: 2px solid var(--brand); padding-top: .625rem; }

/* ---------- who it's for ---------- */
/* rides inside the features section after the free/Plus comparison — see
   docs/websites.md for the placement rationale */
.uses-band { margin-top: clamp(3rem, 6vw, 4.5rem); border-top: 1px solid var(--rule); padding-top: clamp(2.5rem, 5vw, 3.5rem); }
.uses { display: grid; gap: 1.75rem 2rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 2.5rem; }
.use-item h3 { font-size: 1rem; margin-bottom: .375rem; }
.use-item p { font-size: .9375rem; line-height: 1.5; color: var(--fg-soft); margin: 0; }
.use-item .use-plus, .use-item .use-free {
  margin-top: .5rem; font-size: .75rem; font-weight: 600; letter-spacing: .04em;
}
.use-item .use-plus { color: var(--plus); }
.use-item .use-free { color: var(--brand); }

/* ---------- map showcase ---------- */
.map-group + .map-group { margin-top: 2.75rem; }
/* direct child only — on /kartat the layer names are also h3s nested deeper,
   and they must not pick up this small-uppercase label treatment */
.map-group > h3 {
  font-size: .8125rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--fg-faint); margin-bottom: 1rem; font-family: var(--font-body);
}
/* /kartat group titles: air between the title and the first article's rule
   (adjacent margins collapse with the "other countries" note's margin-top) */
.map-group > h2 { margin-bottom: .5rem; }
/* on /kartat the "other countries" note follows a display h2, not the small
   group label, so it needs its own spacing */
.map-group h2 + .group-note { margin: 1rem 0 1.5rem; }
/* even column counts only (1 -> 2 -> 4), so four-card groups never split 3+1 */
.tiles { display: grid; gap: 1.125rem; grid-template-columns: 1fr; }
@media (min-width: 560px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.tile {
  border: 1px solid var(--card-line); border-radius: var(--radius); background: var(--card-bg); overflow: hidden;
  display: block; color: inherit; text-decoration: none;
}
.tile:hover { border-color: var(--brand); }
.tile-art { aspect-ratio: 8 / 5; width: 100%; height: auto; object-fit: cover; background: var(--surface-2); }
.tile-body { padding: .8125rem 1rem 1rem; display: flex; align-items: center; gap: .625rem; }
.tile-body h4 {
  font-size: 1rem; font-family: var(--font-body); font-weight: 600; letter-spacing: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
}
.pill {
  margin-left: auto; flex: none;
  font-size: .625rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--plus); background: var(--plus-tint);
  padding: .1875rem .4375rem; border-radius: 4px;
}
/* free tiles carry a badge too, in the same shape as .pill */
.pill-free { color: var(--brand); background: var(--brand-tint); }
.group-note { font-size: .875rem; color: var(--fg-soft); margin: -.375rem 0 1rem; }

.section-more { margin: 2.25rem 0 0; font-weight: 600; }
.section-more a { color: var(--brand); text-decoration: none; display: inline-block; padding-block: .375rem; }
.section-more a:hover { text-decoration: underline; }

/* country chips — flags only */
.countries { display: flex; flex-wrap: wrap; gap: .75rem; }
.country {
  display: inline-flex; align-items: center; gap: .625rem;
  border: 1px solid var(--card-line); border-radius: var(--radius);
  background: var(--card-bg); padding: .625rem .9375rem;
  font-size: .9375rem; font-weight: 600;
}
/* the ring keeps the Estonian and Danish flags' white stripes off the card */
.country svg { width: 1.75rem; height: 1.09375rem; border-radius: 2px; flex: none; box-shadow: 0 0 0 1px var(--rule); }

/* ---------- free vs plus comparison ---------- */
.compare { display: grid; gap: 1.5rem; margin-top: 2.5rem; }
@media (min-width: 880px) { .compare { grid-template-columns: 1fr 1fr; } }
.col {
  border: 1px solid var(--card-line); border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 2.125rem); background: var(--card-bg);
  box-shadow: var(--shadow-card);
  display: flex; flex-direction: column;
}
.col-plus { border-color: var(--plus); border-width: 2px; }
.col h3 { font-size: 1.5rem; margin-bottom: .25rem; }
.col-note { color: var(--fg-soft); font-size: .9375rem; margin-bottom: 1.5rem; }
.col ul { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; gap: .625rem; }
.col li { display: grid; grid-template-columns: 1.25rem 1fr; gap: .625rem; align-items: start; font-size: .9375rem; line-height: 1.45; }
/* the check mark, as a mask so the list items stay plain text */
.col li::before {
  content: ""; width: 1.125rem; height: 1.125rem; margin-top: .18rem;
  background-color: var(--brand);
  --check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M3 10.5l4.5 4.5L17 5' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  -webkit-mask: var(--check) no-repeat center / contain;
          mask: var(--check) no-repeat center / contain;
}
.col-plus li::before { background-color: var(--plus); }
.price-hint {
  margin-top: auto; padding-top: 1.25rem; border-top: 1px solid var(--rule);
  font-size: .9375rem; color: var(--fg-soft);
}
.price-hint strong { color: var(--fg); font-weight: 600; }
.price-hint a { font-weight: 600; }

/* ---------- plus feature carousel ---------- */
/* one card centred with its neighbours peeking; scroll-snap does the moving,
   so swiping works with JS off */
.pcx {
  --pcx-card: min(66rem, 88vw);
  --pcx-peek: max(0px, calc((100% - var(--pcx-card)) / 2));
  position: relative;
  margin-top: 1rem;
}
.pcx-intro { margin-bottom: 1.25rem; }

.pcx-track {
  display: flex; gap: 1.25rem;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  /* the padding is what lets the first and last card sit centred */
  padding-inline: var(--pcx-peek);
  padding-bottom: .25rem;
  scrollbar-width: none; -ms-overflow-style: none;
  /* fade the gutters so a peeking card reads as a hint */
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--pcx-peek), #000 calc(100% - var(--pcx-peek)), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 var(--pcx-peek), #000 calc(100% - var(--pcx-peek)), transparent 100%);
}
.pcx-track::-webkit-scrollbar { display: none; }

.pcx-card {
  flex: 0 0 var(--pcx-card); scroll-snap-align: center;
  border: 1px solid var(--card-line); border-radius: var(--radius-lg);
  background: var(--card-bg); box-shadow: var(--shadow-card);
  padding: clamp(1.25rem, 3vw, 1.875rem);
}
/* the card spans the full width; its contents stay at a readable measure */
.pcx-inner { display: grid; gap: 1.25rem; align-content: start; max-width: 50rem; margin-inline: auto; }
@media (min-width: 620px) {
  .pcx-inner { grid-template-columns: minmax(0, 1fr) 11rem; align-items: center; gap: 2rem; }
  /* centre short (medallion) cards inside the row height; no-op for phones */
  .pcx-card { display: grid; }
  .pcx-inner { align-self: center; }
}
/* ---------- content pages (/kartat, /tuki) ---------- */
.page-hero { padding-block: clamp(2.25rem, 5vw, 3.5rem) clamp(1.25rem, 3vw, 2rem); }
.page-hero h1 { max-width: 20ch; margin-bottom: 1rem; }
.page-hero .lede { max-width: 60ch; }
/* multi-paragraph hero intros sit at body size with normal paragraph rhythm */
.page-hero .section-intro { margin: 0 0 1rem; }

/* every article keeps its top hairline (first included) so the group heading
   heads the whole ruled list — same system as the FAQ page */
.layer-detail {
  display: grid; gap: clamp(1.25rem, 3vw, 2.5rem); align-items: start;
  padding-block: clamp(1.25rem, 3vw, 2rem);
  border-top: 1px solid var(--rule);
}
@media (min-width: 760px) { .layer-detail { grid-template-columns: 21rem minmax(0, 1fr); } }
.layer-detail img { border-radius: var(--radius); width: 100%; height: auto; }
.layer-detail h3 { font-size: clamp(1.1875rem, 2vw, 1.5rem); margin-bottom: .625rem; }
.layer-detail p { color: var(--fg-soft); font-size: .9375rem; margin: 0 0 .75rem; }
.layer-detail p:last-child { margin-bottom: 0; }
.layer-head { display: flex; flex-wrap: wrap; align-items: center; gap: .625rem; margin-bottom: .5rem; }
.layer-head h3 { margin-bottom: 0; }
.layer-head .pill { margin-left: 0; }
/* a Plus variant of a free map is a second layer-head inside the same article */
.layer-detail .layer-head:not(:first-child) { margin-top: 1.75rem; }

/* ---------- layer image lightbox ---------- */
/* the anchor takes the img's place as the grid child; below 760px site.js
   removes the href and the zoom affordance with it */
.layer-zoom { display: block; border-radius: var(--radius); }
@media (min-width: 760px) {
  .layer-zoom { cursor: zoom-in; }
  .layer-zoom:hover img { filter: brightness(1.06); }
}
/* same 720x450 file as the thumbnail, at its natural size at most */
.zoom-dialog { border: 0; padding: 0; background: transparent; max-width: none; max-height: none; }
.zoom-dialog::backdrop { background: rgba(0, 0, 0, .78); }
.zoom-dialog figure { margin: 0; position: relative; }
.zoom-dialog img {
  display: block; width: auto; height: auto;
  max-width: min(92vw, 720px); max-height: 82vh;
  border-radius: var(--radius-lg);
}
.zoom-caption {
  color: rgba(255, 255, 255, .92); font-size: .875rem;
  text-align: center; margin-top: .625rem;
}
.zoom-close {
  position: absolute; top: .5rem; right: .5rem;
  width: 2.25rem; height: 2.25rem;
  border: 0; border-radius: 50%;
  background: rgba(0, 0, 0, .55); color: #fff;
  font-size: 1.375rem; line-height: 1; cursor: pointer;
}
.zoom-close:hover { background: rgba(0, 0, 0, .75); }
/* no page scroll behind the modal */
body:has(.zoom-dialog[open]) { overflow: hidden; }

.note {
  border-left: 3px solid var(--plus); background: var(--surface);
  padding: .9375rem 1.125rem; border-radius: 0 var(--radius) var(--radius) 0;
  font-size: .875rem; color: var(--fg-soft); margin: 1.25rem 0 0; max-width: 62ch;
}
.note strong { color: var(--fg); }

/* the measure goes on the children — .faq shares its element with .wrap, whose
   auto margins would centre a narrowed wrap away from its heading */
.faq > * { max-width: 68ch; }
.faq { padding-top: clamp(1.75rem, 3.5vw, 2.75rem); }
.faq-group + .faq-group { margin-top: 3.5rem; }
/* category label: same small-uppercase treatment as .map-group > h3 */
.faq-group > h2 {
  font-size: .8125rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--fg-faint); margin-bottom: .5rem; font-family: var(--font-body);
}
/* jump links to the category groups, shown in the /tuki hero */
.faq-toc { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.375rem; }
.faq-toc a {
  display: inline-block; padding: .3125rem .8125rem;
  border: 1px solid var(--rule); border-radius: 999px;
  font-size: .875rem; color: var(--fg-soft); text-decoration: none;
}
.faq-toc a:hover { color: var(--fg); border-color: var(--fg-faint); }
/* every question keeps its top hairline, the first one included */
.faq-item { padding-block: 1.5rem; border-top: 1px solid var(--rule); }
.faq-item h3 { font-size: 1.0625rem; margin-bottom: .5rem; }
.faq-item p { color: var(--fg-soft); font-size: .9375rem; margin: 0 0 .625rem; max-width: none; }
.faq-item p:last-child { margin-bottom: 0; }

/* a link standing alone as its own paragraph must reach 24px on its own
   (WCAG 2.5.8's inline exemption does not cover it) */
.standalone-link { display: inline-block; padding-block: .25rem; }

.sources-list { font-size: .875rem; color: var(--fg-soft); max-width: 72ch; padding-left: 1.125rem; margin-top: 1.25rem; }
.sources-list li { margin-bottom: .4375rem; }

.pcx-kicker { font-size: .6875rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--plus); margin: 0 0 .5rem; }
.pcx-card h3 { font-size: clamp(1.1875rem, 1.9vw, 1.5rem); line-height: 1.18; margin-bottom: .375rem; }
/* these must beat the global 64ch measure, or the text stops short of the
   screenshot and leaves a gap in the middle of the card */
.pcx-sub { font-size: .9375rem; font-weight: 600; color: var(--fg); margin-bottom: .75rem; max-width: none; }
.pcx-body { color: var(--fg-soft); font-size: .9375rem; line-height: 1.55; margin: 0; max-width: none; }

.shot { justify-self: center; }
.shot .phone { width: min(11rem, 48vw); padding: .375rem; border-radius: 1.5rem; }
.shot .phone img { border-radius: 1.2rem; }
/* concept features (offline, sharing) show the product mark as a medallion
   instead of a screenshot — the same mark the app's Plus carousel draws */
.shot-mark {
  width: min(11rem, 48vw); aspect-ratio: 1;
  border-radius: 50%;
  background: var(--plus-tint);
  display: grid; place-items: center;
}
.shot-mark::before {
  content: ""; width: 52%; aspect-ratio: 1;
  background-color: var(--plus);
  -webkit-mask: var(--mark) no-repeat center / contain;
          mask: var(--mark) no-repeat center / contain;
}
.shot-offline { --mark: url("/assets/img/mark-offline.svg?v=72e88626"); }
.shot-sharing { --mark: url("/assets/img/mark-sharing.svg?v=cbd2d74e"); }

/* arrows ride in the peek gutters, at every width */
.pcx-arrow {
  position: absolute; top: calc(50% + 1.25rem); transform: translateY(-50%);
  z-index: 2;
  width: 2.75rem; height: 2.75rem; display: grid; place-items: center;
  border: 1px solid var(--card-line); border-radius: 50%;
  background: var(--card-bg); color: var(--fg); cursor: pointer;
  box-shadow: var(--shadow-card);
  transition: border-color .12s ease, color .12s ease, opacity .12s ease;
}
.pcx-arrow:hover:not([disabled]) { border-color: var(--plus); color: var(--plus); }
.pcx-arrow[disabled] { opacity: 0; pointer-events: none; }
.pcx-arrow svg { width: 1.0625rem; height: 1.0625rem; }
.pcx-arrow-prev { left: max(0px, calc(var(--pcx-peek) - 1.375rem)); }
.pcx-arrow-next { right: max(0px, calc(var(--pcx-peek) - 1.375rem)); }
@media (max-width: 619px) { .pcx-arrow { width: 2.25rem; height: 2.25rem; } }

.pcx-dots { display: flex; justify-content: center; gap: .25rem; margin-top: 1rem; }
.pcx-dots button {
  width: 2rem; height: 2rem; display: grid; place-items: center;
  background: none; border: 0; padding: 0; cursor: pointer;
}
.pcx-dots button::before {
  content: ""; width: .5rem; height: .5rem; border-radius: 999px;
  background: var(--rule); transition: width .18s ease, background-color .18s ease;
}
.pcx-dots button:hover::before { background: var(--fg-faint); }
.pcx-dots button[aria-current="true"]::before { background: var(--plus); width: 1.375rem; }

/* below 620px the carousel becomes a stacked accordion (site.js collapses the
   cards; with JS off the stacked list simply shows everything) */
@media (max-width: 619px) {
  .pcx-track {
    display: block; overflow: visible;
    scroll-snap-type: none;
    padding-inline: 0;
    -webkit-mask-image: none; mask-image: none;
  }
  .pcx-card + .pcx-card { margin-top: .75rem; }
  .pcx-arrow, .pcx-dots { display: none; }
  /* the section eyebrow already says Plus — seven repeats of it is noise */
  .pcx-kicker { display: none; }
  .pcx-inner { gap: 2rem; }
  .pcx-card.pcx-closed .pcx-body,
  .pcx-card.pcx-closed .shot { display: none; }
  .pcx-card.pcx-closed .pcx-sub { margin-bottom: 0; }
  /* the button stays static so its pseudo-elements anchor to the card: the
     chevron to its corner, and — while collapsed — a stretched overlay that
     makes the whole card the tap target */
  .pcx-card { position: relative; }
  .pcx-toggle {
    display: block; width: 100%; text-align: left;
    background: none; border: 0; padding: 0 2rem 0 0; cursor: pointer;
    font: inherit; color: inherit;
    -webkit-tap-highlight-color: transparent;
  }
  .pcx-toggle::after {
    content: ""; position: absolute; right: 1.375rem; top: 1.625rem;
    width: .5rem; height: .5rem;
    border-right: 2px solid var(--fg-faint);
    border-bottom: 2px solid var(--fg-faint);
    transform: rotate(45deg);
  }
  .pcx-toggle[aria-expanded="true"]::after { top: 1.875rem; transform: rotate(225deg); }
  .pcx-card.pcx-closed .pcx-toggle::before { content: ""; position: absolute; inset: 0; }
  /* the tagline forwards its clicks to the toggle (site.js); without JS there
     is no toggle and the tagline is plain text */
  .pcx-card:has(.pcx-toggle) .pcx-sub { cursor: pointer; -webkit-tap-highlight-color: transparent; }
}

/* ---------- trust & rating ---------- */
.trust { margin: 1.125rem 0 0; color: var(--fg-soft); max-width: 68ch; }
.rating-head { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; margin-bottom: 2.5rem; }
.trust + .rating-head { margin-top: clamp(2rem, 4vw, 3rem); }
.rating-score { display: flex; align-items: center; gap: .875rem; }
.rating-number { font-family: var(--font-display); font-weight: 700; font-size: clamp(2rem, 3.6vw, 2.75rem); line-height: 1; letter-spacing: -0.03em; }
.stars-lg svg { width: 1.375rem; height: 1.375rem; }
.rating-meta { display: flex; flex-wrap: wrap; gap: .25rem 1.75rem; color: var(--fg-soft); font-size: .9375rem; margin: .375rem 0 0; }
/* ---------- pricing ---------- */
.price-plan { font-size: .8125rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--plus); margin-bottom: .625rem; }
.price-grid { display: grid; gap: 1.25rem; max-width: 800px; margin-top: 2rem; }
@media (min-width: 680px) { .price-grid { grid-template-columns: 1fr 1fr; } }
.price-card {
  border: 1px solid var(--card-line); border-radius: var(--radius-lg);
  background: var(--card-bg); padding: 1.75rem; position: relative;
  box-shadow: var(--shadow-card);
}
.price-card.best { border-color: var(--plus); border-width: 2px; }
.price-amount { font-family: var(--font-display); font-weight: 700; font-size: 2.5rem; letter-spacing: -0.03em; line-height: 1; }
.price-period { font-size: 1.75rem; font-weight: 600; color: var(--fg-soft); margin-left: .3125rem; }
.price-per { color: var(--fg-soft); font-size: .9375rem; margin-top: .5rem; }
.price-trial { margin-top: .75rem; font-size: .9375rem; font-weight: 600; color: var(--brand); }
.price-sub { color: var(--fg-faint); font-size: .875rem; margin-top: .75rem; }
.price-tag {
  position: absolute; top: -.6875rem; left: 1.5rem;
  background: var(--plus); color: var(--on-plus);
  font-size: .625rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  padding: .25rem .5625rem; border-radius: 4px;
}
.price-fine { font-size: .875rem; color: var(--fg-faint); margin-top: 1.5rem; }

/* ---------- footer ---------- */
/* brand green, bookending the header */
.site-footer {
  background: var(--header-bg);
  color: var(--header-fg-soft);
  padding-block: 2.25rem 2.5rem;
  font-size: .875rem;
}
.site-footer .lockup { color: var(--header-fg); }
/* narrow: identity, link lists, then language and legal; wide: language and
   legal tuck under the logo in the first column */
.footer-grid {
  display: grid; gap: 1.75rem; align-items: start;
  grid-template-areas: "brand" "app" "support" "meta";
}
.footer-brand   { grid-area: brand; }
.footer-app     { grid-area: app; }
.footer-support { grid-area: support; }
.footer-meta    { grid-area: meta; }
@media (min-width: 760px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
    grid-template-areas:
      "brand app support"
      "meta  app support";
    grid-template-rows: auto 1fr;
    row-gap: 1.25rem;
  }
}
.footer-grid h3 { font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--header-fg-soft); opacity: .75; font-family: var(--font-body); font-weight: 600; margin-bottom: .75rem; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; }
/* padding rather than gap, so each link is a >=24px tap target (WCAG 2.5.8) */
.footer-links a { color: var(--header-fg-soft); text-decoration: none; display: inline-block; padding-block: .4375rem; }
.footer-links a:hover { color: var(--header-fg); text-decoration: underline; }
.footer-tagline { color: var(--header-fg-soft); margin: .875rem 0 0; max-width: 30ch; opacity: .85; }
.footer-lang { margin: 0; font-size: .8125rem; color: var(--header-fg-soft); }
.footer-lang a { color: var(--header-fg-soft); text-decoration: none; display: inline-block; padding-block: .375rem; }
.footer-lang a:hover { color: var(--header-fg); text-decoration: underline; }
.footer-lang [aria-current="true"] { color: var(--header-fg); font-weight: 600; }
.footer-legal { margin: .5rem 0 0; color: var(--header-fg-soft); opacity: .75; font-size: .8125rem; line-height: 1.5; }
/* the company-name link inherits the muted footer colour — brand green would
   be unreadable on the green footer */
.footer-legal a { color: inherit; text-decoration: none; }
.footer-legal a:hover { color: var(--header-fg); text-decoration: underline; }

/* ---------- 404 ---------- */
.notfound { text-align: center; }
.notfound h1, .notfound .lede, .notfound .eyebrow { margin-inline: auto; }
.notfound .cta-row { justify-content: center; }
.notfound-art { color: var(--brand); width: 290px; max-width: 100%; margin: 0 auto 1.5rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .btn:hover { transform: none; }
  .pcx-track { scroll-behavior: auto; }
}
