/* Client portfolio engine - layout and components.
   Colors and fonts come from the preset block injected in <head>
   (engine/presets.mjs). Nothing here uses a literal color. */

:root {
  --rail-w: 0px;
  --gutter: clamp(16px, 4vw, 56px);
  --measure: 62ch;
  --r-lg: 22px;
  --r-md: 14px;
  --r-sm: 8px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --fs-hero: clamp(2.6rem, 1.2rem + 4.6vw, 5.4rem);
  --fs-h2: clamp(1.75rem, 1.2rem + 1.8vw, 2.75rem);
  --fs-h3: clamp(1.12rem, 1rem + .4vw, 1.35rem);
  --fs-body: 1rem;
  --fs-small: .875rem;
  --fs-tiny: .75rem;
  --shadow: 0 1px 0 var(--line), 0 18px 40px -28px color-mix(in srgb, var(--ink) 45%, transparent);
}
@media (min-width: 1100px) { :root { --rail-w: 300px; } }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; -webkit-text-size-adjust: 100%; }
@media (max-width: 1099px) { html { scroll-padding-top: 84px; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 var(--fs-body)/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--accent-ink); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 14px; background: var(--ink); color: var(--bg); border-radius: var(--r-sm); }
.skip:focus { top: 12px; }

/* ---------- background ---------- */
.contours { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: .5; }

/* ---------- shell ---------- */
.shell { position: relative; z-index: 1; }
.main {
  margin-left: var(--rail-w);
  padding-inline: var(--gutter);
  padding-block: 0 calc(120px + env(safe-area-inset-bottom, 0px));
  max-width: calc(1180px + var(--rail-w));
}
@media (min-width: 1100px) { .main { padding-bottom: 64px; } }

/* ---------- rail (desktop) ---------- */
.rail { display: none; }
@media (min-width: 1100px) {
  .rail {
    display: flex; flex-direction: column; gap: 26px;
    position: fixed; inset: 0 auto 0 0; width: var(--rail-w);
    padding: 28px 24px 24px;
    background: color-mix(in srgb, var(--surface) 82%, transparent);
    border-right: 1px solid var(--line);
    overflow-y: auto;
    z-index: 5;
  }
}
.rail__id { display: flex; align-items: center; gap: 14px; }
.rail__avatar { width: 56px; height: 56px; border-radius: 16px; object-fit: cover; flex: none; }
.rail__avatar--mono, .topbar__avatar--mono, .about__mono--mono {
  display: grid; place-items: center; background: var(--accent); color: var(--on-accent);
  font: var(--display-weight) 2.4rem/1 var(--font-display); font-stretch: var(--display-stretch); letter-spacing: var(--display-tracking);
}
.rail__avatar.rail__avatar--mono { font-size: 1.35rem; }
.rail__name { font: var(--display-weight) 1.2rem/1.15 var(--font-display); font-stretch: var(--display-stretch); letter-spacing: var(--display-tracking); }
.rail__role { margin-top: 3px; color: var(--muted); font-size: var(--fs-small); line-height: 1.35; }
.rail__label { font-size: var(--fs-tiny); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.rail__now { display: grid; gap: 8px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.rail__status { display: flex; align-items: center; gap: 10px; font-size: var(--fs-small); font-weight: 600; }
.rail__end { display: grid; gap: 14px; margin-top: auto; }
.rail__tools { display: flex; gap: 6px; padding-top: 14px; border-top: 1px solid var(--line); }
.rail__tools .icon-btn { width: 36px; height: 36px; border-radius: 10px; }
.rail__tools .theme-btn { margin-left: auto; }

.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.dot[data-state="open"], [data-status].is-online .dot { background: var(--good); box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 25%, transparent); }
.dot[data-state="limited"] { background: var(--warn); }
.dot[data-state="closed"] { background: var(--muted); }

.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  cursor: pointer; text-decoration: none; transition: background .2s, border-color .2s;
}
.icon-btn:hover { background: var(--surface-2); border-color: color-mix(in srgb, var(--ink) 25%, transparent); }
.theme-btn svg:last-child { display: none; }
:root[data-theme="dark"] .theme-btn svg:first-child { display: none; }
:root[data-theme="dark"] .theme-btn svg:last-child { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-btn svg:first-child { display: none; }
  :root:not([data-theme="light"]) .theme-btn svg:last-child { display: block; }
}

/* Desktop section index: numbered entries on a track line; the active one
   takes the accent. */
.nav { display: grid; }
.nav .rail__label { margin-bottom: 10px; }
.nav__link {
  display: flex; align-items: baseline; gap: 14px; padding: 8px 0 8px 16px;
  border-left: 1px solid var(--line); color: var(--muted); text-decoration: none;
  font-weight: 500; font-size: .95rem; transition: color .2s, border-color .2s;
}
.nav__link:hover { color: var(--ink); border-left-color: color-mix(in srgb, var(--ink) 40%, transparent); }
.nav__link.is-active { color: var(--ink); border-left: 2px solid var(--accent); padding-left: 15px; }
.nav__num { min-width: 2ch; font-size: var(--fs-tiny); font-variant-numeric: tabular-nums; color: var(--muted); }
.nav__link.is-active .nav__num { color: var(--accent-ink); }

/* ---------- top bar + tab bar (phone/tablet) ---------- */
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 6;
  display: flex; align-items: center; gap: 12px;
  padding: 12px var(--gutter);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar__avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; font-size: 1rem; }
.topbar__id { min-width: 0; flex: 1; }
.topbar__name { font: var(--display-weight) 1.02rem/1.2 var(--font-display); font-stretch: var(--display-stretch); }
.topbar__role { font-size: var(--fs-tiny); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 1100px) { .topbar, .tabbar { display: none !important; } }

.tabbar {
  position: fixed; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  z-index: 8; display: flex; align-items: center; gap: 2px; padding: 6px;
  width: min(440px, calc(100% - 24px));
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow);
  transition: transform .35s var(--ease);
}
.tabbar.is-hidden { transform: translate(-50%, 140%); }
.tab {
  flex: 1; display: grid; justify-items: center; gap: 2px; padding: 7px 4px; border-radius: 999px;
  color: var(--muted); text-decoration: none; font-size: .68rem; font-weight: 600;
}
.tab.is-active { color: var(--ink); background: var(--surface-2); }
.tab--cta { flex: 0 0 52px; height: 52px; margin-block: -10px; place-items: center; background: var(--accent); color: var(--on-accent); box-shadow: 0 10px 24px -10px var(--accent); }
.tab--cta svg { width: 22px; height: 22px; }

/* ---------- shared ---------- */
.section { padding-block: clamp(56px, 8vw, 104px) 0; }
.section--first { padding-top: clamp(28px, 6vw, 72px); }
.sample-note { margin-top: 20px; padding: 8px 14px; border: 1px dashed var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--muted); font-size: var(--fs-tiny); }
.sample-note + .section--first { padding-top: clamp(20px, 4vw, 48px); }
.section__head { display: grid; gap: 12px; margin-bottom: clamp(24px, 3.5vw, 40px); max-width: var(--measure); }
.section__head h2, .about__text h2, .contact__lead h2 {
  font: var(--display-weight) var(--fs-h2)/1.05 var(--font-display);
  font-stretch: var(--display-stretch); letter-spacing: var(--display-tracking);
}
.section__head p { color: var(--muted); font-size: 1.05rem; }
.card-h { font: 600 var(--fs-small)/1.3 var(--font-body); color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  font: 600 .95rem/1 var(--font-body); text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: transform .2s var(--ease), background .2s, box-shadow .2s;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--ink); color: var(--bg); }
.btn--primary:hover { background: var(--accent); color: var(--on-accent); }
.btn--ghost { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn--ghost:hover { border-color: color-mix(in srgb, var(--ink) 35%, transparent); }

mark, .case__metric mark {
  background: linear-gradient(transparent 12%, var(--mark-bg) 12%, var(--mark-bg) 88%, transparent 88%);
  color: var(--mark-ink); padding: 0 .18em; margin: 0 -.06em; border-radius: 3px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}

/* ---------- hero ---------- */
.hero { display: grid; gap: clamp(16px, 2vw, 24px); max-width: 980px; }
.hero__avail { display: inline-flex; align-items: center; gap: 10px; justify-self: start; padding: 6px 14px 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: var(--fs-small); font-weight: 500; }
.hero__title {
  font: var(--display-weight) var(--fs-hero)/.98 var(--font-display);
  font-stretch: var(--display-stretch); letter-spacing: var(--display-tracking);
  max-width: 17ch;
}
.hero__line { display: inline; }
.hero__lede { font-size: clamp(1.05rem, 1rem + .35vw, 1.25rem); color: var(--muted); max-width: 54ch; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }

/* The one orchestrated moment: the hero settles in on load. Visible at rest. */
@media (prefers-reduced-motion: no-preference) {
  .hero > * { animation: rise .9s var(--ease) both; }
  .hero > :nth-child(2) { animation-delay: .06s; }
  .hero > :nth-child(3) { animation-delay: .14s; }
  .hero > :nth-child(4) { animation-delay: .2s; }
  .glance { animation: rise .9s .28s var(--ease) both; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } }
}

/* ---------- glance ---------- */
.glance {
  display: grid; gap: 12px; margin-top: clamp(28px, 4vw, 48px);
  grid-template-columns: 1fr;
}
@media (min-width: 760px) { .glance { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); } }
.glance > * { min-width: 0; }
.glance__stats {
  margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
}
.stat { display: flex; flex-direction: column-reverse; justify-content: center; gap: 6px; padding: 20px 18px; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat dd { margin: 0; font: var(--display-weight) clamp(1.5rem, 1.1rem + 1.2vw, 2.1rem)/1 var(--font-display); font-stretch: var(--display-stretch); letter-spacing: var(--display-tracking); font-variant-numeric: tabular-nums; }
.stat dt { font-size: var(--fs-tiny); color: var(--muted); line-height: 1.35; }

.hours { padding: 18px 20px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); display: grid; gap: 10px; }
.hours__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; }
.hours__now { font-size: var(--fs-small); font-weight: 600; }
.hours__band { position: relative; height: 30px; border-radius: 8px; background: repeating-linear-gradient(90deg, var(--surface-2) 0 calc(100% / 24 - 1px), var(--surface) 0 calc(100% / 24)); overflow: hidden; }
.hours__fill { position: absolute; top: 0; bottom: 0; left: 0; width: 0; background: color-mix(in srgb, var(--accent) 78%, transparent); }
.hours__fill--wrap { display: none; }
.hours__mark { position: absolute; top: -2px; bottom: -2px; width: 2px; left: 0; background: var(--ink); display: none; }
.hours__mark::after { content: ""; position: absolute; top: -3px; left: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); }
.hours__scale { display: flex; justify-content: space-between; font-size: .68rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.hours__note { font-size: var(--fs-small); color: var(--muted); }
.hours__note b { color: var(--ink); font-weight: 600; }

.tools { grid-column: 1 / -1; display: grid; gap: 10px; padding: 12px 12px 12px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); min-width: 0; }
.tools__row { display: flex; align-items: center; gap: 18px; min-width: 0; }
.tools__row + .tools__row { padding-top: 10px; border-top: 1px solid var(--line); }
.tools .card-h { flex: none; width: 9ch; color: var(--ink); }
.tools__viewport { flex: 1; min-width: 0; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.tools__track { display: flex; gap: 8px; width: max-content; list-style: none; }
@media (prefers-reduced-motion: no-preference) { .tools__track { animation: marquee calc(var(--n, 14) * 2.8s) linear infinite; } .tools__row:nth-child(even) .tools__track { animation-direction: reverse; } .tools:hover .tools__track { animation-play-state: paused; } }
@media (prefers-reduced-motion: reduce) { .tools__viewport { overflow-x: auto; } }
@keyframes marquee { to { transform: translateX(-50%); } }
.tool { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; background: var(--surface-2); font-size: var(--fs-small); font-weight: 500; white-space: nowrap; }
.tool__dot { width: 6px; height: 6px; border-radius: 2px; background: var(--accent); transform: rotate(45deg); }
/* Brand logos sit on white in both themes: many are black or dark and
   vanish on a dark chip. The one literal color here, on purpose. */
.tool__logo, .tool__icon { display: grid; place-items: center; flex: none; width: 24px; height: 24px; margin: -3px 0 -3px -6px; border-radius: 7px; }
.tool__logo { background: #fff; box-shadow: 0 0 0 1px var(--line); }
.tool__logo img { width: 16px; height: 16px; object-fit: contain; }
.tool__icon { background: color-mix(in srgb, var(--accent) 16%, var(--surface)); color: var(--accent-ink); }
.tool__icon svg { width: 15px; height: 15px; }

/* ---------- work samples ---------- */
.cases { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 820px) { .cases { grid-template-columns: repeat(2, minmax(0, 1fr)); } .case--wide { grid-column: 1 / -1; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); } }
.case { display: grid; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; min-width: 0; }
.case__preview { margin: 0; position: relative; padding: clamp(14px, 2.4vw, 26px) clamp(14px, 2.4vw, 26px) 40px; background: var(--surface-2); min-width: 0; }
.case__preview > img { border-radius: var(--r-md); border: 1px solid var(--line); width: 100%; height: auto; }
.case__preview figcaption { position: absolute; left: clamp(14px, 2.4vw, 26px); bottom: 12px; font-size: .7rem; color: var(--muted); }
.case__body { display: grid; align-content: start; gap: 10px; padding: 22px clamp(18px, 2.4vw, 28px) 24px; min-width: 0; }
.case--wide .case__body { align-content: center; }
.case__client { font-size: var(--fs-small); color: var(--muted); }
.case__title { font: var(--display-weight) var(--fs-h3)/1.2 var(--font-display); font-stretch: var(--display-stretch); letter-spacing: calc(var(--display-tracking) / 2); }
.case__metric { font-size: 1.02rem; }
.case__metric mark { font: var(--display-weight) 1.3em/1 var(--font-display); font-stretch: var(--display-stretch); }
.case__result { color: var(--muted); }
.case__more { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 4px; }
.case__more summary { cursor: pointer; padding: 10px 0; font-weight: 600; font-size: var(--fs-small); list-style: none; display: flex; align-items: center; justify-content: space-between; }
.case__more summary::-webkit-details-marker { display: none; }
.case__more summary::after { content: "+"; font-size: 1.2rem; line-height: 1; color: var(--muted); transition: transform .25s var(--ease); }
.case__more[open] summary::after { transform: rotate(45deg); }
.case__more > p, .case__more ul { font-size: var(--fs-small); color: var(--muted); margin-bottom: 10px; }
.case__more ul { padding-left: 1.1em; display: grid; gap: 4px; }
.case__tools { display: flex; flex-wrap: wrap; gap: 6px; }
.case__tools span { padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); font-size: .72rem; color: var(--ink); }

/* ---------- proof previews (mockups) ---------- */
.mk {
  --mk-r: 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--mk-r);
  box-shadow: var(--shadow); font-size: .74rem; line-height: 1.35; color: var(--ink); overflow: hidden;
  transition: transform .5s var(--ease);
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) { .case:hover .mk { transform: translateY(-4px) rotate(-.4deg); } }
.mk-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.mk-bar::before { content: ""; width: 34px; height: 8px; flex: none; background: radial-gradient(circle at 4px 4px, var(--line) 3.5px, transparent 4px) 0 0 / 13px 8px repeat-x; order: -1; }
.mk-title { font-weight: 700; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-count { font-size: .68rem; color: var(--muted); white-space: nowrap; }
.mk-chip { display: inline-block; padding: 2px 7px; border-radius: 999px; font-size: .64rem; font-weight: 600; white-space: nowrap; background: var(--surface-2); color: var(--muted); }
.mk-chip[data-tone="good"] { background: color-mix(in srgb, var(--good) 16%, transparent); color: var(--good); }
.mk-chip[data-tone="warn"] { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }

.mk-list { list-style: none; }
.mk-row { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto auto; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.mk-row:last-child { border-bottom: 0; }
.mk-avatar { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-size: .62rem; font-weight: 700; color: var(--muted); }
.mk-main { display: grid; min-width: 0; }
.mk-main b, .mk-main span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-main b { font-weight: 500; }
.mk-main span { color: var(--muted); }
.mk-row.is-unread .mk-main b { font-weight: 700; }
.mk-row.is-unread .mk-avatar { background: var(--accent); color: var(--on-accent); }
.mk-time { color: var(--muted); font-size: .66rem; font-variant-numeric: tabular-nums; }

.mk-cal-head { display: grid; grid-template-columns: repeat(var(--days), 1fr); padding: 6px 8px 4px; color: var(--muted); font-size: .66rem; font-weight: 600; text-align: center; }
.mk-cal-grid { position: relative; display: grid; grid-template-columns: repeat(var(--days), 1fr); height: 220px; margin: 0 8px 8px; background: repeating-linear-gradient(var(--line) 0 1px, transparent 1px 22px); }
.mk-col + .mk-col { border-left: 1px dashed var(--line); }
.mk-ev {
  position: absolute; top: var(--top); height: var(--h);
  left: calc(var(--d) * (100% / var(--days)) + 2px); width: calc(100% / var(--days) - 4px);
  padding: 3px 5px; border-radius: 5px; overflow: hidden;
  background: color-mix(in srgb, var(--accent) 18%, var(--surface)); border-left: 3px solid var(--accent);
}
.mk-ev[data-tone="b"] { background: color-mix(in srgb, var(--warn) 16%, var(--surface)); border-left-color: var(--warn); }
.mk-ev[data-tone="c"] { background: var(--surface-2); border-left-color: var(--muted); }
.mk-ev b { display: block; font-size: .62rem; font-weight: 600; line-height: 1.2; }
.mk-ev.is-short { padding-block: 2px; }
.mk-ev.is-short b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.mk-table { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, auto)); overflow: hidden; }
.mk-th, .mk-td { padding: 6px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.mk-th { background: var(--surface-2); font-weight: 700; font-size: .66rem; color: var(--muted); }
.mk-td { font-variant-numeric: tabular-nums; }

.mk-page { padding: 14px 16px 16px; display: grid; gap: 7px; }
.mk-h { font-weight: 700; font-size: .8rem; margin-top: 2px; }
.mk-p { color: var(--muted); }
.mk-step { counter-increment: mkstep; padding-left: 22px; position: relative; }
.mk-step::before { content: counter(mkstep); position: absolute; left: 0; top: 0; width: 16px; height: 16px; border-radius: 50%; background: var(--surface-2); font-size: .6rem; font-weight: 700; display: grid; place-items: center; }
.mk-page { counter-reset: mkstep; }
.mk-check { display: flex; align-items: center; gap: 8px; }
.mk-check span { width: 13px; height: 13px; border-radius: 3px; border: 1.5px solid var(--line); flex: none; }
.mk-check.is-done span { background: var(--accent); border-color: var(--accent); box-shadow: inset 0 0 0 2px var(--surface); }
.mk-check.is-done { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 60%, transparent); }

.mk-lanes { display: grid; grid-template-columns: repeat(var(--lanes), minmax(0, 1fr)); gap: 8px; padding: 10px; }
.mk-lane { display: grid; align-content: start; gap: 6px; padding: 8px; border-radius: 9px; background: var(--surface-2); min-width: 0; }
.mk-lane-h { font-weight: 700; font-size: .66rem; color: var(--muted); display: flex; justify-content: space-between; }
.mk-card { padding: 7px 8px; border-radius: 7px; background: var(--surface); border: 1px solid var(--line); font-size: .68rem; }

.mk-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 10px; }
.mk-tile { aspect-ratio: 1; border-radius: 8px; padding: 8px; display: flex; flex-direction: column; justify-content: space-between; background: color-mix(in srgb, var(--accent) 16%, var(--surface)); min-width: 0; overflow: hidden; }
.mk-tile[data-tone="b"] { background: color-mix(in srgb, var(--mark-bg) 55%, var(--surface)); }
.mk-tile[data-tone="c"] { background: var(--surface-2); }
.mk-tile b { font-size: .64rem; font-weight: 600; line-height: 1.25; }
.mk-tile small { font-size: .6rem; color: var(--muted); }

/* ---------- services ---------- */
.services { display: grid; border-top: 1px solid var(--line); }
.service { display: grid; gap: 14px 40px; padding-block: 26px; border-bottom: 1px solid var(--line); }
@media (min-width: 820px) { .service { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); } }
.service__lead { display: grid; gap: 6px; align-content: start; }
.service__lead h3 { font: var(--display-weight) var(--fs-h3)/1.2 var(--font-display); font-stretch: var(--display-stretch); }
.service__lead p { color: var(--muted); max-width: 44ch; }
.service__tasks { list-style: none; display: grid; gap: 8px; align-content: start; }
@media (min-width: 560px) { .service__tasks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.service__tasks li { display: flex; gap: 8px; align-items: flex-start; font-size: var(--fs-small); }
.service__tasks svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--accent); }

/* ---------- process ---------- */
.steps { list-style: none; display: grid; gap: 14px; grid-template-columns: 1fr; counter-reset: none; }
@media (min-width: 640px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1180px) { .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.step { display: grid; gap: 8px; align-content: start; padding-top: 16px; border-top: 2px solid var(--ink); }
.step__n { font: var(--display-weight) 1.9rem/1 var(--font-display); font-stretch: var(--display-stretch); color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.step h3 { font-size: 1.02rem; font-weight: 700; }
.step p { color: var(--muted); font-size: var(--fs-small); }

/* ---------- experience ---------- */
.timeline { list-style: none; display: grid; }
.role { display: grid; gap: 6px 32px; padding-block: 22px; border-top: 1px solid var(--line); }
.role:last-child { border-bottom: 1px solid var(--line); }
@media (min-width: 720px) { .role { grid-template-columns: 170px minmax(0, 1fr); } }
.role__when { font-size: var(--fs-small); color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 3px; }
.role__body { display: grid; gap: 8px; min-width: 0; }
.role h3 { font-size: 1.08rem; font-weight: 700; }
.role h3 span { display: block; font-weight: 400; font-size: .95rem; color: var(--muted); }
.role ul { padding-left: 1.1em; display: grid; gap: 5px; color: var(--muted); font-size: .95rem; max-width: var(--measure); }

/* ---------- testimonials ---------- */
.quotes { display: grid; gap: 14px; }
@media (min-width: 820px) { .quotes { grid-template-columns: repeat(2, minmax(0, 1fr)); } .quote--lead { grid-column: 1 / -1; } }
.quote { margin: 0; display: grid; gap: 18px; align-content: space-between; padding: 24px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.quote blockquote { margin: 0; }
.quote blockquote p { font-size: 1.02rem; }
.quote--lead { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.quote--lead blockquote p { font: var(--display-weight) clamp(1.25rem, 1rem + 1vw, 1.75rem)/1.3 var(--font-display); font-stretch: var(--display-stretch); letter-spacing: calc(var(--display-tracking) / 2); max-width: 40ch; }
.quote figcaption { display: flex; align-items: center; gap: 12px; font-size: var(--fs-small); }
.quote figcaption img, .quote__mono { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; }
.quote__mono { display: grid; place-items: center; background: var(--surface-2); color: var(--ink); font-weight: 700; font-size: .78rem; }
.quote--lead .quote__mono { background: var(--accent); color: var(--on-accent); }
.quote figcaption > span { display: grid; }
.quote figcaption > span > span { color: var(--muted); }
.quote--lead figcaption > span > span { color: color-mix(in srgb, var(--bg) 70%, transparent); }

/* ---------- about ---------- */
.about { display: grid; gap: clamp(24px, 4vw, 56px); align-items: start; }
@media (min-width: 820px) { .about { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); } }
.about__media img, .about__mono { width: 100%; max-width: 420px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--r-lg); }
.about__mono { font-size: clamp(4rem, 10vw, 7rem); border-radius: var(--r-lg); }
.about__text { display: grid; gap: 16px; min-width: 0; }
.about__text > p { max-width: var(--measure); font-size: 1.04rem; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; margin: 8px 0 0; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.facts > div { background: var(--surface); padding: 12px 14px; }
.facts dt { font-size: var(--fs-tiny); color: var(--muted); }
.facts dd { margin: 2px 0 0; font-weight: 600; }
.creds { display: grid; gap: 10px; margin-top: 8px; }
.creds ul { list-style: none; display: grid; gap: 10px; }
.creds li { display: flex; gap: 12px; align-items: flex-start; }
.creds li svg { color: var(--accent); flex: none; margin-top: 1px; }
.creds li > span { display: grid; }
.creds li > span > span { color: var(--muted); font-size: var(--fs-small); }
.creds a { color: var(--ink); }

/* ---------- faq ---------- */
.faq { display: grid; border-top: 1px solid var(--line); max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 40px 18px 0; position: relative; font-weight: 600; font-size: 1.04rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 14px; font-size: 1.5rem; font-weight: 400; color: var(--muted); transition: transform .25s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 20px; color: var(--muted); max-width: var(--measure); }

/* ---------- contact ---------- */
.contact { display: grid; gap: clamp(24px, 4vw, 48px); }
@media (min-width: 900px) { .contact { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
.contact__lead { display: grid; gap: 16px; }
.contact__lead > p { color: var(--muted); font-size: 1.05rem; max-width: 46ch; }
.contact__ways { display: grid; gap: 14px; justify-items: start; margin-top: 6px; }
.email-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.email-line a { font: var(--display-weight) clamp(1.1rem, .9rem + 1vw, 1.5rem)/1.2 var(--font-display); font-stretch: var(--display-stretch); color: var(--ink); word-break: break-all; }
.copied { font-size: var(--fs-tiny); color: var(--good); font-weight: 600; }
.form { display: grid; gap: 14px; padding: clamp(18px, 3vw, 28px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.field { display: grid; gap: 6px; }
.field label { font-size: var(--fs-small); font-weight: 600; }
.field input, .field textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; resize: vertical;
}
.field input:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.field [aria-invalid="true"] { border-color: var(--warn); }
.form .btn { justify-self: start; }
.form__status { font-size: var(--fs-small); color: var(--muted); min-height: 1.4em; }

/* ---------- footer ---------- */
.foot { display: grid; justify-items: center; gap: 12px; margin-top: clamp(64px, 9vw, 110px); padding-top: 28px; border-top: 1px solid var(--line); color: var(--muted); font-size: var(--fs-small); text-align: center; }
.foot__icons { display: flex; gap: 6px; }
.foot a { color: var(--muted); }
@media (min-width: 1100px) { .foot__icons { display: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media print { .contours, .rail, .topbar, .tabbar, .form { display: none !important; } .main { margin: 0; } }
