/* SiteStart base: tokens, type, controls. Shared by the landing page, designer app and client portal.
   Shape rule: controls + buttons 10px, panels 14px, chips and tags fully round. */
@font-face { font-family: "Geist"; src: url("/static/vendor/fonts/geist-latin.woff2") format("woff2"); font-weight: 100 900; 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: "Geist"; src: url("/static/vendor/fonts/geist-latin-ext.woff2") format("woff2"); font-weight: 100 900; 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; }

:root {
  --bg: #F4F5F3; --surface: #FFFFFF; --surface-2: #EDEFEC; --surface-3: #E4E7E3; --line: #DFE3DE; --line-2: #CBD1CB;
  --text: #121716; --text-2: #46504C; --text-3: #5F6964;
  --accent: #0F7A5A; --accent-ink: #0A5C43; --accent-soft: #E2F0EA; --on-accent: #FFFFFF;
  --warn: #8F5208; --warn-soft: #FBF0DD; --danger: #B0232B; --danger-soft: #FBE8E8; --info: #2B5DA8; --info-soft: #E6EEFA;
  --shadow-1: 0 1px 2px rgb(20 40 32 / .06), 0 1px 1px rgb(20 40 32 / .04);
  --shadow-2: 0 10px 30px -12px rgb(20 40 32 / .22), 0 2px 6px rgb(20 40 32 / .06);
  --shadow-3: 0 24px 60px -20px rgb(20 40 32 / .35);
  --r-sm: 10px; --r-md: 14px; --r-full: 999px;
  --ease-out: cubic-bezier(.23, 1, .32, 1); --ease-io: cubic-bezier(.77, 0, .175, 1); --ease-drawer: cubic-bezier(.32, .72, 0, 1);
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0D1110; --surface: #141A18; --surface-2: #1A211F; --surface-3: #222B28; --line: #26302C; --line-2: #34403B;
    --text: #E7ECEA; --text-2: #B0BAB5; --text-3: #8F9A95;
    --accent: #3CC08F; --accent-ink: #6FD8AF; --accent-soft: #143127; --on-accent: #04241A;
    --warn: #E9A94B; --warn-soft: #2E2312; --danger: #F07A7F; --danger-soft: #331618; --info: #86AEF0; --info-soft: #172338;
    --shadow-1: 0 1px 2px rgb(0 0 0 / .4); --shadow-2: 0 12px 34px -12px rgb(0 0 0 / .6); --shadow-3: 0 24px 60px -20px rgb(0 0 0 / .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0D1110; --surface: #141A18; --surface-2: #1A211F; --surface-3: #222B28; --line: #26302C; --line-2: #34403B;
  --text: #E7ECEA; --text-2: #B0BAB5; --text-3: #8F9A95;
  --accent: #3CC08F; --accent-ink: #6FD8AF; --accent-soft: #143127; --on-accent: #04241A;
  --warn: #E9A94B; --warn-soft: #2E2312; --danger: #F07A7F; --danger-soft: #331618; --info: #86AEF0; --info-soft: #172338;
  --shadow-1: 0 1px 2px rgb(0 0 0 / .4); --shadow-2: 0 12px 34px -12px rgb(0 0 0 / .6); --shadow-3: 0 24px 60px -20px rgb(0 0 0 / .7);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 15px/1.55 var(--font); font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; text-wrap: balance; }
h1 { font-size: clamp(26px, 3.4vw, 34px); letter-spacing: -0.03em; }
h2 { font-size: 22px; } h3 { font-size: 17px; letter-spacing: -0.01em; } h4 { font-size: 15px; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--accent-ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
::selection { background: color-mix(in srgb, var(--accent) 28%, transparent); color: var(--text); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
img { max-width: 100%; display: block; }
.num, .tabular { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-3); }
.small { font-size: 13px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 10px; border: 3px solid var(--bg); }

/* buttons */
.btn { --b: var(--surface); --c: var(--text); --bd: var(--line-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: var(--r-sm);
  background: var(--b); color: var(--c); border: 1px solid var(--bd); font: 500 14px/1 var(--font); white-space: nowrap; cursor: pointer;
  text-decoration: none; transition: transform 160ms var(--ease-out), background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
  -webkit-tap-highlight-color: transparent; user-select: none; }
.btn:active:not(:disabled) { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) { .btn:hover:not(:disabled) { --b: var(--surface-2); } .btn.primary:hover:not(:disabled) { --b: var(--accent-ink); } }
.btn.primary { --b: var(--accent); --c: var(--on-accent); --bd: transparent; box-shadow: 0 1px 2px rgb(0 0 0 / .12), inset 0 1px 0 rgb(255 255 255 / .12); }
.btn.ghost { --b: transparent; --bd: transparent; }
.btn.danger { --c: var(--danger); }
.btn.sm { min-height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; gap: 6px; }
.btn.lg { min-height: 48px; padding: 0 22px; font-size: 15px; }
.btn.icon { padding: 0; width: 40px; } .btn.icon.sm { width: 32px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn .ph { font-size: 17px; } .btn.sm .ph { font-size: 15px; }
.btn.busy { pointer-events: none; } .btn.busy > * { opacity: .6; }

/* fields */
label.lbl, .lbl { display: block; font-weight: 500; font-size: 14px; color: var(--text); margin-bottom: 6px; }
.help { display: block; color: var(--text-3); font-size: 13px; margin: -2px 0 8px; }
.field { margin-bottom: 20px; }
input.in, textarea.in, select.in { width: 100%; min-height: 44px; padding: 10px 12px; border-radius: var(--r-sm); border: 1px solid var(--line-2);
  background: var(--surface); color: var(--text); font: 400 15px/1.45 var(--font); transition: border-color 160ms ease, box-shadow 160ms ease; caret-color: var(--accent); }
textarea.in { resize: vertical; min-height: 96px; }
.in::placeholder { color: var(--text-3); opacity: 1; }
.in:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.in[aria-invalid="true"] { border-color: var(--danger); }
.err { color: var(--danger); font-size: 13px; margin-top: 6px; display: flex; gap: 6px; align-items: flex-start; }
select.in { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%);
  background-position: calc(100% - 18px) 19px, calc(100% - 13px) 19px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
input[type="date"].in { min-width: 0; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: 14px; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }

/* chips: selectable options */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 14px; border-radius: var(--r-full); border: 1px solid var(--line-2);
  background: var(--surface); color: var(--text); font: 500 14px/1 var(--font); cursor: pointer; transition: transform 160ms var(--ease-out), background-color 160ms, border-color 160ms, color 160ms; }
.chip:active { transform: scale(.97); }
.chip[aria-pressed="true"] { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 55%, transparent); color: var(--accent-ink); }
.chip .ph { font-size: 15px; }

/* tags: status labels */
.tag { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: var(--r-full); font-size: 12px; font-weight: 500;
  background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.tag .ph { font-size: 13px; }
.tag.ok { background: var(--accent-soft); color: var(--accent-ink); }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
.tag.bad { background: var(--danger-soft); color: var(--danger); }
.tag.info { background: var(--info-soft); color: var(--info); }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.divider { height: 1px; background: var(--line); border: 0; margin: 20px 0; }

/* segmented readiness bar: one segment per area */
.segbar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; height: 6px; }
.segbar i { display: block; border-radius: 3px; background: var(--surface-3); overflow: hidden; position: relative; }
.segbar i::after { content: ""; position: absolute; inset: 0; background: var(--accent); transform-origin: left; transform: scaleX(var(--p, 0));
  transition: transform 600ms var(--ease-out); }

/* toast */
.toasts { position: fixed; z-index: 80; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: grid; gap: 8px; width: min(420px, calc(100vw - 32px)); pointer-events: none; }
.toast { pointer-events: auto; background: var(--text); color: var(--bg); padding: 12px 16px; border-radius: var(--r-sm); font-size: 14px; box-shadow: var(--shadow-3);
  display: flex; gap: 10px; align-items: center; transition: opacity 200ms ease, transform 200ms var(--ease-out); }
.toast.bad { background: var(--danger); color: #fff; }
.toast.out { opacity: 0; transform: translateY(8px); }
@starting-style { .toast { opacity: 0; transform: translateY(10px); } }
.toast .ph { font-size: 18px; }

/* drawer / sheet */
.scrim { position: fixed; inset: 0; z-index: 60; background: rgb(8 14 12 / .38); opacity: 0; transition: opacity 220ms ease; }
.scrim.on { opacity: 1; }
.drawer { position: fixed; z-index: 61; top: 0; right: 0; bottom: 0; width: min(480px, 100vw); background: var(--surface); box-shadow: var(--shadow-3);
  display: flex; flex-direction: column; transform: translateX(100%); transition: transform 260ms var(--ease-drawer); }
.drawer.on { transform: none; }
.drawer header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.drawer .body { flex: 1; overflow: auto; padding: 20px; overscroll-behavior: contain; }
.drawer footer { padding: 14px 20px max(14px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; }
@media (max-width: 640px) {
  .drawer { top: auto; left: 0; width: 100%; max-height: 92dvh; border-radius: 18px 18px 0 0; transform: translateY(100%); }
}

/* skeleton */
.sk { background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; border-radius: 8px; animation: sk 1.4s linear infinite; }
@keyframes sk { to { background-position: -200% 0; } }

.empty { text-align: center; padding: 40px 20px; color: var(--text-3); }
.empty .ph { font-size: 32px; color: var(--text-3); display: block; margin: 0 auto 10px; }
.empty h3 { color: var(--text); margin-bottom: 6px; }

.fade-in { animation: fadeIn 220ms var(--ease-out) both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); filter: blur(2px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
  .fade-in { animation: none; }
}
@media (max-width: 640px) { .hide-sm { display: none; } }
