/* PhoneInfoga web client: a single light theme, with a clean, modern SaaS
   look. */

:root {
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "Cascadia Code", Menlo, Consolas, "Liberation Mono", monospace;
  --font-display: var(--font-sans);

  --bg: #ffffff;
  --bg-alt: #f6f8fc;
  --surface: #ffffff;
  --surface-2: #f2f5fa;
  --text: #0f172a;
  --text-muted: #526075;
  --border: #e2e8f0;
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-contrast: #ffffff;
  --primary-soft: #eef2ff;
  --focus: #4f46e5;
  --success: #15803d;
  --success-bg: #dcfce7;
  --danger: #b91c1c;
  --danger-bg: #fee2e2;
  --warning: #a16207;
  --warning-bg: #fef3c7;
  --neutral: #475569;
  --neutral-bg: #e2e8f0;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 2px 4px rgba(15, 23, 42, 0.04), 0 20px 50px rgba(79, 70, 229, 0.14);
  --header-bg: rgba(255, 255, 255, 0.85);
  --hero-bg:
    radial-gradient(900px 420px at 15% -10%, rgba(99, 102, 241, 0.16), transparent 60%),
    radial-gradient(800px 380px at 95% 10%, rgba(14, 165, 233, 0.14), transparent 60%),
    linear-gradient(#ffffff, #f8faff);
  --h1-color: var(--text);
  --eyebrow-color: var(--primary);
  --eyebrow-bg: var(--primary-soft);
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23526075' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  color-scheme: light;
}

/* Clerk's sign-in forms and account menu (when user accounts are enabled)
   take the colors and the font of the site, through the CSS variables that
   Clerk's components read. */
:root {
  --clerk-color-primary: var(--primary);
  --clerk-color-primary-foreground: var(--primary-contrast);
  --clerk-color-danger: var(--danger);
  --clerk-color-success: var(--success);
  --clerk-color-warning: var(--warning);
  --clerk-color-background: var(--surface);
  --clerk-color-foreground: var(--text);
  --clerk-color-muted-foreground: var(--text-muted);
  --clerk-color-input: var(--surface);
  --clerk-color-input-foreground: var(--text);
  --clerk-color-neutral: var(--text);
  --clerk-color-ring: var(--focus);
  --clerk-font-family: var(--font-sans);
  --clerk-border-radius: 0.5rem;
}

/* ---------------------------------------------------------------------------
   Base */

* { box-sizing: border-box; }

/* scroll-padding-top keeps focused elements and anchor targets clear of
   the sticky header (64px plus its border). */
html { scroll-behavior: smooth; scroll-padding-top: 72px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); }
a:hover { color: var(--primary-hover); }

img, svg { display: block; }

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.2;
  margin: 0 0 12px;
  letter-spacing: -0.015em;
}

h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
h3 { font-size: 1.08rem; }
p { margin: 0 0 12px; }

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

.container.narrow { max-width: 820px; }

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: var(--primary-contrast);
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

/* ---------------------------------------------------------------------------
   Header & footer */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}

/* Three columns: the site name on the left, the menu in the middle and the
   buttons on the right. The two side columns share the rest of the width
   equally, so the menu sits at the center of the header even though the
   name and the buttons differ in width. */
.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  height: 64px;
}

.header-inner > .brand { justify-self: start; }

/* The logo (web/static/logo.svg, drawn by docs/logo.go) and the site name
   in bold with a little letter spacing, like the PhoneInfoga banner. */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  color: var(--text);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  text-decoration: none;
}
.brand:hover { color: var(--text); }

.site-nav {
  display: flex;
  grid-column: 2;
  gap: 22px;
}

.site-nav a {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--text); }

.header-actions {
  display: flex;
  flex: none;
  grid-column: 3;
  justify-self: end;
  align-items: center;
  gap: 8px;
}

/* Language selector: a <details> menu that works without JavaScript
   (app.js closes it on Escape and on outside clicks). */
.lang-menu { position: relative; }

.lang-menu summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
  user-select: none;
}
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu[open] summary { border-color: var(--primary); }

/* Flags (static/vendor/flag-icons, 4:3), next to the languages and the
   countries. The thin ring keeps the white parts of a flag visible on a
   white background. */
.flag {
  flex: none;
  width: 20px;
  height: 15px;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.12);
}

.lang-list,
.nav-list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  min-width: 210px;
  margin: 0;
  padding: 6px;
  list-style: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.lang-list a,
.nav-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.lang-list a:hover,
.nav-list a:hover { background: var(--surface-2); color: var(--text); }
.lang-list a[aria-current="page"],
.nav-list a[aria-current="page"] { color: var(--primary); }
.lang-list a[aria-current="page"]::after { content: "✓"; margin-left: auto; }

/* Menu button of the phones: below 760px the header has no room for the
   links of the menu (home, guides, credits), so this button opens them in
   a list like the languages. A <details> element too, closed by app.js on
   Escape and on outside clicks. The icon becomes a cross while open. */
.nav-menu { position: relative; display: none; }

.nav-menu summary {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  list-style: none;
  cursor: pointer;
  user-select: none;
}
.nav-menu summary::-webkit-details-marker { display: none; }
.nav-menu[open] summary { border-color: var(--primary); }

.nav-menu svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}
.nav-menu .nav-menu-close,
.nav-menu[open] .nav-menu-open { display: none; }
.nav-menu[open] .nav-menu-close { display: inline; }

/* Account (when user accounts are enabled): a "Sign in" button, replaced
   by Clerk's avatar button once signed in. Clerk's sign-in form links to
   its sign-up form. */
.account {
  position: relative;
  display: flex;
  align-items: center;
}

.account-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}
.account-button:hover { border-color: var(--primary); }
.account-button svg {
  display: none;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.account[aria-busy="true"] .account-button { cursor: progress; opacity: 0.7; }

/* boot.js sets data-account before the page is painted for a visitor who
   signed in: a circle keeps the place of the avatar until Clerk shows it. */
.account-user { display: none; }
[data-account="signed-in"] .account-button { display: none; }
[data-account="signed-in"] .account-user {
  display: grid;
  place-items: center;
  min-width: 32px;
  min-height: 32px;
}
[data-account="signed-in"] .account-user:empty {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
}

.account-error {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  width: max-content;
  max-width: min(320px, calc(100vw - 32px));
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--danger);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--danger);
  font-size: 0.85rem;
  line-height: 1.4;
  box-shadow: var(--shadow-lg);
}

/* The window that asks a visitor who is not signed in to sign in before
   their search runs (a modal <dialog>). Its body fills the whole box, so
   that a click whose target is the dialog itself lands on the backdrop. */
.prompt {
  width: min(440px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100vh - 32px);
  margin: auto;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-lg);
}
/* The backdrop does not inherit the CSS variables in every browser. */
.prompt::backdrop { background: rgba(15, 23, 42, 0.55); }
:root:has(.prompt[open]) { overflow: hidden; }

.prompt-body {
  position: relative;
  padding: 28px 24px 24px;
}
.prompt h2 {
  margin: 0 36px 10px 0;
  font-size: 1.3rem;
}
.prompt p {
  margin: 0;
  color: var(--text-muted);
}

.prompt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}
.prompt-actions .button { flex: 1 1 auto; }
.prompt[aria-busy="true"] .prompt-actions .button { cursor: progress; opacity: 0.7; }

.prompt-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}
.prompt-close:hover { background: var(--surface-2); color: var(--text); }
.prompt-close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.prompt .prompt-error {
  margin-top: 14px;
  color: var(--danger);
  font-size: 0.9rem;
}

/* Exactly centered, the menu (home, guides and credits) needs up to about
   775px in the longest language (German, with the "Sign in" button).
   Narrower, the grid keeps the site name whole and moves the menu a few
   pixels right of the center, and the header only runs out of room below
   about 730px: below 760px it goes back to one row, the site name and the
   buttons, and the links move into the menu button. Each new link widens
   the menu, so measure again and raise this limit when the menu gets one. */
@media (max-width: 760px) {
  .header-inner { display: flex; gap: 12px; }
  .site-nav { display: none; }
  .nav-menu { display: block; }
  .header-actions { margin-left: auto; }
}

/* Phones: the language button keeps only its flag (its accessible name
   still gives the language), and on the narrowest screens the site name
   wraps on two lines instead of pushing the buttons off the screen. */
@media (max-width: 420px) {
  .brand { font-size: 1.05rem; white-space: normal; line-height: 1.15; }
  .lang-menu summary { justify-content: center; width: 40px; padding: 0; }
  .lang-menu summary span { display: none; }
}

/* On phones, the "Sign in" button keeps only its icon (its text stays its
   accessible name). */
@media (max-width: 520px) {
  .account-button { width: 40px; padding: 0; }
  .account-button svg { display: block; }
  .account-button span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

/* The narrowest phones (folded Galaxy Fold, first iPhone SE): next to the
   three buttons, even the site name on two lines needs 335px, so the
   header keeps only the logo there (the name stays the accessible name of
   the link). */
@media (max-width: 340px) {
  .site-header .brand span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text-muted);
  font-size: 0.88rem;
  padding: 40px 0 48px;
}

.footer-inner { display: grid; gap: 16px; }
.footer-brand p { margin-top: 10px; max-width: 520px; }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-weight: 600;
}
.footer-links a { color: var(--text); }
.footer-legal { font-weight: 400; font-size: 0.84rem; }
.footer-legal a { color: var(--text-muted); }
.footer-legal a[aria-current="page"] { color: var(--text); }
.disclaimer { max-width: 900px; font-size: 0.82rem; }
.footer-meta { margin: 0; }

/* ---------------------------------------------------------------------------
   Buttons */

.button,
.search > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: var(--primary-contrast);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.button:hover,
.search > button:hover:not(:disabled) {
  background: var(--primary-hover);
  color: var(--primary-contrast);
}

.search > button:disabled { opacity: 0.6; cursor: not-allowed; }

/* A second choice next to a button, such as the guides on the 404 page. */
.button-secondary {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}
.button-secondary:hover {
  border-color: var(--primary);
  background: var(--surface);
  color: var(--text);
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

/* ---------------------------------------------------------------------------
   Hero & search */

.hero {
  background: var(--hero-bg);
  border-bottom: 1px solid var(--border);
  padding: 72px 0 64px;
  text-align: center;
}

.hero-small { padding: 96px 0; }

.hero-inner { max-width: 980px; }

.eyebrow {
  display: inline-block;
  margin-bottom: 18px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--eyebrow-bg);
  color: var(--eyebrow-color);
  font-size: 0.85rem;
  font-weight: 700;
}

.hero h1 {
  font-size: clamp(2.3rem, 6vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--h1-color);
  margin-bottom: 16px;
}

.hero-lead {
  max-width: 680px;
  margin: 0 auto 32px;
  color: var(--text-muted);
  font-size: clamp(1.05rem, 2vw, 1.2rem);
}

.search {
  display: flex;
  align-items: stretch;
  gap: 8px;
  max-width: 760px;
  margin: 0 auto;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  text-align: left;
}

.search > input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 12px 14px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 1.05rem;
}

.search > input:focus { outline: none; }

.search:focus-within { border-color: var(--primary); }

/* Country of the search box (app.js): a button with the flag and the name
   of the selected country, as wide as that name (long names end with an
   ellipsis), which opens the list of the countries under the search box.
   The <select> it stands for stays hidden. */
.country {
  position: relative;
  display: flex;
  flex: 0 1 auto;
  min-width: 0;
}

.country-button {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  max-width: 350px;
  padding: 12px 42px 12px 16px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--surface-2) var(--select-arrow) no-repeat right 16px center / 12px 8px;
  color: var(--text);
  font: inherit;
  font-size: 1.05rem;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}
.country-button span { overflow: hidden; text-overflow: ellipsis; }
.country-button:disabled { color: var(--text-muted); cursor: default; }
.country-button:focus { outline: none; }
.country-button:focus-visible,
.country-button[aria-expanded="true"] { box-shadow: inset 0 0 0 2px var(--primary); }
.flag[hidden] { display: none; }

.country-popup {
  position: absolute;
  top: calc(100% + 17px);
  left: -9px;
  z-index: 45;
  width: 380px;
  max-width: calc(100vw - 32px);
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}
.country-popup[hidden] { display: none; }

.country-search {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
}
.country-search:focus { outline: none; border-color: var(--primary); }

.country-list {
  position: relative;
  max-height: min(320px, 45vh);
  margin: 6px 0 0;
  padding: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  list-style: none;
}
.country-list[hidden] { display: none; }

.country-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
}
.country-list li[hidden] { display: none; }
.country-list li.is-active { background: var(--surface-2); }
.country-list li[aria-selected="true"] { color: var(--primary); font-weight: 700; }

.country-option-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.country-option-code {
  flex: none;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.country-empty {
  margin: 12px 4px 6px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.search > button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
}

.search-hint {
  margin: 14px auto 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 28px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 600;
}

.hero-trust li::before {
  content: "✓";
  margin-right: 8px;
  color: var(--success);
  font-weight: 800;
}

@media (max-width: 640px) {
  .hero { padding: 48px 0 44px; }
  .search { flex-direction: column; }
  /* Stacked layout: the country takes the full width, and its list opens
     right under it, as wide as the search box. */
  .country-button { max-width: none; }
  .country-popup { top: calc(100% + 8px); right: -9px; width: auto; max-width: none; }
  .search > button { padding: 14px; }
}

/* ---------------------------------------------------------------------------
   Results */

.results-wrap { padding-top: 8px; }
.results-wrap:has(#results:empty):has(#alert[hidden]):has(#loading[hidden]) { padding-top: 0; }

.results { scroll-margin-top: 8px; }
.results > :first-child { margin-top: 32px; }
.results > :last-child { margin-bottom: 24px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  margin-bottom: 16px;
}

.alert {
  margin: 24px 0 0;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent);
}

/* A message that is not an error, such as a payment received. */
.notice {
  margin: 24px 0 0;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: var(--success-bg);
  color: var(--text);
  border: 1px solid color-mix(in srgb, var(--success) 35%, transparent);
}

/* ---------------------------------------------------------------------------
   Paid reports: the locked report, blurred, and the purchase windows. */

/* The values of a locked report are placeholders, never real results: the
   server does not send them before the report is paid. */
.blurred {
  filter: blur(5px);
  user-select: none;
}

.unlock-panel {
  margin-top: 24px;
  border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
  box-shadow: var(--shadow-lg);
}
.unlock-panel h2 { margin-bottom: 6px; font-size: 1.3rem; }
.unlock-panel p { color: var(--text-muted); }
.unlock-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-top: 14px;
}
.unlock-balance { color: var(--text-muted); font-size: 0.9rem; }
.unlock-actions .button:disabled { cursor: progress; opacity: 0.7; }

.scanner-locked .teaser {
  margin: 0 0 10px;
  font-weight: 600;
}
.locked-lines p {
  margin: 0 0 6px;
  overflow: hidden;
  color: var(--text-muted);
  white-space: nowrap;
}
.locked-lines p:nth-child(2) { width: 70%; }
.locked-lines p:nth-child(3) { width: 45%; }

.offers {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.offer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 12px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.offer:hover { border-color: var(--primary); }
.offer-main {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.offer-title { font-weight: 700; }
.offer-price {
  grid-row: span 2;
  align-self: center;
  font-size: 1.15rem;
  font-weight: 800;
  white-space: nowrap;
}
.offer-note { color: var(--text-muted); font-size: 0.88rem; }

/* Stripe's form needs room: the payment window is wider, and scrolls. */
.prompt.prompt-checkout {
  width: min(600px, calc(100vw - 32px));
  overflow-y: auto;
}
.checkout-summary { font-weight: 600; }
.checkout-frame { margin-top: 16px; min-height: 120px; }
.checkout-loading { color: var(--text-muted); }
/* What paying means for the right of withdrawal, above Stripe's form. */
.checkout-notice { margin: 8px 0 0; color: var(--text-muted); font-size: 0.88rem; line-height: 1.5; }
.checkout-frame:empty { min-height: 0; }

/* ---------------------------------------------------------------------------
   Credits page: the balance, the packs and how credits work. */

.credits { padding: 36px 0 64px; }
.credits h1 {
  margin: 0 0 12px;
  font-size: clamp(1.9rem, 4.5vw, 2.6rem);
}
.credits-lead { font-size: 1.12rem; }

/* The balance card shows one state at a time, set by app.js. */
.balance { margin: 24px 0 0; }
.balance h2 {
  margin: 0 0 6px;
  color: var(--text-muted);
  font-size: 1rem;
}
.balance > p,
.balance-signed-out { display: none; margin: 0; }
.balance[data-state="loading"] .balance-loading,
.balance[data-state="signed-in"] .balance-value,
.balance[data-state="signed-out"] .balance-signed-out,
.balance[data-state="error"] .balance-error { display: block; }
.balance-loading { color: var(--text-muted); }
.balance-value {
  font-size: 1.8rem;
  font-weight: 800;
}
.balance-signed-out p { margin: 0 0 12px; }
.balance-error { color: var(--danger); }

.credits-heading {
  margin: 44px 0 16px;
  font-size: clamp(1.3rem, 2.6vw, 1.6rem);
}

/* The rows leave room for the discounts, which sit on the top edge of the
   cards. */
.packs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px 16px;
}
.packs-loading { margin: 0; color: var(--text-muted); }

.pack {
  position: relative;
  display: flex;
  flex-direction: column;
  margin: 0;
}

/* How much cheaper the credit of a pack is than the one of the first pack.
   Its background is opaque (the tint over the card colour), so that the
   edge of the card does not show through it. */
.pack-discount,
.offer-discount {
  padding: 1px 9px;
  border: 1px solid color-mix(in srgb, var(--success) 40%, transparent);
  border-radius: 999px;
  background: linear-gradient(var(--success-bg), var(--success-bg)), var(--surface);
  color: var(--success);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
}
.pack-discount {
  position: absolute;
  top: 0;
  right: 14px;
  transform: translateY(-50%);
}
.offer-discount { margin-left: 8px; }
.pack-title { margin: 0; font-size: 1.15rem; }
.pack-price {
  margin: 6px 0 0;
  font-size: 1.6rem;
  font-weight: 800;
}
.pack-note {
  margin: 2px 0 16px;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.pack .button { width: 100%; margin-top: auto; }

.credits-points { margin: 0; padding-left: 1.2em; }
.credits-points li { margin: 8px 0; }
.credits-contact { margin: 16px 0 0; }

@media (max-width: 640px) {
  .packs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 12px; }
  .pack { padding: 16px; }
}

.loading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}
.loading[hidden] { display: none; }

.spinner {
  width: 20px;
  height: 20px;
  flex: none;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 2.4s; }
}

.summary-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-bottom: 14px;
}

.summary-number { font-size: 1.6rem; margin: 0; word-break: break-word; }

.meta { color: var(--text-muted); font-size: 0.85rem; margin: 12px 0 0; }

.kv {
  display: grid;
  grid-template-columns: minmax(150px, 230px) 1fr;
  margin: 0;
  border-top: 1px solid var(--border);
}

.kv dt,
.kv dd {
  margin: 0;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}

.kv dt { color: var(--text-muted); padding-right: 12px; }
.kv dd { word-break: break-word; font-weight: 600; }
.kv .note { color: var(--text-muted); font-weight: 400; font-size: 0.88rem; }

@media (max-width: 520px) {
  .kv { grid-template-columns: 1fr; }
  .kv dt { border-bottom: 0; padding-bottom: 0; }
}

.scanner-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.scanner-head h3 { margin: 0; }

.scanner-desc { color: var(--text-muted); font-size: 0.9rem; margin: 0 0 14px; }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.badge-success { background: var(--success-bg); color: var(--success); }
.badge-error { background: var(--danger-bg); color: var(--danger); }
.badge-timeout { background: var(--warning-bg); color: var(--warning); }
.badge-skipped,
.badge-neutral { background: var(--neutral-bg); color: var(--neutral); }

.error-text { color: var(--danger); margin: 0; word-break: break-word; }
.empty { color: var(--text-muted); margin: 0; }

details.dork-group {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  background: var(--surface-2);
}

details.dork-group summary {
  cursor: pointer;
  padding: 10px 14px;
  font-weight: 700;
}

details.dork-group ul { margin: 0; padding: 0 14px 12px 32px; }
details.dork-group li { margin: 4px 0; }

.dork-link {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  word-break: break-all;
}

.web-results { list-style: none; margin: 0; padding: 0; }
.web-results li { padding: 12px 0; border-bottom: 1px solid var(--border); }
.web-results li:last-child { border-bottom: 0; }
.web-results a { font-weight: 700; }
.web-results .result-url { color: var(--text-muted); font-size: 0.82rem; word-break: break-all; }
.web-results .result-snippet { margin: 4px 0 0; font-size: 0.92rem; }

.skipped-list { margin: 0; padding-left: 20px; color: var(--text-muted); }
.skipped-list li { margin: 4px 0; }

pre.raw {
  margin: 0;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

/* ---------------------------------------------------------------------------
   Content sections */

.section { padding: 80px 0; }
.section.alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section h2 { text-align: center; }

.section-lead {
  max-width: 640px;
  margin: 0 auto 40px;
  color: var(--text-muted);
  text-align: center;
  font-size: 1.05rem;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

/* Four steps: one row on wide screens, then 2 x 2, then one column. */
@media (max-width: 1080px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .steps { grid-template-columns: minmax(0, 1fr); }
}

.steps li {
  position: relative;
  padding: 26px 24px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 14px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 800;
}

.steps p,
.feature p,
.use-cases p { color: var(--text-muted); margin: 0; }

/* min(…, 100%): on very narrow phones the columns never get wider than the page. */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 20px;
}

.feature {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.feature-icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 14px;
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--primary);
}

.feature-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Two columns at most, so four use cases form a balanced 2 x 2 grid. */
.use-cases {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 28px 40px;
  max-width: 900px;
  margin: 36px auto 0;
}

.use-cases h3 {
  padding-left: 14px;
  border-left: 3px solid var(--primary);
}

.sources {
  display: grid;
  gap: 14px;
  max-width: 860px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.sources li {
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-muted);
}

.sources strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
}

/* Text-only sections (about, explanations) */
.prose {
  max-width: 760px;
  margin: 0 auto;
}

.prose p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 16px;
}

.prose p:last-child { margin-bottom: 0; }

.prose strong { color: var(--text); }

/* Comparison table */
.table-wrap {
  max-width: 900px;
  margin: 0 auto;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.compare {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.compare th,
.compare td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.compare thead th {
  background: var(--surface-2);
  font-weight: 800;
}

.compare tbody th {
  font-weight: 700;
  color: var(--text);
}

.compare td { color: var(--text-muted); }

.compare tbody tr:last-child th,
.compare tbody tr:last-child td { border-bottom: 0; }

/* Command lines */
.commands {
  display: grid;
  /* minmax(0, 1fr): the column never gets wider than the page on phones. */
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  max-width: 760px;
  margin: 0 auto;
}

.command-label {
  margin: 0 0 6px;
  font-weight: 700;
}

.code {
  margin: 0;
  padding: 14px 18px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.5;
  /* Long commands wrap instead of scrolling. Wrapped parts are indented,
     so each command still starts at the left edge. */
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  text-indent: 2ch hanging each-line;
}

/* Inline code is 0.9em; code inside a block keeps the block's size. */
.code code { font-size: inherit; }

/* On phones, each row of the comparison becomes a small card. */
@media (max-width: 640px) {
  .compare { min-width: 0; }
  .compare thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
  .compare tbody,
  .compare tr,
  .compare th,
  .compare td { display: block; width: 100%; }
  .compare tbody tr { border-bottom: 1px solid var(--border); }
  .compare tbody tr:last-child { border-bottom: 0; }
  .compare tbody th { background: var(--surface-2); border-bottom: 0; }
  .compare td { border-bottom: 0; padding-top: 10px; padding-bottom: 10px; }
  .compare td::before {
    content: attr(data-label);
    display: block;
    color: var(--text);
    font-size: 0.8rem;
    font-weight: 700;
  }
}

.section-links {
  max-width: 760px;
  margin: 24px auto 0;
  text-align: center;
}

.section-links p { color: var(--text-muted); }

.link-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
  font-weight: 600;
}

.small-note { color: var(--text-muted); font-size: 0.85rem; }

/* Inline code in the copy (commands, scanner names) */
code { font-family: var(--font-mono); font-size: 0.9em; }

:not(pre) > code {
  padding: 0.1em 0.4em;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-2);
  overflow-wrap: anywhere;
}

/* Card header: the icon of the source */
.feature-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.feature-top .feature-icon { margin-bottom: 0; }

/* Project facts card in the "What is PhoneInfoga?" section */
.facts { margin: 28px 0 0; }
.facts h3 { margin-bottom: 14px; }

/* Example of the first report card, in the section "What PhoneInfoga
   finds about a phone number". The server builds it from offline data;
   it uses the same classes as the real report (app.js renderSummary). */
.report-example {
  max-width: 680px;
  margin: 32px auto 40px;
}
.report-example .card { margin: 0; }
.report-example .summary-number {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.015em;
}
.report-example figcaption {
  margin-top: 12px;
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
}

.faq { margin-top: 32px; }

.faq details {
  border-bottom: 1px solid var(--border);
}

.faq summary {
  position: relative;
  padding: 18px 40px 18px 0;
  font-weight: 700;
  font-size: 1.05rem;
  list-style: none;
  cursor: pointer;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary);
  font-size: 1.4rem;
  font-weight: 400;
}

.faq details[open] summary::after { content: "−"; }

.faq details p { color: var(--text-muted); padding-bottom: 18px; margin: 0; }

.cta-band {
  padding: 72px 0;
  background: var(--hero-bg);
  border-top: 1px solid var(--border);
  text-align: center;
}

/* The FAQ section above already draws the dividing line. */
.section.alt + .cta-band { border-top: 0; }

.cta-inner p {
  color: var(--text-muted);
  margin-bottom: 24px;
  font-size: 1.08rem;
}

/* ---------------------------------------------------------------------------
   Guide pages (static/guide.html) */

.guide { padding: 36px 0 64px; }

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.breadcrumb li + li::before {
  content: "/";
  margin-right: 8px;
}

.guide h1 {
  font-size: clamp(1.9rem, 4.6vw, 2.6rem);
  margin-bottom: 10px;
}

.guide-meta {
  margin-bottom: 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.guide-lead { font-size: 1.12rem; }

/* The list of the guides (static/guides.html): one card per guide. */
.guide-list {
  display: grid;
  gap: 16px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

/* The heading link covers the whole card, image included. */
.guide-card {
  position: relative;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.guide-card-cover {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

@media (max-width: 640px) {
  .guide-card { grid-template-columns: minmax(0, 1fr); gap: 14px; }
}

.guide-card h2 {
  margin: 0 0 8px;
  font-size: clamp(1.15rem, 2.4vw, 1.35rem);
}

.guide-card h2 a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
}

.guide-card h2 a { color: var(--text); text-decoration: none; }
.guide-card h2 a:hover { color: var(--primary); text-decoration: underline; }
.guide-card p { margin: 0 0 8px; color: var(--text-muted); }
.guide-card .guide-meta { margin: 0; font-size: 0.85rem; }

.toc {
  margin: 28px 0 8px;
  padding: 18px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.toc-title {
  margin-bottom: 8px;
  font-weight: 700;
}

.toc ol { margin: 0; padding-left: 1.4em; }
.toc li { margin: 4px 0; }

.guide-section { margin-top: 48px; }
.guide-section h2 { font-size: clamp(1.4rem, 2.8vw, 1.75rem); }
.guide-section h3 { margin: 28px 0 10px; }
.guide-section p,
.guide-section li { overflow-wrap: break-word; }

.guide-section ul,
.guide-section ol {
  margin: 0 0 14px;
  padding-left: 1.4em;
}

.guide-section li { margin: 6px 0; }
.guide-section .code { margin: 0 0 16px; }

/* Images: the main image under the lead, and screenshots with their
   caption in the sections. */
.guide-cover { margin: 24px 0 0; }
.guide-section figure { margin: 0 0 18px; }

.guide-cover img,
.guide-section figure img {
  display: block;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.guide-section figcaption {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 0.88rem;
}

/* A remark that the reader should not miss, such as a known limit. (The
   report cards use a different, inline .note: see .kv .note.) */
.guide-section .note {
  padding: 12px 16px;
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  background: var(--primary-soft);
}

.guide-section table {
  width: 100%;
  margin: 0 0 16px;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.guide-section th,
.guide-section td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
  overflow-wrap: break-word;
}

.guide-section thead th { background: var(--surface-2); }

/* Wide enough for a table: code in a cell only wraps at its spaces, so a
   file name such as phoneinfoga_Linux_arm64.tar.gz stays on one line. */
@media (min-width: 641px) {
  .guide-section td code { overflow-wrap: normal; }
}

/* On phones, each row of a table becomes a small card, and each cell shows
   the heading of its column above it (web/guides.go copies it into
   data-label), as on the comparison table of the home page. */
@media (max-width: 640px) {
  .guide-section thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
  .guide-section table,
  .guide-section tbody,
  .guide-section tr,
  .guide-section td { display: block; width: 100%; }
  .guide-section tbody tr {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
  }
  .guide-section tbody tr:first-child { border-top: 1px solid var(--border); }
  .guide-section td { padding: 4px 0; border-bottom: 0; }
  .guide-section td::before {
    content: attr(data-label);
    display: block;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 700;
  }
}

/* ---------------------------------------------------------------------------
   Online boxes of the guides (locales.OnlineBox, static/guide.html): after a
   few sections, a box offers the online version instead of the steps, next
   to a picture of it drawn in HTML. Everything in a picture is sized in em,
   from a font size that follows the width of the picture (container query
   units), so a picture shrinks as a whole, like an image. */

.guide-online {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 300px);
  align-items: center;
  gap: 32px;
  margin-top: 48px;
  padding: 28px 32px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--border));
  border-radius: var(--radius);
  background: var(--hero-bg);
  box-shadow: var(--shadow);
}

.guide-online-title {
  margin-bottom: 8px;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.guide-online-text p:not(.guide-online-title) { color: var(--text-muted); }
.guide-online-text .button { margin-top: 6px; }

/* The picture leads to the search box too, but only the button is in the
   tab order and read by screen readers. */
.online-shot {
  display: block;
  container-type: inline-size;
  color: var(--text);
  text-decoration: none;
}
.online-shot:hover { color: var(--text); }

.shot-window,
.shot-phone {
  font-size: 10px;
  font-size: clamp(8px, 3.3cqi, 12px);
  line-height: 1.35;
  text-align: left;
  transition: transform 0.2s ease;
}
.online-shot:hover .shot-window,
.online-shot:hover .shot-phone { transform: translateY(-4px); }

@media (prefers-reduced-motion: reduce) {
  .shot-window,
  .shot-phone { transition: none; }
}

.shot-window {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 1em;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

/* The top of the browser: its three buttons and the address bar. */
.shot-bar {
  display: flex;
  align-items: center;
  gap: 1em;
  padding: 0.65em 0.9em;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

.shot-dots { display: flex; flex: none; gap: 0.4em; }
.shot-dots span { width: 0.75em; height: 0.75em; border-radius: 50%; }
.shot-dots span:nth-child(1) { background: #f87171; }
.shot-dots span:nth-child(2) { background: #fbbf24; }
.shot-dots span:nth-child(3) { background: #34d399; }

.shot-address {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  min-width: 0;
  margin-right: 2.6em;
  padding: 0.3em 0.8em;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.9em;
}
.shot-address svg {
  flex: none;
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
}
.shot-address span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

.shot-screen {
  padding: 1.2em;
  background: var(--hero-bg);
}

/* The search box of the home page, with a number typed in. */
.shot-search {
  display: flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.4em;
  border: 1px solid var(--border);
  border-radius: 1.1em;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.shot-country {
  display: flex;
  flex: none;
  align-items: center;
  gap: 0.4em;
  padding: 0.5em 0.6em;
  border-radius: 0.7em;
  background: var(--surface-2);
  font-weight: 600;
}
.shot-country img { width: 1.5em; height: auto; border-radius: 0.15em; }

.shot-number {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  font-size: 1.1em;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* The caret of a field being typed in. */
.shot-number::after {
  content: "";
  display: inline-block;
  width: 1.5px;
  height: 1.15em;
  margin-left: 0.15em;
  vertical-align: -0.2em;
  background: var(--primary);
  animation: shot-caret 1.1s steps(1) infinite;
}
@keyframes shot-caret { 50% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .shot-number::after { animation: none; }
}

.shot-button {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  padding: 0.55em 0.9em;
  border-radius: 0.7em;
  background: var(--primary);
  color: var(--primary-contrast);
  font-weight: 700;
}
.shot-button svg {
  width: 1.1em;
  height: 1.1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
}

/* Cards of the report: the first one, then the web pages found. */
.shot-card {
  margin-top: 1em;
  padding: 1em 1.1em 0.5em;
  border: 1px solid var(--border);
  border-radius: 1em;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.shot-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4em 0.8em;
  margin-bottom: 0.6em;
}

.shot-big {
  max-width: 100%;
  overflow: hidden;
  font-size: 1.5em;
  font-weight: 800;
  letter-spacing: -0.015em;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.shot-title { font-size: 1.15em; font-weight: 700; }

.shot-badge {
  padding: 0.2em 0.7em;
  border-radius: 999px;
  background: var(--success-bg);
  color: var(--success);
  font-size: 0.85em;
  font-weight: 700;
  white-space: nowrap;
}

.shot-rows {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
}
.shot-rows span {
  padding: 0.45em 0;
  overflow: hidden;
  border-top: 1px solid var(--border);
  white-space: nowrap;
  text-overflow: ellipsis;
}
.shot-rows span:nth-child(odd) { padding-right: 1.2em; color: var(--text-muted); }
.shot-rows span:nth-child(even) { font-weight: 600; }

/* At most four rows, and two in the report picture. */
.shot-rows span:nth-child(n+9),
.shot-report .shot-rows span:nth-child(n+5) { display: none; }

.shot-web .shot-head { justify-content: space-between; }

/* A web page found, drawn as lines: its title, its address, its extract. */
.shot-result { padding: 0.5em 0 0.6em; border-top: 1px solid var(--border); }
.shot-result span {
  display: block;
  width: 88%;
  height: 0.55em;
  margin-top: 0.4em;
  border-radius: 999px;
  background: var(--neutral-bg);
}
.shot-result span:nth-child(1) {
  width: 68%;
  height: 0.7em;
  margin-top: 0.2em;
  background: color-mix(in srgb, var(--primary) 60%, var(--surface));
}
.shot-result span:nth-child(2) {
  width: 42%;
  background: color-mix(in srgb, var(--text-muted) 35%, var(--surface));
}
.shot-result:nth-child(3) span:nth-child(1) { width: 54%; }
.shot-result:nth-child(3) span:nth-child(3) { width: 74%; }
.shot-result:nth-child(4) span:nth-child(1) { width: 76%; }
.shot-result:nth-child(4) span:nth-child(2) { width: 50%; }

/* The phone: the site's name, the search box with the button under the
   number, as on a narrow screen, and the first card of the report with
   each label above its value. */
.shot-phone {
  width: 18.5em;
  margin: 0 auto;
  padding: 0.6em;
  border-radius: 2.6em;
  background: var(--text);
  box-shadow: var(--shadow-lg);
}

.shot-phone .shot-screen {
  position: relative;
  padding: 2.7em 0.9em 1.2em;
  border-radius: 2.1em;
}

/* The camera, at the top of the screen. */
.shot-phone .shot-screen::before {
  content: "";
  position: absolute;
  top: 0.75em;
  left: 50%;
  width: 4.6em;
  height: 1.25em;
  border-radius: 999px;
  background: var(--text);
  transform: translateX(-50%);
}

.shot-brand {
  margin-bottom: 0.9em;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: center;
}

.shot-phone .shot-search { flex-wrap: wrap; }
.shot-phone .shot-number { flex-basis: 6em; font-size: 1em; }
.shot-phone .shot-button { flex: 1 1 100%; }
.shot-phone .shot-big { font-size: 1.2em; }

.shot-phone .shot-rows { grid-template-columns: minmax(0, 1fr); }
.shot-phone .shot-rows span:nth-child(odd) { padding-bottom: 0; font-size: 0.9em; }
.shot-phone .shot-rows span:nth-child(even) { padding-top: 0.15em; border-top: 0; }
.shot-phone .shot-rows span:nth-child(n+7) { display: none; }

/* The phone rises from the bottom edge of its box, which hides its lower
   part. */
.guide-online-phone { padding-bottom: 0; }
.guide-online-phone .guide-online-text { padding-bottom: 28px; }
.guide-online-phone .online-shot {
  align-self: end;
  height: 260px;
  overflow: hidden;
}
.guide-online-phone .shot-phone { margin-top: 8px; }

/* On phones, the text comes first, then the picture: under the text, a
   browser shows at most the width of the text, and the phone still rises
   from the bottom edge. The report picture keeps two web pages, to save
   height. */
@media (max-width: 640px) {
  .guide-online {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    padding: 22px 18px;
  }
  .guide-online-title { font-size: 1.2rem; }
  .guide-online-phone { padding-bottom: 0; }
  .guide-online-phone .guide-online-text { padding-bottom: 0; }
  .guide-online-phone .online-shot { height: 220px; }
  .online-shot { width: 100%; max-width: 340px; justify-self: center; }
  .shot-result:nth-child(4) { display: none; }
}

/* ---------------------------------------------------------------------------
   Legal pages (legal.html): the layout of the guides, without the cover */
/* A detail of the operator that is not set yet (before the launch only). */
.legal-missing {
  padding: 0 4px;
  border-radius: 4px;
  background: #fff4d6;
  color: #7a4b00;
  font-weight: 600;
}
.legal .guide-section table { font-size: 0.92rem; }
.optout { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.optout[hidden] { display: none; }
