/* amkcode — design system (ported from "Home — amkcode.com-html/Main.dc.html").
   Colours, fonts and radii are tokens. Each DesignSystem row in the admin emits its own
   [data-design][data-theme] token block (see core.models.DesignSystem.css); the values
   below are the "Blueprint" fallback used before the database is seeded. */

:root, [data-theme="dark"] {
  --bg: #0B1524; --surface: #0F1D30; --surface-2: #152740; --sunken: #08111D;
  --text: #EEF0F3; --text-soft: #C9D1DD; --muted: #A2AFC2; --subtle: #6F7E94;
  --line: #2E4C6E; --line-2: #3E6B95;
  --accent: #E8A33D; --accent-2: #F2B85E; --on-accent: #0B1524;
  --ok: #9FD6A8; --danger: #F08A7E;
  --accent-rgb: 232, 163, 61; --line-rgb: 62, 107, 149; --bg-rgb: 11, 21, 36; --sunken-rgb: 8, 17, 29;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #F4F6F9; --surface: #FFFFFF; --surface-2: #EAEFF5; --sunken: #E6EBF2;
  --text: #0B1524; --text-soft: #2A3A50; --muted: #4E5E74; --subtle: #7A889C;
  --line: #B9C6D6; --line-2: #7F99B6;
  --accent: #B86E12; --accent-2: #9A5A0B; --on-accent: #FFFFFF;
  --ok: #2F7D46; --danger: #B8392B;
  --accent-rgb: 184, 110, 18; --line-rgb: 127, 153, 182; --bg-rgb: 244, 246, 249; --sunken-rgb: 230, 235, 242;
  color-scheme: light;
}
:root {
  --soft: rgba(var(--line-rgb), .26);
  --faint: rgba(var(--line-rgb), .12);
  --display: 'Noto Serif Armenian', 'Noto Serif', Georgia, serif;
  --sans: 'Noto Sans Armenian', 'Noto Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --heading-weight: 500;
  --radius: 6px; --radius-sm: 3px; --pill: 999px; --grid-opacity: 1;
  --gutter: clamp(16px, 4vw, 40px);
  --sec: clamp(64px, 9vw, 120px);
  --nav-h: 72px;
  --bnav-h: 0px;
}
[data-theme] { --soft: rgba(var(--line-rgb), .26); --faint: rgba(var(--line-rgb), .12); }
[data-theme="light"] { --soft: rgba(var(--line-rgb), .38); --faint: rgba(var(--line-rgb), .18); }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: clip;
}
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); }
button { font: inherit; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.page { position: relative; display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--accent); color: var(--on-accent); padding: 10px 14px; border-radius: var(--radius-sm);
  font-family: var(--mono); font-size: 13px; font-weight: 600;
}
.skip:focus { top: 12px; color: var(--on-accent); }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.serif { font-family: var(--display); }
.mono { font-family: var(--mono); }
.amber { color: var(--accent); }
.slate { color: var(--muted); }

/* ---------- layout ---------- */
.wrap {
  max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter);
  position: relative; z-index: 2;
}
.sec { padding: var(--sec) 0; position: relative; }
.sec.alt { background: var(--surface); border-top: 1px solid var(--soft); border-bottom: 1px solid var(--soft); }
.sec.tight { padding-top: 0; }

.gridbg {
  position: absolute; inset: 0; pointer-events: none; z-index: 0; opacity: var(--grid-opacity);
  background-image:
    linear-gradient(rgba(var(--line-rgb), .11) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--line-rgb), .11) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 35%, transparent 80%);
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 35%, transparent 80%);
}
.glow {
  position: absolute; top: -220px; right: -160px; width: 720px; height: 720px; border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--accent-rgb), .10), transparent 62%);
  pointer-events: none; z-index: 0;
}

.grid {
  display: grid; gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(min(var(--min, 320px), 100%), 1fr));
}
.grid.fill { grid-template-columns: repeat(auto-fill, minmax(min(var(--min, 320px), 100%), 1fr)); }

.split { display: flex; flex-wrap: wrap; gap: clamp(36px, 5vw, 56px); align-items: flex-start; }
.split > .side { flex: 1 1 300px; min-width: 0; }
.split > .main { flex: 999 1 560px; min-width: 0; }

/* ---------- type ---------- */
.eyebrow {
  font-family: var(--mono); font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent); display: flex; align-items: center; gap: 10px;
}
.eyebrow i { width: 7px; height: 7px; background: var(--accent); transform: rotate(45deg); display: block; flex-shrink: 0; }

.fig { display: flex; align-items: center; gap: 14px; margin-bottom: 28px; }
.fig span {
  font-family: var(--mono); font-size: 12px; letter-spacing: .16em; color: var(--accent);
  text-transform: uppercase; white-space: nowrap;
}
.fig b { flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }

.h1, .h2, .h3 { font-family: var(--display); font-weight: var(--heading-weight); margin: 0; overflow-wrap: break-word; }
.h1 { font-size: clamp(2.3rem, 5.4vw, 4.6rem); line-height: 1.05; letter-spacing: -.02em; text-wrap: balance; }
.h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); line-height: 1.12; letter-spacing: -.01em; text-wrap: balance; }
.h3 { font-size: clamp(1.25rem, 1.6vw, 1.4rem); line-height: 1.25; }
.h1 em, .h2 em, .h3 em { font-style: italic; color: var(--accent); }

.lead { color: var(--muted); font-size: 17px; max-width: 56ch; margin: 16px 0 0; text-wrap: pretty; }
.lead-lg { font-size: clamp(16.5px, 1.4vw, 18.5px); max-width: 60ch; margin-top: 24px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.label {
  font-family: var(--mono); font-size: 12px; letter-spacing: .14em; color: var(--muted); text-transform: uppercase;
}

.sec-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end;
  gap: 24px; margin-bottom: clamp(36px, 5vw, 52px);
}
.sec-head > div { max-width: 700px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 10px 24px; border-radius: var(--radius-sm);
  font-family: var(--mono); font-size: 14px; letter-spacing: .03em; line-height: 1.3; text-align: center;
  border: 1px solid transparent; cursor: pointer; background: none; color: var(--text);
  transition: transform .15s ease, background .15s ease, border-color .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-p { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.btn-p:hover { background: var(--accent-2); color: var(--on-accent); }
.btn-g { border-color: var(--line); color: var(--text); }
.btn-g:hover { border-color: var(--accent); color: var(--accent); }
.btn-block { width: 100%; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 38px; }
.more {
  font-family: var(--mono); font-size: 13px; letter-spacing: .04em; color: var(--accent);
  display: inline-flex; align-items: center; gap: 8px;
}

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(var(--bg-rgb), .86);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--soft);
}
.nav-bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: var(--nav-h); }
.logo {
  display: flex; align-items: baseline; gap: 2px; color: var(--text);
  font-family: var(--display); font-size: 23px; font-weight: 600; letter-spacing: -.01em; flex-shrink: 0;
}
.logo:hover { color: var(--text); }
.logo span { font-family: var(--mono); color: var(--accent); font-size: 14px; font-weight: 500; }
.navlinks { display: flex; gap: clamp(14px, 1.5vw, 26px); align-items: center; }
.navlink {
  position: relative; color: var(--muted); font-family: var(--mono); font-size: 13px;
  letter-spacing: .02em; padding: 10px 0; white-space: nowrap;
}
.navlink:hover, .navlink.on { color: var(--text); }
.navlink.on::after { content: ''; position: absolute; left: 0; right: 0; bottom: 3px; height: 1px; background: var(--accent); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.navcta { min-height: 44px; padding: 8px 20px; }

.langs { display: flex; border: 1px solid var(--soft); border-radius: var(--radius-sm); overflow: hidden; }
.lang {
  display: flex; align-items: center; justify-content: center; min-width: 38px; min-height: 36px; padding: 0 8px;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; color: var(--muted);
}
.lang + .lang { border-left: 1px solid var(--soft); }
.lang:hover { color: var(--text); }
.lang.on { background: var(--accent); color: var(--on-accent); font-weight: 600; }

.burger {
  display: none; width: 44px; height: 44px; align-items: center; justify-content: center;
  background: none; border: 1px solid var(--soft); border-radius: var(--radius-sm); color: var(--text); cursor: pointer;
}
.burger .x { display: none; }
.burger[aria-expanded="true"] .x { display: block; }
.burger[aria-expanded="true"] .bars { display: none; }

.drawer { border-top: 1px solid var(--faint); max-height: calc(100vh - var(--nav-h)); max-height: calc(100dvh - var(--nav-h)); overflow-y: auto; }
.drawer .wrap { padding-top: 6px; padding-bottom: 20px; }
.drawer a {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 4px; min-height: 52px; border-bottom: 1px solid var(--faint);
  color: var(--text); font-family: var(--mono); font-size: 14px;
}
.drawer a.on { color: var(--accent); }
.drawer a .n { color: var(--line-2); font-size: 11.5px; }
.drawer .drawer-cta { color: var(--accent); border-bottom: none; }

@media (max-width: 1280px) {
  .navlinks, .navcta { display: none !important; }
  .burger { display: flex; }
}
@media (min-width: 1281px) {
  .drawer { display: none !important; }
}

/* ---------- hero (home) ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(48px, 8vw, 112px) 0 clamp(56px, 7vw, 96px); }
.hero-grid { display: flex; flex-wrap: wrap; gap: clamp(44px, 5vw, 64px); align-items: center; }
.hero-copy { flex: 1 1 520px; min-width: 0; }
.hero-art { flex: 1 1 420px; min-width: 0; position: relative; }
.hero .h1 { margin-top: 26px; }
.hero-lead { color: var(--muted); font-size: clamp(16.5px, 1.4vw, 18.5px); max-width: 50ch; margin: 28px 0 0; text-wrap: pretty; }
.stats {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 3vw, 24px);
  margin-top: clamp(40px, 5vw, 56px); padding-top: 28px; border-top: 1px solid var(--soft);
}
.stat b { display: block; font-family: var(--display); font-size: clamp(30px, 3.4vw, 40px); line-height: 1; font-weight: var(--heading-weight); }
.stat b small { font-size: .5em; color: var(--muted); font-weight: 400; }
.stat b sup { font-size: .6em; color: var(--accent); vertical-align: baseline; }
.stat span {
  display: block; margin-top: 10px; font-family: var(--mono); font-size: 11.5px;
  letter-spacing: .12em; color: var(--muted); text-transform: uppercase; line-height: 1.4;
}
.art-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.art-head span { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; color: var(--muted); }
.art-head span + span { color: var(--accent); }
.art-svg { width: 100%; height: auto; display: block; }
.term {
  margin-top: 16px; background: var(--sunken); border: 1px solid var(--soft); border-radius: var(--radius-sm);
  padding: 14px 16px; font-family: var(--mono); font-size: 13px; color: var(--ok);
  min-height: 48px; display: flex; align-items: center; gap: 2px; white-space: nowrap; overflow: hidden;
}
.term .path { color: var(--subtle); }
.cursor { display: inline-block; width: 7px; height: 14px; background: var(--ok); margin-left: 3px; flex-shrink: 0; animation: blink 1s steps(1) infinite; }
.badge {
  position: absolute; left: -14px; bottom: -14px;
  background: var(--accent); color: var(--on-accent); font-family: var(--mono); font-size: 11.5px;
  font-weight: 600; letter-spacing: .12em; padding: 7px 12px; border-radius: var(--radius-sm);
}

/* ---------- inner page hero ---------- */
.phero { position: relative; overflow: hidden; padding: clamp(40px, 6vw, 88px) 0 clamp(48px, 6vw, 80px); border-bottom: 1px solid var(--soft); }
.phero .h1 { font-size: clamp(2.2rem, 4.8vw, 4rem); max-width: 22ch; }
.phero .lead { font-size: clamp(16.5px, 1.4vw, 18.5px); max-width: 60ch; margin-top: 22px; }
.phero .actions { margin-top: 32px; }
.crumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 28px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .06em; color: var(--subtle);
}
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.crumbs [aria-current] { color: var(--text); }

/* ---------- marquee ---------- */
.ticker-band { border-top: 1px solid var(--soft); border-bottom: 1px solid var(--soft); padding: 20px 0; position: relative; z-index: 2; background: var(--bg); }
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.track { display: flex; gap: 14px; width: max-content; animation: scroll 38s linear infinite; }
.marquee:hover .track { animation-play-state: paused; }
.pill {
  font-family: var(--mono); font-size: 12.5px; letter-spacing: .08em; color: var(--muted);
  padding: 8px 16px; border: 1px solid var(--soft); border-radius: var(--pill); white-space: nowrap;
}

/* ---------- corner box ---------- */
.corner { position: relative; border: 1px solid var(--soft); background: var(--surface); border-radius: var(--radius); }
.corner::before, .corner::after { content: ''; position: absolute; width: 12px; height: 12px; pointer-events: none; }
.corner::before { top: -1px; left: -1px; border-top: 1px solid var(--accent); border-left: 1px solid var(--accent); }
.corner::after { bottom: -1px; right: -1px; border-bottom: 1px solid var(--accent); border-right: 1px solid var(--accent); }
.corner.dark { background: var(--bg); }
.pad { padding: clamp(22px, 4vw, 44px); }
.pad-sm { padding: clamp(20px, 3vw, 32px); }

/* ---------- tags ---------- */
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em; color: var(--muted);
  border: 1px solid var(--soft); border-radius: var(--radius-sm); padding: 3px 8px; white-space: nowrap;
}

/* ---------- services ---------- */
.svc-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  border-top: 1px solid var(--soft); border-left: 1px solid var(--soft);
}
.svc {
  background: var(--bg); padding: clamp(26px, 3vw, 34px) clamp(22px, 2.6vw, 30px);
  border-right: 1px solid var(--soft); border-bottom: 1px solid var(--soft);
  display: flex; flex-direction: column; gap: 12px; min-height: 250px; transition: background .2s ease;
}
.sec.alt .svc { background: var(--surface); }
.svc:hover, .sec.alt .svc:hover { background: var(--surface-2); }
.svc:hover .svcn { color: var(--accent); }
.svc-top { display: flex; justify-content: space-between; align-items: flex-start; }
.svcn { font-family: var(--mono); font-size: 12px; color: var(--line-2); letter-spacing: .1em; transition: color .2s; }
.svc .h3 { margin-top: 14px; font-size: 22px; }
.svc p { margin: 0; color: var(--muted); font-size: 15px; flex: 1; }
.svc .tags { margin-top: 6px; }
.icon { width: 40px; height: 40px; flex-shrink: 0; }

/* ---------- solutions catalog ---------- */
.card {
  position: relative; display: flex; flex-direction: column; gap: 12px;
  border: 1px solid var(--soft); border-radius: var(--radius); background: var(--surface);
  padding: clamp(22px, 2.6vw, 30px); transition: border-color .2s, transform .2s, background .2s;
}
.sec.alt .card { background: var(--bg); }
.card:hover { border-color: var(--line-2); transform: translateY(-3px); }
.card .h3 { font-size: 21px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.card .grow { flex: 1; }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.card .kicker { font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; color: var(--accent); text-transform: uppercase; }
.stretch::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.card .h3 a, .work-body .h3 a { color: var(--text); }
.card:hover .h3 a, .work:hover .h3 a { color: var(--accent-2); }
.card .more { margin-top: 6px; }
.card:hover .more { color: var(--accent-2); }

/* ---------- industries ---------- */
.ind-tiles {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  border-top: 1px solid var(--soft); border-left: 1px solid var(--soft);
}
.ind-tile {
  display: flex; flex-direction: column; gap: 8px; padding: 22px 20px; min-height: 120px;
  border-right: 1px solid var(--soft); border-bottom: 1px solid var(--soft);
  color: var(--text); transition: background .2s;
}
.ind-tile:hover { background: rgba(var(--accent-rgb), .06); color: var(--text); }
.ind-tile .n { font-family: var(--mono); font-size: 11.5px; color: var(--line-2); letter-spacing: .1em; }
.ind-tile:hover .n { color: var(--accent); }
.ind-tile strong { font-weight: 600; font-size: 16px; line-height: 1.35; }
.ind-tile small { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; color: var(--muted); margin-top: auto; }

.picker { display: flex; flex-wrap: wrap; gap: clamp(28px, 4vw, 48px); align-items: flex-start; }
.ind-list { flex: 1 1 280px; max-width: 380px; display: flex; flex-direction: column; }
.ind {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 52px; padding: 10px 16px;
  background: none; border: none; border-left: 1px solid var(--soft); color: var(--muted);
  font-family: var(--sans); font-size: 15.5px; text-align: left; cursor: pointer;
  transition: color .15s, background .15s, border-color .15s;
}
.ind:hover { color: var(--text); background: rgba(var(--line-rgb), .08); }
.ind[aria-selected="true"] {
  color: var(--text); border-left: 2px solid var(--accent);
  background: linear-gradient(90deg, rgba(var(--accent-rgb), .10), transparent);
}
.ind .n { font-family: var(--mono); font-size: 11.5px; color: var(--line-2); width: 22px; flex-shrink: 0; }
.ind[aria-selected="true"] .n { color: var(--accent); }
.ind-panels { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.js .ind-panel:not(.on) { display: none; }
.ind-panel { background: var(--bg); }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.panel-head span { font-family: var(--mono); font-size: 12px; letter-spacing: .16em; color: var(--accent); }
.panel-head span + span { letter-spacing: .1em; color: var(--muted); }
.ind-panel .h2 { margin-top: 22px; font-size: clamp(1.7rem, 3vw, 2.5rem); line-height: 1.15; }
.ind-panel > p { margin: 16px 0 28px; color: var(--muted); font-size: 17px; max-width: 60ch; }
.sol { display: flex; gap: 16px; padding: 18px 0; border-top: 1px solid var(--faint); }
.sol .n { font-family: var(--mono); color: var(--accent); font-size: 12px; padding-top: 4px; width: 28px; flex-shrink: 0; }
.sol strong { display: block; font-weight: 600; font-size: 16.5px; }
.sol span { display: block; color: var(--muted); font-size: 14.5px; margin-top: 4px; }
.panel-foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 18px;
  margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--soft);
}

/* ---------- process ---------- */
.steps {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr));
  gap: 36px 28px;
}
.step {
  display: flex; flex-direction: column; gap: 12px; padding-top: 22px;
  border-top: 1px solid rgba(var(--line-rgb), .40); position: relative;
}
.step::before {
  content: ''; position: absolute; top: -5px; left: 0; width: 9px; height: 9px;
  background: var(--accent); transform: rotate(45deg);
}
.step .n { font-family: var(--mono); font-size: 12px; color: var(--accent); letter-spacing: .14em; }
.step .h3 { font-size: 21px; }
.step p { margin: 0; color: var(--muted); font-size: 14.5px; }
.step .out { font-family: var(--mono); font-size: 11.5px; color: var(--text); letter-spacing: .04em; margin-top: 4px; }
.step .out span { color: var(--muted); }

.timeline { display: flex; flex-direction: column; }
.tl-item {
  display: grid; grid-template-columns: minmax(0, 280px) minmax(0, 1fr); gap: clamp(20px, 4vw, 56px);
  padding: clamp(28px, 4vw, 44px) 0; border-top: 1px solid var(--soft); position: relative;
}
.tl-item:last-child { border-bottom: 1px solid var(--soft); }
.tl-item::before {
  content: ''; position: absolute; top: -5px; left: 0; width: 9px; height: 9px;
  background: var(--accent); transform: rotate(45deg);
}
.tl-meta { display: flex; flex-direction: column; gap: 10px; }
.tl-meta .num { font-family: var(--display); font-size: clamp(44px, 6vw, 72px); line-height: 1; color: transparent; -webkit-text-stroke: 1px var(--line-2); }
.tl-meta .dur { font-family: var(--mono); font-size: 12px; letter-spacing: .12em; color: var(--accent); text-transform: uppercase; }
.tl-body .h2 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
.tl-body > p { color: var(--muted); margin: 14px 0 0; max-width: 62ch; }
.tl-cols { display: flex; flex-wrap: wrap; gap: 20px 40px; margin-top: 22px; }
.tl-cols > div { flex: 1 1 260px; }
@media (max-width: 760px) {
  .tl-item { grid-template-columns: 1fr; gap: 12px; }
  .tl-meta { flex-direction: row; align-items: baseline; gap: 16px; }
}

/* ---------- lists ---------- */
.dash { list-style: none; padding: 0; margin: 0; }
.dash li { padding: 10px 0; border-top: 1px solid var(--faint); display: flex; gap: 12px; font-size: 15px; }
.dash li:first-child { border-top: none; }
.dash li::before { content: '—'; color: var(--accent); flex-shrink: 0; }

/* ---------- pricing ---------- */
.price {
  border: 1px solid var(--soft); border-radius: var(--radius); background: var(--surface);
  padding: clamp(28px, 3vw, 36px) clamp(22px, 2.6vw, 30px); display: flex; flex-direction: column; position: relative;
}
.sec.alt .price { background: var(--bg); }
.price.feat, .sec.alt .price.feat { border-color: var(--accent); background: linear-gradient(180deg, rgba(var(--accent-rgb), .07), var(--surface) 45%); }
.price .plan { font-family: var(--mono); font-size: 12.5px; letter-spacing: .14em; color: var(--accent); text-transform: uppercase; }
.price .amount { font-family: var(--display); font-size: clamp(36px, 4vw, 44px); font-weight: var(--heading-weight); margin-top: 16px; line-height: 1.05; overflow-wrap: anywhere; }
.price .amount small { font-family: var(--mono); font-size: 14px; color: var(--muted); font-weight: 400; }
.price .sub { color: var(--muted); font-size: 14.5px; margin: 10px 0 24px; }
.price .dash { margin-bottom: 30px; flex: 1; }
.price .ribbon {
  position: absolute; top: -13px; left: clamp(22px, 2.6vw, 30px);
  background: var(--accent); color: var(--on-accent); font-family: var(--mono); font-size: 11px; font-weight: 600;
  letter-spacing: .1em; padding: 4px 10px; border-radius: var(--radius-sm); text-transform: uppercase;
}
.addon {
  margin-top: 22px; border: 1px dashed rgba(var(--line-rgb), .5); border-radius: var(--radius);
  padding: clamp(20px, 3vw, 26px) clamp(20px, 3vw, 30px);
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px;
}
.addon-copy { display: flex; gap: 18px; align-items: center; flex: 1 1 420px; min-width: 0; }
.addon-copy .h3 { font-size: 20px; }
.addon-copy p { margin: 2px 0 0; color: var(--muted); font-size: 14.5px; }

/* ---------- work ---------- */
.work {
  position: relative; border: 1px solid var(--soft); border-radius: var(--radius); overflow: hidden;
  background: var(--surface); display: flex; flex-direction: column; transition: border-color .2s, transform .2s;
}
.sec.alt .work { background: var(--bg); }
.work:hover { border-color: var(--line); transform: translateY(-3px); }
.thumb {
  height: 220px; position: relative; overflow: hidden; background-color: var(--on-accent);
  background-image: linear-gradient(var(--faint) 1px, transparent 1px), linear-gradient(90deg, var(--faint) 1px, transparent 1px);
  background-size: 18px 18px; border-bottom: 1px solid var(--soft);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.work:hover .thumb img { transform: scale(1.03); }
.thumb-win {
  position: absolute; left: 28px; top: 28px; right: 28px; bottom: 0;
  border: 1px solid var(--line); border-bottom: none; border-radius: var(--radius-sm) 4px 0 0; background: var(--surface); padding: 16px;
}
.thumb-win.col { display: flex; flex-direction: column; gap: 10px; }
.thumb-win.cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tw-row { display: flex; gap: 8px; }
.tw-box { flex: 1; height: 44px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.tw-box.hi { border-color: var(--accent); background: rgba(var(--accent-rgb), .15); }
.tw-card { display: flex; flex-direction: column; gap: 6px; }
.tw-img { height: 80px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: rgba(var(--line-rgb), .14); }
.tw-bar { height: 6px; background: var(--line); }
.tw-bar.hi { background: var(--accent); }
.thumb svg.fill { position: absolute; inset: 0; width: 100%; height: 100%; }
.work-body { padding: 24px 26px 28px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.work-body .kicker { font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; color: var(--accent); text-transform: uppercase; }
.work-body .h3 { font-size: 24px; margin-top: 4px; }
.work-body .h3 a { color: var(--text); }
.work-body p { margin: 0; color: var(--muted); font-size: 15px; }

.hero-shot { margin-top: clamp(32px, 4vw, 48px); border: 1px solid var(--soft); border-radius: var(--radius); overflow: hidden; }
.hero-shot .thumb { height: clamp(240px, 42vw, 520px); border-bottom: none; }
.hero-shot .thumb-win { left: 8%; right: 8%; top: 10%; }
.meta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); gap: 1px; background: var(--soft); border: 1px solid var(--soft); margin-top: 32px; }
.meta-grid > div { background: var(--bg); padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.meta-grid .v { font-size: 15px; overflow-wrap: anywhere; }
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 18px; }
.gallery figure { margin: 0; border: 1px solid var(--soft); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.gallery figcaption { padding: 12px 16px; font-size: 13.5px; color: var(--muted); }

/* ---------- testimonials ---------- */
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: clamp(32px, 4vw, 44px); }
.quote { margin: 0; display: flex; flex-direction: column; gap: 22px; }
.quote .mark { font-family: var(--display); font-size: 64px; line-height: .6; color: var(--accent); }
.quote blockquote { margin: 0; font-family: var(--display); font-size: clamp(18px, 1.6vw, 20px); font-style: italic; line-height: 1.5; flex: 1; }
.quote figcaption { padding-top: 16px; border-top: 1px solid var(--soft); }
.quote figcaption strong { display: block; font-weight: 600; }
.quote figcaption span { display: block; font-family: var(--mono); font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ---------- faq ---------- */
.faq-list { border-top: 1px solid var(--soft); }
.faq { border-bottom: 1px solid var(--soft); }
.faq summary {
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 24px;
  min-height: 68px; padding: 20px 4px; cursor: pointer; color: var(--text);
  font-family: var(--display); font-size: clamp(17px, 1.6vw, 19px); line-height: 1.4;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--accent-2); }
.plus { font-family: var(--mono); color: var(--accent); font-size: 22px; transition: transform .2s; flex-shrink: 0; line-height: 1; }
.faq[open] .plus { transform: rotate(45deg); }
.faq .answer { margin: 0; padding: 0 4px 24px; color: var(--muted); font-size: 16px; max-width: 64ch; }
.faq .answer p { margin: 0 0 10px; }

/* ---------- estimator / options ---------- */
.est { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.est-form { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 40px; border: 0; margin: 0; padding: 0; }
.est-form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.stepl { font-family: var(--mono); font-size: 12px; letter-spacing: .14em; color: var(--accent); margin: 0 0 14px; padding: 0; text-transform: uppercase; }
.opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 12px; }
.segs { display: flex; gap: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chips.sm { gap: 8px; }

.choice { position: relative; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.choice:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }

.opt {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left;
  padding: 16px 18px; min-height: 84px; border: 1px solid var(--soft); border-radius: var(--radius-sm);
  background: var(--bg); color: var(--text); transition: border-color .15s, background .15s;
}
.opt:hover { border-color: var(--line); }
.opt.on { border-color: var(--accent); background: linear-gradient(180deg, rgba(var(--accent-rgb), .08), var(--bg) 70%); }
.opt strong { font-weight: 600; font-size: 15.5px; }
.opt small { color: var(--muted); font-size: 13px; line-height: 1.45; }
.opt .p { font-family: var(--mono); font-size: 12px; color: var(--accent); margin-top: auto; padding-top: 6px; }

.seg {
  flex: 1 1 0; min-height: 48px; display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 8px 10px; border: 1px solid var(--soft); background: var(--bg); color: var(--muted);
  font-family: var(--mono); font-size: 13.5px; border-radius: var(--radius-sm); line-height: 1.3;
}
.seg:hover { color: var(--text); border-color: var(--line); }
.seg.on { border-color: var(--accent); color: var(--on-accent); background: var(--accent); font-weight: 600; }

.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px;
  border: 1px solid var(--soft); border-radius: var(--pill); background: none; color: var(--muted);
  font-family: var(--sans); font-size: 14px; line-height: 1.3; transition: all .15s;
}
.chip:hover { color: var(--text); border-color: var(--line); }
.chip.on { color: var(--text); border-color: var(--accent); background: rgba(var(--accent-rgb), .12); }
.chip .box {
  width: 14px; height: 14px; border: 1px solid var(--line); border-radius: 2px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.chip .box svg { display: none; }
.chip.on .box { background: var(--accent); border-color: var(--accent); }
.chip.on .box svg { display: block; }
.chip .p { font-family: var(--mono); font-size: 12px; color: var(--accent); }

.est-sum { flex: 1 1 340px; min-width: 0; position: sticky; top: calc(var(--nav-h) + 24px); }
.est-sum .total { font-family: var(--display); font-size: clamp(2rem, 4vw, 3rem); font-weight: var(--heading-weight); line-height: 1.1; margin-top: 14px; overflow-wrap: anywhere; }
.est-sum .weeks { font-family: var(--mono); font-size: 13px; color: var(--accent); margin-top: 10px; letter-spacing: .04em; }
.est-sum .note { font-size: 13px; color: var(--muted); margin: 18px 0 24px; line-height: 1.55; }
.rows { margin-top: 26px; }
.row { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid var(--faint); font-size: 14px; color: var(--muted); }
.row b { color: var(--text); font-weight: 500; font-family: var(--mono); font-size: 13px; white-space: nowrap; }

.est-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: none;
  background: rgba(var(--sunken-rgb), .94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-top: 1px solid var(--accent); padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom));
}
.est-bar .wrap { padding: 0; display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.est-bar .v { font-family: var(--display); font-size: 19px; line-height: 1.2; }
.est-bar .w { font-family: var(--mono); font-size: 11.5px; color: var(--accent); }
.est-bar .btn { min-height: 44px; padding: 8px 16px; }
@media (max-width: 980px) {
  .est-sum { position: static; }
  .est-bar.show { display: block; }
}

/* ---------- forms ---------- */
.form { display: flex; flex-direction: column; gap: 26px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field > label, .field > .label { font-family: var(--mono); font-size: 12px; letter-spacing: .12em; color: var(--muted); text-transform: uppercase; }
.field .req { color: var(--accent); }
.inp {
  min-height: 50px; padding: 12px 14px; border: 1px solid var(--soft); border-radius: var(--radius-sm);
  background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 16px;
  outline: none; transition: border-color .15s; width: 100%;
}
.inp:focus { border-color: var(--accent); }
.inp::placeholder { color: var(--subtle); }
textarea.inp { resize: vertical; min-height: 140px; }
.inp.err { border-color: var(--danger); }
.errlist { color: var(--danger); font-size: 13px; margin: 0; padding: 0; list-style: none; }
.alert { border: 1px solid var(--danger); color: var(--danger); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 14px; }
.attach {
  font-family: var(--mono); font-size: 13px; color: var(--text); border: 1px dashed rgba(var(--accent-rgb), .6);
  border-radius: var(--radius-sm); padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.attach[hidden] { display: none; }
.attach .amber { color: var(--accent); }
.attach button { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 18px; min-width: 32px; min-height: 32px; }
.attach button:hover { color: var(--text); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; }
.form-foot span { font-size: 13px; color: var(--muted); flex: 1 1 260px; }
.sent { min-height: 420px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 18px; }
.sent .h2 { font-size: clamp(1.7rem, 3vw, 2rem); }
.sent p { margin: 0; color: var(--muted); max-width: 46ch; }

.contact-rows { margin-top: 40px; display: flex; flex-direction: column; }
.contact-row {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 0;
  border-top: 1px solid var(--soft); color: var(--text); flex-wrap: wrap;
}
.contact-row:last-child { border-bottom: 1px solid var(--soft); }
a.contact-row:hover { color: var(--accent); }
.contact-row .v { overflow-wrap: anywhere; }

/* ---------- cta band ---------- */
.cta-band { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 28px; }
.cta-band > div { flex: 1 1 460px; min-width: 0; }
.cta-band .h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.cta-band .actions { margin-top: 0; }

/* ---------- prose ---------- */
.prose { max-width: 72ch; font-size: 16.5px; }
.prose p { margin: 0 0 18px; color: var(--text-soft); }
.prose h2 { font-family: var(--display); font-weight: var(--heading-weight); font-size: clamp(1.4rem, 2.2vw, 1.7rem); margin: 40px 0 14px; }
.prose h2:first-child { margin-top: 0; }

/* ---------- detail layout ---------- */
.detail { display: flex; flex-wrap: wrap; gap: clamp(36px, 5vw, 64px); align-items: flex-start; }
.detail > .main { flex: 999 1 560px; min-width: 0; }
.detail > aside { flex: 1 1 320px; min-width: 0; position: sticky; top: calc(var(--nav-h) + 24px); }
.detail .block + .block { margin-top: 40px; }
.aside-stack { display: flex; flex-direction: column; gap: 22px; }
@media (max-width: 980px) { .detail > aside { position: static; } }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--soft); padding: 72px 0 0; position: relative; overflow: hidden; }
.foot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); gap: 40px; margin-bottom: 56px; }
.foot-brand p { color: var(--muted); font-size: 14.5px; margin: 14px 0 22px; max-width: 32ch; }
.foot-title { font-family: var(--mono); font-size: 12px; letter-spacing: .14em; color: var(--accent); margin-bottom: 14px; text-transform: uppercase; }
.foot a { display: block; color: var(--muted); font-size: 14.5px; padding: 5px 0; }
.foot a:hover { color: var(--text); }
.foot a.amber { color: var(--accent); }
.socials { display: flex; gap: 10px; flex-wrap: wrap; }
.social {
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--soft); border-radius: 50%; color: var(--muted);
}
.social:hover { color: var(--accent); border-color: var(--accent); }
.foot-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 24px 0;
  border-top: 1px solid var(--faint); font-family: var(--mono); font-size: 12px; color: var(--muted);
}
.foot-bottom nav { display: flex; gap: 24px; flex-wrap: wrap; }
.foot-bottom a { color: var(--muted); }
.foot-bottom a:hover { color: var(--text); }
.wordmark {
  font-family: var(--display); font-weight: 600; font-size: clamp(4rem, 15vw, 13.5rem); line-height: .9;
  letter-spacing: -.03em; color: transparent; -webkit-text-stroke: 1px rgba(var(--line-rgb), .45);
  white-space: nowrap; user-select: none; text-align: center; margin-bottom: -.18em;
}

/* ---------- 404 ---------- */
.notfound { min-height: 60vh; display: flex; align-items: center; }
.notfound .code { font-family: var(--display); font-size: clamp(6rem, 22vw, 14rem); line-height: .9; color: transparent; -webkit-text-stroke: 1px var(--line-2); }

/* ---------- motion ---------- */
.draw { stroke-dasharray: 900; stroke-dashoffset: 900; animation: drawl 1.4s ease forwards; }
@keyframes drawl { to { stroke-dashoffset: 0; } }
.fillbox { opacity: 0; animation: fillb .6s ease forwards; }
@keyframes fillb { from { opacity: 0; } to { opacity: 1; } }
@keyframes blink { 50% { opacity: 0; } }
.rise { animation: rise .9s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes scroll { to { transform: translateX(-50%); } }
.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.js [data-reveal].in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .track, .draw, .fillbox, .rise, .cursor { animation: none !important; stroke-dashoffset: 0; opacity: 1; }
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .btn:hover, .card:hover, .work:hover { transform: none; }
}

/* ---------- inline svg art follows the active palette ---------- */
/* CSS beats SVG presentation attributes, so the mockup's literal colours are remapped to tokens here */
svg[stroke="#E8A33D"], svg [stroke="#E8A33D"] { stroke: var(--accent); }
svg [stroke="#3E6B95"] { stroke: var(--line-2); }
svg [stroke="#2E4C6E"] { stroke: var(--line); }
svg[stroke="#0B1524"], svg [stroke="#0B1524"] { stroke: var(--on-accent); }
svg [fill="#E8A33D"] { fill: var(--accent); }
svg [fill="#0B1524"] { fill: var(--bg); }
svg [fill="#0F1D30"] { fill: var(--surface); }
svg [fill="#8C9AB0"] { fill: var(--subtle); }
svg [fill^="rgba(62"] { fill: rgba(var(--line-rgb), .16); }
svg [fill^="rgba(232"] { fill: rgba(var(--accent-rgb), .30); }

/* ---------- header extras ---------- */
.icon-btn {
  width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  border: 1px solid var(--soft); border-radius: var(--radius-sm); background: none; color: var(--muted);
  cursor: pointer; font-size: 20px; line-height: 1; transition: color .15s, border-color .15s;
}
.icon-btn:hover { color: var(--accent); border-color: var(--accent); }
[data-theme="dark"] .i-sun, [data-theme="light"] .i-moon { display: none; }
.navlogin { font-family: var(--mono); font-size: 13px; color: var(--muted); padding: 8px 4px; white-space: nowrap; }
.navlogin:hover { color: var(--text); }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(var(--accent-rgb), .14); border: 1px solid var(--accent); color: var(--accent);
  font-family: var(--mono); font-size: 13px; font-weight: 600; flex-shrink: 0;
}
.avatar:hover { background: var(--accent); color: var(--on-accent); }
.avatar.lg { width: 56px; height: 56px; font-size: 17px; }
.drawer-btn {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%;
  padding: 14px 4px; min-height: 52px; border: 0; border-bottom: 1px solid var(--faint); background: none;
  color: var(--text); font-family: var(--mono); font-size: 14px; text-align: left; cursor: pointer;
}

/* ---------- toasts ---------- */
.toasts { position: fixed; top: calc(var(--nav-h) + 12px); right: 16px; left: 16px; z-index: 60;
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px; pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 14px; max-width: 460px;
  background: var(--surface); color: var(--text); border: 1px solid var(--soft); border-left: 3px solid var(--accent);
  border-radius: var(--radius); padding: 12px 12px 12px 16px; font-size: 14.5px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .25); animation: rise .4s ease both;
}
.toast-error { border-left-color: var(--danger); }
.toast button { background: none; border: 0; color: var(--muted); font-size: 20px; cursor: pointer; min-width: 32px; min-height: 32px; }

/* ---------- mobile bottom navigation ---------- */
.bnav { display: none; }
@media (max-width: 760px) {
  :root { --bnav-h: 64px; }
  body { padding-bottom: calc(var(--bnav-h) + env(safe-area-inset-bottom)); }
  .bnav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: grid; grid-template-columns: repeat(5, 1fr);
    height: calc(var(--bnav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: rgba(var(--bg-rgb), .94); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    border-top: 1px solid var(--soft);
  }
  .bnav-item {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    min-width: 0; color: var(--subtle); font-family: var(--mono); font-size: 10.5px; letter-spacing: .02em;
  }
  .bnav-item span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }
  .bnav-item:hover { color: var(--text); }
  .bnav-item.on { color: var(--accent); }
  .bnav-item.on::before {
    content: ''; position: absolute; top: -1px; left: 28%; right: 28%; height: 2px; background: var(--accent);
    border-radius: 0 0 2px 2px;
  }
  .est-bar { bottom: calc(var(--bnav-h) + env(safe-area-inset-bottom)); }
  .toasts { top: auto; bottom: calc(var(--bnav-h) + 12px); align-items: stretch; }
  .hide-sm { display: none !important; }
}

/* ---------- design picker ---------- */
.dpanel { position: fixed; inset: 0; z-index: 80; }
.dpanel[hidden] { display: none; }
.dpanel-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .45); animation: fillb .2s ease both; }
.dpanel-sheet {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(420px, 100%); overflow-y: auto;
  background: var(--bg); border-left: 1px solid var(--soft); padding: 26px 24px 32px;
  box-shadow: -20px 0 50px rgba(0, 0, 0, .3); animation: slidein .3s cubic-bezier(.2, .7, .2, 1) both;
}
@keyframes slidein { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.dpanel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.dpanel .segs .seg { cursor: pointer; }
.dpanel .seg[aria-checked="true"] { border-color: var(--accent); color: var(--on-accent); background: var(--accent); font-weight: 600; }
.dlist { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
.dcard {
  display: grid; grid-template-columns: auto auto 1fr; grid-template-rows: auto auto; column-gap: 14px; row-gap: 4px;
  align-items: center; text-align: left; width: 100%; padding: 16px; cursor: pointer;
  border: 1px solid var(--soft); border-radius: var(--radius); background: var(--surface); color: var(--text);
  transition: border-color .15s, transform .15s;
}
.dcard:hover { border-color: var(--line-2); transform: translateY(-1px); }
.dcard[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.dcard strong { grid-column: 3; font-size: 15.5px; font-weight: 600; }
.dcard small { grid-column: 3; color: var(--muted); font-size: 13px; line-height: 1.45; }
.dswatch { grid-row: 1 / span 2; display: grid; grid-template-columns: repeat(2, 14px); gap: 3px; }
.dswatch i { width: 14px; height: 14px; border-radius: 3px; border: 1px solid rgba(127, 127, 127, .35); display: block; }
@media (max-width: 760px) {
  .dpanel-sheet {
    top: auto; left: 0; width: 100%; max-height: 86vh; border-left: 0; border-top: 1px solid var(--soft);
    border-radius: 16px 16px 0 0; padding-bottom: calc(28px + env(safe-area-inset-bottom));
    animation-name: slideup;
  }
  @keyframes slideup { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
}

/* designs comparison page */
.ds-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 22px; }
.ds-card { border: 1px solid var(--soft); border-radius: var(--radius); overflow: hidden; background: var(--surface); display: flex; flex-direction: column; }
.ds-card.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.ds-preview { padding: 26px 24px; background: var(--bg); color: var(--text); border-bottom: 1px solid var(--soft); font-family: var(--sans); }
.ds-preview .h3 { font-size: 26px; }
.ds-preview p { color: var(--muted); font-size: 14.5px; margin: 10px 0 18px; }
.ds-preview .mini { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.ds-preview .mini-card { margin-top: 18px; border: 1px solid var(--soft); background: var(--surface); border-radius: var(--radius); padding: 14px 16px; }
.ds-preview .mini-card b { display: block; font-size: 14px; }
.ds-preview .mini-card small { color: var(--muted); font-size: 12.5px; }
.ds-body { padding: 20px 24px 24px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.ds-body p { margin: 0; color: var(--muted); font-size: 14.5px; flex: 1; }
.ds-modes { display: grid; grid-template-columns: 1fr 1fr; }
.ds-modes > div { min-width: 0; }

/* ---------- auth ---------- */
.auth { display: flex; flex-wrap: wrap; gap: clamp(32px, 5vw, 64px); align-items: flex-start; }
.auth-card { flex: 1 1 420px; min-width: 0; max-width: 560px; }
.auth-side { flex: 1 1 300px; min-width: 0; }
.auth-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--muted); }
.check-row { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--muted); cursor: pointer; }
.check, .check-row input[type="checkbox"] {
  width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); flex-shrink: 0; cursor: pointer;
}
.helptext, .field .helptext { font-size: 12.5px; color: var(--subtle); line-height: 1.5; }
.helptext ul { margin: 4px 0 0; padding-left: 18px; }

/* ---------- client portal ---------- */
.acc { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(28px, 4vw, 48px); align-items: start; }
.acc-side { position: sticky; top: calc(var(--nav-h) + 24px); display: flex; flex-direction: column; gap: 18px; }
.acc-user { display: flex; gap: 12px; align-items: center; min-width: 0; }
.acc-user div { min-width: 0; }
.acc-user strong { display: block; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-user small { display: block; color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-menu { display: flex; flex-direction: column; border-top: 1px solid var(--soft); }
.acc-menu a, .acc-menu button {
  display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 10px 12px; color: var(--muted);
  border: 0; border-left: 2px solid transparent; background: none; font: inherit; font-size: 14.5px; text-align: left;
  cursor: pointer; width: 100%;
}
.acc-menu a:hover, .acc-menu button:hover { color: var(--text); background: rgba(var(--line-rgb), .08); }
.acc-menu a.on { color: var(--text); border-left-color: var(--accent); background: linear-gradient(90deg, rgba(var(--accent-rgb), .10), transparent); }
.acc-menu svg { flex-shrink: 0; color: var(--subtle); }
.acc-menu a.on svg { color: var(--accent); }
.acc-menu .count { margin-left: auto; font-family: var(--mono); font-size: 11.5px; color: var(--accent); }
.acc-main { min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.acc-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 18px; }
.acc-head .h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
.acc-head p { margin: 8px 0 0; color: var(--muted); }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); gap: 14px; }
.kpi { border: 1px solid var(--soft); border-radius: var(--radius); background: var(--surface); padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.panel { border: 1px solid var(--soft); border-radius: var(--radius); background: var(--surface); }
.panel-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--soft); }
.panel-h h2, .panel-h h3 { margin: 0; font-family: var(--display); font-weight: var(--heading-weight); font-size: 19px; }
.panel-b { padding: 18px 20px; }
.panel-empty { padding: 26px 20px; color: var(--muted); font-size: 14.5px; }
.cols-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 22px; align-items: start; }

.list-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 14px 20px; border-top: 1px solid var(--faint); color: var(--text); flex-wrap: wrap; }
.list-row:first-child { border-top: 0; }
a.list-row:hover { background: rgba(var(--line-rgb), .06); color: var(--text); }
.list-row .main-c { min-width: 0; flex: 1 1 220px; }
.list-row strong { display: block; font-weight: 600; font-size: 15px; }
.list-row small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.list-row .end { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.pcard { border: 1px solid var(--soft); border-radius: var(--radius); background: var(--surface); padding: 20px; display: flex; flex-direction: column; gap: 12px; position: relative; transition: border-color .2s, transform .2s; }
.pcard:hover { border-color: var(--line-2); transform: translateY(-2px); }
.pcard .h3 { font-size: 20px; }
.pcard .h3 a { color: var(--text); }
.pcard .meta { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; color: var(--muted); }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 560px; }
.table th { text-align: left; font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; font-weight: 500; color: var(--muted); text-transform: uppercase; padding: 12px 20px; border-bottom: 1px solid var(--soft); }
.table td { padding: 14px 20px; border-bottom: 1px solid var(--faint); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .num { font-family: var(--mono); white-space: nowrap; }

.mtimeline { list-style: none; margin: 0; padding: 0; }
.mtimeline li { position: relative; padding: 0 0 22px 30px; }
.mtimeline li::before { content: ''; position: absolute; left: 7px; top: 18px; bottom: 0; width: 1px; background: var(--soft); }
.mtimeline li:last-child::before { display: none; }
.mtimeline .dot { position: absolute; left: 0; top: 4px; width: 15px; height: 15px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--bg); }
.mtimeline li.done .dot { background: var(--accent); border-color: var(--accent); }
.mtimeline li.late .dot { border-color: var(--danger); }
.mtimeline strong { display: block; font-size: 15px; font-weight: 600; }
.mtimeline small { display: block; color: var(--muted); font-size: 13px; }
.mtimeline li.done strong { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--soft); }

.thread { display: flex; flex-direction: column; gap: 16px; }
.msg { max-width: min(640px, 92%); border: 1px solid var(--soft); border-radius: var(--radius); padding: 14px 16px; background: var(--surface); }
.msg.mine { align-self: flex-end; background: rgba(var(--accent-rgb), .08); border-color: rgba(var(--accent-rgb), .35); }
.msg-h { display: flex; justify-content: space-between; gap: 12px; font-family: var(--mono); font-size: 11.5px; color: var(--muted); margin-bottom: 6px; }
.msg-h b { color: var(--text); font-weight: 600; }
.msg p { margin: 0 0 8px; font-size: 15px; }
.msg p:last-child { margin-bottom: 0; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tabs a { font-family: var(--mono); font-size: 12.5px; padding: 7px 14px; border: 1px solid var(--soft); border-radius: var(--pill); color: var(--muted); }
.tabs a.on, .tabs a:hover { color: var(--text); border-color: var(--accent); }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 1px; background: var(--soft); border: 1px solid var(--soft); border-radius: var(--radius); overflow: hidden; }
.kv > div { background: var(--surface); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.kv .v { font-size: 15px; overflow-wrap: anywhere; }

@media (max-width: 980px) {
  .acc { grid-template-columns: 1fr; }
  .acc-side { position: static; }
  .acc-menu { flex-direction: row; overflow-x: auto; border-top: 0; border-bottom: 1px solid var(--soft); gap: 4px; scrollbar-width: thin; }
  .acc-menu a, .acc-menu button { width: auto; flex-shrink: 0; border-left: 0; border-bottom: 2px solid transparent; white-space: nowrap; min-height: 44px; }
  .acc-menu a.on { border-bottom-color: var(--accent); background: none; }
  .acc-menu .count { margin-left: 4px; }
}

.drawer-btn .n { color: var(--line-2); font-size: 12px; }
@media (max-width: 420px) { .hide-xs { display: none !important; } }

/* =====================================================================
   Client portal v2
   ===================================================================== */
:root {
  /* status palette — fixed meaning, never themed; always shown with an icon + label */
  --st-good: #0ca30c; --st-warn: #fab219; --st-serious: #ec835a; --st-crit: #d03b3b;
}
.portal-sec { padding-top: clamp(24px, 4vw, 44px); }
.inline { display: inline; }
.block { display: block; }
.strong { font-weight: 600; }
.r { text-align: right; }
.num { font-variant-numeric: tabular-nums; }
.link-btn {
  background: none; border: 0; padding: 6px 2px; cursor: pointer; color: var(--muted);
  font: inherit; font-family: var(--mono); font-size: 12.5px; letter-spacing: .03em; min-height: 36px;
}
.link-btn:hover { color: var(--accent); }
.danger-link, .danger-link:hover { color: var(--danger) !important; }
.danger-btn { border-color: var(--danger) !important; color: var(--danger) !important; }
.danger-solid { background: var(--danger) !important; color: #fff !important; }
.btn-sm { min-height: 38px; padding: 6px 14px; font-size: 12.5px; }
.ok-text { color: var(--ok); font-size: 13.5px; }
kbd {
  font-family: var(--mono); font-size: 11px; padding: 2px 6px; border-radius: 4px; color: var(--muted);
  border: 1px solid var(--soft); border-bottom-width: 2px; background: var(--surface); white-space: nowrap;
}

/* header: bell + account menu */
.bell { position: relative; }
.dotcount {
  position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--accent); color: var(--on-accent); font-family: var(--mono); font-size: 10.5px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px var(--bg);
}
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.avatar { overflow: hidden; }
.avatar.xl { width: 88px; height: 88px; font-size: 24px; }
.umenu { position: relative; }
.umenu summary { list-style: none; cursor: pointer; }
.umenu summary::-webkit-details-marker { display: none; }
.umenu-panel {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 50; width: 260px;
  background: var(--surface); border: 1px solid var(--soft); border-radius: var(--radius); padding: 6px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .3); display: flex; flex-direction: column; animation: rise .2s ease both;
}
.umenu-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--faint); margin-bottom: 4px; min-width: 0; }
.umenu-head strong { display: block; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.umenu-head small { display: block; color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.umenu-panel a, .umenu-panel button {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 40px; padding: 8px 12px;
  border-radius: var(--radius-sm); color: var(--text); font-size: 14px; background: none; border: 0; width: 100%;
  text-align: left; cursor: pointer; font-family: var(--sans);
}
.umenu-panel a:hover, .umenu-panel button:hover { background: rgba(var(--line-rgb), .1); color: var(--text); }
.umenu-panel form { border-top: 1px solid var(--faint); margin-top: 4px; padding-top: 4px; }
.count {
  margin-left: auto; font-family: var(--mono); font-size: 11px; font-weight: 600; color: var(--on-accent);
  background: var(--accent); border-radius: 9px; padding: 1px 7px;
}
.drawer-user { display: flex; align-items: center; gap: 12px; padding: 14px 4px; border-bottom: 1px solid var(--faint); min-width: 0; }
.drawer-user div { min-width: 0; }
.drawer-user strong { display: block; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer-user small { display: block; color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--faint); }
.drawer .drawer-grid a {
  border: 1px solid var(--soft); border-radius: var(--radius-sm); min-height: 48px; padding: 10px 12px;
  font-family: var(--sans); font-size: 14px; justify-content: flex-start;
}

/* bottom sheet (portal "More" on phones) */
.sheet { position: fixed; inset: 0; z-index: 70; }
.sheet[hidden] { display: none; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .5); animation: fillb .2s ease both; }
.sheet-panel {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 88vh; overflow-y: auto;
  background: var(--bg); border-top: 1px solid var(--soft); border-radius: 18px 18px 0 0;
  padding: 10px 18px calc(20px + env(safe-area-inset-bottom)); animation: slideup .28s cubic-bezier(.2, .7, .2, 1) both;
}
@keyframes slideup { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet-grip { width: 44px; height: 4px; border-radius: 2px; background: var(--soft); margin: 4px auto 6px; }
.sheet-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 14px 0 16px; }
.sheet-grid a, .sheet-grid button {
  display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 12px 14px; border-radius: var(--radius);
  border: 1px solid var(--soft); background: var(--surface); color: var(--text); font: inherit; font-size: 14px;
  text-align: left; cursor: pointer; position: relative;
}
.sheet-grid .ico { color: var(--accent); flex-shrink: 0; }
.sheet-grid span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* portal layout */
.acc-user { color: var(--text); }
.acc-user:hover { color: var(--text); }
.acc-search {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 42px; padding: 8px 12px; cursor: pointer;
  border: 1px solid var(--soft); border-radius: var(--radius-sm); background: var(--surface); color: var(--muted);
  font: inherit; font-size: 14px; text-align: left;
}
.acc-search:hover { border-color: var(--line-2); color: var(--text); }
.acc-search span { flex: 1; }
.acc-sep { display: block; height: 1px; background: var(--soft); margin: 8px 0; }
.acc-menu form { margin: 0; }
.head-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.badges { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* stat tiles — sans, proportional figures (one number per tile) */
.kpis-3 { grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr)); }
a.kpi { color: var(--text); transition: border-color .15s, transform .15s; }
a.kpi:hover { border-color: var(--line-2); color: var(--text); transform: translateY(-2px); }
.kpi-label { font-size: 13px; color: var(--muted); line-height: 1.35; }
.kpi .kpi-value {
  font-family: var(--sans); font-weight: 600; font-size: clamp(26px, 3vw, 34px); line-height: 1.1;
  letter-spacing: -.01em; font-variant-numeric: normal;
}
.kpi-sub { font-size: 12.5px; color: var(--subtle); }
.kpi-attn { border-color: rgba(var(--accent-rgb), .55); background: linear-gradient(180deg, rgba(var(--accent-rgb), .07), var(--surface) 70%); }

/* status badge: icon + label in text ink; the icon carries the status colour */
.badge-s {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: var(--pill);
  border: 1px solid var(--soft); background: var(--surface); color: var(--text-soft);
  font-family: var(--sans); font-size: 12.5px; letter-spacing: 0; text-transform: none; white-space: nowrap; line-height: 1.5;
}
.badge-s svg { flex-shrink: 0; }
.badge-s.ok svg { color: var(--st-good); }
.badge-s.warn svg { color: var(--st-warn); }
.badge-s.bad svg { color: var(--st-crit); }
.badge-s.info svg { color: var(--line-2); }
.badge-s.muted svg { color: var(--subtle); }
.badge-s.bad { border-color: rgba(208, 59, 59, .45); }
.badge-s.warn { border-color: rgba(250, 178, 25, .4); }

/* meters: fill = accent, track = lighter step of the same hue */
.meter { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.meter + .meter { margin-top: 14px; }
.meter-top { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.meter-label { color: var(--muted); }
.meter-value { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.meter-track { position: relative; height: 8px; border-radius: 4px; background: rgba(var(--accent-rgb), .18); }
.meter-track > i { display: block; height: 100%; border-radius: 4px; background: var(--accent); transition: width .6s ease; }
.m-quiet .meter-track { background: rgba(var(--line-rgb), .2); }
.m-quiet .meter-track > i { background: var(--line-2); }
.meter-mark {
  position: absolute; top: -5px; width: 2px; height: 18px; margin-left: -1px; background: var(--text);
  border-radius: 1px; box-shadow: 0 0 0 2px var(--surface); cursor: help;
}
.meter-mark::after { content: ''; position: absolute; left: -11px; right: -11px; top: -6px; bottom: -6px; }
.meter-note { font-size: 12px; color: var(--subtle); }
.tip {
  position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%); z-index: 5;
  background: var(--text); color: var(--bg); font-family: var(--sans); font-size: 12px; line-height: 1.4;
  padding: 6px 9px; border-radius: 4px; white-space: nowrap; pointer-events: none; opacity: 0;
  transition: opacity .12s ease; box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
}
.tip b { display: block; font-weight: 600; }
.meter-mark:hover .tip, .meter-mark:focus-within .tip { opacity: 1; }

/* dashboard composition */
.onboard .panel-b { display: flex; flex-direction: column; gap: 16px; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 8px; }
.checklist li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--soft); border-radius: var(--radius-sm); }
.checklist li a { color: var(--text); font-size: 14px; }
.checklist li a:hover { color: var(--accent); }
.checklist .check-dot {
  width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line-2); font-family: var(--mono); font-size: 11.5px; color: var(--muted);
}
.checklist li.done { border-color: rgba(12, 163, 12, .35); }
.checklist li.done .check-dot { background: var(--st-good); border-color: var(--st-good); color: #fff; }
.checklist li.done a { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--soft); }
.pill-count { font-family: var(--mono); font-size: 12px; color: var(--on-accent); background: var(--accent); border-radius: 10px; padding: 1px 9px; }
.action-row .action-kind { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.chev { font-size: 20px; color: var(--subtle); line-height: 1; }
a.list-row:hover .chev { color: var(--accent); }
.all-clear { display: flex; align-items: center; gap: 14px; }
.all-clear .ico { color: var(--st-good); flex-shrink: 0; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.side-stack { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack-sm { display: flex; flex-direction: column; gap: 12px; }
.figs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 18px; }
.figs div { min-width: 0; }
.figs dt { font-size: 12.5px; color: var(--muted); }
.figs dd { margin: 4px 0 0; font-weight: 600; font-size: 17px; overflow-wrap: anywhere; }
.next-ms { display: flex; gap: 18px; align-items: center; }
.next-ms .days { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 76px; padding: 10px; border-radius: var(--radius); background: rgba(var(--accent-rgb), .1); }
.next-ms .days b { font-size: 32px; line-height: 1; font-weight: 600; }
.next-ms .days span { font-size: 12px; color: var(--muted); margin-top: 4px; }
.next-ms strong { display: block; font-size: 15.5px; }
.next-ms small { display: block; color: var(--muted); font-size: 13px; margin: 2px 0 6px; }
.feed { list-style: none; margin: 0; padding: 8px 20px 16px; }
.feed li { position: relative; display: flex; gap: 14px; padding: 10px 0; }
.feed li + li::before { content: ''; position: absolute; left: 5px; top: -10px; height: 20px; width: 1px; background: var(--soft); }
.feed-dot { width: 11px; height: 11px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; border: 2px solid var(--line-2); background: var(--surface); }
.feed-dot.you { border-color: var(--accent); background: var(--accent); }
.feed-body p { margin: 0; font-size: 14.5px; }
.feed-body small { color: var(--muted); font-size: 12.5px; }
.feed-body small a { color: var(--muted); text-decoration: underline; text-decoration-color: var(--soft); }

/* project cards */
.pkicker { font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; color: var(--accent); text-transform: uppercase; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard .card-top { gap: 10px; flex-wrap: wrap; }
.pcard .meter { position: relative; z-index: 2; }
.pcard.compact { padding: 16px 18px; }
.pcard.compact .h3 { font-size: 18px; }
.cols-2.tight { gap: 18px 28px; }

/* project timeline (start → due), milestones as ringed diamonds */
.timeline-fig { margin: 0; }
.tl-track { position: relative; height: 44px; margin: 30px 8px 0; }
.tl-track::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; background: rgba(var(--line-rgb), .35); border-radius: 1px; }
.tl-fill { position: absolute; left: 0; top: 50%; height: 2px; margin-top: -1px; background: var(--accent); border-radius: 1px; }
.tl-today { position: absolute; top: -14px; bottom: -2px; width: 1px; background: var(--text); }
.tl-today span { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font-family: var(--mono); font-size: 10.5px; color: var(--text); white-space: nowrap; }
.tl-mark {
  position: absolute; top: 50%; width: 24px; height: 24px; margin: -12px 0 0 -12px; display: block; z-index: 2;
}
.tl-mark::before {
  content: ''; position: absolute; left: 50%; top: 50%; width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px;
  transform: rotate(45deg); background: var(--surface); border: 2px solid var(--line-2); box-shadow: 0 0 0 2px var(--surface);
  transition: transform .15s ease;
}
.tl-mark.done::before { background: var(--accent); border-color: var(--accent); }
.tl-mark.pending::before { border-color: var(--st-warn); background: var(--st-warn); }
.tl-mark.late::before { border-color: var(--st-crit); }
.tl-mark:hover::before, .tl-mark:focus-visible::before { transform: rotate(45deg) scale(1.35); }
.tl-mark:hover .tip, .tl-mark:focus-visible .tip { opacity: 1; }
.tl-axis { display: flex; justify-content: space-between; margin: 4px 8px 0; font-family: var(--mono); font-size: 11.5px; color: var(--subtle); font-variant-numeric: tabular-nums; }
.legend { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 12.5px; color: var(--muted); }
.legend li { display: flex; align-items: center; gap: 8px; }
.legend i { width: 9px; height: 9px; transform: rotate(45deg); border: 2px solid var(--line-2); background: var(--surface); display: block; }
.legend .lg-done { background: var(--accent); border-color: var(--accent); }
.legend .lg-pending { background: var(--st-warn); border-color: var(--st-warn); }
.legend .lg-late { border-color: var(--st-crit); }

/* milestones + approvals */
.mtimeline li.attn .dot { border-color: var(--st-warn); background: var(--st-warn); }
.ms-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.mtimeline li:target { animation: flash 1.6s ease; }
@keyframes flash { 0%, 60% { background: rgba(var(--accent-rgb), .12); } 100% { background: transparent; } }
.approve-box {
  margin: 12px 0 4px; padding: 14px 16px; border: 1px solid rgba(250, 178, 25, .45); border-radius: var(--radius);
  background: rgba(250, 178, 25, .06); display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
}
.approve-box p { flex: 1 1 100%; margin: 0 0 4px; font-size: 14px; color: var(--text-soft); }
details.changes { flex: 1 1 100%; }
details.changes > summary { list-style: none; display: inline-flex; cursor: pointer; }
details.changes > summary::-webkit-details-marker { display: none; }
details.changes[open] > summary { border-color: var(--accent); color: var(--accent); }
.ap-note { margin: 10px 0 0; padding: 10px 14px; border-left: 2px solid var(--st-crit); background: rgba(var(--line-rgb), .08); font-size: 14px; }
.ap-note small { display: block; color: var(--subtle); font-size: 12px; margin-top: 4px; }

/* files & uploads */
.ext { font-family: var(--mono); font-size: 10.5px; padding: 1px 6px; border: 1px solid var(--soft); border-radius: 3px; color: var(--muted); margin-right: 6px; vertical-align: 1px; }
.upload-form { padding: 16px 20px 20px; border-top: 1px solid var(--faint); display: flex; flex-direction: column; gap: 12px; }
.dropzone {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 112px; padding: 16px; text-align: center; cursor: pointer; border: 1px dashed var(--line-2);
  border-radius: var(--radius); color: var(--muted); font-size: 14px; transition: border-color .15s, background .15s;
}
.dropzone.small { min-height: 64px; }
.dropzone .ico { color: var(--accent); }
.dropzone small { font-size: 12px; color: var(--subtle); }
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: rgba(var(--accent-rgb), .06); color: var(--text); }
.dropzone.has-file { border-style: solid; border-color: var(--accent); color: var(--text); }
.dropzone input[type="file"], .file-btn input[type="file"], .attach-btn input[type="file"] {
  position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer;
}
.dropzone:focus-within, .attach-btn:focus-within, .file-btn:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.upload-row { display: flex; gap: 10px; flex-wrap: wrap; }
.upload-row .inp { flex: 1 1 200px; }
.file-btn { position: relative; overflow: hidden; }
.avatar-edit { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }

/* responsive tables: rows become cards on narrow screens */
.table td.r, .table th.r { text-align: right; }

/* invoice document */
.invoice-doc {
  background: var(--surface); border: 1px solid var(--soft); border-radius: var(--radius);
  padding: clamp(22px, 4vw, 44px); display: flex; flex-direction: column; gap: 26px;
}
.inv-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 22px; }
.inv-top .logo { font-size: 26px; }
.inv-meta { text-align: right; }
.inv-no { font-family: var(--mono); font-size: 20px; font-weight: 600; margin: 4px 0 8px; }
.inv-meta dl { margin: 0; display: grid; gap: 4px; }
.inv-meta dl div { display: flex; justify-content: flex-end; gap: 12px; font-size: 13.5px; }
.inv-meta dt { color: var(--muted); }
.inv-meta dd { margin: 0; font-variant-numeric: tabular-nums; }
.inv-parties { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 18px; padding: 18px 0; border-top: 1px solid var(--soft); border-bottom: 1px solid var(--soft); }
.inv-parties > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.inv-parties .muted { font-size: 13.5px; overflow-wrap: anywhere; }
.inv-table { min-width: 0; }
.inv-table th, .inv-table td { padding: 12px 10px; }
.inv-table tfoot th { border-top: 1px solid var(--soft); border-bottom: 0; font-size: 13px; }
.inv-total { font-size: 20px !important; color: var(--text) !important; }
.inv-notes { margin: 0; color: var(--muted); font-size: 14px; }
.inv-bank { padding: 16px 18px; border: 1px dashed var(--line-2); border-radius: var(--radius); }
.inv-bank p { margin: 8px 0 0; font-size: 13.5px; }

/* meetings, estimates, notifications */
.meeting-row { align-items: center; }
.date-chip {
  width: 58px; flex-shrink: 0; border: 1px solid var(--soft); border-radius: var(--radius); padding: 8px 4px; text-align: center;
  display: flex; flex-direction: column; background: var(--bg);
}
.date-chip b { font-size: 22px; line-height: 1; font-weight: 600; }
.date-chip span { font-family: var(--mono); font-size: 10.5px; color: var(--muted); margin-top: 4px; }
.est-card { padding: 16px 20px; border-top: 1px solid var(--faint); display: flex; flex-direction: column; gap: 10px; }
.panel-h + .est-card { border-top: 0; }
.est-card-h { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.est-total { text-align: right; }
.est-total b { display: block; font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.est-total span { font-size: 12.5px; color: var(--muted); }
.est-lines summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.est-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.est-tools { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--faint); }
.est-tools .inp { min-height: 42px; font-size: 14px; }
.card.mini { padding: 18px; gap: 8px; }
.card.mini .h3 { font-size: 17px; }
.card-tools { display: flex; align-items: center; gap: 10px; position: relative; z-index: 2; }
.star-form { display: inline; margin: 0; }
.star {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--soft); background: var(--bg); color: var(--muted);
  font-size: 17px; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  transition: color .15s, border-color .15s, transform .15s;
}
.star:hover { color: var(--accent); border-color: var(--accent); transform: scale(1.06); }
.star.on { color: var(--accent); border-color: var(--accent); background: rgba(var(--accent-rgb), .1); }
.star-row { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--muted); }
.ntf { gap: 14px; flex-wrap: nowrap; }
.ntf-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; background: transparent; border: 1px solid var(--soft); }
.ntf.unread { background: rgba(var(--accent-rgb), .05); }
.ntf.unread .ntf-dot { background: var(--accent); border-color: var(--accent); }
.ntf.unread strong { font-weight: 600; }
.ntf strong { font-weight: 500; }
.pager { display: flex; justify-content: center; align-items: center; gap: 14px; }
.tab-n { font-family: var(--mono); font-size: 11px; color: var(--subtle); margin-left: 4px; }
.danger-zone { border-color: rgba(208, 59, 59, .35); }
.logout-box { max-width: 520px; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.logout-box .actions { margin-top: 6px; }

/* ticket thread */
.attach-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 13.5px; }
.composer-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.attach-btn {
  position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 6px 12px; cursor: pointer;
  border: 1px solid var(--soft); border-radius: var(--radius-sm); color: var(--muted); font-size: 13.5px; max-width: 100%;
}
.attach-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.attach-btn:hover, .attach-btn.has-file { border-color: var(--accent); color: var(--text); }
.composer textarea.inp { min-height: 96px; }

/* command palette */
.palette { position: fixed; inset: 0; z-index: 90; display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; }
.palette[hidden] { display: none; }
.palette-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .55); animation: fillb .15s ease both; }
.palette-box {
  position: relative; width: min(640px, 100%); max-height: 72vh; display: flex; flex-direction: column;
  background: var(--bg); border: 1px solid var(--soft); border-radius: var(--radius); box-shadow: 0 30px 70px rgba(0, 0, 0, .45);
  animation: rise .2s ease both; overflow: hidden;
}
.palette-input { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--soft); }
.palette-input .ico { color: var(--muted); flex-shrink: 0; }
.palette-input input {
  flex: 1; min-width: 0; min-height: 40px; border: 0; outline: none; background: transparent; color: var(--text);
  font-family: var(--sans); font-size: 16px;
}
.palette-input input::-webkit-search-cancel-button { display: none; }
.kbd-btn { background: none; border: 0; padding: 0; cursor: pointer; }
.palette-results { overflow-y: auto; padding: 8px; }
.palette-h { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--subtle); padding: 10px 10px 6px; }
.palette-item {
  display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 10px; border-radius: var(--radius-sm);
  color: var(--text); font-size: 14.5px; min-width: 0;
}
.palette-item .ico { color: var(--muted); flex-shrink: 0; }
.palette-item .pi-main { min-width: 0; flex: 1; }
.palette-item .pi-main span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette-item .pi-main small { display: block; color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette-item.active, .palette-item:hover { background: rgba(var(--accent-rgb), .12); color: var(--text); }
.palette-item.active .ico { color: var(--accent); }
.palette-empty { margin: 0; padding: 18px 10px; color: var(--muted); font-size: 14px; }
.palette-foot { display: flex; gap: 16px; flex-wrap: wrap; padding: 10px 16px; border-top: 1px solid var(--soft); font-size: 12px; color: var(--subtle); }

@media (max-width: 980px) {
  .dash-grid { grid-template-columns: minmax(0, 1fr); }
  .acc-search kbd { display: none; }
}

@media (max-width: 760px) {
  .portal .acc-side { display: none; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpis-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpi { padding: 14px 14px; }
  .kpi .kpi-value { font-size: 24px; }
  .head-actions { width: 100%; }
  .head-actions .btn, .head-actions form, .head-actions form .btn { flex: 1 1 0; }
  .acc-head .btn { width: auto; }
  .figs { grid-template-columns: 1fr 1fr 1fr; }
  .figs dd { font-size: 15px; }
  .list-row { padding: 14px 16px; }
  .panel-h, .panel-b { padding-left: 16px; padding-right: 16px; }
  .feed { padding: 6px 16px 14px; }
  .upload-form { padding: 14px 16px 16px; }
  .inv-meta { text-align: left; }
  .inv-meta dl div { justify-content: flex-start; }
  .meeting-row .end { width: 100%; justify-content: flex-start; }
  .msg { max-width: 100%; }
  .composer { position: sticky; bottom: calc(var(--bnav-h) + env(safe-area-inset-bottom) + 8px); z-index: 20; box-shadow: 0 -12px 30px rgba(0, 0, 0, .25); }
  .sticky-save { position: sticky; bottom: calc(var(--bnav-h) + env(safe-area-inset-bottom) + 8px); z-index: 20;
    background: var(--bg); border: 1px solid var(--soft); border-radius: var(--radius); padding: 10px 12px; }
  .sticky-save span { display: none; }
  .sticky-save .btn { width: 100%; }
  .palette { padding: 0; align-items: stretch; }
  .palette-box { width: 100%; max-height: none; height: 100%; border-radius: 0; border: 0; }
  .palette-foot { display: none; }
  .tl-today span { font-size: 9.5px; }

  /* tables collapse into labelled cards */
  .rtable { min-width: 0; }
  .rtable thead { display: none; }
  .rtable, .rtable tbody, .rtable tr, .rtable td { display: block; width: 100%; }
  .rtable tr { padding: 12px 16px; border-bottom: 1px solid var(--faint); }
  .rtable td { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 5px 0; border: 0; text-align: right; }
  .rtable td::before { content: attr(data-label); font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--subtle); text-align: left; }
  .rtable td:not([data-label])::before { content: none; }
  .rtable td > * { min-width: 0; }
}

@media (max-width: 420px) {
  .kpis-3 { grid-template-columns: minmax(0, 1fr); }
  .checklist { grid-template-columns: minmax(0, 1fr); }
}

/* print: invoices print as clean documents */
@media print {
  .no-print, .acc-side, .bnav, .sheet, .palette, .toasts, .dpanel, .skip { display: none !important; }
  .portal-sec { padding: 0 !important; }
  .acc { display: block !important; }
  .invoice-doc { border: 0 !important; padding: 0 !important; background: #fff !important; color: #000 !important; }
  .invoice-doc * { color: #000 !important; }
  .invoice-doc .logo span { color: #B86E12 !important; }
  .invoice-doc .inv-bank { border-color: #999 !important; }
  .table th, .table td { border-color: #ccc !important; }
}

/* light mode refinements */
/* the warning hue sits below 3:1 on light surfaces — outline it so the mark still reads */
[data-theme="light"] .tl-mark.pending::before,
[data-theme="light"] .legend .lg-pending,
[data-theme="light"] .mtimeline li.attn .dot { border-color: #9a6a00; }
[data-theme="light"] .umenu-panel, [data-theme="light"] .palette-box { box-shadow: 0 18px 40px rgba(15, 30, 50, .14); }
[data-theme="light"] .toast, [data-theme="light"] .dpanel-sheet { box-shadow: 0 12px 32px rgba(15, 30, 50, .12); }
[data-theme="light"] .wordmark { -webkit-text-stroke-color: rgba(var(--line-rgb), .6); }
[data-theme="light"] .term { color: var(--ok); }

/* ---------- responsive tiers ---------- */
@media (max-width: 980px) {
  .ind-list { max-width: none; }
}

@media (max-width: 760px) {
  :root { --nav-h: 64px; }
  .ind-list {
    flex: 1 1 100%; flex-direction: row; overflow-x: auto; gap: 8px; padding-bottom: 6px;
    scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: thin;
  }
  .ind {
    width: auto; flex-shrink: 0; white-space: nowrap; scroll-snap-align: start;
    border: 1px solid var(--soft); border-radius: var(--pill); min-height: 44px; padding: 8px 16px; font-size: 14.5px;
  }
  .ind[aria-selected="true"] { border: 1px solid var(--accent); background: rgba(var(--accent-rgb), .12); }
  .ind .n { width: auto; }
  .ind-panels { flex-basis: 100%; }
  .segs { flex-wrap: wrap; }
  .seg { flex: 1 1 calc(50% - 5px); }
  .sec-head .btn { width: 100%; }
  .badge { left: 12px; bottom: -14px; }
  .cta-band .actions { width: 100%; }
  .cta-band .actions .btn { flex: 1 1 auto; }
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  .logo { font-size: 21px; }
  .lang { min-width: 34px; padding: 0 6px; font-size: 11px; }
  .actions .btn { flex: 1 1 100%; }
  .stat span { font-size: 10.5px; letter-spacing: .08em; }
  .svc { min-height: 0; }
  .price .ribbon { left: 20px; }
  .fig span { white-space: normal; }
  .term { font-size: 12px; padding: 12px; }
  .contact-row { flex-direction: column; align-items: flex-start; gap: 4px; }
  .form-foot .btn { width: 100%; }
  .foot-bottom { flex-direction: column; }
  .addon .btn { width: 100%; }
}

@media (max-width: 360px) {
  .nav-actions { gap: 8px; }
  .lang { min-width: 30px; padding: 0 4px; }
  .burger { width: 42px; height: 42px; }
}

@media print {
  .nav, .site-foot, .est-bar, .gridbg, .glow { display: none !important; }
  body { background: #fff; color: #000; }
}
