/* ============================================================
   Unlimited Edition — portfolio styles
   Single shared stylesheet. No external fonts, no CDNs.
   Theme via prefers-color-scheme + [data-theme] override.
   ============================================================ */

:root {
  color-scheme: light dark;

  /* Studio accent (neutral, not tied to a single app) */
  --accent: #5b52e6;
  --accent-2: #8b5cf6;

  /* Light theme surfaces */
  --bg: #fbfbfd;
  --bg-soft: #f3f3f8;
  --surface: #ffffff;
  --surface-2: #f6f6fa;
  --text: #14141a;
  --muted: #5b5b6a;
  --border: rgba(17, 17, 26, 0.10);
  --border-strong: rgba(17, 17, 26, 0.16);
  --shadow-sm: 0 1px 2px rgba(17, 17, 26, 0.05), 0 1px 3px rgba(17, 17, 26, 0.06);
  --shadow-md: 0 6px 20px rgba(17, 17, 26, 0.08), 0 2px 6px rgba(17, 17, 26, 0.05);
  --shadow-lg: 0 24px 60px rgba(17, 17, 26, 0.12);

  /* Per-card brand, overridden inline; sensible default */
  --brand: var(--accent);
  --brand-2: var(--accent-2);

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --maxw: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b10;
    --bg-soft: #101017;
    --surface: #141419;
    --surface-2: #1b1b23;
    --text: #ececf2;
    --muted: #9d9db0;
    --border: rgba(255, 255, 255, 0.10);
    --border-strong: rgba(255, 255, 255, 0.18);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 8px 26px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 30px 70px rgba(0, 0, 0, 0.6);
  }
}

/* Explicit toggle overrides (win over media query in both directions) */
:root[data-theme="light"] {
  --bg: #fbfbfd; --bg-soft: #f3f3f8; --surface: #ffffff; --surface-2: #f6f6fa;
  --text: #14141a; --muted: #5b5b6a; --border: rgba(17,17,26,0.10);
  --border-strong: rgba(17,17,26,0.16);
  --shadow-sm: 0 1px 2px rgba(17,17,26,0.05), 0 1px 3px rgba(17,17,26,0.06);
  --shadow-md: 0 6px 20px rgba(17,17,26,0.08), 0 2px 6px rgba(17,17,26,0.05);
  --shadow-lg: 0 24px 60px rgba(17,17,26,0.12);
}
:root[data-theme="dark"] {
  --bg: #0b0b10; --bg-soft: #101017; --surface: #141419; --surface-2: #1b1b23;
  --text: #ececf2; --muted: #9d9db0; --border: rgba(255,255,255,0.10);
  --border-strong: rgba(255,255,255,0.18);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
  --shadow-md: 0 8px 26px rgba(0,0,0,0.45);
  --shadow-lg: 0 30px 70px rgba(0,0,0,0.6);
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important;
      transition-duration: 0.001ms !important; }
}
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
ul { margin: 0; }

/* Accessible focus ring */
:where(a, button, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: #fff; padding: 10px 16px;
  border-radius: 0 0 10px 0; font-weight: 600;
}
.skip-link:focus { left: 0; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 66px; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 11px; font-weight: 700; letter-spacing: -0.01em; }
.brand .mark {
  width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid; place-items: center; color: #fff;
  box-shadow: var(--shadow-sm);
}
.brand .mark svg { width: 19px; height: 19px; }
.brand-name { font-size: 1.02rem; }

.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a {
  padding: 8px 13px; border-radius: 9px; color: var(--muted);
  font-size: 0.93rem; font-weight: 550; transition: color .15s, background .15s;
}
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }

/* Header right cluster: language switcher + theme toggle.
   Kept as one flex group so it stays on row 1 when the nav wraps on mobile. */
.header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

/* ---------- Language switcher (EN | SR) ---------- */
.lang-switch {
  display: inline-flex; align-items: center; gap: 2px; padding: 3px;
  border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface-2); flex-shrink: 0;
}
.lang-pill {
  display: inline-grid; place-items: center; min-width: 32px; height: 32px;
  padding: 0 9px; border-radius: 999px; color: var(--muted);
  font-size: 0.74rem; font-weight: 700; letter-spacing: 0.05em; line-height: 1;
  transition: color .15s, background .15s;
}
.lang-pill:hover { color: var(--text); background: var(--surface); }
.lang-pill[aria-current="true"] {
  color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: var(--shadow-sm); cursor: default;
}
.lang-pill[aria-current="true"]:hover {
  color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.lang-pill:focus-visible { outline-offset: 2px; border-radius: 999px; }

.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px;
  border-radius: 10px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); cursor: pointer; transition: background .15s, border-color .15s;
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--border-strong); }
.icon-btn svg { width: 19px; height: 19px; }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: block; }
}

.nav-hide { display: none; }
@media (min-width: 720px) { .nav-hide { display: flex; } }
/* Mobile: row 1 = brand + (language switcher, theme toggle);
   row 2 = the nav, wrapped full-width and centered. */
@media (max-width: 719px) {
  /* keep the .wrap gutter — `padding: 9px 0` would flush the header to the edge */
  .header-inner { flex-wrap: wrap; height: auto; padding: 9px 24px; gap: 8px 12px; }
  .brand { order: 1; min-width: 0; }
  .header-actions { order: 2; margin-left: auto; }
  /* One scrollable row, never two: five Serbian labels do not fit 390px, and a
     wrapping nav pushed the sticky header to 143px — 17% of a phone screen. */
  .nav { order: 3; flex-basis: 100%; margin-left: 0; justify-content: flex-start;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; -ms-overflow-style: none;
    /* Fade the trailing edge so a clipped label reads as "scroll me", not as a bug.
       When the labels fit they are centred and the fade falls on empty space. */
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 22px), transparent);
    mask-image: linear-gradient(90deg, #000 calc(100% - 22px), transparent); }
  .nav::-webkit-scrollbar { display: none; }
  .nav-hide { display: flex; flex-wrap: nowrap; gap: 2px; margin-inline: auto; }
  .nav a { padding: 6px 10px; font-size: 0.88rem; white-space: nowrap; }

  /* A wrapping flex row left the four stats ragged; a 2x2 grid keeps them aligned. */
  .hero-stats { margin-top: 34px; display: grid; grid-template-columns: repeat(2, 1fr);
    gap: 20px 14px; }
  .hero { padding: 52px 0 40px; }
  .wrap { padding: 0 18px; }
}
@media (max-width: 400px) {
  .header-actions { gap: 8px; }
  .lang-pill { min-width: 28px; padding: 0 7px; }
  .brand-name { font-size: 0.95rem; }
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 84px 0 56px; }
.hero::before {
  content: ""; position: absolute; inset: -40% 0 auto 0; height: 620px; z-index: -1;
  background:
    radial-gradient(60% 60% at 22% 12%, color-mix(in srgb, var(--accent) 26%, transparent), transparent 70%),
    radial-gradient(50% 50% at 82% 8%, color-mix(in srgb, var(--accent-2) 22%, transparent), transparent 70%);
  filter: blur(6px);
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 22px;
  padding: 6px 13px 6px 8px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); box-shadow: var(--shadow-sm);
  font-size: 0.83rem; color: var(--muted); font-weight: 550;
}
.hero-eyebrow .dot { width: 8px; height: 8px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.hero h1 {
  font-size: clamp(2.3rem, 6vw, 4rem); line-height: 1.05; letter-spacing: -0.03em;
  font-weight: 800; max-width: 15ch;
}
.hero h1 .grad {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub {
  margin-top: 22px; font-size: clamp(1.05rem, 2.2vw, 1.28rem);
  color: var(--muted); max-width: 56ch;
}
.hero-cta { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 9px; font-weight: 600;
  padding: 12px 20px; border-radius: 12px; font-size: 0.98rem; cursor: pointer;
  border: 1px solid transparent; transition: transform .12s, box-shadow .15s, background .15s;
}
.btn:active { transform: translateY(1px); }
/* The gradient stops short of the full --accent-2 tint: white text on the light end of
   accent → accent-2 measures 4.2:1, under the 4.5:1 AA threshold. This mix keeps 4.8:1. */
.btn-primary { color: #fff; box-shadow: var(--shadow-md);
  background: var(--accent);
  background: linear-gradient(135deg, var(--accent),
    color-mix(in srgb, var(--accent-2) 50%, var(--accent))); }
.btn-primary:hover { box-shadow: var(--shadow-lg); }
.btn-ghost { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--border-strong); }

.hero-stats { margin-top: 46px; display: flex; flex-wrap: wrap; gap: 14px 34px; }
.hero-stat { display: flex; flex-direction: column; }
.hero-stat b { font-size: 1.5rem; letter-spacing: -0.02em; }
.hero-stat span { color: var(--muted); font-size: 0.86rem; }

/* ---------- Sections ---------- */
section { padding: 68px 0; }
.section-head { max-width: 60ch; margin-bottom: 40px; }
.section-head .kicker {
  text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.76rem;
  font-weight: 700; color: var(--accent); margin-bottom: 12px;
}
.section-head h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); letter-spacing: -0.02em; font-weight: 800; }
.section-head p { margin-top: 12px; color: var(--muted); font-size: 1.05rem; }
.section-head code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9em; }
.inline-link { color: var(--accent); font-weight: 600; text-decoration: underline;
  text-underline-offset: 2px; }
.inline-link:hover { text-decoration-thickness: 2px; }

/* ---------- App grid ---------- */
.app-grid {
  display: grid; gap: 22px;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
}
.app-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 26px; box-shadow: var(--shadow-sm);
  overflow: hidden; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.app-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 4px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
}
.app-card::after {
  content: ""; position: absolute; top: -60px; right: -60px; width: 180px; height: 180px;
  background: radial-gradient(circle, color-mix(in srgb, var(--brand) 20%, transparent), transparent 70%);
  opacity: 0; transition: opacity .25s; pointer-events: none;
}
.app-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg);
  border-color: color-mix(in srgb, var(--brand) 40%, var(--border)); }
.app-card:hover::after { opacity: 1; }

.app-top { display: flex; align-items: center; gap: 15px; margin-bottom: 18px; }
.app-icon {
  width: 60px; height: 60px; border-radius: 16px; flex-shrink: 0;
  background: linear-gradient(140deg, var(--brand), var(--brand-2));
  display: grid; place-items: center; color: #fff;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--brand) 40%, transparent);
}
.app-icon svg { width: 32px; height: 32px; }
.app-titles { min-width: 0; }
.app-name { font-size: 1.12rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; }
.app-pkg { font-size: 0.78rem; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

.app-tagline { color: var(--muted); font-size: 0.97rem; margin-bottom: 16px; }

.chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 22px; }
.chip {
  font-size: 0.78rem; font-weight: 550; padding: 5px 11px; border-radius: 999px;
  color: color-mix(in srgb, var(--brand) 72%, var(--text));
  background: color-mix(in srgb, var(--brand) 12%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--brand) 22%, transparent);
}
@media (prefers-color-scheme: dark) {
  .chip { color: color-mix(in srgb, var(--brand) 42%, var(--text));
    background: color-mix(in srgb, var(--brand) 18%, var(--surface)); }
}

/* Card footer: the direct APK download is the primary action. */
.app-actions { margin-top: auto; display: flex; flex-direction: column; gap: 9px; padding-top: 6px; }
/* Deliberately the studio accent, not the card's --brand: the lighter brands (orange,
   sky blue) cannot carry white text at 4.5:1, and the primary action must stay legible
   on all seven cards. The brand colour still owns the top rule, icon and chips. */
.btn-download {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  padding: 12px 18px; border-radius: 12px; font-size: 0.97rem; font-weight: 650; color: #fff;
  background: var(--accent);
  background: linear-gradient(135deg, var(--accent),
    color-mix(in srgb, var(--accent-2) 50%, var(--accent)));
  box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 30%, transparent);
  transition: transform .12s, box-shadow .15s, filter .15s;
}
.btn-download svg { width: 19px; height: 19px; flex-shrink: 0; }
.btn-download:hover { filter: brightness(1.07);
  box-shadow: 0 10px 24px color-mix(in srgb, var(--accent) 40%, transparent); }
.btn-download:active { transform: translateY(1px); }
.dl-meta { color: var(--muted); font-size: 0.82rem; text-align: center; }

.app-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 9px 14px; margin-top: 3px; padding-top: 13px; border-top: 1px solid var(--border);
}
/* Not a link: the apps are not on Google Play yet, so this is a plain disabled badge. */
.play-soon {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 5px 11px 5px 9px; border-radius: 999px;
  font-size: 0.76rem; font-weight: 600; color: var(--muted);
  background: var(--surface-2); border: 1px dashed var(--border-strong);
}
.play-soon svg { width: 13px; height: 13px; flex-shrink: 0; opacity: 0.8; }
.app-links { display: inline-flex; align-items: center; gap: 14px; }
.app-link {
  font-size: 0.84rem; font-weight: 600; color: var(--muted);
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
  transition: color .15s;
}
.app-link:hover { color: var(--brand); }
.app-link svg { width: 13px; height: 13px; }

/* ---------- Ethos ---------- */
.ethos { background: var(--bg-soft); border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border); }
.ethos-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.ethos-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm);
}
.ethos-item .e-icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
  color: var(--accent); margin-bottom: 16px;
}
.ethos-item .e-icon svg { width: 22px; height: 22px; }
.ethos-item h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 6px; }
.ethos-item p { color: var(--muted); font-size: 0.93rem; }

/* ---------- Privacy index list ---------- */
.privacy-list { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.privacy-row {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); transition: border-color .15s, transform .15s;
}
.privacy-row:hover { transform: translateX(3px);
  border-color: color-mix(in srgb, var(--brand) 45%, var(--border)); }
.privacy-row .pr-icon {
  width: 40px; height: 40px; border-radius: 11px; flex-shrink: 0; color: #fff;
  background: linear-gradient(140deg, var(--brand), var(--brand-2));
  display: grid; place-items: center;
}
.privacy-row .pr-icon svg { width: 22px; height: 22px; }
.privacy-row .pr-name { font-weight: 650; font-size: 0.97rem; }
.privacy-row .pr-meta { color: var(--muted); font-size: 0.82rem; }
.privacy-row .pr-arrow { margin-left: auto; color: var(--muted); }
.privacy-row .pr-arrow svg { width: 18px; height: 18px; }

/* ---------- Contact ---------- */
.contact-card {
  background: var(--surface);
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--accent) 12%, var(--surface)),
    color-mix(in srgb, var(--accent-2) 10%, var(--surface)));
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 44px; text-align: center; box-shadow: var(--shadow-sm);
}
.contact-card h2 { font-size: clamp(1.6rem, 3.5vw, 2.1rem); letter-spacing: -0.02em; }
.contact-card p { color: var(--muted); margin-top: 12px; max-width: 48ch; margin-inline: auto; }
.contact-email {
  display: inline-flex; align-items: center; gap: 9px; margin-top: 24px;
  font-weight: 700; font-size: 1.1rem; color: var(--accent);
  padding: 12px 22px; border-radius: 12px; background: var(--surface);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 50px 0 40px; background: var(--bg-soft); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 26px; justify-content: space-between; }
.footer-brand { max-width: 34ch; }
.footer-brand .brand { margin-bottom: 12px; }
.footer-brand p { color: var(--muted); font-size: 0.9rem; }
.footer-cols { display: flex; flex-wrap: wrap; gap: 44px; }
.footer-col h4 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--muted); margin-bottom: 14px; font-weight: 700; }
.footer-col a { display: block; color: var(--text); font-size: 0.92rem; padding: 4px 0;
  opacity: 0.85; transition: opacity .15s; }
.footer-col a:hover { opacity: 1; }
.footer-col a[aria-current="true"] { opacity: 1; color: var(--accent); font-weight: 650; }
.footer-bottom { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
  color: var(--muted); font-size: 0.85rem; }

/* ---------- Privacy article page ---------- */
.doc { padding: 56px 0 96px; }
.doc-nav { padding: 20px 0; }
.back-link { display: inline-flex; align-items: center; gap: 7px; color: var(--muted);
  font-size: 0.9rem; font-weight: 600; }
.back-link:hover { color: var(--text); }
.back-link svg { width: 16px; height: 16px; }
.doc-head { display: flex; align-items: center; gap: 18px; margin-bottom: 10px; }
.doc-icon { width: 56px; height: 56px; border-radius: 15px; flex-shrink: 0; color: #fff;
  background: linear-gradient(140deg, var(--brand), var(--brand-2)); display: grid; place-items: center;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--brand) 40%, transparent); }
.doc-icon svg { width: 30px; height: 30px; }
.doc-head h1 { font-size: clamp(1.5rem, 4vw, 2rem); letter-spacing: -0.02em; }
.doc-updated { color: var(--muted); font-size: 0.9rem; margin: 6px 0 36px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.doc-updated .badge { font-size: 0.75rem; font-weight: 650; padding: 3px 10px; border-radius: 999px;
  color: var(--brand); background: color-mix(in srgb, var(--brand) 12%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent); }
.doc article { max-width: 720px; }
.doc .lead { color: var(--muted); font-size: 1.08rem; }
.doc .callout {
  background: color-mix(in srgb, var(--brand) 8%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--brand) 22%, var(--border));
  border-left: 4px solid var(--brand);
  border-radius: 14px; padding: 20px 24px; margin: 28px 0;
}
.doc h2 { font-size: 1.2rem; margin-top: 42px; letter-spacing: -0.01em; }
.doc p { margin-top: 14px; }
.doc ul { margin-top: 14px; padding-left: 1.3em; }
.doc li { margin: 6px 0; }
.doc a { color: var(--brand); font-weight: 550; }
.doc a:hover { text-decoration: underline; }
.doc code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.88em;
  background: var(--surface-2); padding: 2px 6px; border-radius: 6px; }
.doc-footer { margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--border);
  color: var(--muted); font-size: 0.85rem; }

/* ---------- Install page ---------- */
/* The APK table needs more room than a prose column allows. */
.doc-wide article { max-width: 900px; }

.doc .callout-warn {
  background: color-mix(in srgb, #d97706 10%, var(--surface));
  border-color: color-mix(in srgb, #d97706 26%, var(--border));
  border-left-color: #d97706;
}

.steps { counter-reset: step; list-style: none; padding: 0; margin: 24px 0 0;
  display: grid; gap: 13px; }
.steps li {
  position: relative; margin: 0; padding: 16px 20px 16px 58px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 16px; top: 16px; width: 28px; height: 28px;
  border-radius: 9px; display: grid; place-items: center;
  font-size: 0.85rem; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}
.steps strong { display: block; margin-bottom: 3px; }
.steps p { margin-top: 0; color: var(--muted); font-size: 0.94rem; }

.cmd-list { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 12px; }
.cmd-list li { margin: 0; }
.cmd-list strong { display: block; margin-bottom: 5px; color: var(--muted);
  font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.07em; }
.cmd-list code { display: block; overflow-x: auto; white-space: pre;
  padding: 10px 13px; border-radius: 10px; border: 1px solid var(--border);
  font-size: 0.82rem; }

.table-scroll {
  margin: 24px 0 6px; overflow-x: auto; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.apk-table { width: 100%; min-width: 780px; border-collapse: collapse; font-size: 0.9rem; }
.apk-table th, .apk-table td { padding: 13px 16px; text-align: left; vertical-align: top;
  border-bottom: 1px solid var(--border); }
.apk-table thead th { font-size: 0.73rem; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.08em; white-space: nowrap; }
.apk-table tbody th { font-weight: 650; }
.apk-table tbody tr:last-child th, .apk-table tbody tr:last-child td { border-bottom: 0; }
.apk-table .nowrap { white-space: nowrap; }
.apk-table .digest { display: block; max-width: 34ch; padding: 0; background: none;
  font-size: 0.72rem; line-height: 1.5; color: var(--muted); word-break: break-all; }
.table-note { margin-top: 12px; color: var(--muted); font-size: 0.85rem; }

/* ============================================================
   color-mix() fallback — REQUIRED, not decorative.
   Every colour here is derived with color-mix(), and every one of those
   declarations also contains var(). A declaration containing var() is only
   validated after substitution, so on a browser without color-mix() support
   it becomes "invalid at computed-value time" and the property resets to its
   INITIAL value — it does NOT fall back to an earlier declaration. A plain
   fallback line above therefore does nothing; a feature query is the only
   thing that works. Without this block, older Chrome / Samsung Internet /
   Android WebView render a transparent sticky header, invisible white-on-white
   buttons and colourless chips.
   ============================================================ */
@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .site-header { background: var(--bg); }
  .nav a[aria-current="page"] { background: var(--surface-2); }
  .hero::before { background: none; }
  .btn-primary { background: var(--accent); }
  .app-card::after { background: none; }
  .app-card:hover { border-color: var(--border-strong); }
  .app-icon { box-shadow: var(--shadow-md); }
  .chip { color: var(--text); background: var(--surface-2); border-color: var(--border); }
  .btn-download { background: var(--accent); box-shadow: var(--shadow-md); }
  .btn-download:hover { box-shadow: var(--shadow-lg); }
  .ethos-item .e-icon { background: var(--surface-2); }
  .privacy-row:hover { border-color: var(--border-strong); }
  .contact-card { background: var(--surface); }
  .doc-icon { box-shadow: var(--shadow-md); }
  .doc-updated .badge { background: var(--surface-2); border-color: var(--border); }
  .doc .callout { background: var(--surface-2); border-color: var(--border); }
  .doc .callout-warn { background: var(--surface-2); border-color: var(--border-strong); }
}
