/* ==========================================================================
   Diwa Games APK
   Design language taken from the diwagames.win reference pages:
     light lavender-grey page, white rounded cards, uppercase section labels
     with a short accent underline, icon-grid app cards, split app header,
     download-links block, dark footer with an accent title + outline pills.
   Palette is our own — "Indigo & Teal" (the reference runs magenta + yellow).
   Every pairing below was contrast-checked; lowest is 4.67:1.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* --------------------------------------------------------------- tokens */
:root {
  --page:        #EDF0F8;
  --surface:     #FFFFFF;
  --surface-2:   #F5F7FB;
  --ink:         #0F1424;
  --muted:       #586179;
  --line:        #E1E6F0;
  --line-soft:   #EDF0F6;

  --accent:      #4F46E5;
  --accent-dark: #3F37C9;
  --accent-soft: #EEF0FE;

  --teal:        #0B7268;   /* secondary, on light surfaces */
  --teal-bright: #2DD4BF;   /* secondary, on the dark footer */
  --teal-soft:   #E6F5F3;

  --warn:        #B45309;
  --warn-bg:     #FEF6E7;
  --warn-line:   #F5D9A8;

  --footer-bg:   #0B0E1A;
  --footer-2:    #131829;
  --footer-muted:#A9B2C7;

  --nav-bg:      #141A2E;

  --r:      12px;
  --r-sm:   8px;
  --r-pill: 999px;

  --shadow-xs: 0 1px 2px rgba(15, 20, 36, .06);
  --shadow-sm: 0 1px 3px rgba(15, 20, 36, .08), 0 1px 2px rgba(15, 20, 36, .04);
  --shadow:    0 4px 14px rgba(15, 20, 36, .08);

  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --container: 1200px;
  --nav-h: 56px;

  --z-nav: 60; --z-menu: 50; --z-top: 30;
}

/* ---------------------------------------------------------------- reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

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

body {
  min-height: 100vh;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
svg { flex: none; }

a { color: var(--accent); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--accent-dark); }

button, input, select { font: inherit; color: inherit; }
button { background: none; border: 0; }
button, [role="button"], a, summary, label[for] { cursor: pointer; }

ul, ol { padding-left: 1.15rem; }
h1, h2, h3, h4, h5 { font-weight: 700; line-height: 1.25; letter-spacing: -.015em; }
p, li, td, th, h1, h2, h3, h4, summary { overflow-wrap: break-word; }

/* -------------------------------------------------------- accessibility */
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
:focus:not(:focus-visible) { outline: none; }

.skip-link {
  position: absolute; left: 12px; top: -100px; z-index: 100;
  padding: .7rem 1.1rem; border-radius: var(--r-sm);
  background: var(--accent); color: #fff; font-weight: 700;
  transition: top .2s ease;
}
.skip-link:focus { top: 12px; color: #fff; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* -------------------------------------------------------------- layout */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 16px; }

/* the reference stacks everything as white cards on the tinted page */
.card {
  background: var(--surface);
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
  overflow: hidden;
}
.card-body { padding: 20px; }

/* uppercase grey label with a short accent underline */
.card-label {
  padding: 14px 20px 0;
  font-size: .78rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted);
}
.card-label::after {
  content: ''; display: block; width: 34px; height: 3px;
  margin-top: 8px; border-radius: 2px; background: var(--accent);
}

.section-title {
  margin-bottom: 12px;
  font-size: 1.15rem; font-weight: 700; color: var(--ink);
}

/* ------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  min-height: 44px; padding: .6rem 1.4rem;
  border-radius: var(--r-pill);
  font-weight: 700; font-size: .93rem; text-align: center;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.btn--primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-xs); }
.btn--primary:hover { background: var(--accent-dark); color: #fff; }

.btn--teal { background: var(--teal); color: #fff; }
.btn--teal:hover { background: #095B53; color: #fff; }

.btn--outline { border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.btn--outline:hover { border-color: var(--accent); color: var(--accent); }

.btn--ghost-light { border: 1px solid rgba(255,255,255,.28); color: #fff; }
.btn--ghost-light:hover { border-color: var(--teal-bright); color: var(--teal-bright); }

.btn--block { width: 100%; }
.btn--lg { min-height: 50px; font-size: 1rem; }
.btn--sm { min-height: 36px; padding: .4rem 1rem; font-size: .82rem; }

/* --------------------------------------------------------------- chips */
.pill {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .26rem .7rem; border-radius: var(--r-pill);
  background: var(--accent-soft); color: var(--accent);
  font-size: .74rem; font-weight: 700;
}
.pill--teal { background: var(--teal-soft); color: var(--teal); }
.pill--muted { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.pill-row { display: flex; flex-wrap: wrap; gap: .4rem; }

.badge {
  display: inline-flex; align-items: center;
  padding: .18rem .5rem; border-radius: 5px;
  font-size: .64rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
}
.badge--new { background: var(--teal-soft); color: var(--teal); }
.badge--hot { background: var(--accent-soft); color: var(--accent); }

/* ------------------------------------------------------------- top nav */
.site-header { position: sticky; top: 0; z-index: var(--z-nav); background: var(--nav-bg); }
.nav { display: flex; align-items: center; gap: 1rem; min-height: var(--nav-h); }

.brand { display: inline-flex; align-items: center; gap: .55rem; color: #fff; font-weight: 700; }
.brand:hover { color: #fff; }
.brand img { width: 32px; height: 32px; border-radius: 7px; object-fit: contain; background: #000; }
.brand-name { font-size: .98rem; letter-spacing: -.01em; }

.nav-links { display: flex; align-items: center; gap: .1rem; list-style: none; padding: 0; margin: 0 0 0 auto; }
.nav-link {
  display: inline-block; padding: .45rem .7rem; border-radius: var(--r-sm);
  color: rgba(255,255,255,.82); font-size: .86rem; font-weight: 600;
  transition: color .15s ease, background-color .15s ease;
}
.nav-link:hover { color: #fff; background: rgba(255,255,255,.08); }
.nav-link.is-active { color: #fff; background: var(--accent); }

.nav-toggle {
  display: none; align-items: center; justify-content: center;
  width: 42px; height: 42px; margin-left: auto;
  border-radius: var(--r-sm); border: 1px solid rgba(255,255,255,.22); color: #fff;
}
.nav-toggle:hover { background: rgba(255,255,255,.1); }

/* --------------------------------------------------------- search rail */
.search-rail { padding: 14px 0; }
.search-rail .container { display: flex; align-items: center; gap: 12px; }

.search-form { position: relative; display: flex; flex: 1; min-width: 0; }
.search-input {
  flex: 1; min-width: 0; height: 46px;
  padding: 0 56px 0 18px;
  border: 1px solid var(--line); border-radius: var(--r-pill);
  background: var(--surface); color: var(--ink); font-size: .93rem;
  box-shadow: var(--shadow-xs);
}
.search-input::placeholder { color: var(--muted); }
.search-input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.search-btn {
  position: absolute; right: 4px; top: 4px;
  display: grid; place-items: center; width: 38px; height: 38px;
  border-radius: var(--r-pill); background: var(--accent); color: #fff;
  transition: background-color .15s ease;
}
.search-btn:hover { background: var(--accent-dark); }

.social-row { display: flex; gap: 8px; }
.social-dot {
  display: grid; place-items: center; width: 38px; height: 38px;
  border-radius: var(--r-pill);
  background: var(--surface); border: 1px solid var(--line); color: var(--muted);
  box-shadow: var(--shadow-xs);
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.social-dot:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------------------------------------------------------------- hero */
.hero { position: relative; overflow: hidden; background: var(--nav-bg); }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(2px); transform: scale(1.06); }
.hero-veil {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,14,26,.86), rgba(11,14,26,.78) 55%, rgba(79,70,229,.55));
}
.hero-inner { position: relative; padding: 54px 0 46px; text-align: center; }
.hero h1 { font-size: clamp(1.7rem, 4.4vw, 2.7rem); font-weight: 800; color: #fff; letter-spacing: -.02em; }
.hero p { margin: 10px auto 0; max-width: 62ch; color: rgba(255,255,255,.84); font-size: .98rem; }
.hero .search-form { max-width: 560px; margin: 22px auto 0; }
.hero .social-row { justify-content: center; margin-top: 18px; }
.hero .social-dot { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.22); color: #fff; }
.hero .social-dot:hover { background: #fff; color: var(--accent); border-color: #fff; }
.hero-accent-bar { height: 4px; background: linear-gradient(90deg, var(--accent), var(--teal-bright)); }

/* --------------------------------------------------------- app grid */
.app-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }

.app-card {
  position: relative; display: block; padding: 14px 10px 12px;
  background: var(--surface); border-radius: var(--r);
  box-shadow: var(--shadow-sm);
  border-bottom: 3px solid var(--accent);
  text-align: center; color: var(--ink);
  transition: transform .15s ease, box-shadow .15s ease;
}
.app-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: var(--ink); }
.app-card-img {
  width: 88px; height: 88px; margin: 0 auto 10px;
  border-radius: 16px; object-fit: contain;
  background: var(--surface-2);
}
.app-card-title {
  display: block; font-size: .86rem; font-weight: 700; line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.app-card-meta { display: block; margin-top: 2px; font-size: .72rem; color: var(--muted); }
.app-card-stars { display: flex; justify-content: center; margin-top: 6px; }
.app-card .badge { position: absolute; top: 8px; left: 8px; }

/* horizontal rail for "top rated" */
.app-rail { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; }
.app-rail::-webkit-scrollbar { height: 6px; }
.app-rail::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
.app-rail .app-card { flex: 0 0 168px; scroll-snap-align: start; }

.stars { display: inline-flex; gap: 1px; }
.star.is-full  { color: #F5A524; fill: currentColor; }
.star.is-half  { color: #F5A524; }
.star.is-empty { color: #D3D9E6; fill: currentColor; }

/* ------------------------------------------------------- page shell */
.shell { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; padding: 0 0 24px; }
.shell--wide { grid-template-columns: minmax(0, 1fr); }

/* --------------------------------------------------- app header card */
.app-head { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 22px; padding: 20px; }

.app-head-left { text-align: center; }
.app-head-icon {
  width: 132px; height: 132px; margin: 0 auto 12px;
  border-radius: 22px; object-fit: contain;
  background: var(--surface-2); border: 1px solid var(--line);
}
.app-head-rating { margin-top: 10px; font-size: .82rem; color: var(--muted); }
.app-head-rating b { font-size: 1.15rem; color: var(--ink); }
.app-head-stars { display: flex; justify-content: center; margin-bottom: 4px; }

.breadcrumb ol {
  display: flex; flex-wrap: wrap; align-items: center; gap: .3rem;
  list-style: none; padding: 0; margin: 0 0 6px;
  font-size: .8rem; color: var(--muted);
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb [aria-current="page"] { color: var(--ink); font-weight: 600; }

.app-head h1 {
  display: inline; margin-right: .4rem;
  font-size: clamp(1.35rem, 2.6vw, 1.95rem); font-weight: 800;
}
.app-head-version { font-size: .95rem; font-weight: 600; color: var(--muted); }
.app-head-desc { margin-top: 10px; color: var(--muted); font-size: .93rem; }

.data-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 18px;
  margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line-soft);
}
.data-cell b { display: block; font-size: .8rem; font-weight: 700; color: var(--ink); }
.data-cell span { display: block; font-size: .86rem; color: var(--muted); }

.share-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.share-pill {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .35rem .85rem; border-radius: var(--r-pill);
  background: var(--surface-2); border: 1px solid var(--line);
  color: var(--muted); font-size: .8rem; font-weight: 600;
}
.share-pill:hover { border-color: var(--accent); color: var(--accent); }

/* ---------------------------------------------------- download block */
.dl-btn { margin-bottom: 14px; }
.howto {
  padding: 16px 18px; border-radius: var(--r-sm);
  background: var(--surface-2); border: 1px solid var(--line);
}
.howto b { display: block; margin-bottom: 8px; font-size: .9rem; }
.howto ol { margin: 0; padding-left: 1.2rem; color: var(--muted); font-size: .88rem; }
.howto li { margin-top: 4px; }

/* ---------------------------------------------------------- article */
.article { font-size: 1rem; line-height: 1.8; color: #333B4F; }
.article > h2 { margin-top: 1.8rem; font-size: clamp(1.15rem, 2.2vw, 1.4rem); color: var(--ink); }
.article > h2:first-child { margin-top: 0; }
.article > h3 { margin-top: 1.4rem; font-size: 1.05rem; color: var(--ink); }
.article > h4 { margin-top: 1.1rem; font-size: .98rem; color: var(--ink); }
.article p { margin-top: .85rem; }
.article strong { color: var(--ink); font-weight: 700; }

.article-list { margin-top: .85rem; padding-left: 0; list-style: none; }
.article-list li { position: relative; padding-left: 1.5rem; margin-top: .45rem; }
.article-list li::before {
  content: ''; position: absolute; left: .25rem; top: .68em;
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}
ol.article-list { counter-reset: li; }
ol.article-list li { padding-left: 1.9rem; }
ol.article-list li::before {
  counter-increment: li; content: counter(li);
  left: 0; top: .38em; width: 1.35rem; height: 1.35rem; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
  font-size: .7rem; font-weight: 700;
}

/* --------------------------------------------------------------- faq */
.faq-list { margin-top: 1rem; display: flex; flex-direction: column; gap: 8px; }
.faq-item { border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.faq-item[open] { border-color: var(--accent); }
.faq-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .85rem 1rem; list-style: none;
  font-weight: 600; font-size: .94rem; color: var(--ink);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--accent); }
.faq-n { display: inline-block; min-width: 1.3rem; color: var(--accent); font-weight: 700; }
.faq-chev { color: var(--accent); transition: transform .2s ease; }
.faq-item[open] .faq-chev { transform: rotate(180deg); }
.faq-answer { padding: 0 1rem 1rem; }
.faq-answer p { margin: 0; padding-top: .5rem; color: var(--muted); font-size: .93rem; }

/* ------------------------------------------------------------ sidebar */
.sidebar { display: flex; flex-direction: column; gap: 16px; position: sticky; top: calc(var(--nav-h) + 16px); }
.side-list { list-style: none; margin: 0; padding: 0 20px 16px; }
.side-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--line-soft);
}
.side-row:last-child { border-bottom: 0; }
.side-row img { width: 52px; height: 52px; border-radius: 12px; object-fit: contain; background: var(--surface-2); }
.side-row-body { min-width: 0; }
.side-row-title { display: block; font-size: .88rem; font-weight: 700; color: var(--ink); }
.side-row:hover .side-row-title { color: var(--accent); }
.side-row-meta { display: block; font-size: .74rem; color: var(--muted); }

.cat-list { list-style: none; margin: 0; padding: 0 20px 16px; }
.cat-list li { border-bottom: 1px solid var(--line-soft); }
.cat-list li:last-child { border-bottom: 0; }
.cat-list a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 0; color: var(--ink); font-size: .9rem; font-weight: 600;
}
.cat-list a:hover { color: var(--accent); }
.cat-list .count { font-size: .76rem; color: var(--muted); font-weight: 600; }

/* fact table used on the detail sidebar */
.fact-list { list-style: none; margin: 0; padding: 0 20px 16px; }
.fact-list > div {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  padding: 10px 0; border-bottom: 1px solid var(--line-soft); font-size: .87rem;
}
.fact-list > div:last-child { border-bottom: 0; }
.fact-list dt { color: var(--muted); }
.fact-list dd { margin: 0; font-weight: 700; text-align: right; }
.fact-list .v--bonus { color: var(--teal); }

/* ---------------------------------------------------------- notices */
.notice {
  display: flex; gap: .8rem; padding: 16px 18px;
  border-radius: var(--r-sm);
  background: var(--warn-bg); border: 1px solid var(--warn-line);
}
.notice svg { color: var(--warn); }
.notice p { font-size: .87rem; line-height: 1.6; color: #6B4A16; }
.notice b { display: block; margin-bottom: .15rem; color: var(--warn); }

.responsible p { color: var(--muted); font-size: .94rem; }
.responsible p + p { margin-top: .8rem; }
.tip-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 14px; padding: 0; list-style: none; }
.tip-chip {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .35rem .8rem; border-radius: var(--r-pill);
  background: var(--surface-2); border: 1px solid var(--line);
  font-size: .79rem; font-weight: 600; color: var(--muted);
}
.tip-chip svg { color: var(--teal); }

/* ------------------------------------------------------- promo card */
.promo {
  padding: 30px 24px; border-radius: var(--r);
  background: linear-gradient(160deg, var(--footer-2), var(--footer-bg));
  border: 2px solid var(--teal-bright);
  box-shadow: 0 0 0 4px rgba(45, 212, 191, .12);
  text-align: center;
}
.promo img { width: 110px; height: 110px; margin: 0 auto 14px; border-radius: 20px; object-fit: contain; background: #000; }
.promo h2 { font-size: 1.3rem; font-weight: 800; color: var(--teal-bright); letter-spacing: .02em; }
.promo p { margin: 8px auto 18px; max-width: 52ch; color: var(--footer-muted); font-size: .92rem; }

/* ----------------------------------------------------------- footer */
.site-footer { margin-top: 8px; background: var(--footer-bg); color: #fff; }
.footer-inner { padding: 40px 0 30px; text-align: center; }
.footer-title { font-size: 1.35rem; font-weight: 800; color: var(--teal-bright); letter-spacing: .03em; }
.footer-lede { margin: 12px auto 20px; max-width: 68ch; color: rgba(255,255,255,.88); font-size: .92rem; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.footer-note {
  margin: 24px auto 0; padding-top: 18px; max-width: 74ch;
  border-top: 1px solid rgba(255,255,255,.14);
  color: var(--footer-muted); font-size: .82rem;
}
.footer-copy { margin-top: 16px; color: var(--teal-bright); font-size: .84rem; font-weight: 600; }

.disclaimer-bar { background: var(--footer-2); border-left: 4px solid var(--teal-bright); }
.disclaimer-bar .container { padding-block: 20px; }
.disclaimer-bar p { color: var(--footer-muted); font-size: .82rem; line-height: 1.7; }
.disclaimer-bar p + p { margin-top: 10px; }
.disclaimer-bar b { color: var(--teal-bright); }

/* ------------------------------------------------------ scroll to top */
.to-top {
  position: fixed; right: 18px; bottom: 18px; z-index: var(--z-top);
  display: grid; place-items: center; width: 44px; height: 44px;
  border-radius: var(--r-pill); background: var(--accent); color: #fff;
  box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease, background-color .15s ease;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--accent-dark); color: #fff; }

/* ------------------------------------------------------------ reveal */
.reveal { opacity: 0; transform: translateY(10px); transition: opacity .4s ease, transform .4s ease; }
.reveal.is-in { opacity: 1; transform: none; }

/* -------------------------------------------------------- responsive */
@media (max-width: 1100px) { .app-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

@media (max-width: 980px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; }
  .app-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .data-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute; top: var(--nav-h); left: 0; right: 0; z-index: var(--z-menu);
    flex-direction: column; align-items: stretch; gap: 2px;
    margin: 0; padding: 12px 16px 16px;
    background: var(--nav-bg); box-shadow: var(--shadow);
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
  }
  .nav-links.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav-link { padding: .7rem .8rem; font-size: .95rem; }
  .app-head { grid-template-columns: 1fr; gap: 16px; text-align: center; }
  .app-head-left { display: flex; flex-direction: column; align-items: center; }
  .breadcrumb ol { justify-content: center; }
  .share-row, .pill-row { justify-content: center; }
  .data-grid { text-align: left; }
}

@media (max-width: 640px) {
  .app-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .app-card-img { width: 68px; height: 68px; }
  .search-rail .social-row { display: none; }
  .footer-links .btn { flex: 1 1 auto; }
}

@media (max-width: 420px) {
  .app-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .data-grid { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .app-card:hover { transform: none; }
}

@media print {
  .site-header, .search-rail, .to-top, .site-footer, .disclaimer-bar, .sidebar { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; border: 1px solid #ddd; }
}

/* pill row directly under the app title */
.pill-row--head { margin-top: 10px; }

/* the source article's own headline, opening the description card */
.article-lede-title { margin-bottom: .2rem; font-size: clamp(1.2rem, 2.4vw, 1.5rem); }
.article .article-lede-title + h2 { margin-top: 1.2rem; }
