/* Color, type, and space live in tokens.css. This file is layout only. */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.55 var(--sans); }
img { max-width: 100%; }
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; overflow-wrap: anywhere; }
a:hover { color: var(--muted); }
/* Headlines are Plex Sans: Light for display sizes, regular below. The size does the work. */
h1, h2 { font-family: var(--display); font-weight: 400; line-height: 1.12; letter-spacing: 0; }
h1 { font-size: clamp(42px, 6vw, 72px); margin: 0 0 24px; font-weight: 300; }
h2 { font-size: clamp(32px, 4vw, 48px); margin: 0 0 24px; }
h3 { font: 600 20px/1.3 var(--sans); margin: 0 0 8px; }
p { margin: 0 0 12px; }
.wrap { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.skip { position: absolute; left: 12px; top: -80px; background: var(--ink); color: var(--bg); padding: 8px 12px; z-index: 9; }
.skip:focus { top: 12px; }
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 4; }
.header-inner { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font: 400 20px/1 var(--display); }
.mark { display: block; width: 30px; height: 30px; flex: none; }
.nav-desktop { display: flex; gap: 16px; margin-left: auto; align-items: center; }
.nav-desktop a, .nav-mobile a { color: var(--muted); text-decoration: none; font-size: 14px; }
.nav-desktop a:hover, .nav-mobile a:hover { color: var(--ink); }
.signin { margin-left: 4px; }
.nav-mobile { display: none; }
.nav-mobile summary { list-style: none; cursor: pointer; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; font-size: 14px; font-weight: 600; }
.nav-mobile summary::-webkit-details-marker { display: none; }
.nav-mobile nav { position: absolute; right: 0; top: calc(100% + 8px); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 12px; display: grid; gap: 12px; min-width: 210px; box-shadow: var(--shadow); }
.nav-mobile { position: relative; }
.eyebrow, .kicker { color: var(--muted); font: 400 14px var(--sans); margin: 0 0 8px; }
.lead { font-size: 20px; line-height: 1.55; color: var(--muted); max-width: 640px; }
.hero { padding: 80px 0 40px; }
.hero-split { display: grid; gap: 32px; align-items: start; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 16px 0 0; }
.hero-stats li {
  min-width: 92px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);
}
.hero-stats b { display: block; font-size: 14px; }
.hero-stats span { color: var(--muted); font-size: 14px; }
.product-frame {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin: 0;
}
.product-kicker { margin: 0 0 12px; font: 400 12px var(--sans); color: var(--muted); }
.product-frame .channel-mark {
  margin-left: auto;
  width: 22px; height: 22px; display: grid; place-items: center;
  border-radius: var(--radius); background: var(--ink); color: var(--bg); font-size: 12px; font-weight: 600;
}
.shot-row { display: grid; gap: 16px; }
@media (min-width: 800px) {
  .shot-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 960px) {
  .hero-split { grid-template-columns: 1.05fr .95fr; align-items: center; }
}
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 16px; }
.button, button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 16px; border-radius: var(--radius); border: 1px solid transparent;
  background: var(--ink); color: var(--bg); font: 600 14px var(--sans); text-decoration: none; cursor: pointer;
}
.button:hover, button:hover { background: var(--muted); color: var(--bg); }
.button.ghost, button.secondary, .icon-button { background: transparent; color: var(--ink); border-color: var(--line); }
.button.ghost:hover, button.secondary:hover, .icon-button:hover { background: var(--hover); color: var(--ink); }
.button.small { min-height: 40px; padding: 8px 12px; border-radius: var(--radius); background: transparent; color: var(--ink); border-color: var(--line); }
.button.small:hover { background: var(--ink); color: var(--bg); }
button:disabled { opacity: .55; cursor: default; }
.under { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; color: var(--muted); font-size: 14px; margin-top: 8px; }
.under code, .inline-code { font-family: var(--mono); font-size: 14px; background: var(--field); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 8px; color: var(--ink); }
.demo-band { background: var(--band); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 64px 0; }
.after-demo { margin-top: 40px; }
.section { padding: 96px 0 0; }
.section > h2, .section-head { max-width: 760px; }
.section-head { margin-bottom: 32px; }
.section-head p { color: var(--muted); }
.sandbox-note { background: var(--inverse); color: var(--inverse-ink); border-radius: var(--radius-lg); padding: 12px 16px; font-size: 14px; margin: 0 0 16px; }
.demo-app { display: grid; gap: 12px; }
.steps-rail { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.steps-rail li { font: 600 12px var(--sans); color: var(--muted); border: 1px solid var(--line); background: var(--card); border-radius: var(--radius-sm); padding: 4px 8px; }
.steps-rail li.is-current { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.steps-rail li.is-done { color: var(--ink); border-color: var(--faint); }
.card, .demo-profile, .demo-work, .price, .feature, .faq { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.demo-profile, .demo-work { padding: 16px; }
.demo-profile h2, .draft-block h3 { font: 600 16px/1.3 var(--sans); letter-spacing: 0; }
.agent { font: 400 12px var(--sans); color: var(--muted); margin-bottom: 8px; }
.rules { margin: 8px 0 0; padding-left: 16px; }
.rules li { margin: 8px 0; }
.rules [data-accepted] { color: var(--good); font-weight: 600; }
.meta { color: var(--muted); font-size: 14px; }
label { display: block; font-weight: 600; margin: 12px 0 8px; }
textarea, input[type="email"], input[type="number"], input[type="text"], input[type="search"] {
  width: 100%; font: 16px/1.45 var(--sans); color: inherit; background: var(--field);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 12px;
}
textarea { min-height: 112px; resize: vertical; }
input:focus, textarea:focus, button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.draft-heading { font-weight: 600; }
.revision-note, .demo-status { font-size: 14px; color: var(--muted); }
.demo-status { min-height: 1.4em; margin-top: 12px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.snapshot { background: var(--band); border-radius: var(--radius-lg); padding: 12px; margin-top: 12px; }
.snapshot h3 { font-family: var(--sans); font-size: 14px; letter-spacing: 0; }
.snapshot dl { display: grid; grid-template-columns: minmax(120px, 180px) 1fr; gap: 4px 12px; margin: 0; }
.snapshot dt { font: 600 12px var(--sans); color: var(--muted); }
.snapshot dd { margin: 0; font: 14px/1.4 var(--mono); overflow-wrap: anywhere; }
.snapshot blockquote { margin: 12px 0 0; padding: 12px 0 0; border-top: 1px solid var(--line); font: 400 16px/1.5 var(--display); }
.grid-3, .grid-2, .prices, .features { display: grid; gap: 16px; }
.grid-3 > *, .grid-2 > *, .prices > *, .features > *, .split > *, .guard > *, .steps > * { min-width: 0; }
.features { grid-template-columns: repeat(3, 1fr); }
.feature, .price, .split article, .faq { padding: 24px; }
.feature p, .price li, .split li { color: var(--muted); }
.feature span, .num { font: 400 12px var(--sans); color: var(--muted); }
.flow { background: var(--band); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.step b { display: block; margin: 12px 0 8px; font-size: 20px; }
.step p { color: var(--muted); font-size: 14px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.pick { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.criterion { display: block; font: 400 12px var(--sans); color: var(--muted); margin-top: 12px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.split ul, .price ul { padding-left: 16px; }
.pledge { margin-top: 16px; padding: 16px 0; border-top: 1px solid var(--line); }
.guard { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.guard article { padding: 16px 0; border-top: 1px solid var(--line); }
.prices { grid-template-columns: repeat(4, 1fr); align-items: stretch; }
.price { display: flex; flex-direction: column; }
.price .amount { font: 400 40px/1.1 var(--display); margin: 8px 0; }
.price ul { flex: 1; }
.price .button, .price button { margin-top: 12px; }
.offer { background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: var(--radius-lg); padding: 16px 16px; margin-bottom: 16px; }
.offer.closed { background: var(--card); border-color: var(--line); }
.tag { font: 400 12px var(--sans); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 2px 8px; margin-left: 4px; }
.tag.beta { color: var(--amber); }
.tag.soon { color: var(--muted); }
.fine { color: var(--muted); font-size: 14px; margin-top: 16px; }
.faq-list { display: grid; max-width: 760px; border-top: 1px solid var(--line); }
#faq .faq, .faq-list .faq { background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 16px 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { color: var(--muted); margin-top: 8px; }
.form-errors { color: var(--bad-ink); padding-left: 16px; }
form.waitlist { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px 16px 24px; }
fieldset { border: 0; margin: 12px 0; padding: 0; }
legend { font-weight: 600; margin-bottom: 8px; }
.hp, .copy-fallback { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 8px; }
.checks label { font-weight: 600; margin: 0; display: flex; gap: 8px; align-items: center; min-height: 44px; }
.snippet { position: relative; margin: 8px 0 16px; }
.snippet pre { margin: 0; padding: 16px 80px 16px 16px; background: var(--inverse); color: var(--inverse-ink); border-radius: var(--radius-lg); font: 14px/1.5 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.snippet button { position: absolute; top: 8px; right: 8px; min-height: 40px; background: var(--inverse-ink); color: var(--inverse); }
.snippet button:hover { background: var(--card); color: var(--ink); }
.cta { padding-bottom: 80px; }
.site-footer { border-top: 1px solid var(--line); padding: 32px 0 40px; color: var(--muted); font-size: 14px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 12px 16px; margin-bottom: 12px; }
.foot-links a { color: var(--muted); text-decoration: none; }
.foot-links a:hover { color: var(--ink); }
.legal { max-width: 720px; padding: 64px 0 96px; }
.legal h1 { font-size: clamp(36px, 5vw, 52px); margin-bottom: 24px; }
/* Legal sections read as a document: smaller serif heads with room above them. */
.legal h2 { font-size: 28px; line-height: 1.2; margin: 48px 0 12px; }
.legal h3 { margin: 32px 0 8px; }
.legal p, .legal li { line-height: 1.65; }
.legal code { overflow-wrap: anywhere; word-break: break-word; }
.thanks { max-width: 640px; padding: 32px 0 64px; }
[hidden] { display: none !important; }
@media (min-width: 880px) {
  .demo-app { grid-template-columns: 300px 1fr; align-items: start; }
  .steps-rail, .sandbox-note { grid-column: 1 / -1; }
  .demo-profile { position: sticky; top: 84px; }
}
@media (max-width: 980px) {
  .prices, .features, .steps { grid-template-columns: 1fr 1fr; }
  .guard, .split, .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .nav-desktop { display: none; }
  .nav-mobile { display: block; }
  .signin { margin-left: auto; }
}
@media (max-width: 480px) {
  .site-header .brand { font-size: 0; gap: 0; }
  .site-header .mark { font-size: 14px; }
}
@media (max-width: 640px) {
  .site-header [data-command-open],
  .site-header [data-theme-toggle] {
    width: 36px;
    min-width: 36px;
    padding: 0;
    font-size: 0;
  }
  .site-header [data-command-open]::after { content: "⌕"; font-size: 16px; line-height: 1; }
  .site-header [data-theme-toggle]::after { content: "◐"; font-size: 16px; line-height: 1; }
  .wrap { width: min(100% - 28px, 1120px); }
  .hero { padding-top: 32px; }
  .lead { font-size: 16px; }
  .section, .demo-band { padding: 48px 0; }
  .prices, .features, .steps { grid-template-columns: 1fr; }
  .actions { align-items: stretch; }
  .actions .button { width: 100%; }
  .snapshot dl { grid-template-columns: 1fr; }
  .header-inner { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* Home page layout (#172): lists and rules instead of card grids. */
.hero-split figure { margin: 0; }
.how { max-width: 760px; margin: 0; padding: 0; list-style: none; counter-reset: how; border-top: 1px solid var(--line); }
.how li { counter-increment: how; display: grid; grid-template-columns: 48px 1fr; padding: 16px 0; border-bottom: 1px solid var(--line); color: var(--muted); }
.how li::before { content: counter(how); font: 400 28px/1 var(--display); color: var(--ink); }
.how p { margin: 0; }
.how b { color: var(--ink); font-weight: 600; }
.ruled { display: grid; gap: 0 48px; margin: 0; }
.ruled > div { padding: 24px 0; border-top: 1px solid var(--line); }
.ruled dt { font-weight: 600; margin-bottom: 8px; }
.ruled dd { margin: 0; color: var(--muted); }
@media (min-width: 800px) { .ruled { grid-template-columns: 1fr 1fr; } }
.table-scroll { overflow-x: auto; }
.compare { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 14px; }
.compare th, .compare td { text-align: left; vertical-align: top; padding: 16px 16px 16px 0; border-bottom: 1px solid var(--line); }
.compare thead th { font-weight: 600; border-bottom-color: var(--ink); }
.compare tbody th { font: 400 14px var(--sans); color: var(--muted); padding-top: 16px; }
.compare td { color: var(--muted); }
.compare td:last-child, .compare thead th:last-child { color: var(--ink); }
#open-source .split { gap: 48px; }
#open-source .split article { padding: 24px 0 0; border-top: 2px solid var(--ink); }

/* Pricing (#182): outline buttons on the plans that are not highlighted. */
.price .button.ghost { border-color: var(--faint); }

/* UX sweep (#186): at phone width the header is one row (mark, Sign in,
   Menu). Search and the trial button leave the bar (the hero and the menu
   carry the trial link), and the theme switch moves into the menu instead of
   a glyph the system font drew as a half box. */
.nav-mobile .nav-theme { justify-self: start; }
.site-header .nav-mobile .nav-theme { width: auto; min-width: 0; padding: 8px 12px; font-size: 14px; }
.site-header .nav-mobile .nav-theme::after { content: none; }
@media (min-width: 641px) { .nav-mobile .nav-theme { display: none; } }
@media (max-width: 640px) {
  .header-inner { flex-wrap: nowrap; min-height: 60px; }
  .site-header > .wrap > [data-command-open],
  .site-header > .wrap > [data-theme-toggle],
  .site-header > .wrap > [data-cta-place="header"]:not(.signin) { display: none; }
}
@media (min-width: 641px) {
  .site-header .header-inner > .icon-button { height: 40px; min-height: 40px; padding: 0 12px; font-size: 14px; }
}

/* Carbon-style header (#200): search and theme are quiet icon buttons, so
   the only bordered actions are the trial and sign-in. */
.site-header .header-inner > .icon-button { border-color: transparent; background: transparent; }
.site-header .header-inner > .icon-button:hover { background: var(--hover); }
