/* Asbilo design tokens (0.18.0)
   A neutral, airy interface: soft grey window, white working surfaces, ink
   text and ink primary actions. Colour is reserved for meaning: record kinds,
   review states and the sky "signal" for what is selected or traced.
   Type: Pretendard (OFL 1.1). Licences: /ui/LICENSES.txt.
   Cascade: reset < base < components < shell < screens < utilities. */
@layer reset, base, legacy, components, shell, screens, utilities;

:root{
 --space:transparent;--space-text:var(--ink-2);--space-soft:var(--surface-2);--space-line:var(--line);
  color-scheme:light;

  /* Neutrals */
  --gray-0:#ffffff; --gray-25:#fafbfc; --gray-50:#f6f7f9; --gray-100:#f0f2f5; --gray-150:#e9ecf0; --gray-200:#e2e5ea;
  --gray-300:#d3d7de; --gray-400:#b3b8c1; --gray-500:#8c929c; --gray-600:#636973; --gray-700:#4a505a; --gray-800:#2c3037; --gray-900:#1a1d22; --gray-950:#0e1013;

  /* Sky: the brand signal */
  --sky-50:#effaff; --sky-100:#dcf3ff; --sky-200:#b8e7ff; --sky-300:#80d5ff; --sky-400:#45c0ff; --sky-500:#14a7f0; --sky-600:#0389d2; --sky-700:#036dab; --sky-800:#075a8c; --sky-900:#0b4a72;

  /* Status ramps */
  --amber-50:#fffaeb; --amber-100:#fef0c7; --amber-200:#fde189; --amber-400:#fdb022; --amber-500:#f79009; --amber-600:#dc6803; --amber-700:#b54708; --amber-800:#93370d;
  --red-50:#fef3f2; --red-100:#fee4e2; --red-200:#fecdca; --red-400:#f97066; --red-500:#f04438; --red-600:#d92d20; --red-700:#b42318; --red-800:#912018;
  --green-50:#ecfdf3; --green-100:#d1fadf; --green-200:#a6f4c5; --green-400:#32d583; --green-500:#12b76a; --green-600:#039855; --green-700:#027a48; --green-800:#05603a;
  --violet-50:#f5f3ff; --violet-100:#ece9fe; --violet-200:#ddd6fe; --violet-400:#a48afb; --violet-500:#875bf7; --violet-600:#7839ee; --violet-700:#6927da; --violet-800:#5720b7;
  --orange-50:#fff4ed; --orange-100:#ffe6d5; --orange-500:#ff5a1f; --orange-600:#ec4a0a; --orange-700:#c4320a;

  /* Semantic: surfaces and text */
  --app:#eef0f3;               /* window behind panels */
  --surface:#ffffff;           /* working panels */
  --surface-2:var(--gray-50);  /* quiet fills: inputs, table heads, hover */
  --surface-3:var(--gray-100); /* pressed, selected neutral */
  --surface-sunken:#e7eaee;    /* drawing canvas well */
  --line:var(--gray-150); --line-strong:var(--gray-200); --line-input:var(--gray-300);
  --ink:var(--gray-950); --ink-2:var(--gray-700); --ink-3:var(--gray-600); --ink-4:var(--gray-500); --ink-disabled:var(--gray-400);
  --on-ink:#ffffff;

  /* Interaction */
  --primary:var(--gray-950); --primary-hover:#262a31; --primary-active:#000000;
  --accent:var(--sky-500); --accent-text:var(--sky-700); --accent-soft:var(--sky-50); --accent-soft-2:var(--sky-100); --accent-line:var(--sky-200);
  --focus:var(--sky-400); --focus-halo:rgb(20 167 240 / .22);
  --hover:rgb(14 16 19 / .045); --active:rgb(14 16 19 / .08);
  --signal:#45c0ff; --signal-strong:#14a7f0; --signal-glow:rgb(69 192 255 / .35);
  /* 0.20.5 D-16: a switch that is on is ink, never sky. Screen switches read these two. */
  --switch-on:var(--ink); --switch-off:var(--gray-300);

  /* Status */
  --ok:var(--green-500); --ok-text:var(--green-700); --ok-soft:var(--green-50); --ok-line:var(--green-200);
  --warn:var(--amber-500); --warn-text:var(--amber-700); --warn-soft:var(--amber-50); --warn-line:var(--amber-200);
  --danger:var(--red-500); --danger-text:var(--red-700); --danger-soft:var(--red-50); --danger-line:var(--red-200);
  --info:var(--sky-500); --info-text:var(--sky-700); --info-soft:var(--sky-50); --info-line:var(--sky-200);
  --estimate:var(--violet-500); --estimate-text:var(--violet-700); --estimate-soft:var(--violet-50); --estimate-line:var(--violet-200);

  /* Drawing: record kinds and review states */
  --kind-conduit:#f04438; --kind-cable:#2f7dff; --kind-asset:#12b76a;
  --state-draft:var(--gray-500); --state-submitted:var(--amber-500); --state-returned:var(--red-500); --state-approved:var(--green-500); --state-reference:var(--gray-400);

  /* Type */
  --font-sans:"Pretendard Variable",Pretendard,-apple-system,BlinkMacSystemFont,system-ui,"Apple SD Gothic Neo","Noto Sans KR","Malgun Gothic","Segoe UI",Roboto,sans-serif;
  --font-mono:ui-monospace,"SF Mono","Cascadia Mono","Segoe UI Mono",Menlo,Consolas,monospace;
  --text-micro:11px; --text-caption:12px; --text-small:13px; --text-body:14px; --text-body-lg:15px; --text-title-3:17px; --text-title-2:20px; --text-title-1:24px; --text-display:30px; --text-hero:40px;
  --leading-tight:1.25; --leading:1.5; --leading-loose:1.65;
  /* 0.20.5 design 3.1: five weights only (650, 740, 750, 760, 780 are retired as screens move to these). */
  --w-regular:400; --w-medium:500; --w-semibold:600; --w-bold:700; --w-heavy:800;
  --tracking-display:-.034em; --tracking-title:-.024em; --tracking-body:-.006em;

  /* Shape */
  --r-xs:6px; --r-sm:8px; --r-md:10px; --r-lg:14px; --r-xl:18px; --r-2xl:24px; --r-full:999px;
  --elev-1:0 0 0 1px rgb(15 20 30 / .05),0 1px 2px rgb(15 20 30 / .04);
  --elev-2:0 0 0 1px rgb(15 20 30 / .05),0 4px 12px -4px rgb(15 20 30 / .1);
  --elev-3:0 0 0 1px rgb(15 20 30 / .06),0 4px 10px -4px rgb(15 20 30 / .08),0 16px 36px -14px rgb(15 20 30 / .24);
  --elev-4:0 0 0 1px rgb(15 20 30 / .06),0 28px 70px -18px rgb(15 20 30 / .38);
  --glass:rgb(255 255 255 / .84); --glass-blur:saturate(1.7) blur(18px);

  /* Space and size */
  --s-1:4px; --s-2:8px; --s-3:12px; --s-4:16px; --s-5:20px; --s-6:24px; --s-7:28px; --s-8:32px; --s-10:40px; --s-12:48px; --s-16:64px;
  /* 0.20.5: --control-sm is 32px on a mouse (studio density and button.small share it); touch keeps 36px below. */
  --control-sm:32px; --control:36px; --control-lg:44px; --control-xl:52px;
  --sidebar-w:248px; --rail-w:68px; --frame-gap:8px; --toolbar-h:52px; --inspector-w:380px;
  --tabbar-h:0px; --phone-nav-height:0px;
  /* 0.20.5: the shell sets --bottom-chrome to whatever sits on the bottom edge (tab bar, dock, FAB, bulk bar); the toast
     rides above it. --settings-bar-h is the sticky save bar's height (.settings-actions). */
  --bottom-chrome:0px; --settings-bar-h:56px;

  /* Motion */
  --ease:cubic-bezier(.2,.8,.2,1); --ease-in-out:cubic-bezier(.65,0,.35,1); --spring:cubic-bezier(.34,1.45,.64,1);
  --t-fast:140ms; --t:220ms; --t-slow:320ms;

  /* Layers */
  --z-sticky:10; --z-toolbar:20; --z-floating:30; --z-drawer:50; --z-popover:60; --z-toast:80;

  /* Names from 0.17.0 modules that still read them */
  --ink-legacy:var(--ink); --muted:var(--ink-3); --surface-legacy:var(--surface);
}
@media (pointer:coarse){:root{
 --space:transparent;--space-text:var(--ink-2);--space-soft:var(--surface-2);--space-line:var(--line);--control-sm:36px;--control:44px;--control-lg:48px}}
@media (max-width:600px),(max-width:900px) and (max-height:500px){:root{
 --space:transparent;--space-text:var(--ink-2);--space-soft:var(--surface-2);--space-line:var(--line);--tabbar-h:calc(64px + env(safe-area-inset-bottom,0px));--phone-nav-height:var(--tabbar-h);--frame-gap:0px}}
@media (min-width:601px) and (max-width:900px) and (max-height:500px){:root{
 --space:transparent;--space-text:var(--ink-2);--space-soft:var(--surface-2);--space-line:var(--line);--tabbar-h:calc(56px + env(safe-area-inset-bottom,0px))}}
@media (prefers-reduced-motion:reduce){:root{
 --space:transparent;--space-text:var(--ink-2);--space-soft:var(--surface-2);--space-line:var(--line);--t-fast:0ms;--t:0ms;--t-slow:0ms}}

:root { --sk-fill: var(--gray-150); }
