/* design.css — visual layer for NotetakerCompare, loaded after style.css by enhance.js.
   Light theme only. Colors are tokens; chart colors come from the validated default palette
   (blue slot 1 #2a78d6, sequential blue steps 550/250). */
:root {
  color-scheme: light;
  --bg: #fbfaf8;
  --surface: #ffffff;
  --bg-alt: #f3f1ec;
  --text: #1c1b19;
  --text-muted: #57554f;
  --border: #e6e3dc;
  --accent: #1c5cab;
  --accent-bg: #eaf1fb;
  --brand: #1c5cab;
  --brand-ink: #0d366b;
  --chart-bar: #2a78d6;
  --chart-bar-hover: #1c5cab;
  --chart-bar-light: #86b6ef;
  --chart-track: #efede8;
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif;
  --max-width: 780px;
}

body { background: var(--bg); }

/* ---------- header ---------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.header-inner { max-width: 1080px; padding: 0.7rem 1.25rem; gap: 0.5rem 1.75rem; }
.brand { display: inline-flex; align-items: center; gap: 0.55rem; font-family: var(--serif); font-weight: 700; font-size: 1.2rem; letter-spacing: -0.01em; color: var(--brand-ink); }
.brand svg { flex: none; }
.site-nav { gap: 0.15rem 0.35rem; margin-left: auto; }
.site-nav a { padding: 0.35rem 0.7rem; border-radius: 999px; font-size: 0.88rem; font-weight: 500; }
.site-nav a:hover { background: var(--bg-alt); color: var(--brand-ink); }
.site-nav a[aria-current="page"] { background: var(--accent-bg); color: var(--brand-ink); font-weight: 600; }
@media (max-width: 820px) {
  .site-nav { margin-left: 0; width: 100%; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 0.15rem; -webkit-overflow-scrolling: touch; }
}

/* ---------- typography ---------- */
h1, h2, h3 { font-family: var(--serif); letter-spacing: -0.012em; color: var(--text); }
h1 { font-size: 2.15rem; line-height: 1.2; }
h2 { font-size: 1.5rem; border-top: none; margin-top: 2.6rem; padding-top: 0; position: relative; }
h2::before { content: ""; display: block; width: 36px; height: 3px; border-radius: 2px; background: var(--chart-bar); margin-bottom: 0.7rem; }
h3 { font-size: 1.15rem; }
.page { padding-top: 1.75rem; }
.page a { text-decoration-thickness: 1px; }

/* ---------- article header ---------- */
.article-head { display: grid; grid-template-columns: auto 1fr; gap: 0.25rem 1.1rem; align-items: center; padding: 1.5rem 1.4rem 1.35rem; margin: 0 0 1.5rem; border-radius: 16px; border: 1px solid var(--border); background: linear-gradient(135deg, #eef4fc 0%, #f8f6f1 70%); }
.article-head .icon-badge { grid-row: 1 / span 3; width: 64px; height: 64px; }
.article-head .eyebrow { margin: 0; }
.article-head h1 { margin: 0; font-size: 1.9rem; }
.article-head .article-meta { margin: 0.1rem 0 0; font-size: 0.86rem; color: var(--text-muted); }
@media (max-width: 560px) {
  .article-head { grid-template-columns: 1fr; padding: 1.1rem; }
  .article-head .icon-badge { grid-row: auto; width: 48px; height: 48px; }
  .article-head h1 { font-size: 1.55rem; }
}
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.72rem; font-weight: 700; color: var(--brand); }
.icon-badge { display: inline-flex; align-items: center; justify-content: center; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); color: var(--brand); box-shadow: 0 1px 2px rgba(20, 20, 20, 0.05); }
.icon-badge svg { width: 55%; height: 55%; }

/* ---------- disclosure callout, takeaways, bottom line ---------- */
.page > p:first-of-type { border-radius: 10px; border-left-width: 4px; }
.takeaways, .bottomline { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--chart-bar); border-radius: 12px; padding: 0.4rem 1.3rem 0.6rem; margin: 1.6rem 0; box-shadow: 0 1px 2px rgba(20, 20, 20, 0.04); }
.takeaways h2, .bottomline h2 { margin-top: 0.9rem; font-size: 1.2rem; }
.takeaways h2::before, .bottomline h2::before { display: none; }
.takeaways ul { padding-left: 1.2rem; }
.bottomline { border-left-color: var(--brand-ink); background: #f4f8fd; }

/* ---------- tables ---------- */
.table-wrap { border-radius: 12px; background: var(--surface); box-shadow: 0 1px 2px rgba(20, 20, 20, 0.04); }
thead th { background: #1f3552; color: #fff; }
tbody tr:nth-child(even) td { background: #faf9f6; }
tbody td:first-child { font-weight: 600; }

/* ---------- charts (HTML bars; identity carried by labels, never color alone) ---------- */
.chart { margin: 1.8rem 0; padding: 1.15rem 1.3rem 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 1px 2px rgba(20, 20, 20, 0.04); }
.chart figcaption { margin-bottom: 0.9rem; }
.chart figcaption strong { display: block; font-family: var(--serif); font-size: 1.05rem; color: var(--text); }
.chart figcaption span { font-size: 0.84rem; color: var(--text-muted); }
.chart-legend { display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem; margin: 0 0 0.8rem; font-size: 0.82rem; color: var(--text-muted); }
.chart-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 0.4rem; vertical-align: -1px; }
.bar-row { display: grid; grid-template-columns: 11.5rem 1fr 4.6rem; align-items: center; gap: 0.6rem; padding: 0.3rem 0; }
.bar-label { font-size: 0.92rem; color: var(--text); line-height: 1.3; }
.bar-label small { display: block; font-size: 0.76rem; color: var(--text-muted); }
.bar-tracks { display: grid; gap: 2px; }
.bar-track { height: 16px; background: var(--chart-track); border-radius: 0 4px 4px 0; overflow: hidden; }
.bar-fill { height: 100%; background: var(--chart-bar); border-radius: 0 4px 4px 0; transition: background 0.15s; }
.bar-fill.alt { background: var(--chart-bar-light); }
.bar-fill.dark { background: #1c5cab; }
.bar-fill .ext { display: inline-block; }
.bar-row:hover .bar-fill:not(.alt) { background: var(--chart-bar-hover); }
.bar-value { font-size: 0.92rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); white-space: nowrap; }
.bar-value span { display: block; }
.bar-value small { font-weight: 500; }
.range-bar { display: flex; height: 100%; }
.range-bar .solid { background: var(--chart-bar); }
.range-bar .light { background: var(--chart-bar-light); border-radius: 0 4px 4px 0; }
.chart-note { margin: 0.7rem 0 0; font-size: 0.78rem; color: var(--text-muted); }
.chart details { margin-top: 0.6rem; font-size: 0.84rem; }
.chart summary { cursor: pointer; color: var(--brand); }
.chart details table { min-width: 0; margin-top: 0.5rem; }
@media (max-width: 560px) {
  .bar-row { grid-template-columns: 1fr 4.4rem; row-gap: 0.15rem; }
  .bar-label { grid-column: 1 / -1; }
}

/* ---------- home ---------- */
.hero { padding: 2rem 1.6rem 1.9rem; margin: 0 0 1.75rem; border-radius: 20px; border: 1px solid var(--border); background: radial-gradient(1200px 300px at 90% -20%, #dbe8f9 0%, rgba(219, 232, 249, 0) 60%), linear-gradient(135deg, #f1f6fd 0%, #f8f6f1 80%); }
.hero h1 { font-size: 2.5rem; margin: 0.35rem 0 0.8rem; max-width: 24ch; }
.hero .lede { font-size: 1.1rem; color: var(--text-muted); max-width: 58ch; margin: 0 0 1.3rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.65rem; }
.btn { display: inline-block; padding: 0.65rem 1.15rem; border-radius: 10px; font-weight: 600; font-size: 0.95rem; text-decoration: none; }
.page .btn { text-decoration: none; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-ink); }
.btn-ghost { background: var(--surface); border: 1px solid var(--border); color: var(--brand-ink); }
.btn-ghost:hover { border-color: var(--brand); }
@media (max-width: 560px) { .hero { padding: 1.4rem 1.1rem; } .hero h1 { font-size: 1.85rem; } }
.trust-strip { display: grid; grid-template-columns: 1fr; gap: 0.8rem; margin: 0 0 2rem; }
@media (min-width: 700px) { .trust-strip { grid-template-columns: repeat(3, 1fr); } }
.trust-item { display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.95rem 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; font-size: 0.9rem; line-height: 1.45; }
.trust-item .icon-badge { width: 38px; height: 38px; border-radius: 10px; flex: none; }
.trust-item strong { display: block; font-size: 0.95rem; }
.section-title { font-family: var(--serif); font-size: 1.4rem; margin: 0 0 0.9rem; }
.card-grid { gap: 1.1rem; margin: 0.5rem 0 2rem; }
.card { display: flex; flex-direction: column; gap: 0.35rem; padding: 1.25rem 1.3rem 1.1rem; border-radius: 14px; box-shadow: 0 1px 2px rgba(20, 20, 20, 0.04); transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s; background: var(--surface); }
.card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(20, 30, 50, 0.09); border-color: var(--brand); }
.card .icon-badge { width: 46px; height: 46px; border-radius: 12px; margin-bottom: 0.35rem; background: var(--accent-bg); border-color: #d3e2f6; }
.card h3 { font-size: 1.1rem; color: var(--brand-ink); }
.card .card-cta { margin-top: auto; padding-top: 0.5rem; font-size: 0.88rem; font-weight: 600; color: var(--brand); }
.prose > p { margin: 0 0 1rem; }
.prose > p:first-of-type { background: none; border: none; padding: 0; border-radius: 0; font-size: inherit; color: inherit; }

/* ---------- footer ---------- */
.site-footer { background: #17263b; border-top: none; color: #c9d3e2; margin-top: 1rem; }
.footer-inner { color: #c9d3e2; max-width: 1080px; }
.footer-inner a { color: #fff; }
.footer-brand { display: flex; align-items: center; gap: 0.6rem; font-family: var(--serif); font-size: 1.1rem; color: #fff; margin-bottom: 0.6rem; }
.fineprint { color: #9fb0c7; }

/* ---------- print ---------- */
@media print { .site-header, .banner, .site-footer { display: none; } .chart, .article-head { box-shadow: none; } }
