/* ==========================================================================
   Pak Rummy - bright editorial directory
   Design language: bone paper, cool ink, one pine accent.

   Radius rule (applied everywhere, no exceptions):
     app icons .................... --r-icon  (store-style superellipse)
     containers / panels / cards ... --r-lg
     secondary interactive ........ --r-md
     buttons, chips, badges ....... --r-pill
   ========================================================================== */

:root {
  --paper:        #fcfcfa;
  --paper-2:      #f4f5f1;
  --surface:      #ffffff;
  --surface-2:    #fafbf8;

  --ink:          #14181a;
  --ink-2:        #4c5559;
  --ink-3:        #6b7478;

  --line:         #e3e5df;
  --line-2:       #edeee9;

  --accent:       #0f6e4f;
  --accent-ink:   #0b573e;
  --accent-soft:  #e7f2ec;
  --accent-on:    #ffffff;

  --warn:         #7d5210;
  --warn-soft:    #fbf3e3;
  --warn-line:    #ecd9b0;

  --shadow-sm: 0 1px 2px rgba(20, 24, 26, .05);
  --shadow-md: 0 6px 20px -8px rgba(20, 40, 34, .18);
  --shadow-lg: 0 18px 44px -18px rgba(20, 40, 34, .28);

  --r-icon: 22%;
  --r-lg: 14px;
  --r-md: 10px;
  --r-pill: 999px;

  --font-sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text",
               "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI Variable Display",
               "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", "Cascadia Mono", "Roboto Mono",
               Menlo, Consolas, monospace;

  --shell: 1220px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --head-h: 68px;

  --ease: cubic-bezier(.16, 1, .3, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:       #0f1213;
    --paper-2:     #151a1b;
    --surface:     #171c1d;
    --surface-2:   #1b2122;

    --ink:         #e9ede9;
    --ink-2:       #a8b2b2;
    --ink-3:       #8a9494;

    --line:        #262d2e;
    --line-2:      #1f2526;

    --accent:      #45c08c;
    --accent-ink:  #62d3a3;
    --accent-soft: #122a22;
    --accent-on:   #08110d;

    --warn:        #e0b269;
    --warn-soft:   #221b0f;
    --warn-line:   #3d3320;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-md: 0 6px 20px -8px rgba(0, 0, 0, .6);
    --shadow-lg: 0 18px 44px -18px rgba(0, 0, 0, .75);
  }
}

/* --------------------------------------------------------------- base ---- */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--head-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Headings and body copy are never width-capped at the text level: they fill
   whatever column holds them. The page-level cap lives on .shell alone. */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -.02em;
  margin: 0 0 .5em;
}

h1 { font-size: clamp(1.95rem, 4.2vw, 3rem); font-weight: 680; }
h2 { font-size: clamp(1.45rem, 2.6vw, 2rem);  font-weight: 660; }
h3 { font-size: clamp(1.1rem, 1.6vw, 1.3rem); font-weight: 640; letter-spacing: -.01em; }
h4 { font-size: 1.05rem; font-weight: 640; letter-spacing: -.005em; }

p { margin: 0 0 1.15em; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-ink); }

img { max-width: 100%; height: auto; display: block; }

svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

button, a, summary, [role="button"] { cursor: pointer; }

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--accent);
  color: var(--accent-on);
  padding: .7rem 1.1rem;
  border-radius: 0 0 var(--r-md) 0;
  font-weight: 600;
}
.skip-link:focus { left: 0; color: var(--accent-on); }

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.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;
}

/* --------------------------------------------------------------- head ---- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line-2);
}

.head-inner {
  height: var(--head-h);
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  text-decoration: none;
  color: var(--ink);
}
.brand img {
  width: 40px; height: 40px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--surface);
  object-fit: cover;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 680;
  font-size: 1.05rem;
  letter-spacing: -.02em;
}
.brand-sub {
  font-size: .72rem;
  color: var(--ink-3);
  letter-spacing: .01em;
}

.primary-nav ul {
  display: flex;
  align-items: center;
  gap: .15rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-link {
  display: block;
  padding: .5rem .7rem;
  border-radius: var(--r-md);
  color: var(--ink-2);
  text-decoration: none;
  font-size: .93rem;
  font-weight: 550;
  white-space: nowrap;
  transition: color .18s var(--ease), background-color .18s var(--ease);
}
.nav-link:hover { color: var(--ink); background: var(--paper-2); }
.nav-link.is-active { color: var(--accent); background: var(--accent-soft); }

.nav-cta {
  display: block;
  margin-left: .5rem;
  padding: .55rem 1rem;
  border-radius: var(--r-md);
  background: var(--accent);
  color: var(--accent-on);
  text-decoration: none;
  font-size: .93rem;
  font-weight: 620;
  white-space: nowrap;
  transition: background-color .18s var(--ease), transform .12s var(--ease);
}
.nav-cta:hover { background: var(--accent-ink); color: var(--accent-on); }
.nav-cta:active { transform: scale(.98); }

.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  align-items: center; justify-content: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  color: var(--ink);
}
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .primary-nav {
    position: absolute;
    top: var(--head-h);
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    padding: .6rem var(--gutter) 1.1rem;
    display: none;
  }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { flex-direction: column; align-items: stretch; gap: .1rem; }
  .nav-link, .nav-cta { padding: .8rem .85rem; font-size: 1rem; }
  .nav-cta { margin-left: 0; margin-top: .5rem; text-align: center; }
}

/* ------------------------------------------------------------ buttons ---- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .72rem 1.6rem;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-family: inherit;
  font-size: .95rem;
  font-weight: 620;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color .18s var(--ease), border-color .18s var(--ease),
              color .18s var(--ease), transform .12s var(--ease), box-shadow .18s var(--ease);
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--accent); color: var(--accent-on); }
.btn-primary:hover { background: var(--accent-ink); color: var(--accent-on); box-shadow: var(--shadow-md); }

.btn-ghost {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--ink-3); color: var(--ink); background: var(--surface-2); }

.btn-sm { padding: .45rem 1rem; font-size: .85rem; }
.btn-lg { padding: .95rem 1.6rem; font-size: 1rem; }

/* --------------------------------------------------- store tab bar ------- */

.store-tabs {
  position: sticky;
  top: var(--head-h);
  z-index: 45;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.store-tabs-inner {
  display: flex;
  align-items: center;
  gap: .35rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding-block: .55rem;
}
.store-tabs-inner::-webkit-scrollbar { display: none; }
.store-tab {
  flex: none;
  padding: .45rem .95rem;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink-2);
  font-size: .88rem;
  font-weight: 560;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
}
.store-tab:hover { color: var(--ink); border-color: var(--ink-3); }
.store-tab.is-on { background: var(--accent-soft); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }

/* ------------------------------------------------------ promo band ------- */

.promo { padding-block: 1.5rem .25rem; }

.store-intro { margin-bottom: 1.15rem; }
.store-intro h1 {
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -.025em;
  margin: 0 0 .2rem;
}
.store-intro p { margin: 0; color: var(--ink-3); font-size: .92rem; }
.promo-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(min(84vw, 560px), 1fr);
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 1rem;
  scrollbar-width: none;
}
.promo-rail::-webkit-scrollbar { display: none; }
.promo-card {
  position: relative;
  scroll-snap-align: start;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1.1rem;
  align-items: center;
  padding: 1.35rem 1.5rem;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  overflow: hidden;
  isolation: isolate;
  background: var(--surface);
}
.promo-wash {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.promo-wash img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: blur(46px) saturate(170%);
  transform: scale(1.4);
  opacity: .3;
}
.promo-wash::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--surface) 88%, transparent),
    color-mix(in srgb, var(--surface) 72%, transparent));
}
.promo-icon {
  width: 84px; height: 84px;
  border-radius: var(--r-icon);
  border: 1px solid var(--line);
  object-fit: cover;
  box-shadow: var(--shadow-md);
}
.promo-kicker {
  font-size: .72rem;
  font-weight: 640;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .3rem;
}
.promo-name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 680;
  letter-spacing: -.02em;
  margin: 0 0 .2rem;
  line-height: 1.2;
}
.promo-name a { color: var(--ink); text-decoration: none; }
.promo-name a:hover { color: var(--accent); }
.promo-meta {
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--ink-3);
  margin: 0 0 .85rem;
}
@media (max-width: 560px) {
  .promo-card { grid-template-columns: 1fr; }
  .promo-icon { width: 68px; height: 68px; }
}

/* ------------------------------------------------------- stat line ------- */

.statline {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 0;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  padding: .9rem 0;
  margin-bottom: 2.25rem;
}
.statline div {
  flex: 1 1 25%;
  min-width: 150px;
  padding-inline: 1.15rem;
  border-left: 1px solid var(--line-2);
}
.statline div:first-child { border-left: 0; }
.statline b {
  display: block;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 680;
  letter-spacing: -.02em;
}
.statline span { font-size: .8rem; color: var(--ink-3); }
@media (max-width: 620px) {
  .statline div { flex-basis: 50%; }
  .statline div:nth-child(odd) { border-left: 0; }
}

/* --------------------------------------------------------- shelves ------- */

.shelf-block { padding-block: 1.75rem; }
.shelf-block + .shelf-block { border-top: 1px solid var(--line-2); }

.shelf-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .25rem;
}
.shelf-head h2 {
  font-size: clamp(1.15rem, 1.9vw, 1.45rem);
  font-weight: 680;
  margin: 0;
}
.shelf-head .shelf-more {
  font-size: .86rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
}
.shelf-sub { color: var(--ink-3); font-size: .88rem; margin: .2rem 0 1.15rem; }

/* Horizontal app shelf, the store's signature row. */
.shelf {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 132px;
  gap: 1.4rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding-bottom: 1rem;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.shelf::-webkit-scrollbar { height: 6px; }
.shelf::-webkit-scrollbar-thumb { background: var(--line); border-radius: var(--r-pill); }

.app-tile {
  scroll-snap-align: start;
  display: block;
  text-decoration: none;
}
.app-tile img {
  width: 132px; height: 132px;
  border-radius: var(--r-icon);
  border: 1px solid var(--line);
  object-fit: cover;
  margin-bottom: .6rem;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.app-tile:hover img { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.app-tile-name {
  font-size: .88rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
  margin: 0 0 .2rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.app-tile-meta {
  font-family: var(--font-mono);
  font-size: .74rem;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: .25rem;
}
.app-tile-meta .star { width: 11px; height: 11px; color: var(--ink-3); }
@media (max-width: 520px) {
  .shelf { grid-auto-columns: 108px; gap: 1rem; }
  .app-tile img { width: 108px; height: 108px; }
}

/* ------------------------------------------------------ top charts ------- */

.chart {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 2.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
@media (max-width: 820px) { .chart { grid-template-columns: 1fr; } }

.chart-row {
  display: grid;
  grid-template-columns: 26px 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: .9rem;
  padding: .7rem 0;
  border-bottom: 1px solid var(--line-2);
}
.chart-rank {
  font-family: var(--font-mono);
  font-size: .95rem;
  color: var(--ink-3);
  text-align: right;
}
.chart-row img {
  width: 56px; height: 56px;
  border-radius: var(--r-icon);
  border: 1px solid var(--line);
  object-fit: cover;
}
.chart-name {
  font-size: .95rem;
  font-weight: 600;
  margin: 0 0 .1rem;
  line-height: 1.3;
}
.chart-name a { color: var(--ink); text-decoration: none; }
.chart-name a:hover { color: var(--accent); }
.chart-meta {
  margin: 0;
  font-family: var(--font-mono);
  font-size: .75rem;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: .3rem;
}
.chart-meta .star { width: 11px; height: 11px; color: var(--ink-3); }

/* On narrow screens the row itself is the tap target, so the button is dropped
   rather than squeezing the app name into two or three lines. */
@media (max-width: 560px) {
  .chart-row { grid-template-columns: 22px 52px minmax(0, 1fr); gap: .75rem; }
  .chart-row img { width: 52px; height: 52px; }
  .chart-row .btn { display: none; }
}

/* --------------------------------------------------------- app grid ----- */

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(224px, 1fr));
  gap: .35rem 1.75rem;
}
.app-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: center;
  gap: .85rem;
  padding: .7rem .6rem;
  margin-inline: -.6rem;
  border-radius: var(--r-md);
  text-decoration: none;
  transition: background-color .16s var(--ease);
}
.app-row:hover { background: var(--paper-2); }
.app-row img {
  width: 56px; height: 56px;
  border-radius: var(--r-icon);
  border: 1px solid var(--line);
  object-fit: cover;
}
.app-row-name {
  font-size: .92rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 .1rem;
  line-height: 1.3;
}
.app-row-meta {
  margin: 0;
  font-family: var(--font-mono);
  font-size: .74rem;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: .3rem;
}
.app-row-meta .star { width: 11px; height: 11px; color: var(--ink-3); }

/* ----------------------------------------------------------- chips ------- */

.chip {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .2rem .6rem;
  border-radius: var(--r-pill);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .01em;
  border: 1px solid transparent;
}
.chip svg { width: 13px; height: 13px; }
.chip-quiet  { background: var(--paper-2); color: var(--ink-2); border-color: var(--line); }

.stars { display: inline-flex; gap: 1px; vertical-align: -2px; }
.star { fill: currentColor; stroke: none; }
.star.is-full  { color: var(--accent); }
.star.is-half  { color: var(--accent); opacity: .55; }
.star.is-empty { color: var(--line); }

/* ------------------------------------------------------------- prose ----- */

.prose { max-width: none; }
.prose h2 {
  margin-top: 2.4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-2);
}
.prose > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.prose h3 { margin-top: 1.9rem; color: var(--accent); }
.prose h4 { margin-top: 1.5rem; }
.prose p  { color: var(--ink-2); }
.prose strong { color: var(--ink); }

.prose-list {
  margin: 0 0 1.3rem;
  padding: 0;
  list-style: none;
  display: grid;
  gap: .6rem;
}
.prose-list li {
  position: relative;
  padding-left: 1.6rem;
  color: var(--ink-2);
}
.prose-list li::before {
  content: "";
  position: absolute;
  left: .3rem;
  top: .62em;
  width: 6px; height: 6px;
  border-radius: var(--r-pill);
  background: var(--accent);
}

.faq-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--line-2);
}
.faq-q {
  font-family: var(--font-display);
  font-weight: 640;
  color: var(--ink);
  margin: 0 0 .35rem;
  letter-spacing: -.01em;
}
.faq-a { margin: 0; color: var(--ink-2); }

.table-scroll { overflow-x: auto; margin: 0 0 1.6rem; border: 1px solid var(--line); border-radius: var(--r-lg); }
.prose-table { width: 100%; border-collapse: collapse; font-size: .88rem; min-width: 640px; }
.prose-table th, .prose-table td { padding: .7rem .9rem; text-align: left; }
.prose-table thead th {
  background: var(--paper-2);
  color: var(--ink);
  font-weight: 620;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
.prose-table tbody tr + tr td { border-top: 1px solid var(--line-2); }
.prose-table td { color: var(--ink-2); }

/* -------------------------------------------------------- breadcrumb ----- */

.crumbs { padding-block: 1rem; border-bottom: 1px solid var(--line-2); background: var(--paper); }
.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem;
  list-style: none;
  margin: 0; padding: 0;
  font-size: .85rem;
  color: var(--ink-3);
}
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.crumbs svg { width: 14px; height: 14px; color: var(--ink-3); }
.crumbs [aria-current] { color: var(--ink); font-weight: 550; }

/* ================================================================ APK PAGE ==
   Cinematic cover, sticky install bar, full-width single-column article.
   No sidebar: the app vitals live in a horizontal band under the cover and a
   pull-out bonus panel inside the flow.
   ========================================================================== */

/* ------------------------------------------------------------- cover ----- */

.cover {
  /* Cover-scoped accent so the install button reads the same in both themes. */
  --accent: #1a9c6d;
  --accent-ink: #22b07d;
  --accent-on: #04140d;

  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #0b0f0e;
  color: #fff;
  min-height: clamp(300px, 44vh, 420px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cover-art { position: absolute; inset: -18%; z-index: -2; }
.cover-art img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: blur(72px) saturate(200%) brightness(.85);
  transform: scale(1.25);
}
.cover-scrim {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(120% 90% at 12% 110%, rgba(26, 156, 109, .30), transparent 58%),
    linear-gradient(180deg, rgba(9, 13, 12, .74) 0%, rgba(9, 13, 12, .58) 38%, rgba(9, 13, 12, .93) 100%);
}

.cover .crumbs {
  background: transparent;
  border: 0;
  padding-top: 1.1rem;
}
.cover .crumbs ol { color: rgba(255, 255, 255, .58); }
.cover .crumbs a { color: rgba(255, 255, 255, .78); }
.cover .crumbs a:hover { color: #fff; }
.cover .crumbs svg { color: rgba(255, 255, 255, .38); }
.cover .crumbs [aria-current] { color: #fff; }

.cover-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: end;
  gap: clamp(1.1rem, 3vw, 2.25rem);
  padding-block: clamp(1.75rem, 4vw, 3rem);
}

.cover-icon {
  width: clamp(96px, 13vw, 152px);
  aspect-ratio: 1;
  border-radius: var(--r-icon);
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, .16);
  box-shadow: 0 28px 60px -22px rgba(0, 0, 0, .9);
}

.cover-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .8rem; }
.cover-tag {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .22rem .65rem;
  border-radius: var(--r-pill);
  font-size: .73rem;
  font-weight: 620;
  letter-spacing: .02em;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .18);
  color: #fff;
  backdrop-filter: blur(6px);
}
.cover-tag.is-live {
  background: rgba(26, 156, 109, .26);
  border-color: rgba(52, 199, 143, .5);
  color: #7ceab8;
}

.cover-title {
  font-size: clamp(1.7rem, 4vw, 3.1rem);
  font-weight: 720;
  letter-spacing: -.032em;
  line-height: 1.08;
  color: #fff;
  margin: 0 0 .55rem;
}
.cover-by {
  margin: 0;
  color: rgba(255, 255, 255, .68);
  font-size: .95rem;
}
.cover-by b { color: #fff; font-weight: 600; }

.cover-cta { display: grid; gap: .6rem; justify-items: stretch; }
.cover-cta .btn-primary { box-shadow: 0 16px 34px -14px rgba(26, 156, 109, .9); }
.cover-fine {
  margin: 0;
  font-size: .78rem;
  color: rgba(255, 255, 255, .55);
  text-align: center;
}

@media (max-width: 900px) {
  .cover-inner { grid-template-columns: auto minmax(0, 1fr); }
  .cover-cta { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .cover-inner { grid-template-columns: 1fr; gap: 1rem; }
  .cover-icon { width: 88px; }
}

/* ------------------------------------------------- sticky install bar ---- */

.installbar {
  position: fixed;
  left: 0; right: 0;
  top: var(--head-h);
  z-index: 44;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
  transform: translateY(-104%);
  transition: transform .28s var(--ease);
}
.installbar.is-up { transform: none; }
.installbar-inner {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding-block: .55rem;
}
.installbar img {
  width: 40px; height: 40px;
  border-radius: var(--r-icon);
  border: 1px solid var(--line);
  object-fit: cover;
}
.installbar-txt { min-width: 0; flex: 1; }
.installbar-name {
  margin: 0;
  font-weight: 640;
  font-size: .95rem;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.installbar-meta {
  margin: 0;
  font-family: var(--font-mono);
  font-size: .74rem;
  color: var(--ink-3);
}
@media (max-width: 560px) {
  .installbar-meta { display: none; }
  .installbar .btn { padding-inline: 1.1rem; }
}

/* ------------------------------------------------------- glance band ----- */

.glance {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.glance-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.glance-cell {
  padding: 1.15rem 1.25rem;
  border-left: 1px solid var(--line-2);
}
.glance-cell:first-child { border-left: 0; padding-left: 0; }
.glance-k {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .72rem;
  font-weight: 620;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: .3rem;
}
.glance-k svg { width: 14px; height: 14px; color: var(--accent); }
.glance-v {
  font-family: var(--font-mono);
  font-size: 1.02rem;
  font-weight: 640;
  color: var(--ink);
  line-height: 1.3;
  display: flex;
  align-items: center;
  gap: .35rem;
}
.glance-v .stars { margin-left: .1rem; }

@media (max-width: 900px) {
  .glance-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .glance-cell { border-left: 1px solid var(--line-2); padding-inline: 1rem; }
  .glance-cell:nth-child(3n+1) { border-left: 0; padding-left: 0; }
  .glance-cell:nth-child(n+4) { border-top: 1px solid var(--line-2); }
}
@media (max-width: 560px) {
  .glance-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .glance-cell:nth-child(3n+1) { border-left: 1px solid var(--line-2); padding-left: 1rem; }
  .glance-cell:nth-child(odd) { border-left: 0; padding-left: 0; }
  .glance-cell:nth-child(n+3) { border-top: 1px solid var(--line-2); }
}

/* --------------------------------------------------- article (single) ---- */

.article-wrap { padding-block: clamp(2.25rem, 5vw, 3.5rem); }

/* Pull-out bonus panel, set inside the reading flow rather than a sidebar. */
.pullout {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin: 0 0 2.25rem;
}
.pullout div { background: var(--accent-soft); padding: 1.05rem 1.15rem; }
.pullout dt {
  font-size: .72rem;
  font-weight: 620;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--accent) 80%, var(--ink));
  margin-bottom: .25rem;
}
.pullout dd {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 640;
  color: var(--ink);
}
@media (max-width: 760px) { .pullout { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.notice {
  display: flex;
  align-items: flex-start;
  gap: .8rem;
  padding: 1.1rem 1.25rem;
  margin: 2.5rem 0 0;
  border: 1px solid var(--warn-line);
  background: var(--warn-soft);
  border-radius: var(--r-lg);
}
.notice svg { width: 20px; height: 20px; color: var(--warn); margin-top: .15rem; }
.notice h2 {
  font-size: .95rem;
  font-weight: 660;
  color: var(--warn);
  margin: 0 0 .3rem;
}
.notice p { margin: 0; font-size: .9rem; color: var(--ink-2); }

/* Closing install block, so the page ends on the action it exists for. */
.closer {
  border-top: 1px solid var(--line-2);
  background: var(--paper-2);
  padding-block: clamp(2rem, 4vw, 3rem);
}
.closer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}
.closer h2 { margin: 0 0 .25rem; font-size: clamp(1.2rem, 2.2vw, 1.6rem); }
.closer p { margin: 0; color: var(--ink-3); font-size: .9rem; }

/* --------------------------------------------------------- similar ------- */

.similar { border-top: 1px solid var(--line-2); padding-block: clamp(2rem, 4vw, 2.75rem); }
/* --------------------------------------------------------- rg notice ----- */

.rg { background: var(--paper-2); border-top: 1px solid var(--line-2); }
.rg-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  padding-block: clamp(2.5rem, 5vw, 3.75rem);
  align-items: start;
}
@media (max-width: 860px) { .rg-inner { grid-template-columns: 1fr; } }

.rg-mark {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .4rem .85rem;
  border-radius: var(--r-pill);
  background: var(--warn-soft);
  border: 1px solid var(--warn-line);
  color: var(--warn);
  font-weight: 620;
  font-size: .82rem;
  margin-bottom: 1rem;
}
.rg-mark svg { width: 16px; height: 16px; }
.rg h2 { font-size: clamp(1.3rem, 2.2vw, 1.7rem); }
.rg p { color: var(--ink-2); margin-bottom: 1rem; }
.rg-tips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.2rem; }
.rg-note { margin-top: 1.2rem; }

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

.page-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line-2);
  background: var(--paper-2);
}
.page-hero-bg { position: absolute; inset: -14%; z-index: 0; }
.page-hero-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: blur(64px) saturate(140%);
  transform: scale(1.2);
  opacity: .34;
}
.page-hero-veil {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--paper) 74%, transparent),
    color-mix(in srgb, var(--paper) 93%, transparent));
}
.page-hero-inner {
  position: relative; z-index: 2;
  padding-block: clamp(2.5rem, 5.5vw, 4.25rem);
}
.page-hero h1 { margin-bottom: .5rem; }
.page-hero p { color: var(--ink-2); margin: 0; font-size: 1.05rem; }

/* ------------------------------------------------------------- foot ------ */

.site-foot {
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding-block: clamp(2.5rem, 5vw, 3.5rem) 1.75rem;
  margin-top: 0;
}
.foot-top {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.8fr);
  gap: clamp(1.75rem, 4vw, 3rem);
  padding-bottom: 2rem;
}
.foot-blurb { color: var(--ink-3); font-size: .89rem; margin: 1rem 0 0; }
.foot-nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.foot-h {
  font-size: .78rem;
  font-weight: 620;
  color: var(--ink);
  margin: 0 0 .75rem;
  letter-spacing: .02em;
}
.foot-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.foot-col a { color: var(--ink-3); text-decoration: none; font-size: .89rem; }
.foot-col a:hover { color: var(--accent); }

@media (max-width: 860px) { .foot-top { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .foot-nav { grid-template-columns: 1fr 1fr; } }

.foot-warn {
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  padding: .9rem 1.1rem;
  border: 1px solid var(--warn-line);
  background: var(--warn-soft);
  border-radius: var(--r-lg);
  color: var(--warn);
  font-size: .87rem;
  margin: 0 0 1.5rem;
}
.foot-warn svg { flex: none; margin-top: .1rem; }

.foot-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .5rem 1.5rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line-2);
}
.foot-base p { margin: 0; font-size: .82rem; color: var(--ink-3); }

/* ----------------------------------------------------------- to top ------ */

.to-top {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: 40;
  width: 44px; height: 44px;
  display: inline-flex;
  align-items: center; justify-content: center;
  background: var(--accent);
  color: var(--accent-on);
  border: 0;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .22s var(--ease), transform .22s var(--ease), background-color .18s var(--ease);
}
.to-top[hidden] { display: none; }
.to-top.is-shown { opacity: 1; transform: none; }
.to-top:hover { background: var(--accent-ink); }

/* ----------------------------------------------------------- motion ------ */

/* Scoped to .js so the cards stay visible when scripting is unavailable. */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .55s var(--ease), transform .55s var(--ease);
}
.js .reveal.is-in { opacity: 1; transform: none; }

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