/* toprobotslist.com design system — dark/light, sector-coded, CWV-lean */
:root {
  --bg: #f7f8fa;
  --bg-raised: #ffffff;
  --bg-sunken: #eef0f4;
  --text: #14181f;
  --text-dim: #5a6472;
  --text-faint: #606875;
  --border: #dde2e9;
  --border-strong: #c3cad4;
  --accent: #4f6df5;
  --accent-text: #3d55c8;
  --ok: #16a34a;
  --warn: #d97706;
  --bad: #dc2626;
  --ok-text: #107736;
  --warn-text: #9b5504;
  --bad-text: #b31919;
  --cta-bg: #4358d8;
  --cta-bg-hover: #3a4dc4;
  --cta-fg: #ffffff;
  --shadow: 0 1px 3px rgb(16 22 32 / .07), 0 4px 16px rgb(16 22 32 / .05);
  --radius: 10px;
  --radius-sm: 6px;
  --max: 1120px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0d1117;
  --bg-raised: #161c25;
  --bg-sunken: #090c10;
  --text: #e8ecf2;
  --text-dim: #9aa6b5;
  --text-faint: #8b96a6;
  --border: #263041;
  --border-strong: #38445a;
  --accent: #7b93ff;
  --accent-text: #93a7ff;
  --ok: #34d178;
  --warn: #f2a341;
  --bad: #f26d6d;
  --ok-text: var(--ok);
  --warn-text: var(--warn);
  --bad-text: var(--bad);
  --cta-bg: #7b93ff;
  --cta-bg-hover: #93a7ff;
  --cta-fg: #0d1117;
  --shadow: 0 1px 3px rgb(0 0 0 / .5);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1117; --bg-raised: #161c25; --bg-sunken: #090c10;
    --text: #e8ecf2; --text-dim: #9aa6b5; --text-faint: #8b96a6;
    --border: #263041; --border-strong: #38445a;
    --accent: #7b93ff; --accent-text: #93a7ff;
    --ok: #34d178; --warn: #f2a341; --bad: #f26d6d;
    --ok-text: var(--ok); --warn-text: var(--warn); --bad-text: var(--bad);
    --cta-bg: #7b93ff; --cta-bg-hover: #93a7ff; --cta-fg: #0d1117;
    --shadow: 0 1px 3px rgb(0 0 0 / .5);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
h2 { font-size: clamp(1.3rem, 3vw, 1.7rem); margin-top: 1.6em; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.dim { color: var(--text-dim); }
.faint { color: var(--text-faint); font-size: .85rem; }
.small { font-size: .875rem; }

/* header / footer */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap { display: flex; align-items: center; gap: 18px; height: 58px; }
.logo { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 1.05rem; color: var(--text); white-space: nowrap; }
.logo:hover { text-decoration: none; }
.logo svg { flex: none; }
.nav { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; }
.nav a { color: var(--text-dim); padding: 7px 11px; border-radius: var(--radius-sm); font-size: .92rem; white-space: nowrap; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background: var(--bg-sunken); text-decoration: none; }
.theme-btn { border: 1px solid var(--border); background: var(--bg-raised); color: var(--text-dim); border-radius: var(--radius-sm); width: 34px; height: 34px; cursor: pointer; display: grid; place-items: center; flex: none; }
.theme-btn:hover { color: var(--text); border-color: var(--border-strong); }
.site-footer { border-top: 1px solid var(--border); margin-top: 64px; padding: 40px 0 48px; font-size: .9rem; color: var(--text-dim); }
.site-footer .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 24px; margin-bottom: 24px; }
.site-footer h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); margin-bottom: .6em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 5px 0; }
.site-footer a { color: var(--text-dim); }
.site-footer a:hover { color: var(--text); }

/* hero + sections */
.hero { padding: 48px 0 12px; }
.hero .kicker { color: var(--accent-text); font-weight: 600; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; }
.hero p.lede { font-size: 1.12rem; color: var(--text-dim); max-width: 62ch; }
.section { margin-top: 44px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.section-head h2 { margin: 0; }
.section-head .more { font-size: .9rem; white-space: nowrap; }

/* cards */
.card { background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 20px; }
.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.sector-card { padding: 18px; border-top: 3px solid var(--sector, var(--accent)); display: flex; flex-direction: column; gap: 8px; }
.sector-card h3 a { color: var(--text); }
.sector-card .count { font-size: .82rem; color: var(--text-faint); }
[data-robot] { display: contents; }
.robot-card { padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.robot-card h3 { margin: 0; font-size: 1.05rem; }
.robot-card h3 a { color: var(--text); }
.robot-card .maker { font-size: .85rem; color: var(--text-faint); }

/* badges */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: .76rem; font-weight: 600; padding: 3px 9px; border-radius: 99px; border: 1px solid transparent; white-space: nowrap; }
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge-commercial { color: var(--ok-text); background: color-mix(in srgb, var(--ok) 12%, transparent); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.badge-limited { color: var(--warn-text); background: color-mix(in srgb, var(--warn) 12%, transparent); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.badge-announced { color: var(--accent-text); background: color-mix(in srgb, var(--accent) 12%, transparent); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.badge-rd { color: var(--text-dim); background: var(--bg-sunken); border-color: var(--border); }
.badge-discontinued { color: var(--bad-text); background: color-mix(in srgb, var(--bad) 10%, transparent); border-color: color-mix(in srgb, var(--bad) 28%, transparent); }
.badge-sector { color: var(--sector-text-l, var(--accent-text)); background: color-mix(in srgb, var(--sector, var(--accent)) 12%, transparent); border-color: color-mix(in srgb, var(--sector, var(--accent)) 30%, transparent); }
.conf { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 1px 6px; border-radius: 4px; }
.conf-verified { color: var(--ok-text); background: color-mix(in srgb, var(--ok) 12%, transparent); }
.conf-reported { color: var(--warn-text); background: color-mix(in srgb, var(--warn) 12%, transparent); }
.conf-unverified { color: var(--text-faint); background: var(--bg-sunken); }

/* tables */
.table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-raised); box-shadow: var(--shadow); }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-faint); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: color-mix(in srgb, var(--accent) 4%, transparent); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.rank { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text-dim); width: 2.2em; }
.rank-1, .rank-2, .rank-3 { color: var(--accent-text); }
.score-cell { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.score-bar { width: 64px; height: 6px; border-radius: 3px; background: var(--bg-sunken); overflow: hidden; flex: none; }
.score-bar i { display: block; height: 100%; background: var(--sector, var(--accent)); border-radius: 3px; }
.score-val { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 2.6em; }

/* robot entity page */
.entity-head { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; margin-bottom: 4px; }
.entity-head h1 { margin: 0; }
.meta-row { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; color: var(--text-dim); font-size: .92rem; }
.entity-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; margin-top: 24px; align-items: start; }
@media (max-width: 860px) { .entity-grid { grid-template-columns: 1fr; } }
.side-panel { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 76px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: .92rem; }
.kv dt { color: var(--text-faint); margin: 0; }
.kv dd { margin: 0; text-align: right; font-weight: 500; }
.cta { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--cta-bg); color: var(--cta-fg); font-weight: 600; padding: 11px 20px; border-radius: var(--radius-sm); border: none; cursor: pointer; font-size: .95rem; }
.cta:hover { background: var(--cta-bg-hover); text-decoration: none; }
.cta.secondary { background: var(--bg-sunken); color: var(--text); border: 1px solid var(--border-strong); }
.spec-src { color: var(--text-faint); }
.spec-src a { color: var(--text-faint); }

/* timeline */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 18px 24px; border-left: 2px solid var(--border); margin-left: 8px; }
.timeline li:last-child { padding-bottom: 2px; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--sector, var(--accent)); border: 2px solid var(--bg); }
.timeline time { font-size: .8rem; color: var(--text-faint); font-variant-numeric: tabular-nums; display: block; }
.timeline .etype { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--sector-text-l, var(--accent-text)); }
:root[data-theme="dark"] .badge-sector, :root[data-theme="dark"] .timeline .etype { color: var(--sector-text-d, var(--accent-text)); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .badge-sector,
  :root:not([data-theme="light"]) .timeline .etype { color: var(--sector-text-d, var(--accent-text)); }
}

/* feed */
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--border); align-items: baseline; }
.feed li:last-child { border-bottom: none; }
.feed time { flex: none; width: 84px; font-size: .82rem; color: var(--text-faint); font-variant-numeric: tabular-nums; }

/* FAQ */
.faq details { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-raised); margin-bottom: 8px; }
.faq summary { cursor: pointer; padding: 12px 16px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--text-faint); font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq .faq-a { padding: 0 16px 14px; color: var(--text-dim); }

/* notices */
.notice a, .prose p a, .prose li a, .faq-a a, .meta-row a, .feed a, .timeline a { text-decoration: underline; text-underline-offset: 2px; }
.notice { border-left: 3px solid var(--accent); background: color-mix(in srgb, var(--accent) 6%, var(--bg-raised)); padding: 12px 16px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: .88rem; color: var(--text-dim); }
.notice.affiliate { border-color: var(--warn); background: color-mix(in srgb, var(--warn) 6%, var(--bg-raised)); }

/* newsletter */
.newsletter { display: flex; gap: 10px; flex-wrap: wrap; }
.newsletter input[type="email"] { flex: 1 1 220px; padding: 11px 14px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--bg-raised); color: var(--text); font-size: .95rem; }
.newsletter input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }

/* compare tool */
.compare-pickers { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 18px 0; }
.compare-pickers select { width: 100%; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--bg-raised); color: var(--text); font-size: .95rem; }
.diff-hl { background: color-mix(in srgb, var(--accent) 10%, transparent); }

/* stat tiles */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.stat { padding: 14px 16px; text-align: center; }
.stat .n { font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat .l { font-size: .8rem; color: var(--text-faint); }

/* breadcrumbs */
.crumbs { font-size: .84rem; color: var(--text-faint); margin: 18px 0 10px; }
.crumbs a { color: var(--text-faint); }
.crumbs a:hover { color: var(--text); }

/* prose pages */
.prose { max-width: 74ch; }
.prose ul { padding-left: 1.3em; }
.prose table { font-size: .9rem; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--cta-bg); color: var(--cta-fg); padding: 8px 16px; z-index: 100; }
.skip-link:focus { left: 8px; top: 8px; }
:where(a, button, select, input, summary, [tabindex]):focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; border-radius: 3px; }
