/* Talaboos creative hub design kit: tokens, base, app shell and shared components.
   Served by every section (localisation, winners, …); page stylesheets add only their own layouts. */
:root {
  --bg: #f6f5f2;
  --surface: #ffffff;
  --surface-2: #efeee9;
  --surface-3: #e4e2db;
  --line: #e6e4dd;
  --line-strong: #cfccc3;
  --text: #121214;
  --text-2: #3a3a40;
  --muted: #74737a;
  --accent: #4f46e5;
  --accent-ink: #ffffff;
  --accent-soft: #ecebfd;
  --live: #16a34a;
  --ok: #16a34a;
  --ok-soft: #e4f4e9;
  --warn: #b45309;
  --warn-soft: #fdf0dc;
  --bad: #d13a2a;
  --bad-soft: #fbe7e4;
  --glass: rgba(255, 255, 255, .9);
  --glass-ink: #17171a;
  --gold-ring: #e2b13c;
  --stage: #0b0b0d;
  --shadow-sm: 0 1px 2px rgba(16, 16, 20, .06);
  --shadow-md: 0 1px 2px rgba(16, 16, 20, .05), 0 12px 32px -14px rgba(16, 16, 20, .28);
  --shadow-lg: 0 40px 120px -30px rgba(0, 0, 0, .55);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --pc: #94a3b8;
  --gutter: 24px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d0e11; --surface: #16171b; --surface-2: #1e1f24; --surface-3: #2a2b31; --line: #25262c; --line-strong: #3a3b45;
    --text: #f3f3f5; --text-2: #cfcfd6; --muted: #8e8e98; --accent: #8f88ff; --accent-ink: #0d0e11;
    --accent-soft: rgba(143, 136, 255, .15); --live: #3ddc84; --ok: #3ddc84; --ok-soft: rgba(61, 220, 132, .13);
    --warn: #f5a524; --warn-soft: rgba(245, 165, 36, .14); --bad: #ff6b5b; --bad-soft: rgba(255, 107, 91, .14);
    --glass: rgba(16, 16, 20, .72); --glass-ink: #f5f5f7; --gold-ring: #b8902c;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5); --shadow-md: 0 1px 2px rgba(0, 0, 0, .4), 0 16px 36px -16px rgba(0, 0, 0, .8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d0e11; --surface: #16171b; --surface-2: #1e1f24; --surface-3: #2a2b31; --line: #25262c; --line-strong: #3a3b45;
  --text: #f3f3f5; --text-2: #cfcfd6; --muted: #8e8e98; --accent: #8f88ff; --accent-ink: #0d0e11;
  --accent-soft: rgba(143, 136, 255, .15); --live: #3ddc84; --ok: #3ddc84; --ok-soft: rgba(61, 220, 132, .13);
  --warn: #f5a524; --warn-soft: rgba(245, 165, 36, .14); --bad: #ff6b5b; --bad-soft: rgba(255, 107, 91, .14);
  --glass: rgba(16, 16, 20, .72); --glass-ink: #f5f5f7; --gold-ring: #b8902c;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5); --shadow-md: 0 1px 2px rgba(0, 0, 0, .4), 0 16px 36px -16px rgba(0, 0, 0, .8);
  color-scheme: dark;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
html.is-locked { overflow: hidden; }
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 400 14px/1.5 var(--font);
  font-feature-settings: "cv11", "ss01", "ss03";
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.icon {
  width: 18px; height: 18px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
::selection { background: color-mix(in srgb, var(--accent) 28%, transparent); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  font-weight: 550; white-space: nowrap; transition: background .15s, border-color .15s;
}
.btn:hover { border-color: var(--line-strong); background: var(--surface-2); }
.btn--primary { background: var(--text); border-color: var(--text); color: var(--bg); }
.btn--primary:hover { background: var(--text-2); border-color: var(--text-2); }
.linkbtn { border: 0; background: none; padding: 0; color: var(--accent); font-weight: 550; font-size: 13px; }
.linkbtn:hover { text-decoration: underline; text-underline-offset: 3px; }
.badge {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 99px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 650;
}
.iconbtn {
  display: inline-grid; place-items: center; width: 32px; height: 32px; flex: none;
  border: 0; border-radius: 9px; background: transparent; color: var(--muted); transition: background .15s, color .15s;
}
.iconbtn:hover { background: var(--surface-2); color: var(--text); }
.iconbtn.is-done { color: var(--live); }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 14px;
  height: 62px; padding: 0 var(--gutter);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: saturate(1.6) blur(16px);
  -webkit-backdrop-filter: saturate(1.6) blur(16px);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; flex: none; }
.brand__mark {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(145deg, #ffe9a8, #d39e12);
  color: #4a3404;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .65), inset 0 -1px 0 rgba(0, 0, 0, .12), 0 1px 3px rgba(0, 0, 0, .18);
}
.brand__mark .icon { width: 18px; height: 18px; stroke-width: 1.9; }
.sitenav { display: flex; gap: 2px; padding: 3px; border-radius: 11px; background: var(--surface-2); flex: none; }
.sitenav__link {
  height: 30px; display: inline-flex; align-items: center; padding: 0 12px; border-radius: 8px;
  color: var(--muted); text-decoration: none; font-weight: 550; font-size: 13.5px; white-space: nowrap; transition: color .15s;
}
.sitenav__link:hover { color: var(--text); }
.sitenav__link.is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }
.search {
  flex: 1; max-width: 620px; margin-left: 10px;
  display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px;
  border-radius: 11px; background: var(--surface); border: 1px solid var(--line); color: var(--muted);
  transition: border-color .15s, box-shadow .15s; cursor: text;
}
.search:hover { border-color: var(--line-strong); }
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--text); }
.search input::placeholder { color: var(--muted); }
.search input::-webkit-search-cancel-button { cursor: pointer; }
.search__hint {
  display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px;
  border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; font: 600 11px var(--mono); color: var(--muted);
}
.search:focus-within .search__hint { visibility: hidden; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px;
  border: 0; border-radius: 9px; background: var(--surface-2); color: var(--text-2);
  font-size: 13px; font-weight: 550; white-space: nowrap; transition: background .15s, color .15s, opacity .15s;
}
.chip:hover { background: var(--surface-3); color: var(--text); }
.chip.is-on { background: var(--text); color: var(--bg); }
.chip .count { font-size: 11.5px; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.chip.is-on .count { color: inherit; opacity: .6; }
.chip.is-zero:not(.is-on) { opacity: .42; }
.chips--compact .chip { height: 28px; padding: 0 9px; font-size: 12px; gap: 5px; }
.chips--compact .count { font-size: 11px; }
.chip .pdot { width: 8px; height: 8px; border-radius: 3px; background: var(--pc); flex: none; }
.chips--seg {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 3px;
  border-radius: 11px; background: var(--surface-2);
}
.chips--seg .chip { justify-content: center; height: 30px; padding: 0 6px; border-radius: 8px; background: transparent; color: var(--muted); }
.chips--seg .chip:hover { background: transparent; color: var(--text); }
.chips--seg .chip.is-on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }
.select { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); min-width: 0; }
.select select {
  height: 36px; width: 100%; padding: 0 28px 0 10px; border-radius: 9px; border: 0;
  background: var(--surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2374737a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E") no-repeat right 8px center / 16px;
  appearance: none; color: var(--text); font-size: 13px; font-weight: 550;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); display: inline-block; flex: none; }
.dot--live { position: relative; background: var(--live); }
.dot--live::after {
  content: ""; position: absolute; inset: -3px; border-radius: 50%;
  border: 2px solid var(--live); opacity: 0; animation: ping 2.4s ease-out infinite;
}
@keyframes ping { 0% { transform: scale(.6); opacity: .7; } 70%, 100% { transform: scale(1.6); opacity: 0; } }
.coin {
  width: 14px; height: 14px; border-radius: 50%; flex: none;
  background: linear-gradient(145deg, var(--c1, #fff), var(--c2, #999));
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .75), inset 0 -1px 1px rgba(0, 0, 0, .2), 0 0 0 1px rgba(0, 0, 0, .08);
}
.coin--gold { --c1: #fff0b3; --c2: #cf9a10; }
.coin--silver { --c1: #ffffff; --c2: #96a0ae; }
.coin--bronze { --c1: #ffd6b0; --c2: #ab5d27; }
/* Hero */
.hero {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 28px;
  margin-bottom: 26px;
}
.hero__text { max-width: 560px; }
.hero h1 { margin: 0; font-size: 30px; line-height: 1.12; font-weight: 700; letter-spacing: -.03em; }
.hero p { margin: 8px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; text-wrap: pretty; }
.hero__meta { font-size: 12.5px !important; margin-top: 6px !important; color: var(--muted); opacity: .9; }
.pulse { display: flex; flex-wrap: wrap; gap: 8px; }
.pulse__item {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 12px;
  border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text);
  font-variant-numeric: tabular-nums; white-space: nowrap; transition: border-color .15s, box-shadow .15s, transform .15s;
}
.pulse__item:hover { border-color: var(--line-strong); }
.pulse__item:active { transform: translateY(1px); }
.pulse__item b { font-weight: 700; font-size: 15px; letter-spacing: -.01em; }
.pulse__item span:last-child { color: var(--muted); font-size: 13px; font-weight: 500; }
.pulse__item .icon { width: 15px; height: 15px; color: var(--accent); }
.pulse__item.is-on { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }

/* Toolbar */
.toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap;
  padding-bottom: 16px; margin-bottom: 24px; border-bottom: 1px solid var(--line);
}
.toolbar__left { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; min-width: 0; }
.toolbar__right { display: flex; align-items: center; gap: 8px; }
.toolbar__count { margin: 0; color: var(--muted); white-space: nowrap; }
.toolbar__count strong { color: var(--text); font-weight: 650; font-variant-numeric: tabular-nums; }
.activef { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pill {
  display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 6px 0 11px;
  border: 0; border-radius: 99px; background: var(--accent-soft); color: var(--accent);
  font-size: 12.5px; font-weight: 600; max-width: 260px;
}
.pill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill .icon { width: 14px; height: 14px; stroke-width: 2.2; opacity: .75; }
.pill:hover .icon { opacity: 1; }
.activef .linkbtn { margin-left: 4px; color: var(--muted); }
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 11px; background: var(--surface-2); }
.seg__btn {
  height: 30px; padding: 0 12px; border: 0; border-radius: 8px; background: none;
  color: var(--muted); font-size: 13px; font-weight: 550; transition: color .15s;
}
.seg__btn:hover { color: var(--text); }
.seg__btn.is-on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }
.seg--icons .seg__btn { width: 34px; padding: 0; display: grid; place-items: center; }
.seg--icons .icon { width: 17px; height: 17px; }
mark { background: color-mix(in srgb, var(--accent) 24%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
/* Empty and toast */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 72px 16px; color: var(--muted); }
.empty__icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; background: var(--surface-2); color: var(--text-2); margin-bottom: 14px; }
.empty__icon .icon { width: 24px; height: 24px; }
.empty__title { font-size: 18px; font-weight: 650; color: var(--text); margin: 0 0 4px; }
.empty__text { margin: 0 0 18px; }
.toast {
  position: fixed; z-index: 100; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom));
  display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px 0 13px; border-radius: 99px;
  background: var(--text); color: var(--bg); font-weight: 550; box-shadow: var(--shadow-md);
  transform: translate(-50%, 16px); opacity: 0; pointer-events: none; transition: opacity .2s, transform .25s cubic-bezier(.2, .8, .2, 1);
}
.toast .icon { width: 17px; height: 17px; stroke-width: 2.4; color: var(--live); }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.985); } }
@keyframes fade { from { opacity: 0; } }
.state {
  display: inline-flex; align-items: center; gap: 7px; height: 24px; padding: 0 10px; border-radius: 99px;
  background: var(--surface-2); color: var(--muted); font-size: 11.5px; font-weight: 600;
}
.state--live { color: var(--live); background: color-mix(in srgb, var(--live) 12%, transparent); }
.lang {
  display: inline-grid; place-items: center; height: 20px; padding: 0 6px; border-radius: 5px;
  background: var(--surface-2); color: var(--text-2); font: 600 10.5px var(--mono); letter-spacing: .03em;
}
.detail__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; }
.stat { padding: 12px 14px; border-radius: 13px; background: var(--surface-2); min-width: 0; }
.stat dt { font-size: 12px; color: var(--muted); font-weight: 500; }
.stat dd { margin: 2px 0 0; font-size: 19px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat .stat__note { margin-top: 3px; font-size: 11.5px; font-weight: 550; letter-spacing: 0; color: var(--muted); white-space: normal; }
.stat .stat__note.is-good { color: var(--live); }
.stat .stat__note.is-bad { color: #e5533d; }
.stat--main { background: var(--text); color: var(--bg); }
.stat--main dt { color: color-mix(in srgb, var(--bg) 62%, transparent); }
.extlink {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 9px;
  background: var(--surface-2); color: var(--text-2); text-decoration: none; font-size: 13px; font-weight: 550; transition: background .15s, color .15s;
}
.extlink:hover { background: var(--surface-3); color: var(--text); }
.extlink .icon { width: 15px; height: 15px; }
button.extlink { border: 0; }
.extlink.is-done { color: var(--live); background: color-mix(in srgb, var(--live) 12%, transparent); }
.textblock { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.textblock__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 6px 6px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.textblock__head h3 { margin: 0; font-size: 12.5px; font-weight: 650; }
.textblock__head .muted { color: var(--muted); font-weight: 500; }
.textblock__body { margin: 0; padding: 12px 14px; max-height: 200px; overflow-y: auto; white-space: pre-wrap; font-size: 13.5px; line-height: 1.55; color: var(--text-2); }
.textblock__body.is-empty { color: var(--muted); font-style: italic; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 9px 18px; margin: 0; font-size: 13px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; min-width: 0; color: var(--text-2); font-weight: 500; }

/* Phone */
@media (max-width: 900px) {
  .topbar { flex-wrap: wrap; height: auto; gap: 10px; padding: 10px var(--gutter) 12px; }
  .search { order: 3; flex-basis: 100%; max-width: none; margin: 0; }
  .search__hint { display: none; }
  .hero { margin-bottom: 18px; }
  .hero h1 { font-size: 24px; }
  .hero p { font-size: 13.5px; }
  .pulse { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)); padding: 2px var(--gutter); }
  .pulse::-webkit-scrollbar { display: none; }
  .pulse__item { height: 38px; }
  .toolbar { margin-bottom: 18px; }
  .toolbar__left { flex-basis: 100%; order: 2; }
  .toolbar__right { flex-basis: 100%; justify-content: space-between; }
  .toolbar__count { order: -1; }
}
@media (max-width: 560px) {
  .sitenav__link { padding: 0 10px; font-size: 13px; }
  .seg__btn { padding: 0 10px; }
  .hero p { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; animation-iteration-count: 1 !important; }
}

/* App shell (rendered by shell.js into <header class="topbar" data-section>) */
.brand { gap: 10px; align-items: center; text-decoration: none; color: var(--text); }
.brand__mark {
  background: linear-gradient(145deg, #7c6dff 0%, #4f46e5 55%, #3a2fc4 100%); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 -1px 0 rgba(0, 0, 0, .18), 0 2px 6px -1px rgba(79, 70, 229, .45);
}
.brand__mark .icon { width: 18px; height: 18px; stroke-width: 2; }
.brand__name { font-size: 15px; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; }
.topbar__slot { flex: 1; display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar__slot .search { margin-left: 4px; }
.user { position: relative; margin-left: auto; display: flex; align-items: center; flex: none; }
.user__button {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 6px 0 4px; border: 0; border-radius: 99px;
  background: transparent; color: var(--text-2); transition: background .15s;
}
.user__button:hover, .user__button[aria-expanded="true"] { background: var(--surface-2); }
.user__avatar {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; flex: none;
  background: var(--surface-3); color: var(--text); font-size: 12px; font-weight: 700; text-transform: uppercase;
}
.user__button .icon { width: 15px; height: 15px; color: var(--muted); }
.user__menu {
  position: absolute; z-index: 60; top: calc(100% + 8px); right: 0; width: 260px; padding: 6px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-md);
  animation: pop .16s cubic-bezier(.2, .8, .2, 1);
}
.user__who { padding: 10px 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.user__who b { display: block; font-size: 13.5px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user__who span { font-size: 12px; color: var(--muted); }
.user__label { padding: 6px 10px 6px; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.user__theme { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 3px; margin: 0 4px 6px; border-radius: 10px; background: var(--surface-2); }
.user__theme button { height: 28px; border: 0; border-radius: 7px; background: none; color: var(--muted); font-size: 12.5px; font-weight: 550; }
.user__theme button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }
.user__item {
  display: flex; align-items: center; gap: 10px; width: 100%; height: 36px; padding: 0 10px; border: 0; border-radius: 9px;
  background: none; color: var(--text); font-size: 13.5px; font-weight: 550; text-align: left; text-decoration: none;
}
.user__item:hover { background: var(--surface-2); }
.user__item .icon { width: 16px; height: 16px; color: var(--muted); }

.user__kbd { margin-left: auto; }
kbd {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px;
  border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; background: var(--surface);
  color: var(--muted); font: 600 10.5px var(--mono); line-height: 1;
}

/* Global search button, palette (Ctrl/Cmd+K) and shortcut sheet */
.hubsearch {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 8px 0 11px; flex: none;
  border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--muted);
  font-size: 13px; font-weight: 550; transition: border-color .15s, color .15s;
}
.hubsearch:hover { border-color: var(--line-strong); color: var(--text); }
.hubsearch .icon { width: 16px; height: 16px; }
.cmdk, .keysheet {
  padding: 0; border: 0; border-radius: 18px; background: var(--surface); color: var(--text);
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.cmdk { width: min(640px, calc(100vw - 24px)); margin: 12vh auto auto; max-height: min(70vh, 620px); }
.cmdk[open], .keysheet[open] { display: flex; flex-direction: column; animation: pop .16s cubic-bezier(.2, .8, .2, 1); }
.cmdk::backdrop, .keysheet::backdrop { background: rgba(8, 8, 10, .45); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.cmdk__field { display: flex; align-items: center; gap: 12px; padding: 0 16px; border-bottom: 1px solid var(--line); color: var(--muted); }
.cmdk__field .icon { width: 19px; height: 19px; }
.cmdk__input { flex: 1; min-width: 0; height: 58px; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 16px; }
.cmdk__input::placeholder { color: var(--muted); }
.cmdk__input::-webkit-search-cancel-button { display: none; }
.cmdk__list { flex: 1; min-height: 0; overflow-y: auto; padding: 6px; overscroll-behavior: contain; }
.cmdk__group { padding: 10px 10px 6px; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.cmdk__state { padding: 14px 12px; font-size: 13px; color: var(--muted); }
.cmdk__state:empty { display: none; }
.cmdk__item {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px;
  color: var(--text); text-decoration: none; scroll-margin: 6px;
}
.cmdk__item.is-active { background: var(--accent-soft); }
.cmdk__item .icon { width: 16px; height: 16px; color: var(--muted); opacity: 0; flex: none; margin-left: auto; }
.cmdk__item.is-active .icon { opacity: 1; color: var(--accent); }
.cmdk__text { display: flex; flex-direction: column; min-width: 0; }
.cmdk__text b { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmdk__text span { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmdk__foot { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.cmdk__foot span { display: inline-flex; align-items: center; gap: 4px; }
.keysheet { width: min(460px, calc(100vw - 24px)); padding: 6px 20px 20px; }
.keysheet__head { display: flex; align-items: center; justify-content: space-between; padding: 12px 0 4px; }
.keysheet__head h2 { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -.02em; }
.keysheet__head .iconbtn { font-size: 20px; line-height: 1; }
.keysheet__group { margin: 14px 0 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
.keysheet__list { display: grid; grid-template-columns: 104px 1fr; gap: 8px 16px; margin: 0; align-items: center; font-size: 13.5px; }
.keysheet__list dt { display: flex; gap: 4px; }
.keysheet__list dd { margin: 0; color: var(--text-2); }
.toast__action {
  margin-left: 6px; height: 28px; padding: 0 10px; border: 0; border-radius: 99px; pointer-events: auto;
  background: color-mix(in srgb, var(--bg) 18%, transparent); color: var(--bg); font-size: 13px; font-weight: 650;
}
.toast--alert .icon { color: var(--bad); }
.toast--progress .icon { color: inherit; opacity: .75; }
.toast__action:hover { background: color-mix(in srgb, var(--bg) 28%, transparent); }

/* Shared building blocks */
.page { max-width: 1760px; margin: 0 auto; padding: 28px var(--gutter) 64px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; min-width: 0; }
.tag {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 99px;
  background: var(--surface-2); color: var(--text-2); font-size: 12px; font-weight: 600; white-space: nowrap;
}
.tag--ok { background: var(--ok-soft); color: var(--ok); }
.tag--warn { background: var(--warn-soft); color: var(--warn); }
.tag--bad { background: var(--bad-soft); color: var(--bad); }
.tag--accent { background: var(--accent-soft); color: var(--accent); }
.tag .icon { width: 13px; height: 13px; stroke-width: 2.2; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.input, .textarea {
  width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  color: var(--text); font: inherit; font-size: 14px; font-weight: 400; transition: border-color .15s, box-shadow .15s;
}
.input { height: 40px; padding: 0 12px; }
.textarea { min-height: 84px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.input:hover, .textarea:hover { border-color: var(--line-strong); }
.input:focus, .textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.input::placeholder, .textarea::placeholder { color: var(--muted); }
.btn--accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn--accent:hover { background: color-mix(in srgb, var(--accent) 88%, #000); border-color: transparent; }
.btn--sm { height: 32px; padding: 0 12px; border-radius: 9px; font-size: 13px; }
.btn:disabled { opacity: .5; }
.btn .icon { width: 16px; height: 16px; }
.notice {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px;
  background: var(--surface-2); color: var(--text-2); font-size: 13.5px; line-height: 1.5;
}
.notice .icon { margin-top: 1px; width: 17px; height: 17px; }
.notice--warn { background: var(--warn-soft); color: color-mix(in srgb, var(--warn) 70%, var(--text)); }
.notice--warn .icon { color: var(--warn); }
.notice--bad { background: var(--bad-soft); color: color-mix(in srgb, var(--bad) 75%, var(--text)); }
.notice--bad .icon { color: var(--bad); }
.notice--ok { background: var(--ok-soft); color: color-mix(in srgb, var(--ok) 70%, var(--text)); }
.notice--ok .icon { color: var(--ok); }
.notice p { margin: 0; }
.notice ul { margin: 6px 0 0; padding-left: 18px; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--surface-3); border-top-color: var(--accent); animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1200px) { .brand__name { display: none; } .hubsearch__label { display: none; } }
@media (hover: none) { .hubsearch__kbd { display: none; } }
@media (max-width: 900px) {
  .user__button { padding: 0; }
  .user__button .icon { display: none; }
  /* Row 1: brand, sections (scroll sideways when they do not fit), user; row 2: the page slot. */
  .sitenav { flex: 0 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .sitenav::-webkit-scrollbar { display: none; }
  .hubsearch { order: 2; width: 38px; padding: 0; justify-content: center; margin-left: auto; }
  .hubsearch__kbd { display: none; }
  .user { order: 2; }
  .cmdk { margin-top: 8px; max-height: 80vh; }
  .topbar__slot { order: 3; flex-basis: 100%; }
  .topbar__slot .search { order: 0; flex: 1 1 auto; flex-basis: auto; margin: 0; }
}
