/* css/00-base.css */
/* Wrennery design system — base, tokens, layout, components. */
@font-face { font-family: 'Jakarta'; src: url('../fonts/plus-jakarta-sans-latin-wght-normal.woff2') format('woff2'); font-weight: 200 800; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Jakarta'; src: url('../fonts/plus-jakarta-sans-latin-ext-wght-normal.woff2') format('woff2'); font-weight: 200 800; font-style: normal; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Jakarta'; src: url('../fonts/plus-jakarta-sans-latin-wght-italic.woff2') format('woff2'); font-weight: 200 800; font-style: italic; font-display: swap; }
@font-face { font-family: 'Fraunces'; src: url('../fonts/fraunces-latin-wght-normal.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Fraunces'; src: url('../fonts/fraunces-latin-wght-italic.woff2') format('woff2'); font-weight: 100 900; font-style: italic; font-display: swap; }

:root {
  --font: 'Jakarta', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --mono: ui-monospace, 'SF Mono', 'Cascadia Mono', Menlo, Consolas, monospace;

  --brand-50: #EFF2F8; --brand-100: #DDE3F0; --brand-200: #BBC6E0; --brand-300: #91A2CB; --brand-400: #647AB1;
  --brand-500: #465E9A; --brand-600: #354A80; --brand-700: #2B3C68; --brand-800: #243256; --brand-900: #1E2B4A; --brand-950: #141D34;
  --coral: #B4633A; --coral-50: #FBF2EB; --coral-100: #F5E0D2; --coral-700: #8A4424;
  --moss: #7C9A6D; --moss-50: #F1F5EE; --moss-100: #DFE8D9; --moss-700: #4C6A3F;
  --eggshell: #CFE0E8; --oat: #F3EEE3;
  --sun: #F2B33D; --sun-50: #FFF8E6; --sun-100: #FFEDC2; --sun-700: #8F5F00;
  --sky: #2E86D6; --sky-50: #EEF6FD; --sky-100: #D9EBFB; --sky-700: #1B5E9E;
  --lilac: #7457DA; --lilac-50: #F4F1FE; --lilac-100: #E8E1FC; --lilac-700: #5338B0;
  --pink: #D6458B; --pink-50: #FDEFF6; --pink-100: #FADBEA;

  --ink: #1A2238; --ink-2: #3A445C; --muted: #636E85; --faint: #8A93A6; --ghost: #B8BFCD;
  --line: #E6E1DA; --line-2: #EEEBE6; --line-3: #F4F2EE;
  --canvas: #F7F3EB; --surface: #FFFFFF; --subtle: #FAF9F6; --hover: #F7F5F1;

  --ok: #12804B; --ok-bg: #E2F4E9; --ok-line: #B6E2C7;
  --warn: #A86500; --warn-bg: #FDF1D6; --warn-line: #F4D79A;
  --bad: #C42F3D; --bad-bg: #FCE7E9; --bad-line: #F4BEC4;
  --info: #22609F; --info-bg: #E4EFFB; --info-line: #BBD5F1;

  --r-xs: 6px; --r-sm: 8px; --r: 12px; --r-lg: 16px; --r-xl: 22px;
  --sh-xs: 0 1px 1px rgba(26,34,56,.04);
  --sh-sm: 0 1px 2px rgba(26,34,56,.05), 0 1px 1px rgba(26,34,56,.03);
  --sh: 0 1px 2px rgba(26,34,56,.04), 0 4px 12px rgba(26,34,56,.05);
  --sh-lg: 0 18px 44px rgba(26,34,56,.14), 0 3px 8px rgba(26,34,56,.06);
  --ring: 0 0 0 3px rgba(53,74,128,.26);
  --sidebar-w: 268px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-size: 14px; line-height: 1.5; color: var(--ink); background: var(--canvas); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-feature-settings: 'cv11', 'ss01'; }
img, svg { display: inline-block; vertical-align: middle; }
img { max-width: 100%; height: auto; }
a { color: var(--brand-600); text-decoration: none; }
a:hover { color: var(--brand-700); }
h1, h2, h3, h4, h5 { margin: 0; line-height: 1.25; letter-spacing: -0.01em; color: var(--ink); }
h1 { font-size: 24px; font-weight: 750; letter-spacing: -0.02em; }
h2 { font-size: 18px; font-weight: 700; }
h3 { font-size: 15.5px; font-weight: 700; }
h4 { font-size: 14px; font-weight: 700; }
p { margin: 0 0 .75em; }
p:last-child { margin-bottom: 0; }
hr { border: 0; border-top: 1px solid var(--line-2); margin: 18px 0; }
small, .small { font-size: 12.5px; }
code, kbd, .mono { font-family: var(--mono); font-size: .92em; }
kbd { display: inline-block; padding: 1px 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; background: var(--surface); font-size: 11px; color: var(--muted); line-height: 1.5; }
::selection { background: var(--brand-100); }
.ic { flex-shrink: 0; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- utilities ---------- */
.flex { display: flex; } .iflex { display: inline-flex; } .col { flex-direction: column; } .wrap { flex-wrap: wrap; }
.items-center { align-items: center; } .items-start { align-items: flex-start; } .items-end { align-items: flex-end; } .items-baseline { align-items: baseline; }
.justify-between { justify-content: space-between; } .justify-center { justify-content: center; } .justify-end { justify-content: flex-end; }
.grow { flex: 1 1 auto; min-width: 0; } .shrink-0 { flex-shrink: 0; }
.gap-0 { gap: 2px; } .gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .gap-5 { gap: 20px; } .gap-6 { gap: 24px; } .gap-8 { gap: 32px; }
.grid { display: grid; gap: 20px; } .grid.tight { gap: 12px; } .grid.loose { gap: 28px; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } .cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.cols-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); } .cols-1-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); } .cols-3-2 { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } .cols-side { grid-template-columns: minmax(0, 1fr) 340px; } .cols-side-l { grid-template-columns: 280px minmax(0, 1fr); }
.span-2 { grid-column: span 2; } .span-3 { grid-column: span 3; } .span-all { grid-column: 1 / -1; }
.mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mt-5 { margin-top: 20px; } .mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; }
.mb-0 { margin-bottom: 0 !important; } .mb-1 { margin-bottom: 4px; } .mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; } .mb-5 { margin-bottom: 20px; } .mb-6 { margin-bottom: 24px; } .mb-8 { margin-bottom: 32px; }
.ml-auto { margin-left: auto; } .mr-auto { margin-right: auto; }
.p-0 { padding: 0 !important; } .p-3 { padding: 12px; } .p-4 { padding: 16px; } .p-5 { padding: 20px; } .px-4 { padding-left: 16px; padding-right: 16px; } .py-2 { padding-top: 8px; padding-bottom: 8px; }
.w-full { width: 100%; } .h-full { height: 100%; } .min-w-0 { min-width: 0; }
.text-xs { font-size: 11.5px; } .text-sm { font-size: 12.5px; } .text-md { font-size: 14px; } .text-lg { font-size: 16px; } .text-xl { font-size: 20px; } .text-2xl { font-size: 26px; } .text-3xl { font-size: 32px; }
.bold { font-weight: 700; } .semi { font-weight: 600; } .medium { font-weight: 500; } .normal { font-weight: 400; } .italic { font-style: italic; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .ink { color: var(--ink); } .brand { color: var(--brand-600); }
.c-ok { color: var(--ok); } .c-warn { color: var(--warn); } .c-bad { color: var(--bad); } .c-info { color: var(--info); } .c-lilac { color: var(--lilac); } .c-coral { color: var(--coral); }
.right { text-align: right; } .center { text-align: center; } .nowrap { white-space: nowrap; } .truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabnum { font-variant-numeric: tabular-nums; } .upper { text-transform: uppercase; letter-spacing: .06em; }
.rounded { border-radius: var(--r); } .round { border-radius: 999px; }
.relative { position: relative; } .block { display: block; } .inline-block { display: inline-block; }
.lh-tight { line-height: 1.25; } .lh-loose { line-height: 1.7; }
.divider-v { width: 1px; align-self: stretch; background: var(--line); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; background: var(--faint); }
.dot.ok { background: #1DA463; } .dot.warn { background: #E39A12; } .dot.bad { background: #E0414F; } .dot.info { background: var(--sky); } .dot.lilac { background: var(--lilac); }
.dot.pulse { box-shadow: 0 0 0 0 rgba(29,164,99,.5); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(29,164,99,.45); } 70% { box-shadow: 0 0 0 7px rgba(29,164,99,0); } 100% { box-shadow: 0 0 0 0 rgba(29,164,99,0); } }
.swatch { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex-shrink: 0; }
.hide { display: none !important; }

/* ---------- demo bar ---------- */
.demobar { position: sticky; top: 0; z-index: 60; display: flex; align-items: center; gap: 12px; height: 38px; padding: 0 16px; background: var(--ink); color: #D9E1EA; font-size: 12.5px; }
.demobar a { color: #fff; }
.demobar .tag { background: var(--coral); color: #fff; font-weight: 700; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; }
.demobar .roles { display: flex; gap: 2px; background: rgba(255,255,255,.08); border-radius: 999px; padding: 3px; }
.demobar .roles a { color: #C3CDD8; padding: 3px 11px; border-radius: 999px; font-weight: 600; font-size: 12px; white-space: nowrap; }
.demobar .roles a:hover { color: #fff; background: rgba(255,255,255,.08); }
.demobar .roles a.on { background: #fff; color: var(--ink); }
.demobar .sp { flex: 1; }
.demobar .back { display: inline-flex; align-items: center; gap: 6px; opacity: .85; }
.demobar .back:hover { opacity: 1; color: #fff; }

/* ---------- app shell ---------- */
.app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: calc(100vh - 38px); }
.sidebar { position: sticky; top: 38px; height: calc(100vh - 38px); overflow-y: auto; overscroll-behavior: contain; background: linear-gradient(180deg, var(--brand-900) 0%, var(--brand-950) 100%); color: #D0D8EA; padding: 14px 12px 24px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent; }
.sidebar .brandmark { display: flex; align-items: center; gap: 10px; padding: 6px 10px 14px; color: #fff; }
.logo-img { display: block; height: auto; max-width: 100%; }
.sidebar .site-pill { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; margin-bottom: 12px; border-radius: 11px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.08); color: #fff; cursor: pointer; text-align: left; font: inherit; }
.sidebar .site-pill:hover { background: rgba(255,255,255,.11); }
.sidebar .site-pill .site-ico { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--sun); color: var(--brand-950); font-weight: 800; font-size: 13px; }
.sidebar .site-pill .t1 { font-weight: 700; font-size: 13px; line-height: 1.2; }
.sidebar .site-pill .t2 { font-size: 11.5px; color: #A3AFCB; }
.nav-sec { margin-top: 14px; }
.nav-sec > .lbl { padding: 0 10px 6px; font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #8A97B5; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; margin: 1px 0; border-radius: 9px; color: #D0D8EA; font-weight: 550; font-size: 13.5px; line-height: 1.3; }
.nav a .ic { color: #9AA8C6; }
.nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav a:hover .ic { color: #fff; }
.nav a.on { background: rgba(255,255,255,.12); color: #fff; box-shadow: inset 3px 0 0 var(--sun); }
.nav a.on .ic { color: var(--sun); }
.nav a .count { margin-left: auto; font-size: 11px; font-weight: 700; background: rgba(255,255,255,.12); color: #fff; padding: 1px 7px; border-radius: 999px; }
.nav a .count.alert { background: var(--coral); }
.nav a .lock { margin-left: auto; opacity: .55; }
.sidebar-foot { margin-top: 20px; padding: 12px 10px; border-radius: 12px; background: rgba(255,255,255,.05); font-size: 12px; color: #A3AFCB; }
.sidebar-foot b { color: #fff; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 38px; z-index: 40; display: flex; align-items: center; gap: 12px; height: 62px; padding: 0 28px; background: rgba(246,244,240,.86); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.topbar .menu-btn { display: none; }
.search { position: relative; flex: 0 1 440px; }
.search input { width: 100%; height: 38px; padding: 0 70px 0 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font: inherit; color: var(--ink); }
.search input:focus { outline: none; border-color: var(--brand-400); box-shadow: var(--ring); }
.search .ic { position: absolute; left: 12px; top: 10px; color: var(--faint); }
.search kbd { position: absolute; right: 10px; top: 9px; }
.topbar .now { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 12.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--ink-2); cursor: pointer; }
.icon-btn:hover { background: var(--surface); border-color: var(--line); color: var(--ink); }
.icon-btn .badge-dot { position: absolute; top: 7px; right: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--coral); border: 2px solid var(--canvas); }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 4px 10px 4px 4px; border-radius: 999px; cursor: pointer; border: 1px solid transparent; background: none; font: inherit; color: inherit; text-align: left; }
.user-chip:hover { background: var(--surface); border-color: var(--line); }
.user-chip .n { font-weight: 700; font-size: 13px; line-height: 1.15; }
.user-chip .r { font-size: 11.5px; color: var(--muted); line-height: 1.15; }
.content { padding: 26px 32px 56px; width: 100%; max-width: 1480px; }
.content.wide { max-width: none; }
.content.narrow { max-width: 1040px; }

/* ---------- page header ---------- */
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); margin-bottom: 8px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); font-weight: 500; }
.crumbs a:hover { color: var(--brand-600); }
.crumbs .ic { color: var(--ghost); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head .sub { margin-top: 5px; color: var(--muted); font-size: 14px; max-width: 760px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 26px 0 12px; }
.section-title h2 { font-size: 16px; }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-sm); min-width: 0; }
.card.flat { box-shadow: none; }
.card.soft { background: var(--subtle); }
.card.pad { padding: 20px; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 20px; border-bottom: 1px solid var(--line-2); min-height: 56px; }
.card-h h3 { font-size: 14.5px; display: flex; align-items: center; gap: 8px; }
.card-h .sub { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.card-h.plain { border-bottom: 0; padding-bottom: 4px; }
.card-b { padding: 18px 20px; }
.card-b.tight { padding: 12px 16px; }
.card-f { padding: 12px 20px; border-top: 1px solid var(--line-2); display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; }
.card-link { font-size: 12.5px; font-weight: 650; display: inline-flex; align-items: center; gap: 4px; }
.card.accent-top { border-top: 3px solid var(--brand-500); }
.card.hoverable { transition: box-shadow .15s, transform .15s, border-color .15s; }
.card.hoverable:hover { box-shadow: var(--sh); border-color: #DCD6CE; transform: translateY(-1px); }
.tint-brand { background: var(--brand-50); border-color: var(--brand-100); }
.tint-sun { background: var(--sun-50); border-color: var(--sun-100); }
.tint-coral { background: var(--coral-50); border-color: var(--coral-100); }
.tint-sky { background: var(--sky-50); border-color: var(--sky-100); }
.tint-lilac { background: var(--lilac-50); border-color: var(--lilac-100); }

/* ---------- stats ---------- */
.stat { padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.stat .lbl { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.stat .val { font-size: 28px; font-weight: 750; letter-spacing: -0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .val small { font-size: 15px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.stat .foot { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.stat-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; }
.delta { display: inline-flex; align-items: center; gap: 2px; font-weight: 700; font-size: 12px; padding: 1px 7px; border-radius: 999px; white-space: nowrap; }
.delta.up { color: var(--ok); background: var(--ok-bg); } .delta.down { color: var(--bad); background: var(--bad-bg); } .delta.flat { color: var(--muted); background: var(--line-3); }
.ico-brand { background: var(--brand-50); color: var(--brand-600); } .ico-coral { background: var(--coral-50); color: var(--coral); } .ico-sun { background: var(--sun-50); color: #C8890E; } .ico-sky { background: var(--sky-50); color: var(--sky); } .ico-lilac { background: var(--lilac-50); color: var(--lilac); } .ico-pink { background: var(--pink-50); color: var(--pink); } .ico-ink { background: var(--line-3); color: var(--ink-2); } .ico-ok { background: var(--ok-bg); color: var(--ok); } .ico-bad { background: var(--bad-bg); color: var(--bad); } .ico-warn { background: var(--warn-bg); color: var(--warn); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 650; font-size: 13.5px; cursor: pointer; white-space: nowrap; box-shadow: var(--sh-xs); transition: background .12s, border-color .12s, box-shadow .12s, color .12s; text-decoration: none; }
.btn:hover { background: var(--hover); border-color: #D9D3CA; color: var(--ink); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn .ic { margin-left: -2px; }
.btn.primary { background: var(--brand-600); border-color: var(--brand-600); color: #fff; box-shadow: 0 1px 2px rgba(53,74,128,.3), inset 0 1px 0 rgba(255,255,255,.12); }
.btn.primary:hover { background: var(--brand-700); border-color: var(--brand-700); color: #fff; }
.btn.coral { background: var(--coral); border-color: var(--coral); color: #fff; }
.btn.coral:hover { background: var(--coral-700); border-color: var(--coral-700); color: #fff; }
.btn.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.dark:hover { background: #000; color: #fff; }
.btn.danger { color: var(--bad); border-color: var(--bad-line); background: #fff; }
.btn.danger:hover { background: var(--bad-bg); color: var(--bad); }
.btn.danger.solid { background: var(--bad); color: #fff; border-color: var(--bad); }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--ink-2); }
.btn.ghost:hover { background: rgba(26,34,56,.05); }
.btn.soft { background: var(--brand-50); border-color: var(--brand-100); color: var(--brand-700); box-shadow: none; }
.btn.soft:hover { background: var(--brand-100); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; gap: 5px; }
.btn.xs { height: 26px; padding: 0 8px; font-size: 12px; border-radius: 7px; gap: 4px; }
.btn.lg { height: 46px; padding: 0 20px; font-size: 15px; border-radius: 12px; }
.btn.icon { width: 36px; padding: 0; } .btn.sm.icon { width: 30px; } .btn.xs.icon { width: 26px; }
.btn[disabled], .btn.disabled { opacity: .5; pointer-events: none; }
.btn-group { display: inline-flex; } .btn-group .btn { border-radius: 0; margin-left: -1px; } .btn-group .btn:first-child { border-radius: 10px 0 0 10px; margin-left: 0; } .btn-group .btn:last-child { border-radius: 0 10px 10px 0; }

/* ---------- badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; line-height: 1; white-space: nowrap; background: var(--line-3); color: var(--ink-2); border: 1px solid transparent; }
.badge .ic { width: 13px; height: 13px; }
.badge.ok { background: var(--ok-bg); color: var(--ok); } .badge.warn { background: var(--warn-bg); color: var(--warn); } .badge.bad { background: var(--bad-bg); color: var(--bad); } .badge.info { background: var(--info-bg); color: var(--info); }
.badge.brand { background: var(--brand-50); color: var(--brand-700); } .badge.lilac { background: var(--lilac-50); color: var(--lilac-700); } .badge.coral { background: var(--coral-50); color: var(--coral-700); } .badge.sun { background: var(--sun-50); color: var(--sun-700); } .badge.pink { background: var(--pink-50); color: var(--pink); } .badge.sky { background: var(--sky-50); color: var(--sky-700); }
.badge.dark { background: var(--ink); color: #fff; }
.badge.outline { background: transparent; border-color: var(--line); color: var(--ink-2); }
.badge.lg { height: 26px; padding: 0 11px; font-size: 12.5px; }
.badge.sq { border-radius: 6px; }
.badge.dotted::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; background: var(--line-3); color: var(--ink-2); white-space: nowrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 12.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.chip:hover { border-color: #D3CDC4; color: var(--ink); }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip .n { font-size: 11px; color: var(--faint); font-weight: 700; } .chip.on .n { color: #C9D2DC; }
.allergen { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px 2px 6px; border-radius: 6px; background: var(--bad-bg); color: var(--bad); font-size: 11.5px; font-weight: 700; border: 1px solid var(--bad-line); }

/* ---------- avatars ---------- */
.av { position: relative; display: inline-block; flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%; background: var(--line-3); overflow: hidden; }
.av img { width: 100%; height: 100%; display: block; }
.av.xs { width: 22px; height: 22px; } .av.sm { width: 28px; height: 28px; } .av.md { width: 44px; height: 44px; } .av.lg { width: 64px; height: 64px; } .av.xl { width: 96px; height: 96px; }
.av.ring { box-shadow: 0 0 0 2px var(--surface); }
.av .st { position: absolute; right: 0; bottom: 0; width: 28%; height: 28%; border-radius: 50%; border: 2px solid #fff; background: #1DA463; }
.av-initials { display: inline-grid; place-items: center; font-weight: 700; color: #fff; font-size: 13px; }
.av-stack { display: inline-flex; } .av-stack .av { margin-left: -8px; box-shadow: 0 0 0 2px var(--surface); } .av-stack .av:first-child { margin-left: 0; }
.person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.person .nm { font-weight: 650; color: var(--ink); line-height: 1.25; }
.person a.nm:hover { color: var(--brand-600); }
.person .meta { font-size: 12px; color: var(--muted); line-height: 1.25; }

/* ---------- tables ---------- */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.table th { position: sticky; top: 0; text-align: left; font-size: 11.5px; font-weight: 700; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; padding: 10px 14px; background: var(--subtle); border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line-3); vertical-align: middle; }
.table tbody tr:hover td { background: var(--hover); }
.table tbody tr:last-child td { border-bottom: 0; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table.compact td { padding: 8px 12px; } .table.compact th { padding: 8px 12px; }
.table .row-muted td { color: var(--faint); }
.table tr.row-alert td { background: #FFF8F7; }
.table tr.row-warn td { background: #FFFBF1; }
.table tr.row-ok td { background: #F6FCF8; }
.table tfoot td { font-weight: 700; background: var(--subtle); border-top: 1px solid var(--line-2); }
.card > .table-wrap:first-child table th:first-child { border-top-left-radius: var(--r-lg); }
.card > .table-wrap:first-child table th:last-child { border-top-right-radius: var(--r-lg); }
.table .actions { display: flex; gap: 4px; justify-content: flex-end; }
.sort { cursor: pointer; } .sort:hover { color: var(--ink); }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-size: 12.5px; font-weight: 650; color: var(--ink-2); }
.field .hint { font-size: 12px; color: var(--muted); }
.field .err { font-size: 12px; color: var(--bad); font-weight: 600; }
.input, .select, .textarea { width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font: inherit; font-size: 13.5px; color: var(--ink); transition: border-color .12s, box-shadow .12s; }
.textarea { height: auto; min-height: 92px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.select { appearance: none; -webkit-appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23637081' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand-400); box-shadow: var(--ring); }
.input.sm, .select.sm { height: 32px; font-size: 13px; border-radius: 8px; }
.input[readonly] { background: var(--subtle); color: var(--ink-2); }
.input.invalid { border-color: var(--bad); box-shadow: 0 0 0 3px rgba(196,47,61,.12); }
.input-group { display: flex; align-items: stretch; }
.input-group .addon { display: inline-flex; align-items: center; padding: 0 12px; border: 1px solid var(--line); background: var(--subtle); color: var(--muted); font-size: 13px; font-weight: 600; }
.input-group .addon:first-child { border-radius: 10px 0 0 10px; border-right: 0; } .input-group .addon:last-child { border-radius: 0 10px 10px 0; border-left: 0; }
.input-group .input { border-radius: 0; } .input-group .input:first-child { border-radius: 10px 0 0 10px; } .input-group .input:last-child { border-radius: 0 10px 10px 0; }
.input-icon { position: relative; } .input-icon .ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; } .input-icon .input { padding-left: 36px; }
.check { display: inline-flex; align-items: flex-start; gap: 9px; cursor: pointer; font-size: 13.5px; line-height: 1.4; }
.check input { width: 17px; height: 17px; margin: 1px 0 0; accent-color: var(--brand-600); flex-shrink: 0; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13.5px; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .tr { position: relative; width: 38px; height: 22px; border-radius: 999px; background: #D5D0C8; transition: background .15s; flex-shrink: 0; }
.switch .tr::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
.switch input:checked + .tr { background: var(--brand-500); }
.switch input:checked + .tr::after { transform: translateX(16px); }
.switch input:disabled + .tr { opacity: .55; }
.switch input:focus-visible + .tr { box-shadow: var(--ring); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.form-grid .full { grid-column: 1 / -1; }
.form-section { padding: 22px 0; border-top: 1px solid var(--line-2); display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 28px; }
.form-section:first-child { border-top: 0; padding-top: 4px; }
.form-section .fs-title h3 { font-size: 14.5px; margin-bottom: 4px; }
.form-section .fs-title p { font-size: 13px; color: var(--muted); }
.range { width: 100%; accent-color: var(--brand-600); }
.seg { display: inline-flex; padding: 3px; gap: 2px; background: #EEEBE6; border-radius: 10px; }
.seg button, .seg a { border: 0; background: transparent; font: inherit; font-size: 12.5px; font-weight: 650; color: var(--muted); padding: 6px 12px; border-radius: 8px; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.seg button.on, .seg a.on { background: var(--surface); color: var(--ink); box-shadow: var(--sh-sm); }
.seg button:hover:not(.on), .seg a:hover:not(.on) { color: var(--ink); }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a, .tabs button { position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 11px 14px; font: inherit; font-size: 13.5px; font-weight: 650; color: var(--muted); background: none; border: 0; cursor: pointer; white-space: nowrap; }
.tabs a:hover, .tabs button:hover { color: var(--ink); }
.tabs .on { color: var(--brand-700); }
.tabs .on::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2.5px; border-radius: 3px 3px 0 0; background: var(--brand-600); }
.tabs .n { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--line-3); color: var(--muted); }
.tabs .on .n { background: var(--brand-50); color: var(--brand-700); }
.tab-panel { display: none; } .tab-panel.on { display: block; }

/* ---------- callouts ---------- */
.callout { display: flex; gap: 12px; padding: 13px 16px; border-radius: 12px; border: 1px solid var(--info-line); background: var(--info-bg); color: #18466F; font-size: 13.5px; align-items: flex-start; }
.callout .ic { margin-top: 1px; color: var(--info); }
.callout b, .callout strong { color: inherit; }
.callout.ok { border-color: var(--ok-line); background: var(--ok-bg); color: #0E5A35; } .callout.ok .ic { color: var(--ok); }
.callout.warn { border-color: var(--warn-line); background: var(--warn-bg); color: #6E4200; } .callout.warn .ic { color: var(--warn); }
.callout.bad { border-color: var(--bad-line); background: var(--bad-bg); color: #84202A; } .callout.bad .ic { color: var(--bad); }
.callout.brand { border-color: var(--brand-100); background: var(--brand-50); color: var(--brand-800); } .callout.brand .ic { color: var(--brand-600); }
.callout.neutral { border-color: var(--line); background: var(--subtle); color: var(--ink-2); } .callout.neutral .ic { color: var(--muted); }
.callout .grow > :first-child { font-weight: 700; }
.guard { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: #FBF7FF; border: 1px dashed #CDBDF6; color: #4B3696; font-size: 12.5px; }
.guard .ic { color: var(--lilac); margin-top: 1px; }
.guard b { color: #3A2785; }

/* ---------- lists & key-values ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: center; gap: 12px; padding: 11px 20px; border-bottom: 1px solid var(--line-3); }
.list > li:last-child { border-bottom: 0; }
.list.tight > li { padding: 8px 16px; }
.list > li:hover { background: var(--hover); }
.list.nohover > li:hover { background: none; }
.kv { display: grid; grid-template-columns: minmax(120px, 38%) 1fr; gap: 9px 16px; font-size: 13.5px; margin: 0; }
.kv dt { color: var(--muted); font-weight: 550; }
.kv dd { margin: 0; color: var(--ink); font-weight: 550; min-width: 0; overflow-wrap: anywhere; }
.kv.stack { grid-template-columns: 1fr; gap: 2px; }
.kv.stack dd { margin-bottom: 10px; }
.meta-row { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--muted); }
.meta-row span { display: inline-flex; align-items: center; gap: 5px; }

/* ---------- progress & meters ---------- */
.bar { height: 8px; border-radius: 999px; background: #ECE8E2; overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: inherit; background: var(--brand-500); }
.bar.ok > i { background: #22A565; } .bar.warn > i { background: #E39A12; } .bar.bad > i { background: #E0414F; } .bar.sky > i { background: var(--sky); } .bar.lilac > i { background: var(--lilac); } .bar.coral > i { background: var(--coral); }
.bar.thin { height: 5px; } .bar.thick { height: 12px; }
.stack-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: #ECE8E2; gap: 2px; }
.stack-bar > i { display: block; height: 100%; }
.ring-pct { position: relative; display: inline-grid; place-items: center; }
.ring-pct .v { position: absolute; font-weight: 750; font-size: 13px; }
.steps { display: flex; align-items: center; gap: 0; counter-reset: s; }
.steps .s { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 650; color: var(--muted); }
.steps .s .n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--line-3); color: var(--muted); font-size: 12px; font-weight: 800; }
.steps .s.done .n { background: var(--brand-600); color: #fff; } .steps .s.done { color: var(--ink-2); }
.steps .s.cur .n { background: var(--ink); color: #fff; } .steps .s.cur { color: var(--ink); }
.steps .ln { flex: 1; height: 2px; min-width: 18px; background: var(--line); margin: 0 10px; }
.steps .ln.done { background: var(--brand-400); }

/* ---------- timeline / feed ---------- */
.timeline { position: relative; margin: 0; padding: 0; list-style: none; }
.timeline > li { position: relative; display: flex; gap: 14px; padding: 0 0 18px; }
.timeline > li::before { content: ''; position: absolute; left: 17px; top: 38px; bottom: 2px; width: 2px; background: var(--line-2); }
.timeline > li:last-child::before { display: none; }
.timeline .t-ico { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; position: relative; z-index: 1; }
.timeline .t-body { flex: 1; min-width: 0; padding-top: 6px; }
.timeline .t-time { font-size: 12px; color: var(--muted); font-weight: 600; }
.timeline .t-title { font-weight: 650; }
.feed-photo { margin-top: 10px; border-radius: 12px; overflow: hidden; display: block; max-width: 300px; border: 1px solid var(--line-2); }
.feed-photo img { display: block; width: 100%; height: auto; }
.feed-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin-top: 10px; max-width: 520px; }
.feed-photos img { border-radius: 10px; aspect-ratio: 4/3; object-fit: cover; width: 100%; border: 1px solid var(--line-2); }

/* ---------- empty states ---------- */
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty .ic { color: var(--ghost); margin-bottom: 8px; }
.empty h3 { color: var(--ink); margin-bottom: 4px; }

/* ---------- kanban ---------- */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 8px; }
.kcol { background: #EFECE7; border-radius: 14px; padding: 10px; min-height: 200px; }
.kcol-h { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 10px; font-weight: 700; font-size: 13px; }
.kcard { background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: 11px 12px; margin-bottom: 8px; box-shadow: var(--sh-xs); font-size: 13px; cursor: grab; }
.kcard:hover { border-color: #D3CDC4; box-shadow: var(--sh-sm); }
.kcard .t { font-weight: 700; margin-bottom: 2px; }

/* ---------- calendar ---------- */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line-2); border-left: 1px solid var(--line-2); }
.cal .dow { padding: 8px 10px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--subtle); border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.cal .day { min-height: 112px; padding: 6px 7px; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); font-size: 12px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal .day .dn { font-weight: 700; font-size: 12.5px; color: var(--ink-2); margin-bottom: 2px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; }
.cal .day.out { background: #FBFAF8; } .cal .day.out .dn { color: var(--ghost); }
.cal .day.wknd { background: #FAF9F7; }
.cal .day.today .dn { background: var(--brand-600); color: #fff; }
.cal .day.closed { background: repeating-linear-gradient(-45deg, #FBF8F4, #FBF8F4 6px, #F5F1EB 6px, #F5F1EB 12px); }
.ev { display: block; padding: 2px 6px; border-radius: 5px; font-size: 11.5px; font-weight: 650; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: var(--brand-50); color: var(--brand-700); border-left: 3px solid var(--brand-500); }
.ev.coral { background: var(--coral-50); color: var(--coral-700); border-color: var(--coral); } .ev.sun { background: var(--sun-50); color: var(--sun-700); border-color: var(--sun); } .ev.sky { background: var(--sky-50); color: var(--sky-700); border-color: var(--sky); } .ev.lilac { background: var(--lilac-50); color: var(--lilac-700); border-color: var(--lilac); } .ev.ink { background: var(--line-3); color: var(--ink-2); border-color: var(--muted); } .ev.pink { background: var(--pink-50); color: var(--pink); border-color: var(--pink); }

/* ---------- overlays ---------- */
.overlay { position: fixed; inset: 0; z-index: 90; background: rgba(15,22,30,.42); backdrop-filter: blur(2px); display: none; align-items: flex-start; justify-content: center; padding: 8vh 16px 16px; overflow-y: auto; }
.overlay.open { display: flex; animation: fadeIn .15s ease; }
.modal { width: 100%; max-width: 560px; background: var(--surface); border-radius: 18px; box-shadow: var(--sh-lg); animation: popIn .18s ease; }
.modal.lg { max-width: 820px; } .modal.sm { max-width: 420px; } .modal.xl { max-width: 1100px; }
.modal-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line-2); }
.modal-h h3 { font-size: 16px; }
.modal-b { padding: 20px 22px; }
.modal-f { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--line-2); background: var(--subtle); border-radius: 0 0 18px 18px; }
.drawer-overlay { align-items: stretch; justify-content: flex-end; padding: 0; }
.drawer { width: 100%; max-width: 520px; height: 100%; background: var(--surface); box-shadow: var(--sh-lg); display: flex; flex-direction: column; animation: slideIn .2s ease; }
.drawer .modal-b { flex: 1; overflow-y: auto; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes slideIn { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.dropdown { position: relative; display: inline-block; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 70; min-width: 220px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--sh-lg); padding: 6px; display: none; }
.menu.left { right: auto; left: 0; }
.dropdown.open > .menu { display: block; animation: popIn .12s ease; }
.menu a, .menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 8px; font: inherit; font-size: 13.5px; font-weight: 550; color: var(--ink); background: none; border: 0; cursor: pointer; text-align: left; }
.menu a:hover, .menu button:hover { background: var(--hover); color: var(--ink); }
.menu .ic { color: var(--muted); }
.menu .sep { height: 1px; background: var(--line-2); margin: 6px 4px; }
.menu .mh { padding: 8px 10px 4px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--faint); }
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.toast { display: flex; align-items: center; gap: 10px; min-width: 280px; max-width: 420px; padding: 12px 16px; border-radius: 12px; background: var(--ink); color: #fff; box-shadow: var(--sh-lg); font-size: 13.5px; font-weight: 550; animation: popIn .2s ease; }
.toast .ic { color: #6EE7B7; }
.toast.out { opacity: 0; transform: translateY(6px); transition: all .25s; }

/* ---------- palette (command-K) ---------- */
.palette { max-width: 640px; padding: 0; overflow: hidden; }
.palette .p-in { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.palette .p-in input { flex: 1; border: 0; font: inherit; font-size: 16px; outline: none; background: transparent; }
.palette .p-res { max-height: 56vh; overflow-y: auto; padding: 6px; }
.palette .p-res a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: var(--ink); }
.palette .p-res a.sel, .palette .p-res a:hover { background: var(--brand-50); }
.palette .p-res .k { margin-left: auto; font-size: 11.5px; color: var(--faint); font-weight: 600; }
.palette .p-grp { padding: 10px 12px 4px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--faint); }

/* ---------- misc components ---------- */
.mini-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; font-size: 12px; text-align: center; }
.mini-cal .h { font-weight: 700; color: var(--faint); font-size: 11px; }
.mini-cal .d { padding: 6px 0; border-radius: 8px; font-weight: 600; color: var(--ink-2); }
.mini-cal .d.on { background: var(--brand-600); color: #fff; } .mini-cal .d.mark { background: var(--brand-50); color: var(--brand-700); } .mini-cal .d.off { color: var(--ghost); } .mini-cal .d.hol { background: var(--sun-50); color: var(--sun-700); }
.notice { padding: 16px 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.notice.pinned { border-color: var(--sun-100); background: linear-gradient(180deg, #FFFCF2, #fff); }
.pill-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.filterbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.filterbar .input, .filterbar .select { height: 34px; width: auto; }
.filterbar .search-in { min-width: 240px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { font-family: var(--font); }
.ratio-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-weight: 700; font-size: 12px; white-space: nowrap; }
.ratio-pill.ok { background: var(--ok-bg); color: var(--ok); } .ratio-pill.warn { background: var(--warn-bg); color: var(--warn); } .ratio-pill.bad { background: var(--bad-bg); color: var(--bad); }
.room-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 650; color: var(--ink-2); white-space: nowrap; }
.room-chip i { width: 8px; height: 8px; border-radius: 3px; display: inline-block; }
.signature { font-family: 'Fraunces', serif; font-style: italic; font-size: 22px; color: #1C3E77; }
.locked-overlay { position: relative; }
.photo-tile { position: relative; border-radius: 14px; overflow: hidden; border: 1px solid var(--line-2); background: var(--line-3); }
.photo-tile img { display: block; width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.photo-tile .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 10px 8px; background: linear-gradient(transparent, rgba(0,0,0,.55)); color: #fff; font-size: 12px; font-weight: 600; }
.phone { width: 390px; height: 800px; border-radius: 54px; background: #0F1720; padding: 13px; box-shadow: 0 40px 80px rgba(16,24,40,.28), inset 0 0 0 2px #2A3440; position: relative; flex-shrink: 0; }
.phone .scr { width: 100%; height: 100%; border-radius: 42px; overflow: hidden; background: var(--canvas); position: relative; }
.phone .notch { position: absolute; top: 24px; left: 50%; transform: translateX(-50%); width: 112px; height: 32px; border-radius: 20px; background: #0F1720; z-index: 5; }

/* ---------- permission banner ---------- */
.perm-banner { display: none; align-items: center; gap: 12px; padding: 12px 16px; margin-bottom: 18px; border-radius: 12px; background: #FFF6E5; border: 1px solid var(--warn-line); color: #6E4200; font-size: 13.5px; }
.perm-banner.show { display: flex; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) { .demobar .hide-md { display: none !important; } }
@media (max-width: 1280px) { .cols-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .cols-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .cols-side { grid-template-columns: minmax(0, 1fr) 300px; } }
@media (max-width: 1100px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 80; left: 0; top: 38px; width: 280px; transform: translateX(-105%); transition: transform .2s ease; box-shadow: var(--sh-lg); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open::after { content: ''; position: fixed; inset: 0; z-index: 75; background: rgba(15,22,30,.35); }
  .topbar .menu-btn { display: inline-grid; }
  .topbar { padding: 0 16px; }
  .content { padding: 20px 18px 48px; }
  .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols-side, .cols-side-l, .cols-2-1, .cols-1-2, .cols-3-2 { grid-template-columns: 1fr; }
  .form-section { grid-template-columns: 1fr; gap: 12px; }
}
@media (max-width: 760px) {
  .cols-2, .cols-3, .cols-4, .cols-5, .cols-6 { grid-template-columns: 1fr; }
  .grid.keep-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid { grid-template-columns: 1fr; }
  .topbar .now, .user-chip .txt, .hide-sm { display: none !important; }
  .search { flex: 1 1 auto; }
  .search kbd { display: none; }
  h1 { font-size: 21px; }
  .demobar { gap: 6px; padding: 0 8px; }
  .demobar .sp { display: none; }
  .demobar .roles { flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .demobar .roles::-webkit-scrollbar { display: none; }
  .demobar .roles a { padding: 3px 8px; font-size: 11.5px; }
  .demobar .tag { padding: 3px 6px; }
  .demobar .hide-sm { display: none; }
  .page-head .actions { width: 100%; }
  .span-2, .span-3 { grid-column: auto; }
  .kv { grid-template-columns: 1fr; gap: 2px; } .kv dd { margin-bottom: 8px; }
  .cal .day { min-height: 70px; } .cal .ev { font-size: 10px; padding: 1px 3px; }
  .phone { transform: scale(.86); transform-origin: top center; }
}
@media print {
  .demobar, .sidebar, .topbar, .no-print, .toasts { display: none !important; }
  .app { display: block; } .content { padding: 0; max-width: none; }
  body { background: #fff; }
  .card { box-shadow: none; border-color: #ddd; break-inside: avoid; }
}

/* grid children may shrink below their content width (prevents sideways scrolling on phones) */
.grid > *, .cols-side > *, .form-grid > * { min-width: 0; }
.card-f { flex-wrap: wrap; }
@media (max-width: 760px) {
  .flex.justify-center, .flex.justify-end, .page-head .actions { flex-wrap: wrap; }
  .steps { flex-wrap: wrap; row-gap: 8px; }
  .steps .ln { flex: 0 0 12px; min-width: 12px; margin: 0 4px; }
}

/* css/site/10-site.css */
/* Wrennery marketing site */
/* Anchored headings land below the sticky bar (scroll-padding on html would make focusing the sticky bar itself scroll the page). */
.site [id]:not(#s-head):not(#s-nav):not(#s-mega) { scroll-margin-top: 88px; }
html.s-locked { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body.site { background: #FBF8F3; color: var(--ink); font-size: 16px; line-height: 1.6; overflow-x: clip; -webkit-tap-highlight-color: rgba(53,74,128,.12); }
.site a { color: var(--brand-600); }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 860px; }
.display { font-family: var(--font-display); font-weight: 560; letter-spacing: -0.025em; line-height: 1.04; font-variation-settings: 'SOFT' 50, 'WONK' 0; }
.display em { font-style: italic; color: var(--brand-600); font-weight: 520; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--brand-600); margin-bottom: 14px; }
.eyebrow::before { content: ''; width: 18px; height: 2px; background: var(--sun); border-radius: 2px; }
.lead { font-size: 19px; line-height: 1.6; color: var(--ink-2); }
.muted-lg { font-size: 17px; color: var(--ink-2); }

/* header */
.s-head { position: sticky; top: 0; z-index: 50; background: rgba(251,248,243,.86); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.s-head.scrolled { border-bottom-color: var(--line); }
.s-head .s-bar { display: flex; align-items: center; gap: 28px; height: 72px; }
.s-head .brand, .s-foot .brand { display: inline-flex; align-items: center; } .s-head .brand img, .s-foot .brand img { display: block; height: 36px; width: auto; } .s-foot .brand img { height: 34px; }
.s-nav { display: flex; align-items: center; gap: 4px; }
.s-nav > a, .s-nav > .dd > button { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px; font-weight: 650; font-size: 15px; color: var(--ink-2); background: none; border: 0; font-family: inherit; cursor: pointer; }
.s-nav > a:hover, .s-nav > .dd > button:hover, .s-nav > a.on { color: var(--ink); background: rgba(26,34,56,.05); }
.s-head .grow { flex: 1; }
.s-head .cta { display: flex; gap: 8px; align-items: center; }
.dd { position: relative; }
.mega { position: absolute; left: -120px; top: calc(100% + 10px); width: 760px; background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--sh-lg); padding: 14px; display: none; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.dd.open .mega { display: grid; animation: popIn .15s ease; }
.s-nav > .dd > button .ic { transition: transform .15s; } .dd.open > button .ic { transform: rotate(180deg); }
.s-nav-cta { display: none; }
.s-burger .i-close { display: none; } .s-head.open .s-burger .i-open { display: none; } .s-head.open .s-burger .i-close { display: inline-grid; }
.s-burger > span { display: inline-grid; place-items: center; }
.mega a { display: flex; gap: 12px; padding: 12px; border-radius: 12px; color: var(--ink); }
.mega a:hover { background: var(--brand-50); }
.mega a .mi { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; }
.mega a b { display: block; font-size: 14px; }
.mega a span { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.mega .all { grid-column: 1 / -1; justify-content: center; font-weight: 700; color: var(--brand-600); background: var(--subtle); margin-top: 4px; }
.s-burger { display: none; }

/* buttons on site */
.site .btn { height: 44px; padding: 0 18px; border-radius: 12px; font-size: 15px; }
.site .btn.sm { height: 36px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.site .btn.xl { height: 54px; padding: 0 24px; font-size: 16.5px; border-radius: 14px; }

/* hero */
.hero { position: relative; padding: 72px 0 40px; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: -20% -10% auto -10%; height: 900px; background: radial-gradient(600px 380px at 18% 20%, rgba(207,224,232,.35), transparent 70%), radial-gradient(520px 340px at 85% 10%, rgba(242,179,61,.28), transparent 70%), radial-gradient(420px 300px at 70% 70%, rgba(180,99,58,.12), transparent 70%); pointer-events: none; }
.hero .wrap { position: relative; }
.hero h1 { font-size: clamp(42px, 6.2vw, 78px); margin: 0 0 22px; max-width: 980px; }
.hero .lead { max-width: 720px; font-size: 20px; }
.hero .ctas { display: flex; gap: 12px; flex-wrap: wrap; margin: 30px 0 22px; }
.trust { display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--ink-2); font-size: 14px; font-weight: 600; }
.trust span { display: inline-flex; align-items: center; gap: 8px; }
.trust .ic { color: var(--brand-600); }
.hero-visual { position: relative; margin-top: 56px; }
.hero-visual .phone-shot { position: absolute; right: -10px; bottom: -40px; width: 250px; }
.float-chip { position: absolute; display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: #fff; border-radius: 14px; box-shadow: var(--sh-lg); font-size: 13.5px; font-weight: 650; border: 1px solid var(--line-2); z-index: 3; }
.float-chip .ci { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.float-chip { animation: floaty 6s ease-in-out infinite; }
.float-chip.d2 { animation-delay: -2s; } .float-chip.d3 { animation-delay: -4s; }

/* frames */
.browser { border-radius: 16px; background: #fff; border: 1px solid #E3DED6; box-shadow: 0 40px 80px -20px rgba(26,34,56,.25), 0 12px 24px -8px rgba(26,34,56,.12); overflow: hidden; }
.browser .chrome { display: flex; align-items: center; gap: 12px; height: 38px; padding: 0 14px; background: #F3F0EB; border-bottom: 1px solid #E6E1DA; }
.browser .dots { display: flex; gap: 6px; } .browser .dots i { width: 11px; height: 11px; border-radius: 50%; background: #E0DAD1; display: block; }
.browser .dots i:nth-child(1) { background: #F28B82; } .browser .dots i:nth-child(2) { background: #F7C66B; } .browser .dots i:nth-child(3) { background: #7FCB8B; }
.browser .url { flex: 1; max-width: 420px; margin: 0 auto; height: 24px; border-radius: 7px; background: #fff; border: 1px solid #E6E1DA; font-size: 12px; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 6px; font-weight: 600; }
.browser img { display: block; width: 100%; height: auto; }
.phone-shot { border-radius: 44px; background: #0F1720; padding: 10px; box-shadow: 0 30px 60px -16px rgba(16,24,40,.4), inset 0 0 0 2px #2A3440; }
.phone-shot img { display: block; width: 100%; height: auto; border-radius: 34px; }
.tablet-shot { border-radius: 28px; background: #0F1720; padding: 14px; box-shadow: 0 30px 60px -16px rgba(16,24,40,.35); }
.tablet-shot img { display: block; width: 100%; border-radius: 16px; }
.shot-zoom { cursor: zoom-in; }

/* sections */
.sec { padding: 96px 0; }
.sec.tight { padding: 64px 0; }
.sec.alt { background: #fff; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.sec.dark { background: linear-gradient(180deg, var(--brand-950), #0D1426); color: #D0D8EA; }
.sec.dark .display, .sec.dark h2, .sec.dark h3 { color: #fff; }
.sec.dark .eyebrow { color: #C5D2EE; }
.sec.dark .lead, .sec.dark .muted-lg { color: #B9C3DB; }
.sec-head { max-width: 760px; margin-bottom: 48px; }
.sec-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.sec-head h2 { font-size: clamp(32px, 4vw, 50px); margin-bottom: 16px; }
.feature-row { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: center; margin-bottom: 110px; }
.feature-row:last-child { margin-bottom: 0; }
.feature-row.rev { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.feature-row.rev .fr-text { order: 2; }
.feature-row h3 { font-family: var(--font-display); font-size: clamp(26px, 3vw, 38px); font-weight: 560; letter-spacing: -0.02em; line-height: 1.1; margin-bottom: 14px; }
.feature-row p { color: var(--ink-2); font-size: 16.5px; }
.ticks { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-direction: column; gap: 10px; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; font-size: 15.5px; color: var(--ink-2); }
.ticks li .ic { color: var(--brand-600); margin-top: 3px; flex-shrink: 0; }
.ticks li b { color: var(--ink); }
.sec.dark .ticks li { color: #D0D8EA; } .sec.dark .ticks li b { color: #fff; } .sec.dark .ticks li .ic { color: #C5D2EE; }
.fgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.fgrid.four { grid-template-columns: repeat(4, 1fr); }
.ftile { display: block; padding: 24px; background: #fff; border: 1px solid var(--line); border-radius: 20px; color: var(--ink); transition: transform .15s, box-shadow .15s, border-color .15s; }
a.ftile:hover { transform: translateY(-3px); box-shadow: var(--sh); border-color: #DAD3C9; color: var(--ink); }
.ftile .fi { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; margin-bottom: 16px; }
.ftile h3 { font-size: 17.5px; margin-bottom: 6px; }
.ftile p { font-size: 14.5px; color: var(--muted); margin: 0; line-height: 1.55; }
.ftile .more { display: inline-flex; align-items: center; gap: 4px; margin-top: 12px; font-size: 13.5px; font-weight: 700; color: var(--brand-600); }
.guard-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.gcard { display: flex; gap: 14px; padding: 18px; border-radius: 16px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); }
.gcard .gi { width: 38px; height: 38px; flex-shrink: 0; border-radius: 11px; display: grid; place-items: center; background: rgba(197,210,238,.14); color: #C5D2EE; }
.gcard b { display: block; color: #fff; margin-bottom: 2px; }
.gcard span { font-size: 14px; color: #B9C3DB; }
.stat-band { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.stat-band .sb { padding: 22px; border-radius: 18px; background: #fff; border: 1px solid var(--line); }
.stat-band .sb b { display: block; font-family: var(--font-display); font-size: 40px; font-weight: 600; letter-spacing: -0.03em; color: var(--ink); line-height: 1.1; }
.stat-band .sb span { font-size: 14px; color: var(--muted); }

/* day timeline */
.day-line { position: relative; display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.day-line::before { content: ''; position: absolute; left: 0; right: 0; top: 22px; height: 2px; background: linear-gradient(90deg, var(--sun), var(--coral), var(--lilac), var(--sky), var(--brand-500)); opacity: .5; }
.dl-item { position: relative; padding-top: 52px; }
.dl-item .t { position: absolute; top: 6px; left: 0; display: inline-flex; padding: 4px 10px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-weight: 800; font-size: 13px; }
.dl-item h4 { font-size: 15.5px; margin-bottom: 4px; }
.dl-item p { font-size: 14px; color: var(--muted); margin: 0; }

/* roles */
.roles-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.role-card { padding: 22px; border-radius: 20px; background: #fff; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; color: var(--ink); transition: transform .15s, box-shadow .15s; }
a.role-card:hover { transform: translateY(-3px); box-shadow: var(--sh); color: var(--ink); }
.role-card .ri { width: 52px; height: 52px; border-radius: 50%; overflow: hidden; }
.role-card h3 { font-size: 17px; }
.role-card p { font-size: 13.5px; color: var(--muted); margin: 0; flex: 1; }
.role-card .go { font-size: 13.5px; font-weight: 700; color: var(--brand-600); display: inline-flex; align-items: center; gap: 4px; }

/* pricing */
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
.pcard { position: relative; display: flex; flex-direction: column; padding: 30px; border-radius: 24px; background: #fff; border: 1px solid var(--line); }
.pcard.hl { border: 2px solid var(--brand-500); box-shadow: 0 30px 60px -24px rgba(53,74,128,.35); }
.pcard .ptag { position: absolute; top: -13px; left: 30px; background: var(--brand-600); color: #fff; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 5px 12px; border-radius: 999px; }
.pcard h3 { font-size: 20px; margin-bottom: 4px; }
.pcard .pdesc { font-size: 14.5px; color: var(--muted); min-height: 44px; }
.pcard .amt { margin: 18px 0 4px; font-family: var(--font-display); font-size: 48px; font-weight: 600; letter-spacing: -0.03em; line-height: 1; }
.pcard .amt small { font-family: var(--font); font-size: 15px; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.pcard .per { font-size: 14px; color: var(--muted); margin-bottom: 20px; }
.pcard .ticks { margin: 0 0 24px; flex: 1; }
.pcard .ticks li { font-size: 14.5px; }
.compare { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; font-size: 15px; }
.compare th, .compare td { padding: 14px 18px; border-bottom: 1px solid var(--line-2); text-align: left; }
.compare th { background: var(--subtle); font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.compare tr:last-child td { border-bottom: 0; }
.compare td.y { color: var(--ok); font-weight: 700; } .compare td.n { color: var(--faint); }
.calc { display: grid; grid-template-columns: 1fr 1.2fr; gap: 28px; padding: 30px; border-radius: 24px; background: #fff; border: 1px solid var(--line); }
.calc .res { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.calc .rbox { padding: 20px; border-radius: 16px; background: var(--subtle); border: 1px solid var(--line-2); }
.calc .rbox.win { background: var(--brand-50); border-color: var(--brand-100); }
.calc .rbox b { display: block; font-family: var(--font-display); font-size: 34px; font-weight: 600; letter-spacing: -0.02em; }
.calc .rbox span { font-size: 13.5px; color: var(--muted); }
.calc .saving { grid-column: 1 / -1; padding: 16px 20px; border-radius: 14px; background: var(--ink); color: #fff; font-weight: 700; display: flex; justify-content: space-between; align-items: center; }
.calc .saving b { font-family: var(--font-display); font-size: 30px; font-weight: 600; color: var(--sun); }

/* updates diagram */
.flow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; counter-reset: f; }
.flow.four { grid-template-columns: repeat(4, 1fr); }
.flow .st { position: relative; padding: 22px 18px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); margin-right: -1px; }
.flow .st:first-child { border-radius: 18px 0 0 18px; } .flow .st:last-child { border-radius: 0 18px 18px 0; }
.flow .st .n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--sun); color: var(--brand-950); font-weight: 800; font-size: 13px; margin-bottom: 10px; }
.flow .st b { display: block; color: #fff; margin-bottom: 4px; font-size: 15px; }
.flow .st span { font-size: 13.5px; color: #B9C3DB; line-height: 1.5; display: block; }
.flow .st.fail { background: rgba(180,99,58,.12); border-color: rgba(180,99,58,.35); }
.flow .st.fail .n { background: var(--coral); color: #fff; }

/* gallery */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.gallery figure { margin: 0; }
.gallery figure .browser { border-radius: 12px; }
.gallery figure .browser .chrome { height: 26px; } .gallery figure .browser .url { height: 16px; font-size: 9.5px; max-width: 220px; } .gallery figure .browser .dots i { width: 8px; height: 8px; }
.gallery figcaption { margin-top: 10px; font-size: 14px; color: var(--ink-2); font-weight: 600; }
.gallery figcaption span { display: block; color: var(--muted); font-weight: 500; font-size: 13px; }
.phones { display: flex; gap: 22px; justify-content: center; flex-wrap: wrap; }
.phones .phone-shot { width: 236px; }
.phones figure { margin: 0; text-align: center; }
.phones figcaption { margin-top: 14px; font-size: 14px; font-weight: 650; }

/* faq */
.faq { display: flex; flex-direction: column; gap: 10px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 0 22px; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 0; font-weight: 700; font-size: 16.5px; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 24px; font-weight: 400; color: var(--muted); }
.faq details[open] summary::after { content: '–'; }
.faq details p { color: var(--ink-2); padding-bottom: 18px; margin: 0; }

/* cta band & footer */
.cta-band { position: relative; overflow: hidden; border-radius: 30px; padding: 64px; background: linear-gradient(120deg, var(--brand-700), var(--brand-900)); color: #fff; display: grid; grid-template-columns: 1.4fr 1fr; gap: 30px; align-items: center; }
.cta-band::after { content: ''; position: absolute; right: -80px; top: -80px; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle, rgba(242,179,61,.5), transparent 70%); }
.cta-band h2 { color: #fff; font-size: clamp(30px, 3.6vw, 46px); }
.cta-band p { color: #D0D8EA; font-size: 17px; }
.cta-band .ctas { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; position: relative; z-index: 1; }
.cta-band .btn.light { background: #fff; color: var(--brand-800); border-color: #fff; }
.cta-band .btn.outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.s-foot { padding: 72px 0 40px; border-top: 1px solid var(--line); margin-top: 96px; background: #F6F2EB; }
.s-foot .cols { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 28px; }
.s-foot h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 14px; }
.s-foot ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 9px; }
.s-foot ul a { color: var(--ink-2); font-size: 14.5px; font-weight: 550; }
.s-foot ul a:hover { color: var(--brand-600); }
.s-foot .legal { margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13.5px; color: var(--muted); }

/* page hero (inner pages) */
.phero { padding: 64px 0 30px; position: relative; overflow: hidden; }
.phero::before { content: ''; position: absolute; inset: -40% -10% auto -10%; height: 700px; background: radial-gradient(520px 300px at 15% 30%, rgba(207,224,232,.28), transparent 70%), radial-gradient(460px 300px at 90% 0%, rgba(242,179,61,.22), transparent 70%); pointer-events: none; }
.phero .wrap { position: relative; }
.phero h1 { font-size: clamp(38px, 5vw, 64px); margin-bottom: 18px; max-width: 900px; }
.phero .lead { max-width: 760px; }
.breadcrumb { font-size: 14px; color: var(--muted); margin-bottom: 16px; display: flex; gap: 8px; align-items: center; }
.breadcrumb a { color: var(--muted); font-weight: 600; }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(10,16,22,.88); display: none; align-items: center; justify-content: center; padding: 32px; cursor: zoom-out; }
.lightbox.open { display: flex; animation: fadeIn .15s ease; }
.lightbox[hidden] { display: none; }
.lightbox { overscroll-behavior: contain; touch-action: none; }
.lightbox .lb-close { position: absolute; top: max(14px, env(safe-area-inset-top)); right: 14px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; display: grid; place-items: center; cursor: pointer; }
.lightbox .lb-close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.lightbox img { max-width: 96vw; max-height: 88vh; max-height: 80dvh; border-radius: 12px; box-shadow: 0 30px 80px rgba(0,0,0,.5); background: #fff; }
.lightbox .cap { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; color: #E5ECF2; font-size: 14px; font-weight: 600; }

/* demo picker */
.demo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.demo-card { display: flex; flex-direction: column; gap: 14px; padding: 26px; border-radius: 22px; background: #fff; border: 1px solid var(--line); color: var(--ink); transition: transform .15s, box-shadow .15s, border-color .15s; }
.demo-card:hover { transform: translateY(-3px); box-shadow: var(--sh); border-color: var(--brand-200); color: var(--ink); }
.demo-card .who { display: flex; align-items: center; gap: 12px; }
.demo-card .who img { width: 56px; height: 56px; border-radius: 50%; }
.demo-card h3 { font-size: 19px; }
.demo-card .r { font-size: 13px; color: var(--muted); font-weight: 600; }
.demo-card p { font-size: 14.5px; color: var(--ink-2); margin: 0; flex: 1; }
.demo-card .go { display: inline-flex; align-items: center; gap: 6px; font-weight: 750; color: var(--brand-600); }

/* prose (docs/legal) */
.prose { font-size: 16.5px; color: var(--ink-2); line-height: 1.75; }
.prose h2 { font-family: var(--font-display); font-weight: 560; font-size: 32px; margin: 48px 0 14px; color: var(--ink); }
.prose h3 { font-size: 19px; margin: 32px 0 10px; color: var(--ink); }
.prose p, .prose ul, .prose ol { margin: 0 0 16px; }
.prose li { margin-bottom: 6px; }
.prose code { background: #F0ECE5; padding: 2px 6px; border-radius: 6px; font-size: .88em; color: var(--ink); }
.prose pre { background: var(--ink); color: #DDE7EF; padding: 18px 20px; border-radius: 14px; overflow-x: auto; font-size: 14px; line-height: 1.6; }
.prose pre code { background: none; color: inherit; padding: 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 0 0 20px; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.prose th { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .05em; }
.toc { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 4px; font-size: 14.5px; }
.toc a { color: var(--ink-2); padding: 6px 12px; border-radius: 8px; font-weight: 600; }
.toc a:hover { background: #fff; color: var(--brand-600); }
.docs-grid { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 48px; }

/* forms (contact) */
.site .field > label { font-size: 14px; }
.site .input, .site .select, .site .textarea { height: 46px; border-radius: 12px; font-size: 15px; }
.site .textarea { height: auto; }

@media (max-width: 1080px) {
  .s-nav, .s-head .cta .hide-md { display: none; }
  .s-burger { display: inline-grid; }
  .s-burger { width: 44px; height: 44px !important; padding: 0 !important; place-items: center; }
  .s-head.open { background: #fff; border-bottom-color: var(--line); backdrop-filter: none; -webkit-backdrop-filter: none; }
  /* The open menu fills the screen below the bar and scrolls on its own; the page behind is locked. */
  .s-head.open .s-nav { display: flex; position: absolute; top: 100%; left: 0; right: 0; height: calc(100vh - 72px); height: calc(100dvh - 72px); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; flex-direction: column; align-items: stretch; gap: 2px; background: #fff; padding: 12px 24px calc(28px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); animation: fadeIn .15s ease; }
  .s-head.open .s-nav > a, .s-head.open .s-nav > .dd > button { width: 100%; min-height: 50px; padding: 12px; font-size: 17px; justify-content: space-between; border-radius: 12px; }
  .s-head.open .s-nav > .dd > button { justify-content: space-between; }
  .s-head.open .mega { position: static; width: auto; grid-template-columns: 1fr; box-shadow: none; border: 0; border-radius: 0; padding: 0 0 8px 8px; gap: 0; animation: none; }
  .s-head.open .mega a { padding: 10px 12px; align-items: center; }
  .s-head.open .mega a span span { display: none; }
  .s-head.open .mega a > span:last-child { color: var(--ink); font-size: 15.5px; }
  .s-head.open .mega .all { margin-top: 6px; min-height: 48px; align-items: center; }
  .s-head.open .s-nav-cta { display: grid; gap: 10px; margin-top: auto; padding-top: 20px; }
  .s-head.open .s-nav-cta .btn { width: 100%; height: 50px; font-size: 16px; }
  .feature-row, .feature-row.rev { grid-template-columns: 1fr; gap: 28px; margin-bottom: 72px; }
  .feature-row.rev .fr-text { order: 0; }
  .fgrid, .fgrid.four { grid-template-columns: repeat(2, 1fr); }
  .roles-grid { grid-template-columns: repeat(2, 1fr); }
  .price-grid { grid-template-columns: 1fr; }
  .day-line { grid-template-columns: repeat(2, 1fr); row-gap: 28px; } .day-line::before { display: none; }
  .flow, .flow.four { grid-template-columns: 1fr; } .flow .st { border-radius: 0 !important; margin: 0 0 -1px; } .flow .st:first-child { border-radius: 18px 18px 0 0 !important; } .flow .st:last-child { border-radius: 0 0 18px 18px !important; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .cta-band { grid-template-columns: 1fr; padding: 40px; } .cta-band .ctas { justify-content: flex-start; }
  .s-foot .cols { grid-template-columns: 1fr 1fr; }
  .calc { grid-template-columns: 1fr; }
  .demo-grid { grid-template-columns: 1fr 1fr; }
  .docs-grid { grid-template-columns: 1fr; } .toc { position: static; flex-direction: row; flex-wrap: wrap; }
  .toc a { padding: 8px 12px; background: #fff; border: 1px solid var(--line); }
  .stat-band { grid-template-columns: repeat(2, 1fr); }
  .guard-list { grid-template-columns: 1fr; }
  .hero-visual .phone-shot { width: 170px; right: 0; bottom: -30px; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 18px; }
  .sec { padding: 64px 0; }
  .hero { padding-top: 40px; }
  .fgrid, .fgrid.four, .roles-grid, .gallery, .demo-grid, .stat-band { grid-template-columns: 1fr; }
  .float-chip { display: none; }
  .hero-visual .phone-shot { display: none; }
  .s-foot .cols { grid-template-columns: 1fr; }
  .calc .res { grid-template-columns: 1fr; }
  .lead, .hero .lead { font-size: 17px; }
  .s-head .cta .btn.primary { display: none; }
  .s-head .s-bar { gap: 12px; }
  .s-head.open .s-nav { padding-left: 18px; padding-right: 18px; }
}
.browser .url { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 10px; }
.feature-row > *, .fgrid > *, .price-grid > *, .calc > *, .demo-grid > *, .docs-grid > * { min-width: 0; }
.fr-text, .prose { overflow-wrap: anywhere; }
.day-line.four { grid-template-columns: repeat(4, 1fr); row-gap: 36px; }
@media (max-width: 1080px) { .day-line.four { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .day-line.four { grid-template-columns: 1fr; } .compare th, .compare td { padding: 10px; font-size: 13.5px; } }

/* ---- Brand guidelines ---- */
.bd-grid { display: grid; gap: 20px; } .bd-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); } .bd-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.bd-stage { margin: 0; border-radius: var(--r-xl); border: 1px solid var(--line-2); display: flex; flex-direction: column; overflow: hidden; }
.bd-stage img { display: block; width: min(78%, 420px); height: auto; margin: 64px auto; }
.bd-stage.light { background: #fff; } .bd-stage.dark { background: linear-gradient(160deg, var(--brand-900), var(--brand-950)); border-color: transparent; }
.bd-stage figcaption { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; font-size: 14px; font-weight: 600; border-top: 1px solid var(--line-2); color: var(--ink-2); background: var(--subtle); }
.bd-stage.dark figcaption { background: rgba(255,255,255,.05); color: #D0D8EA; border-top-color: rgba(255,255,255,.08); }
.bd-dl { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--brand-600); text-decoration: none; }
.bd-stage.dark .bd-dl { color: #C5D2EE; }
.bd-anatomy { display: grid; grid-template-columns: 260px 1fr; gap: 48px; align-items: center; }
.bd-anatomy > img { width: 100%; height: auto; filter: drop-shadow(0 18px 30px rgba(30,43,74,.18)); }
.bd-parts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 28px; }
.bd-parts li { display: flex; gap: 14px; } .bd-parts .dot { flex: none; width: 22px; height: 22px; border-radius: 50%; margin-top: 2px; }
.bd-parts b { display: block; font-size: 16px; color: var(--ink); margin-bottom: 3px; } .bd-parts span { color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.bd-sizes { display: flex; align-items: flex-end; gap: 36px; margin-top: 44px; padding-top: 28px; border-top: 1px dashed var(--line); flex-wrap: wrap; }
.bd-sizes div { display: flex; flex-direction: column; align-items: center; gap: 8px; } .bd-sizes span { font-size: 12.5px; color: var(--faint); font-weight: 600; }
.bd-tile { margin: 0; background: #fff; border: 1px solid var(--line-2); border-radius: var(--r-lg); overflow: hidden; display: flex; flex-direction: column; }
.bd-box { height: 170px; display: flex; align-items: center; justify-content: center; gap: 22px; background: var(--subtle); border-bottom: 1px solid var(--line-2); }
.bd-box.dark { background: var(--brand-700); } .bd-box.og { height: 230px; } .bd-box.og img { border-radius: 10px; box-shadow: var(--sh); max-width: 90%; height: auto; }
.bd-box img { max-width: 80%; height: auto; }
.bd-tile figcaption { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 4px; } .bd-tile figcaption b { color: var(--ink); } .bd-tile figcaption span { color: var(--muted); font-size: 14px; line-height: 1.5; margin-bottom: 6px; }
.bd-swatches { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 16px; }
.bd-sw { display: flex; flex-direction: column; gap: 3px; } .bd-sw b { font-size: 14.5px; color: var(--ink); margin-top: 8px; } .bd-sw > span { font-size: 13px; color: var(--muted); line-height: 1.45; }
.bd-chip { height: 112px; border-radius: var(--r-lg); display: flex; align-items: flex-end; padding: 10px 12px; font: 600 12.5px var(--mono); color: var(--ink); box-shadow: inset 0 0 0 1px rgba(26,34,56,.06); }
.bd-ramp { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); margin-top: 36px; border-radius: var(--r-lg); overflow: hidden; }
.bd-ramp div { padding: 30px 10px 12px; display: flex; flex-direction: column; gap: 2px; } .bd-ramp b { font-size: 13px; } .bd-ramp span { font: 500 11px var(--mono); opacity: .85; }
.bd-type, .bd-rule { background: #fff; border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: 26px; display: flex; flex-direction: column; gap: 6px; }
.bd-type b, .bd-rule b { font-size: 17px; color: var(--ink); display: flex; align-items: center; gap: 8px; } .bd-type > span, .bd-rule > span { color: var(--muted); font-size: 14.5px; line-height: 1.55; }
.bd-spec { font-size: 92px; line-height: 1; color: var(--brand-700); margin-bottom: 10px; }
.bd-clear { background: var(--subtle); border-radius: var(--r); padding: 30px; margin-bottom: 14px; display: flex; justify-content: center; }
.bd-clear img { outline: 2px dashed var(--coral); outline-offset: 18px; max-width: 100%; height: auto; }
.bd-donts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.bd-donts figure { margin: 0; background: var(--subtle); border-radius: var(--r); padding: 18px 6px 10px; display: flex; flex-direction: column; align-items: center; gap: 12px; position: relative; overflow: hidden; }
.bd-donts figure::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top right, transparent calc(50% - 1.5px), rgba(196,47,61,.75) 50%, transparent calc(50% + 1.5px)); pointer-events: none; }
.bd-donts figcaption { font-size: 12px; font-weight: 700; color: var(--bad); text-align: center; }
@media (max-width: 980px) { .bd-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } .bd-swatches { grid-template-columns: repeat(4, minmax(0, 1fr)); } .bd-anatomy { grid-template-columns: 1fr; justify-items: center; } .bd-anatomy > img { width: 200px; } }
@media (max-width: 640px) { .bd-grid.two, .bd-grid.four { grid-template-columns: 1fr; } .bd-parts { grid-template-columns: 1fr; } .bd-swatches { grid-template-columns: repeat(2, minmax(0, 1fr)); } .bd-ramp { grid-template-columns: repeat(4, minmax(0, 1fr)); } .bd-donts { grid-template-columns: repeat(2, minmax(0, 1fr)); } .bd-stage img { margin: 40px auto; } }
.skip { position: absolute; left: -9999px; top: 12px; z-index: 100; background: #fff; padding: 8px 14px; border-radius: 10px; font-weight: 700; box-shadow: var(--sh); }
.skip:focus { left: 16px; }
.breadcrumb a { color: inherit; }
.bd-mascots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.bd-mascots .bd-box { background: var(--oat); }
@media (max-width: 980px) { .bd-mascots { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* the wren, perched on the hero screenshot */
.hero-visual .wren-perch { position: absolute; right: 56px; top: -93px; width: 104px; height: auto; z-index: 2; }
@media (max-width: 720px) { .hero-visual .wren-perch { right: 20px; top: -64px; width: 72px; } }
