/* ==========================================================================
   Intranet — public site
   Light, airy, modern. One brand colour (set in Settings) drives everything.
   ========================================================================== */
:root {
  --brand: #0E8C7F;
  --brand-ink: color-mix(in oklab, var(--brand) 70%, #000);
  --brand-soft: color-mix(in oklab, var(--brand) 10%, #fff);
  --brand-softer: color-mix(in oklab, var(--brand) 5%, #fff);
  --ink: #0F1B2D;
  --ink-2: #334155;
  --muted: #64748B;
  --line: #E5E9F0;
  --bg: #F4F6F9;
  --surface: #FFFFFF;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(15, 27, 45, .05);
  --shadow: 0 1px 2px rgba(15, 27, 45, .04), 0 6px 24px -8px rgba(15, 27, 45, .10);
  --shadow-lg: 0 24px 60px -12px rgba(15, 27, 45, .28);
  --top: 68px;
  --side: 256px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--top) + 16px); }
body { margin: 0; font: 15px/1.6 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
img, video { max-width: 100%; display: block; }
a { color: var(--brand-ink); }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -0.015em; margin: 0; }
.ic { width: 20px; height: 20px; flex: none; }
.ic-sm { width: 16px; height: 16px; }
.ic-xs { width: 13px; height: 13px; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 100; background: #fff; padding: 8px 12px; border-radius: 8px; }
:focus-visible { outline: 3px solid color-mix(in oklab, var(--brand) 45%, transparent); outline-offset: 2px; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40; height: var(--top);
  display: flex; align-items: center; gap: 16px; padding: 0 20px;
  background: rgba(255, 255, 255, .85); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-width: calc(var(--side) - 36px); }
.brand img { height: 36px; width: auto; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: var(--brand); color: #fff; box-shadow: 0 6px 16px -6px var(--brand); }
.brand-mark .ic { width: 20px; height: 20px; }
.brand-name { font-weight: 700; font-size: 16px; letter-spacing: -0.01em; white-space: nowrap; }

.omni { position: relative; flex: 1; max-width: 620px; display: flex; align-items: center; }
.omni input {
  width: 100%; height: 44px; padding: 0 44px 0 44px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--bg); font: inherit; color: var(--ink);
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.omni input:hover { border-color: #d5dbe4; }
.omni input:focus { outline: none; background: #fff; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.omni-ic { position: absolute; left: 16px; color: var(--muted); pointer-events: none; width: 18px; height: 18px; }
.omni kbd { position: absolute; right: 14px; font: 600 11px var(--font); color: var(--muted); border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 1px 7px; }
.omni input:focus ~ kbd { display: none; }

.top-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; border: 0; background: transparent; color: var(--ink-2); text-decoration: none; transition: background .15s; }
.icon-btn:hover { background: var(--bg); color: var(--ink); }
.ask-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px 0 12px; border: 0; border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), color-mix(in oklab, var(--brand) 60%, #4F46E5)); color: #fff; font-weight: 600;
  box-shadow: 0 8px 20px -10px var(--brand); transition: transform .15s, box-shadow .15s;
}
.ask-btn:hover { transform: translateY(-1px); box-shadow: 0 12px 24px -10px var(--brand); }
.ask-btn .ic { width: 18px; height: 18px; }
.nav-toggle { display: inline-grid; margin-left: -6px; }
.brand { min-width: calc(var(--side) - 82px); }

/* ---------- Shell & sidebar ---------- */
.shell { display: flex; min-height: calc(100vh - var(--top)); }
.sidebar {
  position: sticky; top: var(--top); align-self: flex-start; width: var(--side); flex: none;
  height: calc(100vh - var(--top)); overflow-y: auto; padding: 18px 14px 24px;
  background: var(--surface); border-right: 1px solid var(--line);
}
.nav, .subnav { list-style: none; margin: 0; padding: 0; }
.nav > li { position: relative; margin-bottom: 2px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px;
  color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 14.5px; transition: background .15s, color .15s;
}
.nav a .ic { color: #94A3B8; transition: color .15s; }
.nav a:hover { background: var(--bg); color: var(--ink); }
.nav a:hover .ic { color: var(--brand); }
.nav li.active > a { background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; }
.nav li.active > a .ic { color: var(--brand); }
.nav-expand { position: absolute; right: 6px; top: 6px; width: 30px; height: 30px; border: 0; background: transparent; border-radius: 8px; color: var(--muted); display: grid; place-items: center; }
.nav-expand:hover { background: var(--line); }
.has-kids > a { padding-right: 40px; }
.subnav { display: none; margin: 2px 0 6px 22px; padding-left: 14px; border-left: 2px solid var(--line); }
.has-kids.open > .subnav { display: block; }
.has-kids.open > .nav-expand { transform: rotate(180deg); }
.subnav a { padding: 7px 10px; font-size: 14px; font-weight: 500; }
.sidebar-note { margin: 18px 6px 0; padding: 14px; border-radius: 12px; background: var(--bg); color: var(--muted); font-size: 13px; }
.scrim { display: none; }

/* ---------- Main ---------- */
.main { flex: 1; min-width: 0; padding: 24px clamp(16px, 3vw, 40px) 40px; }
.main > * { max-width: 1180px; margin-left: auto; margin-right: auto; }
.foot { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; text-align: center; }

/* ---------- Banner carousel ---------- */
.hero { position: relative; margin-bottom: 28px; border-radius: 22px; overflow: hidden; background: #dfe5ec; box-shadow: var(--shadow); aspect-ratio: 1200 / 420; }
.hero-track, .hero-slide { position: absolute; inset: 0; }
.hero-slide { opacity: 0; visibility: hidden; transition: opacity .6s ease, visibility .6s; }
.hero-slide.is-active { opacity: 1; visibility: visible; }
.hero-slide a, .hero-slide img { display: block; width: 100%; height: 100%; }
.hero-slide img { object-fit: cover; }
.hero-nav {
  position: absolute; top: 50%; translate: 0 -50%; width: 44px; height: 44px; border-radius: 50%; border: 0;
  display: grid; place-items: center; background: rgba(255, 255, 255, .9); color: var(--ink); box-shadow: var(--shadow);
  opacity: 0; transition: opacity .2s, transform .2s;
}
.hero:hover .hero-nav, .hero-nav:focus-visible { opacity: 1; }
.hero-nav:hover { transform: scale(1.06); }
.hero-nav.prev { left: 16px; }
.hero-nav.next { right: 16px; }
.hero-dots { position: absolute; left: 50%; bottom: 14px; translate: -50% 0; display: flex; gap: 6px; padding: 6px 8px; border-radius: 99px; background: rgba(15, 27, 45, .35); backdrop-filter: blur(6px); }
.hero-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 99px; background: rgba(255, 255, 255, .55); transition: width .3s, background .3s; }
.hero-dots button.is-active { width: 24px; background: #fff; }

/* ---------- Page ---------- */
.page { background: transparent; }
.page-head { margin-bottom: 24px; }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--brand-ink); }
.page-title-row { display: flex; gap: 16px; align-items: flex-start; }
.page-head h1 { font-size: clamp(26px, 3vw, 34px); font-weight: 750; }
.lead { margin: 8px 0 0; color: var(--muted); font-size: 17px; max-width: 70ch; }
.page-ic { display: grid; place-items: center; width: 52px; height: 52px; flex: none; border-radius: 16px; background: var(--brand-soft); color: var(--brand); }
.page-ic .ic { width: 26px; height: 26px; }
.page-ic.sm { width: 40px; height: 40px; border-radius: 12px; }
.page-ic.sm .ic { width: 20px; height: 20px; }
.page-ic.lg { width: 72px; height: 72px; border-radius: 22px; margin: 0 auto 18px; }
.page-ic.lg .ic { width: 34px; height: 34px; }
.updated { margin-top: 40px; color: var(--muted); font-size: 13px; }
.draft-bar { display: flex; align-items: center; gap: 8px; padding: 10px 16px; margin-bottom: 20px; border-radius: 12px; background: #FEF3C7; color: #92400E; font-size: 14px; }
.draft-bar a { margin-left: auto; font-weight: 600; color: #92400E; }

/* Content blocks get a white "sheet" on inner pages; home is a free canvas */
.page:not(.page-home):not(.search-page):not(.empty-state) .blocks { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: clamp(20px, 3.5vw, 40px); box-shadow: var(--shadow-sm); }
.blocks > * + * { margin-top: 20px; }
.blocks > .b-heading { margin-top: 36px; }
.blocks > .b-heading:first-child { margin-top: 0; }
.b-heading { font-size: 22px; font-weight: 700; }
h3.b-heading { font-size: 18px; }
.section-title { margin-bottom: 16px; }

.prose { color: var(--ink-2); font-size: 15.5px; line-height: 1.7; max-width: 78ch; }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose p { margin: 0 0 1em; }
.prose h2, .prose h3, .prose h4 { color: var(--ink); margin: 1.4em 0 .5em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin: .25em 0; }
.prose li::marker { color: var(--brand); }
.prose a { color: var(--brand-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose blockquote { margin: 1em 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--brand); color: var(--ink); font-size: 17px; }
.prose table { width: 100%; border-collapse: collapse; margin: 1em 0; font-size: 14.5px; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.prose th { background: var(--bg); font-weight: 600; color: var(--ink); }
.prose mark { background: color-mix(in oklab, var(--brand) 18%, #fff); padding: 0 3px; border-radius: 3px; }

.b-image { margin: 0; }
.b-image img { border-radius: 14px; width: 100%; }
.b-image.size-medium { max-width: 640px; }
.b-image.size-small { max-width: 360px; }
.b-image figcaption, .b-video figcaption { margin-top: 8px; font-size: 13px; color: var(--muted); }
.b-video { margin: 0; }
.b-video .ratio { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #000; }
.b-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.b-video video { width: 100%; border-radius: 14px; }
.b-button.align-center { text-align: center; }

.btn { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 12px; font-weight: 600; text-decoration: none; border: 0; transition: transform .15s, box-shadow .15s, background .15s; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 8px 18px -10px var(--brand); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 22px -10px var(--brand); }
.btn-secondary { background: var(--brand-soft); color: var(--brand-ink); }
.btn-secondary:hover { background: color-mix(in oklab, var(--brand) 16%, #fff); }

/* Apps / quick links */
.apps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.app-tile {
  --c: var(--brand);
  position: relative; display: flex; align-items: center; gap: 14px; padding: 14px 16px; min-height: 72px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; text-decoration: none; color: var(--ink);
  box-shadow: var(--shadow-sm); transition: transform .18s, box-shadow .18s, border-color .18s;
}
.app-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: color-mix(in oklab, var(--c) 35%, var(--line)); }
.app-ic { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 13px; background: color-mix(in oklab, var(--c) 12%, #fff); color: var(--c); transition: background .18s, color .18s; }
.app-tile:hover .app-ic { background: var(--c); color: #fff; }
.app-txt { display: flex; flex-direction: column; min-width: 0; }
.app-label { font-weight: 600; font-size: 15px; line-height: 1.3; }
.app-note { font-size: 12.5px; color: var(--muted); line-height: 1.35; margin-top: 2px; }
.app-go { margin-left: auto; width: 18px; height: 18px; color: #CBD5E1; transition: color .18s, transform .18s; rotate: 45deg; }
.app-tile:hover .app-go { color: var(--c); transform: translate(1px, -1px); }
.c-teal { --c: var(--brand); } .c-blue { --c: #2563EB; } .c-indigo { --c: #4F46E5; } .c-purple { --c: #9333EA; }
.c-red { --c: #DC2626; } .c-orange { --c: #EA580C; } .c-amber { --c: #D97706; } .c-green { --c: #16A34A; } .c-slate { --c: #475569; }
.c-red { border-color: color-mix(in oklab, #DC2626 22%, var(--line)); }

/* Cards */
.b-cards { display: grid; gap: 16px; }
.b-cards.cols-2 { grid-template-columns: repeat(2, 1fr); }
.b-cards.cols-3 { grid-template-columns: repeat(3, 1fr); }
.card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-sm); }
.card-media { aspect-ratio: 16 / 7; background: var(--brand-softer); display: grid; place-items: center; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: contain; padding: 18px 24px; }
.card-body { padding: 20px 22px 22px; }
.card-body h3 { font-size: 18px; font-weight: 700; }
.card-body p { margin: 6px 0 0; color: var(--muted); font-size: 14.5px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-ink); font-size: 13.5px; font-weight: 600; text-decoration: none; transition: background .15s, color .15s; }
.chip:hover { background: var(--brand); color: #fff; }

/* Callout */
.b-callout { display: flex; gap: 14px; padding: 16px 18px; border-radius: 14px; border: 1px solid; }
.b-callout > .ic { margin-top: 2px; }
.b-callout > div > strong { display: block; margin-bottom: 2px; }
.tone-info { background: #EFF6FF; border-color: #DBEAFE; color: #1E3A8A; }
.tone-success { background: #F0FDF4; border-color: #DCFCE7; color: #14532D; }
.tone-warning { background: #FFFBEB; border-color: #FEF3C7; color: #78350F; }
.tone-danger { background: #FEF2F2; border-color: #FEE2E2; color: #7F1D1D; }
.b-callout .prose { color: inherit; }

/* File */
.b-file { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--ink); background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.b-file:hover { border-color: var(--brand); box-shadow: var(--shadow); }
.file-ic { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); }
.b-file small { display: block; color: var(--muted); font-size: 12.5px; }
.file-dl { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--brand-ink); }

/* Accordion */
.b-accordion { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); }
.b-accordion details + details { border-top: 1px solid var(--line); }
.b-accordion summary { display: flex; align-items: center; gap: 12px; padding: 16px 18px; font-weight: 600; cursor: pointer; list-style: none; }
.b-accordion summary::-webkit-details-marker { display: none; }
.b-accordion summary:hover { background: var(--brand-softer); }
.acc-ic { margin-left: auto; color: var(--muted); transition: transform .2s; }
.b-accordion details[open] .acc-ic { transform: rotate(180deg); }
.b-accordion .prose { padding: 0 18px 18px; }

/* Contacts */
.b-contacts { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.contact { display: flex; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.contact img, .avatar { width: 52px; height: 52px; flex: none; border-radius: 50%; object-fit: cover; }
.avatar { display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); font-weight: 700; }
.contact strong { display: block; }
.contact small { display: block; color: var(--muted); }
.contact-links { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; font-size: 13.5px; }
.contact-links a { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }

.b-embed iframe { width: 100%; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.b-divider { border: 0; height: 1px; background: var(--line); margin: 32px 0 !important; }
.b-spacer.s-s { height: 8px; } .b-spacer.s-m { height: 24px; } .b-spacer.s-l { height: 56px; }

.subpages { margin-top: 32px; }
.subpages .b-heading { margin-bottom: 14px; }

/* ---------- Search page & AI answer ---------- */
.answer-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 22px 24px; box-shadow: var(--shadow); margin-bottom: 28px; position: relative; overflow: hidden; }
.answer-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, var(--brand), #6366F1, var(--brand)); background-size: 200% 100%; animation: shimmer 3s linear infinite; }
.answer-card.done::before { animation: none; }
@keyframes shimmer { to { background-position: -200% 0; } }
.answer-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.answer-head small { color: var(--muted); font-size: 12.5px; }
.assistant-badge { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; color: #fff; background: linear-gradient(135deg, var(--brand), color-mix(in oklab, var(--brand) 55%, #4F46E5)); }
.assistant-badge .ic { width: 16px; height: 16px; }
.answer-body { font-size: 16px; line-height: 1.7; color: var(--ink); }
.answer-body p { margin: 0 0 .7em; }
.answer-body p:last-child { margin-bottom: 0; }
.answer-body ul, .answer-body ol { margin: 0 0 .7em; padding-left: 1.3em; }
.cite { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; margin: 0 2px; border-radius: 6px; background: var(--brand-soft); color: var(--brand-ink); font-size: 11.5px; font-weight: 700; text-decoration: none; vertical-align: 2px; }
.cite:hover { background: var(--brand); color: #fff; }
.answer-sources { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.answer-sources:empty { display: none; }
.src { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 6px 12px 6px 6px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; color: var(--ink-2); text-decoration: none; background: var(--surface); }
.src b { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--bg); font-size: 11px; }
.src span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.src:hover { border-color: var(--brand); color: var(--brand-ink); }
.answer-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--muted); }
.answer-actions button { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; font-weight: 600; }
.answer-actions button:hover { border-color: var(--brand); color: var(--brand-ink); }
.answer-actions button.picked { background: var(--brand); color: #fff; border-color: var(--brand); }
.answer-actions .ghost { margin-left: auto; }
.answer-err { color: #B91C1C; }
.typing { display: inline-flex; gap: 4px; padding: 6px 0; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); opacity: .3; animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 30% { opacity: 1; transform: translateY(-2px); } }

.results-title { font-size: 15px; color: var(--muted); font-weight: 600; margin-bottom: 12px; }
.results { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.results a { display: flex; gap: 14px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; text-decoration: none; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.results a:hover { border-color: color-mix(in oklab, var(--brand) 40%, var(--line)); box-shadow: var(--shadow); }
.results strong { display: block; font-size: 16px; }
.results small { display: block; color: var(--muted); font-size: 13.5px; margin-top: 3px; }
.empty-state { text-align: center; padding: 60px 0; }
.empty-state h1 { font-size: 28px; margin-bottom: 8px; }

/* ---------- Assistant panel ---------- */
.fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 50; width: 58px; height: 58px; border-radius: 20px; border: 0; color: #fff;
  display: grid; place-items: center; background: linear-gradient(135deg, var(--brand), color-mix(in oklab, var(--brand) 55%, #4F46E5));
  box-shadow: 0 14px 30px -10px var(--brand); transition: transform .2s;
}
.fab:hover { transform: translateY(-2px) scale(1.03); }
.fab .ic { width: 26px; height: 26px; }
body.assistant-open .fab { display: none; }
.assistant {
  position: fixed; right: 22px; bottom: 22px; z-index: 60; width: min(420px, calc(100vw - 24px)); height: min(640px, calc(100vh - 110px));
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow-lg);
  animation: pop .22s ease-out;
}
.assistant[hidden] { display: none; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.assistant-head { display: flex; align-items: center; gap: 10px; padding: 14px 12px 14px 16px; border-bottom: 1px solid var(--line); }
.assistant-head small { display: block; font-size: 12px; color: var(--muted); line-height: 1.2; }
.assistant-head strong { display: block; line-height: 1.3; }
.assistant-head .icon-btn:first-of-type { margin-left: auto; }
.assistant-body { flex: 1; overflow-y: auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 14px; }
.assistant-hello p { margin: 0 0 12px; font-size: 15px; color: var(--ink-2); }
.suggest { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.suggest button { padding: 8px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); font-size: 13.5px; text-align: left; }
.suggest button:hover { border-color: var(--brand); background: var(--brand-softer); }
.msg { max-width: 92%; font-size: 14.5px; line-height: 1.6; }
.msg.user { align-self: flex-end; padding: 10px 14px; border-radius: 18px 18px 4px 18px; background: var(--brand); color: #fff; white-space: pre-wrap; }
.msg.bot { align-self: flex-start; }
.msg.bot .answer-body { font-size: 14.5px; }
.msg.bot .answer-sources { margin-top: 10px; }
.assistant-input { display: flex; align-items: flex-end; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.assistant-input textarea { flex: 1; resize: none; max-height: 140px; min-height: 44px; padding: 11px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg); font: inherit; font-size: 14.5px; }
.assistant-input textarea:focus { outline: none; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 4px var(--brand-soft); }
.send { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border: 0; border-radius: 14px; background: var(--brand); color: #fff; }
.send:disabled { opacity: .5; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .b-cards.cols-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  :root { --top: 62px; }
  .brand { min-width: 0; }
  .brand-name { display: none; }
  .ask-btn span { display: none; }
  .ask-btn { width: 40px; padding: 0; justify-content: center; }
  .omni kbd { display: none; }
  .topbar { gap: 8px; padding: 0 10px; }
  .sidebar { position: fixed; left: 0; top: var(--top); bottom: 0; z-index: 45; height: auto; transform: translateX(-100%); transition: transform .25s ease; box-shadow: var(--shadow-lg); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: var(--top) 0 0; background: rgba(15, 27, 45, .35); z-index: 44; }
  .b-cards.cols-2, .b-cards.cols-3 { grid-template-columns: 1fr; }
  .hero { border-radius: 14px; }
  .hero-nav { display: none; }
}
@media (max-width: 560px) {
  .top-actions .ask-btn { display: none; }
  .hero { margin-bottom: 20px; }
  .hero-dots { bottom: 6px; padding: 4px 6px; }
  .apps-grid { grid-template-columns: 1fr; }
  .main { padding-top: 16px; }
  .page-ic:not(.sm):not(.lg) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  .topbar, .sidebar, .fab, .assistant, .hero { display: none !important; }
}

/* ---------- News ticker ---------- */
.ticker {
  position: sticky; top: var(--top); z-index: 35; display: flex; align-items: center; height: 42px;
  background: var(--ink); color: #E2E8F0; font-size: 14px; overflow: hidden;
}
.ticker-label {
  position: relative; z-index: 1; display: flex; align-items: center; gap: 8px; height: 100%; padding: 0 16px 0 20px; flex: none;
  background: var(--brand); color: #fff; font-weight: 700; font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase;
}
.ticker-label::after { content: ""; position: absolute; right: -12px; top: 0; border-style: solid; border-width: 21px 0 21px 12px; border-color: transparent transparent transparent var(--brand); }
.ticker-viewport { flex: 1; overflow: hidden; height: 100%; mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent); }
.ticker-track { display: flex; width: max-content; height: 100%; animation: ticker var(--speed, 60s) linear infinite; }
.ticker:hover .ticker-track, .ticker.paused .ticker-track, .ticker:focus-within .ticker-track { animation-play-state: paused; }
.ticker-group { display: flex; align-items: center; flex: none; }
.ticker-item { display: inline-flex; align-items: center; gap: 10px; padding: 0 28px; white-space: nowrap; position: relative; }
.ticker-item::after { content: ""; position: absolute; right: -3px; width: 5px; height: 5px; border-radius: 50%; background: color-mix(in oklab, var(--brand) 70%, #fff); }
.ticker-item a { color: #fff; text-decoration: none; font-weight: 500; }
.ticker-item a:hover { text-decoration: underline; text-underline-offset: 3px; }
.ticker-flag { padding: 2px 8px; border-radius: 6px; background: #DC2626; color: #fff; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; }
.ticker-item.urgent a, .ticker-item.urgent { color: #FECACA; }
.ticker-pause { flex: none; width: 42px; height: 42px; border: 0; background: transparent; color: #94A3B8; display: grid; place-items: center; }
.ticker-pause:hover { color: #fff; }
.ticker.paused .ticker-pause { color: var(--brand); }
@keyframes ticker { to { transform: translateX(-50%); } }
.ticker ~ .shell .sidebar { top: calc(var(--top) + 42px); height: calc(100vh - var(--top) - 42px); }
@media (max-width: 900px) {
  .ticker-label span { display: none; }
  .ticker-label { padding: 0 12px; }
  body.nav-open .ticker ~ .shell .sidebar { top: var(--top); }
}
@media (prefers-reduced-motion: reduce) {
  .ticker-viewport { overflow-x: auto; }
  .ticker-group[aria-hidden] { display: none; }
}

/* ---------- Carousels (app buttons + gallery) ---------- */
.rail-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.rail-nav { display: flex; gap: 8px; }
.rail-btn { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); transition: background .15s, color .15s, opacity .15s; }
.rail-btn:hover:not(:disabled) { background: var(--brand); color: #fff; border-color: var(--brand); }
.rail-btn:disabled { opacity: .35; cursor: default; }
.rail {
  --gap: 12px; --per: 4;
  display: grid; grid-auto-flow: column; gap: var(--gap);
  grid-auto-columns: calc((100% - (var(--per) - 1) * var(--gap)) / var(--per));
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none; padding: 2px 2px 6px; margin: -2px -2px 0;
}
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }
.apps-rail.rows-2 { grid-template-rows: repeat(2, auto); }
.apps-rail.rows-1 { grid-template-rows: auto; }
.media-rail { --gap: 16px; }
.media-rail.per-1 { --per: 1; } .media-rail.per-2 { --per: 2; } .media-rail.per-3 { --per: 3; }
.b-media { margin-bottom: 8px; }
.slide { margin: 0; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-sm); }
.slide-media { position: relative; aspect-ratio: 16 / 9; background: #0F1B2D; }
.slide-media img, .slide-media video, .slide-media iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.slide-media a { display: block; position: absolute; inset: 0; }
.slide-media a img { transition: transform .4s ease; }
.slide-media a:hover img { transform: scale(1.03); }
.slide figcaption { padding: 14px 16px 16px; }
.slide figcaption strong { display: block; font-size: 15.5px; }
.slide figcaption strong a { color: var(--ink); text-decoration: none; }
.slide figcaption strong a:hover { color: var(--brand-ink); }
.slide figcaption span { display: block; color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.page-home .blocks > .b-media:first-child { margin-top: 0; }
@media (max-width: 1200px) { .apps-rail { --per: 3; } }
@media (max-width: 900px) { .apps-rail { --per: 2; } .media-rail.per-3, .media-rail.per-2 { --per: 2; } }
@media (max-width: 560px) {
  .rail { --per: 1.15 !important; }
  .apps-rail { --per: 1.2 !important; }
  .rail-nav { display: none; }
}

/* ---------- Collapsed menu (desktop) ---------- */
.sidebar { transition: width .22s ease, padding .22s ease; }
.nav a span { transition: opacity .15s; white-space: nowrap; }
@media (min-width: 901px) {
  html.nav-collapsed .sidebar { width: 76px; padding-left: 12px; padding-right: 12px; overflow: visible; }
  html.nav-collapsed .nav a { justify-content: center; padding: 11px 0; }
  html.nav-collapsed .nav a span, html.nav-collapsed .nav-expand, html.nav-collapsed .subnav, html.nav-collapsed .sidebar-note { display: none; }
  html.nav-collapsed .nav a .ic { width: 22px; height: 22px; }
  html.nav-collapsed .nav a { position: relative; }
  html.nav-collapsed .nav a:hover::after, html.nav-collapsed .nav a:focus-visible::after {
    content: attr(data-tip); position: absolute; left: calc(100% + 12px); top: 50%; translate: 0 -50%; z-index: 60;
    padding: 6px 12px; border-radius: 8px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap;
    box-shadow: var(--shadow); pointer-events: none;
  }
}
