/* Aistech Research — site styles. Plain CSS, no build step. */
:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --surface-2: #f2f0ea;
  --text: #1a2230;
  --muted: #4a5465;
  --border: #dcd8ce;
  --navy: #13294b;
  --accent: #b23f0b;        /* 5.6:1 on --bg */
  --accent-soft: #fbeee6;
  --link: #1c4f9c;
  --focus: #1c4f9c;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --measure: 68ch;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0f1520; --surface: #151d2b; --surface-2: #1b2535; --text: #e7eaf0; --muted: #a9b3c3;
  --border: #2c384b; --navy: #c9d6ee; --accent: #f29a6b; --accent-soft: #2a1d17; --link: #8fb6f2; --focus: #8fb6f2;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 1.0625rem/1.65 var(--sans);
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--surface); color: var(--text); padding: .6rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; top: 1rem; }

.wrap { max-width: 72rem; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 40rem) { .wrap { padding: 0 1.75rem; } }

/* Header */
.site-header { border-bottom: 1px solid var(--border); background: var(--surface); }
.site-header .wrap { display: flex; align-items: center; gap: 1rem; min-height: 4.25rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--text); margin-right: auto; }
.brand-mark { width: 2.25rem; height: 2.25rem; background: #fff; border-radius: .4rem; padding: .2rem; display: block; }
.brand-text { line-height: 1.15; }
.brand-name { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; color: var(--navy); letter-spacing: .01em; display: block; }
.brand-sub { font-size: .78rem; color: var(--muted); letter-spacing: .02em; text-transform: lowercase; }

.nav-toggle, .theme-toggle {
  font: inherit; font-size: .9rem; color: var(--text); background: transparent;
  border: 1px solid var(--border); border-radius: .4rem; padding: .4rem .7rem; cursor: pointer;
}
.nav-toggle:hover, .theme-toggle:hover { background: var(--surface-2); }
.nav-toggle { display: none; }
@media (max-width: 30rem) { .brand-sub { display: none; } .site-header .wrap { gap: .5rem; } }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .15rem; }
.site-nav a { display: block; padding: .45rem .65rem; color: var(--text); text-decoration: none; font-size: .95rem; border-radius: .35rem; }
.site-nav a:hover { background: var(--surface-2); }
.site-nav a[aria-current="page"] { color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }

@media (max-width: 56rem) {
  .js .nav-toggle { display: inline-block; }
  .js .site-nav { display: none; width: 100%; order: 3; padding-bottom: .75rem; }
  .js .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; }
  .site-nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--accent); }
}

/* Page heading */
.page-head { border-bottom: 1px solid var(--border); background: var(--surface-2); }
.page-head .wrap { padding-top: 2.75rem; padding-bottom: 2.25rem; }
.eyebrow { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin: 0 0 .5rem; }
h1, h2, h3 { font-family: var(--serif); color: var(--navy); line-height: 1.2; font-weight: 600; }
h1 { font-size: clamp(2rem, 4.5vw, 2.9rem); margin: 0 0 .75rem; letter-spacing: -.005em; }
h2 { font-size: clamp(1.45rem, 3vw, 1.85rem); margin: 2.75rem 0 .75rem; }
h3 { font-size: 1.2rem; margin: 1.75rem 0 .4rem; }
.lede { font-size: 1.2rem; color: var(--muted); max-width: var(--measure); margin: 0; }

main { padding-bottom: 4rem; }
.prose > :not(.table-wrap):not(.two-col) { max-width: var(--measure); }
.prose p, .prose li { max-width: var(--measure); }
section > .wrap > h2:first-child { margin-top: 2.75rem; }

/* Home hero */
.hero { background: var(--surface-2); border-bottom: 1px solid var(--border); }
.hero .wrap { padding-top: 3.5rem; padding-bottom: 3rem; }
.hero h1 { font-size: clamp(2.2rem, 5.5vw, 3.4rem); max-width: 22ch; }
.status-line { display: inline-flex; align-items: center; gap: .5rem; font-size: .9rem; color: var(--muted); border: 1px solid var(--border); background: var(--surface); padding: .3rem .7rem; border-radius: 999px; margin-bottom: 1.25rem; }
.status-dot { width: .55rem; height: .55rem; border-radius: 50%; background: var(--accent); }

.two-col { display: grid; gap: 1.5rem; }
@media (min-width: 48rem) { .two-col { grid-template-columns: 1fr 1fr; gap: 2rem; } }

.statement { border-top: 3px solid var(--navy); background: var(--surface); padding: 1.25rem 1.4rem 1.4rem; border-left: 1px solid var(--border); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.statement h3 { margin: 0 0 .5rem; font-size: 1.35rem; }
.statement p { margin: 0; }

.cards { list-style: none; padding: 0; margin: 1.25rem 0 0; display: grid; gap: 1rem; }
@media (min-width: 40rem) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) { .cards.three { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: .4rem; padding: 1.1rem 1.25rem; }
.card h3 { margin: 0 0 .35rem; font-size: 1.1rem; }
.card p { margin: 0; color: var(--muted); }
.card a.more { display: inline-block; margin-top: .6rem; font-weight: 600; }

.note {
  border-left: 4px solid var(--accent); background: var(--accent-soft);
  padding: 1rem 1.2rem; margin: 1.75rem 0; max-width: var(--measure);
}
.note p { margin: 0; }
.note strong { color: var(--text); }

/* Principles list */
.principles { list-style: none; padding: 0; margin: 1.5rem 0 0; counter-reset: p; display: grid; gap: 0; border-top: 1px solid var(--border); }
.principles li { counter-increment: p; display: grid; grid-template-columns: 3rem 1fr; gap: .25rem 1rem; padding: 1.1rem 0; border-bottom: 1px solid var(--border); }
.principles li::before { content: counter(p, decimal-leading-zero); font-family: var(--mono); color: var(--accent); font-size: .95rem; padding-top: .2rem; }
.principles h3 { margin: 0 0 .25rem; font-size: 1.15rem; }
.principles p { margin: 0; color: var(--muted); grid-column: 2; }
@media (min-width: 64rem) { .principles { grid-template-columns: 1fr 1fr; column-gap: 3rem; } }

/* Tables */
.table-wrap { overflow-x: auto; margin: 1.25rem 0; border: 1px solid var(--border); border-radius: .4rem; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .97rem; }
caption { text-align: left; padding: .8rem 1rem; font-weight: 600; color: var(--muted); font-size: .9rem; caption-side: top; }
th, td { text-align: left; vertical-align: top; padding: .7rem 1rem; border-top: 1px solid var(--border); }
thead th { background: var(--surface-2); color: var(--text); font-weight: 600; border-top: 0; }
tbody th { font-weight: 600; white-space: nowrap; }
.code { font-family: var(--mono); font-weight: 600; color: var(--accent); white-space: nowrap; }

/* Steps */
.steps { padding-left: 1.4rem; max-width: var(--measure); }
.steps li { margin: .45rem 0; padding-left: .3rem; }
.steps li::marker { color: var(--accent); font-weight: 600; }
ul.plain { max-width: var(--measure); padding-left: 1.2rem; }
ul.plain li { margin: .4rem 0; }
ul.plain li::marker { color: var(--accent); }

/* Roadmap */
.roadmap { list-style: none; padding: 0; margin: 1.5rem 0 0; position: relative; }
.roadmap li { position: relative; padding: 0 0 1.6rem 2.2rem; max-width: 50rem; }
.roadmap li::before { content: ""; position: absolute; left: .45rem; top: .35rem; bottom: -.35rem; width: 2px; background: var(--border); }
.roadmap li:last-child::before { display: none; }
.roadmap li::after { content: ""; position: absolute; left: 0; top: .3rem; width: 1rem; height: 1rem; border-radius: 50%; background: var(--surface); border: 2px solid var(--muted); }
.roadmap li.current::after { background: var(--accent); border-color: var(--accent); }
.roadmap h3 { margin: 0 0 .25rem; font-size: 1.15rem; }
.roadmap p { margin: 0; color: var(--muted); }
.badge { display: inline-block; font-family: var(--sans); font-size: .75rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; padding: .1rem .5rem; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); vertical-align: .15em; margin-left: .4rem; }
.badge.now { color: var(--accent); border-color: var(--accent); }

/* Contact */
.contact-box { background: var(--surface); border: 1px solid var(--border); border-top: 3px solid var(--accent); padding: 1.4rem 1.5rem; max-width: 40rem; margin-top: 1.5rem; }
.contact-box p { margin: .3rem 0; }
.contact-box .addr { font-size: 1.25rem; font-weight: 600; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: .92rem; }
.site-footer .wrap { padding-top: 2rem; padding-bottom: 2rem; display: grid; gap: 1rem; }
@media (min-width: 48rem) { .site-footer .wrap { grid-template-columns: 2fr 1fr; } }
.site-footer p { margin: 0 0 .4rem; }
.site-footer a { color: var(--link); }

@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
@media print {
  .site-header nav, .theme-toggle, .nav-toggle, .skip { display: none !important; }
  body { background: #fff; color: #000; }
}
.section-eyebrow { font-family: var(--sans); font-size: .8rem; margin: 2.75rem 0 1rem; color: var(--accent); }
.spaced { margin-top: 2rem; }

/* Theme toggle icons: show moon in light mode, sun in dark mode */
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; padding: .45rem; line-height: 0; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
.theme-toggle[hidden] { display: none; }
