/* Clear Path Media House - editorial publisher styles
   Brand tokens carried over from the house palette (Manrope + Source Sans 3). */

:root {
  --bg: #f7f9fc;
  --surface: #eef3fa;
  --card: #ffffff;
  --fg: #0b1f3a;
  --muted: #4a5d78;
  --line: #d6dfeb;
  --accent: #1d4ed8;
  --accent-hover: #1e40af;
  --accent-fg: #ffffff;
  --accent-soft: #dbe7ff;
  --footer-bg: #0b1f3a;
  --footer-fg: #dbe4f3;
  --footer-line: #23395b;
  --radius: 14px;
  --radius-btn: 12px;
  --maxw: 1140px;
  --readw: 720px;
  --font-display: 'Manrope', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-body: 'Source Sans 3', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--fg);
  text-wrap: balance;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 700; margin-top: 1.6em; }
h3 { font-size: 1.22rem; font-weight: 700; margin-top: 1.4em; }
h4 { font-size: 1.04rem; font-weight: 700; }

p { margin: 0 0 1.05em; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }

strong { font-weight: 700; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.08em 0.38em;
  font-size: 0.9em;
  word-break: break-word;
}

/* Layout */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: 20px; }
.read { max-width: var(--readw); margin: 0 auto; padding-inline: 20px; }
section { padding-block: clamp(40px, 6vw, 84px); }
section.tight { padding-block: clamp(28px, 4vw, 48px); }
.divider { border: 0; border-top: 1px solid var(--line); margin: 0; }

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

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 249, 252, 0.88);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: 1.08rem; color: var(--fg); text-decoration: none; letter-spacing: -0.02em; }
.brand:hover { color: var(--fg); }
.brand .mark { width: 28px; height: 28px; flex: 0 0 auto; }
.nav-toggle {
  display: none; background: var(--card); border: 1px solid var(--line); color: var(--fg);
  border-radius: 10px; padding: 8px 12px; font: inherit; font-weight: 600; cursor: pointer;
}
.nav-links { display: flex; align-items: center; gap: 22px; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.97rem; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--fg); }

/* Hero */
.hero { position: relative; background: linear-gradient(180deg, var(--surface), var(--bg)); border-bottom: 1px solid var(--line); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(var(--line) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0.5), transparent 70%);
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.5), transparent 70%);
  opacity: 0.6; pointer-events: none;
}
.hero .wrap, .hero .read { position: relative; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-weight: 700; font-size: 0.8rem;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 24px; height: 3px; border-radius: 2px; background: var(--accent); }
.lede { font-size: 1.18rem; color: var(--muted); max-width: 62ch; }
.meta { color: var(--muted); font-size: 0.95rem; margin-top: 14px; }
.meta strong { color: var(--fg); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-display); font-weight: 700; font-size: 1rem;
  padding: 13px 22px; border-radius: var(--radius-btn); border: 1px solid transparent;
  cursor: pointer; text-decoration: none; transition: background-color .15s ease, transform .05s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-fg); }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-ghost { background: var(--card); color: var(--fg); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface); color: var(--fg); }
.btn-block { display: flex; width: 100%; }

/* Cards & grids */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.card.link-card:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(11,31,58,0.08); border-color: #bccbe0; }
.card h3 { margin-top: 0; }
.card .ico { width: 40px; height: 40px; color: var(--accent); margin-bottom: 12px; }
.card p:last-child { margin-bottom: 0; }

/* Feature / callouts */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 3vw, 32px); }
.note { background: var(--accent-soft); border: 1px solid #bcd0ff; border-radius: var(--radius); padding: 16px 18px; color: #16305f; }
.note p:last-child { margin-bottom: 0; }

/* Lists */
.check { list-style: none; padding: 0; margin: 0 0 1em; }
.check li { position: relative; padding-left: 30px; margin-bottom: 12px; }
.check li::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 18px; height: 18px;
  background: var(--accent-soft); border-radius: 50%;
  box-shadow: inset 0 0 0 2px var(--accent);
}
.check li::after {
  content: ""; position: absolute; left: 6px; top: 8px; width: 6px; height: 3px;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

/* Article body */
.article h2 { scroll-margin-top: 84px; }
.article ul, .article ol { padding-left: 1.3em; margin: 0 0 1.1em; }
.article li { margin-bottom: 8px; }
.article .figure { margin: 24px 0; }
.article .figure figcaption { color: var(--muted); font-size: 0.9rem; margin-top: 8px; }

/* Data table */
.spec { width: 100%; border-collapse: collapse; font-size: 0.97rem; margin: 6px 0 20px; }
.spec caption { text-align: left; color: var(--muted); font-size: 0.9rem; padding-bottom: 8px; }
.spec th, .spec td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec th { font-family: var(--font-display); }
.spec tbody tr:nth-child(odd) td { background: #fbfdff; }

/* Amazon alternative block */
.amazon {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(20px, 3vw, 30px); margin: 28px 0;
}
.amazon .tag { font-family: var(--font-display); font-weight: 700; color: var(--accent); font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase; }
.amazon h3 { margin: 6px 0 10px; }
.amazon .price { font-family: var(--font-display); font-weight: 700; }
.amazon .cta-row { margin: 18px 0 10px; }
.amazon .plain-link { font-size: 0.92rem; word-break: break-all; }
.disclosure { color: var(--muted); font-size: 0.88rem; margin-top: 10px; }

/* Sources */
.sources { font-size: 0.95rem; color: var(--muted); }
.sources li { margin-bottom: 10px; }

/* Forms */
.field { margin-bottom: 18px; }
.field label { display: block; font-family: var(--font-display); font-weight: 600; margin-bottom: 6px; font-size: 0.97rem; }
.field input, .field textarea {
  width: 100%; font: inherit; color: var(--fg); background: var(--card);
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px;
}
.field input:focus, .field textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.field textarea { min-height: 150px; resize: vertical; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin-top: 14px; padding: 12px 14px; border-radius: 10px; display: none; }
.form-status.ok { display: block; background: #e7f6ec; color: #14532d; border: 1px solid #b7e2c6; }
.form-status.err { display: block; background: #fde8e8; color: #8a1c1c; border: 1px solid #f3c4c4; }

/* Footer */
.site-footer { background: var(--footer-bg); color: var(--footer-fg); margin-top: 20px; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-top { display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between; padding-block: 48px; }
.footer-brand { max-width: 420px; }
.footer-brand .brand { color: #fff; margin-bottom: 12px; }
.footer-brand p { color: var(--footer-fg); font-size: 0.95rem; }
.footer-nav h4 { color: #fff; font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 12px; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; }
.footer-nav li { margin-bottom: 8px; font-size: 0.95rem; }
.footer-bottom { border-top: 1px solid var(--footer-line); padding-block: 20px; font-size: 0.88rem; color: var(--footer-fg); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }

/* Responsive */
@media (max-width: 860px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .nav-toggle { display: inline-block; }
  .nav-links {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--card); border-bottom: 1px solid var(--line); padding: 8px 20px 16px;
  }
  .nav-links.open { display: flex; }
  .nav-links li { padding: 6px 0; border-bottom: 1px solid var(--line); }
  .nav-links li:last-child { border-bottom: 0; }
  .site-header .wrap { position: relative; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
