/* Africa Eyes public pages and widgets (same tokens as the dashboard) */
:root {
  color-scheme: light;
  --page: #f9f9f7; --surface: #fcfcfb; --ink: #1d2421; --ink-2: #545a56; --muted: #6b716c;
  --hair: #e1e2dc; --base: #c3c2b7; --bar: #868c86; --wash: rgba(29, 36, 33, 0.05);
  --up: #b4421f; --down: #1c7a55; --accent: #2a78d6;
  --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif; --w: 1080px;
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark; --page: #0f100f; --surface: #1a1a19; --ink: #f0efec; --ink-2: #c3c2b7;
    --muted: #9a9f99; --hair: #2c2c2a; --base: #383835; --bar: #6e746e; --wash: rgba(240, 239, 236, 0.06);
    --up: #e8825d; --down: #4cc396; --accent: #5a9ff0;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark; --page: #0f100f; --surface: #1a1a19; --ink: #f0efec; --ink-2: #c3c2b7;
  --muted: #9a9f99; --hair: #2c2c2a; --base: #383835; --bar: #6e746e; --wash: rgba(240, 239, 236, 0.06);
  --up: #e8825d; --down: #4cc396; --accent: #5a9ff0;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--ink); font: 400 15px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { margin: 0; font-weight: 500; letter-spacing: -0.01em; }
h1 { font-size: 32px; line-height: 1.2; max-width: 28ch; }
h2 { font-size: 21px; line-height: 1.3; margin: 40px 0 10px; }
h3 { font-size: 16px; margin: 24px 0 8px; }
p { margin: 0 0 12px; max-width: 70ch; }
.muted, .hint { color: var(--muted); font-size: 13px; }
.lede { color: var(--ink-2); font-size: 17px; margin: 12px 0 24px; max-width: 64ch; }
.top { border-bottom: 1px solid var(--hair); background: var(--page); position: sticky; top: 0; z-index: 5; }
.top-in { max-width: var(--w); margin: 0 auto; padding: 12px 24px; display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.brand { font-weight: 600; font-size: 17px; text-decoration: none; }
.top nav { display: flex; gap: 2px; flex-wrap: wrap; }
.top nav a { text-decoration: none; color: var(--ink-2); padding: 6px 9px; border-radius: 6px; font-size: 14px; }
.top nav a:hover, .top nav a[aria-current="page"] { background: var(--wash); color: var(--ink); }
main { max-width: var(--w); margin: 0 auto; padding: 36px 24px 56px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0 20px; margin: 8px 0 24px; }
.tiles div { border-top: 1px solid var(--hair); padding: 12px 0 6px; }
.tiles .k { color: var(--muted); font-size: 13px; display: block; }
.tiles .v { font-size: 24px; font-weight: 500; line-height: 1.25; font-variant-numeric: tabular-nums; }
.tiles small { display: block; color: var(--ink-2); font-size: 12.5px; }
.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--hair); vertical-align: top; }
th { color: var(--muted); font-weight: 500; font-size: 13px; white-space: nowrap; }
td.num, th.num { text-align: right; white-space: nowrap; }
td small { display: block; color: var(--muted); font-size: 12px; }
.up { color: var(--up); } .down { color: var(--down); }
.bar { display: inline-block; height: 9px; background: var(--bar); border-radius: 0 3px 3px 0; vertical-align: middle; margin-right: 8px; }
.cite { border: 1px solid var(--hair); background: var(--surface); border-radius: 8px; padding: 12px 14px; font-size: 14px; margin: 24px 0; }
.cite code, pre, code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
pre { background: var(--surface); border: 1px solid var(--hair); border-radius: 8px; padding: 12px 14px; overflow-x: auto; white-space: pre; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 18px; }
.chip { border: 1px solid var(--hair); border-radius: 999px; padding: 2px 10px; font-size: 13px; text-decoration: none; color: var(--ink-2); background: var(--surface); }
.chip[aria-current="true"] { background: var(--ink); color: var(--page); border-color: var(--ink); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px 18px; }
.grid a { text-decoration: none; padding: 4px 0; border-bottom: 1px solid var(--hair); display: flex; justify-content: space-between; gap: 8px; }
.tag { font-size: 11px; color: var(--muted); border: 1px solid var(--hair); border-radius: 4px; padding: 0 5px; margin-left: 4px; white-space: nowrap; }
.alerts { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--hair); }
.alerts li { padding: 10px 0; border-bottom: 1px solid var(--hair); }
.alerts .t { font-weight: 500; }
.alerts .d { color: var(--muted); font-size: 13px; }
.plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.plan { border: 1px solid var(--hair); border-radius: 10px; padding: 16px; background: var(--surface); }
.plan .p { font-size: 28px; font-weight: 500; }
.plan ul { padding-left: 18px; margin: 10px 0 0; font-size: 14px; color: var(--ink-2); }
.foot { max-width: var(--w); margin: 0 auto; padding: 20px 24px 48px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--hair); }
.foot p { max-width: 90ch; }
.widget-demo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; margin-bottom: 28px; }
.widget-demo > * { min-width: 0; }
.widget-demo pre { white-space: pre-wrap; word-break: break-all; }
.widget-demo iframe { width: 100%; border: 1px solid var(--hair); border-radius: 8px; background: var(--surface); }
@media (max-width: 760px) {
  h1 { font-size: 25px; } .top-in, main, .foot { padding-left: 16px; padding-right: 16px; }
  .widget-demo { grid-template-columns: minmax(0, 1fr); }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* widgets */
.w { margin: 0; padding: 12px 14px; font-size: 14px; background: var(--surface); }
.w h3 { margin: 0 0 6px; font-size: 14px; }
.w .big { font-size: 26px; font-weight: 500; line-height: 1.2; font-variant-numeric: tabular-nums; }
.w table td, .w table th { padding: 4px 6px; font-size: 13px; }
.w .src { margin-top: 8px; font-size: 11.5px; color: var(--muted); }
.w .src a { color: var(--muted); }
