/* objectgate.dev — the marketing site's only stylesheet.
 *
 * The palette and the base rules are the same ones lib/html.mjs inlines into
 * the dashboard and into every tenant share cell. They are duplicated here
 * because this site is static files behind a FILES binding: nothing on this
 * host imports a module, so there is no way to read the tokens from the one
 * place they are declared. tests/www.test.mjs compares the :root block below
 * against lib/html.mjs and fails on any drift, because a palette change that
 * lands on the dashboard and misses the marketing site is invisible to whoever
 * made it and obvious to everyone else.
 *
 * Nothing here uses mask-image, feTurbulence or backdrop-filter. Those three
 * crash WebKit tabs and took two of the tissue public pages down
 * (plans/reference/public-surface-style.md §1).
 */

:root {
  color-scheme: light dark;
  --bg: #f7f7f6;
  --surface: #ffffff;
  --ink: #15161a;
  --muted: #5f6268;
  --line: #e2e2dd;
  --accent: #9c3d1e;
  --accent-ink: #ffffff;
  --ok: #1d6a4b;
  --warn: #8a5a10;
  --bad: #a52a1f;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --measure: 34rem;
}

/* Dark is a state of its own, not a filter over the light one. The media
   query is guarded so that an explicit data-theme="light" still wins. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121316;
    --surface: #191b1f;
    --ink: #e9eaec;
    --muted: #9ba0a8;
    --line: #2b2e34;
    --accent: #e0805c;
    --accent-ink: #17110d;
    --ok: #52b98c;
    --warn: #d3a44e;
    --bad: #e8776a;
  }
}
:root[data-theme="dark"] {
  --bg: #121316;
  --surface: #191b1f;
  --ink: #e9eaec;
  --muted: #9ba0a8;
  --line: #2b2e34;
  --accent: #e0805c;
  --accent-ink: #17110d;
  --ok: #52b98c;
  --warn: #d3a44e;
  --bad: #e8776a;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
}
.wrap { max-width: 56rem; margin: 0 auto; padding: 2.5rem 1.25rem 4rem; }
.narrow { max-width: var(--measure); }

h1, h2, h3 { font-weight: 600; line-height: 1.2; margin: 0 0 .5rem; }
h1 { font-size: 1.75rem; letter-spacing: -0.015em; }
h2 { font-size: 1.2rem; margin-top: 2.5rem; }
h3 { font-size: 1rem; margin-top: 1.75rem; }
p, ul, ol { margin: 0 0 1rem; }
ul, ol { padding-left: 1.25rem; }
li { margin: .25rem 0; }
.lede { font-size: 1.05rem; color: var(--muted); max-width: var(--measure); }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.mono, code, pre, kbd { font-family: var(--mono); font-size: .9em; }
code { background: var(--surface); border: 1px solid var(--line); border-radius: 3px; padding: .05em .3em; }
pre { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: .9rem 1rem; overflow-x: auto; }
pre code { background: none; border: 0; padding: 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* A ledger: label on the left, value on the right, separated by a rule.
   Reads at any count, unlike a grid that only looks right at three. */
.ledger { margin: 1.5rem 0; border-top: 1px solid var(--line); }
.ledger > div { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between;
  align-items: baseline; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.ledger dt, .ledger .k { color: var(--muted); margin: 0; }
.ledger dd, .ledger .v { margin: 0; text-align: right; max-width: 38rem; }

table { width: 100%; border-collapse: collapse; margin: 1.25rem 0; }
th, td { text-align: left; padding: .55rem .75rem .55rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; font-size: .85rem; color: var(--muted); border-bottom-width: 2px; }
td.num, th.num { text-align: right; padding-right: 0; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 5px; padding: 1.25rem; margin: 1.25rem 0; }
.notice { border-left: 3px solid var(--muted); padding: .1rem 0 .1rem .9rem; margin: 1.25rem 0; }
.notice p:last-child { margin-bottom: 0; }

button, .button {
  display: inline-block; font: inherit; line-height: 1.3; padding: .5rem .9rem; cursor: pointer;
  border: 1px solid var(--accent); border-radius: 3px;
  background: var(--accent); color: var(--accent-ink); text-decoration: none;
}
.button-quiet { background: none; color: var(--ink); border-color: var(--line); }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin: 1.25rem 0; }

header.site, footer.site { border-color: var(--line); }
header.site { border-bottom: 1px solid var(--line); }
header.site .bar, footer.site .bar {
  max-width: 56rem; margin: 0 auto; padding: .9rem 1.25rem;
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; align-items: baseline; justify-content: space-between;
}
header.site a { color: inherit; text-decoration: none; }
header.site nav, footer.site nav { display: flex; flex-wrap: wrap; gap: 1.25rem; font-size: .9rem; }
header.site nav a { color: var(--muted); }
header.site nav a[aria-current="page"] { color: var(--ink); }
.wordmark { font-weight: 600; letter-spacing: -0.01em; }
footer.site { border-top: 1px solid var(--line); margin-top: 4rem; color: var(--muted); font-size: .85rem; }
footer.site a { color: var(--muted); }
/* The platform credit, on its own line under the nav. The mark is set to the
   size of the type beside it so the line reads as a sentence with a mark in
   it, rather than as a second logo lockup competing with the wordmark. */
footer.site .colophon {
  max-width: 56rem; margin: 0 auto; padding: 0 1.25rem 1.1rem;
  display: flex; align-items: center; gap: .4rem;
}
footer.site .colophon svg { display: block; flex: none; }

/* ── the marketing pages only ───────────────────────────────────────────── */

/* The hero is the one place the measure is held tight: everything below it is
   reference material that people scan. */
.hero { margin: 1rem 0 2.5rem; }
.hero h1 { font-size: 2.1rem; max-width: 24ch; }
.hero .lede { font-size: 1.1rem; color: var(--ink); max-width: 44ch; }

/* Numbered steps. The count is the content — connect, choose, send is the
   order the work happens in — so the numbers are set large and the rule
   between them carries the separation instead of a box. */
.steps { list-style: none; padding: 0; margin: 1.5rem 0; counter-reset: step; }
.steps > li {
  counter-increment: step;
  display: grid; grid-template-columns: 2.5rem 1fr; gap: 0 1rem;
  padding: 1.1rem 0; border-top: 1px solid var(--line); margin: 0;
}
.steps > li::before {
  content: counter(step);
  grid-column: 1; grid-row: 1;
  font-family: var(--mono); font-size: 1.4rem; color: var(--muted); line-height: 1.2;
}
/* Every child of the item is placed in the second column explicitly. Left to
   auto-placement, an item holding a heading and two paragraphs puts the third
   of them back under the number, in a 2.5rem track, one word per line. */
.steps > li > * { grid-column: 2; }
.steps h3 { margin: 0 0 .35rem; }
.steps p { margin: 0 0 .5rem; max-width: 52ch; }
.steps p:last-child { margin-bottom: 0; }

/* A request trace: monospace on the left, prose on the right, one rule per
   hop. Same data a ledger holds, set for reading top to bottom. */
.trace { list-style: none; padding: 0; margin: 1.5rem 0; }
.trace > li { padding: .7rem 0; border-bottom: 1px solid var(--line); margin: 0; }
.trace .op { font-family: var(--mono); font-size: .85rem; color: var(--ink); display: block; }
.trace .what { color: var(--muted); display: block; max-width: 60ch; }

/* Two columns of prose at wide widths, one at narrow. Used for the cases and
   for the limits, so those sections do not repeat the ledger silhouette. */
.cols { columns: 2 20rem; column-gap: 2.5rem; margin: 1.25rem 0; }
.cols > * { break-inside: avoid; margin: 0 0 1rem; }

.cases { list-style: none; padding: 0; margin: 1.25rem 0; }
.cases > li { padding-left: 1.1rem; text-indent: -1.1rem; margin: .6rem 0; max-width: 56ch; }
.cases > li::before { content: "\2014\00a0"; color: var(--muted); }

/* Plan comparison. The first column is the row label and stays put; the plan
   columns are equal so the numbers line up down the page. */
.plans th[scope="row"] { color: var(--ink); font-weight: 400; font-size: 1rem; width: 16rem; }
.plans td { font-variant-numeric: tabular-nums; }
.plans thead th[data-plan] { color: var(--ink); font-size: 1rem; }

.scroll { overflow-x: auto; }
.scroll table { min-width: 42rem; }

/* Visible to a screen reader, not to the eye. Used for a table's corner cell,
   where a visible label would name a column that has no name. */
.vh {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

@media (max-width: 34rem) {
  .wrap { padding-top: 1.75rem; }
  h1 { font-size: 1.45rem; }
  .hero h1 { font-size: 1.6rem; }
  .ledger > div { flex-direction: column; }
  .ledger dd, .ledger .v { text-align: left; }
}
