/* maiagent.online — fresh, friendly theme. Each topic has its own accent
   color, passed to elements as --hub (see topic_map.py). */

@font-face { font-family: "Jakarta"; src: url("fonts/jakarta-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Jakarta"; src: url("fonts/jakarta-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Jakarta"; src: url("fonts/jakarta-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Jakarta"; src: url("fonts/jakarta-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }

:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #17231f;
  --muted: #5b6b66;
  --line: #e7e3da;
  --accent: #0f766e;
  --accent-2: #f97316;
  --pros: #15803d;
  --cons: #c2410c;
  --shadow: 0 1px 2px rgba(23, 35, 31, .05), 0 8px 24px -12px rgba(23, 35, 31, .18);
  --shadow-hover: 0 2px 4px rgba(23, 35, 31, .06), 0 18px 36px -14px rgba(23, 35, 31, .28);
  --hero-grad: radial-gradient(1200px 400px at 10% -10%, #ccfbf1 0%, transparent 60%),
               radial-gradient(900px 380px at 90% 0%, #fde6c8 0%, transparent 55%),
               radial-gradient(800px 300px at 60% 120%, #dbeafe 0%, transparent 60%);
  --hub: #0d9488;
  --radius: 16px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1614;
    --surface: #16201d;
    --text: #e8efec;
    --muted: #9fb1ab;
    --line: #26332f;
    --accent: #3cc6b8;
    --accent-2: #fb923c;
    --pros: #6fd694;
    --cons: #fb9a73;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(0, 0, 0, .6);
    --shadow-hover: 0 2px 4px rgba(0, 0, 0, .35), 0 18px 36px -14px rgba(0, 0, 0, .7);
    --hero-grad: radial-gradient(1200px 400px at 10% -10%, #0f3b36 0%, transparent 60%),
                 radial-gradient(900px 380px at 90% 0%, #3b2614 0%, transparent 55%),
                 radial-gradient(800px 300px at 60% 120%, #152645 0%, transparent 60%);
    color-scheme: dark;
  }
}

/* soft tint of the current topic color, works in light and dark mode */
.chip, .hub-chip, .topic-icon, .num, .pick-label, .thumb-placeholder, .empty-state, .hub-hero, .toc, .quick-picks, .step-icon {
  --tint: color-mix(in srgb, var(--hub) 14%, var(--surface));
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.7 "Jakarta", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-2); }
h1, h2, h3, h4 { line-height: 1.25; letter-spacing: -.015em; }
h1 { font-size: 2.4rem; font-weight: 800; margin: 10px 0 14px; }
h2 { font-size: 1.6rem; font-weight: 800; margin: 44px 0 14px; scroll-margin-top: 90px; }
h3 { font-size: 1.2rem; font-weight: 700; margin: 26px 0 8px; }
.icon { flex: none; vertical-align: middle; }
.small { font-size: 14px; color: var(--muted); }
.wrap { max-width: 780px; margin: 0 auto; padding: 0 16px; }
.wrap-wide { max-width: 1140px; margin: 0 auto; padding: 0 16px; }
main { padding-bottom: 64px; }

/* --- header ----------------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { max-width: 1140px; margin: 0 auto; padding: 10px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 28px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 1.12rem; color: var(--text); text-decoration: none; letter-spacing: -.02em; }
.brand b { color: var(--accent); font-weight: 800; }
.main-nav { display: flex; gap: 4px; overflow-x: auto; white-space: nowrap; max-width: 100%; scrollbar-width: none; }
.main-nav::-webkit-scrollbar { display: none; }
.main-nav a { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px; color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 600; }
.main-nav a .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--hub); }
.main-nav a:hover, .main-nav a.active { color: var(--text); background: color-mix(in srgb, var(--hub) 13%, transparent); }
.disclosure-bar { background: color-mix(in srgb, var(--accent-2) 10%, var(--surface)); font-size: 14px; color: var(--muted); padding: 7px 0; border-bottom: 1px solid var(--line); }
.preview-bar { background: #b45309; color: #fff; text-align: center; font-weight: 700; padding: 7px; }

/* --- hero ------------------------------------------------------------- */
.hero { background: var(--hero-grad); border-bottom: 1px solid var(--line); }
.hero-inner { padding-top: 56px; padding-bottom: 48px; text-align: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: var(--accent); background: var(--surface); border: 1px solid var(--line); padding: 5px 12px; border-radius: 999px; margin: 0; box-shadow: var(--shadow); }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); margin: 18px auto 14px; max-width: 820px; }
.highlight { background: linear-gradient(100deg, #0d9488, #2563eb 55%, #f97316); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { font-size: 1.15rem; color: var(--muted); max-width: 680px; margin: 0 auto; }
.hero-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 28px; }
.hero-chips.left { justify-content: flex-start; margin-top: 0; }
.hub-chip { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; background: var(--tint); color: var(--text); text-decoration: none; font-weight: 700; font-size: 15px; border: 1px solid color-mix(in srgb, var(--hub) 25%, transparent); transition: transform .15s ease, box-shadow .15s ease; }
.hub-chip .icon { color: var(--hub); }
.hub-chip:hover { color: var(--text); transform: translateY(-2px); box-shadow: var(--shadow); }
.trust { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; color: var(--muted); font-size: 15px; font-weight: 600; }
.trust li { display: inline-flex; align-items: center; gap: 6px; }
.trust .icon { color: var(--pros); }

/* --- blocks & cards --------------------------------------------------- */
.block { margin-top: 48px; }
.block-head { margin-bottom: 18px; }
.block-head h2 { margin: 0 0 6px; }
.block-head p { margin: 0; color: var(--muted); }
.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.guide-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--text); text-decoration: none; box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease; }
.guide-card:hover { color: var(--text); transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.guide-card .thumb { display: block; width: 100%; aspect-ratio: 1200 / 627; object-fit: cover; border-bottom: 3px solid var(--hub); }
.thumb-placeholder { display: flex !important; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--tint), color-mix(in srgb, var(--hub) 30%, var(--surface))); color: var(--hub); }
.card-body { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 18px; flex: 1; }
.card-title { font-weight: 800; font-size: 1.1rem; line-height: 1.3; }
.card-text { color: var(--muted); font-size: 15px; line-height: 1.55; }
.read-more { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 15px; color: var(--hub); }
.chip { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: var(--tint); color: color-mix(in srgb, var(--hub) 80%, var(--text)); font-size: 12.5px; font-weight: 700; text-decoration: none; }
.topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.topic-card { display: flex; flex-direction: column; gap: 10px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--hub); border-radius: var(--radius); color: var(--text); text-decoration: none; box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease; }
.topic-card:hover { color: var(--text); transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.topic-icon { display: inline-flex; align-items: center; justify-content: center; width: 50px; height: 50px; border-radius: 14px; background: var(--tint); color: var(--hub); }
.topic-icon.big { width: 64px; height: 64px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.topic-name { font-weight: 800; font-size: 1.05rem; line-height: 1.3; }

/* research steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.steps li { display: flex; flex-direction: column; gap: 6px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.steps li:nth-child(1) { --hub: #0d9488; } .steps li:nth-child(2) { --hub: #2563eb; }
.steps li:nth-child(3) { --hub: #7c3aed; } .steps li:nth-child(4) { --hub: #ea580c; }
.step-icon { display: inline-flex; width: 42px; height: 42px; align-items: center; justify-content: center; border-radius: 12px; background: var(--tint); color: var(--hub); margin-bottom: 4px; }
.steps span:last-child { color: var(--muted); font-size: 15px; line-height: 1.55; }

/* hub page */
.hub-hero { background: linear-gradient(160deg, var(--tint), var(--bg) 85%); border-bottom: 1px solid var(--line); padding: 26px 0 36px; }
.hub-title { display: flex; align-items: center; gap: 16px; margin-top: 14px; }
.hub-title h1 { margin: 0; }
.hub-hero .hero-sub { margin: 14px 0 0; }
.empty-state { display: flex; align-items: center; gap: 14px; padding: 24px; border-radius: var(--radius); background: var(--tint); color: var(--hub); }
.empty-state p { margin: 0; color: var(--text); font-weight: 600; }
.breadcrumbs { font-size: 14px; color: var(--muted); }
.breadcrumbs a { color: var(--muted); }

/* --- article ---------------------------------------------------------- */
.article-head { background: linear-gradient(180deg, color-mix(in srgb, var(--hub) 10%, var(--bg)), var(--bg)); padding: 26px 0 8px; }
.article-head .chip { margin-top: 14px; }
.article-head h1 { font-size: clamp(1.9rem, 4.5vw, 2.7rem); }
.byline { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; color: var(--muted); font-size: 15px; margin: 0; }
.hero-img { margin: 22px 0; }
.hero-img img { display: block; width: 100%; border-radius: 20px; box-shadow: var(--shadow-hover); }
.hero-img figcaption { font-size: 13px; color: var(--muted); margin-top: 8px; }
.callout { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; font-size: 15px; line-height: 1.6; margin: 22px 0; }
.callout p { margin: 0; }
.callout.info { background: color-mix(in srgb, #2563eb 8%, var(--surface)); border: 1px solid color-mix(in srgb, #2563eb 20%, transparent); }
.callout.info .icon { color: #2563eb; margin-top: 2px; }
.intro p:first-child { font-size: 1.12rem; }
.quick-picks { margin: 34px 0; padding: 20px; border-radius: 20px; background: var(--tint); border: 1px solid color-mix(in srgb, var(--hub) 22%, transparent); }
.quick-picks h2 { margin: 0 0 14px; font-size: 1.3rem; display: flex; align-items: center; gap: 8px; color: color-mix(in srgb, var(--hub) 75%, var(--text)); }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.pick { display: flex; flex-direction: column; gap: 6px; background: var(--surface); padding: 14px; border-radius: 14px; box-shadow: var(--shadow); font-size: 15px; line-height: 1.5; }
.pick b { font-size: 1rem; line-height: 1.35; }
.pick > span:last-child { color: var(--muted); }
.pick-label { align-self: flex-start; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: 3px 9px; border-radius: 999px; background: var(--hub); color: #fff; }
.toc { margin: 30px 0; padding: 16px 20px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--hub); }
.toc-title { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-weight: 800; }
.toc ol { margin: 0; padding-left: 22px; columns: 2 240px; column-gap: 28px; font-size: 15px; }
.toc li { break-inside: avoid; padding: 2px 0; }
.toc a { color: var(--text); text-decoration: none; }
.toc a:hover { color: var(--hub); text-decoration: underline; }
.article h2 { position: relative; padding-left: 16px; }
.article h2::before { content: ""; position: absolute; left: 0; top: .18em; bottom: .18em; width: 5px; border-radius: 3px; background: var(--hub); }
.article .related h2, .quick-picks h2, .bottom-line h2 { padding-left: 0; }
.article .related h2::before, .quick-picks h2::before, .bottom-line h2::before { display: none; }
.table-scroll { overflow-x: auto; border-radius: 14px; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
table.compare thead th { background: var(--hub); color: #fff; font-weight: 700; white-space: nowrap; }
table.compare tbody th { font-weight: 700; }
table.compare tbody tr:nth-child(even) { background: color-mix(in srgb, var(--hub) 5%, var(--surface)); }
table.compare tbody tr:last-child > * { border-bottom: 0; }
.product { margin: 26px 0; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.product-head { display: flex; gap: 14px; align-items: flex-start; }
.product-head h3 { margin: 4px 0; font-size: 1.25rem; }
.num { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; background: var(--hub); color: #fff; font-weight: 800; font-size: 1.1rem; }
.best-for { margin: 0; color: var(--muted); font-size: 15px; }
.specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; margin: 14px 0; }
.specs div { background: color-mix(in srgb, var(--hub) 6%, var(--surface)); border-radius: 10px; padding: 8px 12px; }
.specs dt { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.specs dd { margin: 2px 0 0; font-weight: 600; font-size: 15px; }
.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.pros, .cons { border-radius: 14px; padding: 12px 14px; }
.pros { background: color-mix(in srgb, var(--pros) 9%, var(--surface)); }
.cons { background: color-mix(in srgb, var(--cons) 9%, var(--surface)); }
.pros h4 { color: var(--pros); margin: 0 0 6px; }
.cons h4 { color: var(--cons); margin: 0 0 6px; }
.pros-cons ul { list-style: none; margin: 0; padding: 0; font-size: 15px; line-height: 1.5; }
.pros-cons li { display: flex; gap: 8px; align-items: flex-start; padding: 4px 0; }
.pros li .icon { color: var(--pros); margin-top: 1px; }
.cons li .icon { color: var(--cons); margin-top: 1px; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; background: var(--pros); color: #fff; border-radius: 999px; padding: 2px 9px; vertical-align: middle; }
.button { display: inline-block; background: var(--accent); color: #fff; text-decoration: none; padding: 11px 20px; border-radius: 12px; font-weight: 700; }
.button:hover { color: #fff; filter: brightness(1.08); }
.button.buy { background: linear-gradient(180deg, #fbbf24, #f59e0b); color: #1f1300; box-shadow: 0 6px 16px -8px rgba(245, 158, 11, .8); }
.buying-guide { margin-top: 44px; padding: 4px 22px 18px; border-radius: 20px; background: color-mix(in srgb, var(--hub) 5%, var(--surface)); border: 1px solid var(--line); }
.buying-guide h2 { margin-top: 22px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 0 16px; margin-bottom: 10px; transition: box-shadow .15s ease; }
.faq details[open] { box-shadow: var(--shadow); }
.faq summary { cursor: pointer; font-weight: 700; padding: 14px 28px 14px 0; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 10px; font-size: 1.4rem; font-weight: 400; color: var(--hub); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 14px; }
.bottom-line { margin-top: 40px; padding: 6px 22px 12px; border-radius: 20px; color: #fff; background: linear-gradient(135deg, var(--hub), color-mix(in srgb, var(--hub) 60%, #0b1f1c)); }
.bottom-line h2 { color: #fff; margin-top: 20px; }
.bottom-line a { color: #fff; }
.related { margin-top: 56px; }
.page h1 { margin-top: 34px; }
.page-404 { padding-top: 40px; }

/* --- footer ----------------------------------------------------------- */
.site-footer { background: #0f2a26; color: #c9d8d3; padding: 44px 0 24px; }
.site-footer a { color: #e9f2ef; text-decoration: none; }
.site-footer a:hover { color: #fdba74; }
.footer-grid { max-width: 1140px; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 28px; }
.site-footer h3 { color: #fff; font-size: 14px; text-transform: uppercase; letter-spacing: .06em; margin: 6px 0 10px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; font-size: 15px; line-height: 2; }
.site-footer .small { color: #9fb5ae; }
.brand-light { color: #fff; }
.brand-light b { color: #5eead4; }
.footer-bottom { max-width: 1140px; margin-top: 26px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .1); }
.footer-bottom p { margin: 4px 0; }

@media (max-width: 720px) {
  body { font-size: 16px; }
  h2 { font-size: 1.4rem; }
  .hero-inner { padding-top: 36px; padding-bottom: 34px; }
  .pros-cons { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .product, .buying-guide, .bottom-line, .quick-picks { padding-left: 16px; padding-right: 16px; }
  .main-nav a { padding: 6px 10px; font-size: 14px; }
  .hero-sub { font-size: 1.02rem; }
  .hero-chips { gap: 8px; }
  .hub-chip { padding: 7px 11px; font-size: 13.5px; gap: 6px; }
  .trust { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
