/* Nearbys guide: the Nearbys and CodesWallet guides' stylesheet (style.css + guide.css), with Nearbys' accent
   and a plain header element. Keep the two alike when either changes. */
:root {
  color-scheme: dark;
  --bg: #0f1115;
  --panel: #161a21;
  --panel-border: #262b35;
  --text: #e7e9ee;
  --text-muted: #9aa3b2;
  --text-body: #cbd1db;
  --gps-good: #46e05a;
  --gps-usable: #ff9f1a;
  --gps-poor: #ff7268;
  --gps-known: #e0bd38;
  --gps-none: #a0a5ad;
  --accent: #ffb020;
  --on-accent: #1b1300;
  --accent-soft: rgba(255, 176, 32, 0.15);
  --link: #6fb1ff;
  --nav-bg: rgba(15, 17, 21, 0.92);
  --topbar-bg: rgba(15, 17, 21, 0.96);
  --toolbar-bg: rgba(22, 26, 33, 0.94);
  --surface-subtle: #12151b;
  --surface-code: #0b0d11;
  --surface-inline-code: #11141a;
  --surface-header: #202630;
  --inline-code-text: #ffd48a;
  --tree-text: #c8ced8;
  --row-alt: rgba(255, 255, 255, 0.018);
  --row-hover: rgba(111, 177, 255, 0.06);
  --diagram-bg: #f8fafc;
  --radius: 10px;
  --max-width: 880px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f7fb;
  --panel: #ffffff;
  --panel-border: #d7dfe9;
  --text: #192432;
  --text-muted: #5d6a7a;
  --text-body: #354354;
  --gps-good: #146b2d;
  --gps-usable: #a84400;
  --gps-poor: #ad2828;
  --gps-known: #775b00;
  --gps-none: #585e67;
  --accent: #b45309;
  --on-accent: #ffffff;
  --accent-soft: rgba(180, 83, 9, 0.1);
  --link: #075fae;
  --nav-bg: rgba(244, 247, 251, 0.94);
  --topbar-bg: rgba(244, 247, 251, 0.97);
  --toolbar-bg: rgba(255, 255, 255, 0.94);
  --surface-subtle: #edf2f7;
  --surface-code: #18212c;
  --surface-inline-code: #eef2f6;
  --surface-header: #e8edf3;
  --inline-code-text: #8a3f05;
  --tree-text: #344253;
  --row-alt: rgba(25, 36, 50, 0.025);
  --row-hover: rgba(7, 95, 174, 0.07);
  --diagram-bg: #ffffff;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    color-scheme: light;
    --bg: #f4f7fb;
    --panel: #ffffff;
    --panel-border: #d7dfe9;
    --text: #192432;
    --text-muted: #5d6a7a;
    --text-body: #354354;
    --gps-good: #146b2d;
    --gps-usable: #a84400;
    --gps-poor: #ad2828;
    --gps-known: #775b00;
    --gps-none: #585e67;
    --accent: #b45309;
  --on-accent: #ffffff;
    --accent-soft: rgba(180, 83, 9, 0.1);
    --link: #075fae;
    --nav-bg: rgba(244, 247, 251, 0.94);
    --topbar-bg: rgba(244, 247, 251, 0.97);
    --toolbar-bg: rgba(255, 255, 255, 0.94);
    --surface-subtle: #edf2f7;
    --surface-code: #18212c;
    --surface-inline-code: #eef2f6;
    --surface-header: #e8edf3;
    --inline-code-text: #8a3f05;
    --tree-text: #344253;
    --row-alt: rgba(25, 36, 50, 0.025);
    --row-hover: rgba(7, 95, 174, 0.07);
    --diagram-bg: #ffffff;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: block;
  background: var(--nav-bg);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--panel-border);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  font-size: 0.8rem;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--panel-border);
  color: var(--text);
  border-radius: 6px;
  font-size: 1.1rem;
  padding: 0.25rem 0.6rem;
  cursor: pointer;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.theme-toggle {
  display: inline-flex;
}

.theme-toggle-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 32px;
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--panel-border);
  border-radius: 7px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
}

.theme-toggle-button:hover {
  border-color: var(--link);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-left: 1rem;
  font-size: 0.92rem;
}

.nav-links a {
  color: var(--text-muted);
}

.nav-links a.active,
.nav-links a:hover {
  color: var(--text);
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

.page-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.page-header img {
  width: 48px;
  height: 48px;
  filter: drop-shadow(0 0 0.5px rgba(255, 255, 255, 0.2));
}

.page-header h1 {
  margin: 0;
  font-size: 1.9rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0 0 0.35rem;
}

.lede {
  font-size: 1.08rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

section.block {
  margin: 2.25rem 0;
  padding-top: 0.5rem;
  border-top: 1px solid var(--panel-border);
}

section.block:first-of-type {
  border-top: none;
  padding-top: 0;
}

section.block h2 {
  font-size: 1.35rem;
  margin-bottom: 0.6rem;
}

section.block h3 {
  font-size: 1.08rem;
  margin: 1.25rem 0 0.5rem;
  color: var(--text);
}

dl.term-list {
  margin: 1rem 0;
  padding: 1rem 1.1rem;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
}

dl.term-list dt {
  font-weight: 600;
  margin-top: 0.75rem;
}

dl.term-list dt:first-child {
  margin-top: 0;
}

dl.term-list dd {
  margin: 0.15rem 0 0;
  color: var(--text-muted);
}

ul.item-list {
  margin: 0.5rem 0 0.75rem;
  padding-left: 1.35rem;
}

ul.item-list li {
  margin: 0.2rem 0;
}

dl.term-list dd ul.item-list {
  margin: 0.35rem 0 0.25rem;
}

.app-ref {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 1rem 0;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--panel-border);
  border-left: 3px solid var(--link);
  border-radius: 8px;
  background: var(--panel);
  font-size: 0.95rem;
}

.app-ref-icon {
  font-size: 1.1rem;
}

.draft-notice {
  display: block;
  margin: 1.25rem 0;
  padding: 0.85rem 1rem;
  border: 1px solid #4a3320;
  border-left: 3px solid #d99a3c;
  border-radius: 8px;
  background: rgba(217, 154, 60, 0.08);
  font-size: 0.95rem;
}

.draft-notice strong {
  display: block;
  margin-bottom: 0.2rem;
  color: #d99a3c;
}

.shot-frame {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin: 1.25rem 0;
  padding: 2.5rem 1rem;
  border: 1.5px dashed var(--panel-border);
  border-radius: 16px;
  background: var(--panel);
  color: var(--text-muted);
  text-align: center;
}

.shot-icon {
  font-size: 1.8rem;
  opacity: 0.6;
}

.shot-label {
  font-weight: 600;
  color: var(--text);
}

.shot-hint {
  font-size: 0.82rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.card {
  display: block;
  padding: 1rem;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
}

.card:hover {
  border-color: var(--link);
  text-decoration: none;
}

.card .card-icon {
  width: 32px;
  height: 32px;
  margin-bottom: 0.6rem;
}

.card h3 {
  margin: 0 0 0.3rem;
  font-size: 1.02rem;
}

.card p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.hero {
  padding: 3rem 0 1rem;
  text-align: center;
}

.hero h1 {
  font-size: 2.3rem;
  margin: 0.5rem 0;
}

.hero p {
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto;
  font-size: 1.08rem;
}

.pill {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

footer {
  border-top: 1px solid var(--panel-border);
  padding: 1.5rem 1.25rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    margin: 0.75rem 0 0;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-inner {
    flex-wrap: wrap;
  }
}

:root {
  --ok-green: #57d68d;
  --warn-yellow: #ffd60a;
  --max-width: 940px;
}

:root[data-theme="light"] {
  --ok-green: #087b43;
  --warn-yellow: #916e00;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --ok-green: #087b43;
    --warn-yellow: #916e00;
  }
}


/* The header, sticky, as in the other guides. */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: block;
  background: var(--nav-bg);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--panel-border);
}


/* inline-block, not flex: translate-guard wraps "Connect IQ" in its own element,
   and flex items drop the spaces around it. */
.store-link,
.btn-store {
  display: inline-block;
  text-align: center;
  line-height: 1.5;
  padding: 0.3rem 0.8rem;
  border-radius: 7px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.store-link:hover,
.btn-store:hover {
  filter: brightness(1.1);
}

.btn-store {
  padding: 0.65rem 1.3rem;
  font-size: 1rem;
}

.hero-actions {
  margin-top: 1.25rem;
}


@media (max-width: 760px) {
  .hero-actions { text-align: center; }
  .store-link { font-size: 0.72rem; padding: 0.3rem 0.55rem; }
}


.site-search {
  position: relative;
  display: inline-flex;
}

.site-nav .nav-links {
  flex: 1 1 auto;
}

.site-search-toggle,
.site-search-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--panel-border);
  background: var(--panel);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.site-search-toggle {
  min-height: 32px;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  border-radius: 7px;
  font-size: 0.78rem;
}

.site-search-toggle:hover,
.site-search-toggle[aria-expanded="true"],
.site-search-close:hover {
  border-color: var(--link);
}

.site-search-toggle svg,
.site-search-field svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.site-search-panel {
  position: absolute;
  top: calc(100% + 0.65rem);
  right: 0;
  width: min(380px, calc(100vw - 2.5rem));
  padding: 0.8rem;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
}

.site-search-panel[hidden] {
  display: none;
}

.site-search-label {
  display: block;
  margin: 0 0 0.45rem;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 700;
}

.site-search-field {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.4rem;
}

.site-search-field > svg {
  position: absolute;
  left: 0.7rem;
  z-index: 1;
  color: var(--text-muted);
  pointer-events: none;
}

.site-search-field input {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0.55rem 0.75rem 0.55rem 2.15rem;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  outline: none;
  background: var(--surface-subtle);
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
}

.site-search-field input:focus {
  border-color: var(--link);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.site-search-field input::placeholder {
  color: var(--text-muted);
}

.site-search-close {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  font-size: 1.35rem;
  line-height: 1;
}

.site-search-status {
  min-height: 1.3rem;
  margin: 0.55rem 0 0.25rem;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.site-search-results {
  max-height: min(60vh, 24rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.site-search-result {
  display: flex;
  min-height: 58px;
  flex-direction: column;
  justify-content: center;
  gap: 0.08rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  color: var(--text);
}

.site-search-result:hover,
.site-search-result.active {
  background: var(--accent-soft);
  text-decoration: none;
}

.site-search-result-title {
  font-size: 0.9rem;
  font-weight: 750;
}

.site-search-result-heading {
  color: var(--link);
  font-size: 0.76rem;
  font-weight: 650;
}

.site-search-result-description {
  display: -webkit-box;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}


/* The headline spans the page so its two lines stay two lines; it is deliberately smaller than the
   other pages' hero titles. */
.hero-heading {
  padding-top: 3rem;
}

.hero-heading h1 {
  margin: 0.55rem 0 0;
  font-size: clamp(1.35rem, 3.3vw, 2.2rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.hero-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 3rem;
  align-items: center;
  padding: 1.5rem 0 2rem;
}

.brand-mark.brand-launcher {
  display: block;
  border-radius: 50%;
  background: none;
  object-fit: contain;
}

.hero-copy h1 {
  margin: 0.55rem 0 0.8rem;
  font-size: clamp(2.2rem, 6vw, 3.8rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero-copy p {
  max-width: 610px;
  margin: 0;
  color: var(--text-muted);
  font-size: 1.08rem;
}

.hero-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-launcher-icon {
  width: 200px;
  height: 200px;
  object-fit: contain;
  filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.35));
}

.stat-grid,
.steps,
.format-grid,
.control-grid {
  display: grid;
  gap: 1rem;
  margin: 1.4rem 0;
}

.stat-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }


.steps { grid-template-columns: repeat(3, 1fr); }
.format-grid { grid-template-columns: repeat(3, 1fr); }
.control-grid { grid-template-columns: repeat(2, 1fr); }

.stat,
.step,
.format-card,
.control-card,
.note {
  padding: 1rem;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  background: var(--panel);
}

/* The home page's number boxes link to the page behind each number. */
a.stat {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

a.stat:hover,
a.stat:focus-visible {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.stat strong {
  display: block;
  color: var(--accent);
  font-size: 1.65rem;
  line-height: 1.2;
}

.stat span,
.step p,
.format-card p,
.control-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.step-number {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 800;
}

.step h3,
.format-card h3,
.control-card h3 { margin: 0.65rem 0 0.25rem; }
.step p,
.format-card p,
.control-card p { margin: 0; }

/* Watch Controls has no matching card icon (physical buttons aren't a
   card section), so it uses this inline chevron glyph instead of a
   reused app icon - sized to match .page-header img / .card-icon so it
   still sits flush with the real icons on every other section. */
.page-header svg.section-icon {
  width: 48px;
  height: 48px;
  color: var(--accent);
  flex-shrink: 0;
}

/* Sizing/margin for this one comes from the shared .card-icon class already
   on the element; only the stroke color needs setting here. */
.card svg.section-icon {
  color: var(--accent);
}

/* A card's icon is an inline image, which leaves a blank line's worth of space under it
   (the descender gap) before the heading. The icon-row cards are blocks and have none;
   make the single icons blocks too so every card has the same, tighter spacing. */
.card > .card-icon {
  display: block;
}


/* Real on-watch screenshots (transparent-background cutouts, see
   scripts/process_screenshots.py) dropped into a <screenshot-placeholder>
   slot. Capped narrower than their native size so they read as an inline
   device illustration rather than a full-width hero image. */
.watch-screenshot {
  display: block;
  max-width: 260px;
  width: 100%;
  height: auto;
  margin: 1.25rem auto;
}

/* A before/after (or step-by-step) pair of screenshots side by side instead
   of stacked. Each .watch-screenshot inside keeps its own sizing; this just
   arranges them and lets narrow screens wrap to stacked instead of
   squeezing both down. */
.watch-screenshot-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-end;
  gap: 1rem;
  margin: 1.25rem 0;
}

.watch-screenshot-row .watch-screenshot {
  margin: 0;
  max-width: 220px;
}

/* For rows with many steps side by side (e.g. every PIN digit) where the
   default row size would crowd or wrap awkwardly - about half the usual
   row image size. */
.watch-screenshot-row-small .watch-screenshot {
  max-width: 110px;
}

/* Cards representing more than one option (e.g. all three sort orders, or
   both layout modes) show every icon side by side instead of just one. */
.card-icon-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.card-icon-row img {
  width: 32px;
  height: 32px;
}

.key {
  display: inline-block;
  min-width: 2.1rem;
  margin-right: 0.35rem;
  padding: 0.12rem 0.45rem;
  border: 1px solid var(--panel-border);
  border-bottom-width: 3px;
  border-radius: 6px;
  background: var(--surface-subtle);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
}

.good { color: var(--ok-green); }
.caution { color: var(--warn-yellow); }

.note {
  border-left: 3px solid var(--accent);
}

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


.compact-list li { margin-bottom: 0.5rem; }

/* Scoped to this app's own dl.term-list usage - the shared nearbys-app
   dl.term-list has plain-text dt terms elsewhere, so this only applies
   where a dt is explicitly opted in with icon-terms. */
.icon-terms dt {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.icon-terms dt img {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.icon-heading {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.icon-heading img {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}


/* Row-icon key under a note: icon and meaning side by side, wrapping. */
.icon-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
  margin: 0.9rem 0 0.2rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.icon-legend span {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.icon-legend img {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}


.faq-list {
  display: grid;
  gap: 0.7rem;
  margin: 1.4rem 0;
}

.faq-item {
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
}

.faq-item summary {
  padding: 0.9rem 1rem;
  color: var(--text);
  font-size: 1rem;
  font-weight: 750;
  cursor: pointer;
}

.faq-item[open] summary {
  color: var(--accent);
  border-bottom: 1px solid var(--panel-border);
  background: var(--accent-soft);
}

.faq-item > p,
.faq-item > .note {
  margin: 0.9rem 1rem;
}

.release-note {
  margin: 1.6rem 0;
}

.release-note h2 {
  margin-bottom: 0.3rem;
}

.release-note .release-date {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin: 0 0 0.6rem;
}

.release-note ul {
  margin: 0.4rem 0 0;
  padding-left: 1.35rem;
}


.site-nav .nav-inner {
  max-width: 1180px;
}


@media (max-width: 1050px) {
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 760px) {
  .hero-split { grid-template-columns: 1fr; text-align: center; gap: 2rem; }
  .hero-copy p { margin-inline: auto; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .steps, .format-grid, .control-grid { grid-template-columns: 1fr; }
  .hero-launcher-icon { width: 160px; height: 160px; }

  .site-nav .brand { order: 1; }
  .site-nav .nav-actions { order: 2; }
  .site-nav .nav-links { order: 3; flex-basis: 100%; }

  .site-search-panel {
    position: fixed;
    top: 4.35rem;
    right: 1rem;
    left: 1rem;
    width: auto;
  }

  .site-search-results {
    max-height: min(45dvh, 20rem);
  }
}

@media (max-width: 480px) {
  .site-search-toggle span,
  .theme-toggle-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .site-search-toggle {
    width: 36px;
    padding-inline: 0;
  }

  .theme-toggle-button {
    width: 36px;
    padding-inline: 0;
  }


}

@media (max-width: 390px) {
  .site-nav .brand > span:last-child {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}


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



/* Screenshots sit beside their text on wide screens, stacked on narrow ones. */
.with-shot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 1.5rem;
  align-items: start;
  margin: 1.25rem 0;
}

.with-shot > .watch-screenshot {
  margin: 0;
}

.with-shot > :first-child > :first-child {
  margin-top: 0;
}

@media (max-width: 760px) {
  .with-shot { grid-template-columns: 1fr; }
}

/* Numbered list of the carousel pages, in the order the watch shows them. */
.page-order {
  counter-reset: page;
  list-style: none;
  margin: 1.2rem 0;
  padding: 0;
  display: grid;
  gap: 0.7rem;
}

.page-order > li {
  counter-increment: page;
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0.2rem 0.8rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  background: var(--panel);
}

.page-order > li::before {
  content: counter(page);
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 800;
}

.page-order h3 { margin: 0; font-size: 1.02rem; }
.page-order p { grid-column: 2; margin: 0; color: var(--text-muted); font-size: 0.92rem; }

.page-order a { font-weight: 600; }

/* A "hold" or other gesture, written as a compact inline label. */
.gesture {
  white-space: nowrap;
  font-weight: 700;
}

/* The curated lists, as plain chips. */
.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.8rem 0 1.2rem;
  padding: 0;
  list-style: none;
}

.chip-list li {
  padding: 0.2rem 0.65rem;
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  background: var(--panel);
  font-size: 0.86rem;
}

.chip-list-title {
  margin: 1.1rem 0 0;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Plus Code is the one term the guide wants a reader to stop on: a marker-style highlight,
   and a link to the explanation wherever it is mentioned. */
.plus-code,
a.plus-code {
  background: var(--accent-soft);
  border-bottom: 2px solid var(--accent);
  border-radius: 3px;
  padding: 0 0.25em;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
a.plus-code:hover,
a.plus-code:focus-visible { background: var(--accent); color: #fff; }
.plus-code-callout {
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
}


/* A wide labelled diagram (not a watch cut-out): fills the column, with a soft frame. */
.guide-figure {
  margin: 1rem 0;
}
.guide-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--panel-border);
  border-radius: 10px;
}

/* A single watch cut-out with a caption underneath. */
.guide-figure-small {
  margin: 1rem 0;
  text-align: center;
}
.guide-figure-small figcaption {
  margin-top: 0.4rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}


/* ---- Nearbys' own additions ---- */

/* A button, as .key, written <kbd> in the pages. */
kbd {
  display: inline-block;
  min-width: 2.1rem;
  margin: 0 0.1rem;
  padding: 0.12rem 0.45rem;
  border: 1px solid var(--panel-border);
  border-bottom-width: 3px;
  border-radius: 6px;
  background: var(--surface-subtle);
  color: var(--text);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
}

/* Colours of the watch's own words in running text. */
.y { color: var(--warn-yellow); font-weight: 700; }
.c { color: var(--link); font-weight: 700; }
.red { color: #e0393e; font-weight: 700; }
.o { color: var(--accent); font-weight: 700; }
.gps-good { color: var(--gps-good); }
.gps-usable { color: var(--gps-usable); }
.gps-poor { color: var(--gps-poor); }
.gps-known { color: var(--gps-known); }
.gps-none { color: var(--gps-none); }

/* The GPS colours, as a swatch in front of the words. */
.swatch { display: inline-block; width: 0.8em; height: 0.8em; margin-right: 0.4em; border-radius: 50%; vertical-align: -0.05em; }
.sw-good { background: #46e05a; }
.sw-usable { background: #ff9f1a; }
.sw-poor { background: #ff5a4f; }
.sw-known { background: #d9a400; }

/* A table that is not the watch table: the same frame and header as .data-table, with room to read. */
.simple-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.2rem 0;
  font-size: 0.92rem;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel);
}
.simple-table th,
.simple-table td {
  padding: 0.55rem 0.75rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--panel-border);
}
.simple-table thead th {
  background: var(--accent-soft);
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}
.simple-table tbody tr:last-child td { border-bottom: none; }
.simple-table td:first-child { white-space: nowrap; }
.table-scroll.wide { overflow-x: auto; }

/* Screens in a row each carry their own caption. */
figure.guide-figure-small { margin: 1rem 0; }
figure.guide-figure-small .watch-screenshot { margin: 0 auto; }
.watch-screenshot-row figure.guide-figure-small { margin: 0; max-width: 220px; }
.watch-screenshot-row figure.guide-figure-small .watch-screenshot { max-width: 100%; }
.with-shot > figure.guide-figure-small { margin: 0; }

/* The lists of the pages, as the other guides' term lists. */
.guide-list { margin: 0.6rem 0 1rem; padding-left: 1.35rem; }
.guide-list li { margin: 0.3rem 0; }

/* The beta notice reads as a notice on the page, not as a draft of it. */
.draft-notice p { margin: 0.3rem 0 0; }

/* A card that is a country. */
.country-status { display: inline-block; margin: 0 0 0.4rem; }

/* Forward and back at the foot of a page. */
.pager { display: flex; justify-content: space-between; gap: 1rem; margin: 3rem 0 0; padding-top: 1.2rem; border-top: 1px solid var(--panel-border); }
.pager a {
  display: block;
  padding: 0.6rem 1rem;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
}
.pager a:hover { border-color: var(--link); text-decoration: none; }
.pager span { display: block; color: var(--text-muted); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.06em; }
.pager .next { margin-left: auto; text-align: right; }

/* The other apps card (More from the same developer). */
.other-apps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.other-apps { display: flex; gap: 1rem; align-items: flex-start; padding: 1.1rem 1.25rem; border: 1px solid var(--panel-border); border-radius: 12px; background: var(--panel); }
.other-apps img { width: 56px; height: 56px; flex: none; margin: 0; border-radius: 12px; }
.other-apps h3 { margin: 0 0 0.3rem; font-size: 1.1rem; line-height: 1.3; }
.other-apps p { margin: 0 0 0.75rem; color: var(--text-muted); font-size: 0.92rem; }
.other-apps .other-apps-actions { margin: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center; }
.other-apps-store { display: inline-block; padding: 0.35rem 0.9rem; border-radius: 7px; background: var(--accent); color: var(--on-accent); font-size: 0.85rem; font-weight: 700; white-space: nowrap; }
.other-apps-store:hover { filter: brightness(1.1); text-decoration: none; }
footer .also-from { margin: 0.5rem 0 0; }

/* A page's own navigation to a part of it, under the lede. */
.on-this-page { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 1.5rem; padding: 0; list-style: none; }
.on-this-page a { display: inline-block; padding: 0.2rem 0.65rem; border: 1px solid var(--panel-border); border-radius: 999px; background: var(--panel); color: var(--text); font-size: 0.85rem; }
.on-this-page a:hover { border-color: var(--link); text-decoration: none; }

/* Narrow screens: the table scrolls inside its frame rather than the page. */
@media (max-width: 560px) {
  .pager { flex-direction: column; }
  .pager .next { margin-left: 0; text-align: left; }
  .simple-table { font-size: 0.84rem; }
  .simple-table th, .simple-table td { padding: 0.45rem 0.55rem; }
  .simple-table td:first-child { white-space: normal; }
}

/* Eleven links in the header: a little closer than the other guides' ten, so they stay on one row. */
.site-nav .nav-links { gap: 0.55rem 0.75rem; margin-left: 0.5rem; }

/* The watch table, as in the EmergencyAid and CodesWallet guides. */
.table-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  margin: 1.2rem 0;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
}

.data-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 0.82rem;
  line-height: 1.25;
}

.data-table th,
.data-table td {
  padding: 0.35rem 0.55rem;
  text-align: left;
  border-bottom: 1px solid var(--panel-border);
  overflow-wrap: break-word;
}

.data-table th:nth-child(1),
.data-table td:nth-child(1) { width: 4%; }
.data-table th:nth-child(2),
.data-table td:nth-child(2) { width: 6%; }
.data-table th:nth-child(3),
.data-table td:nth-child(3) { width: 30%; }
.data-table th:nth-child(4),
.data-table td:nth-child(4) { width: 10%; }
.data-table th:nth-child(5),
.data-table td:nth-child(5) { width: 8%; }
.data-table th:nth-child(6),
.data-table td:nth-child(6) { width: 9%; }
.data-table th:nth-child(7),
.data-table td:nth-child(7) { width: 13%; }
.data-table th:nth-child(8),
.data-table td:nth-child(8) { width: 20%; }

@media (max-width: 480px) {
  .data-table {
    font-size: 0.68rem;
  }

  .data-table th,
  .data-table td {
    padding: 0.3rem 0.22rem;
  }

  .data-table thead th {
    font-size: 0.62rem;
    letter-spacing: 0;
  }

}

.data-table thead th {
  background: var(--accent-soft);
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.035em;
  text-transform: uppercase;
  position: sticky;
  top: 0;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr:nth-child(even) {
  background: var(--panel);
}

.data-table code {
  font-size: 0.8rem;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

@media (max-width: 480px) {
  .data-table code {
    font-size: 0.65rem;
  }
}

.watch-thumb {
  display: block;
  width: 28px;
  height: 28px;
  margin: 0 auto;
  object-fit: contain;
}

.data-table th.watch-icon,
.data-table td.watch-icon {
  padding-right: 0.2rem;
  text-align: center;
}

.data-table tbody { counter-reset: watch-row; }
.data-table tbody tr { counter-increment: watch-row; }
.data-table td.watch-index::before { content: counter(watch-row); }
.data-table th.watch-index,
.data-table td.watch-index {
  padding-left: 0.3rem;
  padding-right: 0.2rem;
  text-align: right;
  color: var(--muted, inherit);
}


/* The wide release image under the hero, as in the CodesWallet guide. */
.release-hero { margin: 0 0 2rem; }
.release-hero img { display: block; width: 100%; height: auto; border-radius: 16px; }
.release-hero figcaption { margin-top: .5rem; font-size: .8rem; color: var(--text-muted); text-align: center; }

/* A country on the root page: its image behind the words (set on the card itself, so the path is the page's), darkened so
   they can be read in either theme. */
.country-card {
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #fff;
  border: 0;
  background-color: #0a1a3a;
  background-size: auto 160%;
  background-position: 82% 62%;
  background-repeat: no-repeat;
}
.card.country-card h3 { color: #fff; font-size: 1.25rem; }
.country-card p { color: rgba(255, 255, 255, 0.88); }
.country-card:hover { filter: brightness(1.08); }

/* A hero with no picture beside its text: the text takes the width. */
.hero-split.no-icon { grid-template-columns: minmax(0, 1fr); gap: 0; padding-bottom: 1rem; }
.hero-split.no-icon .hero-copy p { max-width: none; }

/* Room between the hero text and its button. */
.hero-copy p.hero-actions { margin-top: 1.25rem; }

/* Screens side by side each have a caption of their own, and the captions differ in length: line the watches up by their
   tops (the other guides' rows hold bare pictures, which they line up by their bottoms). */
.watch-screenshot-row { align-items: flex-start; }
.watch-screenshot-row figure.guide-figure-small figcaption { min-height: 3.2em; }

/* The icons of the Filter's groups, as on the watch: its cyan. */
:root { --glyph: #36cfff; }
:root[data-theme="light"] { --glyph: #0a86a8; }
@media (prefers-color-scheme: light) { :root:not([data-theme]) { --glyph: #0a86a8; } }
.group-cell { display: inline-flex; align-items: center; gap: 0.6rem; }
.group-icon { flex: none; color: var(--glyph); }

/* A column of numbers, and a totals row. */
.simple-table th.num, .simple-table td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.simple-table tr.total td { border-top: 2px solid var(--panel-border); background: var(--surface-subtle); }

/* The home page's banner, first on the page: the picture with the headline, a line under it and the button laid over
   its dark left panel (the picture has its own title in that panel, so the words go above it and below it). The words
   are sized from the banner's width (cqw), so they keep their place as it shrinks. Below 760 px the panel is too
   small to hold them: they sit under the picture, on the picture's own navy. The colours do not follow the theme:
   they are on a picture. */
.home-banner {
  position: relative;
  container-type: inline-size;
  margin: 0 0 1.5rem;
  border-radius: 16px;
  overflow: hidden;
  background: #012557;
  color: #fff;
}
.home-banner img { display: block; width: 100%; height: auto; }
.home-banner .pill {
  position: absolute;
  left: 3.2%;
  top: 6%;
  background: rgba(255, 176, 32, 0.2);
  color: #ffb020;
  font-size: clamp(0.62rem, 1.2cqw, 0.9rem);
  white-space: nowrap;
}
.home-banner-text {
  position: absolute;
  left: 3.2%;
  bottom: 6%;
  width: 27%;
}
.home-banner-text h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(0.9rem, 2.2cqw, 1.8rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.home-banner-text p {
  margin: 0.5em 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(0.7rem, 1.5cqw, 1.1rem);
  line-height: 1.35;
}
.home-banner-text p.hero-actions { margin-top: 0.9em; }
.home-banner .btn-store {
  background: #ffb020;
  color: #1a1200;
  font-size: clamp(0.72rem, 1.5cqw, 1.1rem);
  padding: 0.45em 1em;
}
@media (max-width: 760px) {
  .home-banner .pill { position: static; display: inline-block; margin: 1rem 1rem 0; font-size: 0.78rem; }
  .home-banner-text { position: static; width: auto; padding: 0.6rem 1rem 1.25rem; }
  .home-banner-text h1 { font-size: 1.45rem; }
  .home-banner-text p { font-size: 0.95rem; }
  .home-banner-text p.hero-actions { text-align: left; }
  .home-banner .btn-store { font-size: 1rem; padding: 0.65rem 1.3rem; }
}
