/* Shared styles for every ai-sites site. Each site sets --accent, --accent-dark and --tint (in the layout) and can
   add its own /site.css. Text on --accent is always white, so the accent must be dark enough (tested). */
:root {
  --bg: #ffffff;
  --text: #1c2024;
  --muted: #5a636d;
  --line: #dde2e7;
  --card: #f6f8fa;
  --link: var(--accent-dark);
  --on-accent: #ffffff;
  --radius: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171a;
    --text: #e9edf1;
    --muted: #a3adb8;
    --line: #2e353c;
    --card: #1d2227;
    --link: color-mix(in srgb, var(--accent) 40%, #ffffff);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--link); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
img, svg { max-width: 100%; height: auto; }
.wrap { max-width: 900px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: var(--bg); padding: 8px; z-index: 10; }

.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.header-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; padding-top: 12px; padding-bottom: 12px; }
.brand { font-weight: 800; font-size: 1.15rem; color: var(--text); text-decoration: none; letter-spacing: -0.01em; }
.brand::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: var(--accent); margin-right: 8px; vertical-align: 1px; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 0.95rem; }
.site-header nav a { color: var(--text); text-decoration: none; padding: 4px 0; }
.site-header nav a[aria-current="page"], .site-header nav a:hover { color: var(--link); text-decoration: underline; }

main { padding-top: 20px; padding-bottom: 48px; min-height: 60vh; }
.crumbs { font-size: 0.85rem; color: var(--muted); margin-bottom: 8px; }
.crumbs a { color: var(--muted); }
h1 { font-size: clamp(1.7rem, 4.5vw, 2.4rem); line-height: 1.2; margin: 0.2em 0 0.3em; letter-spacing: -0.02em; }
h2 { font-size: 1.45rem; line-height: 1.3; margin: 1.8em 0 0.5em; }
h3 { font-size: 1.15rem; margin: 1.4em 0 0.4em; }
.updated { color: var(--muted); font-size: 0.85rem; margin-top: 0; }
.lede { font-size: 1.15rem; color: var(--text); }
.disclosure { font-size: 0.85rem; color: var(--muted); border-left: 3px solid var(--line); padding-left: 12px; }
.muted, small { color: var(--muted); }

.callout { background: var(--tint); color: #1c2024; border-radius: var(--radius); padding: 14px 18px; margin: 1.2em 0; }
.callout a { color: #14304d; }
.callout > :first-child { margin-top: 0; } .callout > :last-child { margin-bottom: 0; }
.warning { background: #fff4d6; color: #3d2e00; border-radius: var(--radius); padding: 14px 18px; margin: 1.2em 0; }
.warning a { color: #3d2e00; }

.btn {
  display: inline-block; background: var(--accent); color: var(--on-accent); text-decoration: none; font-weight: 650;
  padding: 11px 18px; border-radius: 8px; border: 0; cursor: pointer; font-size: 1rem; line-height: 1.3;
}
.btn:hover { background: var(--accent-dark); color: var(--on-accent); }
.btn-outline { background: transparent; color: var(--link); border: 2px solid currentColor; }
.btn-outline:hover { background: transparent; color: var(--link); }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin: 1.2em 0; padding: 0; list-style: none; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card h3 { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
a.card { color: var(--text); text-decoration: none; display: block; }
a.card:hover { border-color: var(--accent); }
a.card h3 { color: var(--link); }

.table-scroll { overflow-x: auto; margin: 1.2em 0; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--card); font-weight: 650; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 600px) { .pros-cons { grid-template-columns: 1fr; } }
.pros-cons ul { padding-left: 1.2em; }

.faqs details { border-bottom: 1px solid var(--line); padding: 10px 0; }
.faqs summary { cursor: pointer; font-weight: 650; }
.faqs details p { margin: 8px 0 0; }

/* Calculators and tools */
.tool { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 1.4em 0; }
.tool .fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.tool label { display: block; font-weight: 600; font-size: 0.95rem; }
.tool .hint { display: block; font-weight: 400; color: var(--muted); font-size: 0.85rem; }
.tool input, .tool select {
  width: 100%; font: inherit; padding: 9px 10px; margin-top: 4px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg); color: var(--text);
}
.tool input:focus, .tool select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.results { margin-top: 18px; }
.results .big { font-size: 1.9rem; font-weight: 800; letter-spacing: -0.02em; }
.result-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.result-grid div { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.result-grid dt { font-size: 0.85rem; color: var(--muted); }
.result-grid dd { margin: 2px 0 0; font-weight: 700; font-size: 1.15rem; }

.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; padding: 20px 0 40px; }
.site-footer a { color: var(--muted); }

.cookie-banner {
  position: fixed; left: 12px; right: 12px; bottom: 12px; max-width: 560px; margin: 0 auto; z-index: 20;
  background: #1c2024; color: #ffffff; border-radius: var(--radius); padding: 14px 16px; box-shadow: 0 6px 24px rgba(0,0,0,.25);
  font-size: 0.95rem;
}
.cookie-banner a { color: #cfe3ff; }
.cookie-banner .row { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.cookie-banner button { font: inherit; padding: 8px 14px; border-radius: 8px; border: 0; cursor: pointer; }
.cookie-banner .accept { background: #ffffff; color: #1c2024; font-weight: 650; }
.cookie-banner .decline { background: transparent; color: #ffffff; border: 1px solid #8a949e; }
