/* ── styles/base.css ── */
/*
 * Base: reset, type, focus ring, logo, buttons, code tokens.
 * Tokens come from www/brand/tokens.css (loaded before this file).
 * Amber rule (DIRECTION.md, PLAN.md §7): amber only at the crossings, see
 * test/amber.test.mjs for the allowed selectors.
 */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p, ul, ol, pre, figure, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
code, pre, kbd { font-family: var(--font-mono); }
pre { max-width: 100%; overflow-x: auto; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--cobalt); color: #fff; }
[id] { scroll-margin-top: 84px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.mono { font-family: var(--font-mono); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  padding: 10px 14px; border-radius: var(--r-sm);
  background: var(--surface-2); color: var(--text); font-size: 14px;
  box-shadow: inset 0 0 0 1px var(--lead-strong);
}
.skip-link:focus { top: 12px; }

/* Logo: official lockup and mark from the inlined symbols */
.logo-link { display: block; flex: none; }
.logo { display: block; height: 46px; width: calc(46px * 1162 / 320); margin-left: -6px; }
.mark { display: inline-block; height: 18px; width: 21px; vertical-align: -3px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px;
  border-radius: var(--r-sm);
  font: 500 15px/1 var(--font-sans); letter-spacing: -0.005em;
  white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; }
.btn-primary {
  background: var(--cobalt); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 0 0 1px rgba(31, 68, 214, .6), 0 8px 28px -8px rgba(31, 68, 214, .7);
}
.btn-primary:hover { background: var(--cobalt-hover); }
.btn-ghost {
  background: rgba(232, 234, 240, .04); color: var(--text);
  box-shadow: inset 0 0 0 1px var(--lead-strong), inset 0 1px 0 var(--edge-light);
}
.btn-ghost:hover { background: rgba(232, 234, 240, .08); }
.arrow { font-family: var(--font-mono); transition: transform .15s; }
a:hover > .arrow { transform: translateX(3px); }
.link { color: var(--cobalt-text); font-weight: 500; }
.link:hover { color: #b4c4ff; }

/* Icon link (GitHub) */
.icon-link {
  display: inline-grid; place-items: center; width: 36px; height: 36px;
  border-radius: var(--r-sm); color: var(--text-2);
  transition: color .15s, background-color .15s;
}
.icon-link:hover { color: var(--text); background: rgba(232, 234, 240, .05); }
.gh-mark { width: 18px; height: 18px; }

.lang-switch { padding: 8px 10px; border-radius: var(--r-sm); font: 400 13px/1 var(--font-mono); color: var(--text-2); }
.lang-switch:hover { color: var(--text); background: rgba(232, 234, 240, .05); }

/* Code tokens (DIRECTION.md code palette) */
.c-p { color: var(--text-3); user-select: none; }
.c-c { color: var(--text-3); }
.c-k { color: var(--cobalt-text); }
.c-s { color: var(--amber-soft); }
.c-t { color: var(--text); }
.c-ok { color: var(--ok); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ── styles/layout.css ── */
/* Sections, numbered section heads, eyebrow. */

section { position: relative; }
.section { padding: 112px 0; border-top: 1px solid var(--lead); }
.section-head {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px; align-items: end; margin-bottom: 56px;
}
.kicker { font: 500 12.5px/1 var(--font-mono); letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); }
.kicker b { color: var(--text-2); font-weight: 500; margin-right: 10px; }
h2 {
  margin-top: 18px;
  font-size: clamp(30px, 3.3vw, 46px); line-height: 1.06; font-weight: 500; letter-spacing: -0.034em;
  text-wrap: balance;
}
.section-head p { font-size: 17.5px; color: var(--text-2); max-width: 31em; text-wrap: pretty; }
p code { font-size: .9em; color: var(--text); background: rgba(232, 234, 240, .07); padding: 1px 5px; border-radius: 4px; }

/* The eyebrow tick is the logo's slanted pane, in amber. */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font: 500 12.5px/1 var(--font-mono); letter-spacing: .04em; text-transform: uppercase; color: var(--text-2);
}
.eyebrow::before { content: ""; width: 7px; height: 7px; background: var(--amber); transform: skewX(-26.57deg); }

@media (max-width: 760px) {
  :root { --gutter: 20px; }
  .section { padding: 76px 0; }
  .section-head { grid-template-columns: minmax(0, 1fr); gap: 18px; margin-bottom: 36px; }
}

/* ── styles/header.css ── */
/* Sticky translucent header and the mobile <details> menu. */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(13, 16, 23, .74);
  -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--lead);
}
.site-header .wrap { display: flex; align-items: center; height: 68px; gap: 40px; }
.nav { display: flex; gap: 4px; margin-right: auto; }
.nav a {
  padding: 8px 12px; border-radius: var(--r-sm); font-size: 14.5px; color: var(--text-2);
  transition: color .15s, background-color .15s;
}
.nav a:hover { color: var(--text); background: rgba(232, 234, 240, .05); }
.header-actions { display: flex; align-items: center; gap: 6px; }
.signin { padding: 8px 12px; font-size: 14.5px; color: var(--text-2); }
.signin:hover { color: var(--text); }

.menu { display: none; position: relative; }
.menu summary {
  list-style: none; cursor: pointer; width: 36px; height: 36px; border-radius: var(--r-sm);
  display: grid; place-items: center; box-shadow: inset 0 0 0 1px var(--lead-strong);
}
.menu summary::-webkit-details-marker { display: none; }
.menu summary i, .menu summary i::before { display: block; width: 16px; height: 1.5px; background: var(--text); content: ""; }
.menu summary i { transform: translateY(-2.5px); }
.menu summary i::before { transform: translateY(5px); }
.menu-panel {
  position: absolute; right: 0; top: 46px; width: 228px; padding: 8px;
  background: var(--surface-2); border: 1px solid var(--lead-strong); border-radius: var(--r);
  box-shadow: 0 24px 60px -12px rgba(0, 0, 0, .7);
}
.menu-panel > a { display: block; padding: 10px 12px; border-radius: var(--r-sm); font-size: 15px; color: var(--text-2); }
.menu-panel > a:hover { background: rgba(232, 234, 240, .06); color: var(--text); }
.menu-row { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; padding: 8px 2px 0; border-top: 1px solid var(--lead); }

@media (max-width: 760px) {
  .nav, .header-only { display: none; }
  .menu { display: block; }
  .site-header .wrap { height: 60px; gap: 12px; justify-content: space-between; }
  .logo { height: 40px; width: calc(40px * 1162 / 320); }
}

/* ── styles/hero.css ── */
/* Hero copy and the light shafts behind it. */

.hero { position: relative; padding: 88px 0 112px; }
/* Light through glass: two shafts at the logo's slant, cobalt then a thin amber one. */
.hero::before {
  content: ""; position: absolute; inset: -68px 0 0 0; pointer-events: none;
  background:
    linear-gradient(var(--slant), transparent 52%, rgba(31, 68, 214, 0) 54%, rgba(31, 68, 214, .26) 64%, rgba(31, 68, 214, .05) 73%, transparent 74%),
    linear-gradient(var(--slant), transparent 73.5%, rgba(245, 166, 35, .13) 74%, rgba(245, 166, 35, .03) 82%, transparent 83%),
    linear-gradient(var(--slant), transparent 36%, rgba(232, 234, 240, .035) 37%, transparent 51%);
  -webkit-mask-image: radial-gradient(120% 90% at 72% 18%, #000 20%, transparent 78%);
  mask-image: radial-gradient(120% 90% at 72% 18%, #000 20%, transparent 78%);
}
.hero .wrap {
  position: relative; display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6.4fr); gap: 56px; align-items: center;
}
h1 {
  margin-top: 24px;
  font-size: clamp(42px, 5.3vw, 76px); line-height: 1.0; font-weight: 500; letter-spacing: -0.042em;
  text-wrap: balance;
}
h1 em { font-style: normal; color: var(--text-3); }
.lede { margin-top: 26px; max-width: 30em; font-size: 19px; line-height: 1.5; color: var(--text-2); text-wrap: pretty; }
.lede strong { color: var(--text); font-weight: 500; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero-meta { margin-top: 28px; font: 400 13px/1.6 var(--font-mono); color: var(--text-3); }

@media (max-width: 1080px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); gap: 56px; }
}
@media (max-width: 760px) {
  .hero { padding: 56px 0 72px; }
  .lede { font-size: 17.5px; }
  .cta-row .btn { flex: 1 1 auto; }
}

/* ── styles/hero-stage.css ── */
/* Hero stage (database-first hero): an API write, the database table it lands
   in, and two screens that update at the same moment, layered over a cobalt
   glow, with the amber organization bar under the cluster.

   The markup is the completed end frame. Every looping animation below shares
   one duration (10s, --st-loop) and one start delay (1s, --st-wait), so the
   beats stay in sync; its keyframes start from the "before" frame. With reduced motion
   (base.css turns animations off) the end frame is what shows. Nothing that
   animates changes a box size: the new row and both states of each screen
   take their space in every frame. */

.stage { position: relative; --st-loop: 10s; --st-wait: 1s; }

.cluster {
  position: relative;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
}
.cluster::before {
  content: ""; position: absolute; inset: 8% 0 18%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(31, 68, 214, .26), rgba(31, 68, 214, .08) 60%, transparent);
}

.pane {
  position: relative;
  background: var(--glass);
  -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5);
  border: 1px solid var(--lead-strong);
  border-radius: var(--r);
  box-shadow: inset 0 1px 0 var(--edge-light), 0 30px 60px -24px rgba(0, 0, 0, .75);
  font-size: 13px;
  animation: rise .7s cubic-bezier(.2, .7, .2, 1) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

/* Placement: write card behind at the top left, the table forward and to the
   right, the two screens in front, the org bar last. Each overlap covers only
   the bottom padding of the card behind it. */
.pane-write { grid-column: 1 / 8; grid-row: 1; z-index: 1; }
.pane-db { grid-column: 3 / 13; grid-row: 2; margin-top: -26px; z-index: 2; animation-delay: .1s; }
.screen-phone { grid-column: 1 / 6; grid-row: 3; margin-top: -30px; z-index: 3; animation-delay: .2s; }
.screen-dash { grid-column: 6 / 13; grid-row: 3; margin: -14px 0 0 12px; z-index: 3; animation-delay: .25s; }
.pane-org { grid-column: 1 / 13; grid-row: 4; z-index: 4; animation-delay: .3s; }

.pane-head {
  display: flex; align-items: center; gap: 8px;
  padding: 13px 18px; border-bottom: 1px solid var(--lead);
  font-weight: 500; font-size: 14px; letter-spacing: -0.005em;
}
.swatch { width: 9px; height: 9px; border-radius: 2px; background: var(--text-3); flex: none; }
.swatch.l { background: var(--text); }
.swatch.c { background: var(--cobalt); }
.pane-db .pane-body { padding: 16px 18px 38px; }

/* The live flash: a cobalt ring over a card, off in the end frame. */
.pane-write::after, .screen::after {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
  box-shadow: 0 0 0 1px rgba(31, 68, 214, .9), 0 0 32px -4px rgba(31, 68, 214, .6);
  opacity: 0;
}

/* ── API write ── */
.w-body { padding: 12px 18px 38px; font: 400 12.5px/1.8 var(--font-mono); color: var(--text-2); }
.w-line { white-space: nowrap; overflow: hidden; }
.w-verb { color: var(--cobalt-text); }
.w-table { color: var(--text); }
.w-key { display: inline-block; width: 12ch; padding-left: 2ch; color: var(--text-3); }
.w-val {
  display: inline-block; vertical-align: top; overflow: hidden; white-space: nowrap;
  color: var(--text); border-right: 2px solid transparent;
}
.w-done {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  font: 400 11.5px/1 var(--font-mono); color: var(--ok);
}
.w-done::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }

/* ── Database table ── */
.tbl { width: 100%; border-collapse: collapse; font: 400 13px/1 var(--font-mono); }
.tbl th { text-align: left; font-weight: 400; color: var(--text-3); padding: 0 0 11px; }
.tbl td { padding: 11px 0; border-top: 1px solid var(--lead); color: var(--text-2); white-space: nowrap; }
.tbl th:last-child, .tbl td:last-child { text-align: right; }
.tbl td:first-child { color: var(--text); }
.tbl .new td { color: var(--text); }
.tag {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 7px; border-radius: 4px;
  font: 500 11px/1 var(--font-mono); background: rgba(232, 234, 240, .06); color: var(--text-2);
}
.tag.ok { color: var(--ok); background: rgba(88, 201, 155, .1); }
.tag.ok::before, .live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.live { display: inline-flex; align-items: center; gap: 6px; font: 400 11.5px/1 var(--font-mono); color: var(--text-2); margin-left: auto; }

/* ── Screens ── */
.swap { display: inline-grid; }
.swap > * { grid-area: 1 / 1; }
.sw-b { opacity: 0; }

.sc-head {
  padding: 10px 14px 9px; border-bottom: 1px solid var(--lead);
  font-weight: 500; font-size: 12.5px; color: var(--text-2);
}

.screen-phone { border-radius: 18px; }
.screen-phone .sc-head { padding-top: 4px; }
.ph-bar { display: flex; justify-content: center; padding-top: 8px; }
.ph-bar i { width: 34px; height: 4px; border-radius: 2px; background: var(--lead-strong); }
.sc-kicker { padding: 10px 14px 0; font: 400 11px/1 var(--font-mono); color: var(--text-3); }
.ph-order { display: grid; padding: 8px 14px 34px; }
.ph-id { font: 400 12px/1.3 var(--font-mono); color: var(--text-3); }
.ph-name { margin-top: 2px; font-weight: 500; font-size: 15px; letter-spacing: -0.01em; color: var(--text); white-space: nowrap; }
.ph-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.ph-total { font: 400 12px/1 var(--font-mono); color: var(--text-2); }

.dash-kpi { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 4px 8px; padding: 14px 14px 0; }
.dash-count { font-weight: 500; font-size: 34px; line-height: 1; letter-spacing: -0.03em; color: var(--text); }
.dash-label { font: 400 12px/1.6 var(--font-mono); color: var(--text-2); }
.dash-bars { margin-left: auto; display: flex; align-items: flex-end; gap: 4px; height: 30px; }
.dash-bars i { width: 8px; height: 14px; border-radius: 2px; background: var(--cobalt-light); }
.dash-bars i:nth-child(2) { height: 21px; }
.dash-bars .bar-new { height: 30px; background: var(--cobalt); transform-origin: bottom; }
.dash-latest {
  display: flex; justify-content: space-between; gap: 8px;
  margin: 12px 14px 0; padding: 10px 0 34px; border-top: 1px solid var(--lead);
  font: 400 12px/1 var(--font-mono); color: var(--text-3);
}
.dash-latest .swap { justify-items: end; color: var(--text); }

/* ── Organization bar: one organization, one plan, one bill ── */
.pane-org {
  margin: -22px 6% 0;
  display: flex; align-items: center; gap: 14px; padding: 15px 18px;
  background: linear-gradient(180deg, rgba(245, 166, 35, .16), rgba(245, 166, 35, .05)), var(--glass-strong);
  border-color: rgba(245, 166, 35, .5);
  box-shadow: inset 0 1px 0 rgba(255, 220, 150, .3), 0 30px 70px -20px rgba(245, 166, 35, .28), 0 30px 60px -24px rgba(0, 0, 0, .8);
}
.pane-org .mark { height: 30px; width: 35px; flex: none; }
.org-name { font-weight: 500; font-size: 15px; letter-spacing: -0.01em; }
.org-sub { font: 400 12px/1.3 var(--font-mono); color: var(--text-2); margin-top: 3px; }
.org-bill { margin-left: auto; text-align: right; }
.org-bill b { display: block; font: 500 15px/1.2 var(--font-mono); color: var(--amber); }
.org-bill span { font: 400 11.5px/1 var(--font-mono); color: var(--text-2); display: block; margin-top: 6px; }

/* ── The loop ──
   0–5%    start frame: empty write, two rows, screens on 4820, count 2
   6–37%   the write types id, customer, status, total (caret on the line)
   40%     the write is saved (tag + ring)
   43%     row 4821 appears in the table with a cobalt wash
   49%     the phone and the dashboard update together (ring, 2 → 3, 4821)
   50–88%  hold
   89–96%  fade back to the start frame */
.live::before { animation: st-pulse 2s ease-out infinite; }
/* Longhands with literal times (10s loop, 1s wait, = --st-loop / --st-wait):
   no custom properties inside the animation shorthand, which WebKit can drop. */
.w-v1, .w-v2, .w-v3, .w-v4, .w-done, .pane-write::after, .tbl .new td, .screen::after,
.sw-b, .sw-a, .dash-bars .bar-new {
  animation-duration: 10s;
  animation-delay: 1s;
  animation-iteration-count: infinite;
  animation-fill-mode: both;
  animation-timing-function: ease-out;
}
.w-v1, .w-v2, .w-v3, .w-v4, .w-done { animation-timing-function: linear; }
.w-v1 { animation-name: st-type1; }
.w-v2 { animation-name: st-type2; }
.w-v3 { animation-name: st-type3; }
.w-v4 { animation-name: st-type4; }
.w-done { animation-name: st-done; }
.pane-write::after { animation-name: st-ring-write; }
.tbl .new td { animation-name: st-row; }
.screen::after { animation-name: st-ring-screen; }
.sw-b { animation-name: st-out; }
.sw-a { animation-name: st-in; }
.dash-bars .bar-new { animation-name: st-bar; }

@keyframes st-pulse {
  0% { box-shadow: 0 0 0 0 rgba(88, 201, 155, .55); }
  70%, 100% { box-shadow: 0 0 0 6px rgba(88, 201, 155, 0); }
}

/* Typing: max-width in 16 steps of 1ch, so each step shows one more character
   (Geist Mono); a shorter value is done early and waits. */
@keyframes st-type1 {
  0%, 6% { max-width: 0; opacity: 1; border-right-color: var(--cobalt-text); animation-timing-function: steps(16, end); }
  13% { max-width: 16ch; border-right-color: var(--cobalt-text); }
  13.5%, 88% { max-width: 16ch; opacity: 1; border-right-color: transparent; }
  94% { max-width: 16ch; opacity: 0; border-right-color: transparent; }
  96%, 100% { max-width: 0; opacity: 0; border-right-color: transparent; }
}
@keyframes st-type2 {
  0%, 13.4% { max-width: 0; opacity: 1; border-right-color: transparent; }
  13.5%, 14% { max-width: 0; opacity: 1; border-right-color: var(--cobalt-text); animation-timing-function: steps(16, end); }
  21% { max-width: 16ch; border-right-color: var(--cobalt-text); }
  21.5%, 88% { max-width: 16ch; opacity: 1; border-right-color: transparent; }
  94% { max-width: 16ch; opacity: 0; border-right-color: transparent; }
  96%, 100% { max-width: 0; opacity: 0; border-right-color: transparent; }
}
@keyframes st-type3 {
  0%, 21.4% { max-width: 0; opacity: 1; border-right-color: transparent; }
  21.5%, 22% { max-width: 0; opacity: 1; border-right-color: var(--cobalt-text); animation-timing-function: steps(16, end); }
  29% { max-width: 16ch; border-right-color: var(--cobalt-text); }
  29.5%, 88% { max-width: 16ch; opacity: 1; border-right-color: transparent; }
  94% { max-width: 16ch; opacity: 0; border-right-color: transparent; }
  96%, 100% { max-width: 0; opacity: 0; border-right-color: transparent; }
}
@keyframes st-type4 {
  0%, 29.4% { max-width: 0; opacity: 1; border-right-color: transparent; }
  29.5%, 30% { max-width: 0; opacity: 1; border-right-color: var(--cobalt-text); animation-timing-function: steps(16, end); }
  37%, 39.9% { max-width: 16ch; border-right-color: var(--cobalt-text); }
  40%, 88% { max-width: 16ch; opacity: 1; border-right-color: transparent; }
  94% { max-width: 16ch; opacity: 0; border-right-color: transparent; }
  96%, 100% { max-width: 0; opacity: 0; border-right-color: transparent; }
}

@keyframes st-done {
  0%, 39% { opacity: 0; }
  41%, 88% { opacity: 1; }
  94%, 100% { opacity: 0; }
}
@keyframes st-ring-write {
  0%, 39% { opacity: 0; }
  41% { opacity: .8; }
  52%, 100% { opacity: 0; }
}

@keyframes st-row {
  0%, 42% { opacity: 0; transform: translateY(-4px); background-color: transparent; }
  44% { opacity: 1; transform: none; background-color: var(--cobalt-light); }
  70%, 88% { opacity: 1; transform: none; background-color: transparent; }
  94%, 100% { opacity: 0; transform: none; background-color: transparent; }
}

@keyframes st-ring-screen {
  0%, 48% { opacity: 0; }
  50% { opacity: 1; }
  66%, 100% { opacity: 0; }
}
@keyframes st-out {
  0%, 48% { opacity: 1; transform: none; }
  51%, 89% { opacity: 0; transform: translateY(-6px); }
  95%, 100% { opacity: 1; transform: none; }
}
@keyframes st-in {
  0%, 48% { opacity: 0; transform: translateY(6px); }
  51%, 89% { opacity: 1; transform: none; }
  95%, 100% { opacity: 0; transform: translateY(6px); }
}
@keyframes st-bar {
  0%, 48% { transform: scaleY(0); }
  53%, 89% { transform: none; }
  95%, 100% { transform: scaleY(0); }
}

@media (max-width: 1080px) {
  .stage { max-width: 680px; }
}
@media (max-width: 760px) {
  .pane-head { padding: 11px 14px; font-size: 13px; }
  .w-body { padding: 10px 14px 34px; font-size: 12px; }
  .pane-db .pane-body { padding: 12px 14px 34px; }
  .tbl { font-size: 12px; }
  .tbl td { padding: 9px 0; }
  .pane-write { grid-column: 1 / 12; }
  .pane-db { grid-column: 1 / 13; margin-top: -24px; }
  .screen-phone { grid-column: 1 / 7; margin-top: -26px; }
  .screen-dash { grid-column: 7 / 13; margin: -12px 0 0 8px; }
  .sc-head { padding-left: 12px; padding-right: 12px; }
  .sc-kicker { padding: 9px 12px 0; }
  .ph-order { padding: 7px 12px 32px; }
  .ph-name { font-size: 14px; }
  .dash-kpi { padding: 12px 12px 0; }
  .dash-count { font-size: 28px; }
  .dash-latest { margin: 10px 12px 0; padding-bottom: 32px; }
  .pane-org { margin: -18px 8px 0; flex-wrap: wrap; }
  .org-bill { margin-left: 0; text-align: left; }
}

/* ── styles/products.css ── */
/*
 * Products: a leaded window. Vitral Cloud is one wide pane with three
 * sub-cells; the WhatsApp API and Channels share the next row; Organizations is
 * the sill, lit in amber (the overlap).
 */

.window {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px;
  border: 1px solid var(--lead-strong); border-radius: var(--r-lg); overflow: hidden;
  background: var(--lead);
}
.cell {
  position: relative; background: var(--bg); padding: 30px 30px 28px;
  display: flex; flex-direction: column; min-height: 248px;
  overflow: hidden; transition: background-color .25s;
}
.cell::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: linear-gradient(var(--slant), transparent 30%, var(--cobalt-wash) 50%, transparent 78%);
}
.cell:hover::after, .cell:focus-within::after { opacity: 1; }
.cell > * { position: relative; z-index: 1; }
.cell-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 30px; }
.glyph { width: 32px; height: 32px; flex: none; color: var(--text); }
.glyph * { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.glyph .hl { stroke: var(--cobalt-text); }
.spec { font: 400 12px/1.3 var(--font-mono); color: var(--text-3); text-align: right; }
.spec code { font-size: inherit; }
.cell h3 { font-size: 20px; font-weight: 500; letter-spacing: -0.02em; }
.cell p { margin-top: 8px; color: var(--text-2); font-size: 15px; line-height: 1.5; text-wrap: pretty; }
.cell .more { margin-top: auto; padding-top: 22px; font-size: 14px; color: var(--text-2); display: inline-flex; gap: 8px; align-self: flex-start; }
.cell .more:hover { color: var(--text); }

/* Vitral Cloud: intro + three sub-cells in one wide pane */
.cell-cloud {
  grid-column: 1 / -1; padding: 0; min-height: 0;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
  background: linear-gradient(var(--slant), transparent 40%, var(--cobalt-wash) 62%, transparent 86%), var(--bg);
}
.cloud-intro { display: flex; flex-direction: column; padding: 30px 30px 28px; }
.cloud-intro h3 { font-size: 24px; }
.cloud-parts {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px;
  background: var(--lead); border-left: 1px solid var(--lead);
}
.subcell { background: var(--bg); padding: 30px 26px 28px; }
.subcell .cell-top { margin-bottom: 22px; }
.subcell h4 { font-size: 17px; font-weight: 500; letter-spacing: -0.015em; }
.subcell p { font-size: 14.5px; }

/* Organizations: the sill. Its slanted tick and wash are amber (the overlap). */
.cell-org {
  grid-column: 1 / -1; min-height: 0; flex-direction: row; align-items: center; gap: 28px; padding: 26px 30px;
  background: linear-gradient(90deg, var(--amber-wash), transparent 60%), var(--bg);
}
.cell-org::after { display: none; }
.cell-org h3 { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.cell-org h3::before { content: ""; width: 10px; height: 10px; background: var(--amber); transform: skewX(-26.57deg); }
.cell-org p { margin: 0; flex: 1; }
.cell-org .more { margin: 0; padding: 0; }

@media (max-width: 1080px) {
  .cell-cloud { grid-template-columns: minmax(0, 1fr); }
  .cloud-parts { border-left: 0; border-top: 1px solid var(--lead); }
}
@media (max-width: 760px) {
  .window { grid-template-columns: minmax(0, 1fr); }
  .cell { min-height: 0; padding: 26px 22px 24px; }
  .cell-cloud { padding: 0; }
  .cloud-intro, .subcell { padding: 26px 22px 24px; }
  .cloud-parts { grid-template-columns: minmax(0, 1fr); }
  .cell-top { margin-bottom: 22px; }
  .cell-org { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* ── styles/steps.css ── */
/* How it works: three steps on a lead rule; step 3's marker is amber. */

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--lead-strong); }
.step { position: relative; min-width: 0; padding: 32px 32px 0 0; }
.step + .step { padding-left: 32px; border-left: 1px solid var(--lead); }
.step::before { content: ""; position: absolute; top: -1px; left: 0; width: 56px; height: 1px; background: var(--text); }
.step + .step::before { left: 32px; }
.step:last-child::before { background: var(--amber); }
.step-n { font: 500 12.5px/1 var(--font-mono); color: var(--text-3); letter-spacing: .04em; text-transform: uppercase; }
.step h3 { margin-top: 20px; font-size: 22px; font-weight: 500; letter-spacing: -0.022em; line-height: 1.2; }
.step p { margin-top: 10px; color: var(--text-2); font-size: 15.5px; text-wrap: pretty; }
.step pre {
  margin-top: 24px; padding: 14px 16px; border-radius: var(--r);
  background: var(--surface-1); border: 1px solid var(--lead);
  font-size: 12.5px; line-height: 1.75; color: var(--text-2);
}

@media (max-width: 760px) {
  .steps { grid-template-columns: minmax(0, 1fr); border-top: 0; }
  .step, .step + .step { padding: 28px 0 36px; border-left: 0; border-top: 1px solid var(--lead-strong); }
  .step + .step::before { left: 0; }
}

/* ── styles/code.css ── */
/* Code moment: copy + facts on the left, glass editor with CSS-only tabs on the right. */

.code-moment .wrap { display: grid; grid-template-columns: minmax(0, 4.4fr) minmax(0, 7fr); gap: 64px; align-items: center; }
.code-copy p { margin-top: 20px; font-size: 17.5px; color: var(--text-2); text-wrap: pretty; }
.facts { margin-top: 30px; border-top: 1px solid var(--lead); }
.facts li {
  display: grid; grid-template-columns: 124px 1fr; gap: 16px; padding: 13px 0;
  border-bottom: 1px solid var(--lead); font-size: 14.5px; color: var(--text-2);
}
.facts li span:first-child { font: 400 12.5px/1.7 var(--font-mono); color: var(--text-3); }

.editor-wrap { position: relative; min-width: 0; }
/* Light shaft behind the editor: cobalt, then a faint amber edge. */
.editor-wrap::before {
  content: ""; position: absolute; inset: -40px -60px; pointer-events: none;
  background: linear-gradient(var(--slant), transparent 34%, rgba(31, 68, 214, .22) 50%, rgba(245, 166, 35, .07) 62%, transparent 70%);
  -webkit-mask-image: radial-gradient(closest-side, #000 30%, transparent);
  mask-image: radial-gradient(closest-side, #000 30%, transparent);
}
.editor {
  position: relative;
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  border: 1px solid var(--lead-strong); border-radius: var(--r-lg);
  box-shadow: inset 0 1px 0 var(--edge-light), 0 40px 80px -30px rgba(0, 0, 0, .8);
  overflow: hidden;
}
.editor input { position: absolute; opacity: 0; pointer-events: none; }
.tabs { display: flex; gap: 2px; padding: 8px 8px 0; border-bottom: 1px solid var(--lead); }
.tabs label {
  padding: 10px 14px 11px; font: 500 13px/1 var(--font-mono); color: var(--text-3); cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .15s;
}
.tabs label:hover { color: var(--text); }
.tabs .hint { margin-left: auto; align-self: center; padding: 0 8px 4px; font: 400 12px/1 var(--font-mono); color: var(--text-3); }
/* Active tab: amber underline. */
#tab-send:checked ~ .tabs label[for="tab-send"],
#tab-event:checked ~ .tabs label[for="tab-event"] { color: var(--text); border-bottom-color: var(--amber); }
#tab-send:focus-visible ~ .tabs label[for="tab-send"],
#tab-event:focus-visible ~ .tabs label[for="tab-event"] { outline: 2px solid var(--amber); outline-offset: -2px; }
.tabpanel { display: none; }
#tab-send:checked ~ .panel-send, #tab-event:checked ~ .panel-event { display: block; }
.editor pre { padding: 22px 24px 24px; font-size: 13.5px; line-height: 1.75; color: var(--text-2); }
.editor .out { border-top: 1px solid var(--lead); background: rgba(9, 11, 17, .5); }
.editor .out pre { padding-top: 16px; padding-bottom: 18px; font-size: 12.5px; }

@media (max-width: 1080px) {
  .code-moment .wrap { grid-template-columns: minmax(0, 1fr); gap: 56px; }
}
@media (max-width: 760px) {
  .facts li { grid-template-columns: 108px 1fr; }
  .editor pre { padding: 18px 16px 20px; font-size: 12.5px; }
  .tabs label { padding: 10px 10px 11px; font-size: 12px; }
  .tabs .hint { display: none; }
}

/* ── styles/plans.css ── */
/* Plans: one card, no prices. Free on the left, the rules on the right. */

.plans-card {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 1px;
  border: 1px solid var(--lead-strong); border-radius: var(--r-lg); overflow: hidden;
  background: var(--lead);
}
.plan-free, .plan-notes { background: var(--surface-1); padding: 30px 34px; }
.plan-free { box-shadow: inset 0 1px 0 var(--edge-light); }
.plan-name { font: 500 13px/1 var(--font-mono); letter-spacing: .04em; text-transform: uppercase; color: var(--text-2); }
.plan-free p { margin-top: 18px; color: var(--text-2); font-size: 16.5px; max-width: 28em; text-wrap: pretty; }
.plan-notes {
  display: flex; flex-direction: column; justify-content: space-between; gap: 24px;
  background: linear-gradient(var(--slant), transparent 50%, var(--cobalt-wash) 74%, transparent 92%), var(--surface-1);
}
.plan-notes ul { display: grid; gap: 12px; }
.plan-notes li { display: flex; align-items: baseline; gap: 12px; font-size: 15.5px; color: var(--text-2); }
.plan-notes li::before { content: ""; flex: none; width: 4px; height: 4px; border-radius: 50%; background: var(--text-3); transform: translateY(-3px); }
.plan-notes .link { align-self: flex-start; font-size: 15px; }

@media (max-width: 760px) {
  .plans-card { grid-template-columns: minmax(0, 1fr); }
  .plan-free, .plan-notes { padding: 24px 22px; }
}

/* ── styles/docs-cta.css ── */
/* Docs CTA: surface card with a light shaft, glass list of docs entry points. */

.docs-card {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center;
  padding: 60px; border-radius: 20px; border: 1px solid var(--lead-strong);
  background: var(--surface-1);
  box-shadow: inset 0 1px 0 var(--edge-light);
}
/* Light shaft across the card: cobalt, then a thin amber one. */
.docs-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(var(--slant), transparent 58%, rgba(31, 68, 214, .30) 70%, rgba(31, 68, 214, .06) 82%, transparent 82.2%),
    linear-gradient(var(--slant), transparent 82%, rgba(245, 166, 35, .12) 82.2%, transparent 92%);
}
.docs-card > * { position: relative; }
.docs-card p { margin-top: 18px; color: var(--text-2); font-size: 17.5px; max-width: 30em; text-wrap: pretty; }
.docs-list {
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid var(--lead-strong); border-radius: var(--r);
  box-shadow: inset 0 1px 0 var(--edge-light);
}
.docs-list a { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; padding: 17px 20px; border-top: 1px solid var(--lead); transition: background-color .15s; }
.docs-list a:first-child { border-top: 0; }
.docs-list a:hover { background: rgba(232, 234, 240, .04); }
.docs-list strong { font-weight: 500; font-size: 15.5px; }
.docs-list .mono { font-size: 12.5px; color: var(--text-3); align-self: center; }
.docs-list .d { grid-column: 1 / -1; color: var(--text-2); font-size: 14px; }

@media (max-width: 1080px) {
  .docs-card { grid-template-columns: minmax(0, 1fr); padding: 44px; gap: 36px; }
}
@media (max-width: 760px) {
  .docs-card { padding: 30px 22px; border-radius: var(--r-lg); }
}

/* ── styles/footer.css ── */
/* Footer on the deeper plomo. */

.site-footer { border-top: 1px solid var(--lead); background: var(--bg-deep); padding: 72px 0 36px; }
.foot-grid { display: grid; grid-template-columns: 1.6fr repeat(3, minmax(0, 1fr)); gap: 40px; }
.foot-brand p { margin-top: 14px; color: var(--text-3); font-size: 14.5px; max-width: 22em; }
.foot-col h2 { margin: 12px 0 16px; font: 500 12px/1 var(--font-mono); letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); }
.foot-col a { display: block; padding: 5px 0; font-size: 14.5px; color: var(--text-2); }
.foot-col a:hover { color: var(--text); }
.foot-base {
  display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center;
  margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--lead);
  font-size: 13.5px; color: var(--text-3);
}
/* Text fallback of the logo: <v.> with the amber dot (DIRECTION.md, small sizes). */
.foot-base .fallback { font: 500 14px/1 var(--font-mono); color: var(--text); letter-spacing: -0.02em; }
.foot-base .fallback i { font-style: normal; color: var(--amber); }
.foot-base .lang-switch { padding: 6px 8px; margin: -6px -8px; }
.footer-github { width: auto; height: auto; gap: 8px; display: inline-flex; padding: 6px 8px; margin: -6px -8px; font-size: 13.5px; color: var(--text-2); }
.footer-github .gh-mark { width: 16px; height: 16px; }
.foot-base .sp { margin-left: auto; }

@media (max-width: 1080px) {
  .foot-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 24px; }
  .foot-base .sp { margin-left: 0; }
}

/* ── styles/not-found.css ── */
/* 404: both languages, one under the other. */

.not-found { padding: 112px 0 136px; }
.nf-block { margin-top: 32px; max-width: 34em; }
.nf-block + .nf-block { padding-top: 32px; border-top: 1px solid var(--lead); }
.nf-block h1 { margin-top: 0; font-size: clamp(36px, 4.4vw, 56px); }
.nf-title { font-size: 24px; font-weight: 500; letter-spacing: -0.02em; color: var(--text); }
.nf-block p { margin-top: 14px; font-size: 17px; color: var(--text-2); }
.nf-block .link { display: inline-flex; gap: 8px; margin-top: 18px; }
