/* ===========================================================================
   A5 TECH OÜ — core stylesheet
   Aesthetic: pure black field, dot-matrix type, monospace grid, one signal hue.
   No external fonts, no CDN, no build step.
   =========================================================================== */

/* ---------- tokens ---------- */
:root {
  --bg:        #000000;
  --bg-raise:  #070707;
  --bg-card:   rgba(255,255,255,0.022);
  --ink:       #ece9e4;
  --ink-2:     #b6b2ab;
  --dim:       #7d7a74;
  --faint:     #4a4844;
  --line:      rgba(255,255,255,0.10);
  --line-2:    rgba(255,255,255,0.05);

  --sig:       #38bdf8;   /* brand sky, from A5 mark */
  --sig-deep:  #0ea5e9;
  --sig-glow:  rgba(56,189,248,0.14);
  --alert:     #ff3b30;   /* reserved: terminal cursor only */

  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Segoe UI Mono",
          "Roboto Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --pad:   clamp(1.25rem, 4vw, 3.5rem);
  --maxw:  1320px;
  --rule:  1px solid var(--line);

  --t-fast: 140ms cubic-bezier(.2,.7,.3,1);
  --t-med:  340ms cubic-bezier(.2,.7,.3,1);
  --t-slow: 900ms cubic-bezier(.16,1,.3,1);
}

/* ---------- reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.65;
  font-variant-ligatures: none;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
html, body { max-width: 100%; }
img, svg, canvas { max-width: 100%; display: block; }
h1,h2,h3,h4,p,ul,ol,figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--sig); color: #000; }

:focus-visible {
  outline: 1px solid var(--sig);
  outline-offset: 3px;
}

/* ---------- cursor companion ---------- */
.ai-follower {
  --x: -80px;
  --y: -80px;
  position: fixed;
  left: 0;
  top: 0;
  width: 34px;
  height: 28px;
  z-index: 80;
  pointer-events: none;
  opacity: 0;
  transform: translate3d(var(--x), var(--y), 0);
  border: 1px solid rgba(56,189,248,.5);
  border-radius: 13px 13px 11px 11px;
  background:
    radial-gradient(circle at 50% -20%, rgba(236,233,228,.18), transparent 48%),
    linear-gradient(180deg, rgba(56,189,248,.09), rgba(0,0,0,.66) 58%),
    rgba(0,0,0,.72);
  box-shadow:
    -8px 9px 22px rgba(0,0,0,.24),
    0 0 20px rgba(56,189,248,.14),
    inset 0 1px 0 rgba(236,233,228,.16),
    inset 0 -10px 18px rgba(56,189,248,.08);
  mix-blend-mode: screen;
  transition: opacity var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
  transform-origin: 50% 50%;
  will-change: transform;
}

.ai-follower::before,
.ai-follower::after,
.ai-follower span {
  content: "";
  position: absolute;
  background: var(--sig);
}

.ai-follower::before {
  width: 5px;
  height: 5px;
  left: 9px;
  top: 11px;
  border-radius: 50%;
  box-shadow:
    11px 0 0 rgba(56,189,248,.86),
    0 0 11px rgba(56,189,248,.74),
    11px 0 11px rgba(56,189,248,.56);
}

.ai-follower.is-idle::before {
  animation: botConfusedEyes 1.05s steps(1, end) infinite;
}

.ai-follower::after {
  width: 1px;
  height: 1px;
  left: 50%;
  top: -7px;
  opacity: .54;
  transform: translateX(-50%);
  transform-origin: center bottom;
  border-radius: 50%;
  box-shadow:
    0 0 0 1px rgba(56,189,248,.72),
    0 0 10px rgba(56,189,248,.45),
    0 5px 0 0 rgba(56,189,248,.42);
}
.ai-follower.is-left::after {
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  transform-origin: center bottom;
}

.ai-follower span {
  width: 10px;
  height: 1px;
  left: 12px;
  top: 19px;
  opacity: .52;
  border-radius: 999px;
  transition: width var(--t-fast), height var(--t-fast), left var(--t-fast), top var(--t-fast), border-radius var(--t-fast), transform var(--t-fast), background var(--t-fast);
}

.ai-follower.is-idle span {
  width: 7px;
  left: 13px;
  opacity: .66;
  transform: rotate(-10deg);
}

.ai-follower.mood-smile span,
.ai-follower.mood-grin span {
  width: 12px;
  height: 6px;
  left: 11px;
  top: 16px;
  border-radius: 0 0 999px 999px;
  background: transparent;
  border-bottom: 1.5px solid var(--sig);
}

.ai-follower.mood-grin span {
  height: 8px;
  top: 15px;
  border-bottom-width: 2px;
}

.ai-follower.mood-surprise span {
  width: 8px;
  height: 8px;
  left: 13px;
  top: 15px;
  border-radius: 50%;
  background: transparent;
  border: 1.7px solid var(--sig);
  box-shadow: 0 0 10px rgba(56,189,248,.34);
}

.ai-follower.mood-sad span {
  width: 12px;
  height: 6px;
  left: 11px;
  top: 20px;
  border-radius: 999px 999px 0 0;
  background: transparent;
  border-top: 1.5px solid var(--sig);
}

.ai-follower.is-visible { opacity: .68; }

.ai-follower.is-playing {
  opacity: .78;
  border-color: rgba(56,189,248,.78);
  box-shadow:
    -8px 9px 22px rgba(0,0,0,.2),
    0 0 28px rgba(56,189,248,.24),
    inset 0 1px 0 rgba(236,233,228,.18),
    inset 0 -10px 18px rgba(56,189,248,.13);
}

.ai-follower.is-pressing {
  border-color: rgba(236,233,228,.72);
  box-shadow: 0 0 22px rgba(56,189,248,.28);
  transform: translate3d(var(--x), var(--y), 0) scale(.94);
}

.ai-spark {
  --x: -80px;
  --y: -80px;
  position: fixed;
  left: 0;
  top: 0;
  width: 5px;
  height: 5px;
  z-index: 79;
  pointer-events: none;
  opacity: 0;
  transform: translate3d(var(--x), var(--y), 0) translate(-50%, -50%);
  border-radius: 50%;
  background: var(--sig);
  box-shadow: 0 0 14px rgba(56,189,248,.76);
  mix-blend-mode: screen;
  transition: opacity var(--t-fast);
}

.ai-spark.is-visible { opacity: .62; }

@keyframes botConfusedEyes {
  0%, 100% {
    left: 9px;
    top: 11px;
    box-shadow:
      11px 0 0 rgba(56,189,248,.86),
      0 0 11px rgba(56,189,248,.74),
      11px 0 11px rgba(56,189,248,.56);
  }
  22% {
    left: 7px;
    top: 10px;
    box-shadow:
      11px 1px 0 rgba(56,189,248,.86),
      0 0 11px rgba(56,189,248,.74),
      11px 1px 11px rgba(56,189,248,.56);
  }
  44% {
    left: 11px;
    top: 12px;
    box-shadow:
      9px -1px 0 rgba(56,189,248,.86),
      0 0 11px rgba(56,189,248,.74),
      9px -1px 11px rgba(56,189,248,.56);
  }
  66% {
    left: 9px;
    top: 11px;
    box-shadow:
      11px 0 0 rgba(56,189,248,.86),
      0 0 11px rgba(56,189,248,.74),
      11px 0 11px rgba(56,189,248,.56);
  }
  78% {
    left: 9px;
    top: 13px;
    height: 1px;
    box-shadow:
      11px 0 0 rgba(56,189,248,.86),
      0 0 11px rgba(56,189,248,.74),
      11px 0 11px rgba(56,189,248,.56);
  }
}

@media (prefers-reduced-motion: reduce), (pointer: coarse) {
  .ai-follower,
  .ai-spark { display: none; }
}

/* ---------- ambient dot field ---------- */
.paint-field {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .42;
  mix-blend-mode: screen;
}

.field {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(circle, rgba(255,255,255,.055) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 100% 65% at 50% 35%, #000 20%, transparent 92%);
          mask-image: radial-gradient(ellipse 100% 65% at 50% 35%, #000 20%, transparent 92%);
  opacity: .36;
}
.field--low { opacity: .3; }

@media (prefers-reduced-motion: reduce) {
  .paint-field { display: none; }
}

/* ---------- layout primitives ---------- */
.wrap {
  position: relative; z-index: 1;
  /* width:100% is load-bearing: `margin-inline:auto` cancels stretch alignment
     when .wrap is a grid item (e.g. inside .hero), so it would shrink-wrap. */
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
}
.section { padding-block: clamp(4.5rem, 11vw, 9.5rem); position: relative; z-index: 1; }
.section--tight { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section + .section { border-top: var(--rule); }

.grid { display: grid; gap: clamp(1.25rem, 3vw, 2.5rem); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.grid--split { grid-template-columns: minmax(0,1fr); }
@media (min-width: 900px) {
  .grid--split { grid-template-columns: 0.85fr 1.15fr; gap: clamp(2rem, 5vw, 5rem); }
}

/* ---------- type ---------- */
.eyebrow {
  font-size: 11px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--dim);
  display: flex; align-items: center; gap: .75rem;
}
.eyebrow::before {
  content: ''; width: 26px; height: 1px; background: var(--faint); flex: none;
}
.eyebrow--plain::before { display: none; }

.lede {
  font-size: clamp(14px, 1.35vw, 16px);
  color: var(--ink-2);
  max-width: 62ch;
  text-align: justify;
  text-wrap: pretty;
  hyphens: auto;
}
.body-copy { color: var(--ink-2); max-width: 68ch; text-align: justify; hyphens: auto; }
.body-copy + .body-copy { margin-top: 1.15em; }
.body-copy strong { color: var(--ink); font-weight: 600; }

.h-static {
  font-size: clamp(1.6rem, 4.6vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-weight: 500;
}
.h3 {
  font-size: 15px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink); font-weight: 600;
}
.mono-sm { font-size: 12px; letter-spacing: .1em; color: var(--dim); text-transform: uppercase; }
.num { color: var(--faint); font-size: 11px; letter-spacing: .2em; }
.sig { color: var(--sig); }

/* ---------- dot-matrix headline canvas ---------- */
.dm { display: block; width: 100%; height: auto; }
/* width:100% is load-bearing. An unsized <canvas> has an intrinsic 300x150,
   so inside a `justify-items:center` grid the wrapper shrink-wraps to it,
   dotmatrix.js then measures clientWidth=300 and paints at 300 — a feedback
   loop that silently renders every headline at a quarter of its width. */
.dm-wrap { position: relative; width: 100%; }
.dm-wrap[data-align="center"],
.dm-wrap[data-dm-align="center"] { text-align: center; }
/* no-JS / pre-paint fallback so headlines are never invisible */
.dm-fallback {
  font-size: clamp(1.5rem, 4.4vw, 3rem);
  letter-spacing: .12em; text-transform: uppercase; line-height: 1.15;
  color: var(--ink);
}
.dm-ready .dm-fallback { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- nav ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(14px);
  background: linear-gradient(to bottom, rgba(0,0,0,.92), rgba(0,0,0,.55));
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-med);
}
.topbar.is-stuck { border-bottom-color: var(--line); }
.topbar__inner {
  max-width: var(--maxw); margin-inline: auto;
  padding: 0 var(--pad);
  height: 62px;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
}
.brand { display: flex; align-items: center; gap: .7rem; flex: none; }
.brand__mark {
  width: 34px; height: 34px; flex: none;
  border: 0; border-radius: 0;
  display: block;
  color: transparent;
  background: url("../img/mark.svg") center / contain no-repeat;
  filter: drop-shadow(0 0 8px rgba(56,189,248,.14));
  transition: filter var(--t-fast), transform var(--t-fast);
}
.brand:hover .brand__mark {
  filter: drop-shadow(0 0 12px rgba(56,189,248,.22));
  transform: translateY(-1px);
}
.brand__text { font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-2); }
.brand__text b { color: var(--ink); font-weight: 600; }

.nav { display: flex; align-items: center; gap: clamp(.9rem, 2vw, 1.9rem); }
.nav a {
  font-size: 11.5px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--dim); transition: color var(--t-fast); white-space: nowrap;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; text-decoration-color: var(--sig); }
.nav__cta {
  color: var(--sig) !important;
  border: 1px solid var(--line); padding: .45rem .8rem; border-radius: 2px;
  transition: border-color var(--t-fast), background var(--t-fast);
}
.nav__cta:hover { border-color: var(--sig); background: var(--sig-glow); }

.nav-toggle {
  display: none; width: 44px; height: 44px; padding: 0; margin-right: -.5rem;
  color: var(--ink-2); place-items: center;
}
.nav-toggle svg { width: 20px; height: 20px; }
@media (max-width: 860px) {
  .nav-toggle { display: grid; }
  .nav {
    position: fixed; inset: 62px 0 auto 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: #000; border-bottom: var(--rule);
    padding: .5rem var(--pad) 1.5rem;
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity var(--t-med), transform var(--t-med);
  }
  .nav.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .nav a { padding: .85rem 0; font-size: 13px; width: 100%; border-bottom: 1px solid var(--line-2); }
  .nav__cta { margin-top: .9rem; border-bottom: 1px solid var(--line) !important; }
}

/* ---------- hero ---------- */
.hero {
  min-height: clamp(560px, 88svh, 900px);
  display: grid; align-items: center;
  position: relative; z-index: 1;
  padding-block: clamp(3rem, 8vw, 6rem);
}
.hero__inner { display: grid; gap: 1.6rem; justify-items: center; text-align: center; }
.hero .lede { text-align: center; margin-inline: auto; max-width: 58ch; }
.hero-fit {
  width: min(100%, 980px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line-2);
  border: 1px solid var(--line-2);
  text-align: left;
}
.hero-fit span {
  background: rgba(0,0,0,.78);
  min-height: 108px;
  padding: 1rem;
  display: grid;
  gap: .35rem;
  align-content: center;
  color: var(--dim);
  font-size: 12.5px;
  line-height: 1.55;
}
.hero-fit b {
  display: block;
  color: var(--ink);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 600;
}
.hero-fit b::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: .55rem;
  background: var(--sig);
  vertical-align: .08em;
}
.hero__meta {
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: center;
  font-size: 10.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--faint);
}
.hero__meta span { display: flex; align-items: center; gap: .5rem; }
.hero__meta span::before { content: ''; width: 4px; height: 4px; background: var(--sig); opacity: .7; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .6rem;
  font-size: 11.5px; letter-spacing: .2em; text-transform: uppercase;
  padding: .8rem 1.3rem; border: 1px solid var(--line); border-radius: 2px;
  color: var(--ink); background: transparent;
  transition: border-color var(--t-fast), background var(--t-fast), color var(--t-fast);
}
.btn:hover { border-color: var(--sig); color: var(--sig); background: var(--sig-glow); }
.btn--solid { background: var(--ink); color: #000; border-color: var(--ink); }
.btn--solid:hover { background: var(--sig); border-color: var(--sig); color: #000; }
.btn--ghost { border-color: transparent; padding-inline: 0; }
.btn--ghost:hover { background: none; }
.btn__arrow { transition: transform var(--t-fast); }
.btn:hover .btn__arrow { transform: translateX(4px); }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: inherit; }

/* ---------- stat strip ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); border-top: var(--rule); }
.stat { padding: 1.5rem 1.25rem; border-bottom: var(--rule); border-right: var(--rule); }
.stat:last-child { border-right: 0; }
.stat__n { font-size: clamp(1.5rem, 3vw, 2.1rem); letter-spacing: .02em; color: var(--ink); line-height: 1; }
.stat__l { margin-top: .6rem; font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--dim); }

/* ---------- proof / audit lenses ---------- */
.proof-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line-2);
  background: rgba(255,255,255,.018);
}
.proof-strip span {
  display: grid;
  gap: .2rem;
  padding: .9rem .8rem;
  border-right: 1px solid var(--line-2);
  color: var(--faint);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.proof-strip span:last-child { border-right: 0; }
.proof-strip b {
  color: var(--sig);
  font-size: 17px;
  line-height: 1;
  letter-spacing: .04em;
}

.lens-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line-2);
  border: 1px solid var(--line-2);
}
.lens {
  background: var(--bg);
  min-height: 150px;
  padding: 1.15rem 1rem;
  display: grid;
  gap: .55rem;
  align-content: start;
  transition: background var(--t-fast);
}
.lens:hover { background: var(--bg-raise); }
.lens__n { color: var(--sig); font-size: 10px; letter-spacing: .2em; }
.lens__t { color: var(--ink); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }
.lens__d { color: var(--dim); font-size: 12.5px; line-height: 1.6; }

/* ---------- need-first entry points ---------- */
.need-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(min(86vw, 300px), 1fr);
  gap: 1px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 1px;
  scrollbar-width: thin;
  background: var(--line-2);
  border: 1px solid var(--line-2);
}
.need-grid::-webkit-scrollbar { height: 6px; }
.need-grid::-webkit-scrollbar-thumb { background: var(--line); }
@media (min-width: 900px) {
  .need-grid { grid-auto-columns: calc((100% - 2px) / 3); }
}
.need {
  background: var(--bg);
  min-height: 250px;
  padding: clamp(1.25rem, 3vw, 1.8rem);
  display: grid;
  gap: .75rem;
  align-content: start;
  position: relative;
  scroll-snap-align: start;
  transition: background var(--t-fast), color var(--t-fast);
}
.need::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid transparent;
  transition: border-color var(--t-fast);
}
.need:hover { background: var(--bg-raise); }
.need:hover::after { border-color: rgba(56,189,248,.35); }
.need__n {
  color: var(--sig);
  font-size: 10px;
  letter-spacing: .22em;
}
.need__t {
  color: var(--ink);
  font-size: clamp(17px, 2vw, 23px);
  line-height: 1.15;
  letter-spacing: .04em;
  max-width: 18ch;
}
.need__d {
  color: var(--dim);
  font-size: 13px;
  line-height: 1.65;
  max-width: 42ch;
}
.need__go {
  margin-top: auto;
  color: var(--sig);
  font-size: 10.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.need-carousel__controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .8rem;
  padding-top: .85rem;
}
.need-carousel__buttons { display: flex; gap: .45rem; }
.need-carousel__btn {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--ink-2);
  background: rgba(255,255,255,.018);
  transition: border-color var(--t-fast), color var(--t-fast), background var(--t-fast);
}
.need-carousel__btn:hover {
  color: var(--sig);
  border-color: rgba(56,189,248,.45);
  background: var(--sig-glow);
}
.need-carousel__status {
  color: var(--faint);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.topic-row {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}
.topic-row .body-copy {
  max-width: 58ch;
  font-size: clamp(13.5px, 1.15vw, 15px);
  line-height: 1.72;
  text-align: left;
  text-wrap: pretty;
}
@media (min-width: 900px) {
  .topic-row { grid-template-columns: minmax(0, 1fr) minmax(280px, .75fr); }
}
.topic-actions {
  display: grid;
  gap: .75rem;
  justify-items: stretch;
}
.topic-actions .btn { justify-content: space-between; }

/* ---------- capability rows ---------- */
.caps { border-top: var(--rule); }
.cap {
  display: grid; gap: .6rem 2rem; padding: 1.6rem 0;
  border-bottom: var(--rule);
  transition: background var(--t-fast);
}
.cap:hover { background: rgba(255,255,255,.018); }
@media (min-width: 860px) {
  .cap { grid-template-columns: 60px 1fr 1.4fr auto; align-items: baseline; }
}
.cap__n { color: var(--faint); font-size: 11px; letter-spacing: .2em; }
.cap__t { font-size: 14px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink); }
.cap__d { color: var(--dim); font-size: 13.5px; }
.cap__proof { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); white-space: nowrap; }

/* ---------- ASCII portrait ---------- */
.ascii-card {
  position: relative;
  margin: 0 0 1.2rem;
  border: 0;
  background:
    linear-gradient(180deg, rgba(236,233,228,.06), transparent 48px),
    linear-gradient(135deg, rgba(56,189,248,.11), transparent 34%),
    rgba(255,255,255,.018);
  box-shadow:
    inset 0 0 42px rgba(56,189,248,.06),
    0 18px 60px rgba(0,0,0,.34);
  overflow: hidden;
  aspect-ratio: 1 / 1;
  max-width: 520px;
}
.ascii-card::before {
  content: none;
}
.ascii-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    repeating-linear-gradient(180deg, rgba(255,255,255,.045) 0 1px, transparent 1px 7px),
    radial-gradient(circle at 50% 20%, rgba(236,233,228,.1), transparent 30%);
  opacity: .48;
}
.ascii-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 52% 44%;
  background: #000;
  filter: contrast(1.05) saturate(.9) drop-shadow(0 0 18px rgba(56,189,248,.12));
  transform: scale(1.045) translate3d(0,0,0);
  animation: portraitAlive 8.5s ease-in-out infinite;
  will-change: transform, filter;
}
.ascii-card__meta {
  position: absolute;
  inset: auto 0 0;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .55rem;
  padding: .65rem .85rem;
  background: rgba(0,0,0,.72);
  color: var(--dim);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.ascii-card__meta::before {
  content: "";
  width: 6px;
  height: 6px;
  align-self: center;
  border-radius: 50%;
  background: var(--sig);
  box-shadow: 0 0 14px rgba(56,189,248,.8);
  animation: portraitSignal 2.4s ease-in-out infinite;
}
@keyframes portraitAlive {
  0%, 100% {
    transform: scale(1.045) translate3d(-.5%, -.2%, 0);
    filter: contrast(1.05) saturate(.9) drop-shadow(0 0 18px rgba(56,189,248,.12));
  }
  34% {
    transform: scale(1.07) translate3d(1.2%, -.8%, 0);
    filter: contrast(1.1) saturate(.96) drop-shadow(0 0 24px rgba(56,189,248,.16));
  }
  68% {
    transform: scale(1.058) translate3d(-1%, .85%, 0);
    filter: contrast(1.03) saturate(.86) drop-shadow(0 0 20px rgba(56,189,248,.14));
  }
}
@keyframes portraitSignal {
  0%, 100% { opacity: .42; transform: scale(.82); }
  45% { opacity: 1; transform: scale(1); }
}
@media (max-width: 640px) {
  .ascii-card { max-width: none; }
  .ascii-card::after { inset: 0; }
  .ascii-card__meta { position: static; }
  .ascii-card__img { height: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .ascii-card__img,
  .ascii-card__meta::before {
    animation: none;
  }
}

/* ---------- catalog: filters ---------- */
.filters { display: grid; gap: .9rem; margin-block: 1.5rem 1rem; }
.filter-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.filter-row__label {
  font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--faint);
  margin-right: .5rem; flex: none;
}
.chip {
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  padding: .48rem .85rem; border: 1px solid var(--line); border-radius: 2px;
  color: var(--dim);
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}
.chip:hover { color: var(--ink); border-color: var(--ink-2); }
.chip[aria-pressed="true"] { color: #000; background: var(--ink); border-color: var(--ink); }
.chip__count { opacity: .55; margin-left: .4rem; }

.catalog-status {
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--faint);
  margin-bottom: 1.25rem;
}

/* ---------- catalog: cards ---------- */
.cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1px;
  background: var(--line-2);
  border: 1px solid var(--line-2);
}
@media (min-width: 760px) {
  .cards.cards--count-1 {
    background: transparent;
    border-color: transparent;
  }
  .cards.cards--count-2,
  .cards.cards--count-4 {
    max-width: 940px;
    margin-inline: auto;
  }
}

.card {
  flex: 1 1 100%;
  background: var(--bg);
  padding: 1.5rem 1.4rem 1.3rem;
  display: flex; flex-direction: column; gap: .9rem;
  position: relative; isolation: isolate;
  transition: background var(--t-fast);
  min-height: 260px;
}
.card::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  border: 1px solid transparent; transition: border-color var(--t-fast);
}
@media (min-width: 760px)  { .card { flex-basis: calc((100% - 1px) / 2); max-width: calc((100% - 1px) / 2); } }
@media (min-width: 1120px) { .card { flex-basis: calc((100% - 2px) / 3); max-width: calc((100% - 2px) / 3); } }
@media (min-width: 760px)  { .cards.cards--count-1 .card { flex-basis: min(100%, 520px); max-width: 520px; } }
@media (min-width: 760px)  { .cards.cards--count-2 .card, .cards.cards--count-4 .card { flex-basis: calc((100% - 1px) / 2); max-width: calc((100% - 1px) / 2); } }
.card:hover { background: var(--bg-raise); }
.card:hover::after { border-color: rgba(56,189,248,.35); }
.card.is-hidden { display: none; }

.card__badges { display: flex; flex-wrap: wrap; gap: .35rem; }
.badge {
  font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase;
  padding: .22rem .5rem; border: 1px solid var(--line); color: var(--dim); border-radius: 2px;
}
.badge--live   { color: #6ee7a8; border-color: rgba(110,231,168,.35); }
.badge--sig    { color: var(--sig); border-color: rgba(56,189,248,.4); }
.badge--soon   { color: var(--faint); }
.badge--oss    { color: #c4b5fd; border-color: rgba(196,181,253,.35); }

.card__title {
  font-size: 14.5px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink); line-height: 1.35; font-weight: 600;
}
.card__desc { font-size: 13px; color: var(--dim); line-height: 1.6; flex: 1; }
.card__meta {
  display: flex; flex-wrap: wrap; gap: .35rem .9rem;
  font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint);
  padding-top: .9rem; border-top: 1px solid var(--line-2);
}
.card__foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.card__price { font-size: 13px; letter-spacing: .06em; color: var(--ink); }
.card__price small { color: var(--faint); font-size: 10px; letter-spacing: .14em; }
.card__cta {
  font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--sig);
  display: inline-flex; align-items: center; gap: .45rem;
}
.card__cta:hover { text-decoration: underline; text-underline-offset: 4px; }
.card__cta .btn__arrow { transition: transform var(--t-fast); }
.card:hover .card__cta .btn__arrow { transform: translateX(3px); }

.empty {
  grid-column: 1 / -1; background: var(--bg); padding: 3rem 1.5rem; text-align: center;
  font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--faint);
}

/* ---------- terminal ---------- */
.terminal {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.014);
  border-radius: 3px;
  padding: 1.1rem 1.2rem;
  min-height: 260px;
  font-size: 12.5px; line-height: 1.85;
  overflow: hidden;
}
.terminal__bar {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 9.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--faint);
  padding-bottom: .8rem; margin-bottom: .8rem; border-bottom: 1px solid var(--line-2);
}
.terminal__out { white-space: pre-wrap; word-break: break-word; color: var(--ink-2); }
.terminal__out .t-cmd  { color: var(--ink); }
.terminal__out .t-ok   { color: #6ee7a8; }
.terminal__out .t-key  { color: var(--sig); }
.terminal__out .t-dim  { color: var(--faint); }
.caret {
  display: inline-block; width: .58em; height: 1.05em; vertical-align: -.18em;
  background: var(--alert); margin-left: 2px;
  animation: blink 1.05s steps(1) infinite;
}
@keyframes blink { 0%,49% { opacity: 1 } 50%,100% { opacity: 0 } }
@media (prefers-reduced-motion: reduce) { .caret { animation: none; } }

/* ---------- github strip ---------- */
.repos { display: grid; gap: 1px; background: var(--line-2); border: 1px solid var(--line-2); }
@media (min-width: 700px)  { .repos { grid-template-columns: repeat(2,1fr); } }
@media (min-width: 1060px) { .repos { grid-template-columns: repeat(3,1fr); } }
.repo {
  background: var(--bg); padding: 1.1rem 1.2rem; display: grid; gap: .5rem;
  transition: background var(--t-fast);
}
.repo:hover { background: var(--bg-raise); }
.repo__name { font-size: 12.5px; letter-spacing: .08em; color: var(--ink); }
.repo__name::before { content: '/ '; color: var(--faint); }
.repo__desc {
  font-size: 12px; color: var(--dim); line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.repo__meta { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); display: flex; gap: 1rem; }
.repo__lang { display: flex; align-items: center; gap: .4rem; }
.repo__lang::before { content:''; width: 6px; height: 6px; border-radius: 50%; background: var(--sig); }

/* ---------- process / steps ---------- */
.steps { display: grid; gap: 1px; background: var(--line-2); border: 1px solid var(--line-2); }
@media (min-width: 820px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.step { background: var(--bg); padding: 1.6rem 1.3rem; display: grid; gap: .7rem; align-content: start; }
.step__n {
  font-size: 10px; letter-spacing: .22em; color: var(--sig);
}
.step__t { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); }
.step__d { font-size: 12.5px; color: var(--dim); line-height: 1.6; }

/* ---------- scope note ---------- */
.note {
  border-left: 2px solid var(--line); padding: .9rem 0 .9rem 1.1rem;
  font-size: 12px; color: var(--faint); line-height: 1.7; max-width: 70ch;
}

/* ---------- form ---------- */
.form { display: grid; gap: 1.1rem; max-width: 640px; }
.field-row { display: grid; gap: .45rem; }
.field-row label { font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--dim); }
.optional { color: var(--faint); letter-spacing: .14em; }
.field-row input, .field-row textarea, .field-row select {
  font-family: var(--mono); font-size: 13.5px; color: var(--ink);
  background: rgba(255,255,255,.03); border: 1px solid var(--line); border-radius: 2px;
  padding: .75rem .85rem; width: 100%;
  color-scheme: dark;
  transition: border-color var(--t-fast), background var(--t-fast);
}
.field-row select { background-color: #080808; }
.field-row select option,
.field-row select optgroup {
  background: #080808;
  color: #ece9e4;
}
.field-row select option:checked {
  background: var(--sig);
  color: #000;
}
.field-row textarea { min-height: 150px; resize: vertical; }
.field-row input:focus, .field-row textarea:focus, .field-row select:focus {
  outline: none; border-color: var(--sig); background: rgba(56,189,248,.05);
}
.field-row input[aria-invalid="true"],
.field-row textarea[aria-invalid="true"],
.field-row select[aria-invalid="true"] {
  border-color: var(--alert);
  background: rgba(255,59,48,.05);
}
.field-row input::placeholder, .field-row textarea::placeholder { color: var(--faint); }
.form__hint { font-size: 11px; color: var(--faint); }
.form__error {
  border-left: 2px solid var(--alert);
  padding: .75rem 0 .75rem .95rem;
  color: #ffb4ad;
  font-size: 12px;
  line-height: 1.65;
}

/* ---------- footer ---------- */
.footer { border-top: var(--rule); padding-block: clamp(2.5rem, 6vw, 4.5rem) 2rem; position: relative; z-index: 1; }
.footer__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem clamp(.9rem, 3.5vw, 2.25rem);
}
.footer__grid > :first-child { grid-column: 1 / -1; }
@media (min-width: 430px) {
  .footer__grid { grid-template-columns: 1.2fr repeat(3, minmax(0, 1fr)); }
  .footer__grid > :first-child { grid-column: auto; }
}
@media (min-width: 780px) {
  .footer__grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; }
}
.footer h4 { font-size: 10px; letter-spacing: .24em; text-transform: uppercase; color: var(--faint); margin-bottom: 1rem; }
.footer li + li { margin-top: .55rem; }
.footer li a, .footer p { font-size: 12.5px; color: var(--dim); transition: color var(--t-fast); }
.footer li a:hover { color: var(--sig); }
.footer__legal {
  margin-top: 3rem; padding-top: 1.25rem; border-top: 1px solid var(--line-2);
  display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; justify-content: space-between;
  font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--faint);
}

/* ---------- back to top ---------- */
.back-top {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: 45;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: rgba(0,0,0,.78);
  color: var(--ink-2);
  font-size: 18px;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity var(--t-fast), transform var(--t-fast), border-color var(--t-fast), color var(--t-fast), background var(--t-fast);
}
.back-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}
.back-top:hover,
.back-top:focus-visible {
  color: var(--sig);
  border-color: rgba(56,189,248,.45);
  background: rgba(0,0,0,.92);
}

/* ---------- reveal on scroll ---------- */
[data-reveal] {
  opacity: 0; transform: translateY(14px);
  transition: opacity var(--t-slow), transform var(--t-slow);
}
[data-reveal].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ---------- utility ---------- */
.stack   { display: grid; gap: 1.4rem; align-content: start; }
.stack-sm{ display: grid; gap: .75rem; align-content: start; }
.mt-lg   { margin-top: clamp(2rem, 5vw, 3.5rem); }
.mt-md   { margin-top: 1.75rem; }
.center  { text-align: center; justify-items: center; }
.hr      { height: 1px; background: var(--line); border: 0; }
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: #000; padding: .7rem 1rem; font-size: 12px;
}
.skip:focus { left: var(--pad); top: .5rem; }

/* ===========================================================================
   Project case studies  (/<project-slug>/)
   =========================================================================== */

.crumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem;
  font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--faint);
}
.crumbs a { color: var(--dim); transition: color var(--t-fast); }
.crumbs a:hover { color: var(--sig); }

.facts { border-top: var(--rule); }
.fact { display: grid; grid-template-columns: 1fr; gap: .15rem; padding: .85rem 0; border-bottom: var(--rule); }
@media (min-width: 520px) { .fact { grid-template-columns: 130px 1fr; gap: 1rem; align-items: baseline; } }
.fact__k { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--faint); }
.fact__v { font-size: 13px; color: var(--ink); }

.prose { max-width: 72ch; }
.prose h2 {
  font-size: 13px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--ink); font-weight: 600;
  margin-top: clamp(2.5rem, 6vw, 4rem); margin-bottom: 1.1rem;
  display: flex; align-items: center; gap: .9rem;
}
.prose h2::before { content: ''; width: 22px; height: 1px; background: var(--sig); flex: none; }
/* Each case-study section wraps its own h2, so a bare `h2:first-child` would
   match every one of them and collapse the spacing between sections. */
.prose > section:first-child > h2 { margin-top: 0; }
.prose p { color: var(--ink-2); font-size: 14px; line-height: 1.8; text-align: justify; hyphens: auto; }
.prose p + p { margin-top: 1.15em; }

.tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.tag {
  font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  padding: .3rem .6rem; border: 1px solid var(--line); color: var(--dim); border-radius: 2px;
}

@media (min-width: 980px) { .project-aside { position: sticky; top: 90px; align-self: start; } }

.pager { display: grid; gap: 1px; background: var(--line-2); border: 1px solid var(--line-2); }
@media (min-width: 700px) { .pager { grid-template-columns: 1fr 1fr; } }
.pager a { background: var(--bg); padding: 1.5rem 1.4rem; display: grid; gap: .5rem; transition: background var(--t-fast); }
.pager a:hover { background: var(--bg-raise); }
.pager__l { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--faint); }
.pager__t { font-size: 14px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); }
.pager a:hover .pager__t { color: var(--sig); }
.pager--next { text-align: right; }

/* ===========================================================================
   Legal documents  (/terms/)
   =========================================================================== */

.callout {
  border: 1px solid var(--line); border-left-width: 2px;
  padding: 1rem 1.15rem; border-radius: 2px; background: rgba(255,255,255,.02);
}
.callout p { font-size: 12.5px; color: var(--dim); line-height: 1.7; }
.callout__t { font-size: 10.5px !important; letter-spacing: .2em; text-transform: uppercase; margin-bottom: .5rem; }
.callout--warn { border-left-color: #f0b429; }
.callout--warn .callout__t { color: #f0b429 !important; }

.toc { display: grid; gap: .1rem; }
.toc a {
  display: grid; grid-template-columns: 26px 1fr; gap: .5rem;
  padding: .45rem 0; font-size: 12px; color: var(--dim);
  transition: color var(--t-fast); border-bottom: 1px solid var(--line-2);
}
.toc a:hover { color: var(--sig); }
.toc__n { color: var(--faint); }

.legal { max-width: 78ch; }
.legal__section + .legal__section { margin-top: clamp(2.5rem, 6vw, 4rem); }
.legal__section { scroll-margin-top: 90px; }
.legal h2 {
  display: flex; gap: .9rem; align-items: baseline;
  font-size: 14px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink); font-weight: 600;
  padding-bottom: .9rem; margin-bottom: 1.25rem; border-bottom: var(--rule);
}
.legal__n { color: var(--sig); flex: none; }
.legal__intro { font-size: 13px; color: var(--dim); line-height: 1.75; margin-bottom: 1.1rem; }
.legal__clauses { display: grid; gap: .95rem; }
.legal__clauses li { display: grid; grid-template-columns: 46px 1fr; gap: .6rem; }
@media (max-width: 520px) { .legal__clauses li { grid-template-columns: 40px 1fr; } }
.legal__cn { font-size: 11px; color: var(--faint); letter-spacing: .06em; padding-top: .22em; }
.legal__ct { font-size: 13.5px; color: var(--ink-2); line-height: 1.8; text-align: justify; hyphens: auto; }

/* visually hidden but available to assistive tech */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

.notfound { min-height: 62svh; display: grid; place-items: center; text-align: center; }

/* ---------- narrow screens ---------- */
@media (max-width: 640px) {
  body { font-size: 14px; line-height: 1.6; }

  .wrap { padding-inline: clamp(1rem, 5vw, 1.35rem); }
  .section { padding-block: clamp(3.25rem, 13vw, 5rem); }
  .section--tight { padding-block: clamp(2.25rem, 10vw, 3.5rem); }

  .topbar__inner {
    height: 58px;
    gap: .75rem;
  }
  .brand { gap: .55rem; min-width: 0; }
  .brand__mark { width: 32px; height: 32px; }
  .brand__text {
    font-size: 11px;
    letter-spacing: .14em;
    white-space: nowrap;
    min-width: 0;
  }
  .nav { inset-block-start: 58px; }

  .hero {
    min-height: auto;
    padding-block: clamp(4rem, 16vw, 6rem);
  }
  .hero__inner { gap: 1.15rem; }
  .hero-fit { grid-template-columns: 1fr; }
  .hero-fit span {
    min-height: 0;
    padding: .9rem;
  }

  .dm-fallback {
    font-size: clamp(1.45rem, 11vw, 2.35rem);
    letter-spacing: .06em;
    line-height: 1.08;
  }
  .eyebrow {
    font-size: 10px;
    letter-spacing: .18em;
    gap: .55rem;
  }
  .eyebrow::before { width: 18px; }
  .lede,
  .body-copy,
  .prose p,
  .legal__ct {
    text-align: left;
    hyphens: none;
    overflow-wrap: anywhere;
  }
  .hero .lede { text-align: left; }

  .btn-row { width: 100%; }
  .btn {
    min-height: 44px;
    width: 100%;
    justify-content: center;
    padding-inline: 1rem;
    text-align: center;
    white-space: normal;
  }

  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { padding: 1.15rem .9rem; }
  .stat:nth-child(2n) { border-right: 0; }
  .stat__l { letter-spacing: .12em; }

  .proof-strip { grid-template-columns: 1fr; }
  .proof-strip span {
    border-right: 0;
    border-bottom: 1px solid var(--line-2);
  }
  .proof-strip span:last-child { border-bottom: 0; }
  .lens-grid { grid-template-columns: 1fr; }
  .lens { min-height: 0; }
  .need { min-height: 0; }
  .need__t { max-width: none; }

  .cap {
    gap: .45rem;
    padding-block: 1.25rem;
  }
  .cap__proof {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .card {
    min-height: 0;
    padding: 1.2rem 1rem;
  }
  .card__foot {
    align-items: flex-start;
    flex-direction: column;
  }
  .card__cta { min-height: 44px; align-items: center; }

  .terminal {
    min-height: 220px;
    padding: .95rem 1rem;
  }
  .terminal__bar {
    flex-wrap: wrap;
    gap: .35rem .8rem;
  }

  .repo__meta {
    flex-wrap: wrap;
    gap: .45rem .85rem;
  }
  .step { padding: 1.25rem 1rem; }

  .footer__grid { gap: 1.75rem; }
  .footer h4 {
    font-size: 9px;
    letter-spacing: .18em;
  }
  .footer li a,
  .footer p {
    font-size: 12px;
  }
  .footer__legal {
    display: grid;
    gap: .65rem;
    letter-spacing: .1em;
  }

  .crumbs {
    letter-spacing: .12em;
    row-gap: .35rem;
  }
  .facts { margin-top: .5rem; }
  .legal h2 {
    align-items: flex-start;
    gap: .65rem;
    letter-spacing: .1em;
    line-height: 1.45;
  }
  .legal__clauses li {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: .5rem;
  }
  .pager--next { text-align: left; }
}

@media (max-width: 380px) {
  .brand__mark { width: 30px; height: 30px; }
  .brand__text {
    font-size: 10.5px;
    letter-spacing: .1em;
  }
  .hero__meta {
    display: grid;
    justify-items: center;
    gap: .45rem;
  }
  .stats { grid-template-columns: 1fr; }
  .stat { border-right: 0; }
}

/* ===========================================================================
   Booking  (/book/)
   =========================================================================== */

.cal-tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }
.cal-tab {
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  padding: .7rem 1.1rem; border: 1px solid var(--line); border-radius: 2px;
  color: var(--dim); display: grid; gap: .25rem; text-align: left;
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}
.cal-tab:hover { color: var(--ink); border-color: var(--ink-2); }
.cal-tab[aria-pressed="true"] { color: #000; background: var(--ink); border-color: var(--ink); }
.cal-tab small {
  display: block; font-size: 10px; letter-spacing: .1em; opacity: .7; text-transform: none;
}

.cal-embed {
  min-height: 620px;
  border: 1px solid var(--line); border-radius: 3px;
  background: rgba(255,255,255,.014);
  overflow: hidden;
}
.cal-embed.is-failed { min-height: 0; padding: 1.5rem; }
.cal-status {
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--faint); min-height: 1.2em; margin-bottom: .75rem;
}
@media (max-width: 640px) { .cal-embed { min-height: 540px; } }
