/* archesign.studio — template storefront
   Same brand language as the robots section (site/): drafting paper + ink,
   one drawing blue, one checking red; Geist for text, Geist Mono for annotations.
   Motifs: dimension-line section heads, title-block strips, sheet frames with corner marks. */

:root {
  --paper: #f4f3ee;
  --paper-2: #ebe9e2;
  --card: #fbfaf7;
  --ink: #111417;
  --ink-2: #353a41;
  --mute: #646a73;
  --rule: #d4d1c7;
  --rule-2: #e3e0d7;
  --blue: #2340a8;
  --blue-2: #1a2f82;
  --blue-soft: #e1e6f5;
  --red: #d2432a;
  --red-soft: #f7e2dc;
  --dark: #0f1216;
  --dark-rule: #2b313a;
  --dark-text: #c9ced6;

  --f-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --f-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --max: 1240px;
  --gut: 24px;
  --r: 4px;
  --sec: clamp(56px, 8vw, 104px);
  --head-h: 64px;
}

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.022em; line-height: 1.12; }
h1 { font-size: clamp(40px, 6vw, 80px); letter-spacing: -0.04em; line-height: 1.0; }
h2 { font-size: clamp(28px, 3.4vw, 44px); }
h3 { font-size: 21px; letter-spacing: -0.015em; line-height: 1.25; }
ul, ol { margin: 0; padding: 0; }
strong { font-weight: 600; }
code { font-family: var(--f-mono); font-size: .88em; background: var(--paper-2); padding: 1px 5px; border-radius: 3px; overflow-wrap: anywhere; }
::selection { background: var(--blue); color: #fff; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 2px; }
.menu-open { overflow: hidden; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gut); }
.mono { font-family: var(--f-mono); }
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--r);
  text-decoration: none; font-size: 14px;
}
.skip:focus { top: 12px; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--mute);
}
.eyebrow::before { content: ""; width: 7px; height: 7px; background: var(--blue); flex: none; }
.eyebrow--red::before { background: var(--red); }
.lead { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.55; color: var(--ink-2); max-width: 50ch; }
.muted { color: var(--mute); }
.small { font-size: 14px; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  font: 500 15px/1.2 var(--f-sans); letter-spacing: -0.005em; text-align: center;
  border: 1px solid var(--ink); border-radius: var(--r);
  background: transparent; color: var(--ink); text-decoration: none; cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn--blue { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn--blue:hover { background: var(--blue-2); border-color: var(--blue-2); color: #fff; }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn--light { border-color: #fff; color: #fff; }
.btn--light:hover { background: #fff; color: var(--ink); }
.btn .arr { font-family: var(--f-mono); transition: transform .18s ease; }
.btn:hover .arr { transform: translateX(3px); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.textlink {
  font-family: var(--f-mono); font-size: 12.5px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--blue); text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px;
}
.textlink:hover { color: var(--ink); }

/* ---------------------------------------------------------------- header (no transform/filter here: the mobile menu is fixed inside it) */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.scrolled .site-header { background: var(--card); }
.head-in { display: flex; align-items: center; gap: 24px; height: var(--head-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex: none; }
.brand svg { width: 30px; height: 30px; }
.brand__txt { display: inline-flex; align-items: baseline; }
.brand__word { font-weight: 600; font-size: 19px; letter-spacing: -0.03em; }
.brand__tld { font-family: var(--f-mono); font-size: 12px; color: var(--mute); letter-spacing: 0.02em; margin-left: 1px; }
.brand__sec {
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--blue); border: 1px solid var(--blue); padding: 3px 6px 2px; border-radius: 2px; margin-left: 4px;
}
.site-nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.site-nav a {
  font-size: 15px; text-decoration: none; color: var(--ink-2);
  padding: 8px 12px; border-radius: var(--r);
}
.site-nav a:hover { color: var(--ink); background: var(--paper-2); }
.site-nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--blue); border-radius: 0; }
.site-nav .nav-cta { margin-left: 10px; background: var(--ink); color: var(--paper); padding: 9px 16px; }
.site-nav .nav-cta:hover { background: var(--blue); color: #fff; }
.site-nav .nav-cta[aria-current="page"] { box-shadow: none; border-radius: var(--r); background: var(--blue); color: #fff; }
.menu-btn {
  display: none; margin-left: auto; position: relative; z-index: 120;
  width: 46px; height: 46px; border: 1px solid var(--rule); border-radius: var(--r);
  background: var(--card); cursor: pointer; color: var(--ink);
}
.menu-btn span, .menu-btn span::before, .menu-btn span::after {
  position: absolute; left: 50%; width: 20px; height: 1.6px; background: currentColor; content: "";
  transition: transform .2s ease, opacity .2s ease;
}
.menu-btn span { top: 50%; transform: translate(-50%, -50%); }
.menu-btn span::before { left: 0; top: -6px; }
.menu-btn span::after { left: 0; top: 6px; }
.menu-open .menu-btn span { background: transparent; }
.menu-open .menu-btn span::before { transform: translateY(6px) rotate(45deg); }
.menu-open .menu-btn span::after { transform: translateY(-6px) rotate(-45deg); }
.nav-foot { display: none; }

/* ---------------------------------------------------------------- section shell */
.sec { padding: var(--sec) 0; }
.sec--tight { padding: calc(var(--sec) * .6) 0; }
.sec--paper2 { background: var(--paper-2); }
.sec--line { border-top: 1px solid var(--rule); }
.sec--dark {
  background-color: var(--dark); color: var(--dark-text);
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 32px 32px;
}
.sec--dark h2, .sec--dark h3 { color: #fff; }
.sec--dark .eyebrow { color: #8d95a1; }
.sec--dark .eyebrow::before { background: #6f8cff; }

/* section heading = a dimension line: |——— 03 · LABEL ———| */
.dim-head { margin-bottom: clamp(32px, 4vw, 52px); }
.dim {
  display: flex; align-items: center; gap: 14px; margin-bottom: 22px;
  font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mute);
}
.dim::before, .dim::after { content: ""; height: 9px; flex: 1; min-width: 16px; background:
  linear-gradient(currentColor, currentColor) left center / 100% 1px no-repeat,
  linear-gradient(currentColor, currentColor) left center / 1px 9px no-repeat; opacity: .55; }
.dim::after { background:
  linear-gradient(currentColor, currentColor) left center / 100% 1px no-repeat,
  linear-gradient(currentColor, currentColor) right center / 1px 9px no-repeat; }
.dim b { color: var(--blue); font-weight: 500; }
.sec--dark .dim b { color: #8ea4ff; }
.dim-head__row { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px 56px; align-items: end; }
.dim-head__row p { margin: 0; color: var(--ink-2); }
.sec--dark .dim-head__row p { color: var(--dark-text); }
.dim-head__row .btn, .dim-head__row .textlink { justify-self: end; }

/* title block: a row of labelled cells, like a drawing's antet */
.tblock {
  display: grid; grid-template-columns: repeat(var(--tb, 6), minmax(0, 1fr));
  border: 1px solid var(--ink); background: var(--card); margin: 0;
}
.tblock > div { padding: 10px 14px 12px; border-left: 1px solid var(--rule); min-width: 0; }
.tblock > div:first-child { border-left: 0; }
.tblock dt { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mute); margin-bottom: 4px; }
.tblock dd { margin: 0; font-size: 15px; font-weight: 500; line-height: 1.35; overflow-wrap: anywhere; }
.tblock dd.big { font-size: clamp(22px, 2.4vw, 30px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; }

/* sheet frame with corner marks */
.sheet { position: relative; margin: 0; }
.sheet::before, .sheet::after {
  content: ""; position: absolute; width: 14px; height: 14px; border: 0 solid var(--ink); pointer-events: none;
}
.sheet::before { top: -5px; left: -5px; border-top-width: 2px; border-left-width: 2px; }
.sheet::after { bottom: -5px; right: -5px; border-bottom-width: 2px; border-right-width: 2px; }

/* ---------------------------------------------------------------- hero (home) */
.hero {
  position: relative; padding: clamp(44px, 6vw, 88px) 0 clamp(40px, 5vw, 72px);
  border-bottom: 1px solid var(--rule);
  background-image:
    linear-gradient(var(--rule-2) 1px, transparent 1px),
    linear-gradient(90deg, var(--rule-2) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: -1px -1px;
}
.hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 48px 56px; align-items: center; }
.hero h1 { margin: 18px 0 22px; }
.hero h1 em { font-style: normal; color: var(--blue); }
.hero .lead { margin-bottom: 30px; }
.hero__note { margin-top: 18px; font-family: var(--f-mono); font-size: 12.5px; letter-spacing: .04em; color: var(--mute); }
.hero__note b { color: var(--red); font-weight: 500; }
.hero .tblock { margin-top: clamp(40px, 5vw, 64px); }

/* overlapping stack of three template screens — all offsets in %, so it never leaves its box */
.stack { position: relative; aspect-ratio: 1.12; }
.stack figure { position: absolute; margin: 0; width: 66%; background: var(--card); border: 1px solid var(--ink); }
.stack figure img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.stack figcaption {
  display: flex; justify-content: space-between; gap: 10px; padding: 6px 10px;
  border-top: 1px solid var(--ink); font-family: var(--f-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
}
.stack figcaption b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.stack figcaption span { color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.stack figure:nth-child(1) { left: 0; top: 0; }
.stack figure:nth-child(2) { left: 34%; top: 14%; }
.stack figure:nth-child(3) { left: 12%; top: 50%; box-shadow: 10px 10px 0 var(--paper-2); }
.stack a { text-decoration: none; color: inherit; display: block; }
.stack a:hover figcaption b { color: var(--blue); }
.stack__dim {
  position: absolute; right: 0; top: 4%; width: 34%; display: flex; align-items: center; gap: 6px;
  font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .08em; color: var(--mute); text-transform: uppercase;
}
.stack__dim::before, .stack__dim::after { content: ""; flex: 1; height: 1px; background: var(--mute); opacity: .6; }

/* ---------------------------------------------------------------- value props */
.why { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.why > div { padding: 26px 24px 8px 0; min-width: 0; }
.why > div + div { padding-left: 24px; border-left: 1px solid var(--rule); }
.why .num { font-family: var(--f-mono); font-size: 12px; color: var(--blue); letter-spacing: .08em; }
.why h3 { margin: 14px 0 10px; }
.why p { margin: 0; color: var(--ink-2); font-size: 16px; }

.aud { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 36px; }
.aud li {
  list-style: none; font-family: var(--f-mono); font-size: 12.5px; letter-spacing: .04em;
  border: 1px solid var(--rule); background: var(--card); padding: 7px 12px; border-radius: 999px;
}

/* ---------------------------------------------------------------- template cards */
.tgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 24px; }
.tgrid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 20px; }
.tgrid--4 .tcard h3 { font-size: 21px; }
.tgrid--4 .tcard__body { padding: 14px 16px 16px; }
.tcard {
  display: flex; flex-direction: column; min-width: 0;
  background: var(--card); border: 1px solid var(--ink);
  transition: box-shadow .2s ease;
}
.tcard:hover { box-shadow: 8px 8px 0 var(--paper-2); }
.sec--paper2 .tcard:hover { box-shadow: 8px 8px 0 var(--rule); }
.tcard__img { display: block; border-bottom: 1px solid var(--ink); overflow: hidden; background: #fff; }
.tcard__img img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; transition: opacity .2s ease; }
.tcard:hover .tcard__img img { opacity: .92; }
.tcard__body { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 18px; flex: 1; }
.tcard__meta {
  display: flex; justify-content: space-between; gap: 12px;
  font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--mute);
}
.tcard__meta b { color: var(--blue); font-weight: 500; }
.tcard__meta span:last-child { text-align: right; }
.tcard h2, .tcard h3 { font-size: 23px; letter-spacing: -0.02em; line-height: 1.2; }
.tcard h2 a, .tcard h3 a { text-decoration: none; }
.tcard h2 a:hover, .tcard h3 a:hover { color: var(--blue); }
.tcard p { margin: 0; color: var(--ink-2); font-size: 15px; line-height: 1.5; }
.tcard__foot {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--rule);
}
.tcard__fonts { font-family: var(--f-mono); font-size: 11.5px; color: var(--mute); letter-spacing: .02em; min-width: 0; }

/* ---------------------------------------------------------------- niche register (home) */
.register { border-top: 1px solid var(--ink); }
.reg {
  display: grid; grid-template-columns: 56px minmax(0, 1.05fr) minmax(0, 1.6fr) auto; gap: 24px; align-items: center;
  padding: 22px 0; border-bottom: 1px solid var(--rule);
}
.reg__code {
  width: 44px; height: 44px; display: grid; place-items: center;
  border: 1px solid var(--ink); font-family: var(--f-mono); font-size: 18px; font-weight: 500;
}
.reg h3 { font-size: 20px; }
.reg p { margin: 6px 0 0; color: var(--ink-2); font-size: 15px; line-height: 1.5; }
.reg__thumbs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.reg__thumbs a { display: block; border: 1px solid var(--rule); background: #fff; }
.reg__thumbs a:hover { border-color: var(--ink); }
.reg__thumbs img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.reg .textlink { white-space: nowrap; }

/* ---------------------------------------------------------------- what's in the box */
.inbox { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); gap: 40px 64px; align-items: start; }
@media (min-width: 921px) { .inbox .tree { position: sticky; top: calc(var(--head-h) + 24px); } }
.checks li {
  list-style: none; position: relative; padding: 12px 0 12px 34px; border-bottom: 1px solid var(--rule);
}
.checks li::before {
  content: ""; position: absolute; left: 0; top: 17px; width: 16px; height: 16px; border: 1.5px solid var(--blue);
  background: linear-gradient(var(--blue), var(--blue)) center / 6px 6px no-repeat;
}
.checks li b { display: block; font-weight: 600; }
.checks li span { color: var(--ink-2); font-size: 15.5px; }
.sec--dark code { background: #232831; color: #dfe4ec; }
.tree {
  margin: 0; padding: 22px 24px; background: var(--dark); color: #dfe4ec; border-radius: var(--r);
  font: 13.5px/1.75 var(--f-mono); overflow-x: auto; max-width: 100%;
}
.tree .c { color: #8d95a1; }
.tree .h { color: #9fb2ff; }

/* ---------------------------------------------------------------- steps */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; counter-reset: s; }
.steps li { list-style: none; padding: 0 24px 0 0; min-width: 0; }
.steps li + li { padding-left: 24px; border-left: 1px dashed var(--dark-rule); }
.steps .num { display: block; font-family: var(--f-mono); font-size: 40px; color: #8ea4ff; letter-spacing: -0.02em; line-height: 1; margin-bottom: 18px; }
.steps h3 { margin-bottom: 10px; }
.steps p { margin: 0; font-size: 15.5px; }
.steps .tag { display: inline-block; margin-top: 12px; font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #ffb4a4; border: 1px solid #6b3a31; padding: 3px 7px; }

/* ---------------------------------------------------------------- FAQ (summary stays block: no flex/grid) */
.faq { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr); gap: 32px 64px; align-items: start; }
.faq__list { border-top: 1px solid var(--ink); }
.faq__group + .faq__group { margin-top: 48px; }
.faq__group h2 { font-size: 24px; margin-bottom: 14px; }
details { border-bottom: 1px solid var(--rule); }
summary {
  display: block; position: relative; list-style: none; cursor: pointer;
  padding: 18px 44px 18px 0; font-size: 18px; font-weight: 500; letter-spacing: -0.01em;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%; width: 26px; height: 26px; margin-top: -13px;
  display: grid; place-items: center; border: 1px solid var(--rule); font-family: var(--f-mono); font-size: 16px; color: var(--blue);
}
details[open] summary::after { content: "–"; }
summary:hover { color: var(--blue); }
details > div { padding: 0 44px 20px 0; color: var(--ink-2); }
details > div p:last-child { margin-bottom: 0; }

/* ---------------------------------------------------------------- CTA band */
.band { background: var(--blue); color: #fff; padding: clamp(48px, 6vw, 80px) 0; }
.band__in { display: flex; justify-content: space-between; align-items: center; gap: 28px; flex-wrap: wrap; }
.band h2 { color: #fff; max-width: 22ch; }
.band p { margin: 10px 0 0; color: #d7defa; max-width: 54ch; }

/* ---------------------------------------------------------------- page head (inner pages) */
.phead {
  padding: clamp(40px, 5vw, 72px) 0 clamp(32px, 4vw, 52px); border-bottom: 1px solid var(--rule);
  background-image:
    linear-gradient(var(--rule-2) 1px, transparent 1px),
    linear-gradient(90deg, var(--rule-2) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: -1px -1px;
}
.phead h1 { margin: 16px 0 18px; font-size: clamp(38px, 5.2vw, 68px); }
.phead .lead { margin: 0; }

.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px 0; font-family: var(--f-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--mute); }
.crumbs li { list-style: none; }
.crumbs li + li::before { content: "/"; margin: 0 10px; color: var(--rule); }
.crumbs a { text-decoration: none; color: var(--ink-2); }
.crumbs a:hover { color: var(--blue); }

/* ---------------------------------------------------------------- catalog */
.tools { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); gap: 18px 32px; align-items: start; margin-bottom: 30px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font: 500 14px/1 var(--f-sans); padding: 9px 13px; border: 1px solid var(--rule); background: var(--card); color: var(--ink-2);
  border-radius: 999px; cursor: pointer; min-height: 38px;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip small { font-family: var(--f-mono); font-size: 11px; opacity: .7; margin-left: 4px; }
.chip .code { font-family: var(--f-mono); font-size: 11.5px; color: var(--blue); margin-right: 6px; }
.chip[aria-pressed="true"] .code { color: #9fb2ff; }
.search label { display: block; font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); margin-bottom: 6px; }
.search__box { position: relative; }
.search__box svg { position: absolute; left: 13px; top: 50%; width: 17px; height: 17px; margin-top: -8.5px; color: var(--mute); pointer-events: none; }
.search input {
  width: 100%; min-width: 0; height: 46px; padding: 0 14px 0 40px;
  font: 16px var(--f-sans); color: var(--ink); background: var(--card);
  border: 1px solid var(--ink); border-radius: var(--r);
}
.search input::placeholder { color: #8a8f97; }
.niche-select { display: none; }
.niche-select select {
  width: 100%; min-width: 0; height: 46px; padding: 0 40px 0 14px; appearance: none;
  font: 16px var(--f-sans); color: var(--ink); background-color: var(--card); border: 1px solid var(--ink); border-radius: var(--r);
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat;
}
.count { font-family: var(--f-mono); font-size: 12.5px; letter-spacing: .05em; color: var(--mute); margin: 0 0 18px; }
.count b { color: var(--ink); font-weight: 500; }
.empty { padding: 48px 24px; border: 1px dashed var(--ink); text-align: center; background: var(--card); }
.empty p { margin: 0 0 16px; }

/* ---------------------------------------------------------------- template detail */
.dhead { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: 32px 56px; align-items: end; }
.dhead h1 { margin: 16px 0 16px; font-size: clamp(46px, 7vw, 96px); }
.dhead .lead { max-width: 56ch; }
.dhead .style { margin: 18px 0 0; font-family: var(--f-mono); font-size: 13px; letter-spacing: .03em; color: var(--mute); }
.dhead .style b { color: var(--ink); font-weight: 500; }

.pricebox { border: 1px solid var(--ink); background: var(--card); }
.pricebox__top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--rule); }
.pricebox__top .lbl { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.price { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.price--tbd { font-size: 17px; color: var(--red); font-weight: 500; letter-spacing: 0; }
.pricebox__body { padding: 16px 18px 18px; display: grid; gap: 10px; }
.pricebox__body .btn { width: 100%; }
.pricebox__body p { margin: 4px 0 0; font-size: 13.5px; color: var(--mute); line-height: 1.5; }
.buy-note {
  margin-top: 4px; padding: 12px 14px; border-left: 3px solid var(--red); background: var(--red-soft);
  font-size: 14.5px; line-height: 1.5; color: var(--ink);
}
.buy-note a { color: var(--blue); }

.devices { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 32px; align-items: end; }
.browser { margin: 0; border: 1px solid var(--ink); background: var(--card); min-width: 0; }
.browser__bar {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-bottom: 1px solid var(--ink); background: var(--paper-2);
}
.browser__dots { display: flex; gap: 6px; flex: none; }
.browser__dots i { width: 10px; height: 10px; border-radius: 50%; border: 1px solid var(--ink); display: block; }
.browser__url {
  flex: 1; min-width: 0; font-family: var(--f-mono); font-size: 12px; color: var(--mute); background: var(--card);
  border: 1px solid var(--rule); border-radius: 999px; padding: 3px 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.screen { overflow-y: auto; overflow-x: hidden; background: #fff; }
.screen img { width: 100%; height: auto; }
.browser .screen { aspect-ratio: 16 / 10; }
.phone {
  margin: 0; justify-self: center; width: 100%; max-width: 280px;
  border: 1px solid var(--ink); border-radius: 30px; padding: 12px; background: var(--ink);
}
.phone .screen { aspect-ratio: 390 / 800; border-radius: 20px; }
.phone--sm { max-width: 240px; border-radius: 26px; padding: 10px; }
.phone--sm .screen { border-radius: 17px; }
.devices__cap, .phones figcaption {
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .05em; color: var(--mute); margin-top: 14px;
}
.devices__cap { grid-column: 1 / -1; margin-top: 0; }

.pages { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; counter-reset: pg; }
.pg { border: 1px solid var(--ink); background: var(--card); display: flex; flex-direction: column; min-width: 0; }
.pg img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border-bottom: 1px solid var(--ink); background: #fff; }
.pg__body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.pg__file { font-family: var(--f-mono); font-size: 12px; color: var(--blue); letter-spacing: .03em; }
.pg h3 { font-size: 19px; }
.pg p { margin: 0 0 6px; font-size: 15px; color: var(--ink-2); line-height: 1.5; }
.pg .textlink { margin-top: auto; align-self: flex-start; }

.sig { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px 64px; align-items: start; }
.sig h2 { font-size: 26px; margin-bottom: 18px; }
.sig ol { counter-reset: sg; }
.sig ol li {
  list-style: none; counter-increment: sg; position: relative; padding: 12px 0 12px 44px; border-bottom: 1px solid var(--rule); font-size: 17px;
}
.sig ol li::before {
  content: counter(sg, decimal-leading-zero); position: absolute; left: 0; top: 14px;
  font-family: var(--f-mono); font-size: 12px; color: var(--red); letter-spacing: .06em;
}

.sched { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px 64px; }
.sched h2 { font-size: 26px; margin-bottom: 18px; }
.swatches { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.swatch { border: 1px solid var(--ink); background: var(--card); min-width: 0; }
.swatch i { display: block; height: 64px; border-bottom: 1px solid var(--ink); }
.swatch span { display: block; padding: 7px 9px 8px; font-family: var(--f-mono); font-size: 11.5px; line-height: 1.45; overflow-wrap: anywhere; }
.swatch span b { display: block; font-weight: 500; color: var(--ink); }
.swatch span { color: var(--mute); }
.specimens { display: grid; gap: 12px; }
.spec { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 18px; align-items: center; border: 1px solid var(--ink); background: var(--card); padding: 14px 16px; }
.spec__aa { font-size: 54px; line-height: 1; letter-spacing: -0.02em; text-align: center; color: var(--blue); }
.spec b { display: block; font-size: 16px; font-weight: 600; }
.spec__role { display: block; font-family: var(--f-mono); font-size: 11.5px; color: var(--mute); letter-spacing: .04em; text-transform: uppercase; }
.spec p { margin: 6px 0 0; font-size: 19px; line-height: 1.3; overflow-wrap: anywhere; }

.phones { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.phones figure { margin: 0; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.phones figcaption { text-align: center; }

.pn { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid var(--ink); padding-top: 22px; }
.pn a { text-decoration: none; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pn a:last-child { text-align: right; }
.pn span { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.pn b { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.pn a:hover b { color: var(--blue); }

/* ---------------------------------------------------------------- licence */
.draft {
  display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; margin-bottom: 40px;
  border: 1.5px solid var(--red); background: var(--red-soft); color: var(--ink);
}
.draft b { font-family: var(--f-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--red); flex: none; padding-top: 3px; font-weight: 500; }
.draft p { margin: 0; }
.lic { display: grid; grid-template-columns: minmax(0, 0.55fr) minmax(0, 1.45fr); gap: 32px 64px; align-items: start; }
.toc { position: sticky; top: calc(var(--head-h) + 24px); }
.toc ol { border-top: 1px solid var(--ink); }
.toc li { list-style: none; border-bottom: 1px solid var(--rule); }
.toc a { display: block; padding: 10px 0; text-decoration: none; font-size: 15px; color: var(--ink-2); }
.toc a:hover { color: var(--blue); }
.lic__body section { padding-bottom: 36px; margin-bottom: 36px; border-bottom: 1px solid var(--rule); scroll-margin-top: calc(var(--head-h) + 20px); }
.lic__body section:last-child { border-bottom: 0; margin-bottom: 0; }
.lic__body h2 { font-size: 28px; margin-bottom: 16px; }
.lic__body .cl { font-family: var(--f-mono); font-size: 12px; color: var(--blue); letter-spacing: .08em; display: block; margin-bottom: 8px; }
.lic__body ul { margin: 0 0 1em; }
.lic__body ul li { list-style: none; position: relative; padding: 6px 0 6px 28px; }
.lic__body ul.yes li::before, .lic__body ul.no li::before {
  position: absolute; left: 0; top: 6px; font-family: var(--f-mono); font-weight: 500;
}
.lic__body ul.yes li::before { content: "✓"; color: var(--blue); }
.lic__body ul.no li::before { content: "✕"; color: var(--red); }
.cando { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--ink); font-size: 15.5px; }
.cando th, .cando td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.cando th { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); font-weight: 500; }
.cando td:not(:first-child) { white-space: nowrap; font-family: var(--f-mono); font-size: 13px; }
.cando .y { color: var(--blue); }
.cando .n { color: var(--red); }
.cando .t { color: var(--mute); }
.lic__raw { margin: 0; padding: 20px 22px; background: var(--card); border: 1px solid var(--rule); font: 13px/1.7 var(--f-mono); white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink-2); }

/* ---------------------------------------------------------------- contact */
.contact { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr); gap: 40px 64px; align-items: start; }
.form { border: 1px solid var(--ink); background: var(--card); padding: clamp(20px, 3vw, 34px); }
.form__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field label, .field legend { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.field input, .field select, .field textarea {
  width: 100%; min-width: 0; max-width: 100%;
  font: 16px/1.4 var(--f-sans); color: var(--ink); background: #fff;
  border: 1px solid var(--rule); border-radius: var(--r); padding: 11px 12px;
}
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--ink-2); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); outline: 2px solid var(--blue-soft); outline-offset: 0; }
.field textarea { min-height: 150px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; color: var(--ink-2); }
.field label.check { font-family: var(--f-sans); font-size: 14.5px; letter-spacing: 0; text-transform: none; color: var(--ink-2); }
.check input { width: 18px; height: 18px; margin: 2px 0 0; flex: none; accent-color: var(--blue); }
.form__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-top: 22px; }
.form__foot .small { color: var(--mute); max-width: 40ch; margin: 0; }
.form-note { margin-top: 18px; padding: 14px 16px; border-left: 3px solid var(--blue); background: var(--blue-soft); }
.aside h2 { font-size: 22px; margin-bottom: 12px; }
.aside section + section { margin-top: 32px; padding-top: 28px; border-top: 1px solid var(--rule); }
.aside p { color: var(--ink-2); font-size: 16px; }
.aside ul li { list-style: none; padding: 8px 0; border-bottom: 1px dashed var(--rule); font-size: 15.5px; color: var(--ink-2); }

/* ---------------------------------------------------------------- footer */
.site-footer { background: var(--dark); color: #9aa2ad; padding: 64px 0 28px; font-size: 15px; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 32px; padding-bottom: 40px; border-bottom: 1px solid var(--dark-rule); }
.site-footer .brand { color: #fff; }
.site-footer .brand__tld { color: #8d95a1; }
.site-footer .brand__sec { color: #9fb2ff; border-color: #4a5a99; }
.site-footer p { margin: 16px 0 0; max-width: 36ch; }
.site-footer h2 { font-family: var(--f-mono); font-size: 11.5px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: #fff; margin-bottom: 14px; }
.site-footer ul li { list-style: none; margin-bottom: 8px; }
.site-footer a { text-decoration: none; color: #b7bec8; }
.site-footer a:hover { color: #fff; }
.foot-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 22px; font-family: var(--f-mono); font-size: 12px; letter-spacing: .04em; }

/* ---------------------------------------------------------------- reveal (opacity/transform only) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .tcard.reveal.is-in:hover { transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
}

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1080px) {
  .tgrid, .tgrid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .why { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .why > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .why > div:nth-child(n+3) { border-top: 1px solid var(--rule); margin-top: 18px; }
  .reg { grid-template-columns: 56px minmax(0, 1fr) auto; }
  .reg__thumbs { grid-column: 2 / -1; grid-row: 2; }
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .swatches { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tblock { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tblock > div:nth-child(3n+1) { border-left: 0; }
  .tblock > div:nth-child(n+4) { border-top: 1px solid var(--rule); }
}
@media (max-width: 920px) {
  :root { --head-h: 60px; }
  .menu-btn { display: inline-block; }
  .site-nav {
    position: fixed; inset: 0; z-index: 110; margin: 0;
    flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0;
    padding: calc(var(--head-h) + 24px) var(--gut) 32px;
    background: var(--paper); overflow-y: auto;
    visibility: hidden; opacity: 0; transition: opacity .2s ease, visibility .2s ease;
  }
  .menu-open .site-nav { visibility: visible; opacity: 1; }
  .site-nav a { font-size: 26px; font-weight: 500; letter-spacing: -0.02em; padding: 14px 0; border-bottom: 1px solid var(--rule); border-radius: 0; }
  .site-nav a:hover { background: transparent; color: var(--blue); }
  .site-nav a[aria-current="page"] { box-shadow: none; color: var(--blue); }
  .site-nav .nav-cta { margin: 24px 0 0; text-align: center; font-size: 17px; padding: 16px; border-radius: var(--r); border: 0; }
  .site-nav .nav-cta[aria-current="page"] { color: #fff; }
  .nav-foot { display: block; margin-top: auto; padding-top: 28px; font-family: var(--f-mono); font-size: 12px; letter-spacing: .05em; color: var(--mute); }

  .hero__grid, .dhead, .inbox, .faq, .sig, .sched, .contact, .lic, .tools, .dim-head__row { grid-template-columns: minmax(0, 1fr); }
  .dim-head__row .btn, .dim-head__row .textlink { justify-self: start; }
  .stack { max-width: 620px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 0; }
  .steps li:nth-child(3) { padding-left: 0; border-left: 0; }
  .devices { grid-template-columns: minmax(0, 1fr) 220px; gap: 20px; }
  .pages { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toc { position: static; }
  .pricebox { max-width: 520px; }
}
@media (max-width: 640px) {
  :root { --gut: 16px; }
  body { font-size: 16px; }
  .brand__tld { display: none; }
  .tgrid, .tgrid--4, .why, .pages, .form__grid, .steps { grid-template-columns: minmax(0, 1fr); }
  .why > div, .why > div + div { padding: 22px 0 6px; border-left: 0; }
  .why > div + div { border-top: 1px solid var(--rule); margin-top: 0; }
  .steps li, .steps li + li { padding: 0; border-left: 0; }
  .reg { grid-template-columns: 44px minmax(0, 1fr); gap: 14px 16px; padding: 20px 0; }
  .reg__code { width: 40px; height: 40px; font-size: 16px; }
  .reg__thumbs { grid-column: 1 / -1; grid-row: auto; gap: 6px; }
  .reg .textlink { grid-column: 1 / -1; justify-self: start; }
  .tblock { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tblock > div:nth-child(3n+1) { border-left: 1px solid var(--rule); }
  .tblock > div:nth-child(2n+1) { border-left: 0; }
  .tblock > div:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .filters { display: none; }
  .niche-select { display: block; }
  .tools { gap: 14px; margin-bottom: 22px; }
  .devices { grid-template-columns: minmax(0, 1fr); }
  .browser .screen { aspect-ratio: 4 / 5; }
  .phone { max-width: 250px; }
  .phones { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .swatches { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spec { grid-template-columns: 64px minmax(0, 1fr); gap: 14px; }
  .spec__aa { font-size: 40px; }
  .foot-grid { grid-template-columns: minmax(0, 1fr); }
  .hero .tblock dd.big { font-size: 24px; }
  .stack figure:nth-child(3) { box-shadow: 6px 6px 0 var(--paper-2); }
  .stack figcaption { font-size: 10px; padding: 4px 7px; }
  .stack figcaption span { display: none; }
  .reg { align-items: start; }
  .stack__dim { display: none; }
  .btn-row .btn { flex: 1 1 100%; }
  summary { font-size: 17px; }
  .pn b { font-size: 17px; }
  .pn a { max-width: 48%; }
  .cando thead { display: none; }
  .cando, .cando tbody, .cando tr, .cando td { display: block; width: 100%; }
  .cando tr { padding: 10px 14px; border-bottom: 1px solid var(--rule); }
  .cando td { padding: 3px 0; border: 0; white-space: normal !important; }
  .cando td:first-child { font-weight: 600; margin-bottom: 4px; }
  .cando td[data-l]::before { content: attr(data-l) ": "; color: var(--mute); }
  .draft { flex-direction: column; gap: 6px; }
}
