/* AI Rover Studio website: landing page, articles and info pages (the simulator at /app/ has its own styles) */

:root {
  color-scheme: light;
  --bg: #f7f9fc;
  --surface: #ffffff;
  --text: #16202e;
  --muted: #5b6b82;
  --line: #dde4ee;
  --accent: #0f7f86;
  --accent-text: #ffffff;
  --code-bg: #eef2f8;
  --warn: #b7791f;
  --error: #c53030;
  --info: #2b6cb0;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0b1020;
    --surface: #141c30;
    --text: #e9f0ff;
    --muted: #98a9c5;
    --line: #2a3650;
    --accent: #58e3de;
    --accent-text: #0b1020;
    --code-bg: #1a2440;
    --warn: #ffc978;
    --error: #ff8a96;
    --info: #7fb4ff;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1020;
  --surface: #141c30;
  --text: #e9f0ff;
  --muted: #98a9c5;
  --line: #2a3650;
  --accent: #58e3de;
  --accent-text: #0b1020;
  --code-bg: #1a2440;
  --warn: #ffc978;
  --error: #ff8a96;
  --info: #7fb4ff;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.8 system-ui, -apple-system, "Segoe UI", "Noto Sans Thai", "Leelawadee UI", Tahoma, sans-serif;
}
img { max-width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); }
a { color: var(--accent); text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.35; }
h1 { font-size: clamp(28px, 5vw, 40px); margin: .3em 0 .4em; }
h2 { font-size: 24px; margin: 2em 0 .6em; }
h3 { font-size: 19px; margin: 1.6em 0 .4em; }
code, pre { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: .88em; }
code { background: var(--code-bg); padding: .1em .35em; border-radius: 5px; }
pre { background: var(--code-bg); padding: 14px 16px; border-radius: 10px; overflow-x: auto; line-height: 1.55; }
pre code { background: none; padding: 0; }
.small { font-size: 14px; color: var(--muted); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* Header & footer */
.siteHeader { border-bottom: 1px solid var(--line); background: var(--surface); }
.siteHeader .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.logo { font-weight: 700; color: var(--text); text-decoration: none; white-space: nowrap; }
.siteHeader nav { display: flex; align-items: center; gap: 16px; }
.siteHeader nav a:not(.button) { color: var(--text); text-decoration: none; }
.siteFooter { margin-top: 64px; padding: 24px 0 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 15px; }
.siteFooter a { color: var(--muted); }

.button {
  display: inline-block; padding: 9px 18px; border-radius: 10px; border: 1px solid var(--line);
  color: var(--text); background: var(--surface); text-decoration: none; font-weight: 600; line-height: 1.4;
}
.button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.button:hover { filter: brightness(1.08); }

/* Landing page */
.hero { padding: 56px 0 24px; }
.hero .lead { font-size: 20px; color: var(--muted); max-width: 720px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 32px; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; padding: 0; list-style: none; }
.features li { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.features b { display: block; margin-bottom: 4px; }
.features span { color: var(--muted); font-size: 15px; }

/* Article lists */
.cards { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.cards a {
  display: grid; gap: 4px; height: 100%; padding: 16px 18px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); text-decoration: none;
}
.cards a:hover { border-color: var(--accent); }
.cards span { color: var(--muted); font-size: 15px; line-height: 1.6; }
.cards .tag { font-size: 12px; color: var(--accent); font-weight: 600; }

/* Articles */
.article { max-width: 780px; }
.crumbs { font-size: 14px; color: var(--muted); margin-top: 24px; }
.crumbs a { color: var(--muted); }
.lead { font-size: 19px; color: var(--muted); }
.meta { font-size: 14px; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 16px; }
.article li { margin: .3em 0; }
.try { margin: 24px 0; }
.embedCode { margin: 20px 0; }
.embedCode summary { cursor: pointer; color: var(--muted); }
.embedCode pre { white-space: pre-wrap; word-break: break-all; }
.note {
  border-left: 4px solid var(--accent); background: var(--surface); padding: 12px 16px; border-radius: 0 10px 10px 0; margin: 20px 0;
}
.note.warn { border-left-color: var(--warn); }
.more { margin-top: 48px; padding-top: 8px; border-top: 1px solid var(--line); }

/* Tables (parts lists, pin maps) */
.tableWrap { overflow-x: auto; margin: 16px 0; }
table { border-collapse: collapse; width: 100%; font-size: 15px; background: var(--surface); border-radius: 10px; overflow: hidden; }
caption { text-align: left; font-size: 14px; color: var(--muted); padding: 0 0 6px; }
th, td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { font-size: 14px; color: var(--muted); font-weight: 600; }
td small, th small { color: var(--muted); font-weight: 400; }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
tfoot td { font-weight: 700; border-bottom: 0; }
tr.group td { color: var(--muted); font-size: 13px; padding-top: 14px; }
.pins th { width: 34%; }
.issues { list-style: none; padding: 0; }
.issues li { display: flex; gap: 10px; align-items: flex-start; }
.issues li > span {
  flex: none; width: 22px; height: 22px; margin-top: 4px; border-radius: 50%; display: grid; place-items: center;
  font-size: 12px; font-weight: 700; color: #fff;
}
.issues .error > span { background: var(--error); }
.issues .warn > span { background: var(--warn); }
.issues .info > span { background: var(--info); }

@media (max-width: 560px) {
  body { font-size: 16px; }
  .siteHeader nav { gap: 10px; }
  .siteHeader nav .button { padding: 7px 12px; }
  .hero { padding-top: 32px; }
}
