/* Modern, upscale editorial design with progressive enhancement.
   Clean sans-serif typography, sophisticated color palette, subtle animations.
   No external fonts: the whole site loads instantly. */

:root {
  --bg: #f8f9fa;
  --surface: #ffffff;
  --surface-alt: #f5f6f7;
  --text: #0f1419;
  --text-soft: #6b7280;
  --text-lighter: #9ca3af;
  --rule: #e5e7eb;
  --rule-soft: #f3f4f6;
  --accent: #0ea5a5;
  --accent-dark: #0d9488;
  --accent-soft: #ecfdf5;
  --accent-light: #f0fdfa;
  --warn-bg: #fffbeb;
  --warn-rule: #fcd34d;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.08);
  --max: 48rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1419;
    --surface: #1a1f2e;
    --surface-alt: #222935;
    --text: #f1f5f9;
    --text-soft: #cbd5e1;
    --text-lighter: #94a3b8;
    --rule: #334155;
    --rule-soft: #1e293b;
    --accent: #14b8a6;
    --accent-dark: #0d9488;
    --accent-soft: #0f766e;
    --accent-light: #1f3d3c;
    --warn-bg: #1f1810;
    --warn-rule: #92400e;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.2);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.3);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.4);
  }
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.05rem/1.7 system-ui, -apple-system, "Segoe UI", "Roboto", sans-serif;
  -webkit-text-size-adjust: 100%;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1.5rem; }

/* ---------- masthead ---------- */

.masthead {
  border-bottom: 1px solid var(--rule);
  background: var(--surface);
  backdrop-filter: blur(10px);
  background-color: rgba(255,255,255,0.95);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

@media (prefers-color-scheme: dark) {
  .masthead { background-color: rgba(26, 31, 46, 0.95); }
}

.masthead .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; flex-wrap: wrap; padding-top: 1.25rem; padding-bottom: 1.25rem;
}

.brand {
  font-weight: 700; font-size: 1.3rem; letter-spacing: -0.02em;
  color: var(--text); text-decoration: none; transition: transform 0.2s ease;
}

.brand:hover { transform: translateY(-2px); }

.brand span { color: var(--accent); font-weight: 800; }

.masthead nav {
  display: flex; gap: 2rem; font-size: 0.9rem;
}

.masthead nav a {
  color: var(--text-soft); text-decoration: none;
  font-weight: 500;
  position: relative;
  transition: color 0.3s ease;
}

.masthead nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.masthead nav a:hover {
  color: var(--accent);
}

.masthead nav a:hover::after {
  width: 100%;
}

/* ---------- the disclosure bar: must stay above the fold on every page ---------- */

.disclosure {
  background: var(--warn-bg);
  border-bottom: 1px solid var(--warn-rule);
  font-size: 0.75rem; line-height: 1.6; color: var(--text-soft);
  font-weight: 500;
}

.disclosure .wrap { padding-top: 0.7rem; padding-bottom: 0.7rem; }

.disclosure a {
  color: inherit;
  font-weight: 600;
  transition: opacity 0.2s ease;
}

.disclosure a:hover { opacity: 0.7; }

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

main { padding: 3rem 0 5rem; }

h1 {
  font-size: clamp(2rem, 6vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin: 0 0 0.8rem;
  font-weight: 800;
  color: var(--text);
}

h2 {
  font-size: clamp(1.4rem, 4vw, 1.85rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 3rem 0 1rem;
  padding-top: 1.8rem;
  border-top: 2px solid var(--rule);
  font-weight: 700;
}

h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 2rem 0 0.6rem;
  color: var(--text);
}

.standfirst {
  font-size: 1.2rem;
  color: var(--text-soft);
  line-height: 1.6;
  margin: 0 0 1.8rem;
  font-weight: 400;
}

.byline {
  font-size: 0.8rem;
  color: var(--text-lighter);
  padding-bottom: 1.6rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 2rem;
  font-weight: 500;
  letter-spacing: 0.5px;
}

p {
  margin: 0 0 1.3rem;
  color: var(--text);
}

a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
  border-bottom: 1px solid rgba(14, 165, 165, 0.3);
}

a:hover {
  color: var(--accent-dark);
  border-bottom-color: var(--accent);
}

ul, ol {
  padding-left: 1.5rem;
  margin: 0 0 1.4rem;
}

li {
  margin-bottom: 0.7rem;
  color: var(--text);
}

/* ---------- components ---------- */

.callout {
  background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent-soft) 100%);
  border-left: 4px solid var(--accent);
  padding: 1.4rem 1.6rem;
  margin: 2rem 0;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.callout:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.callout p:last-child { margin-bottom: 0; }

.callout strong {
  color: var(--accent-dark);
  font-weight: 700;
}

.spec {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.9rem;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.spec th, .spec td {
  text-align: left;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}

.spec th {
  width: 38%;
  font-weight: 700;
  color: var(--text);
  background: var(--surface-alt);
}

.spec tr:last-child td { border-bottom: none; }

.table-scroll { overflow-x: auto; }

.cta {
  display: block;
  text-align: center;
  margin: 2.5rem 0;
  padding: 1.3rem 2rem;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: #fff !important;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  cursor: pointer;
  border: none;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
}

.cta:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.cta:active {
  transform: translateY(-2px);
}

.cta small {
  display: block;
  font-weight: 500;
  font-size: 0.8rem;
  opacity: 0.9;
  margin-top: 0.4rem;
}

.cards {
  display: grid;
  gap: 1.5rem;
  margin: 2rem 0;
}

@media (min-width: 36rem) { .cards { grid-template-columns: 1fr 1fr; } }

.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 1.6rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
  transform: translateY(-4px);
}

.card:hover::before {
  opacity: 1;
}

.card h3 {
  margin-top: 0;
  color: var(--text);
}

.card p {
  font-size: 0.95rem;
  color: var(--text-soft);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.card a {
  display: inline-flex;
  align-items: center;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--accent);
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.card a::after {
  content: '→';
  transition: transform 0.2s ease;
}

.card a:hover::after {
  transform: translateX(4px);
}

.note {
  font-size: 0.85rem;
  color: var(--text-soft);
  background: var(--surface-alt);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 1.2rem 1.4rem;
  margin: 2rem 0;
  box-shadow: var(--shadow-sm);
}

.note p:last-child { margin-bottom: 0; }

/* ---------- footer ---------- */

footer {
  border-top: 1px solid var(--rule);
  background: var(--surface);
  font-size: 0.8rem;
  color: var(--text-soft);
  margin-top: auto;
}

footer .wrap {
  padding-top: 2.5rem;
  padding-bottom: 3rem;
}

footer a {
  color: var(--text-soft);
  margin-right: 1.5rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

footer a:hover {
  color: var(--accent);
}

footer p {
  margin-bottom: 1rem;
  line-height: 1.6;
}

/* ============================================================
   Article + capture components (content layer)
   ============================================================ */

.crumbs {
  font-size: 0.8rem;
  color: var(--text-lighter);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.crumbs a {
  color: var(--text-soft);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.crumbs a:hover {
  color: var(--accent);
}

.crumbs span {
  opacity: 0.4;
  margin: 0 0.4rem;
  color: var(--text-lighter);
}

/* key-takeaways box at the top of an article */
.tldr {
  background: linear-gradient(135deg, var(--surface-alt) 0%, var(--surface) 100%);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 1.6rem;
  margin: 2.2rem 0;
  box-shadow: var(--shadow-sm);
}

.tldr h2 {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-lighter);
  margin: 0 0 1rem;
  padding: 0;
  border: 0;
  font-weight: 700;
}

.tldr ul {
  margin: 0;
  font-size: 0.98rem;
  list-style-position: inside;
}

.tldr li {
  margin-bottom: 0.8rem;
  line-height: 1.6;
  color: var(--text-soft);
}

.tldr li:last-child { margin-bottom: 0; }

.tldr strong {
  color: var(--text);
  font-weight: 700;
}

/* email capture */
.capture {
  background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent-soft) 100%);
  border: 1px solid var(--accent);
  border-radius: 12px;
  padding: 2rem 1.8rem;
  margin: 3rem 0;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
}

.capture:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.capture h2 {
  margin: 0 0 0.8rem;
  padding: 0;
  border: 0;
  font-size: 1.4rem;
  line-height: 1.2;
  font-weight: 700;
  color: var(--text);
}

.capture p {
  font-size: 0.98rem;
  color: var(--text-soft);
  margin-bottom: 1.4rem;
  line-height: 1.6;
}

.capture form {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.capture input[type="email"] {
  flex: 1 1 12rem;
  min-width: 0;
  padding: 0.95rem 1.2rem;
  font-size: 1rem;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  transition: all 0.2s ease;
}

.capture input[type="email"]::placeholder {
  color: var(--text-lighter);
}

.capture input[type="email"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(14, 165, 165, 0.1);
}

.capture button {
  flex: 0 0 auto;
  padding: 0.95rem 1.8rem;
  font-size: 0.98rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: #fff;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
}

.capture button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.capture button:active {
  transform: translateY(0);
}

.capture button[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.capture .fineprint {
  font-size: 0.75rem;
  color: var(--text-lighter);
  margin: 1rem 0 0;
  line-height: 1.5;
}

.capture .fineprint a {
  color: var(--text-lighter);
  border-bottom: 1px solid var(--text-lighter);
}

.capture .msg {
  font-size: 0.9rem;
  margin: 1rem 0 0;
  display: none;
  font-weight: 600;
}

.capture .msg.show { display: block; }

.capture .msg.ok { color: #059669; }

.capture .msg.err { color: #dc2626; }

@media (prefers-color-scheme: dark) {
  .capture .msg.err { color: #fca5a5; }
}

/* related links at the foot of an article */
.related {
  border-top: 2px solid var(--rule);
  margin-top: 3.5rem;
  padding-top: 2rem;
}

.related h2 {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-lighter);
  margin: 0 0 1.2rem;
  padding: 0;
  border: 0;
  font-weight: 700;
}

.related ul {
  list-style: none;
  padding: 0;
  font-size: 0.95rem;
}

.related li {
  margin-bottom: 0.8rem;
}

.related a {
  color: var(--accent);
  font-weight: 600;
  border-bottom: 1px solid rgba(14, 165, 165, 0.3);
  transition: all 0.2s ease;
}

.related a:hover {
  color: var(--accent-dark);
  border-bottom-color: var(--accent);
}

/* inline pointer from an article to a review */
.inline-cta {
  border-left: 4px solid var(--accent);
  padding: 0.4rem 0 0.4rem 1.4rem;
  margin: 2rem 0;
  font-size: 0.98rem;
  color: var(--text-soft);
  background: var(--surface-alt);
  padding: 1.2rem 1.4rem;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.inline-cta:hover {
  background: var(--accent-light);
  border-left-color: var(--accent-dark);
}

.inline-cta a {
  font-weight: 700;
  border-bottom: 1px solid rgba(14, 165, 165, 0.3);
}
