/* =====================================================================
   CartwiseLab — "Midnight Lime"
   Each color has ONE job. Do not add colors without a clear job.
   ===================================================================== */
:root {
  --ink: #0E1116;          /* dark: header, footer, headings, text on lime */
  --ink-2: #1A1F27;        /* dark surface (cards on dark) */
  --lime: #C6F432;         /* ACTION: primary buttons only + "Lab" on dark */
  --lime-hover: #B5E61F;
  --lime-deep: #4D7C0F;    /* links, tags, "Lab" on light (passes 4.5:1 on white) */
  --lime-soft: #F1FDD0;    /* verdict box background */
  --bg: #F4F5F7;           /* page background */
  --card: #FFFFFF;         /* cards */
  --line: #E3E6EB;         /* 1px borders */
  --text: #1F242C;         /* body text */
  --muted: #5B6270;        /* secondary text (5.9:1 on white) */
  --warn: #9A3412;         /* watch-outs / expired */
  --warn-soft: #FFF4ED;
  --radius: 14px;
  --radius-sm: 10px;
  --wrap: 1120px;
  --read: 760px;
  --nav-h: 64px;
  --font-head: 'Space Grotesk', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', 'Cascadia Mono', Consolas, monospace;
}

/* Self-hosted variable fonts (no third-party requests). Files: static/assets/fonts/ */
@font-face { font-family: 'Inter'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url('/assets/fonts/inter-latin-wght-normal.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-display: swap; font-weight: 300 700;
  src: url('/assets/fonts/space-grotesk-latin-wght-normal.woff2') format('woff2'); }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--nav-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 17px/1.65 var(--font-body);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--lime-deep); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--ink); line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.45rem, 2.6vw, 1.9rem); font-weight: 700; margin-top: 1.8em; }
h3 { font-size: 1.2rem; font-weight: 600; margin-top: 1.4em; }
p, ul, ol { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; }
li { margin-bottom: .35em; }
:focus-visible { outline: 3px solid var(--lime-deep); outline-offset: 2px; border-radius: 4px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.read { max-width: var(--read); }
.skip { position: absolute; left: -9999px; top: 0; background: var(--lime); color: var(--ink); padding: 8px 14px; z-index: 100; }
.skip:focus { left: 12px; top: 12px; }

/* ---------- Disclosure bar (before ANY link on the page) ---------- */
.disclosure { background: var(--ink-2); color: #D5D9E0; font-size: 13px; line-height: 1.45; padding: 8px 0; text-align: center; }
.disclosure a { color: var(--lime); }

/* ---------- Header ---------- */
.site-header { background: var(--ink); position: sticky; top: 0; z-index: 50; border-bottom: 1px solid #222833; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: var(--nav-h); gap: 16px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; font: 700 21px/1 var(--font-head); letter-spacing: -0.02em; }
.logo:hover { color: #fff; }
.logo svg { flex: none; }
.logo b { color: var(--lime); font-weight: 700; }
.nav-desktop { display: flex; gap: 4px; align-items: center; }
.nav-desktop a { color: #D5D9E0; text-decoration: none; font-size: 15px; font-weight: 500; padding: 8px 12px; border-radius: 8px; }
.nav-desktop a:hover, .nav-desktop a[aria-current="page"] { color: #fff; background: #1D232D; }
.nav-mobile { display: none; position: relative; }
.nav-mobile summary { list-style: none; cursor: pointer; color: #fff; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 10px; border: 1px solid #2A313C; }
.nav-mobile summary::-webkit-details-marker { display: none; }
.nav-mobile[open] summary { background: #1D232D; }
.nav-mobile .menu { position: absolute; right: 0; top: 54px; width: min(84vw, 300px); background: var(--ink); border: 1px solid #2A313C; border-radius: var(--radius); padding: 8px; box-shadow: 0 18px 40px rgba(0,0,0,.35); }
.nav-mobile .menu a { display: block; color: #E6E9EE; text-decoration: none; padding: 13px 14px; border-radius: 8px; font-weight: 500; }
.nav-mobile .menu a:hover { background: #1D232D; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 22px; border-radius: 12px; font: 600 16px/1.2 var(--font-body); text-decoration: none; cursor: pointer; border: 0; transition: background .15s, transform .15s; }
.btn-primary { background: var(--lime); color: var(--ink); }
.btn-primary:hover { background: var(--lime-hover); color: var(--ink); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid #C9CED6; min-height: 44px; padding: 10px 18px; font-size: 15px; }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.on-dark .btn-ghost { color: #fff; border-color: #3A4250; }
.on-dark .btn-ghost:hover { border-color: #fff; color: #fff; }

/* ---------- Hero ---------- */
.hero { background: var(--ink); color: #D5D9E0; padding: 64px 0 72px; }
.hero h1 { color: #fff; max-width: 15ch; }
.hero h1 em { font-style: normal; color: var(--lime); }
.hero .lead { font-size: 1.18rem; max-width: 58ch; margin-bottom: 28px; color: #C3C8D1; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero .proof { display: flex; flex-wrap: wrap; gap: 10px 26px; margin: 34px 0 0; padding: 0; list-style: none; font-size: 15px; color: #AEB4BF; }
.hero .proof li::before { content: "✓"; color: var(--lime); font-weight: 700; margin-right: 8px; }
.page-head { background: var(--ink); color: #C3C8D1; padding: 44px 0 48px; }
.page-head h1 { color: #fff; margin-bottom: .3em; }
.page-head p { max-width: 62ch; margin: 0; font-size: 1.08rem; }
.crumbs { font-size: 14px; margin-bottom: 14px; color: #8D94A0; }
.crumbs a { color: #AEB4BF; text-decoration: none; }
.crumbs a:hover { color: #fff; }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section + .section { border-top: 1px solid var(--line); }
.section.white { background: #fff; }
.eyebrow { display: inline-block; font: 600 12.5px/1 var(--font-head); letter-spacing: .14em; text-transform: uppercase; color: var(--lime-deep); margin-bottom: 14px; }
.on-dark .eyebrow, .hero .eyebrow, .page-head .eyebrow { color: var(--lime); }
.section-head { max-width: 64ch; margin-bottom: 32px; }
.section-head h2 { margin-top: 0; }
.section-head p { color: var(--muted); margin: 0; }

/* ---------- Cards / grid ---------- */
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; transition: box-shadow .2s, transform .2s; }
a.card { display: block; color: inherit; text-decoration: none; }
a.card:hover { box-shadow: 0 10px 30px rgba(14,17,22,.08); transform: translateY(-2px); }
.card h3 { margin-top: 0; }
.card p { color: var(--muted); margin: 0; font-size: 15.5px; }
.card .num { font: 700 14px/1 var(--font-head); color: var(--lime-deep); letter-spacing: .08em; margin-bottom: 14px; display: block; }
.card .more { display: inline-block; margin-top: 14px; font-weight: 600; color: var(--lime-deep); font-size: 15px; }
.steps { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.dark-band { background: var(--ink); color: #C3C8D1; }
.dark-band h2, .dark-band h3 { color: #fff; }
.dark-band .card { background: var(--ink-2); border-color: #262D38; }
.dark-band .card p { color: #AEB4BF; }
.dark-band .card .num { color: var(--lime); }

/* ---------- Prose ---------- */
.prose { background: #fff; }
.prose .wrap { padding-top: 48px; padding-bottom: 64px; }
.prose .read > *:first-child { margin-top: 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.4em; font-size: 15.5px; }
.prose th, .prose td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-family: var(--font-head); color: var(--ink); background: var(--bg); font-weight: 600; }
.meta { font-size: 14.5px; color: var(--muted); margin-bottom: 26px; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.meta strong { color: var(--text); font-weight: 600; }
.updated { font-size: 14px; color: var(--muted); }

/* ---------- Article components ---------- */
.badge { display: inline-block; font: 600 12px/1 var(--font-head); letter-spacing: .08em; text-transform: uppercase; padding: 6px 10px; border-radius: 999px; background: var(--lime-soft); color: var(--lime-deep); }
.badge.dark { background: var(--ink); color: var(--lime); }
.verdict { background: var(--lime-soft); border: 1px solid #DDF39A; border-radius: var(--radius); padding: 24px; margin: 0 0 28px; }
.verdict h2 { margin-top: 0; font-size: 1.35rem; }
.fit { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 14px 0 18px; }
.fit div { background: #fff; border-radius: var(--radius-sm); padding: 14px 16px; border: 1px solid #E5F0C2; }
.fit strong { display: block; font-family: var(--font-head); margin-bottom: 4px; color: var(--ink); }
.fit .skip-if strong { color: var(--warn); }
.toc { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; margin: 0 0 28px; font-size: 15.5px; }
.toc strong { font-family: var(--font-head); display: block; margin-bottom: 8px; }
.toc ol { margin: 0; }
.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 0 0 1.4em; }
.pros-cons > div { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.pros-cons h3 { margin-top: 0; font-size: 1.05rem; }
.pros-cons .cons { background: var(--warn-soft); border-color: #F6D9C8; }
.pros-cons .cons h3 { color: var(--warn); }
.note { border-left: 3px solid var(--lime-deep); background: var(--bg); padding: 14px 18px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 0 0 1.4em; font-size: 15.5px; }
.note.warn { border-color: var(--warn); background: var(--warn-soft); }
.sample-flag { background: #FEF3C7; color: #78350F; border: 1px dashed #D97706; padding: 10px 14px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 18px; }
.buy { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin: 18px 0 26px; }
.buy small { color: var(--muted); font-size: 13.5px; }
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 600; color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 600 22px/1 var(--font-head); color: var(--lime-deep); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 10px 0 0; color: var(--text); }
.sources ol { font-size: 14.5px; color: var(--muted); }

/* Coupon codes */
.codes { display: grid; gap: 14px; margin: 0 0 1.6em; }
.code { display: grid; grid-template-columns: 1fr auto; gap: 14px 20px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.code .deal { font: 700 1.35rem/1.15 var(--font-head); color: var(--ink); }
.code .cond { color: var(--muted); font-size: 14.5px; margin-top: 4px; }
.code .checked { font-size: 13px; color: var(--lime-deep); margin-top: 6px; font-weight: 500; }
.code .reveal { display: flex; align-items: center; gap: 10px; }
.code .code-text { font: 600 16px/1 var(--font-mono); letter-spacing: .06em; border: 1.5px dashed var(--lime-deep); padding: 12px 14px; border-radius: 10px; background: var(--lime-soft); color: var(--ink); }
.code.expired { opacity: .65; }
.code.expired .deal { text-decoration: line-through; }

/* Product cards */
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; margin: 0 0 10px; }
.product { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 14px 16px; display: flex; flex-direction: column; }
.product img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: contain; background: var(--bg); border-radius: var(--radius-sm); }
.product h3 { margin: 12px 0 2px; font-size: 1.05rem; }
.product .spec { color: var(--muted); font-size: 14px; margin: 0 0 6px; }
.product .price { font: 700 1.1rem/1.2 var(--font-head); color: var(--ink); margin: 0 0 12px; }
.product .btn { margin-top: auto; width: 100%; min-height: 46px; }
.img-credit { font-size: 13px; color: var(--muted); margin: 0 0 18px; }
@media (max-width: 600px) { .products { grid-template-columns: 1fr 1fr; gap: 10px; } .product { padding: 10px; } .product .btn { font-size: 14px; padding: 10px; } }

/* Comparison table → cards on mobile */
.compare-table th:first-child { width: 28%; }

/* ---------- Coming soon ---------- */
.empty { background: #fff; border: 1px dashed #C9CED6; border-radius: var(--radius); padding: 32px; text-align: left; }
.empty h2 { margin-top: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #AEB4BF; padding: 56px 0 30px; font-size: 15px; }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.site-footer h4 { color: #fff; font-size: 15px; margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: #C3C8D1; text-decoration: none; }
.site-footer a:hover { color: var(--lime); }
.site-footer .fine { border-top: 1px solid #222833; margin-top: 40px; padding-top: 22px; font-size: 13.5px; line-height: 1.6; color: #8D94A0; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav-desktop { display: none; }
  .nav-mobile { display: block; }
  .site-footer .cols { grid-template-columns: 1fr 1fr; }
  .site-footer .brand-col { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  body { font-size: 16.5px; }
  .hero { padding: 44px 0 52px; }
  .section { padding: 48px 0; }
  .fit, .pros-cons { grid-template-columns: 1fr; }
  .code { grid-template-columns: 1fr; }
  .hero .actions .btn { width: 100%; }
  /* tables → stacked rows */
  .prose table.stack, .prose table.stack tbody, .prose table.stack tr, .prose table.stack td { display: block; width: 100%; }
  .prose table.stack thead { display: none; }
  .prose table.stack tr { border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 12px; padding: 6px 0; }
  .prose table.stack td { border: 0; padding: 6px 14px; }
  .prose table.stack td::before { content: attr(data-label); display: block; font: 600 12px/1.4 var(--font-head); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
