/* =========================================================
   dab.church — design tokens
   A stained-glass-and-smoke identity: deep void purple,
   sage-green stained glass, gold halo light. The recurring
   signature shape is the pointed sanctuary arch — used on
   the hero, the age gate, and every product card, so the
   whole site reads as one continuous chapel.
   ========================================================= */

:root {
  /* color */
  --void: #17111f;
  --sanctuary: #241a33;
  --sanctuary-raised: #2e2140;
  --sage: #5c8a63;
  --sage-bright: #7fb388;
  --halo: #e8b84b;
  --halo-soft: #f0cd7a;
  --lilac-smoke: #8b7aa3;
  --parchment: #f3ecdf;
  --ash: #b8adc4;
  --line: rgba(243, 236, 223, 0.14);

  /* type */
  --font-display: "Cinzel", "Times New Roman", serif;
  --font-body: "Work Sans", -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  /* rhythm */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.75rem;
  --space-4: 3rem;
  --space-5: 5rem;

  --arch-radius: 140px 140px 12px 12px;

  /* page gutter: the space between the screen edge and the content (phones make it smaller) */
  --gutter: var(--space-3);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--void);
  background-image:
    radial-gradient(ellipse 900px 500px at 50% -10%, rgba(232, 184, 75, 0.10), transparent),
    radial-gradient(ellipse 700px 400px at 90% 20%, rgba(92, 138, 99, 0.08), transparent);
  color: var(--parchment);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
  -webkit-tap-highlight-color: rgba(232, 184, 75, 0.18);
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.02em;
  margin: 0;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sage-bright);
}

a {
  color: inherit;
}

/* focus visibility, kept even though the palette is dark */
:focus-visible {
  outline: 2px solid var(--halo);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- layout shell ---------- */

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding-top: var(--space-2);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  text-decoration: none;
}

.brand img {
  width: 34px;
  height: 34px;
}

.site-nav {
  display: flex;
  gap: var(--space-2) var(--space-3);
  font-size: 0.92rem;
}

/* Eight links plus search and Shop: tighten up before they start to crowd the logo. */
@media (max-width: 1240px) {
  .site-header .site-nav { gap: var(--space-2); font-size: 0.88rem; }
}

.site-nav a {
  text-decoration: none;
  color: var(--ash);
  white-space: nowrap;
  transition: color 0.15s ease;
}

.site-nav a:hover {
  color: var(--halo-soft);
}

.cart-pill {
  flex: none;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
}

/* ---------- the sanctuary arch (signature shape) ---------- */

.arch {
  border-radius: var(--arch-radius);
  position: relative;
}

.arch::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(180deg, rgba(232, 184, 75, 0.55), rgba(139, 122, 163, 0.15) 60%, transparent);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  padding: var(--space-5) 0 var(--space-4);
  text-align: center;
}

/* the figure: small, off to the side, tilted down as if watching over
   the page rather than presiding full-bleed over it — same treatment
   as the coming-soon page, so the two feel like the same site */
.overseer {
  position: absolute;
  top: 0.5rem;
  right: 6%;
  width: 150px;
  transform: rotate(4deg);
  z-index: 0;
}

.overseer::before {
  content: "";
  position: absolute;
  inset: -30px;
  background: radial-gradient(ellipse 60% 55% at 50% 35%, rgba(232, 184, 75, 0.35), transparent 70%);
  z-index: -1;
}

.overseer img {
  width: 100%;
  display: block;
  -webkit-mask-image: radial-gradient(ellipse 62% 78% at 50% 38%, #000 60%, transparent 100%);
  mask-image: radial-gradient(ellipse 62% 78% at 50% 38%, #000 60%, transparent 100%);
  filter: saturate(0.9) contrast(1.05);
  opacity: 0.92;
}

.hero > .wrap {
  position: relative;
  z-index: 1;
}

.hero-arch {
  max-width: 640px;
  margin: 0 auto;
  padding: var(--space-4) var(--space-4) var(--space-4);
  background:
    radial-gradient(ellipse 420px 260px at 50% 8%, rgba(232, 184, 75, 0.16), transparent 70%),
    var(--sanctuary);
}

.hero-arch img.emblem {
  width: 88px;
  height: auto;
  margin-bottom: var(--space-2);
  filter: drop-shadow(0 0 24px rgba(232, 184, 75, 0.35));
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: var(--parchment);
  margin: var(--space-2) 0 var(--space-1);
}

.hero h1 em {
  font-style: normal;
  color: var(--halo-soft);
}

.hero p.lede {
  color: var(--ash);
  max-width: 42ch;
  margin: 0 auto var(--space-3);
  font-size: 1.02rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary {
  background: linear-gradient(180deg, var(--halo-soft), var(--halo));
  color: #241a0a;
  box-shadow: 0 8px 30px rgba(232, 184, 75, 0.25);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 34px rgba(232, 184, 75, 0.35);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--parchment);
}

.btn-ghost:hover {
  border-color: var(--lilac-smoke);
}

/* ---------- featured categories ---------- */

.categories {
  padding-top: var(--space-4);
  padding-bottom: var(--space-4);
}

.section-heading {
  text-align: center;
  margin-bottom: var(--space-3);
}

.section-heading h2 {
  font-size: 1.6rem;
  margin-top: var(--space-1);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-2);
}

.category-card {
  background: var(--sanctuary);
  border: 1px solid var(--line);
  border-radius: 90px 90px 10px 10px;
  padding: var(--space-3) var(--space-2) var(--space-2);
  text-align: center;
  text-decoration: none;
  color: var(--parchment);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.category-card:hover {
  border-color: var(--sage-bright);
  transform: translateY(-2px);
}

.category-card .glyph {
  font-size: 1.8rem;
  margin-bottom: var(--space-1);
  display: block;
}

.category-card h3 {
  font-size: 1rem;
  font-family: var(--font-body);
  font-weight: 600;
}

.category-card p {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ash);
  margin: 0.3rem 0 0;
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding-top: var(--space-4);
  padding-bottom: var(--space-3);
  color: var(--ash);
  font-size: 0.85rem;
}

.site-footer .foot-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.site-footer .disclaimer {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.6;
  max-width: 60ch;
  border-top: 1px solid var(--line);
  padding-top: var(--space-2);
}

/* =========================================================
   Age verification gate
   ========================================================= */

.age-gate {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--space-2);
  background:
    radial-gradient(ellipse 700px 420px at 50% 20%, rgba(232, 184, 75, 0.14), transparent 70%),
    rgba(10, 7, 15, 0.92);
  backdrop-filter: blur(6px);
}

.age-gate[hidden] {
  display: none;
}

.age-gate-panel {
  margin: auto; /* centred, and top-aligned (so it can scroll) when the screen is too short */
  max-width: 420px;
  width: 100%;
  text-align: center;
  padding: var(--space-4) var(--space-3) var(--space-3);
  background: var(--sanctuary-raised);
}

.age-gate-panel img.emblem {
  width: 64px;
  margin-bottom: var(--space-2);
  filter: drop-shadow(0 0 20px rgba(232, 184, 75, 0.4));
}

.age-gate-panel h2 {
  font-size: 1.35rem;
  margin-bottom: var(--space-1);
}

.age-gate-panel p {
  color: var(--ash);
  font-size: 0.92rem;
  margin: 0 0 var(--space-3);
}

.age-gate-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.age-gate-decline {
  background: none;
  border: none;
  color: var(--ash);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-decoration: underline;
  cursor: pointer;
  margin-top: var(--space-1);
}

.age-gate-fineprint {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--lilac-smoke);
  margin-top: var(--space-2);
}

@media (max-width: 640px) {
  .hero-arch, .age-gate-panel {
    padding-left: var(--space-2);
    padding-right: var(--space-2);
  }
  .site-nav {
    flex-wrap: wrap;
    gap: var(--space-1) var(--space-2);
    font-size: 0.85rem;
  }
  .overseer {
    width: 90px;
    top: -0.5rem;
    right: 8%;
  }
}

/* =========================================================
   Shop / product grid
   ========================================================= */

.shop-header {
  padding: var(--space-4) 0 var(--space-3);
  text-align: center;
}

.shop-header .eyebrow {
  display: block;
  margin-bottom: var(--space-1);
}

.shop-header h1 {
  font-size: 2rem;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  justify-content: space-between;
  padding-bottom: var(--space-3);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-pill {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--ash);
  background: transparent;
  cursor: pointer;
  text-decoration: none;
}

.filter-pill.active {
  border-color: var(--halo);
  color: var(--halo-soft);
  background: rgba(232, 184, 75, 0.1);
}

.sort-select {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  background: var(--sanctuary);
  color: var(--parchment);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.5rem 1rem;
}

.device-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-3);
  padding-bottom: var(--space-5);
  min-height: 200px;
}

.device-card {
  background: var(--sanctuary);
  border: 1px solid var(--line);
  border-radius: 24px 24px 14px 14px;
  overflow: hidden;
  text-decoration: none;
  color: var(--parchment);
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.device-card:hover {
  border-color: var(--sage-bright);
  transform: translateY(-3px);
}

.device-photo {
  position: relative;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 2.6rem;
  color: rgba(243, 236, 223, 0.5);
  background:
    radial-gradient(ellipse 140px 100px at 50% 30%, rgba(232, 184, 75, 0.16), transparent 70%),
    linear-gradient(160deg, var(--sanctuary-raised), var(--void));
}

.device-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.product-badge {
  position: absolute;
  top: var(--space-1);
  left: var(--space-1);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(232, 184, 75, 0.18);
  color: var(--halo-soft);
  border: 1px solid rgba(232, 184, 75, 0.4);
  z-index: 1;
}

.product-badge.sold-out {
  background: rgba(184, 173, 196, 0.14);
  color: var(--ash);
  border-color: var(--line);
}

.product-badge.sale {
  background: rgba(92, 138, 99, 0.22);
  color: var(--sage-bright);
  border-color: rgba(92, 138, 99, 0.45);
}

.device-info {
  padding: var(--space-2);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.product-brand {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sage-bright);
}

.product-name {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.98rem;
  line-height: 1.3;
}

.product-price {
  margin-top: auto;
  padding-top: var(--space-1);
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--halo-soft);
}

.product-price .was {
  color: var(--ash);
  text-decoration: line-through;
  font-size: 0.8rem;
  margin-right: 0.4rem;
}

.empty-state, .loading-state, .error-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--space-4);
  color: var(--ash);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.error-state { color: var(--halo-soft); }

/* =========================================================
   Product detail page
   ========================================================= */

.product-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: var(--space-4);
  padding: var(--space-4) 0 var(--space-5);
  align-items: start;
}

@media (max-width: 860px) {
  .product-detail {
    grid-template-columns: 1fr;
  }
}

/* ---- gallery ---- */

.gallery {
  position: sticky;
  top: var(--space-3);
}

.gallery-stage {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 24px;
  overflow: hidden;
  background: var(--sanctuary);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: rgba(243, 236, 223, 0.4);
}

.gallery-stage img,
.gallery-stage video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 1;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(23, 17, 31, 0.65);
  color: var(--parchment);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(4px);
}

.gallery-nav.prev { left: var(--space-1); }
.gallery-nav.next { right: var(--space-1); }
.gallery-nav:hover { border-color: var(--halo); color: var(--halo-soft); }

.gallery-autoplay {
  position: absolute;
  bottom: var(--space-1);
  right: var(--space-1);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(23, 17, 31, 0.65);
  color: var(--ash);
  cursor: pointer;
  backdrop-filter: blur(4px);
}

.gallery-autoplay.active {
  border-color: var(--halo);
  color: var(--halo-soft);
}

.gallery-thumbs {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.gallery-thumbs button {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  padding: 0;
  cursor: pointer;
  background: var(--sanctuary);
  opacity: 0.6;
  transition: opacity 0.15s ease, border-color 0.15s ease;
}

.gallery-thumbs button.active,
.gallery-thumbs button:hover {
  opacity: 1;
  border-color: var(--halo);
}

.gallery-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-thumbs .video-marker {
  position: relative;
}

.gallery-thumbs .video-marker::after {
  content: "▶";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  background: rgba(23, 17, 31, 0.4);
  color: var(--parchment);
}

/* ---- info column ---- */

.product-info-col .eyebrow { display: block; margin-bottom: 0.4rem; }

.product-title {
  font-size: 1.9rem;
  margin-bottom: 0.5rem;
}

.product-meta-row {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ash);
  margin-bottom: var(--space-2);
}

.price-block {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 1.8rem;
  color: var(--halo-soft);
  margin-bottom: var(--space-1);
}

.price-block .was {
  font-size: 1.1rem;
  color: var(--ash);
  text-decoration: line-through;
}

.stock-line {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  margin-bottom: var(--space-3);
}

.stock-line.in-stock { color: var(--sage-bright); }
.stock-line.low-stock { color: var(--halo-soft); }
.stock-line.out-of-stock { color: var(--ash); }

.qty-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.qty-stepper button {
  width: 2.2rem;
  height: 2.2rem;
  background: transparent;
  border: none;
  color: var(--parchment);
  font-size: 1.1rem;
  cursor: pointer;
}

.qty-stepper button:hover { background: var(--sanctuary-raised); }

.qty-stepper span {
  width: 2.4rem;
  text-align: center;
  font-family: var(--font-mono);
}

.product-description {
  color: var(--ash);
  margin: var(--space-3) 0;
  line-height: 1.7;
}

.features-list {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-3);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.features-list li {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-size: 0.92rem;
}

.features-list li::before {
  content: "✦";
  color: var(--halo);
  flex: 0 0 auto;
  margin-top: 0.1rem;
  font-size: 0.8rem;
}

.kb-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: var(--space-2);
}

.kb-links a {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--sage-bright);
  text-decoration: none;
  border: 1px solid rgba(92, 138, 99, 0.4);
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
}

.kb-links a:hover { border-color: var(--sage-bright); }

.related-section {
  padding: 0 0 var(--space-5);
}

/* =========================================================
   Cart page
   ========================================================= */

.cart-page {
  padding: var(--space-4) 0 var(--space-5);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: var(--space-4);
  align-items: start;
}

@media (max-width: 860px) {
  .cart-page { grid-template-columns: 1fr; }
}

.cart-line {
  display: grid;
  grid-template-columns: 72px 1fr auto auto;
  gap: var(--space-2);
  align-items: center;
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--line);
}

.cart-line-photo {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  background: var(--sanctuary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 1.4rem;
  color: var(--ash);
}

.cart-line-photo img { width: 100%; height: 100%; object-fit: cover; }

.cart-line-name { font-weight: 600; font-size: 0.95rem; }
.cart-line-price { font-family: var(--font-mono); font-size: 0.82rem; color: var(--ash); }

.cart-line-remove {
  background: none;
  border: none;
  color: var(--ash);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-decoration: underline;
  cursor: pointer;
}

.cart-summary {
  background: var(--sanctuary);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: var(--space-3);
}

.cart-summary h2 { font-size: 1.1rem; margin-bottom: var(--space-2); }

.summary-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 0.4rem 0;
  color: var(--ash);
}

.summary-row.total {
  color: var(--parchment);
  font-size: 1.05rem;
  border-top: 1px solid var(--line);
  margin-top: 0.5rem;
  padding-top: 0.75rem;
}

.cart-summary .btn { width: 100%; justify-content: center; margin-top: var(--space-2); }

/* =========================================================
   Knowledge base
   ========================================================= */

.kb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-3);
  padding-bottom: var(--space-5);
}

.kb-card {
  background: var(--sanctuary);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: var(--space-3);
  text-decoration: none;
  color: var(--parchment);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.kb-card:hover { border-color: var(--sage-bright); transform: translateY(-2px); }

.kb-card .eyebrow { display: block; margin-bottom: 0.4rem; }
.kb-card h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.kb-card p { color: var(--ash); font-size: 0.88rem; margin: 0; }

.kb-article {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--space-4) 0 var(--space-5);
}

.kb-article-body {
  line-height: 1.75;
  color: var(--parchment);
}

.kb-article-body p { margin: 0 0 1.2em; }

.breadcrumb {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ash);
  margin-bottom: var(--space-2);
}

.breadcrumb a { color: var(--sage-bright); text-decoration: none; }

/* =========================================================
   Device detail page — header, section tabs, section body
   ========================================================= */

.device-header {
  text-align: left;
  margin-bottom: var(--space-3);
}

.device-header .product-title {
  font-size: 1.9rem;
  margin: 0.5rem 0 var(--space-2);
}

.section-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: var(--space-3);
  border-bottom: 1px solid var(--line);
  padding-bottom: var(--space-2);
}

.section-tab {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ash);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.section-tab:hover {
  border-color: var(--lilac-smoke);
}

.section-tab.active {
  border-color: var(--halo);
  color: var(--halo-soft);
  background: rgba(232, 184, 75, 0.1);
}

.section-body {
  color: var(--parchment);
  line-height: 1.75;
  margin-bottom: var(--space-3);
}

.section-body.empty {
  color: var(--ash);
  font-style: italic;
}

.section-body p {
  margin: 0 0 1.2em;
}

/* =========================================================
   Newsletter card (homepage)
   ========================================================= */

.newsletter-section {
  padding-top: 0;
  padding-bottom: var(--space-5);
}

.newsletter-card {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  padding: var(--space-4) var(--space-3);
  background: var(--sanctuary);
}

.newsletter-card h2 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.newsletter-card p {
  color: var(--ash);
  margin: 0 0 var(--space-2);
}

.newsletter-card form {
  display: flex;
  gap: 0.6rem;
  max-width: 420px;
  margin: 0 auto;
}

.newsletter-card input[type="email"] {
  flex: 1;
  min-width: 0;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--sanctuary-raised);
  color: var(--parchment);
  font-family: var(--font-body);
  font-size: 0.92rem;
}

.form-success {
  color: var(--sage-bright);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.form-error {
  color: var(--halo-soft);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

/* =========================================================
   Contact form
   ========================================================= */

.contact-form-wrap {
  max-width: 560px;
  padding-bottom: var(--space-5);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ash);
}

.contact-form input,
.contact-form textarea {
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--sanctuary);
  color: var(--parchment);
  font-family: var(--font-body);
  font-size: 0.95rem;
  resize: vertical;
}

.contact-form button {
  align-self: flex-start;
}

/* ---------- search ---------- */
.site-search {
  display: flex;
  align-items: center;
  flex: 0 1 260px;
  margin: 0 var(--space-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: transparent;
}
.site-search:focus-within { border-color: var(--sage-bright); }
.site-search input {
  flex: 1;
  min-width: 0;
  padding: 0.4rem 0.2rem 0.4rem 0.9rem;
  font: inherit;
  font-size: 0.85rem;
  color: var(--parchment);
  background: transparent;
  border: 0;
  outline: 0;
}
.site-search button {
  padding: 0.3rem 0.8rem;
  font-size: 1rem;
  color: var(--ash);
  background: transparent;
  border: 0;
  cursor: pointer;
}
.site-search button:hover { color: var(--halo-soft); }

/* ---------- phone menu (js/mobile-nav.js builds the button and the panel) ----------
   Wide screens: the panel is `display: contents`, so the header looks exactly as it always did.
   900px and under: the header is the logo, Shop and a menu button; the links and the search box
   live in the panel the button opens. */
.nav-toggle { display: none; }
.site-menu { display: contents; }

@media (max-width: 900px) {
  .site-header {
    flex-wrap: wrap;
    gap: var(--space-1);
    min-height: calc(44px + 2 * var(--space-2)); /* the same height before and after the script adds the button */
  }
  .site-header .brand { margin-right: auto; }

  /* until the script has moved them into the panel, keep the links and the search box out of the way */
  .site-header > .site-nav,
  .site-header > .site-search { display: none; }

  .site-header .cart-pill {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 1rem;
    font-size: 0.85rem;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 44px;
    height: 44px;
    padding: 0;
    color: var(--parchment);
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 12px;
    cursor: pointer;
  }
  .nav-toggle[aria-expanded="true"] { border-color: var(--halo); color: var(--halo-soft); }

  /* three bars that turn into a cross */
  .nav-toggle-bars,
  .nav-toggle-bars::before,
  .nav-toggle-bars::after {
    display: block;
    width: 20px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform 0.2s ease, background-color 0.2s ease;
  }
  .nav-toggle-bars { position: relative; }
  .nav-toggle-bars::before,
  .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
  .nav-toggle-bars::before { top: -6px; }
  .nav-toggle-bars::after { top: 6px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

  .site-menu { display: none; flex: 1 1 100%; min-width: 0; } /* min-width: a search field's own width must not stretch the panel past the screen */
  .site-menu.is-open {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    margin-top: var(--space-1);
    padding: var(--space-2);
    background: var(--sanctuary);
    border: 1px solid var(--line);
    border-radius: 18px;
    animation: menu-in 0.18s ease-out;
  }

  .site-menu .site-search { order: -1; flex: none; width: 100%; min-width: 0; margin: 0; }
  .site-menu .site-search input { padding: 0.8rem 0.4rem 0.8rem 1.1rem; font-size: 16px; } /* 16px: iPhones zoom into smaller fields */
  .site-menu .site-search button { align-self: stretch; width: 3.2rem; padding: 0; font-size: 1.15rem; }

  .site-menu .site-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 var(--space-3);
    font-size: 1rem;
  }
  .site-menu .site-nav a {
    display: flex;
    align-items: center;
    min-height: 48px;
    color: var(--parchment);
    border-bottom: 1px solid var(--line);
  }
  .site-menu .site-nav a[aria-current="page"] { color: var(--halo-soft); }
}

@media (min-width: 560px) and (max-width: 900px) {
  .site-menu .site-nav { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@keyframes menu-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

#search-results h2 { margin: var(--space-3) 0 var(--space-1); font-size: 1.2rem; }
#search-results .count { font-family: var(--font-mono); font-size: 0.8rem; color: var(--ash); }
.brand-chips { display: flex; flex-wrap: wrap; gap: var(--space-1); }
.brand-chip {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 0.9rem; border: 1px solid var(--line); border-radius: 999px; text-decoration: none;
}
.brand-chip img { height: 20px; width: auto; max-width: 70px; object-fit: contain; }
.search-articles { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-1); }
.search-articles li a { font-weight: 600; }
.search-articles li span { display: block; color: var(--ash); font-size: 0.9rem; }

/* ---------- brand logos (transparent PNGs) ---------- */
.category-card .brand-logo {
  display: block;
  height: 64px;
  max-width: 80%;
  margin: 0 auto var(--space-1);
  object-fit: contain;
}
.brand-header-logo { display: block; height: 72px; max-width: 260px; object-fit: contain; margin-bottom: var(--space-1); }
.device-brand-logo { display: block; height: 36px; max-width: 160px; object-fit: contain; margin-bottom: 0.4rem; }
.device-photo .card-logo {
  position: absolute; inset: 0; margin: auto;
  width: auto; height: 38%; max-width: 60%; object-fit: contain; opacity: 0.55; z-index: 0;
}

/* ---------- tag chips ---------- */
.tag-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: var(--space-1); }
.tag-chips .tag-chip {
  font-family: var(--font-mono); font-size: 0.75rem; text-decoration: none;
  padding: 0.15rem 0.65rem; color: var(--ash);
  border: 1px solid var(--line); border-radius: 999px;
}
.tag-chips .tag-chip:hover { color: var(--halo-soft); border-color: var(--sage-bright); }

.source-link { margin: var(--space-1) 0 0; font-family: var(--font-mono); font-size: 0.8rem; }
.source-link a { color: var(--ash); }
.source-link a:hover { color: var(--halo-soft); }

/* =========================================================
   Information hub: specs, links, videos, compare, community
   ========================================================= */
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.hub-note { color: var(--ash); font-size: 0.9rem; line-height: 1.6; margin: var(--space-1) 0 var(--space-2); }
.hub-note a { color: var(--sage-bright); }
.hub-panel h3, .hub-group h3, .app-section h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.1rem; margin: var(--space-3) 0 var(--space-1); color: var(--halo-soft); }
.hub-section { padding: var(--space-3) 0 var(--space-4); }

/* tables */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: var(--space-2); }
.hub-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.hub-table th, .hub-table td { text-align: left; vertical-align: top; padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--line); line-height: 1.5; }
.hub-table thead th { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ash); }
.hub-table tbody th { font-weight: 600; color: var(--parchment); white-space: nowrap; }
.led-dot { display: inline-block; width: 0.8em; height: 0.8em; border-radius: 50%; margin-right: 0.3em; vertical-align: -0.05em; border: 1px solid rgba(255,255,255,0.35); }

/* link cards */
.hub-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--space-2); }
.hub-link { display: flex; flex-direction: column; gap: 0.25rem; padding: var(--space-2); background: var(--sanctuary); border: 1px solid var(--line); border-radius: 14px; color: var(--parchment); text-decoration: none; transition: border-color 0.15s ease, transform 0.15s ease; }
.hub-link:hover { border-color: var(--sage-bright); transform: translateY(-2px); }
.hub-link-platform { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--halo-soft); }
.hub-link-title { font-weight: 600; line-height: 1.35; }
.hub-link-desc { color: var(--ash); font-size: 0.85rem; line-height: 1.5; }
.hub-link-host { color: var(--lilac-smoke); font-family: var(--font-mono); font-size: 0.72rem; margin-top: auto; padding-top: 0.2rem; }

/* video */
.video-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: var(--space-3); margin-bottom: var(--space-3); }
.video-embed, .own-video { margin: 0; aspect-ratio: 16 / 9; background: #000; border-radius: 14px; overflow: hidden; position: relative; }
.own-video { aspect-ratio: auto; background: none; }
.own-video video, .hero-video video { width: 100%; max-height: 70vh; border-radius: 14px; background: #000; display: block; }
.own-video figcaption { color: var(--ash); font-size: 0.85rem; padding-top: 0.4rem; }
.hero-video { margin: 0 0 var(--space-3); }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-facade { position: absolute; inset: 0; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5rem; padding: var(--space-2); color: var(--parchment); font: inherit; cursor: pointer; border: 1px solid var(--line); border-radius: 14px; background: radial-gradient(ellipse at 50% 30%, rgba(232,184,75,0.18), transparent 70%), linear-gradient(160deg, var(--sanctuary-raised), var(--void)); }
.video-facade:hover { border-color: var(--halo); }
.video-play { display: grid; place-items: center; width: 3.4rem; height: 3.4rem; border-radius: 50%; background: var(--halo); color: var(--void); font-size: 1.3rem; padding-left: 0.2rem; }
.video-title { font-weight: 600; text-align: center; }
.video-note { color: var(--ash); font-size: 0.75rem; }

/* suggest form */
.suggest-form { margin-top: var(--space-4); padding: var(--space-3); border: 1px dashed var(--line); border-radius: 14px; display: grid; gap: var(--space-2); max-width: 44rem; }
.suggest-form h3 { margin: 0; }
.suggest-form label { display: grid; gap: 0.3rem; font-size: 0.85rem; color: var(--ash); }
.suggest-form input, .suggest-form select { padding: 0.55rem 0.8rem; font: inherit; color: var(--parchment); background: var(--sanctuary); border: 1px solid var(--line); border-radius: 8px; }
.suggest-row { display: grid; grid-template-columns: minmax(9rem, 12rem) 1fr; gap: var(--space-2); }
.suggest-form .btn { justify-self: start; }
.suggest-msg.ok { color: var(--sage-bright); }
.suggest-msg.bad { color: #e8836f; }

/* compare */
.header-actions { margin: var(--space-2) 0 0; }
.compare-toggle { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.04em; padding: 0.35rem 0.8rem; border-radius: 999px; border: 1px solid var(--line); background: rgba(23,17,31,0.85); color: var(--parchment); cursor: pointer; }
.compare-toggle:hover { border-color: var(--halo); }
.compare-toggle.on { border-color: var(--halo); color: var(--halo-soft); background: rgba(232,184,75,0.14); }
.compare-toggle.inline { position: static; font-size: 0.8rem; padding: 0.5rem 1.1rem; }
.card-wrap { position: relative; display: flex; }
.card-wrap > .device-card { flex: 1; }
.card-wrap > .compare-toggle { position: absolute; top: 10px; right: 10px; z-index: 3; }
.compare-tray { position: fixed; left: 50%; bottom: 1rem; transform: translateX(-50%); z-index: 50; display: flex; flex-wrap: wrap; gap: 0.6rem 1rem; align-items: center; max-width: min(96vw, 52rem); padding: 0.6rem 1rem; background: var(--sanctuary-raised); border: 1px solid var(--halo); border-radius: 16px; box-shadow: 0 8px 30px rgba(0,0,0,0.5); }
.compare-tray-label { font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--halo-soft); }
.compare-tray-items { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.compare-chip { display: inline-flex; gap: 0.4rem; align-items: center; padding: 0.25rem 0.7rem; background: var(--sanctuary); border: 1px solid var(--line); border-radius: 999px; font-size: 0.85rem; }
.compare-chip button { background: none; border: 0; color: var(--ash); font-size: 1.1rem; line-height: 1; cursor: pointer; }
.compare-picker { position: relative; max-width: 36rem; margin-bottom: var(--space-2); }
.compare-picker input { width: 100%; padding: 0.7rem 1rem; font: inherit; color: var(--parchment); background: var(--sanctuary); border: 1px solid var(--line); border-radius: 999px; }
.compare-results { position: absolute; z-index: 20; left: 0; right: 0; margin: 0.3rem 0 0; padding: 0.3rem; list-style: none; background: var(--sanctuary-raised); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 8px 30px rgba(0,0,0,0.5); }
.compare-results button { display: flex; flex-direction: column; gap: 0.1rem; width: 100%; text-align: left; padding: 0.55rem 0.8rem; font: inherit; color: var(--parchment); background: none; border: 0; border-radius: 10px; cursor: pointer; }
.compare-results button:hover:not(:disabled) { background: rgba(255,255,255,0.07); }
.compare-results button:disabled { opacity: 0.45; cursor: default; }
.compare-results small { color: var(--ash); font-size: 0.75rem; }
.compare-results .none { padding: 0.6rem 0.8rem; color: var(--ash); }
.compare-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: var(--space-2); }
.preset-row, .status-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: var(--space-3); }
.status-chip { padding: 0.4rem 0.9rem; font-family: var(--font-mono); font-size: 0.78rem; color: var(--ash); background: transparent; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; }
.status-chip:hover { border-color: var(--lilac-smoke); }
.status-chip.active { color: var(--halo-soft); border-color: var(--halo); background: rgba(232,184,75,0.1); }
.compare-controls { margin: var(--space-1) 0 var(--space-2); color: var(--ash); }
.compare-table { border-collapse: separate; border-spacing: 0; min-width: 100%; font-size: 0.9rem; }
.compare-table th, .compare-table td { padding: 0.6rem 0.8rem; vertical-align: top; text-align: left; border-bottom: 1px solid var(--line); line-height: 1.5; min-width: 11rem; }
.compare-table tbody th[scope="row"] { position: sticky; left: 0; z-index: 2; min-width: 9rem; max-width: 11rem; background: var(--sanctuary); font-weight: 600; }
.compare-table thead td:first-child { position: sticky; left: 0; background: var(--void); z-index: 3; min-width: 9rem; }
.compare-table .device-col { background: var(--sanctuary); border-radius: 12px 12px 0 0; }
.compare-table .device-col a { color: var(--halo-soft); font-weight: 600; text-decoration: none; display: block; margin: 0.15rem 0 0.4rem; }
.compare-table .col-photo { height: 90px; display: grid; place-items: center; margin-bottom: 0.4rem; }
.compare-table .col-photo img { max-height: 90px; max-width: 100%; object-fit: contain; border-radius: 8px; }
.compare-table .col-brand { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ash); }
.compare-table .col-remove { background: none; border: 0; color: var(--ash); font-size: 0.75rem; text-decoration: underline; cursor: pointer; padding: 0; }
.compare-table .section-row th { background: var(--sanctuary-raised); color: var(--halo-soft); font-family: var(--font-display); font-weight: 500; letter-spacing: 0.04em; padding: 0.5rem 0.8rem; position: static; max-width: none; }
.compare-scroll.only-diff .same-row { display: none; }
.mini-list { margin: 0; padding-left: 1.1rem; }
.mini-list li { margin-bottom: 0.2rem; }
.compare-table details summary { cursor: pointer; color: var(--sage-bright); }

/* home tiles */
.hub-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-2); padding-bottom: var(--space-4); }
.hub-tile { display: flex; flex-direction: column; gap: 0.4rem; padding: var(--space-3); background: var(--sanctuary); border: 1px solid var(--line); border-radius: 18px; color: var(--parchment); text-decoration: none; transition: border-color 0.15s ease, transform 0.15s ease; }
.hub-tile:hover { border-color: var(--halo); transform: translateY(-3px); }
.hub-tile strong { font-family: var(--font-display); font-weight: 500; font-size: 1.15rem; color: var(--halo-soft); }
.hub-tile span { color: var(--ash); font-size: 0.9rem; line-height: 1.5; }
.brand-heading { display: flex; align-items: center; gap: var(--space-2); }
.brand-heading h2 a { color: inherit; text-decoration: none; }

@media (max-width: 720px) {
  .suggest-row { grid-template-columns: 1fr; }
  .video-list { grid-template-columns: 1fr; }
  .compare-table th, .compare-table td { min-width: 9.5rem; }
  .compare-tray { bottom: 0.5rem; }
}

/* compare: no empty photo block when a device has no picture yet; keep the tray off the page bottom */
.compare-table .col-photo:empty { display: none; }
body.has-compare-tray { padding-bottom: 5.5rem; }

/* =========================================================
   App support: badges, the App tab, the Apps page, screenshots
   ========================================================= */
.app-chip { display: inline-block; align-self: flex-start; padding: 0.1rem 0.55rem; font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ash); border: 1px solid var(--line); border-radius: 999px; line-height: 1.6; }
.device-info .app-chip { margin-top: 0.15rem; }
.app-chip.yes { color: var(--sage-bright); border-color: rgba(127, 179, 136, 0.55); }
.app-chip.limited { color: var(--halo-soft); border-color: rgba(232, 184, 75, 0.5); }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--sage-bright); text-decoration: underline; cursor: pointer; }
.link-btn:hover { color: var(--halo-soft); }
.muted { color: var(--ash); }
a.status-chip { text-decoration: none; }

.app-line { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: var(--space-1) 0 0; color: var(--ash); font-size: 0.92rem; }

.app-verdict { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 1rem; padding: var(--space-2); margin-bottom: var(--space-2); background: var(--sanctuary); border: 1px solid var(--line); border-left: 4px solid var(--lilac-smoke); border-radius: 14px; }
.app-verdict.yes { border-left-color: var(--sage-bright); }
.app-verdict.limited { border-left-color: var(--halo); }
.app-verdict-label { font-family: var(--font-display); font-size: 1.15rem; color: var(--halo-soft); }
.app-verdict-text { color: var(--parchment); }
.app-glance { max-width: 44rem; }
.app-notes { max-width: 44rem; line-height: 1.6; }
.pairing-steps { max-width: 44rem; padding-left: 1.4rem; line-height: 1.6; }
.pairing-steps li { margin-bottom: 0.4rem; }
.app-card { margin-top: var(--space-3); padding: var(--space-3); background: var(--sanctuary); border: 1px solid var(--line); border-radius: 18px; }
.app-card h3 { margin-top: 0; }
.app-card p { max-width: 60ch; line-height: 1.6; }
.app-stores { display: flex; flex-wrap: wrap; gap: var(--space-1); margin: var(--space-2) 0 0; }

.shot-strip { display: flex; gap: var(--space-2); overflow-x: auto; padding-bottom: var(--space-1); scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.shot { flex: 0 0 auto; height: 360px; padding: 0; background: var(--sanctuary); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; cursor: zoom-in; scroll-snap-align: start; }
.shot:hover, .shot:focus-visible { border-color: var(--halo); outline: none; }
.shot img { display: block; height: 100%; width: auto; }

.lightbox { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: var(--space-3); background: rgba(10, 6, 16, 0.93); }
.lightbox img { max-width: min(92vw, 560px); max-height: 86vh; object-fit: contain; border-radius: 16px; }
.lightbox-close, .lightbox-nav { position: absolute; width: 2.8rem; height: 2.8rem; font-size: 1.6rem; line-height: 1; color: var(--parchment); background: rgba(36, 26, 51, 0.92); border: 1px solid var(--line); border-radius: 50%; cursor: pointer; }
.lightbox-close:hover, .lightbox-nav:hover { border-color: var(--halo); }
.lightbox-close { top: 1rem; right: 1rem; }
.lightbox-nav { top: 50%; transform: translateY(-50%); }
.lightbox-nav.prev { left: 1rem; }
.lightbox-nav.next { right: 1rem; }
.lightbox-count { position: absolute; bottom: 1rem; left: 50%; transform: translateX(-50%); font-family: var(--font-mono); font-size: 0.8rem; color: var(--ash); }

.app-section { border-top: 1px solid var(--line); }
.app-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 1rem; }
.app-head h2 { margin: 0; }
.app-maker, .app-platforms { color: var(--ash); font-family: var(--font-mono); font-size: 0.8rem; margin: 0; }
.app-platforms { margin-top: 0.3rem; }
.app-summary { max-width: 62ch; line-height: 1.6; }
.app-device-list { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; padding: 0; margin: var(--space-1) 0 var(--space-2); }
.app-device-list a { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.4rem 0.9rem; color: var(--parchment); text-decoration: none; border: 1px solid var(--line); border-radius: 999px; }
.app-device-list a:hover { border-color: var(--halo); }

@media (max-width: 720px) {
  .shot { height: 300px; }
  .lightbox-nav.prev { left: 0.4rem; }
  .lightbox-nav.next { right: 0.4rem; }
}

/* =========================================================
   Phones and tablets
   ---------------------------------------------------------
   Nothing here detects a "mobile device". It reacts to what the screen can actually do:
   how wide it is (max-width) and whether the main pointer is a finger (pointer: coarse).
   That is what keeps it right for every phone, a tablet turned on its side, or a desktop
   browser window dragged narrow. The menu button comes from js/mobile-nav.js; the rest is CSS.
   ========================================================= */

/* Safety net: if something ever does come out wider than the screen (a long pasted link, say),
   cut it off instead of letting the phone shrink the whole page to fit. */
body { overflow-x: hidden; }
@supports (overflow-x: clip) {
  body { overflow-x: clip; }
}

.swipe-hint { display: none; } /* shown on phones, see below */
.tabs-marker { height: 0; }

/* rich text written in the admin must never push the page wider */
.section-body img,
.kb-article-body img { max-width: 100%; height: auto; }
.section-body table,
.kb-article-body table { display: block; max-width: 100%; overflow-x: auto; }
.section-body pre,
.kb-article-body pre { max-width: 100%; overflow-x: auto; }

/* ---------- touch screens (any width) ---------- */
@media (pointer: coarse), (max-width: 640px) {
  a, button, input, select, textarea, summary, label { touch-action: manipulation; }

  .btn { min-height: 44px; justify-content: center; }
  .btn:active { transform: scale(0.98); }

  /* iPhones zoom the whole page when you tap a field smaller than 16px */
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
  select,
  textarea { font-size: 16px; }

  .section-tab,
  .filter-pill,
  .status-chip { min-height: 44px; display: inline-flex; align-items: center; }
  .tag-chips { gap: 0.5rem; }
  .tag-chips .tag-chip { display: inline-flex; align-items: center; min-height: 40px; padding: 0 0.9rem; }
  .app-device-list a { min-height: 44px; }
  .link-btn { min-height: 44px; }
  .breadcrumb a { display: inline-block; padding: 0.7rem 0.5rem; margin-left: -0.5rem; }
  .brand { min-height: 44px; }
  .status-chip { min-width: 44px; justify-content: center; }
  .compare-table details summary { display: flex; align-items: center; min-height: 44px; }
  .compare-table .col-remove { min-height: 44px; padding: 0 0.25rem; }
  .compare-results button { min-height: 48px; }
  .compare-chip button { width: 40px; height: 40px; font-size: 1.3rem; }
  .compare-controls label { display: flex; align-items: center; gap: 0.7rem; min-height: 44px; }
  .compare-controls input[type="checkbox"] { width: 22px; height: 22px; flex: none; accent-color: var(--halo); }
  .age-gate-decline { min-height: 44px; padding: 0 1rem; }
  .kb-links a { display: inline-flex; align-items: center; min-height: 44px; }
  .site-footer .site-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.35rem; }
  .brand-heading h2 a { display: inline-block; padding: 0.5rem 0; }
  .contact-form input, .contact-form textarea,
  .suggest-form input, .suggest-form select { font-size: 16px; }

  /* a finger has no hover, so a tapped card must not stay lifted; give a pressed look instead */
  .device-card:active, .category-card:active, .hub-tile:active, .hub-link:active, .kb-card:active {
    border-color: var(--sage-bright);
    background: var(--sanctuary-raised);
  }
}
@media (hover: none) {
  .device-card:hover, .category-card:hover, .hub-tile:hover, .hub-link:hover, .kb-card:hover,
  .btn-primary:hover { transform: none; }
}

/* ---------- phones ---------- */
@media (max-width: 640px) {
  :root { --gutter: var(--space-2); }

  /* spacing and headings scaled down */
  .hero { padding: var(--space-3) 0 var(--space-3); overflow-x: hidden; overflow-x: clip; }
  .overseer { top: 0.6rem; }
  .hero-arch { padding-top: var(--space-3); padding-bottom: var(--space-3); }
  .hero-arch img.emblem { width: 72px; }
  .hero p.lede { font-size: 1rem; }
  .categories { padding-top: var(--space-3); padding-bottom: var(--space-3); }
  .section-heading { margin-bottom: var(--space-2); }
  .section-heading h2 { font-size: 1.4rem; }
  .shop-header { padding: var(--space-3) 0 var(--space-2); }
  .shop-header h1 { font-size: 1.7rem; }
  .device-header .product-title,
  .product-title { font-size: 1.6rem; }
  .hub-section { padding: var(--space-2) 0 var(--space-3); }
  .kb-article { padding: var(--space-3) 0 var(--space-4); }
  .kb-card { padding: var(--space-2); }
  .newsletter-section { padding-bottom: var(--space-4); }
  /* a flatter arch and more room at the top, so the heading doesn't run into the curve */
  .newsletter-card { padding: var(--space-4) var(--space-2) var(--space-3); border-radius: 80px 80px 12px 12px; }
  .contact-form-wrap { padding-bottom: var(--space-4); }

  /* brand tiles on the home page: two across instead of one giant arch per row */
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-1); }
  .category-card { padding: var(--space-2) var(--space-1); border-radius: 80px 80px 10px 10px; }
  .category-card .brand-logo { height: 44px; }

  .hub-tiles { grid-template-columns: 1fr; gap: var(--space-1); padding-bottom: var(--space-3); }
  .hub-tile { padding: var(--space-2); }

  /* forms: the button goes under the field, both full width */
  .newsletter-card form { flex-direction: column; }
  .newsletter-card input[type="email"] { min-height: 48px; }
  .newsletter-card .btn { width: 100%; }
  .contact-form input, .contact-form textarea { min-height: 48px; font-size: 16px; }
  .contact-form textarea { min-height: 9rem; }
  .contact-form button { align-self: stretch; }
  .suggest-form { padding: var(--space-2); }
  .suggest-form input, .suggest-form select { min-height: 48px; font-size: 16px; }
  .suggest-form .btn { justify-self: stretch; }
  .compare-picker input { min-height: 48px; }
  .sort-select { min-height: 44px; }

  /* footer */
  .site-footer { padding-top: var(--space-3); }
  .site-footer .foot-grid { flex-direction: column; gap: var(--space-1); margin-bottom: var(--space-2); }
  .site-footer .site-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--space-3); font-size: 0.95rem; }
  .site-footer .site-nav a { display: flex; align-items: center; min-height: 44px; }
  .site-footer .disclaimer { font-size: 0.78rem; }

  /* age gate: shorter panel, still centred */
  .age-gate-panel { padding-top: var(--space-3); padding-bottom: var(--space-2); }

  /* ---------- compare tray: a bar across the bottom of the screen ---------- */
  .compare-tray {
    left: 0;
    right: 0;
    bottom: 0;
    transform: none;
    max-width: none;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "label go" "items items";
    gap: 0.5rem 0.75rem;
    padding: 0.7rem var(--gutter) 0.8rem;
    border-width: 1px 0 0;
    border-radius: 18px 18px 0 0;
  }
  .compare-tray-label { grid-area: label; }
  .compare-tray-count { opacity: 0.75; }
  .compare-tray > .btn { grid-area: go; padding: 0.5rem 1rem; font-size: 0.78rem; line-height: 1.25; text-align: center; }
  .compare-tray-items {
    grid-area: items;
    flex-wrap: nowrap;
    overflow-x: auto;
    margin: 0 calc(-1 * var(--gutter));
    padding: 0 var(--gutter);
    scrollbar-width: none;
  }
  .compare-tray-items::-webkit-scrollbar { display: none; }
  .compare-chip { flex: none; padding: 0 0 0 0.8rem; min-height: 40px; }
  body.has-compare-tray { padding-bottom: 8.5rem; }

  .kb-links { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 0.5rem; }
  .kb-links a { display: flex; align-items: center; min-height: 48px; padding: 0.5rem 1rem; font-size: 0.82rem; line-height: 1.35; border-radius: 14px; }
  .source-link { margin-top: var(--space-2); }
  .source-link a { display: inline-block; padding: 0.8rem 0; }
  .app-stores .btn { flex: 1 1 100%; }

  /* ---------- tables ---------- */
  .hub-table { font-size: 0.88rem; }
  .hub-table th, .hub-table td { padding: 0.55rem 0.65rem; }
  .app-card { padding: var(--space-2); }

  /* the comparison table runs edge to edge, with a narrow label column that stays put
     while the devices scroll past it: two devices fit on screen at a time */
  .compare-scroll {
    margin-left: calc(-1 * var(--gutter));
    margin-right: calc(-1 * var(--gutter));
    scroll-padding-left: 6.8rem;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
  }
  .compare-table { font-size: 0.85rem; }
  .compare-table th, .compare-table td {
    min-width: calc((100vw - 6.8rem) / 2);
    max-width: calc((100vw - 6.8rem) / 2);
    padding: 0.55rem 0.6rem;
    scroll-snap-align: start;
  }
  .compare-table tbody th[scope="row"],
  .compare-table thead td:first-child {
    min-width: 6.8rem;
    max-width: 6.8rem;
    width: 6.8rem;
    padding-left: var(--gutter);
    padding-right: 0.5rem;
    font-size: 0.78rem;
    scroll-snap-align: none;
  }
  .compare-table .section-row th { min-width: 0; max-width: none; padding-left: var(--gutter); }
  .compare-table .col-photo { height: 64px; }
  .compare-table .col-photo img { max-height: 64px; }
  .compare-table .device-col a { overflow-wrap: anywhere; min-height: 3em; }
  .swipe-hint { display: block; margin: 0 0 var(--space-1); color: var(--ash); font-family: var(--font-mono); font-size: 0.75rem; }

  /* ---------- screenshots ---------- */
  .shot { height: 260px; }
  .lightbox { padding: var(--space-2); touch-action: none; overscroll-behavior: contain; }
  .lightbox img { max-width: 94vw; max-height: 80vh; max-height: 80dvh; }
  .lightbox-nav { top: auto; bottom: 0.8rem; transform: none; }
  .lightbox-nav.prev { left: 1rem; }
  .lightbox-nav.next { right: 1rem; }
  .lightbox-close { top: 0.8rem; right: 0.8rem; }
}

/* ---------- compact layouts: a phone held upright, or turned on its side ----------
   (width alone isn't enough: a phone on its side is wide but only about 400px tall) */
@media (max-width: 640px), (max-height: 500px) and (max-width: 960px) {
  /* ---------- lists of devices: a compact row per device, thumbnail on the left ---------- */
  .device-grid { grid-template-columns: 1fr; gap: var(--space-1); padding-bottom: var(--space-4); }
  .device-card { flex-direction: row; border-radius: 16px; min-height: 92px; }
  .device-photo { flex: none; width: 92px; aspect-ratio: auto; min-height: 92px; font-size: 1.6rem; }
  .device-info { min-width: 0; justify-content: center; gap: 0.15rem; padding: 0.6rem 3.9rem 0.6rem 0.85rem; }
  .product-name { font-size: 1rem; overflow-wrap: anywhere; }
  .product-badge { top: 5px; left: 5px; padding: 0.1rem 0.45rem; font-size: 0.75rem; }

  /* the Compare button becomes a round + on the right of the row */
  .card-wrap > .compare-toggle {
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    font-size: 1.3rem;
    line-height: 1;
  }
  .card-wrap > .compare-toggle .ct-text { display: none; }
  .card-wrap > .compare-toggle .ct-icon { display: block; }

  /* ---------- device page ---------- */
  /* title, app line, features and the compare button first; then the tabs and the text;
     the tags, guide links and source link come last */
  #device-root { display: flex; flex-direction: column; }
  #device-root .device-header { display: contents; }
  #device-root .device-brand-logo { align-self: flex-start; }
  #device-root .hero-video { order: 1; }
  #device-root .section-tabs { order: 2; }
  #device-root #section-panel { order: 3; }
  #device-root .device-extras { order: 4; margin-top: var(--space-3); padding-top: var(--space-2); border-top: 1px solid var(--line); }
  #device-root .device-extras > :first-child { margin-top: 0; }
  #device-root .header-actions { margin: var(--space-1) 0 var(--space-3); }
  #device-root .header-actions .compare-toggle { min-height: 44px; padding: 0 1.2rem; font-size: 0.85rem; }
  .device-header .app-line { margin-bottom: var(--space-1); }
  .features-list { margin-bottom: var(--space-2); }

  .section-tabs {
    position: sticky;
    top: 0;
    z-index: 30;
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    gap: 0.5rem;
    margin: 0 calc(-1 * var(--gutter)) var(--space-2);
    padding: 0.55rem var(--gutter);
    background: var(--void);
    scrollbar-width: none;
  }
  .section-tabs::-webkit-scrollbar { display: none; }
  .section-tab { flex: none; white-space: nowrap; padding: 0 1.1rem; font-size: 0.85rem; }
  .section-tabs.is-flat:not(.is-stuck) { background: transparent; }
  .section-tabs.is-stuck { box-shadow: 0 10px 16px -12px rgba(0, 0, 0, 0.8); }
  #device-root .tabs-marker { order: 2; height: 1px; margin-bottom: -1px; pointer-events: none; }

  /* ---------- small print stays readable: nothing under 12px ---------- */
  .product-brand, .app-chip, .hub-link-platform, .hub-link-host, .compare-table .col-brand,
  .hub-table thead th, .age-gate-fineprint, .category-card p, .video-note { font-size: 0.75rem; }
  .breadcrumb, .filter-pill { font-size: 0.8rem; }
  .product-badge { font-size: 0.75rem; }
  .site-footer .disclaimer { font-size: 0.78rem; }
}
@media (max-height: 500px) and (max-width: 960px) {
  .device-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* a phone turned on its side: the age gate must fit without scrolling forever */
@media (max-height: 520px) {
  .age-gate-panel { max-width: 640px; padding: var(--space-2) var(--space-3); border-radius: 56px 56px 12px 12px; }
  .age-gate-panel img.emblem { width: 36px; margin-bottom: 0.3rem; }
  .age-gate-panel h2 { font-size: 1.05rem; }
  .age-gate-panel p { margin-bottom: var(--space-1); font-size: 0.85rem; }
  .age-gate-actions { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: center; }
  .age-gate-decline { margin-top: 0; }
  .age-gate-fineprint { margin-top: var(--space-1); }
}

/* very narrow phones (iPhone SE, small Androids) */
@media (max-width: 360px) {
  .site-header .brand { font-size: 1.05rem; }
  .site-header .brand img { width: 30px; height: 30px; }
  .site-header .cart-pill { padding: 0 0.8rem; }
  .hero h1 { font-size: 1.8rem; }
  .device-photo { width: 80px; min-height: 80px; }
  .device-card { min-height: 80px; }
}
