/*
 * Shared stylesheet for the static, JavaScript-free pages: the guides, about,
 * contact and the policy pages. It is deliberately a single small file served
 * from /assets/ so every page paints without waiting on the Angular bundle.
 *
 * No web fonts, no icon fonts, no third-party CSS: the pages must render with
 * one request and must not leak a visitor's IP to a font CDN before they have
 * read anything.
 */

:root {
  color-scheme: light;
  --ink: #0f172a;
  --body: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --canvas: #f8fafc;
  --card: #ffffff;
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --green: #059669;
  --green-dark: #047857;
  --radius: 12px;
  --measure: 72ch;
}

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

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

body {
  margin: 0;
  background: var(--canvas);
  color: var(--body);
  font-family:
    system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
    sans-serif;
  font-size: 16px;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--brand);
  text-underline-offset: 2px;
}

a:hover {
  color: var(--brand-dark);
}

:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.45);
  outline-offset: 2px;
  border-radius: 4px;
}

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

.skip-link:focus {
  left: 0;
}

/* ── Header ────────────────────────────────────────────────────────────── */

.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  max-width: 1024px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.brand:hover {
  color: var(--ink);
}

.brand__mark {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, #3b82f6, #4f46e5);
  color: #fff;
  font-size: 17px;
  line-height: 1;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
  margin-left: auto;
  font-size: 14px;
  font-weight: 600;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current='page'] {
  color: var(--ink);
}

.site-nav .nav-cta {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
}

.site-nav .nav-cta:hover {
  background: var(--green-dark);
  color: #fff;
}

/* ── Layout ────────────────────────────────────────────────────────────── */

.wrap {
  max-width: 1024px;
  margin: 0 auto;
  padding: 0 20px;
}

.page {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 40px 20px 24px;
}

.page--wide {
  max-width: 1024px;
}

.hero {
  padding: 12px 0 8px;
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
}

h1 {
  margin: 0 0 12px;
  font-size: clamp(1.9rem, 4.2vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
}

h2 {
  margin: 40px 0 0;
  font-size: 1.35rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--ink);
}

h3 {
  margin: 26px 0 0;
  font-size: 1.05rem;
  color: var(--ink);
}

p {
  margin: 14px 0 0;
}

ul,
ol {
  margin: 14px 0 0;
  padding-left: 22px;
}

li {
  margin-top: 8px;
}

li > ul,
li > ol {
  margin-top: 6px;
}

.lead {
  font-size: 1.12rem;
  color: #475569;
  margin-top: 0;
}

.byline {
  margin-top: 16px;
  font-size: 13px;
  color: var(--muted);
}

.byline strong {
  color: var(--ink);
  font-weight: 600;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 40px 0;
}

/* ── Components ────────────────────────────────────────────────────────── */

.callout {
  margin-top: 24px;
  padding: 16px 18px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
}

.callout p {
  margin-top: 8px;
}

.callout p:first-child {
  margin-top: 0;
}

.callout--warn {
  background: #fffbeb;
  border-color: #fde68a;
}

.callout h3 {
  margin-top: 0;
  font-size: 1rem;
}

.card-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-top: 24px;
}

.card {
  display: flex;
  flex-direction: column;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.card h3 {
  margin: 0;
  font-size: 1.05rem;
}

.card h3 a {
  color: var(--ink);
  text-decoration: none;
}

.card h3 a:hover {
  color: var(--brand);
}

.card p {
  margin-top: 8px;
  font-size: 14.5px;
  color: var(--body);
}

.card__meta {
  margin-top: auto;
  padding-top: 14px;
  font-size: 12px;
  color: var(--muted);
}

.cta-row {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-block;
  padding: 11px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.button--primary {
  background: var(--green);
  color: #fff;
}

.button--primary:hover {
  background: var(--green-dark);
  color: #fff;
}

.button--secondary {
  background: var(--card);
  color: var(--body);
  border: 1px solid #cbd5e1;
}

.button--secondary:hover {
  color: var(--ink);
  border-color: #94a3b8;
}

.table-wrap {
  margin-top: 20px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}

caption {
  padding: 12px 14px 0;
  text-align: left;
  font-size: 13px;
  color: var(--muted);
}

th,
td {
  padding: 10px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

th {
  background: #f1f5f9;
  color: var(--ink);
  font-weight: 700;
  white-space: nowrap;
}

tr:last-child td {
  border-bottom: 0;
}

.toc {
  margin-top: 24px;
  padding: 16px 18px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.toc h2 {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.toc ol {
  margin-top: 10px;
  font-size: 14.5px;
}

.toc li {
  margin-top: 5px;
}

.faq-item {
  margin-top: 22px;
}

.faq-item h3 {
  margin-top: 0;
}

.related {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.related h2 {
  margin-top: 0;
  font-size: 1.1rem;
}

/* ── Advertising ───────────────────────────────────────────────────────── */

/*
 * Ad containers reserve a little space so the article does not jump when an
 * ad paints. They are labelled for screen readers, and the label is visible so
 * a visitor can never mistake an ad for editorial content.
 */
.ad-slot {
  margin: 32px 0;
  padding: 10px;
  min-height: 100px;
  background: var(--card);
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius);
}

.ad-slot__label {
  display: block;
  margin-bottom: 6px;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #94a3b8;
  text-align: center;
}

/* ── Footer ────────────────────────────────────────────────────────────── */

.site-footer {
  margin-top: 56px;
  background: var(--card);
  border-top: 1px solid var(--line);
}

.site-footer__inner {
  max-width: 1024px;
  margin: 0 auto;
  padding: 32px 20px 40px;
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  font-size: 13.5px;
}

.site-footer h2 {
  margin: 0 0 8px;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer li {
  margin-top: 7px;
}

.site-footer a {
  color: var(--body);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--brand);
}

.site-footer__legal {
  grid-column: 1 / -1;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12.5px;
}

.site-footer__legal p {
  margin: 6px 0 0;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

@media print {
  .site-header,
  .site-footer,
  .ad-slot,
  .cta-row,
  .toc {
    display: none;
  }

  body {
    background: #fff;
  }
}
