/* EDGE Beacon 2.0. Follows the EDGE Beacon design guide (TD SYNNEX Design System pilot 0.1.0): tokens.css holds the
   values; this file applies them. Sentence case, left aligned, Schibsted Grotesk, line icons, 120/200ms motion. */
* { box-sizing: border-box; }
html { color-scheme: light; }
body { margin: 0; background: var(--tds-page); color: var(--tds-text); font: 400 1rem/1.6 var(--tds-font); -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--tds-action); text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 { line-height: 1.2; color: var(--tds-heading); }
h1 { font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 400; letter-spacing: -0.035em; }
h2 { font-size: 1.25rem; letter-spacing: -0.02em; }
h3 { font-size: 1rem; letter-spacing: -0.01em; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--tds-focus); outline-offset: 2px; }
button:disabled { opacity: 0.55; cursor: not-allowed; }
.icon { width: 18px; height: 18px; flex: none; }
[data-icon] { display: inline-flex; align-items: center; justify-content: center; }
.skip { position: fixed; top: -80px; left: 16px; background: var(--tds-surface); padding: 12px 20px; z-index: 100; }
.skip:focus { top: 12px; }
.muted { color: var(--tds-text-secondary); }
.small { font-size: 0.8125rem; }
.num { font-variant-numeric: tabular-nums; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 8px; }
.wrap { flex-wrap: wrap; }

/* Controls */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 16px; border: 1px solid transparent; border-radius: var(--tds-radius-ctl); font-size: 0.875rem; font-weight: 600; line-height: 1.4; white-space: nowrap; transition: background var(--tds-duration-fast), border-color var(--tds-duration-fast), transform var(--tds-duration-fast) var(--tds-ease); }
.button:active { transform: scale(0.98); }
.button.primary { background: var(--tds-action); color: var(--tds-on-action); }
.button.primary:hover { background: var(--tds-action-hover); }
.button.secondary { border-color: var(--tds-input); background: var(--tds-surface); color: var(--tds-action); box-shadow: var(--tds-shadow-xs); }
.button.secondary:hover { background: var(--tds-surface-hover); border-color: var(--tds-border-strong); }
.button.small { min-height: 32px; padding: 4px 12px; font-size: 0.8125rem; }
.button.on-dark { background: #ffffff14; border-color: #ffffff40; color: #fff; }
.button.on-dark:hover { background: #ffffff26; }
.button.accent { background: var(--tds-chartreuse); color: #1a2400; }
.button.accent:hover { background: #dbe640; }
.icon-button { border: 1px solid transparent; background: transparent; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: var(--tds-radius-ctl); flex: none; color: var(--tds-text-secondary); }
.icon-button:hover { background: var(--tds-surface-hover); color: var(--tds-action); }
input, select, textarea { border: 1px solid var(--tds-input); border-radius: var(--tds-radius-ctl); background: var(--tds-surface); min-width: 0; }
input, select { min-height: 40px; padding: 8px 12px; font-size: 0.875rem; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--tds-accent); box-shadow: 0 0 0 3px #1e9bb040; }
input::placeholder, textarea::placeholder { color: var(--tds-text-secondary); opacity: 1; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: var(--tds-radius-badge); font-size: 0.75rem; font-weight: 500; line-height: 1.4; white-space: nowrap; background: var(--tds-surface-subtle); color: var(--tds-text-secondary); }
.badge .icon { width: 12px; height: 12px; }
.badge.official { background: var(--tds-success-bg); color: var(--tds-success); }
.badge.suggested { background: var(--edge-extend-bg); color: var(--edge-extend); }
.badge.internal { background: var(--edge-grow-bg); color: #5c6300; }
:root[data-theme="dark"] .badge.internal { color: var(--edge-grow); }
.badge.warn { background: var(--tds-danger-bg); color: var(--tds-danger); }
.badge.dark { background: #ffffff1f; color: #fff; }
.form-error { color: var(--tds-danger); background: var(--tds-danger-bg); padding: 10px 12px; border-radius: var(--tds-radius-ctl); font-size: 0.875rem; }
.segmented { display: inline-flex; gap: 2px; padding: 3px; background: var(--tds-surface-subtle); border: 1px solid var(--tds-border); border-radius: var(--tds-radius-ctl); }
.segmented button { border: 0; background: transparent; padding: 5px 12px; font-size: 0.8125rem; border-radius: 6px; white-space: nowrap; color: var(--tds-text-secondary); }
.segmented button[aria-pressed="true"] { background: var(--tds-surface); color: var(--tds-action); font-weight: 600; box-shadow: var(--tds-shadow-xs); }

/* Sign-in */
.signin { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr); background: var(--tds-surface); }
.signin-brand { background: var(--tds-deep-teal); color: #fff; padding: clamp(32px, 6vw, 88px); display: flex; flex-direction: column; justify-content: center; gap: 24px; }
.signin-brand img { height: 41px; width: auto; align-self: flex-start; margin-bottom: 24px; }
.signin-brand h1 { color: #fff; font-size: clamp(2rem, 4vw, 3.25rem); max-width: 620px; }
.signin-brand h1 span { color: var(--tds-chartreuse); }
.signin-brand p { color: #c4d8d6; max-width: 520px; }
.signin-brand ul { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; color: #e3efee; font-size: 0.9375rem; }
.signin-brand li::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--tds-aqua); margin-right: 12px; }
.signin-card { align-self: center; justify-self: center; width: min(360px, 100% - 48px); display: grid; gap: 14px; }
.signin-card .button { min-height: 44px; }

/* Shell */
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); display: flex; flex-direction: column; gap: 4px; padding: 0 8px; background: var(--sidebar-bg); border-right: 1px solid var(--tds-border); z-index: 30; transition: transform var(--tds-duration-moderate) var(--tds-ease); }
.team { display: flex; align-items: center; gap: 10px; height: var(--header); padding: 0 8px; flex: none; color: var(--tds-heading); }
.team img { height: 20px; width: auto; }
.team-text { font-size: 0.8125rem; font-weight: 600; padding-left: 10px; border-left: 1px solid var(--tds-border-strong); white-space: nowrap; }
.logo-dark, :root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: block; }
.new-chat { margin: 4px 0 8px; }
.main-nav { display: flex; flex-direction: column; gap: 2px; }
.main-nav a, .recent a { display: flex; align-items: center; gap: 10px; min-height: 34px; padding: 6px 8px; border-radius: var(--tds-radius-ctl); font-size: 0.875rem; color: var(--tds-text); }
.main-nav a:hover, .recent a:hover { background: var(--tds-surface-hover); }
.main-nav a[aria-current="page"] { background: var(--tds-selected); color: var(--tds-action); font-weight: 600; }
.main-nav .icon { color: var(--tds-text-secondary); }
.main-nav a[aria-current="page"] .icon { color: var(--tds-action); }
.nav-label { display: flex; align-items: center; height: 32px; padding: 0 8px; margin-top: 12px; font-size: 0.75rem; font-weight: 500; color: var(--tds-text-secondary); }
.recent { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 1px; }
.recent a { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--tds-text-secondary); font-size: 0.8125rem; }
.recent a[aria-current="page"] { background: var(--tds-selected); color: var(--tds-text); }
.recent p { padding: 4px 8px; font-size: 0.8125rem; color: var(--tds-text-secondary); }
.sidebar-footer { flex: none; padding: 8px 0; border-top: 1px solid var(--tds-border); }
.user-row { display: flex; align-items: center; gap: 10px; padding: 4px; }
.user-text { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 0.8125rem; line-height: 1.3; }
.user-text strong { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-text small { color: var(--tds-text-secondary); }
.avatar { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--tds-teal); color: var(--tds-on-action); font-size: 0.8125rem; font-weight: 600; flex: none; }
.avatar .icon { width: 16px; height: 16px; }
.header { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 8px; height: var(--header); margin-left: var(--sidebar); padding: 0 16px; background: var(--tds-surface); border-bottom: 1px solid var(--tds-border); transition: margin-left var(--tds-duration-moderate) var(--tds-ease); }
.header-sep { width: 1px; height: 16px; margin: 0 4px; background: var(--tds-border); }
#breadcrumb { font-size: 0.875rem; color: var(--tds-text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#breadcrumb strong { font-weight: 500; color: var(--tds-text); }
.header-center { flex: 1; display: flex; justify-content: flex-end; min-width: 0; }
.search-trigger { display: flex; align-items: center; gap: 8px; width: 100%; max-width: 300px; height: 36px; padding: 0 10px; border: 1px solid var(--tds-input); border-radius: var(--tds-radius-ctl); background: var(--tds-surface); box-shadow: var(--tds-shadow-xs); color: var(--tds-text-secondary); font-size: 0.875rem; text-align: left; }
.search-trigger:hover { border-color: var(--tds-border-strong); }
.search-trigger .search-placeholder { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kbd { display: inline-flex; gap: 2px; }
kbd { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 4px; border-radius: 4px; background: var(--tds-surface-subtle); font: 500 0.75rem var(--tds-font); color: var(--tds-text-secondary); }
main { margin-left: var(--sidebar); min-height: calc(100dvh - var(--header)); transition: margin-left var(--tds-duration-moderate) var(--tds-ease); }
main:focus { outline: 0; }
.sidebar-collapsed .sidebar { transform: translateX(-100%); }
.sidebar-collapsed .header, .sidebar-collapsed main { margin-left: 0; }
.page { max-width: 1240px; margin: 0 auto; padding: 28px 32px 64px; display: grid; gap: 24px; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.page-heading p { color: var(--tds-text-secondary); margin-top: 8px; max-width: 640px; }
.eyebrow { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--tds-text-secondary); }

/* Cards, tiles, tables */
.card { background: var(--tds-surface); border: 1px solid var(--tds-border); border-radius: var(--tds-radius); box-shadow: var(--tds-shadow-xs); min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px 0; flex-wrap: wrap; }
.card-body { padding: 16px 20px 20px; }
.card-foot { padding: 10px 20px; border-top: 1px solid var(--tds-border); font-size: 0.75rem; color: var(--tds-text-secondary); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.grid { display: grid; gap: 20px; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.kpi { background: var(--tds-surface); border: 1px solid var(--tds-border); border-radius: var(--tds-radius); padding: 14px 16px; box-shadow: var(--tds-shadow-xs); }
.kpi span { display: block; font-size: 0.75rem; color: var(--tds-text-secondary); }
.kpi strong { display: block; font-size: 1.75rem; font-weight: 400; letter-spacing: -0.03em; line-height: 1.2; font-variant-numeric: tabular-nums; color: var(--tds-heading); }
.kpi.alert strong { color: var(--tds-danger); }
.table-wrap { overflow: auto; max-height: 560px; }
table { width: 100%; border-collapse: collapse; font-size: 0.8125rem; }
th { position: sticky; top: 0; background: var(--tds-surface); text-align: left; font-weight: 600; font-size: 0.75rem; color: var(--tds-text-secondary); padding: 8px 12px; border-bottom: 1px solid var(--tds-border); white-space: nowrap; }
td { padding: 9px 12px; border-bottom: 1px solid var(--tds-border); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tr.link { cursor: pointer; }
tr.link:hover td { background: var(--tds-surface-hover); }
td.r, th.r { text-align: right; font-variant-numeric: tabular-nums; }
.empty { padding: 28px; text-align: center; color: var(--tds-text-secondary); font-size: 0.875rem; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--tds-border); font-size: 0.875rem; color: var(--tds-text); }
.list-row:first-child { border-top: 0; }
a.list-row:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.list-row strong { font-weight: 600; }
.list-row .value { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 600; }

/* Hero */
.hero { background: var(--tds-deep-teal); color: #fff; border-radius: var(--tds-radius-lg); padding: clamp(24px, 3.5vw, 40px); display: grid; gap: 20px; }
.hero h1 { color: #fff; max-width: 760px; }
.hero h1 span { color: var(--tds-chartreuse); }
.hero p { color: #c4d8d6; max-width: 620px; }
.hero .eyebrow { color: #9cc5c2; }
.hero-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.suggest { display: flex; flex-wrap: wrap; gap: 8px; }
.suggest button { border: 1px solid #ffffff38; background: #ffffff0f; color: #e8f3f2; border-radius: var(--tds-radius-pill); padding: 6px 14px; font-size: 0.8125rem; }
.suggest button:hover { background: #ffffff24; }

/* Composer */
.composer { background: var(--tds-surface); border: 1px solid var(--tds-input); border-radius: var(--tds-radius-lg); box-shadow: var(--tds-shadow-sm); padding: 10px 10px 8px 16px; color: var(--tds-text); }
.composer:focus-within { border-color: var(--tds-accent); box-shadow: 0 0 0 3px #1e9bb040; }
.composer textarea { display: block; width: 100%; border: 0; background: transparent; resize: none; padding: 6px 0; min-height: 28px; max-height: 200px; line-height: 1.5; box-shadow: none; }
.composer textarea:focus { box-shadow: none; }
.composer textarea::placeholder { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.composer-bar { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.composer-bar .send { width: 36px; height: 36px; border-radius: 50%; background: var(--tds-action); color: var(--tds-on-action); border: 0; display: grid; place-items: center; margin-left: auto; }
.composer-bar .send:hover { background: var(--tds-action-hover); }
.chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 3px 10px; border-radius: var(--tds-radius-pill); background: var(--tds-selected); color: var(--tds-action); font-size: 0.8125rem; font-weight: 500; border: 0; }
.chip .icon { width: 14px; height: 14px; }
button.chip:hover { background: var(--tds-surface-hover); }
.chip.ghost { background: transparent; border: 1px solid var(--tds-border); color: var(--tds-text-secondary); }

/* Chat */
.chat { display: grid; grid-template-columns: minmax(0, 1fr); height: calc(100dvh - var(--header)); }
.chat.canvas-open { grid-template-columns: minmax(360px, 1fr) minmax(420px, 46%); }
.chat-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.chat-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 28px 24px 12px; }
.chat-thread { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 28px; }
.chat-foot { padding: 8px 24px 18px; }
.chat-foot > div { max-width: 760px; margin: 0 auto; }
.chat-foot small { display: block; text-align: center; margin-top: 8px; font-size: 0.75rem; color: var(--tds-text-secondary); }
.chat-empty { margin: auto; text-align: center; max-width: 560px; padding: 24px; display: grid; gap: 12px; justify-items: center; }
.chat-empty .avatar { width: 52px; height: 52px; }
.chat-empty .avatar .icon { width: 26px; height: 26px; }
.chat-empty .suggest { justify-content: center; margin-top: 8px; }
.chat-empty .suggest button { border-color: var(--tds-border); background: var(--tds-surface); color: var(--tds-text); }
.chat-empty .suggest button:hover { background: var(--tds-surface-hover); border-color: var(--tds-border-strong); }
.msg { display: flex; gap: 14px; animation: rise 0.24s var(--tds-ease); }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
.msg.user { justify-content: flex-end; }
.bubble { max-width: 82%; padding: 10px 16px; border-radius: 20px 20px 6px 20px; background: var(--tds-selected); font-size: 0.9375rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-body { flex: 1; min-width: 0; display: grid; gap: 10px; }
.steps { border: 1px solid var(--tds-border); border-radius: var(--tds-radius); background: var(--tds-surface); font-size: 0.8125rem; }
.steps summary { display: flex; align-items: center; gap: 8px; padding: 8px 12px; cursor: pointer; color: var(--tds-text-secondary); list-style: none; }
.steps summary::-webkit-details-marker { display: none; }
.steps summary .chev { margin-left: auto; transition: transform var(--tds-duration-fast); }
.steps[open] summary .chev { transform: rotate(90deg); }
.steps ol { margin: 0; padding: 4px 12px 10px; list-style: none; display: grid; gap: 6px; }
.steps li { display: flex; gap: 8px; align-items: flex-start; }
.steps li .icon { width: 14px; height: 14px; margin-top: 3px; color: var(--tds-success); }
.steps li small { display: block; color: var(--tds-text-secondary); }
.spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--tds-border); border-top-color: var(--tds-accent); animation: spin 0.8s linear infinite; flex: none; margin-top: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }
.msg-foot { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.doc-card { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px 14px; border: 1px solid var(--tds-border); border-radius: var(--tds-radius); background: var(--tds-surface); box-shadow: var(--tds-shadow-xs); }
.doc-card:hover { border-color: var(--tds-border-strong); background: var(--tds-surface-hover); }
.doc-card .housing { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; background: var(--edge-develop-bg); color: var(--edge-develop); flex: none; }
.doc-card strong { display: block; font-size: 0.875rem; }
.doc-card small { color: var(--tds-text-secondary); }
.thinking { color: var(--tds-text-secondary); font-size: 0.875rem; display: flex; align-items: center; gap: 8px; }

/* Rendered markdown */
.prose { font-size: 0.9688rem; line-height: 1.65; overflow-wrap: anywhere; }
.prose > * + * { margin-top: 0.75em; }
.prose h1 { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; }
.prose h2 { font-size: 1.125rem; margin-top: 1.4em; }
.prose h3 { font-size: 1rem; margin-top: 1.2em; }
.prose ul, .prose ol { margin: 0.5em 0 0; padding-left: 1.4em; }
.prose li + li { margin-top: 0.25em; }
.prose code { font: 0.8125rem var(--tds-mono); background: var(--tds-surface-subtle); padding: 1px 5px; border-radius: 4px; }
.prose pre { background: var(--tds-surface-subtle); border-radius: var(--tds-radius-ctl); padding: 12px 14px; overflow: auto; }
.prose pre code { background: none; padding: 0; }
.prose blockquote { margin-left: 0; margin-right: 0; padding: 2px 14px; border-left: 3px solid var(--tds-green); color: var(--tds-text-secondary); }
.prose hr { border: 0; border-top: 1px solid var(--tds-border); }
.prose .table-wrap { border: 1px solid var(--tds-border); border-radius: var(--tds-radius-ctl); max-height: none; }
.prose th { background: var(--tds-surface-subtle); position: static; }
.prose td, .prose th { overflow-wrap: normal; } /* IDs and dates stay whole; the table scrolls sideways instead */
.cite { display: inline-flex; align-items: center; padding: 0 6px; margin: 0 2px; border-radius: 4px; background: var(--tds-success-bg); color: var(--tds-success); font-size: 0.6875rem; font-weight: 600; vertical-align: 1px; white-space: nowrap; }

/* Canvas */
.canvas { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--tds-surface); border-left: 1px solid var(--tds-border); }
.canvas-head { display: flex; align-items: center; gap: 6px; padding: 10px 12px 10px 20px; border-bottom: 1px solid var(--tds-border); }
.canvas-head input { flex: 1; border-color: transparent; font-weight: 600; font-size: 0.9375rem; padding: 4px 8px; min-height: 32px; margin-left: -8px; background: transparent; }
.canvas-head input:hover { border-color: var(--tds-border); }
.canvas-body { flex: 1; min-height: 0; overflow: auto; padding: 24px 28px 40px; }
.canvas-body textarea { width: 100%; height: 100%; min-height: 60vh; border: 0; resize: none; font: 0.875rem/1.6 var(--tds-mono); background: transparent; }
.canvas-body textarea:focus { box-shadow: none; }
.canvas-foot > span { white-space: nowrap; }
.canvas-foot { padding: 8px 20px; border-top: 1px solid var(--tds-border); font-size: 0.75rem; color: var(--tds-text-secondary); display: flex; gap: 8px; align-items: center; }
.doc-page { max-width: 900px; margin: 24px auto; height: calc(100dvh - var(--header) - 48px); border: 1px solid var(--tds-border); border-radius: var(--tds-radius); overflow: hidden; }
.doc-page .canvas { height: 100%; border-left: 0; }

/* Charts */
.bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: minmax(120px, 1.1fr) minmax(0, 2fr) 76px 48px; gap: 12px; align-items: center; font-size: 0.8125rem; }
.bar-track { height: 10px; background: var(--tds-surface-subtle); border-radius: 5px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--tds-teal); border-radius: 5px; min-width: 2px; }
.bar-row .v { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.spark { width: 76px; height: 22px; color: var(--tds-green); }
.mini-bar { display: inline-block; width: 64px; height: 6px; background: var(--tds-surface-subtle); border-radius: 3px; vertical-align: middle; margin-right: 8px; overflow: hidden; }
.mini-bar i { display: block; height: 100%; background: var(--tds-teal); }
.columns { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; align-items: end; height: 170px; }
.columns div { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; height: 100%; min-width: 0; }
.columns i { display: block; width: 100%; max-width: 44px; background: var(--tds-teal); border-radius: 4px 4px 0 0; min-height: 2px; }
.columns div:first-child i { background: var(--tds-green); }
.columns b { font-size: 0.6875rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.columns span { font-size: 0.6875rem; color: var(--tds-text-secondary); white-space: nowrap; }

/* Playbooks and catalog */
.pb { display: flex; flex-direction: column; gap: 12px; padding: 20px; }
.pb .housing, .tile .housing { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--tds-surface-subtle); color: var(--tds-action); }
.pb ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 0.8125rem; color: var(--tds-text-secondary); counter-reset: s; }
.pb li { counter-increment: s; display: flex; gap: 8px; }
.pb li::before { content: counter(s); display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--tds-surface-subtle); font-size: 0.6875rem; font-weight: 600; flex: none; margin-top: 1px; }
.pb .button { margin-top: auto; align-self: flex-start; }
.tile { display: flex; gap: 14px; padding: 16px; align-items: flex-start; color: var(--tds-text); }
a.tile:hover { border-color: var(--tds-border-strong); }
.tile p { font-size: 0.8125rem; color: var(--tds-text-secondary); margin-top: 2px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--tds-border); }
.tabs button { border: 0; background: none; padding: 10px 14px; font-size: 0.875rem; color: var(--tds-text-secondary); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button[aria-selected="true"] { color: var(--tds-action); font-weight: 600; border-bottom-color: var(--tds-action); }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: var(--tds-radius-ctl); background: var(--edge-grow-bg); font-size: 0.8125rem; }
.notice .icon { margin-top: 2px; flex: none; }

/* Partner finder and toast */
.palette { width: min(640px, calc(100vw - 32px)); margin-top: 12vh; padding: 0; border: 1px solid var(--tds-border); border-radius: var(--tds-radius-lg); background: var(--tds-surface); color: var(--tds-text); box-shadow: var(--tds-shadow); }
.palette::backdrop { background: #00303166; }
.palette-input { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--tds-border); }
.palette-input input { flex: 1; border: 0; box-shadow: none !important; font-size: 1rem; padding: 4px 0; }
.palette-hint { padding: 8px 16px 0; font-size: 0.75rem; color: var(--tds-text-secondary); }
.palette-list { max-height: 50vh; overflow: auto; padding: 8px; }
.palette-list button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: var(--tds-radius-ctl); background: none; text-align: left; font-size: 0.875rem; }
.palette-list button:hover, .palette-list button[aria-selected="true"] { background: var(--tds-surface-hover); }
.palette-list small { margin-left: auto; color: var(--tds-text-secondary); white-space: nowrap; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--tds-deep-teal); color: #fff; padding: 10px 18px; border-radius: var(--tds-radius-ctl); font-size: 0.875rem; box-shadow: var(--tds-shadow); z-index: 60; }

/* Hub: form dialogs, skills, automations, connectors */
.palette.form { margin-top: 8vh; max-height: 84vh; overflow: auto; }
.palette.form form { display: grid; gap: 14px; padding: 20px 24px 24px; }
.field { display: grid; gap: 6px; font-size: 0.875rem; }
.field > label { font-weight: 600; font-size: 0.8125rem; }
.field textarea { padding: 8px 12px; font-size: 0.875rem; line-height: 1.5; resize: vertical; width: 100%; }
.field small, .check small { display: block; color: var(--tds-text-secondary); font-size: 0.75rem; font-weight: 400; }
.field .button { justify-self: start; }
.check { display: flex; align-items: flex-start; gap: 8px; font-size: 0.875rem; cursor: pointer; }
.check input, .tool input { min-height: 0; width: 16px; height: 16px; margin-top: 2px; padding: 0; flex: none; accent-color: var(--tds-action); }
.form-actions { justify-content: flex-end; margin-top: 4px; }
.skill-pick { min-height: 32px; padding: 2px 8px; max-width: 200px; border-radius: var(--tds-radius-pill); font-size: 0.8125rem; color: var(--tds-text-secondary); }
.with-skill { display: block; margin-top: 4px; font-size: 0.6875rem; opacity: 0.8; }
.skill-steps summary { cursor: pointer; font-size: 0.8125rem; color: var(--tds-action); }
.skill-steps pre { margin: 8px 0 0; white-space: pre-wrap; font: 0.75rem/1.55 var(--tds-mono); color: var(--tds-text-secondary); max-height: 220px; overflow: auto; }
.auto { display: flex; gap: 14px; padding: 16px 20px; align-items: flex-start; flex-wrap: wrap; }
.auto .housing { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--tds-surface-subtle); color: var(--tds-action); flex: none; }
.auto .grow { flex: 1 1 240px; }
.auto .badge { white-space: normal; }
.stack { display: grid; gap: 16px; }
.tile .button { align-self: center; flex: none; }
label.list-row { cursor: pointer; align-items: flex-start; }
@media (max-width: 1000px) {
  .cols-2, .cols-3 { grid-template-columns: minmax(0, 1fr); }
  .chat.canvas-open { grid-template-columns: minmax(0, 1fr); }
  .chat.canvas-open .chat-main { display: none; }
  .signin { grid-template-columns: minmax(0, 1fr); }
  .signin-card { padding: 40px 0; }
}
@media (max-width: 820px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--tds-shadow-sm); width: 280px; }
  .header, main { margin-left: 0; }
  .sidebar-open .sidebar { transform: none; }
  .page { padding: 20px 16px 48px; }
  .bar-row { grid-template-columns: minmax(90px, 1fr) minmax(0, 1.4fr) 0 44px; }
  .spark { display: none; }
  .kbd { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } }
@media print {
  .sidebar, .header, .chat-main, .canvas-head, .canvas-foot { display: none !important; }
  main { margin: 0; } .chat, .doc-page { display: block; height: auto; border: 0; } .canvas-body { overflow: visible; }
}
