/* /ai-literacy/ — hub and long-form article surface (#17450).
 *
 * WHY THIS FILE EXISTS RATHER THAN INLINE STYLES
 * ==============================================
 * #17166 was the FOURTH recurrence of the phantom-CSS-token class
 * (#9317 -> #14368 -> #15616 -> #17166): 39 inline `style=` attributes across
 * 21 files referenced `--color-bg-surface`, a token declared nowhere. An
 * undefined custom property is silently valid — `var(--x, fallback)` keeps
 * rendering, so the fallback wins in whichever theme it suits and the defect
 * ships. Measured contrast on /method/: 1.05:1, in BOTH themes.
 *
 * Check 92 scans `static-site/{css,js}` only, so an inline `var(--...)` in HTML
 * is invisible to the one guard built for this exact class. Rules therefore
 * live HERE, where Check 92 can see them.
 *
 * Every token below is verified present in variables.css. Do not introduce one
 * without checking:
 *   grep -oE '^\s*--[a-z0-9-]+' css/variables.css | tr -d ' ' | sort -u
 *
 * CACHE STAMP: /css/* is served at max-age=604800 (7 days) while HTML is
 * max-age=3600, so new markup meets a week-old stylesheet. If you change a rule
 * here, bump `?v=` on the <link> in the same commit (#15980 / #17166).
 */

/* ---------- shared: hub + article ---------------------------------- */

.ail-wrap {
  max-width: 960px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

.ail-breadcrumb {
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  color: var(--color-text-muted);
}

.ail-breadcrumb a { color: var(--color-text-secondary); }

/* ---------- article header ----------------------------------------- */

.ail-header { margin-bottom: 2rem; }

.ail-header h1 {
  color: var(--color-text-primary);
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.ail-dek {
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--color-text-secondary);
  margin-bottom: 1rem;
}

/* The reviewed-on stamp. The article is deliberately perishable — it carries
 * mid-2026 model releases and per-million-token prices — so the reader is given
 * the date rather than asked to trust an undated timeline (#17450 AC7). */
.ail-reviewed {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  border-left: 3px solid var(--color-border);
  padding-left: 0.75rem;
  margin: 1rem 0 0;
}

/* ---------- article body ------------------------------------------- */

.ail-body {
  line-height: 1.8;
  font-size: 1.05rem;
  color: var(--color-text-primary);
}

.ail-body h2 {
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  color: var(--color-text-primary);
}

.ail-body h3 {
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
  color: var(--color-text-primary);
}

.ail-body p { margin: 0 0 1.15rem; }

.ail-body blockquote {
  margin: 1.5rem 0;
  padding: 0.75rem 1.25rem;
  border-left: 4px solid var(--color-primary);
  background: var(--color-surface-alt);
  border-radius: var(--radius-sm);
  color: var(--color-text-secondary);
}

.ail-body hr {
  border: 0;
  border-top: 1px solid var(--color-border);
  margin: 2.5rem 0;
}

.ail-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  margin: 1.5rem 0;
}

.ail-body a { color: var(--color-primary); }

.ail-body ul, .ail-body ol { margin: 0 0 1.15rem 1.25rem; }
.ail-body li { margin-bottom: 0.4rem; }

.ail-body code {
  background: var(--color-surface-alt);
  border-radius: var(--radius-sm);
  padding: 0.1rem 0.35rem;
  font-size: 0.92em;
}

/* Wide content must scroll inside its own box — the page body must never
 * scroll horizontally on a 360px phone. */
.ail-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.5rem 0;
}

.ail-body table {
  border-collapse: collapse;
  width: 100%;
}

.ail-body th, .ail-body td {
  border: 1px solid var(--color-border);
  padding: 0.5rem 0.7rem;
  text-align: left;
  vertical-align: top;
}

.ail-body th {
  background: var(--color-surface-alt);
  color: var(--color-text-primary);
}

/* ---------- hub ----------------------------------------------------- */

.ail-intro {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--color-text-secondary);
  margin-bottom: 2rem;
}

.ail-card {
  display: block;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.4rem;
  margin-bottom: 1rem;
  text-decoration: none;
}

.ail-card h3 {
  margin: 0 0 0.4rem;
  color: var(--color-text-primary);
}

.ail-card p {
  margin: 0;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

/* ---------- the two routes out (why the hub is funnel work, not an essay) --- */

.ail-routes {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  margin: 2rem 0;
}

@media (min-width: 720px) {
  .ail-routes { grid-template-columns: 1fr 1fr; }
}

.ail-route {
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.4rem;
}

.ail-route h3 {
  margin: 0 0 0.5rem;
  color: var(--color-text-primary);
}

.ail-route p {
  margin: 0 0 1rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.ail-route .ail-cta {
  display: inline-block;
  background: var(--color-primary);
  color: var(--color-neutral-0);
  border-radius: var(--radius-md);
  padding: 0.6rem 1.1rem;
  text-decoration: none;
  font-weight: 600;
}

.ail-note {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-top: 0.5rem;
}

/* Signup CTA — the conversion path every page must offer (#15857 CTA gate).
 * The two route cards above send the reader to CONTENT (DigiReady, AI
 * Aptitude); this is the one that sends them to an ACCOUNT. A top-of-funnel
 * page that earns a visit and offers no way to convert is doing half its job. */
.ail-signup {
  margin: 2rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  font-size: 1.05rem;
}

.ail-signup .ail-cta {
  display: inline-block;
  background: var(--color-primary);
  color: var(--color-neutral-0);
  border-radius: var(--radius-md);
  padding: 0.6rem 1.1rem;
  margin-left: 0.5rem;
  text-decoration: none;
  font-weight: 600;
}
