/* LOGICS marketing site — shared styles
   Plain CSS, no build step. Colours live in :root. */

:root {
  --bg: #F6F5F1;
  --surface: #FFFFFF;
  --ink: #15171C;
  --ink-2: #4A4F59;
  --muted: #6B707A;
  --faint: #9A9EA6;
  --line: #E2E0D8;
  --line-2: #C9C6BC;
  --grid: #D5D2C8;
  --accent: #0B6E63;
  --accent-hover: #08564D;
  --accent-tint: #F1F6F4;
  --amber: #B4540A;
  --amber-line: #E8C9A8;
  --error: #A8480A;
  --dark: #15171C;
  --dark-line: #3A3D45;
  --dark-muted: #A9AEB8;
  --chip: #22252B;

  --sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --gutter: clamp(20px, 5.5vw, 80px);
  --max: 1440px;
  --radius: 16px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

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

h1, h2, h3, p, ul, ol, figure { margin: 0; }
[hidden] { display: none !important; } /* even on elements that set their own display */
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.mono { font-family: var(--mono); }
.muted { color: var(--ink-2); }
.accent { color: var(--accent); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px;
}
.skip-link:focus { top: 12px; color: #fff; }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(64px, 8vw, 112px); }
.section--white { background: var(--surface); border-top: 1px solid var(--line); }
.section--line { border-top: 1px solid var(--line); }
.section--dark { background: var(--dark); color: var(--bg); }
.stack { display: flex; flex-direction: column; }
.gap-s { gap: 12px; } .gap-m { gap: 20px; } .gap-l { gap: clamp(28px, 4vw, 56px); }

.grid { display: grid; gap: 20px; }
.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)); }
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1100px) {
  .grid-4, .grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Type ---------- */
.eyebrow {
  font-family: var(--mono); font-size: 13px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent);
}
.h1 { font-size: clamp(46px, 7vw, 88px); line-height: 1.0; letter-spacing: -0.035em; font-weight: 600; }
.h1--bench { font-size: clamp(46px, 6vw, 80px); }
.h2 { font-size: clamp(32px, 4.2vw, 56px); line-height: 1.06; letter-spacing: -0.03em; font-weight: 600; }
.h2--s { font-size: clamp(26px, 3vw, 40px); letter-spacing: -0.02em; }
.h3 { font-size: clamp(20px, 2vw, 22px); line-height: 1.3; font-weight: 600; }
.lead { font-size: clamp(17px, 1.4vw, 19px); line-height: 1.6; color: var(--ink-2); }
.tagline { font-size: clamp(22px, 2.2vw, 28px); line-height: 1.3; font-weight: 500; letter-spacing: -0.01em; }
.small { font-size: 14px; }

.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px 64px; flex-wrap: wrap; }
.section-head__title { display: flex; flex-direction: column; gap: 18px; max-width: 760px; }
.section-head__aside { max-width: 420px; display: flex; flex-direction: column; gap: 12px; }

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 14px 24px; border-radius: 10px;
  font: 600 16px/1.2 var(--sans); text-decoration: none; text-align: center;
  border: 1px solid transparent; cursor: pointer;
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-hover); color: #fff; }
.btn--outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--outline:hover { background: var(--ink); color: #fff; }
.btn--light { border-color: var(--bg); color: var(--bg); background: transparent; }
.btn--light:hover { background: var(--bg); color: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 520px) { .btn-row .btn { flex: 1 1 100%; } }

.link-arrow { font-weight: 600; text-decoration: none; padding: 10px 0; display: inline-block; }
.link-arrow--ink { color: var(--ink); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 245, 241, 0.94);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner { height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand__word { font-family: var(--mono); font-weight: 600; font-size: 20px; letter-spacing: 0.1em; }

.nav { display: flex; align-items: center; gap: 24px; font-size: 15px; font-weight: 500; }
/* ---- the Tools menu ----
   A <details>, so it opens with a click or the keyboard and needs no script.
   On the landing page main.js makes the first click go to the four benches
   (#tools) and the next open the menu; it closes it on Escape, an outside
   click and a choice. */
.nav__dd { position: relative; }
.nav__dd > summary {
  list-style: none; cursor: pointer; padding: 8px 0;
  display: inline-flex; align-items: center; gap: 7px;
}
.nav__dd > summary::-webkit-details-marker { display: none; }
.nav__dd > summary::after {
  content: ""; width: 7px; height: 7px; border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor; transform: translateY(-2px) rotate(45deg);
  transition: transform .15s ease;
}
.nav__dd[open] > summary::after { transform: translateY(1px) rotate(-135deg); }
.nav__dd > summary:hover, .nav__dd[open] > summary { color: var(--accent); }
.nav__menu {
  position: absolute; top: calc(100% + 12px); left: -18px; z-index: 30;
  min-width: 310px; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 8px; box-shadow: 0 18px 40px -22px rgba(21, 23, 28, .45);
}
.nav__menu a { padding: 11px 14px; border-radius: 9px; display: flex; flex-direction: column; gap: 3px; }
.nav__menu a:hover { background: var(--accent-tint); }
.nav__menu a[aria-current="page"] { background: var(--accent-tint); box-shadow: none; }
.nav__menu-name { font-weight: 600; }
.nav__menu-note { font-size: 13px; font-weight: 400; color: var(--muted); line-height: 1.4; }
@media (prefers-reduced-motion: reduce) { .nav__dd > summary::after { transition: none; } }
.nav a { color: var(--ink); text-decoration: none; padding: 8px 0; }
.nav a:hover { color: var(--accent); }
.nav a[aria-current="page"] { color: var(--accent); font-weight: 600; box-shadow: inset 0 -2px 0 var(--accent); }
.nav .nav__signin { border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 18px; }
.nav-toggle {
  display: none; width: 44px; height: 44px; border: 0; background: transparent;
  align-items: center; justify-content: center; cursor: pointer; color: var(--ink);
}
@media (max-width: 1100px) {
  .site-header__inner { height: 64px; }
  .nav-toggle { display: inline-flex; }
  .nav {
    position: absolute; left: 0; right: 0; top: 64px;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 20px;
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav a[aria-current="page"] { box-shadow: none; }
  /* stacked: the menu expands in place rather than floating over the page */
  .nav__dd > summary { padding: 14px 0; border-bottom: 1px solid var(--line); justify-content: space-between; }
  .nav__menu {
    position: static; min-width: 0; border: 0; border-radius: 0; box-shadow: none;
    background: transparent; padding: 4px 0 4px 14px;
  }
  .nav__menu a { border-bottom: 0; padding: 10px 0; }
  .nav .nav__signin { margin-top: 14px; text-align: center; border-bottom: 1px solid var(--line-2); }
}

/* the account in the header: a Sign in link, or the profile icon (account.js) */
@media (max-width: 1100px) {
  .nav__account { display: flex; flex-direction: column; align-items: flex-start; padding-top: 14px; }
  .nav__account .lgx-acct__menu { left: 0; right: auto; transform-origin: top left; }
}

/* ---------- Sign in / create account ---------- */
.auth-page { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); background: var(--bg); }
.auth-side {
  position: relative; overflow: hidden; isolation: isolate;
  background: radial-gradient(120% 90% at 0% 0%, #1F3B36 0%, var(--dark) 55%) var(--dark);
  color: var(--bg); padding: clamp(28px, 4vw, 56px);
  display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
}
.auth-side::after {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .35;
  background-image: radial-gradient(circle at 1px 1px, rgba(246, 245, 241, .14) 1px, transparent 0);
  background-size: 22px 22px;
}
.auth-side .brand { color: var(--bg); }
.auth-side .brand:hover { color: #fff; }
.auth-side__copy { display: flex; flex-direction: column; gap: 18px; max-width: 520px; }
.auth-side__title { font-size: clamp(32px, 3.6vw, 48px); line-height: 1.05; letter-spacing: -0.03em; font-weight: 600; }
.auth-side__lead { color: var(--dark-muted); font-size: 17px; }
.auth-side__points { display: grid; gap: 12px; margin-top: 6px; }
.auth-side__points li { display: flex; gap: 12px; align-items: flex-start; color: #E9E7E1; }
.auth-side__points svg { flex: 0 0 auto; margin-top: 3px; color: #5CC3B2; }
.auth-side__foot { color: var(--dark-muted); font-size: 13px; }
.auth-art { width: min(100%, 460px); height: auto; }
.auth-art .cell { fill: rgba(246, 245, 241, .05); stroke: rgba(246, 245, 241, .16); }
.auth-art .one { fill: rgba(92, 195, 178, .18); stroke: #5CC3B2; }
.auth-art text { fill: #E9E7E1; font: 600 15px var(--mono); }
.auth-art .dim { fill: var(--dark-muted); font-size: 11px; font-weight: 500; }
.auth-art .loop { fill: none; stroke: #5CC3B2; stroke-width: 2; stroke-dasharray: 6 5; animation: loop-march 3s linear infinite; }
.auth-art .loop2 { stroke: #E0A94A; animation-duration: 4s; }
@keyframes loop-march { to { stroke-dashoffset: -44; } }

.auth-main { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; padding: clamp(24px, 5vw, 64px); }
.auth__card {
  width: min(100%, 440px); display: flex; flex-direction: column; gap: 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  padding: clamp(26px, 4vw, 40px); box-shadow: 0 30px 60px -40px rgba(21, 23, 28, .35);
  animation: rise .55s cubic-bezier(.2, .7, .2, 1) both;
}
.auth__card .h2 { margin-top: -6px; }
.auth__switch { font-size: 15px; color: var(--ink-2); }
.auth__form, .auth__done { display: flex; flex-direction: column; gap: 16px; }
.auth__form[hidden], .auth__done[hidden], .auth__error[hidden] { display: none; }
.form-field { display: flex; flex-direction: column; gap: 7px; font-size: 14px; font-weight: 600; }
.form-field__hint { font-size: 13px; font-weight: 400; color: var(--muted); }
.form-field__row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.form-field__control { position: relative; display: flex; align-items: center; }
.form-field__control > svg { position: absolute; left: 14px; color: var(--muted); pointer-events: none; transition: color .2s ease; }
.form-field input {
  width: 100%; font: 400 16px/1.3 var(--sans); color: var(--ink); background: var(--bg);
  border: 1px solid var(--line-2); border-radius: 12px; padding: 13px 14px 13px 44px;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.form-field input:hover { border-color: #B5B1A5; }
.form-field input:focus { outline: none; background: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 4px rgba(11, 110, 99, .14); }
.form-field__control:focus-within > svg { color: var(--accent); }
.form-field__peek {
  position: absolute; right: 6px; border: 0; background: transparent; cursor: pointer; color: var(--muted);
  font: 600 12px var(--sans); padding: 8px 10px; border-radius: 8px;
}
.form-field__peek:hover { color: var(--ink); background: rgba(21, 23, 28, .05); }
.form-field__peek:focus-visible { outline: 3px solid var(--accent); outline-offset: 0; }
.meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-top: 2px; }
.meter span { height: 4px; border-radius: 4px; background: var(--line); transition: background .25s ease; }
.meter[data-score="1"] span:nth-child(-n+1) { background: #C4553B; }
.meter[data-score="2"] span:nth-child(-n+2) { background: #D39A2E; }
.meter[data-score="3"] span:nth-child(-n+3) { background: #5C9E5C; }
.meter[data-score="4"] span { background: var(--accent); }
.meter__label { font-size: 12.5px; font-weight: 400; color: var(--muted); min-height: 1em; }
.auth__form .btn, .auth__done .btn { width: 100%; margin-top: 2px; }
.btn[disabled] { opacity: .65; cursor: progress; }
.auth__error {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 14px; color: var(--error); background: #FBF0E8;
  border: 1px solid var(--amber-line); border-radius: 12px; padding: 11px 14px;
  animation: shake .4s ease;
}
@keyframes shake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }
.auth__fine { font-size: 13px; color: var(--muted); text-align: center; }
.auth__back { font-size: 14px; color: var(--ink-2); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.auth__back:hover { color: var(--accent); }
@media (max-width: 900px) {
  .auth-page { grid-template-columns: minmax(0, 1fr); }
  .auth-side { gap: 18px; padding-bottom: 28px; }
  .auth-art, .auth-side__points, .auth-side__foot { display: none; }
  .auth-side__title { font-size: 28px; }
}

/* ---------- Signed-in pages: dashboard, project, profile ---------- */
.app-body { background: var(--bg); min-height: 100vh; }
.app-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 245, 241, 0.92); backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--line);
}
.app-header__inner { height: 68px; display: flex; align-items: center; gap: 18px; }
.app-nav { display: flex; gap: 4px; }
.app-nav a {
  padding: 8px 13px; border-radius: 10px; color: var(--ink-2); text-decoration: none;
  font-weight: 500; font-size: 15px; transition: background .15s ease, color .15s ease;
}
.app-nav a:hover { background: rgba(21, 23, 28, .05); color: var(--ink); }
.app-nav a[aria-current="page"] { color: var(--ink); background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.app-header__right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
@media (max-width: 720px) { .app-nav { display: none; } }

.app-main { padding-block: clamp(28px, 4vw, 48px) 96px; display: flex; flex-direction: column; gap: 28px; }
.app-title { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.08; letter-spacing: -0.03em; font-weight: 600; }
.app-sub { color: var(--ink-2); font-size: 17px; }
.crumbs { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--muted); flex-wrap: wrap; }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }

.hello { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px 32px; flex-wrap: wrap; }
.hello__text { display: flex; flex-direction: column; gap: 10px; }
.hello__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.badge {
  display: inline-flex; align-items: center; gap: 6px; font: 600 11px/1 var(--mono); letter-spacing: .06em;
  text-transform: uppercase; border-radius: 999px; padding: 6px 10px;
  color: var(--accent); background: rgba(11, 110, 99, .1);
}
.badge--muted { color: var(--ink-2); background: rgba(21, 23, 28, .06); }
.badge--amber { color: var(--amber); background: rgba(180, 84, 10, .1); }

.dash { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.dash__main, .dash__side { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
@media (max-width: 1080px) { .dash { grid-template-columns: minmax(0, 1fr); } }

.tile {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(20px, 2.4vw, 28px); display: flex; flex-direction: column; gap: 16px; min-width: 0;
}
.tile__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.tile__title { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.tile__meta { font-size: 13.5px; color: var(--muted); }
.tile--guide { background: linear-gradient(135deg, #0E5F56 0%, #0B6E63 55%, #13867A 100%); color: #fff; border: 0; position: relative; overflow: hidden; }
.tile--guide .tile__meta { color: rgba(255, 255, 255, .78); }
.tile--guide::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .16), transparent 70%);
}
.guide-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; position: relative; z-index: 1; }
@media (max-width: 860px) { .guide-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .guide-steps { grid-template-columns: minmax(0, 1fr); } }
.guide-step {
  display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 14px; color: #fff; text-decoration: none;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18);
  transition: background .2s ease, transform .2s ease;
}
.guide-step:hover { background: rgba(255, 255, 255, .18); color: #fff; transform: translateY(-2px); }
.guide-step__n { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font: 600 12px var(--mono); background: rgba(255, 255, 255, .2); }
.guide-step.is-done .guide-step__n { background: #fff; color: var(--accent); }
.guide-step__t { font-weight: 600; }
.guide-step__d { font-size: 13.5px; color: rgba(255, 255, 255, .8); line-height: 1.45; }
.guide__right { display: flex; align-items: center; gap: 8px; position: relative; z-index: 1; }
.guide__close {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 0; cursor: pointer;
  color: #fff; background: rgba(255, 255, 255, .14); transition: background .2s ease;
}
.guide__close:hover { background: rgba(255, 255, 255, .28); }
.guide__close:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.tile--guide.is-leaving { animation: guide-out .35s ease both; }
@keyframes guide-out { to { opacity: 0; transform: translateY(-8px) scale(.99); } }
/* Learn and Plans: an intro above the landing page's own sections */
.app-main--intro { padding-bottom: 8px; }
.jump { display: flex; gap: 8px; flex-wrap: wrap; }
.jump a {
  padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line);
  color: var(--ink-2); text-decoration: none; font-size: 14.5px; transition: border-color .2s ease, color .2s ease;
}
.jump a:hover { border-color: var(--accent); color: var(--accent); }
.next-steps { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px 48px; flex-wrap: wrap; }
.plan-now { max-width: 760px; }
#tools, #sample, #audience, #pipeline, #pricing { scroll-margin-top: 72px; }
.progressbar { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .2); overflow: hidden; position: relative; z-index: 1; }
.progressbar span { display: block; height: 100%; background: #fff; border-radius: 6px; transition: width .6s cubic-bezier(.2, .7, .2, 1); }

.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.proj-card {
  position: relative; display: flex; flex-direction: column; gap: 12px; min-height: 172px;
  padding: 20px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line);
  color: var(--ink); text-decoration: none;
  transition: transform .22s cubic-bezier(.2, .7, .2, 1), box-shadow .22s ease, border-color .22s ease;
}
.proj-card:hover { transform: translateY(-3px); border-color: var(--line-2); box-shadow: 0 18px 36px -24px rgba(21, 23, 28, .35); color: var(--ink); }
.proj-card__icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; }
.proj-card__name { font-weight: 600; font-size: 16.5px; line-height: 1.3; }
.proj-card__desc { font-size: 14px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.proj-card__foot { margin-top: auto; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 12px; font-size: 12.5px; color: var(--muted); }
.proj-card--new {
  align-items: center; justify-content: center; text-align: center; border-style: dashed; border-width: 1.5px;
  background: transparent; cursor: pointer; font: inherit; color: var(--ink-2);
}
.proj-card--new:hover { background: var(--surface); color: var(--accent); }
.proj-card--new .proj-card__icon { background: rgba(11, 110, 99, .1); color: var(--accent); }
.counts { display: flex; gap: 6px; flex-wrap: wrap; }
.count {
  display: inline-flex; align-items: center; gap: 5px; font: 500 12px var(--mono); color: var(--ink-2);
  background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 3px 8px;
}
.count svg { color: var(--accent); }
.count.is-zero { opacity: .5; }

.work { display: flex; flex-direction: column; }
.work__row {
  display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 14px; align-items: center;
  padding: 11px 8px; border-radius: 12px; color: var(--ink); text-decoration: none; transition: background .15s ease;
}
.work__row + .work__row { border-top: 1px solid var(--line); }
.work__row:hover { background: var(--bg); color: var(--ink); }
.work__ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: rgba(11, 110, 99, .09); color: var(--accent); }
.work__name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.work__sub { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.work__when { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.empty { padding: 20px; border: 1.5px dashed var(--line-2); border-radius: 14px; color: var(--ink-2); font-size: 14.5px; text-align: center; }

.bench-list { display: flex; flex-direction: column; gap: 10px; }
.bench-link {
  display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 14px; border: 1px solid var(--line);
  color: var(--ink); text-decoration: none; transition: border-color .2s ease, transform .2s ease, background .2s ease;
}
.bench-link:hover { border-color: var(--accent); transform: translateX(3px); color: var(--ink); background: rgba(11, 110, 99, .03); }
.bench-link__ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--dark); color: #5CC3B2; flex: 0 0 auto; }
.bench-link__t { font-weight: 600; font-size: 15px; }
.bench-link__d { font-size: 13px; color: var(--muted); }
.bench-link__go { margin-left: auto; color: var(--muted); transition: transform .2s ease, color .2s ease; }
.bench-link:hover .bench-link__go { color: var(--accent); transform: translateX(3px); }

.plan-tile { gap: 12px; }
.plan-tile__limits { display: grid; gap: 8px; font-size: 14px; color: var(--ink-2); }
.plan-tile__limits li { display: flex; justify-content: space-between; gap: 12px; }
.plan-tile__limits b { color: var(--ink); font-weight: 600; }
.learn { display: grid; gap: 4px; }
.learn a { display: flex; justify-content: space-between; padding: 9px 4px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-size: 14.5px; }
.learn a:hover { color: var(--accent); }

/* the project page */
.proj-head { display: flex; gap: 20px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.proj-head__text { display: flex; flex-direction: column; gap: 10px; max-width: 760px; }
.proj-head__text > .badge { align-self: flex-start; }
.proj-head__meta { display: flex; gap: 8px 18px; flex-wrap: wrap; font-size: 13.5px; color: var(--muted); }
.proj-benches { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 860px) { .proj-benches { grid-template-columns: minmax(0, 1fr); } }
.pb__head { display: flex; gap: 12px; align-items: center; }
.pb__head .bench-link__ic { width: 44px; height: 44px; }
.pb__name { font-weight: 600; font-size: 17px; }
.pb__desc { font-size: 13.5px; color: var(--muted); }
.pb__items { display: flex; flex-direction: column; gap: 2px; }
.pb__item {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px;
  color: var(--ink); text-decoration: none; font-size: 14.5px; transition: background .15s ease;
}
.pb__item:hover { background: var(--bg); color: var(--ink); }
.pb__item span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.pb__item span:last-child { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.pb__actions { display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap; }
.pb__guide { font-size: 14px; color: var(--ink-2); text-decoration: none; }
.pb__guide:hover { color: var(--accent); }
.tip { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; background: rgba(11, 110, 99, .07); color: var(--ink-2); font-size: 14.5px; }
.tip svg { color: var(--accent); flex: 0 0 auto; margin-top: 2px; }

/* the profile page */
.profile-hero { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.profile-hero .lgx-av { box-shadow: 0 0 0 5px var(--surface), 0 0 0 6px var(--line); }
.profile-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; align-items: start; }
@media (max-width: 900px) { .profile-grid { grid-template-columns: minmax(0, 1fr); } .profile-toc { display: none; } }
.profile-toc { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 2px; }
.profile-toc a { padding: 8px 12px; border-radius: 9px; color: var(--ink-2); text-decoration: none; font-size: 14.5px; transition: background .15s ease, color .15s ease; }
.profile-toc a:hover { background: var(--surface); color: var(--ink); }
.profile-toc a.is-here { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line); }
.profile-sections { display: flex; flex-direction: column; gap: 20px; }
.profile-sections > .tile { scroll-margin-top: 90px; }
.kv { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 12px 20px; font-size: 14.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 560px) { .kv { grid-template-columns: minmax(0, 1fr); gap: 2px 0; } .kv dd { margin-bottom: 10px; } }
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.inline-form .form-field { flex: 1 1 220px; }
.inline-form .form-field input { padding-left: 14px; }
.stack-form { display: grid; gap: 14px; max-width: 460px; }
.stack-form .form-field input { padding-left: 14px; }
.usage { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.usage__cell { padding: 14px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.usage__k { font: 600 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.usage__v { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }
.usage__n { font-size: 12.5px; color: var(--muted); }
.meterbar { height: 8px; border-radius: 8px; background: var(--line); overflow: hidden; }
.meterbar span { display: block; height: 100%; background: var(--accent); border-radius: 8px; transition: width .6s cubic-bezier(.2, .7, .2, 1); }
.sessions { display: flex; flex-direction: column; }
.session { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 0; }
.session + .session { border-top: 1px solid var(--line); }
.session__ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--bg); border: 1px solid var(--line); color: var(--ink-2); }
.session__t { font-weight: 600; }
.session__d { font-size: 13px; color: var(--muted); }
.stored { display: grid; gap: 10px; font-size: 14.5px; }
.stored li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; color: var(--ink-2); }
.stored svg { color: var(--accent); margin-top: 3px; }
.stored b { color: var(--ink); font-weight: 600; }
.tile--danger { border-color: #E8C6BF; }
.tile--danger .tile__title { color: #A3352A; }
.btn--danger { background: #A3352A; color: #fff; }
.btn--danger:hover { background: #86291F; color: #fff; }
.btn--small { min-height: 38px; padding: 9px 16px; font-size: 14.5px; border-radius: 9px; }
.btn--ghost { background: transparent; border-color: var(--line-2); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); color: var(--ink); background: transparent; }
.note { font-size: 13.5px; color: var(--muted); }
.note.is-ok { color: var(--accent); }
.note.is-bad { color: #A3352A; }

/* dialogs */
.modal { border: 0; padding: 0; border-radius: 20px; width: min(480px, calc(100vw - 32px)); background: var(--surface); color: var(--ink); box-shadow: 0 40px 80px -30px rgba(21, 23, 28, .5); }
.modal::backdrop { background: rgba(21, 23, 28, .42); backdrop-filter: blur(3px); }
.modal[open] { animation: pop .28s cubic-bezier(.2, .7, .2, 1) both; }
.modal[open]::backdrop { animation: fade .28s ease both; }
.modal__body { padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.modal__body .form-field input, .modal__body .form-field textarea { padding-left: 14px; }
.modal__actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.form-field textarea {
  width: 100%; font: 400 15px/1.5 var(--sans); color: var(--ink); background: var(--bg); resize: vertical; min-height: 84px;
  border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 14px; transition: border-color .2s ease, box-shadow .2s ease;
}
.form-field textarea:focus { outline: none; background: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 4px rgba(11, 110, 99, .14); }
.skeleton { border-radius: 12px; background: linear-gradient(90deg, var(--line) 0%, #EEEBE3 50%, var(--line) 100%); background-size: 200% 100%; animation: shimmer 1.3s ease infinite; min-height: 64px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Welcome: the tour a new account gets once ---------- */
.welcome-top { border-bottom: 1px solid var(--line); }
.welcome-top__inner { height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.welcome-skip { color: var(--ink-2); text-decoration: none; font-size: 15px; font-weight: 500; }
.welcome-skip:hover { color: var(--accent); }
.welcome { display: grid; place-items: center; padding-block: clamp(28px, 6vw, 72px) 80px; }
.welcome-card {
  width: min(100%, 620px); display: flex; flex-direction: column; gap: 22px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 22px;
  padding: clamp(24px, 4vw, 44px); box-shadow: 0 30px 60px -40px rgba(21, 23, 28, .35);
  animation: rise .55s cubic-bezier(.2, .7, .2, 1) both;
}
.welcome-card__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.welcome-dots { display: flex; gap: 6px; }
.welcome-dots span { width: 28px; height: 5px; border-radius: 5px; background: var(--line); transition: background .3s ease; }
.welcome-dots span.on { background: var(--accent); }
.welcome-card:not(.is-touring) .welcome-dots { display: none; }
.welcome-step { display: flex; flex-direction: column; gap: 14px; }
.welcome-card:not(.is-touring) .welcome-step + .welcome-step { border-top: 1px solid var(--line); padding-top: 22px; }
.welcome-card.is-touring .welcome-step:not([hidden]) { animation: step-in .38s cubic-bezier(.2, .7, .2, 1) both; }
.welcome-card.is-touring .welcome-step.from-left:not([hidden]) { animation-name: step-back; }
@keyframes step-in { from { opacity: 0; transform: translateX(18px); } }
@keyframes step-back { from { opacity: 0; transform: translateX(-18px); } }
.welcome-art { display: flex; gap: 10px; }
.welcome-art > span, .welcome-art--project, .welcome-art--quick {
  display: grid; place-items: center; border-radius: 14px; background: var(--dark); color: #5CC3B2;
}
.welcome-art > span { width: 52px; height: 52px; }
.welcome-art--project, .welcome-art--quick { width: 68px; height: 68px; border-radius: 18px; }
.welcome-art--project { background: rgba(11, 110, 99, .1); color: var(--accent); }
.welcome-title { font-size: clamp(26px, 3.2vw, 34px); line-height: 1.12; letter-spacing: -0.025em; font-weight: 600; outline: none; }
.welcome-lead { color: var(--ink-2); font-size: 16.5px; line-height: 1.6; }
.welcome-list { display: grid; gap: 10px; }
.welcome-list li { position: relative; padding-left: 22px; color: var(--ink-2); line-height: 1.55; }
.welcome-list li::before { content: ""; position: absolute; left: 4px; top: .62em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.welcome-list b, .welcome-steps b { color: var(--ink); font-weight: 600; }
.welcome-steps { counter-reset: w; display: grid; gap: 10px; }
.welcome-steps li {
  counter-increment: w; position: relative; padding: 12px 14px 12px 50px; border-radius: 12px;
  background: var(--bg); border: 1px solid var(--line); color: var(--ink-2); line-height: 1.55;
}
.welcome-steps li::before {
  content: counter(w); position: absolute; left: 14px; top: 12px; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; font: 600 12px var(--mono); color: #fff; background: var(--accent);
}
.welcome-steps code { font: 500 .9em var(--mono); background: rgba(21, 23, 28, .06); border-radius: 6px; padding: 1px 6px; color: var(--ink); }
.welcome-note { font-size: 14.5px; color: var(--muted); }
.welcome-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 6px; border-top: 1px solid var(--line); }
.welcome-nav .btn { min-width: 108px; }
.welcome-count { font: 500 13px var(--mono); color: var(--muted); }
[data-nojs-go] { align-self: flex-start; }

/* ---------- Learn: the documentation ---------- */
.docs { display: grid; grid-template-columns: 268px minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); align-items: start; padding-block: clamp(24px, 3vw, 40px) 96px; }
.docs-nav { position: sticky; top: 84px; max-height: calc(100vh - 100px); display: flex; flex-direction: column; gap: 12px; }
.docs-filter { position: relative; display: flex; align-items: center; }
.docs-filter svg { position: absolute; left: 12px; color: var(--muted); pointer-events: none; }
.docs-filter input {
  width: 100%; font: 400 14.5px var(--sans); color: var(--ink); background: var(--surface);
  padding: 10px 12px 10px 36px; border-radius: 10px; border: 1px solid var(--line-2);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.docs-filter input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(11, 110, 99, .14); }
.docs-nav__toggle { display: none; }
.docs-nav__list { overflow: auto; padding-right: 6px; overscroll-behavior: contain; }
.docs-nav__group { margin-bottom: 4px; }
.docs-nav__group > summary {
  list-style: none; display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 9px;
  cursor: pointer; font-weight: 600; font-size: 14.5px; color: var(--ink); transition: background .15s ease;
}
.docs-nav__group > summary::-webkit-details-marker { display: none; }
.docs-nav__group > summary svg { color: var(--accent); flex: 0 0 auto; }
.docs-nav__group > summary::after {
  content: ""; margin-left: auto; width: 6px; height: 6px; opacity: .55;
  border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor;
  transform: rotate(-45deg); transition: transform .18s ease;
}
.docs-nav__group[open] > summary::after { transform: rotate(45deg); }
.docs-nav__group > summary:hover { background: rgba(21, 23, 28, .045); }
.docs-nav__links { display: flex; flex-direction: column; margin: 2px 0 10px 17px; padding-left: 9px; border-left: 1px solid var(--line); }
.docs-nav__links a {
  position: relative; padding: 6px 10px; border-radius: 8px; color: var(--ink-2); text-decoration: none;
  font-size: 14px; line-height: 1.35; transition: background .15s ease, color .15s ease;
}
.docs-nav__links a:hover { background: var(--surface); color: var(--ink); }
.docs-nav__links a.is-here { color: var(--accent); background: var(--surface); font-weight: 600; }
.docs-nav__links a.is-here::before { content: ""; position: absolute; left: -10px; top: 6px; bottom: 6px; width: 2px; border-radius: 2px; background: var(--accent); }
.docs-nav__top { font-weight: 500; }
.docs-nav__none { color: var(--muted); font-size: 14px; padding: 8px 10px; }

.docs-body { min-width: 0; max-width: 820px; }
.docs-head { display: flex; flex-direction: column; gap: 10px; padding-bottom: 8px; }
.doc { padding-block: 28px; border-top: 1px solid var(--line); scroll-margin-top: 80px; }
.docs-head + .doc { border-top: 0; }
.doc > * + * { margin-top: 14px; }
.doc h2 { font-size: clamp(26px, 2.6vw, 34px); line-height: 1.15; letter-spacing: -0.02em; font-weight: 600; }
.doc h3 { font-size: 21px; line-height: 1.3; letter-spacing: -0.01em; font-weight: 600; }
.doc p, .doc li { color: var(--ink-2); font-size: 16px; line-height: 1.65; }
.doc ul { list-style: disc; padding-left: 22px; }
.doc ul > li::marker { color: var(--accent); }
.doc li + li { margin-top: 6px; }
.doc b { color: var(--ink); font-weight: 600; }
.doc code { font: 500 .88em var(--mono); color: var(--ink); background: rgba(21, 23, 28, .06); border-radius: 6px; padding: 1px 6px; white-space: nowrap; }
kbd {
  display: inline-block; font: 600 12px/1.2 var(--mono); color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 6px; padding: 2px 7px; white-space: nowrap;
}
.doc--bench { padding-top: 44px; }
.doc-kicker { display: inline-flex; align-items: center; gap: 8px; font: 600 11.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.doc-kicker + h2 { margin-top: 8px; }
.doc-open { margin-top: 18px; }
.doc-steps { counter-reset: step; list-style: none; padding: 0; display: grid; gap: 10px; }
.doc-steps > li { counter-increment: step; position: relative; margin: 0; padding: 12px 16px 12px 52px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.doc-steps > li::before {
  content: counter(step); position: absolute; left: 15px; top: 13px; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; font: 600 12px var(--mono); color: #fff; background: var(--accent);
}
.doc-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14.5px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.doc-table th { text-align: left; font: 600 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--bg); padding: 10px 14px; border-bottom: 1px solid var(--line); }
.doc-table td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--ink-2); line-height: 1.5; }
.doc-table tr:last-child td { border-bottom: 0; }
.doc-table td:first-child { color: var(--ink); font-weight: 500; }
.callout { padding: 14px 16px; border-radius: 12px; border: 1px solid; font-size: 15px !important; }
.callout--tip { background: rgba(11, 110, 99, .07); border-color: rgba(11, 110, 99, .22); }
.callout--note { background: rgba(53, 85, 138, .06); border-color: rgba(53, 85, 138, .2); }
.callout--pro { background: rgba(180, 84, 10, .06); border-color: rgba(180, 84, 10, .24); }
.doc-quote { margin: 0; padding: 14px 18px; border-left: 3px solid var(--accent); background: var(--surface); border-radius: 0 12px 12px 0; color: var(--ink); font-size: 16px; line-height: 1.6; }
.bench-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.bench-tile {
  display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: 14px; background: var(--surface);
  border: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: border-color .2s ease, transform .2s ease;
}
.bench-tile:hover { border-color: var(--accent); transform: translateY(-2px); color: var(--ink); }
.bench-tile > span:last-child { color: var(--ink-2); font-size: 14.5px; line-height: 1.5; }
.bench-tile__ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--dark); color: #5CC3B2; margin-bottom: 4px; }
.gate-grid { display: grid; gap: 12px; }
.gate-card {
  display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 20px; align-items: center;
  padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; scroll-margin-top: 84px;
}
.gate-card__sym { width: 120px; height: 60px; color: var(--ink); }
.doc .gate-card__name { font-size: 17px; }
.gate-card__body > * + * { margin-top: 5px; }
.doc .gate-card p { font-size: 14.5px; line-height: 1.55; }
.doc .gate-card__chip { font-size: 13px; color: var(--muted); }
.tt-mini { border-collapse: collapse; font: 500 13px var(--mono); }
.tt-mini th, .tt-mini td { padding: 3px 10px; text-align: center; border-bottom: 1px solid var(--line); }
.tt-mini tr:last-child td { border-bottom: 0; }
.tt-mini th { color: var(--muted); font-weight: 600; }
.tt-mini td { color: var(--ink-2); }
.tt-mini td.on { color: var(--accent); font-weight: 700; }
.faq { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 0 16px; }
.doc .faq + .faq { margin-top: 8px; }
.faq > summary { cursor: pointer; padding: 13px 0; font-weight: 600; color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq > summary::-webkit-details-marker { display: none; }
.faq > summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 20px; line-height: 1; transition: transform .2s ease; }
.faq[open] > summary::after { transform: rotate(45deg); }
.faq > p { padding-bottom: 14px; }
@media (max-width: 960px) {
  .docs { grid-template-columns: minmax(0, 1fr); }
  .docs-nav { position: static; max-height: none; }
  .docs-nav__toggle {
    display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 11px 14px; border-radius: 10px;
    border: 1px solid var(--line-2); background: var(--surface); font: 600 15px var(--sans); color: var(--ink); cursor: pointer;
  }
  .docs-nav__toggle::after { content: "▾"; color: var(--muted); }
  .docs-nav__list { display: none; }
  .docs-nav.is-open .docs-nav__list { display: block; max-height: 60vh; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 8px; }
  .bench-grid { grid-template-columns: minmax(0, 1fr); }
  .doc-table { display: block; overflow-x: auto; }
}
@media (max-width: 640px) {
  .gate-card { grid-template-columns: 90px minmax(0, 1fr); }
  .gate-card__sym { width: 90px; height: 45px; }
  .gate-card .tt-mini { grid-column: 1 / -1; }
}

/* ---------- Motion ---------- */
/* Moving between pages: the header holds still while the page under it
   crossfades and settles (cross-document view transitions, where the
   browser has them; elsewhere pages simply appear). */
@view-transition { navigation: auto; }
.site-header, .app-header { view-transition-name: page-header; }
/* the logo glides from the header to the sign-in panel and back */
.site-header .brand, .app-header .brand, .auth-side .brand { view-transition-name: brand; }
.auth__card { view-transition-name: auth-card; }
::view-transition-old(root) { animation: vt-out .2s ease both; }
::view-transition-new(root) { animation: vt-in .38s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-8px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(12px); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.97); } }
@keyframes fade { from { opacity: 0; } }
.reveal { animation: rise .5s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i, 0) * 70ms); }
/* the Tools menu eases in, and buttons and links change colour rather than snapping;
   only things you can click move under the pointer */
.nav__dd[open] .nav__menu { animation: pop .2s cubic-bezier(.2, .7, .2, 1) both; transform-origin: top left; }
.btn, .nav a, .nav__dd > summary, .link-arrow, .nav__menu a, .seg label { transition: background .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .15s ease; }
.btn:active { transform: translateY(1px); }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- Cards & chips ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 2.4vw, 32px); display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.card > .tag, .card > .link-arrow { align-self: flex-start; }
.card--sand { background: var(--bg); }
.card--accent { border: 2px solid var(--accent); }
.card--warn { border-color: var(--amber-line); }

.pill {
  display: inline-flex; align-items: center; gap: 10px; align-self: flex-start;
  font-family: var(--mono); font-size: 13px; color: var(--ink-2);
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px;
}
.pill__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.tag {
  display: inline-flex; align-items: center; font-family: var(--mono); font-size: 12px; color: var(--ink-2);
  border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; background: var(--surface);
}
.tag--seed { border-style: dashed; border-color: var(--line-2); }
.tag--dark { background: var(--ink); color: var(--bg); border-color: var(--ink); font-weight: 600; letter-spacing: 0.06em; }
.tag--solid { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600; border-radius: 999px; }
.tag--error { background: var(--error); color: #fff; border-color: var(--error); font-weight: 600; border-radius: 999px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }

.panel { background: var(--bg); border-radius: 10px; padding: 14px 16px; }
.card--sand .panel { background: var(--surface); border: 1px solid var(--line); }

.bullets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; }
.bullets li { display: flex; gap: 10px; align-items: baseline; }
.bullets li::before { content: ""; width: 8px; height: 8px; flex-shrink: 0; border-radius: 2px; background: var(--accent); transform: translateY(-1px); }
@media (max-width: 560px) { .bullets { grid-template-columns: minmax(0, 1fr); } }

.label { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(40px, 6vw, 88px); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 760px) minmax(0, 1fr); gap: 32px 72px; align-items: end; }
.hero__copy { display: flex; flex-direction: column; gap: 26px; }
.hero__side { display: flex; flex-direction: column; gap: 24px; padding-bottom: 8px; }
@media (max-width: 1100px) { .hero__grid { grid-template-columns: minmax(0, 1fr); } }

.bench-hero { display: grid; grid-template-columns: minmax(0, 540px) minmax(0, 1fr); gap: 48px 64px; align-items: center; }
.bench-hero__copy { display: flex; flex-direction: column; gap: 22px; }
.crumb { font-family: var(--mono); font-size: 13px; color: var(--ink-2); }
.crumb a { color: var(--ink-2); text-decoration: none; }
@media (max-width: 1100px) { .bench-hero { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Pipeline ---------- */
.pipeline__meta { display: flex; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; font-family: var(--mono); font-size: 13px; color: var(--ink-2); }
.pipeline { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.stage { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 12px; min-height: 330px; position: relative; }
.stage + .stage::before {
  content: ""; position: absolute; left: -12px; top: 50%; width: 8px; height: 8px;
  border-top: 2px solid var(--faint); border-right: 2px solid var(--faint); transform: translateY(-50%) rotate(45deg);
}
.stage__foot { margin-top: auto; display: flex; flex-wrap: wrap; gap: 8px; }
.stage__big { font-family: var(--mono); font-size: 28px; font-weight: 600; color: var(--accent); }
.stage__expr { font-family: var(--mono); font-size: 13px; line-height: 1.7; background: var(--bg); border-radius: 8px; padding: 12px; overflow-wrap: anywhere; }
@media (max-width: 1100px) {
  .pipeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stage:first-child { grid-column: 1 / -1; min-height: 0; }
  .stage { min-height: 0; }
  .stage + .stage::before { display: none; }
}

/* Truth table */
.tt { font-family: var(--mono); font-size: 13px; }
.tt__row { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); height: 26px; align-items: center; text-align: center; color: var(--ink-2); }
.tt__row--head { border-bottom: 1px solid var(--line); }
.tt__row--head span:last-child { color: var(--ink); font-weight: 600; }
.tt .hi { color: var(--amber); font-weight: 600; }
.tt .lo { color: var(--faint); font-weight: 600; }

/* ---------- Tool cards ---------- */
.tool { background: var(--bg); border: 1px solid var(--line); border-radius: 20px; padding: clamp(22px, 3vw, 40px); display: flex; flex-direction: column; gap: 22px; }
/* Three cards in a two-column grid leave a hole; the odd one out takes the
   whole row rather than sitting beside empty space. */
.grid-2 > .tool:last-child:nth-child(odd) { grid-column: 1 / -1; }

/* The forge sits on its own below the three benches, so it gets the full width
   and a tint that says it is a different kind of thing, not a fourth step. */
.tool--wide { background: var(--accent-tint); border-color: var(--accent); }
.tool--wide .tool__title { color: var(--accent); }
/* a second heading inside one section wants air above it, not a new rule */
.section-head--split { margin-top: clamp(28px, 4vw, 56px); }

.tool__num { font-family: var(--mono); font-size: 13px; color: var(--ink-2); }
.tool__title { font-size: clamp(26px, 2.4vw, 32px); font-weight: 600; letter-spacing: -0.02em; }
.tool__foot { margin-top: auto; display: flex; flex-wrap: wrap; gap: 4px 28px; }
.tool .panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }

.compare { font-family: var(--mono); font-size: 14px; }
.compare__row { display: grid; grid-template-columns: 120px minmax(0, 1fr) 56px; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.compare__row:last-child { border-bottom: 0; }
.compare__row--head { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
.compare__row span:last-child { text-align: right; font-weight: 600; }
.compare__row b { font-weight: 600; }
@media (max-width: 480px) { .compare__row { grid-template-columns: 96px minmax(0, 1fr) 40px; font-size: 13px; } }

.signal { border-bottom: 2px solid var(--accent); font-weight: 600; }
.struck { text-decoration: line-through; color: var(--muted); }

.progress { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 4px; }
.progress span { height: 6px; border-radius: 3px; background: var(--line); }
.progress span.on { background: var(--accent); }

.flow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.flow__step { border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 4px; background: var(--surface); }
.flow__step--on { border: 1.5px solid var(--accent); }
.flow__step .label { font-size: 11px; }

/* ---------- Walkthrough ---------- */
.problem { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px 48px; }
.problem__text { font-size: clamp(18px, 2vw, 26px); line-height: 1.5; letter-spacing: -0.01em; }
.problem__answer { border-left: 1px solid var(--line); padding-left: 48px; display: flex; flex-direction: column; gap: 14px; }
.problem__formula { font-family: var(--mono); font-size: 34px; font-weight: 600; color: var(--accent); }
@media (max-width: 900px) {
  .problem { grid-template-columns: minmax(0, 1fr); }
  .problem__answer { border-left: 0; border-top: 1px solid var(--line); padding: 24px 0 0; }
}

.step { display: flex; flex-direction: column; gap: 14px; }
.step__head { display: flex; align-items: center; gap: 12px; }
.step__num {
  width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%;
  border: 1.5px solid var(--accent); color: var(--accent);
  font: 600 14px/1 var(--mono); display: inline-flex; align-items: center; justify-content: center;
}
.step__num--solid { background: var(--accent); color: #fff; }
.step__body { margin-top: auto; }
.step p { font-size: 15px; color: var(--ink-2); }
.vars > div { display: flex; gap: 14px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.vars > div:last-child { border-bottom: 0; }
.vars b { font-family: var(--mono); width: 16px; }
.chipset { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; }
.chipset .yes { border: 1.5px solid var(--accent); border-radius: 8px; padding: 6px 10px; font-weight: 600; }
.chipset .no { border: 1px dashed var(--line-2); border-radius: 8px; padding: 6px 10px; color: var(--muted); text-decoration: line-through; }
.checks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.checks span { display: flex; align-items: center; justify-content: center; gap: 6px; background: var(--bg); border-radius: 6px; padding: 7px 0; font: 13px var(--mono); }
.checks svg { width: 12px; height: 12px; }

/* ---------- Principles band ---------- */
.principles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 32px; }
.principle { border-top: 1px solid var(--dark-line); padding-top: 24px; display: flex; flex-direction: column; gap: 12px; }
.principle h3 { font-size: 18px; font-weight: 600; }
.principle p { font-size: 15px; color: var(--dark-muted); }
@media (max-width: 1100px) { .principles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .principles { grid-template-columns: minmax(0, 1fr); gap: 0; } .principle { padding: 20px 0; } }

/* ---------- Pricing ---------- */
.ptable { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--surface); }
.ptable__row { display: grid; grid-template-columns: 240px minmax(0, 1fr) minmax(0, 1fr); border-bottom: 1px solid var(--line); }
.ptable__row:last-child { border-bottom: 0; }
.ptable__row > * { padding: 20px 28px; }
.ptable__row--head { background: var(--bg); font-family: var(--mono); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
.ptable__row--head > :last-child { color: var(--accent); font-weight: 600; }
.ptable__tool { font-weight: 600; }
.ptable__free { color: var(--ink-2); }
.ptable__pro { background: var(--accent-tint); }
@media (max-width: 760px) {
  .ptable__row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ptable__row > * { padding: 12px 16px; font-size: 14px; }
  .ptable__row--head > :first-child { display: none; }
  .ptable__tool { grid-column: 1 / -1; padding-bottom: 0 !important; font-size: 15px !important; }
  .ptable__pro { background: transparent; }
}

/* billing switch: three radios styled as one segmented control */
.billing { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 32px; flex-wrap: wrap; }
.billing__intro { gap: 6px; }
.seg {
  display: inline-flex; margin: 0; padding: 4px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--bg);
}
.seg input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.seg label {
  padding: 9px 20px; border-radius: 999px; cursor: pointer;
  font-size: 15px; font-weight: 500; color: var(--ink-2); transition: background .15s ease, color .15s ease;
}
.seg label:hover { color: var(--ink); }
.seg input:checked + label { background: var(--ink); color: #fff; }
.seg input:focus-visible + label { outline: 3px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .seg label { transition: none; } }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* show only the chosen period's price, note and button (all three show where :has is missing) */
.pricing-plans:not(:has(#bill-week:checked)) [data-period="week"],
.pricing-plans:not(:has(#bill-month:checked)) [data-period="month"],
.pricing-plans:not(:has(#bill-sem:checked)) [data-period="sem"] { display: none; }

.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.plan { display: flex; flex-direction: column; gap: 16px; border-radius: 20px; padding: 28px; background: var(--bg); border: 1px solid var(--line); }
.plan--featured { background: var(--surface); border: 2px solid var(--accent); padding: 27px; }
.plan__name { font-size: 18px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 28px; }
.plan__price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.plan__amount { font-size: 40px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; }
.plan__list {
  list-style: none; margin: 0; padding: 16px 0 0; border-top: 1px solid var(--line);
  display: grid; gap: 10px; font-size: 15px;
}
.plan__list li { position: relative; padding-left: 24px; }
.plan__list li::before {
  content: ""; position: absolute; left: 3px; top: 5px; width: 5px; height: 10px;
  border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(45deg);
}
.plan .btn { margin-top: auto; width: 100%; }
@media (max-width: 960px) { .plans { grid-template-columns: minmax(0, 1fr); } }

.limit-demo { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.card--sand .limit-demo { background: var(--surface); }
.limit-demo button { font: 600 14px var(--sans); color: var(--muted); background: #ECEAE4; border: 1px solid #DAD7CE; border-radius: 8px; padding: 10px 14px; min-height: 44px; }
.limit-demo span { font: 13px var(--mono); color: var(--ink-2); }

/* ---------- Bench pages ---------- */
.steps-row { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: 32px; }
.steps-row > div { border-top: 2px solid var(--line); padding-top: 24px; display: flex; flex-direction: column; gap: 12px; }
.steps-row > div:first-child { border-top-color: var(--accent); }
.steps-row .num { font: 600 14px var(--mono); color: var(--ink-2); }
.steps-row > div:first-child .num { color: var(--accent); }
.steps-row p { color: var(--ink-2); }
@media (max-width: 1100px) { .steps-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .steps-row { grid-template-columns: minmax(0, 1fr); gap: 24px; } }

.split { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 40px 72px; align-items: center; }
.split--wide { grid-template-columns: minmax(0, 520px) minmax(0, 1fr); }
.split--aside { grid-template-columns: minmax(0, 1fr) minmax(0, 380px); align-items: start; gap: 20px; }
@media (max-width: 1000px) { .split, .split--wide, .split--aside { grid-template-columns: minmax(0, 1fr); } }

.table { font-size: 16px; }
.table__row { display: grid; grid-template-columns: var(--tcols); gap: 12px; padding: 18px 0; align-items: center; border-bottom: 1px solid var(--line); }
.table__row:last-child { border-bottom: 0; }
.table__row--head { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); padding: 14px 0; }
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.scroll-x > .table { min-width: 620px; }

.bar { display: inline-block; height: 8px; border-radius: 4px; background: var(--accent); vertical-align: middle; margin-right: 10px; }
.swatch { display: inline-block; width: 22px; height: 6px; border-radius: 3px; vertical-align: middle; margin-right: 8px; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.stats > div { background: var(--bg); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 2px; }
.stats b { font: 600 20px var(--mono); }
@media (max-width: 520px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.segmented { display: inline-flex; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 3px; font-size: 13px; font-weight: 500; flex-wrap: wrap; }
.segmented span { padding: 6px 12px; color: var(--ink-2); border-radius: 6px; }
.segmented span.on { background: var(--surface); border: 1px solid var(--line); color: var(--ink); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.field input { font: 16px var(--mono); color: var(--ink); background: var(--bg); border: 1.5px solid var(--accent); border-radius: 10px; padding: 12px 14px; min-height: 48px; width: 100%; }

.app-preview__panels { display: grid; grid-template-columns: 150px minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.app-preview__panels > div { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 640px) { .app-preview__panels { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .app-preview__panels > div:first-child { grid-column: 1 / -1; } }

.share { display: grid; grid-template-columns: auto 40px minmax(0, 1fr); gap: 20px; align-items: center; }
.share__seed { background: var(--dark); color: var(--bg); border-radius: 16px; padding: 24px 28px; display: flex; flex-direction: column; gap: 6px; }
.share__seed b { font: 600 36px var(--mono); }
.share__list > div { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.share__list > div + div { margin-top: 10px; }
.share__list .key { background: var(--surface); border: 1.5px solid var(--accent); }
@media (max-width: 700px) { .share { grid-template-columns: minmax(0, 1fr); } .share > svg { transform: rotate(90deg); margin: 0 auto; } }

.rowcells { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 4px; }
.rowcells span { height: 28px; border-radius: 5px; background: var(--accent); }
.rowcells span.bad { background: var(--surface); border: 2px solid var(--error); }

.slots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; flex-grow: 1; }
.slots span { height: 18px; border-radius: 4px; background: var(--line); }
.slots span.on { background: var(--accent); }

.materials > div { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.materials > div:last-child { border-bottom: 0; }

.decoder-card { display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: 24px; }
.decoder-card__side { border-left: 1px solid var(--line); padding-left: 24px; }
@media (max-width: 600px) {
  .decoder-card { grid-template-columns: minmax(0, 1fr); }
  .decoder-card__side { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 20px; }
}

.legend { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 14px; color: var(--ink-2); }

/* ---------- Final CTA / footer ---------- */
.final { background: var(--dark); color: var(--bg); padding-top: clamp(64px, 8vw, 120px); padding-bottom: 40px; }
.final__top { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px 80px; flex-wrap: wrap; }
.final__title { font-size: clamp(42px, 6vw, 80px); line-height: 1.0; letter-spacing: -0.035em; font-weight: 600; color: var(--bg); text-decoration: none; }
a.final__title:hover { color: #fff; text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 8px; }
.final p { color: var(--dark-muted); }
.site-footer { margin-top: clamp(56px, 7vw, 96px); border-top: 1px solid var(--dark-line); padding-top: 32px; display: flex; justify-content: space-between; align-items: flex-start; gap: 28px 40px; flex-wrap: wrap; }
.site-footer__brand { display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--dark-muted); }
.site-footer__brand a { font: 600 18px var(--mono); letter-spacing: 0.1em; color: var(--bg); text-decoration: none; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 28px; font-size: 14px; }
.site-footer nav a { color: var(--bg); text-decoration: none; padding: 10px 0; }
.site-footer nav a:hover { color: #fff; text-decoration: underline; }

/* A button with nowhere to go yet (sign-in, checkout) reads as unavailable
   rather than broken. main.js sets aria-disabled on those. */
[data-app][aria-disabled="true"] {
  opacity: .45;
  cursor: not-allowed;
  pointer-events: auto;
}
[data-app][aria-disabled="true"]:hover { transform: none; }
