/* sites/androidtv-tips/public/assets/style.css
 *
 * Top-of-file note: This project currently has no Stitch‑based design system.
 * Both atv‑6 attempts to produce a Stitch‑grounded design system failed
 * (QUEUE.md P1c). Consequently, there are no component tokens or visual specs from
 * any upstream pipeline such as Stitch available for this site. This stylesheet may
 * be superseded later if future work introduces an official design system; until then
 * it serves as the working editorial stylesheet.
 *
 * Grounding posture:
 *   - Typography is grounded in atv-4 section 1, which identifies the site's
 *     content as reference / reading material (device directories, topic hubs,
 *     freshness-dated pieces) — readable system-font-stack typography follows.
 *   - The nav styling is GROUNDED-IN atv-4 section 1's requirement for "a
 *     navigation vocabulary distinct from the vendor sites' product/feature/FAQ
 *     vocabulary and from the affiliate-content tutorial sites' how-to/jailbreak/
 *     VPN/Kodi vocabulary." The exact labels are ASSUMPTION; the distinctness is
 *     grounded. Nav styling here is text-forward, not product-marketing.
 *   - The .freshness-stamp treatment is GROUNDED-IN atv-4 section 1's per-device
 *     "last verified" / "last refreshed" language (the Gap 3 differentiator) and
 *     atv-4's Gap-3 framing that androidtv-guide.com lacks per-item freshness dating.
 *     The exact label format is ASSUMPTION; the dated-stamp surface is grounded.
 *   - The :root color palette is ASSUMPTION — a small neutral/editorial palette
 *     chosen to read as independent reference rather than vendor marketing or
 *     affiliate tutorial. No source in atv-4 specifies a color system.
 *   - Basic responsive rules (max-width reading column, mobile-safe nav) are
 *     ASSUMPTION — atv-4 does not specify a viewport strategy; the rules are
 *     conservative defaults for a reference/reading site.
 *
 * This file is authored directly from atv-4's page-architecture language,
 * not from any upstream pipeline such as Stitch. It carries no claim of provenance
 * for values derived from external systems, and all applicable choices are marked
 * ASSUMPTION where the grounding in atv-4 does not explicitly specify.
 *
 * Should an upstream design system be introduced later, this stylesheet can be
 * regenerated against it.
 */

/* ASSUMPTION: neutral/editorial palette. No source in atv-4 specifies a color
 * system; these are conservative choices for a reference/reading site that
 * should read as independent editorial, not vendor product-marketing. */
:root {
  --color-bg: #fafafa;
  --color-surface: #ffffff;
  --color-text: #1a1a1a;
  --color-text-muted: #555555;
  --color-border: #d8d8d8;
  --color-accent: #2b4a6f;      /* ASSUMPTION — muted editorial blue, not a brand claim */
  --color-stamp-fresh: #2e6b3f; /* ASSUMPTION — green signals "verified recent" */
  --color-stamp-stale: #8a6d1f; /* ASSUMPTION — amber signals dated/aging stamp */
  --color-link: #1d4ed8;
  --color-link-visited: #6b21a8;

  --measure: 42rem;       /* ASSUMPTION — reading column width */
  --gutter: 1rem;        /* ASSUMPTION */
  --nav-breakpoint: 48rem; /* ASSUMPTION — below this, nav stacks */

  --font-stack: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --font-stack-mono: ui-monospace, SFMono-Regular, Menlo, Consolas,
    "Liberation Mono", monospace;

  --line-height-body: 1.6;
  --line-height-tight: 1.25;
}

/* Grounded-in atv-4 section 1: the site's content is reference / reading
 * material (device directories, topic hubs, freshness-dated pieces). Base
 * typography favors readability over marketing density. */
html {
  font-family: var(--font-stack);
  line-height: var(--line-height-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
}

/* ASSUMPTION: max-width reading column for reference content. atv-4 does not
 * specify a viewport strategy; this is a conservative default that keeps body
 * copy readable and lets directory/hub pages extend wider via their own rules. */
main,
article,
.column-read {
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

h1, h2, h3, h4 {
  line-height: var(--line-height-tight);
  font-weight: 600;
  color: var(--color-text);
}

h1 { font-size: 1.75rem; margin-block: 1.5rem 0.75rem; }
h2 { font-size: 1.4rem;  margin-block: 1.5rem 0.5rem; }
h3 { font-size: 1.15rem; margin-block: 1.25rem 0.5rem; }
h4 { font-size: 1rem;    margin-block: 1rem 0.25rem; }

p, ul, ol, dl, table {
  margin-block: 0 1rem;
}

a {
  color: var(--color-link);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
a:visited { color: var(--color-link-visited); }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

hr {
  border: 0;
  border-top: 1px solid var(--color-border);
  margin-block: 2rem;
}

code, pre {
  font-family: var(--font-stack-mono);
}
pre {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: var(--gutter);
  overflow-x: auto;
}

/* GROUNDED-IN atv-4 section 1: the site's nav must use "a navigation vocabu
 * lary distinct from the vendor sites' product/feature/FAQ vocabulary and from the
 * affiliate-content tutorial sites' how-to/jailbreak/VPN/Kodi vocabulary." The
 * exact labels are ASSUMPTION; the distinctness requirement is grounded.
 * Styling is text-forward (not product-marketing chrome) to support the
 * independent-reference positioning in atv-4 section 1 (Gap 1). */
nav[aria-label="Primary"] {
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
}
nav[aria-label="Primary"] ul {
  list-style: none;
  margin: 0;
  padding-inline: var(--gutter);
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  max-width: 64rem;
  margin-inline: auto;
}
nav[aria-label="Primary"] a {
  display: inline-block;
  padding-block: 0.75rem;
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
}
nav[aria-label="Primary"] a:hover,
nav[aria-label="Primary"] a:focus-visible {
  color: var(--color-accent);
  text-decoration: underline;
}
nav[aria-label="Primary"] .nav-current {
  color: var(--color-text);
  border-bottom: 2px solid var(--color-accent);
}

/* GROUNDED-IN atv-4 section 1: per-device "last verified" / "last refreshed"
 * timestamp on each device entry is "the direct Gap 3 differentiator"
 * (androidtv-guide.com lacks per-item freshness dating). The dated-stamp
 * surface is grounded; the exact label format and the fresh/stale color
 * encoding are ASSUMPTION. The treatment renders staleness visibly dated
 * rather than hiding it, matching atv-4's "the user sees staleness, not a
 * broken page" posture carried in from the self-update scaffold language. */
.freshness-stamp {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4em;
  font-size: 0.85rem;
  font-family: var(--font-stack);
  color: var(--color-text-muted);
  padding: 0.15rem 0.4rem;
  border: 1px solid var(--color-border);
  border-radius: 0.2rem;
  background: var(--color-surface);
  white-space: nowrap;
}
.freshness-stamp .freshness-stamp__label {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.7rem;
}
.freshness-stamp time {
  font-variant-numeric: tabular-nums;
}
/* ASSUMPTION: fresh vs. stale encoding. atv-4 grounds the *presence* of dated
 * stamps and the "user sees staleness, not a broken page" posture; the choice
 * of green=fresh / amber=stale is an editorial color decision, not grounded. */
.freshness-stamp.is-fresh {
  border-color: var(--color-stamp-fresh);
  color: var(--color-stamp-fresh);
}
.freshness-stamp.is-stale {
  border-color: var(--color-stamp-stale);
  color: var(--color-stamp-stale);
  background: #fdf6e3; /* ASSUMPTION — faint amber wash */
}

/* Device directory / topic hub surfaces referenced in atv-4 section 1
 * (page-types 2 and 3). Layout is ASSUMPTION; the page-types themselves are
 * grounded. Wider than the reading column to fit directory tables. */
.directory,
.topic-hub {
  max-width: 64rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.device-list {
  display: grid;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.device-card {
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  padding: var(--gutter);
  border-radius: 0.25rem;
}
.device-card h3 {
  margin-top: 0;
}
.device-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

/* ASSUMPTION: responsive rules. atv-4 does not specify a viewport strategy;
 * these are conservative mobile-safe defaults for a reference/reading site.
 * NOTE: media query conditions cannot reference CSS custom properties per
 * spec (var() is not resolved at parse time for @media) — fixed 2026-07-09
 * after atv-7.S1's verdict panel caught it: --nav-breakpoint (defined above,
 * 48rem) is duplicated here as a literal value, since the two must stay in
 * sync manually. */
@media (max-width: 48rem) {
  nav[aria-label="Primary"] ul {
    flex-direction: column;
    gap: 0;
  }
  nav[aria-label="Primary"] a {
    padding-block: 0.6rem;
    width: 100%;
  }
  nav[aria-label="Primary"] .nav-current {
    border-bottom: 0;
    border-left: 2px solid var(--color-accent);
    padding-left: 0.5rem;
  }
  main,
  article,
  .column-read,
  .directory,
  .topic-hub {
    padding-inline: 0.75rem;
  }
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }
}

@media (min-width: 64rem) {
  .device-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Reduced-motion respect (ASSUMPTION — not in atv-4; standard accessibility
 * posture for a reading site). No animations are defined above, but this
 * guards any future transitions on stamps/nav. */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

/* Print: reference content should print cleanly (ASSUMPTION — atv-4 does not
 * mention print, but the content is reference/reading material per section 1,
 * so a print-safe default is appropriate). */
@media print {
  nav[aria-label="Primary"] { display: none; }
  a { color: var(--color-text); text-decoration: underline; }
  .freshness-stamp { border-color: #999; color: #333; }
}
