/* AIFocus static preview. The same tokens as apps/web/app/app.css: warm paper, ink text, one focus-blue
   accent (periwinkle in dark), hairline borders, no gradients. */

:root {
  color-scheme: light;
  --bg: #faf9f6;
  --bg-sunk: #f3f3ef;
  --surface: #ffffff;
  --ink: #202a30;
  --ink-2: #303c42;
  --ink-3: #59656b;
  --ink-4: #657176;
  --line: #dfe4e1;
  --line-strong: #d1d9d5;
  --line-soft: #e9ede9;
  --accent: #2446c7;
  --accent-ink: #1e3aa6;
  --accent-soft: rgba(36, 70, 199, 0.08);
  --accent-contrast: #ffffff;
  --amber-ink: #7c5a24;
  --amber-soft: rgba(184, 135, 58, 0.12);
  --ok-ink: #2a6e51;
  --ok-soft: rgba(47, 125, 92, 0.1);
  --shadow-card: 0 1px 2px rgba(32, 42, 48, 0.025);
  --shadow-card-hover: 0 3px 12px rgba(32, 42, 48, 0.055);
  --selection: rgba(36, 70, 199, 0.16);
  --radius-control: 8px;
  --radius-card: 12px;
  --radius-panel: 14px;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "HarmonyOS Sans SC", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #13191c;
    --bg-sunk: #182024;
    --surface: #1a2226;
    --ink: #e7eceb;
    --ink-2: #d2dada;
    --ink-3: #a5b0b3;
    --ink-4: #89979d;
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.12);
    --line-soft: rgba(255, 255, 255, 0.06);
    --accent: #7892ff;
    --accent-ink: #9aaeff;
    --accent-soft: rgba(120, 146, 255, 0.12);
    --accent-contrast: #000000;
    --amber-ink: #d3b26a;
    --amber-soft: rgba(211, 178, 106, 0.12);
    --ok-ink: #7fd1ad;
    --ok-soft: rgba(95, 199, 154, 0.12);
    --shadow-card: none;
    --shadow-card-hover: none;
    --selection: rgba(120, 146, 255, 0.22);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.6;
}

::selection {
  background: var(--selection);
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

h1,
h2,
h3,
p,
ul,
ol {
  margin: 0;
}

h1 {
  text-wrap: balance;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.num,
.mono {
  font-variant-numeric: tabular-nums;
}

.mono {
  font-family: var(--font-mono);
}

/* ── Header ─────────────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
}

.brand::before {
  content: "";
  display: inline-block;
  width: 0.42em;
  height: 0.42em;
  margin-right: 0.3em;
  border-radius: 999px;
  background: var(--accent);
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav::-webkit-scrollbar {
  display: none;
}

.nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  height: 34px;
  padding: 0 12px;
  border-radius: var(--radius-control);
  color: var(--ink-3);
  font-size: 14px;
  white-space: nowrap;
  transition: color 120ms, background-color 120ms;
}

.nav a:hover {
  color: var(--ink);
  background: var(--bg-sunk);
}

.nav a[aria-current="page"] {
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 600;
}

.nav .soon {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--amber-ink);
}

.header-note {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 12.5px;
  color: var(--ink-4);
}

/* ── Common blocks ──────────────────────────────────────────────────────── */

main {
  padding-bottom: 72px;
}

.kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3em;
  color: var(--accent);
}

.kicker::before {
  content: "";
  width: 24px;
  height: 2px;
  border-radius: 999px;
  background: var(--accent);
}

.page-head {
  padding: 40px 0 8px;
}

.page-head h1 {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.page-head p {
  max-width: 720px;
  margin-top: 8px;
  font-size: 14px;
  color: var(--ink-3);
}

.section {
  padding-top: 48px;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 12px;
  margin-bottom: 16px;
}

.section-head h2 {
  font-size: 17px;
  font-weight: 700;
}

.section-head p {
  font-size: 12.5px;
  color: var(--ink-4);
}

.section-head .more {
  margin-left: auto;
  font-size: 13px;
  color: var(--accent);
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

a.card {
  display: block;
  transition: box-shadow 200ms, border-color 200ms, transform 200ms;
}

a.card:hover {
  box-shadow: var(--shadow-card-hover);
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.grid {
  display: grid;
  gap: 12px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.chip {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--ink-3);
  background: var(--bg-sunk);
  border: 1px solid var(--line-soft);
  white-space: nowrap;
}

a.chip:hover {
  color: var(--accent);
  border-color: var(--line-strong);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
}

.status-soon {
  color: var(--amber-ink);
  background: var(--amber-soft);
}

.status-live {
  color: var(--ok-ink);
  background: var(--ok-soft);
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  transition: border-color 150ms, background-color 150ms, color 150ms;
}

.button:hover {
  border-color: var(--line-strong);
}

.button-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-contrast);
}

.button-primary:hover {
  background: var(--accent-ink);
  border-color: var(--accent-ink);
}

/* ── Home ───────────────────────────────────────────────────────────────── */

.hero {
  padding: 64px 0 8px;
}

.hero h1 {
  margin-top: 18px;
  font-size: 46px;
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.02em;
}

.hero h1 .accent {
  display: block;
  color: var(--accent);
}

.hero .lead {
  max-width: 640px;
  margin-top: 18px;
  font-size: 16px;
  line-height: 1.8;
  color: var(--ink-3);
}

.hero .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.feature {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 20px;
}

.feature-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.feature h3 {
  font-size: 15px;
  font-weight: 700;
}

.feature p {
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--ink-3);
}

.feature .path {
  margin-top: auto;
  font-size: 11.5px;
  color: var(--ink-4);
}

.layer-rows li {
  display: grid;
  grid-template-columns: 28px 200px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--line-soft);
}

.layer-rows li:first-child {
  border-top: 0;
}

.layer-rows .chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.layer-rows h3 {
  font-size: 14px;
  font-weight: 700;
  line-height: 24px;
}

.panel {
  padding: 8px 22px;
}

.step {
  padding: 18px 20px;
}

.step .step-no {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}

.step h3 {
  margin-top: 6px;
  font-size: 15px;
  font-weight: 700;
}

.step p {
  margin-top: 6px;
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--ink-3);
}

/* ── Chain map ──────────────────────────────────────────────────────────── */

.layer-no {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
}

.jump {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 6px;
  margin-bottom: 20px;
}

.jump .arrow {
  font-size: 12px;
  color: var(--ink-4);
}

.chain > li {
  position: relative;
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 24px;
  padding: 0 0 28px 36px;
}

.chain > li > .layer-no {
  position: absolute;
  top: 0;
  left: 0;
}

.chain > li:not(:last-child)::before {
  content: "";
  position: absolute;
  top: 28px;
  bottom: 0;
  left: 11px;
  width: 1px;
  background: var(--line-strong);
}

.chain h3 {
  font-size: 14px;
  font-weight: 700;
  line-height: 24px;
}

.chain .layer-blurb {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--ink-4);
}

.topic {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 14px 16px;
}

.topic h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}

.topic p {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--ink-3);
}

.topic .soon-note {
  margin-top: auto;
  padding-top: 10px;
  font-size: 11.5px;
  color: var(--ink-4);
}

/* ── About ──────────────────────────────────────────────────────────────── */

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
  border-top: 1px solid var(--line-soft);
}

thead th {
  border-top: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-4);
}

td .mono {
  font-size: 12px;
  color: var(--ink-4);
}

.list-head {
  padding: 16px 18px 6px;
  font-size: 15px;
  font-weight: 700;
}

.source-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  padding: 12px 18px;
  border-top: 1px solid var(--line-soft);
}

.source-list li:first-child {
  border-top: 0;
}

.source-list .name {
  font-weight: 600;
}

.source-list .host {
  font-size: 12px;
  color: var(--ink-4);
}

.source-list .host:hover {
  color: var(--accent);
}

.source-list .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: auto;
}

.source-list .chip {
  height: 22px;
  padding: 0 8px;
  font-size: 11.5px;
}

.prose-note {
  max-width: 760px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--ink-3);
}

/* ── Placeholder pages ─────────────────────────────────────────────────── */

.soon-card {
  max-width: 720px;
  margin-top: 40px;
  padding: 32px;
}

.soon-card h1 {
  margin-top: 14px;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.35;
}

.soon-card .lead {
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-2);
}

.soon-card ul {
  margin-top: 18px;
  display: grid;
  gap: 8px;
}

.soon-card li {
  position: relative;
  padding-left: 16px;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--ink-3);
}

.soon-card li::before {
  content: "";
  position: absolute;
  top: 0.72em;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--line-strong);
}

.soon-card .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

/* ── Footer ─────────────────────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
  font-size: 12.5px;
  color: var(--ink-4);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
}

.site-footer a:hover {
  color: var(--accent);
}

.site-footer .links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}

/* ── Narrow screens ─────────────────────────────────────────────────────── */

@media (max-width: 960px) {
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .chain > li {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .layer-rows li {
    grid-template-columns: 28px minmax(0, 1fr);
  }
  .layer-rows .chips {
    grid-column: 2;
  }
}

@media (max-width: 720px) {
  .wrap {
    padding: 0 16px;
  }
  .site-header .wrap {
    flex-wrap: wrap;
    gap: 0;
    height: auto;
    padding-top: 12px;
  }
  .site-header .brand {
    height: 32px;
  }
  .header-note {
    font-size: 12px;
  }
  .nav {
    order: 3;
    width: calc(100% + 32px);
    margin: 8px -16px 0;
    padding: 0 12px 10px;
  }
  .hero {
    padding-top: 40px;
  }
  .hero h1 {
    font-size: 32px;
  }
  .hero .lead {
    font-size: 15px;
  }
  .page-head {
    padding-top: 28px;
  }
  .page-head h1 {
    font-size: 24px;
  }
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: minmax(0, 1fr);
  }
  .soon-card {
    margin-top: 24px;
    padding: 24px 20px;
  }
  .source-list .tags {
    margin-left: 0;
    width: 100%;
  }
}
