/* mentra.ci.computer — setup site, on the Companion site system (see the alias block below).
   The pages link brand/tokens/tokens.css next to this file (not @import) so both load in parallel. */

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("fonts/manrope-latin-var.woff2") format("woff2");
}

/* Companion site system (October 2026): the rules ci.computer and docs.ci.computer follow.
   Every alias reads the canon token of the same role first (@companionintelligence/tokens 1.3.0,
   CI-Common PR #413) and falls back to the literal value, so the bump to 1.3.0 needs no CSS change.
   Grounds, panels and ink are the tokens' dark values. */
:root {
  color-scheme: dark;

  --site-ground: var(--background, #041620);
  --site-panel: var(--card, #0c323c);
  --site-ink: var(--foreground, #e8f2f4);
  --site-muted: var(--muted-foreground, #a3babf);

  /* The logo's three rings. */
  --site-mark-deep: var(--mark-deep, #066c80);
  --site-mark-mid: var(--mark-mid, #1fa89e);
  --site-mark-light: var(--mark-light, #3ae7ba);

  /* The one highlighted call to action per page. */
  --site-cta: var(--cta, #069b5b);
  --site-cta-hover: var(--cta-hover, #05824c);
  --site-cta-ink: var(--cta-foreground, #ffffff);

  /* Primary button: flat deep ring, 16 percent toward white on hover. */
  --site-button: var(--button-primary, var(--site-mark-deep));
  --site-button-hover: var(--button-primary-hover, color-mix(in srgb, var(--site-mark-deep) 84%, #ffffff));
  --site-button-ink: var(--button-primary-foreground, #ffffff);

  /* Text links, labels and numerals: the light ring on the dark ground, white on hover. */
  --site-link: var(--link, var(--site-mark-light));
  --site-link-hover: var(--link-hover, #ffffff);
  --site-label-ink: var(--label-ink, var(--site-mark-light));

  /* Hairlines are the page ink at 14 percent; the strong step outlines ghost controls. */
  --site-hairline: var(--hairline, color-mix(in srgb, var(--site-ink) 14%, transparent));
  --site-hairline-strong: color-mix(in srgb, var(--site-ink) 30%, transparent);
  --site-wash: color-mix(in srgb, var(--site-ink) 5%, transparent);

  /* Radii: controls 3, cards 5, images inside cards 3. */
  --site-radius-control: var(--radius-control, 3px);
  --site-radius-card: var(--radius-card, 5px);
  --site-radius-media: var(--radius-media, 3px);

  /* 12-column grid, 24px gutters; columns 1 and 12 are the page margins, content sits in 2 to 11. */
  --site-gutter: var(--grid-gutter, 24px);
  --site-margin: calc((100vw - 11 * var(--site-gutter)) / 12 + var(--site-gutter));

  /* Manrope for every role: 60 / 36 / 19 / 17 / 13. */
  --site-font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --site-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --site-type-display: var(--type-display, clamp(36px, 3.5vw + 10px, 60px));
  --site-type-title: var(--type-title, clamp(26px, 1.9vw + 9px, 36px));
  --site-type-lede: 19px;
  --site-type-body: 17px;
  --site-type-label: 13px;

  /* Status colours keep the dark-ground values the site already used. */
  --site-good: #7ee0a8;
  --site-warn: #ffd27a;
  --site-bad: #ff9182;
}

/* Under 900px everything spans the full width with a 16px side gutter. */
@media (max-width: 900px) {
  :root { --site-margin: 16px; }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--site-ground); color: var(--site-ink); font: 400 var(--site-type-body)/1.6 var(--site-font); -webkit-text-size-adjust: 100%; }
a { color: var(--site-link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--site-link-hover); }
code, pre { font-family: var(--site-mono); font-size: 0.9em; }
code { background: var(--site-wash); padding: 0.1em 0.35em; border-radius: var(--site-radius-media); }
h1, h2, h3 { font-weight: 500; margin: 0 0 0.6em; }
h1 { font-size: var(--site-type-display); letter-spacing: -0.025em; line-height: 1.04; }
h2 { font-size: var(--site-type-title); letter-spacing: -0.02em; line-height: 1.12; }
h3 { font-size: 1.1rem; font-weight: 600; line-height: 1.3; }
:focus-visible { outline: 2px solid var(--site-link); outline-offset: 2px; }

/* Content sits in columns 2 to 11 of the 12-column grid; full width with a 16px gutter under 900px. */
.wrap { max-width: none; margin: 0; padding-inline: var(--site-margin); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: var(--site-panel); padding: 8px 12px; border-radius: var(--site-radius-control); z-index: 10; }

/* Header: the white lockup linking to ci.computer, section links in muted ink, one flat primary button. */
.top { position: sticky; top: 0; z-index: 5; background: var(--site-ground); border-bottom: 1px solid var(--site-hairline); }
.top__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; flex-wrap: wrap; }
.brandrow { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand { display: inline-flex; align-items: center; line-height: 0; text-decoration: none; }
.brand__logo { display: block; height: 44px; width: auto; }
.brand-sub { color: var(--site-muted); text-decoration: none; font-size: 0.9375rem; font-weight: 500; }
.brand-sub:hover { color: var(--site-ink); }
.top__nav { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.top__nav a:not(.btn) { color: var(--site-muted); text-decoration: none; font-size: 0.9375rem; }
.top__nav a:not(.btn):hover { color: var(--site-ink); }
.top__nav .btn { min-height: 40px; }
@media (max-width: 640px) { .top__nav a:not(.btn) { display: none; } }
@media (max-width: 480px) { .brand__logo { height: 36px; } .brand-sub { display: none; } }

.hero { padding-block: 72px 40px; }
.eyebrow { color: var(--site-label-ink); font-weight: 600; font-size: var(--site-type-label); letter-spacing: 0.12em; text-transform: uppercase; margin: 0 0 16px; }
.lede { font-size: var(--site-type-lede); font-weight: 400; line-height: 1.5; color: var(--site-muted); max-width: 42rem; }
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }

.block { padding-block: 48px; border-top: 1px solid var(--site-hairline); }
.note { color: var(--site-muted); }
main:focus { outline: none; }
.get404 { margin-top: 32px; }

/* Developer-preview notice, kept honest and near the top. */
.status { margin: 0 0 32px; padding: 16px 18px; border: 1px solid var(--site-hairline); border-radius: var(--site-radius-card); background: var(--site-panel); }
.status__title { margin: 0 0 0.4em; font-size: var(--site-type-label); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--site-label-ink); }
.status p { margin: 0.5em 0 0; color: var(--site-muted); font-size: 0.95rem; }

/* Platform cards in the Apps section. */
.platforms { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 16px; margin: 0 0 16px; padding: 0; list-style: none; }
.platforms > li { min-width: 0; padding: 18px; border: 1px solid var(--site-hairline); border-radius: var(--site-radius-card); background: var(--site-panel); }
.platforms h3 { margin: 0 0 0.4em; font-size: 1.05rem; }
.platforms p { margin: 0; color: var(--site-muted); font-size: 0.95rem; }

/* Buy / download callout band under the hero. */
.getband { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px 32px; padding: 24px; margin: 8px 0 24px; background: var(--site-panel); border: 1px solid var(--site-hairline); border-radius: var(--site-radius-card); }
.getband__copy { flex: 1 1 22rem; min-width: 0; }
.getband__copy h2 { margin: 0 0 0.3em; font-size: 1.3rem; letter-spacing: -0.01em; }
.getband__copy p { margin: 0; color: var(--site-muted); }
.getband__cta { display: flex; flex-wrap: wrap; gap: 12px; }

.tag { display: inline-block; margin-left: 6px; padding: 1px 8px; border: 1px solid var(--site-hairline-strong); border-radius: var(--site-radius-control); color: var(--site-label-ink); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; vertical-align: middle; white-space: nowrap; }

/* Buttons: 3px radius, Manrope 500, flat. Primary is the deep ring; ghost is outlined in the page ink. */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px; border-radius: var(--site-radius-control); border: 1px solid var(--site-ink); background: transparent; color: var(--site-ink); font: inherit; font-weight: 500; text-decoration: none; cursor: pointer; transition: background-color 0.15s ease, color 0.15s ease; }
.btn:hover { background: var(--site-wash); color: var(--site-ink); }
.btn--primary { background: var(--site-button); border-color: var(--site-button); color: var(--site-button-ink); }
.btn--primary:hover { background: var(--site-button-hover); border-color: var(--site-button-hover); color: var(--site-button-ink); }
.btn--ghost { background: transparent; }
.btn--small { min-height: 34px; padding: 0 12px; font-size: 0.85rem; }

.flow { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 10px; }
.flow > li { background: var(--site-panel); border: 1px solid var(--site-hairline); border-radius: var(--site-radius-card); padding: 14px 16px; display: grid; gap: 2px; }
.flow__split { grid-template-columns: 1fr 1fr; gap: 16px !important; }
.flow__split > div { display: grid; gap: 2px; }
@media (max-width: 560px) { .flow__split { grid-template-columns: 1fr; } }
.flow__k { font-weight: 600; color: var(--site-ink); }
.flow__v { color: var(--site-muted); font-size: 0.95rem; }

.steps { padding-left: 1.4em; display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
.steps > li { min-width: 0; }
.steps > li::marker { color: var(--site-label-ink); font-weight: 600; }

.form { display: grid; gap: 16px; margin: 12px 0; }
fieldset { border: 1px solid var(--site-hairline); border-radius: var(--site-radius-card); padding: 14px 16px 16px; margin: 0; background: var(--site-panel); display: grid; gap: 12px; min-width: 0; }
fieldset[hidden] { display: none; }
legend { padding: 0 6px; font-size: var(--site-type-label); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--site-label-ink); }
.field { display: grid; gap: 6px; }
.field > span:first-child { font-size: 0.9rem; font-weight: 600; }
.field small { color: var(--site-muted); font-weight: 400; }
.inline { display: flex; gap: 8px; }
.inline input { flex: 1; min-width: 0; }
input, select { width: 100%; min-height: 44px; padding: 8px 12px; border-radius: var(--site-radius-control); border: 1px solid var(--site-hairline-strong); background: var(--site-ground); color: var(--site-ink); font: inherit; font-family: var(--site-mono); font-size: 0.9rem; }
.check { display: flex; gap: 10px; align-items: center; }
.check small { color: var(--site-muted); }
fieldset > .note { margin: 0; font-size: 0.9rem; }
.steps .note { font-size: 0.92rem; }
.check input { width: 20px; min-height: 20px; accent-color: var(--site-mark-deep); }
.seg { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 8px; }
.seg label { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border: 1px solid var(--site-hairline-strong); border-radius: var(--site-radius-control); cursor: pointer; }
.seg input { width: auto; min-height: 0; accent-color: var(--site-mark-deep); }
.seg label:has(input:checked) { border-color: var(--site-link); background: var(--site-wash); }

.problems ul { margin: 0; padding-left: 1.2em; color: var(--site-warn); }
.problems .ok { color: var(--site-good); margin: 0; }

.out { border: 1px solid var(--site-hairline); border-radius: var(--site-radius-card); overflow: hidden; margin-top: 12px; background: var(--site-panel); }
.out__head { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--site-hairline); font-family: var(--site-mono); font-size: 0.85rem; color: var(--site-muted); }
.out__actions { display: flex; gap: 8px; }
.out pre { margin: 0; padding: 14px 16px; overflow-x: auto; max-height: 28rem; white-space: pre; }

.checkform { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; margin: 12px 0; }
.grow { flex: 1; min-width: 14rem; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.checks > p { flex-basis: 100%; margin: 4px 0; }
.checks .bad { color: var(--site-bad); }
.pill { display: inline-flex; gap: 8px; align-items: baseline; padding: 6px 12px; border-radius: var(--site-radius-control); border: 1px solid var(--site-hairline-strong); background: var(--site-panel); font-size: 0.9rem; }
.pill span { color: var(--site-muted); }
.pill--good b { color: var(--site-good); }
.pill--warn b { color: var(--site-warn); }
.pill--bad b { color: var(--site-bad); }

/* Footer: condensed, 13px, hairline on top, muted links that go to the ink on hover. */
.foot { padding-block: 24px 32px; border-top: 1px solid var(--site-hairline); color: var(--site-muted); font-size: 0.8125rem; line-height: 1.4; }
.foot__grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 16px 24px; }
@media (max-width: 720px) { .foot__grid { grid-template-columns: 1fr 1fr; } .foot__about { grid-column: 1 / -1; } }
.foot__col p { margin: 4px 0 0; }
.foot__col .foot__note { margin: 0 0 6px; }
.foot__h { margin: 0 0 4px; font-size: var(--site-type-label); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--site-label-ink); }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.foot a { color: var(--site-muted); display: inline-block; padding: 3px 0; text-decoration: none; }
.foot a:hover { color: var(--site-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
.foot .foot__brand { color: var(--site-ink); font-weight: 600; }
.foot__fine { display: flex; flex-wrap: wrap; gap: 4px 24px; margin-top: 16px; }
.foot__fine p { margin: 0; }
.foot__fine a { padding: 0; }
section[id] { scroll-margin-top: 72px; }

/* The one highlighted call to action per page: accent green, white text at weight 600. */
.btn--cta { background: var(--site-cta); border-color: var(--site-cta); color: var(--site-cta-ink); font-weight: 600; }
.btn--cta:hover { background: var(--site-cta-hover); border-color: var(--site-cta-hover); color: var(--site-cta-ink); }
