/* Site pages (home, How it works): headings, colour slabs, store badges,
   phone frame, steps, map. Values from tokens.css; design variant A, with the
   design's container units as viewport units. Brand-neutral: no product
   names or copy in here. Breakpoints: 760px phone, 1000px desktop. */

.h1 {
  font-weight: 800;
  font-size: var(--t-display);
  line-height: .98;
  letter-spacing: -.04em;
  margin: 0;
  overflow-wrap: break-word;
  isolation: isolate;
}
.h2 {
  font-weight: 800;
  font-size: var(--t-h2);
  line-height: 1.02;
  letter-spacing: -.03em;
  margin: 0;
  overflow-wrap: break-word;
}
.h3 { font-weight: 700; font-size: var(--t-title); line-height: 1.2; letter-spacing: -.01em; margin: 0; }
.lead { font-size: var(--t-lead); max-width: 32em; margin: 0; }

/* The one highlighted fragment of a heading, by background:
   cream, yellow/mint/blue, pink and the photo hero (light weight), graphite.
   The pages put it on a line of its own. The light accent keeps the
   graphite and contrasts by weight: 400 is the lightest the bundled
   Manrope serves. */
.acc { color: var(--c-lost); }
.acc-d { color: var(--c-lost-deep); }
.acc-light { color: var(--c-ink); font-weight: 400; letter-spacing: -.01em; }
.acc-p { color: var(--c-lost-on-ink); }

.link { font-weight: 700; text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: 2px; }

/* Official store badges, never redrawn; the QR code only on desktop. */
.badges { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.badge { display: inline-flex; min-height: var(--tap); }
.badge img { display: block; height: 48px; width: auto; }
/* The Google badge file carries its own clear space (a third of its height):
   scaled so its visible part matches the 48px Apple badge, trimmed on every
   side so it lines up with the Apple badge. */
.badge img[src$=".png"] { height: 72px; margin: -12px; }
/* The translated Google badges carry clear space only above and below (29 of
   250px, no side space): 62.5px tall shows 48px of badge, trimmed top and
   bottom only. layout.mjs adds the class to those files. */
.badge img.badge-tight { height: 62.5px; margin: -7.25px 0; }
.qr { display: none; width: 96px; height: 96px; }

/* App screenshot in a phone frame (the one rounded exception). */
.phone {
  width: 280px;
  max-width: 100%;
  aspect-ratio: 760 / 1645;
  border: 10px solid var(--c-ink);
  border-radius: 44px;
  overflow: hidden;
  background: var(--c-ink);
  flex: none;
}
.phone img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Full-bleed split slabs (home hero, How it works intro): backgrounds run to
   the viewport edges, content sits in the container. Columns: left bleed,
   7/12 and 5/12 of the container, right bleed. --bleed is the width of one
   bleed column, so content padding is --bleed + --gutter. */
.hero, .intro {
  --bleed: max(0px, (100vw - var(--container)) / 2);
  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    min(calc(100% * 7 / 12), calc(var(--container) * 7 / 12))
    min(calc(100% * 5 / 12), calc(var(--container) * 5 / 12))
    minmax(0, 1fr);
  border-top: var(--rule);
  border-bottom: var(--rule);
}

/* Hero: the photo slab with the h1, and a side column. */
.hero-slide {
  grid-column: 1 / 3;
  position: relative;
  min-height: 880px;
  overflow: hidden;
  background: var(--c-slab-pink);
  border-right: var(--rule);
}
/* Landscape photo from 761px, a portrait crop below (see <picture>): the
   object sits right and low, the heading over the plain pink. */
.hero-slide > picture { position: absolute; inset: 0; }
.hero-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 84% 50%;
}
.hero-text { position: relative; padding: 56px 56px 0 calc(var(--bleed) + var(--gutter)); }
.hero-text .mono { margin-bottom: 20px; }
/* Stops growing once the column stops (container width), so the heading
   keeps its two designed lines on wide screens. */
.hero-text .h1 { font-size: clamp(46px, 6.6vw, 84px); }
/* The hero's light second line is smaller than the first at every width and
   stays on one line from the tablet layout up. */
.hero-text .acc-light { font-size: .62em; white-space: nowrap; }
/* Phones: scale with the viewport so the line always fits the 16px gutters. */
@media (max-width: 760px) {
  .hero-text .acc-light { font-size: min(.62em, calc((100vw - 40px) / 13)); }
}
/* Translations of the line run longer than the English one: let them wrap,
   in balanced lines, instead of clipping. */
html:not([lang="en"]) .hero-text .acc-light { white-space: normal; text-wrap: balance; }
.hero-side {
  grid-column: 3 / 5;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 32px;
  padding: 56px calc(var(--bleed) + var(--gutter)) 56px 48px;
}
.hero-side .phone { align-self: center; margin-top: auto; }

/* Sections and slabs */
.sec { padding: var(--section-pad) 0; }
.slab { border-top: var(--rule); border-bottom: var(--rule); }
.slab-yellow { background: var(--c-slab-yellow); }
.slab-blue { background: var(--c-slab-blue); }
.sec-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: var(--s-8);
}
.sec-head > div { display: flex; flex-direction: column; gap: 18px; max-width: 780px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: center; }
.split .h2 { margin-top: 18px; }
.split .lead { margin-top: var(--s-5); }
.split-phone { display: flex; justify-content: center; }

/* Three steps */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; margin: 0; padding: 0; list-style: none; }
.step { display: flex; flex-direction: column; gap: 14px; border-top: var(--rule-strong); padding-top: var(--s-5); }
.step p { margin: 0; }
.step .num { font-family: var(--f-mono); font-weight: 500; font-size: 64px; line-height: 1; letter-spacing: -.04em; }

/* Safety points */
.points { display: flex; flex-direction: column; gap: 28px; margin: 40px 0 0; padding: 0; list-style: none; }
.point { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 16px; border-top: var(--rule); padding-top: 20px; }
.point p { margin: 8px 0 0; }
.photo { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 80%; }

/* Conversation: chat bubbles on cream, straight corners, alternating sides.
   Owner on cream-dark, finder on an opaque light tint of the blue slab
   (ink text on both well above 4.5:1). */
.dialogue { display: flex; flex-direction: column; gap: 12px; margin: 40px 0 0; padding: 0; list-style: none; max-width: 520px; }
.msg { display: flex; flex-direction: column; gap: 6px; max-width: 80%; padding: 14px 18px; border: var(--rule); }
.msg-owner { align-self: flex-start; background: var(--c-paper-hover); }
.msg-finder { align-self: flex-end; background: color-mix(in srgb, var(--c-slab-blue) 35%, var(--c-paper)); }
.dialogue-status { margin: 20px 0 0; max-width: 520px; text-align: center; color: var(--c-found-text); }
.split .dialogue-note { margin-top: var(--s-6); }

/* Countries: tile-grid map and the list (the list is what assistive tech reads). */
.map { display: grid; grid-template-columns: repeat(7, 64px); grid-auto-rows: 64px; gap: 6px; }
.tile { display: flex; align-items: flex-end; padding: 6px 8px; font-family: var(--f-mono); font-weight: 500; font-size: 13px; }
.tile.on { background: var(--c-paper); border: var(--rule); }
.tile.off { border: 1.5px dashed var(--c-ink-muted); }
.clist { columns: 3; column-gap: 32px; margin: 40px 0 0; padding: 0; list-style: none; }
.clist li { display: flex; gap: 12px; padding: 8px 0; border-top: 1px solid var(--c-ink-muted); break-inside: avoid; }
.clist-guide { margin-left: auto; }

/* Download slab: graphite, the last section of a page. */
.dl { padding: var(--section-pad) 0; background: var(--c-slab-ink); color: var(--c-paper); }
.dl .wrap { display: flex; flex-direction: column; align-items: flex-start; gap: 28px; }
.dl a:focus-visible { outline-color: var(--c-paper); }
.dl-title { font-size: clamp(40px, 5.6vw, 84px); }

.ft-tagline { margin: 14px 0 0; max-width: 300px; }

/* Read by assistive tech only. */
.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* How it works: an intro slab with the Lost/Found switch, then the steps of
   the chosen state. site.js toggles `hidden` on [data-panel] and sets
   data-intro to the mode; without it the "lost" state shows and the switch
   is not offered. Both intro titles and both leads share one grid cell
   each (.swap); the inactive one is only invisible, so the cell keeps the
   height of the longer text and the intro does not jump on a switch. */
[data-panel][hidden] { display: none; }
.swap { display: grid; }
.swap > [data-panel] { grid-area: 1 / 1; }
.swap > [data-panel][hidden] { display: block; visibility: hidden; }
.intro { background: var(--c-slab-pink); }
.intro-blue { background: var(--c-slab-blue); }
.intro-mint { background: var(--c-slab-mint); }
.intro[data-intro="found"] { background: var(--c-slab-mint); }
.intro-text {
  grid-column: 1 / 3;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 28px;
  padding: 64px 56px 64px calc(var(--bleed) + var(--gutter));
}
.intro-text .h1 { font-size: clamp(46px, 6.2vw, 89px); }
.intro-text .lead { max-width: 30em; }
.intro-photo { grid-column: 3 / 5; position: relative; min-height: 620px; border-left: var(--rule); overflow: hidden; }
/* Centred on the object, so it stays in view however wide the bleed gets. */
.intro-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }

/* The switch: a visible label over a segmented control of two equal halves.
   The pressed half is filled and ticked, the other cream with its dot. */
.switch { display: none; flex-direction: column; gap: 12px; align-self: flex-start; }
.js .switch { display: flex; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; border: var(--rule); background: var(--c-paper); }
.tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 22px;
  border: 0;
  background: var(--c-paper);
  color: var(--c-ink);
  font: inherit;
  font-weight: 700;
  font-size: 17px;
  white-space: nowrap;
  cursor: pointer;
}
.tab + .tab { border-left: var(--rule); }
.tab[aria-pressed="false"]:hover { background: var(--c-paper-hover); }
/* Above the neighbouring half, so the focus ring shows on every side. */
.tab:focus-visible { position: relative; z-index: 1; }
/* Round per the Components sheet: an approved exception, like the phone frame. */
.tab .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.tab[data-mode="lost"] .dot { background: var(--c-lost); }
.tab[data-mode="found"] .dot { background: var(--c-found); }
/* A tick drawn from two borders, in the box of the dot it replaces. */
.tab .tick { display: none; position: relative; width: 10px; height: 14px; flex: none; }
.tab .tick::after {
  content: '';
  position: absolute;
  left: 2px;
  top: 0;
  width: 5px;
  height: 10px;
  border: solid currentColor;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}
.tab[aria-pressed="true"] { color: var(--c-paper); }
.tab[aria-pressed="true"] .dot { display: none; }
.tab[aria-pressed="true"] .tick { display: block; }
.tab[data-mode="lost"][aria-pressed="true"] { background: var(--c-lost); }
.tab[data-mode="found"][aria-pressed="true"] { background: var(--c-found-text); }

.flow-sec { padding-top: 24px; padding-bottom: 96px; }
.flow { margin: 0; padding: 0; list-style: none; }
.flow-step {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 64px;
  align-items: center;
  padding: 72px 0;
  border-bottom: var(--rule);
}
.flow-step:last-child { border-bottom: 0; }
.flow-text { display: flex; flex-direction: column; gap: 18px; max-width: 500px; }
.flow-text p { margin: 0; font-size: var(--t-lead); }
.flow-text .num { font-family: var(--f-mono); font-weight: 500; font-size: var(--t-number); line-height: .9; letter-spacing: -.05em; }
.flow-text .h3 { font-weight: 800; font-size: var(--t-h3); line-height: 1.08; letter-spacing: -.03em; }
.flow-pic { display: flex; justify-content: center; }
.flow-step:nth-child(even) .flow-text { order: 2; justify-self: end; width: 100%; }
.flow-step:nth-child(even) .flow-pic { order: 1; }

@media (min-width: 1000px) {
  .qr { display: block; }
}

/* The switch fills the narrow intro column below 1000px, with tighter
   halves so both labels stay on one line down to 360px. */
@media (max-width: 999px) {
  .switch { align-self: stretch; }
  .tab { gap: 6px; padding: 0 6px; font-size: 15px; }
}

/* Safety: six numbered protections. The list is full-width so the highlighted
   item can run edge to edge; each item's content sits in .wrap. */
.guard { margin: 0; padding: 0; list-style: none; }
.guard-item { border-bottom: var(--rule); padding: calc(var(--section-pad) * .6) 0; }
.guard-item:last-child { border-bottom: 0; }
.guard-in { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.guard-in > * { max-width: var(--measure); }
.guard-in .num { font-family: var(--f-mono); font-weight: 500; font-size: var(--t-number); line-height: .9; letter-spacing: -.05em; }
.guard-in p { margin: 0; }
.guard-points { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 10px; }
.guard-slab { background: var(--c-slab-yellow); }

/* Text-only page intro on paper (FAQ). */
.page-head { display: flex; flex-direction: column; gap: 22px; padding-top: 48px; padding-bottom: 40px; }
.page-head > * { max-width: var(--measure); }

/* FAQ: native <details name="faq">, the +/- marker drawn by two bars. The
   dividing line belongs to the item, so it runs the full width of the list
   whether the item is open or not; only the answer text is narrowed. site.js
   animates the item's height (overflow hidden) and adds `closing` while an
   item shuts, so the marker turns back to a plus at once. */
.faq-sec { padding-bottom: var(--section-pad); }
.faq { border-top: var(--rule-strong); }
.faq details { border-bottom: var(--rule-strong); overflow: hidden; }
.q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 72px;
  font-weight: 700;
  font-size: 20px;
  cursor: pointer;
  list-style: none;
}
.q::-webkit-details-marker { display: none; }
summary:focus-visible { outline: var(--focus-ring); outline-offset: -3px; }
.pm { position: relative; flex: none; width: 16px; height: 16px; }
.pm::before, .pm::after { content: ""; position: absolute; background: var(--c-ink); }
.pm::before { left: 0; right: 0; top: 7px; height: 2px; }
.pm::after { top: 0; bottom: 0; left: 7px; width: 2px; transition: transform .24s ease-out; }
details[open]:not(.closing) > .q .pm::after { transform: scaleY(0); }
.a { padding: 4px 0 28px; }
.a p { margin: 0; max-width: 640px; }
@media (prefers-reduced-motion: reduce) {
  .pm::after { transition: none; }
}

/* Contact: one ruled row per address, like the FAQ; two columns from 761 px. */
.contact-sec { padding-bottom: var(--section-pad); }
.contacts { margin: 0; padding: 0; list-style: none; border-top: var(--rule-strong); }
.contacts li { display: flex; flex-direction: column; gap: 16px; padding: 28px 0; border-bottom: var(--rule-strong); }
.contact-info { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; max-width: 640px; }
.contact-info h2, .contact-info p { margin: 0; }
.contact-mail { display: inline-flex; align-items: center; min-height: var(--tap); font-weight: 700; font-size: 22px; overflow-wrap: anywhere; }
@media (min-width: 761px) {
  .contacts li { flex-direction: row; justify-content: space-between; align-items: baseline; gap: 32px; }
  .contact-mail { max-width: 45%; text-align: right; }
}

/* Read next, between the steps and the download slab. */
.read-next { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding-top: 24px; padding-bottom: var(--section-pad); }
.read-next .mono { margin: 0; }

/* Guide article: text up to the measure; steps numbered by a counter (the
   <ol> carries the order for screen readers); note on a mint tint, warning
   on yellow, both ruled and square. */
.art-checked { color: var(--c-ink-muted); }
.art-body { display: flex; flex-direction: column; gap: var(--s-8); padding-bottom: var(--section-pad); }
.article { max-width: var(--measure); }
.art-body h2 { font-weight: 800; font-size: var(--t-h3); line-height: 1.08; letter-spacing: -.03em; margin: 0 0 var(--s-4); overflow-wrap: break-word; }
.article h2:not(:first-child) { margin-top: var(--s-8); }
.article p, .article ul, .article ol { margin: 0 0 var(--s-4); }
.article li + li { margin-top: var(--s-2); }
.article a { overflow-wrap: anywhere; }
.art-steps { list-style: none; padding: 0; counter-reset: step; display: flex; flex-direction: column; gap: var(--s-5); }
.art-steps li { counter-increment: step; border-top: var(--rule); padding-top: var(--s-4); }
.art-steps li + li { margin-top: 0; }
.art-steps h3 { display: flex; gap: 12px; margin: 0 0 var(--s-2); font-weight: 700; font-size: var(--t-title); line-height: 1.2; letter-spacing: -.01em; overflow-wrap: anywhere; }
.art-steps h3::before { content: counter(step, decimal-leading-zero); flex: none; font-family: var(--f-mono); font-weight: 500; }
.art-steps p { margin: 0; }
.art-box { border: var(--rule); padding: var(--s-5); margin: 0 0 var(--s-4); }
.art-box p:last-child { margin: 0; }
.art-box-t { font-weight: 700; }
.art-note { background: color-mix(in srgb, var(--c-slab-mint) 35%, var(--c-paper)); }
.art-warn { background: var(--c-slab-yellow); }
.art-country { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-3); border: var(--rule); padding: var(--s-5); }
.art-country h2, .art-country p { margin: 0; }

/* Country guide: source markers as small numbered links (consecutive ones
   split by `.sep`), and the numbered sources list; the source a marker jumps
   to is highlighted. */
.page-head sup, .art-body sup { font-size: .7em; line-height: 0; }
.page-head sup a, .art-body sup a { padding: 0 1px; text-decoration: none; font-weight: 700; }
.page-head sup a:hover, .art-body sup a:hover { text-decoration: underline; }
.art-sources ol { padding-left: 1.5em; }
.art-sources li { overflow-wrap: anywhere; }
.art-sources li:target { background: var(--c-slab-yellow); }
.art-sources .mono { color: var(--c-ink-muted); }

/* Article cards: title and one line, ruled on top (Components sheet, 09). */
.cards { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-6); }
.card { display: flex; flex-direction: column; gap: 12px; border-top: var(--rule-strong); padding-top: 20px; }
.card-t { margin: 0; font-weight: 700; font-size: var(--t-title); line-height: 1.2; letter-spacing: -.01em; overflow-wrap: anywhere; }
.card-t a { text-decoration: none; }
.card-t a:hover { color: var(--c-lost); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .15em; }
.card p { margin: 0; }
@media (min-width: 761px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1001px) {
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .q { font-size: 18px; }
  .page-head { padding-top: 32px; padding-bottom: 28px; }
  .art-box, .art-country { padding: var(--s-4); }
  .hero, .intro { grid-template-columns: minmax(0, 1fr); }
  .hero { border-top: 0; }
  .hero-slide, .hero-side, .intro-text, .intro-photo { grid-column: auto; }
  .hero-slide { min-height: 0; aspect-ratio: 2 / 3; border-right: 0; border-bottom: var(--rule); }
  .hero-text { padding: 28px var(--gutter) 0; }
  .hero-side { gap: 28px; padding: 32px var(--gutter) 48px; }
  .phone { width: 240px; border-width: 8px; border-radius: 36px; }
  .sec-head { margin-bottom: 36px; }
  .steps { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .step .num { font-size: 48px; }
  .split { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .msg { max-width: 88%; }
  .map { grid-template-columns: repeat(7, minmax(0, 1fr)); grid-auto-rows: auto; }
  .tile { aspect-ratio: 1; padding: 3px 4px; font-size: 11px; }
  .clist { columns: 2; }
  .intro-text { padding: 32px var(--gutter) 40px; gap: 22px; }
  .intro-photo { min-height: 0; aspect-ratio: 4 / 3; border-left: 0; border-bottom: var(--rule); order: -1; }
  .flow-sec { padding-top: 0; padding-bottom: 64px; }
  .flow-step { grid-template-columns: minmax(0, 1fr); gap: 28px; padding: 48px 0; }
  .flow-step:nth-child(even) .flow-text, .flow-step:nth-child(even) .flow-pic { order: 0; }
}
