/* TORO Hub semantic color tokens */
:root {
  --browser-scheme: light;
  --bg-base: #f6eee2;
  --bg-surface: #fff9ef;
  --bg-hover: #eee4d6;
  --border: #d1c5b6;
  --border-strong: #a89b8f;
  --ink: #161a30;
  --muted: #5b5665;
  --side: #10172d;
  --side-line: #3a435c;
  --side-text: #fff1dd;
  --side-muted: #c1c6d7;
  --side-hover: #202c4a;
  --paper-tab: #fff0da;
  --paper-shadow: #dbccba;
  --sample-dark: #263451;
  --coral: #fa735d;
  --accent: #263bb2;
  --accent-hover: #182b94;
  --action-ink: #fff9ee;
  --focus: #334ed0;
  --error: #8a2f26;
  --error-bg: #fff0e9;
  --success: #e1e8fb;
  --success-ink: #222e62;
  --backdrop: #0a1028bf;
  --font: "Aptos", "Segoe UI", system-ui, sans-serif;
  --display: "Georgia", "Times New Roman", serif;
  --sidebar-width: 249px;
  --dock-width: 68px;
  --dock-gap: 17px;
  --rail-space: var(--sidebar-width);
  --content-max: 1420px;
  --radius: 8px;
  --radius-lg: 12px;
  --control: 44px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 44px;
  --shadow: 0 15px 40px #10172d30;
  --indigo-surface: #e2e7fc;
  --indigo-ink: #293c9a;
  --moss-surface: #dfe9dd;
  --moss-ink: #315442;
  --rose-surface: #f3ddd7;
  --rose-ink: #8b3930;
  --sky-surface: #dfe9f9;
  --sky-ink: #29527b;
  --gold-surface: #f0e3c9;
  --gold-ink: #725021;
  --graphite-surface: #e6e3e8;
  --graphite-ink: #46425c;
}

/* Type, spacing and component dimensions */
:root {
  --font-symbol: system-ui, sans-serif;

  --font-caption: 12px;
  --font-label: 13px;
  --font-ui: 14px;
  --font-body: 15px;
  --font-input: 16px;
  --font-symbol-sm: 18px;
  --font-entry: 19px;
  --font-section: 21px;
  --font-symbol-md: 22px;
  --font-display-sm: 24px;
  --font-dialog: 25px;
  --font-card-icon: 27px;
  --font-login: 38px;
  --font-placeholder-icon: 55px;
  --font-page-title: clamp(37px, 4.6vw, 66px);
  --font-agent-name: clamp(36px, 4vw, 57px);

  --weight-regular: 400;
  --weight-book: 450;
  --weight-tab: 670;
  --weight-action: 680;
  --weight-bold: 700;
  --weight-entry: 730;
  --weight-icon: 750;

  --line-single: 1;
  --line-body: 1.45;
  --line-page-title: 1.02;
  --line-heading: 1.25;
  --line-subtitle: 1.2;
  --line-nav: 1.24;
  --line-card-title: 1.14;
  --line-agent-list: 1.19;
  --line-agent-name: .98;
  --tracking-title: -.05em;
  --tracking-card: -.035em;
  --tracking-agent: -.055em;
  --tracking-dialog: -.03em;

  --stroke: 1px;
  --stroke-focus: 2px;
  --stroke-highlight: 3px;
  --focus-offset: 3px;
  --space-fine: 2px;
  --space-tight: 3px;
  --space-inset: 5px;
  --space-compact: 6px;
  --space-side-inset: 7px;
  --radius-thumbnail: 5px;
  --radius-sample: 6px;
  --radius-dock-item: 9px;
  --radius-dock: 25px;
  --radius-emblem: 22px;
  --radius-round: 50%;
  --opacity-disabled: .45;

  --layer-active-tab: 1;
  --layer-sidebar: 2;
  --layer-mobile-bar: 3;
  --layer-tooltip: 4;
  --layer-toast: 5;
  --layer-skip: 6;
  --layer-dialog-sticky: 1;

  --viewport-min: 280px;
  --content-gutter: clamp(23px, 3.2vw, 60px);
  --content-top: 41px;
  --content-bottom: 64px;
  --mobile-content-bottom: 60px;
  --mobile-bar-height: 64px;
  --page-tools-width: clamp(300px, 40%, 420px);
  --sidebar-top: 31px;
  --sidebar-icon-size: 23px;
  --sidebar-row-gap: 14px;
  --sidebar-row-height: 54px;
  --sidebar-tab-edge: 5px;
  --sidebar-tab-fold: 15px;
  --sidebar-tab-overhang: var(--space-2);
  --dock-row-height: 49px;
  --dock-toggle-width: 43px;
  --dock-top: 18px;
  --dock-account-width: 54px;
  --brand-width: 45px;
  --brand-height: 42px;
  --brand-mark-width: 44px;
  --brand-mark-height: 36px;
  --dock-mark-width: 36px;
  --dock-mark-height: 31px;
  --tooltip-gap: 13px;
  --tooltip-width: min(270px, calc(100vw - 112px));

  --icon-tile-size: 33px;
  --glyph-size: 22px;
  --item-icon-size: 39px;
  --small-item-icon-size: 34px;
  --avatar-size: 34px;
  --card-icon-size: 54px;
  --control-small: 37px;
  --control-compact: 40px;
  --control-touch: 42px;
  --close-size: 36px;
  --open-button-width: 80px;
  --row-height: 65px;
  --link-target-height: 48px;
  --directory-row-height: 76px;
  --status-dot-size: 7px;

  --search-width: 290px;
  --search-icon-size: 15px;
  --search-icon-stroke: 1.6px;
  --bookmark-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  --bookmark-mobile-art: 460px;
  --agent-columns: minmax(162px, .28fr) minmax(0, 1fr);
  --agent-gap: clamp(16px, 2.25vw, 36px);
  --agent-list-height: 64vh;
  --agent-thumbnail-size: 49px;
  --agent-mobile-entry: clamp(111px, 26vw, 153px);
  --agent-mobile-thumbnail: 34px;
  --agent-thumbnail-position: 58% 38%;
  --portrait-ratio: 1.56;
  --portrait-height: 520px;
  --portrait-position: 50% 30%;
  --portrait-filter: none;
  --agent-placeholder-size: 112px;
  --directory-mobile-indent: 46px;

  --settings-select-width: 350px;
  --theme-picker-width: 785px;
  --theme-radio-size: 17px;
  --theme-sample-height: 67px;
  --theme-sample-rail: 27%;
  --theme-sample-split: 51%;
  --dialog-width: 560px;
  --dialog-gutter: var(--space-6);
  --toast-gutter: 48px;
  --login-width: 420px;
}

/* Vector geometry for the brand mark and the built-in pictograms */
:root {
  --brand-shape: polygon(0 1%, 12% 23%, 25% 35%, 50% 40%, 75% 35%, 88% 23%, 100% 1%, 95% 34%, 81% 48%, 63% 52%, 56% 92%, 50% 100%, 44% 92%, 37% 52%, 19% 48%, 5% 34%);
  --bookmark-shape: path(evenodd, "M5 2H17Q19 2 19 4V20L11 15L3 20V4Q3 2 5 2ZM5 4V16.4L11 12.7L17 16.4V4Z");
  --grid-shape: path(evenodd, "M2 2H10V10H2ZM4 4V8H8V4ZM12 2H20V10H12ZM14 4V8H18V4ZM2 12H10V20H2ZM4 14V18H8V14ZM12 12H20V20H12ZM14 14V18H18V14Z");
  --agent-shape: path(evenodd, "M11 0Q14 8 22 11Q14 14 11 22Q8 14 0 11Q8 8 11 0ZM11 5Q9 9 5 11Q9 13 11 17Q13 13 17 11Q13 9 11 5Z");
}

/* Dark theme overrides */
:root[data-theme="dark"] {
  --browser-scheme: dark;
  --portrait-filter: brightness(.82) saturate(.78);
  --bg-base: #121a2c;
  --bg-surface: #19233a;
  --bg-hover: #25314c;
  --border: #3b4968;
  --border-strong: #677795;
  --ink: #fff0dc;
  --muted: #bbc4db;
  --side: #0c1328;
  --side-line: #323e5c;
  --side-text: #fff0dc;
  --side-muted: #c0c9e1;
  --side-hover: #25314d;
  --accent: #fff0da;
  --accent-hover: #e1e6ff;
  --action-ink: #17204a;
  --focus: #a6b6ff;
  --error: #ffc2b7;
  --error-bg: #40252f;
  --success: #29385d;
  --success-ink: #e7edff;
  --backdrop: #070c19cf;
  --shadow: 0 15px 40px #060b17a0;
  --indigo-surface: #293965;
  --indigo-ink: #bccaff;
  --moss-surface: #233e3b;
  --moss-ink: #badace;
  --rose-surface: #492c3d;
  --rose-ink: #ffbdad;
  --sky-surface: #263b57;
  --sky-ink: #baddff;
  --gold-surface: #47392d;
  --gold-ink: #f9d89f;
  --graphite-surface: #313951;
  --graphite-ink: #d7def4;
}
