/* ==========================================================
   Ardelmere Studio — site styles (v2, premium editorial)
   Palette: forest green, warm ivory, restrained gold.
   Change colours here; every page uses these variables.
   Contrast-checked: body text and buttons meet WCAG AA (4.5:1).
   ========================================================== */
@font-face {
  font-family: "Lora";
  src: url("lora-var.woff") format("woff");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --forest: #123a26;        /* primary */
  --forest-deep: #0b2a1a;   /* bands, footer */
  --forest-soft: #e4ece3;   /* tinted panels */
  --ivory: #faf6ec;         /* page */
  --ivory-deep: #f2ead8;    /* alt sections */
  --paper: #fffdf8;         /* cards */
  --gold: #c9a14a;          /* buttons/rules, always with dark text (6.4:1) */
  --gold-ink: #7a5a17;      /* gold TEXT on ivory (5.9:1) */
  --gold-soft: #e9d8ad;     /* gold text on forest (10.9:1) */
  --ink: #1d2a22;
  --muted: #55615a;         /* 5.8:1 on ivory */
  --line: #e0d6c0;
  --review: #fff4d6;
  --review-line: #c99a2e;
  --radius: 12px;
  --max: 1160px;
  --read: 740px;
  --serif: "Lora", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --shadow: 0 1px 2px rgba(11,42,26,.06), 0 8px 24px rgba(11,42,26,.08);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body { margin: 0; background: var(--ivory); color: var(--ink); font: 17px/1.65 var(--sans); overflow-x: clip; }
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--forest); text-decoration-color: var(--gold); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--forest-deep); text-decoration-thickness: 2.5px; }
a:focus-visible, button:focus-visible, .btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--serif); color: var(--forest-deep); line-height: 1.15; text-wrap: balance; }
h1 { font-weight: 600; }
h2 { font-weight: 600; font-size: clamp(1.45rem, 2.6vw, 1.9rem); margin: 2.4em 0 .55em; }
h3 { font-weight: 600; font-size: 1.22rem; margin: 1.7em 0 .4em; }
p { margin: 0 0 1em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--forest); color: #fff; padding: 10px 14px; z-index: 10; }
.skip:focus { left: 8px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 clamp(18px, 4vw, 32px); }
.read { max-width: calc(var(--read) + 64px); }

/* ---------- Masthead ---------- */
.masthead { background: var(--ivory); border-bottom: 1px solid var(--line); }
.masthead .wrap { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; min-height: 76px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--forest-deep); }
.brand img { width: 48px; height: 48px; border-radius: 50%; box-shadow: 0 0 0 1px var(--gold); }
.brand-name { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; letter-spacing: .01em; line-height: 1.1; }
.brand-name small { display: block; font-family: var(--sans); font-size: .78rem; font-weight: 500; color: var(--muted); margin-top: 3px; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; flex-wrap: wrap; }
.site-nav a { display: inline-flex; align-items: center; padding: 10px 14px; min-height: 44px; color: var(--forest-deep); text-decoration: none; font-weight: 500; font-size: .97rem; border-radius: 8px; }
.site-nav a:hover { background: var(--ivory-deep); }
.site-nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--gold); }

/* ---------- Buttons & labels ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 11px 20px; border-radius: 999px; background: var(--gold); color: var(--forest-deep); font-weight: 700; font-size: .98rem; text-decoration: none; border: 0; }
.btn:hover { background: #d6b05a; color: var(--forest-deep); }
.btn-dark { background: var(--forest); color: #fff; }
.btn-dark:hover { background: var(--forest-deep); color: #fff; }
.btn-ghost { background: transparent; color: var(--forest); box-shadow: inset 0 0 0 1.5px var(--forest); }
.btn-ghost:hover { background: var(--forest); color: #fff; }
.btn[aria-disabled="true"] { background: #ece5d4; color: #4d4a42; box-shadow: inset 0 0 0 1px #cfc6b2; cursor: not-allowed; }
.kicker { font-size: .88rem; font-weight: 600; color: var(--gold-ink); margin: 0 0 10px; }
.on-dark .kicker { color: var(--gold-soft); }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--forest-soft); color: var(--forest-deep); }

/* ---------- Home hero ---------- */
.hero { background: var(--forest-deep); color: #efe9da; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 56px); align-items: center; padding-top: clamp(36px, 6vw, 72px); padding-bottom: clamp(36px, 6vw, 72px); }
.hero h1 { color: #fffaf0; font-size: clamp(2.1rem, 4.6vw, 3.3rem); line-height: 1.06; margin: 0 0 18px; }
.hero p.dek { font-size: 1.1rem; color: #e8e3d4; max-width: 34em; margin-bottom: 26px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; }
.hero .actions .note { font-size: .92rem; color: var(--gold-soft); }
.hero figure { margin: 0; }
.hero figure img { border-radius: var(--radius); box-shadow: 0 18px 40px rgba(0,0,0,.35); width: 100%; }

/* ---------- Sections ---------- */
.section { padding: clamp(44px, 6vw, 76px) 0; }
.section-alt { background: var(--ivory-deep); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 8px 16px; flex-wrap: wrap; margin-bottom: 22px; }
.section-head h2 { margin: 0; }
.section-head p { margin: 0; color: var(--muted); max-width: 36em; }

.lead-story { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); text-decoration: none; color: inherit; }
.lead-story img { width: 100%; height: 100%; object-fit: cover; }
.lead-story .body { padding: clamp(22px, 3vw, 36px); display: flex; flex-direction: column; justify-content: center; }
.lead-story h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin: 0 0 10px; }
.lead-story ul { margin: 0 0 18px; padding-left: 1.1em; color: var(--muted); }
.lead-story .btn { align-self: flex-start; }
.lead-story:hover h3 { text-decoration: underline; text-decoration-color: var(--gold); }

.pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.pillar { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.pillar svg { width: 34px; height: 34px; margin-bottom: 10px; }
.pillar h3 { margin: 0 0 6px; font-size: 1.12rem; }
.pillar p { margin: 0; font-size: .97rem; color: var(--muted); }

.plug { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 22px; align-items: center; background: var(--forest); color: #ece6d6; border-radius: var(--radius); padding: clamp(20px, 3vw, 30px); }
.plug img { border-radius: 50%; box-shadow: 0 0 0 2px var(--gold); }
.plug h3 { color: #fffaf0; margin: 0 0 6px; }
.plug p { margin: 0 0 14px; }

/* ---------- Article ---------- */
.article-head { background: var(--forest-deep); color: #efe9da; padding: clamp(30px, 5vw, 56px) 0 clamp(70px, 8vw, 96px); }
.article-head h1 { color: #fffaf0; font-size: clamp(2rem, 4.4vw, 3rem); line-height: 1.08; margin: 0 0 14px; }
.article-head .dek { font-size: 1.12rem; color: #e8e3d4; margin: 0 0 18px; }
.breadcrumb { font-size: .9rem; margin: 0 0 16px; color: var(--gold-soft); }
.breadcrumb a { color: var(--gold-soft); }
.byline { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; font-size: .92rem; color: #dcd6c5; }
.byline .badge { background: rgba(233,216,173,.16); color: var(--gold-soft); }
.article-hero { margin-top: clamp(-80px, -7vw, -56px); }
.article-hero img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; }
.article-body { padding-top: 28px; padding-bottom: 72px; }
.article-body > * { max-width: var(--read); }
.article-body ul, .article-body ol { padding-left: 1.25em; }
.article-body li { margin: .35em 0; }
.lede { font-size: 1.14rem; color: #34433a; }

.disclosure-box { border: 1px solid var(--review-line); background: var(--review); border-radius: var(--radius); padding: 12px 16px; font-size: .94rem; margin: 0 0 22px; }
.disclosure-box p { margin: 0; }
.review-flag { display: inline-block; background: #7a5a17; color: #fff; font-size: .74rem; font-weight: 700; padding: 2px 8px; border-radius: 4px; margin-right: 6px; vertical-align: 1px; }

.quick-answer { background: var(--paper); border: 1px solid var(--line); border-top: 4px solid var(--gold); border-radius: var(--radius); padding: clamp(18px, 3vw, 28px); box-shadow: var(--shadow); margin: 6px 0 26px; }
.quick-answer h2 { margin: 0 0 10px; font-size: 1.4rem; }
.quick-answer ol { margin: 0; }
.quick-answer li { margin: .45em 0; }

.toc { border-left: 3px solid var(--gold); padding: 4px 0 4px 18px; margin: 26px 0; }
.toc strong { font-family: var(--serif); color: var(--forest-deep); }
.toc ol { margin: 8px 0 0; columns: 2; column-gap: 28px; }
.toc li { break-inside: avoid; margin: .25em 0; font-size: .97rem; }

.callout { background: var(--forest-soft); border-radius: var(--radius); padding: 16px 20px; margin: 22px 0; }
.callout p { margin: 0; }
.callout p + p { margin-top: 8px; }

/* Tables: on phones, rows become stacked cards (no sideways scrolling) */
.table-wrap { margin: 18px 0 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); overflow: hidden; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
caption { text-align: left; }
th, td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
thead th { background: var(--forest); color: #fffaf0; font-weight: 600; font-size: .88rem; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:nth-child(even) td { background: #fcf9f1; }
td:first-child { font-weight: 600; color: var(--forest-deep); }
td .btn { min-height: 40px; padding: 8px 14px; font-size: .86rem; white-space: nowrap; }
.table-note { font-size: .86rem; color: var(--muted); margin-top: 6px; }

.example { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; margin: 16px 0; }
.example h3 { margin-top: 0; }
.example dl { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 6px 14px; margin: 10px 0 0; font-size: .97rem; }
.example dt { font-weight: 700; color: var(--forest); }
.example dd { margin: 0; }

/* Product picks */
.pick { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 20px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin: 18px 0; box-shadow: var(--shadow); }
.pick-icon { width: 96px; height: 96px; border-radius: 14px; background: var(--forest-soft); display: grid; place-items: center; }
.pick-icon svg { width: 62px; height: 62px; }
.pick .label { font-size: .84rem; font-weight: 700; color: var(--gold-ink); margin: 0 0 2px; }
.pick h3 { margin: 0 0 8px; font-size: 1.25rem; }
.pick p { margin: 0 0 10px; }
.pick dl { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 6px 14px; margin: 6px 0 16px; font-size: .96rem; }
.pick dt { font-weight: 700; color: var(--forest); }
.pick dd { margin: 0; }
.pick .cta { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.pick .cta small { color: var(--muted); }

.bundle { background: var(--forest); color: #ece6d6; border-radius: var(--radius); padding: clamp(20px, 3vw, 30px); margin: 24px 0; }
.bundle h3 { color: #fffaf0; margin-top: 0; }
.bundle ol { margin: 0 0 14px; }
.bundle a { color: var(--gold-soft); }

.checklist { list-style: none; padding-left: 0 !important; }
.checklist li { position: relative; padding-left: 34px; margin: 10px 0; }
.checklist li::before { content: ""; position: absolute; left: 0; top: 4px; width: 20px; height: 20px; border: 2px solid var(--gold-ink); border-radius: 5px; background: #fff; }

.method { background: var(--ivory-deep); border-radius: var(--radius); padding: 18px 22px; font-size: .96rem; margin-top: 32px; }
.method h2 { font-size: 1.25rem; margin: 0 0 8px; }
.sources { font-size: .9rem; color: var(--muted); }
.sources li { margin: 6px 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--forest-deep); color: #d9d3c2; font-size: .92rem; padding: 44px 0 36px; }
.site-footer a { color: var(--gold-soft); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 28px; }
.footer-brand { display: flex; gap: 14px; align-items: center; margin-bottom: 10px; }
.footer-brand img { width: 44px; height: 44px; border-radius: 50%; box-shadow: 0 0 0 1px var(--gold); }
.footer-brand strong { font-family: var(--serif); font-size: 1.2rem; color: #fffaf0; font-weight: 600; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.footer-links a { display: inline-block; padding: 6px 0; }
.footer-legal { border-top: 1px solid rgba(233,216,173,.2); margin-top: 26px; padding-top: 16px; font-size: .86rem; color: #c9c3b2; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero .wrap, .lead-story { grid-template-columns: minmax(0, 1fr); }
  .pillars { grid-template-columns: minmax(0, 1fr); }
  .lead-story img { aspect-ratio: 16 / 10; height: auto; }
}
@media (max-width: 640px) {
  body { font-size: 16.5px; }
  .masthead .wrap { justify-content: center; }
  .site-nav ul { justify-content: center; }
  .site-nav a { padding: 10px 11px; }
  .toc ol { columns: 1; }
  .example dl, .pick dl { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .example dt, .pick dt { margin-top: 8px; }
  .pick { grid-template-columns: minmax(0, 1fr); padding: 18px; }
  .pick-icon { width: 64px; height: 64px; }
  .pick-icon svg { width: 42px; height: 42px; }
  .plug, .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .plug img { width: 76px; }
  /* stacked tables: each row becomes a card with labels */
  .stack thead { display: none; }
  .stack, .stack tbody, .stack tr, .stack td { display: block; width: 100%; }
  .stack tr { padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .stack tbody tr:last-child { border-bottom: 0; }
  .stack td { border: 0; padding: 4px 0; background: transparent !important; }
  .stack td::before { content: attr(data-label); display: block; font-size: .8rem; font-weight: 700; color: var(--muted); }
  .stack td:first-child { font-family: var(--serif); font-size: 1.08rem; }
  .stack td:first-child::before { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .lead-story, .btn { transition: background-color .15s ease, box-shadow .15s ease; }
}
.pick-note { font-size: .9rem; color: var(--muted); margin: 0; }
