/* Montserrat (SIL Open Font License 1.1, assets/fonts/OFL-LICENSE.txt),
   served from this site so no visitor's IP address goes to Google. */
@font-face {
  font-family: "Montserrat"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("/assets/fonts/montserrat-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Montserrat"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("/assets/fonts/montserrat-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
#emptyState { display: none; }
:root {
  /* Contrast: cards (surface) stand clearly off the page (bg); muted and
     status text meet WCAG AA (4.5:1) on surface, surface-2 and their tints. */
  --bg: #e3e6eb;
  --surface: #ffffff;
  --surface-2: #e9ecf0;
  --border: #c9ced6;
  --text: #14151a;
  --text-muted: #454a58;
  --brand-black: #000000;
  --brand-orange: #FF5F00;
  --on-accent: #ffffff;         /* text on a status-colour fill (dark in dark mode, where they're light) */
  --brand-orange-soft: #fff1e8;
  --green: #126a3f;
  --green-soft: #e3f5ec;
  --red: #a61f15;
  --red-soft: #fdecea;
  --amber: #8a4b00;
  --amber-soft: #fff1dc;
  --blue: #1f5799;
  --blue-soft: #e6effa;
  --gray-soft: #e9ecf0;
  --shadow: 0 1px 2px rgba(20,21,26,0.06), 0 1px 8px rgba(20,21,26,0.04);
  --radius: 10px;
  --logo: url("logo-black.png");
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #050608;
    --surface: #1b1c23;
    --surface-2: #22242c;
    --border: #3a3d48;
    --text: #f1f2f5;
    --text-muted: #b3b6c6;
  --on-accent: #08090b;
    --on-accent: #08090b;
    --brand-orange-soft: #2a1a10;
    --green: #4ade91;
    --green-soft: #10281c;
    --red: #ff8a80;
    --red-soft: #2c1614;
    --amber: #ffb020;
    --amber-soft: #2b2008;
    --blue: #7db8f0;
    --blue-soft: #16283a;
    --gray-soft: #23252c;
    --shadow: 0 1px 2px rgba(0,0,0,0.4), 0 1px 8px rgba(0,0,0,0.3);
    --logo: url("logo-white.png");
  }
}
:root[data-theme="dark"] {
  --bg: #050608;
  --surface: #1b1c23;
  --surface-2: #22242c;
  --border: #3a3d48;
  --text: #f1f2f5;
  --text-muted: #b3b6c6;
  --on-accent: #08090b;
  --brand-orange-soft: #2a1a10;
  --green: #4ade91;
  --green-soft: #10281c;
  --red: #ff8a80;
  --red-soft: #2c1614;
  --amber: #ffb020;
  --amber-soft: #2b2008;
  --blue: #7db8f0;
  --blue-soft: #16283a;
  --gray-soft: #23252c;
  --shadow: 0 1px 2px rgba(0,0,0,0.4), 0 1px 8px rgba(0,0,0,0.3);
  --logo: url("logo-white.png");
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
}
a { color: var(--brand-orange); }
[hidden] { display: none !important; }

/* ---- Top bar: light, sticky, frosted. Brand + client switcher on the
   left, main nav in the middle, account menu on the right. ---- */
header.topbar {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: 1600px; margin: 0 auto; padding: 0 20px; height: 60px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
}
.topbar-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.topbar-right { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
/* Fixed columns, so the right side stays right even when the nav is hidden. */
.topbar-left { grid-column: 1; }
.topnav { grid-column: 2; }
.topbar-right { grid-column: 3; }

.brand { display: flex; align-items: center; gap: 10px; }
button.brand-home {
  background: none; border: none; padding: 0; margin: 0; cursor: pointer;
  color: inherit; font: inherit; text-align: left;
}
/* Pragmatic Solutions icon: black on light, white on dark (--logo). */
.brand .mark {
  width: 34px; height: 30px; background: var(--logo) center / contain no-repeat; flex-shrink: 0;
}
header.topbar .brand .mark { width: 26px; height: 23px; }
.brand-name { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; color: var(--text); }
.brand h1 { font-size: 17px; margin: 0; font-weight: 600; letter-spacing: 0.2px; }
.brand .sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.topbar-divider { width: 1px; height: 22px; background: var(--border); flex-shrink: 0; }

/* Client switcher */
.client-switch {
  display: inline-flex; align-items: center; gap: 8px; min-width: 0; max-width: 280px;
  padding: 5px 10px 5px 6px; border: 1px solid transparent; border-radius: 999px;
  background: transparent; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text);
  transition: background 0.15s, border-color 0.15s;
}
.client-switch:hover, .client-switch[aria-expanded="true"] { background: var(--surface-2); border-color: var(--border); }
.client-switch:disabled { cursor: default; background: transparent; border-color: transparent; }
.client-switch:disabled .chev { display: none; }
.client-switch-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.client-switch-logo .client-logo { width: 24px; height: 24px; font-size: 10px; }
/* The picked brand, inside the client switcher: "Client / Brand". */
.client-switch-brand:not([hidden]) { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.client-switch-brand .client-logo { width: 20px; height: 20px; font-size: 8px; }
.client-switch-sep { color: var(--text-muted); font-weight: 400; }
.client-switch-sub { color: var(--text-muted); font-weight: 500; }
.client-switch { max-width: 420px; }
/* Tracker: Brand column. */
.brand-cell { display: inline-flex; align-items: center; gap: 6px; }
.brand-cell .client-logo { width: 18px; height: 18px; font-size: 8px; }
.muted-cell { color: var(--text-muted); }
/* "All brands" in the brand switcher: a grid icon in place of a logo. */
.client-logo.all-brands svg { width: 60%; height: 60%; fill: none; stroke: var(--text-muted); stroke-width: 1.7; }
.chev {
  width: 7px; height: 7px; flex-shrink: 0; margin: -3px 2px 0 2px;
  border-right: 1.5px solid var(--text-muted); border-bottom: 1.5px solid var(--text-muted); transform: rotate(45deg);
}

/* Raise Incident (top bar) */
.incident-btn {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 14px 0 11px; border-radius: 999px;
  border: 1px solid transparent; background: var(--red); color: var(--on-accent); font-size: 13px; font-weight: 700; cursor: pointer;
  box-shadow: 0 1px 2px rgba(180,35,24,0.25); transition: filter 0.15s, box-shadow 0.15s, transform 0.15s;
}
.incident-btn:hover { filter: brightness(1.08); box-shadow: 0 4px 12px rgba(180,35,24,0.3); transform: translateY(-1px); }
.incident-btn:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.incident-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 640px) { .incident-btn span { display: none; } .incident-btn { padding: 0 9px; } }

/* Raise Incident modal */
.incident-modal { max-width: 760px; }
/* Raise Incident: a stepper under the header, steps that slide in, and a
   body that keeps a steady height so the dialog doesn't jump between steps. */
.inc-stepper { display: flex; list-style: none; margin: 0; padding: 12px 18px; gap: 6px; border-bottom: 1px solid var(--border); background: var(--surface-2); counter-reset: none; }
.inc-stepper li { flex: 1; display: flex; align-items: center; min-width: 0; }
.inc-stepper li:not(:last-child)::after { content: ""; flex: 1; height: 2px; margin: 0 8px; border-radius: 2px; background: var(--border); transition: background 0.2s; }
.inc-stepper li.done:not(:last-child)::after { background: var(--red); }
.inc-stepper li:last-child { flex: 0 0 auto; }
.inc-stepper button { display: inline-flex; align-items: center; gap: 8px; padding: 0; border: 0; background: none; font: inherit; color: var(--text-muted); cursor: pointer; white-space: nowrap; }
.inc-stepper button:disabled { cursor: default; opacity: 0.7; }
.inc-step-num {
  width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; border: 2px solid var(--border); background: var(--surface); color: var(--text-muted);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.inc-step-name { font-size: 12.5px; font-weight: 600; }
.inc-stepper li.current button { color: var(--text); }
.inc-stepper li.current .inc-step-num { border-color: var(--red); color: var(--red); box-shadow: 0 0 0 4px color-mix(in srgb, var(--red) 15%, transparent); }
.inc-stepper li.done button { color: var(--text); }
.inc-stepper li.done .inc-step-num { background: var(--red); border-color: var(--red); color: var(--on-accent); font-size: 0; }
.inc-stepper li.done .inc-step-num::before { content: "✓"; font-size: 12px; }
.inc-body { height: min(440px, calc(100vh - 230px)); overflow-y: auto; }
.inc-body .row-form-section:first-child { border-top: 0; }
.inc-foot .inc-foot-spacer { flex: 1; }
.inc-review { display: flex; flex-direction: column; gap: 10px; padding-bottom: 8px; }
.inc-review-group { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; background: var(--surface-2); }
.inc-review-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.inc-review-head h4 { margin: 0; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.inc-review-edit { font-size: 12px; text-decoration: none; }
.inc-review-list { display: grid; grid-template-columns: 150px 1fr; gap: 4px 12px; margin: 0; font-size: 13px; }
.inc-review-list dt { color: var(--text-muted); }
.inc-review-list dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-weight: 500; }
.inc-review-list dd.empty { color: var(--text-muted); font-weight: 400; }
.inc-review-list dd[class*="sev-"] { font-weight: 700; color: var(--sev, var(--text)); }
@media (max-width: 640px) {
  .inc-step-name { display: none; }
  .inc-stepper li.current .inc-step-name { display: inline; }
  .inc-review-list { grid-template-columns: 1fr; }
  .inc-body { height: auto; }
}
/* Raise Incident → Steps to reproduce: one numbered row per step. */
.repro-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.repro-step { display: flex; align-items: center; gap: 8px; }
.repro-num {
  width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--on-accent); background: var(--red);
}
.row-field .repro-input { flex: 1; min-width: 0; }
.repro-actions { display: inline-flex; gap: 2px; opacity: 0.35; transition: opacity 0.15s; }
.repro-step:hover .repro-actions, .repro-step:focus-within .repro-actions { opacity: 1; }
.repro-btn {
  width: 26px; height: 26px; padding: 0; border-radius: 7px; border: 1px solid transparent; background: none;
  color: var(--text-muted); font-size: 14px; line-height: 1; cursor: pointer;
}
.repro-btn:hover:not(:disabled) { background: var(--surface-2); border-color: var(--border); color: var(--text); }
.repro-btn.remove:hover:not(:disabled) { color: var(--red); background: var(--red-soft); border-color: transparent; }
.repro-btn:disabled { opacity: 0.3; cursor: default; }
.repro-add {
  align-self: flex-start; margin: 6px 0 0 32px; padding: 5px 12px; border-radius: 999px; font: inherit; font-size: 12.5px; font-weight: 600;
  border: 1px dashed var(--border); background: transparent; color: var(--text-muted); cursor: pointer;
}
.repro-add:hover:not(:disabled) { border-color: var(--red); color: var(--red); background: var(--red-soft); }
.repro-add:disabled { opacity: 0.5; cursor: default; }
.inc-review-steps { margin: 0; padding-left: 18px; }
.inc-review-steps li + li { margin-top: 2px; }

/* Raise Incident → Impact: a Yes / No / Not sure per area; Yes opens a follow-up. */
.impact-list { display: flex; flex-direction: column; gap: 8px; padding-bottom: 6px; }
.impact-row {
  display: grid; grid-template-columns: 190px auto 1fr; align-items: center; gap: 8px 14px;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2);
}
.impact-q { font-size: 13px; font-weight: 600; }
.impact-seg { display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); }
.impact-seg label { position: relative; cursor: pointer; }
.impact-seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.impact-seg span { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--text-muted); transition: background 0.15s, color 0.15s; }
.impact-seg label:hover span { color: var(--text); }
.impact-seg input:focus-visible + span { box-shadow: 0 0 0 2px var(--brand-orange); }
.impact-seg input[value="yes"]:checked + span { background: var(--red); color: var(--on-accent); }
.impact-seg input[value="no"]:checked + span { background: var(--green); color: var(--on-accent); }
.impact-seg input[value="not_sure"]:checked + span { background: var(--amber); color: var(--on-accent); }
.impact-follow { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 4px; }
.impact-follow input { padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); font: inherit; color: var(--text); }
.impact-follow input:focus { outline: none; border-color: var(--brand-orange); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-orange) 18%, transparent); }
.impact-money { display: flex; gap: 6px; }
.impact-money select { flex: 0 0 90px; }
.impact-money input { flex: 1; min-width: 0; }
@media (max-width: 640px) { .impact-row { grid-template-columns: 1fr; } }
.incident-icon { background: var(--red-soft); }
.incident-icon svg { stroke: var(--red); }
.sev-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.sev { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 10px 11px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; background: var(--surface); transition: border-color 0.15s, box-shadow 0.15s, background 0.15s; }
.sev input { position: absolute; opacity: 0; pointer-events: none; }
.sev-name { font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.sev-name::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--sev); }
.sev-desc { font-size: 11.5px; color: var(--text-muted); line-height: 1.35; }
.sev:hover { border-color: color-mix(in srgb, var(--sev) 50%, var(--border)); }
.sev:has(input:checked) { border-color: var(--sev); background: color-mix(in srgb, var(--sev) 8%, var(--surface)); box-shadow: 0 0 0 1px var(--sev); }
.sev:has(input:focus-visible) { outline: 2px solid var(--sev); outline-offset: 2px; }
.sev-critical { --sev: var(--red); }
.sev-high { --sev: var(--brand-orange); }
.sev-medium { --sev: var(--amber); }
.sev-low { --sev: var(--blue); }
.row-field select.field-select { width: 100%; height: 32px; border-radius: 7px; padding-left: 9px; font-weight: 500; font-size: 13px; }
.row-field input[type="datetime-local"] { width: 100%; padding: 5px 9px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); font: inherit; font-size: 13px; }
.btn.danger-solid { background: var(--red); border-color: var(--red); color: var(--on-accent); font-weight: 700; }
.btn.danger-solid:hover:not(:disabled) { filter: brightness(1.08); }
@media (max-width: 760px) { .sev-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Main nav */
.topnav { display: flex; gap: 2px; padding: 3px; background: var(--surface-2); border-radius: 999px; border: 1px solid var(--border); }
.topnav-link {
  border: none; background: transparent; cursor: pointer; font-size: 13px; font-weight: 600;
  color: var(--text-muted); padding: 5px 16px; border-radius: 999px; transition: background 0.15s, color 0.15s;
}
.topnav-link:hover { color: var(--text); }
.topnav-link.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(20,21,26,0.08), 0 0 0 1px var(--border); }

/* Account */
.avatar-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px 3px 3px;
  border: 1px solid transparent; border-radius: 999px; background: transparent; cursor: pointer;
}
.avatar-btn:hover, .avatar-btn[aria-expanded="true"] { background: var(--surface-2); border-color: var(--border); }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand-orange); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: 0.02em;
}

/* Dropdown menus */
.menu-wrap { position: relative; min-width: 0; }
.menu {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 240px; max-height: 60vh; overflow-y: auto; z-index: 40;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 6px;
  box-shadow: 0 10px 30px rgba(20,21,26,0.12), 0 2px 6px rgba(20,21,26,0.06);
}
.menu-right { left: auto; right: 0; }
.menu-header { padding: 8px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.menu-email { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.role-chip {
  display: inline-block; margin-top: 4px; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 600;
  text-transform: capitalize; background: var(--brand-orange-soft); color: var(--brand-orange);
}
.menu-section {
  padding: 8px 10px 4px; font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-muted);
}
.menu-section-split { border-top: 1px solid var(--border); margin-top: 4px; padding-top: 10px; }
.menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: none; border-radius: 8px;
  background: transparent; cursor: pointer; font-size: 13px; color: var(--text); text-align: left;
}
.menu-item:hover, .menu-item:focus-visible { background: var(--surface-2); outline: none; }
.menu-item .client-logo { width: 26px; height: 26px; font-size: 10px; }
.menu-item .menu-item-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-item.current { font-weight: 600; }
/* Client menu: each client's brands, indented under it. */
.menu-item.menu-sub-item { padding-left: 30px; font-size: 12.5px; }
.menu-item.menu-sub-item .client-logo { width: 20px; height: 20px; font-size: 8px; }
.menu-item-hint { font-size: 11px; font-weight: 500; color: var(--text-muted); white-space: nowrap; }
.menu-item.current::after {
  content: ""; width: 5px; height: 9px; margin-right: 4px; flex-shrink: 0;
  border-right: 2px solid var(--brand-orange); border-bottom: 2px solid var(--brand-orange); transform: rotate(45deg);
}

.icon-btn { font-size: 17px; padding: 6px 10px; line-height: 1; }

button, select, input[type="text"], input[type="email"], input[type="url"], input[type="number"], textarea {
  font: inherit;
  color: var(--text);
}
.btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.btn:hover { border-color: var(--brand-orange); }
.btn:disabled { opacity: 0.65; cursor: not-allowed; }
.btn.primary { background: var(--brand-orange); border-color: var(--brand-orange); color: #fff; font-weight: 600; }
.btn.primary:hover { filter: brightness(1.05); }
.btn.ghost { background: transparent; border-color: #3a3c46; color: #fff; }
.btn.ghost:hover { border-color: var(--brand-orange); }
.login-card .btn.ghost { color: var(--text); border-color: var(--border); }
.login-card .btn.ghost:hover { border-color: var(--brand-orange); color: var(--brand-orange); }
.btn.danger { color: var(--red); border-color: var(--red-soft); }
.btn.danger:hover { border-color: var(--red); }

main { padding: 18px 20px 60px; max-width: 1600px; margin: 0 auto; }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.stat-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow);
  font: inherit; color: inherit; text-align: left; cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.stat-card:hover { border-color: color-mix(in srgb, var(--brand-orange) 45%, var(--border)); transform: translateY(-1px); }
.stat-card:focus-visible { outline: 2px solid var(--brand-orange); outline-offset: 2px; }
.stat-card.active { border-color: var(--brand-orange); box-shadow: 0 0 0 1px var(--brand-orange), var(--shadow); }
.stat-card .num { font-size: 24px; font-weight: 700; line-height: 1.1; }
.stat-card .label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.stat-card.accent-green .num { color: var(--green); }
.stat-card.accent-red .num { color: var(--red); }
.stat-card.accent-orange .num { color: var(--brand-orange); }

.toolbar {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 12px; display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; align-items: center;
}
.toolbar input[type="text"] {
  flex: 1 1 220px; min-width: 160px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2);
}
.toolbar select { padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); }
.toolbar .spacer { flex: 1 1 auto; }
.toolbar .count { font-size: 12px; color: var(--text-muted); white-space: nowrap; }

.colmenu-wrap { position: relative; }
.colmenu {
  display: none; position: absolute; right: 0; top: calc(100% + 6px);
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow);
  padding: 10px; z-index: 20; max-height: 320px; overflow-y: auto; min-width: 220px;
}
.colmenu.open { display: block; }
.colmenu label { display: flex; align-items: center; gap: 8px; padding: 4px 2px; font-size: 13px; cursor: pointer; }

.table-wrap {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: auto; max-height: 68vh;
}
table { border-collapse: collapse; width: 100%; table-layout: fixed; }
thead th {
  position: sticky; top: 0; z-index: 2; background: var(--surface-2); text-align: left; padding: 10px 12px;
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-muted);
  border-bottom: 1px solid var(--border); cursor: pointer; white-space: nowrap; user-select: none;
}
thead th:hover { color: var(--text); }
thead th .arrow { font-size: 10px; margin-left: 4px; opacity: 0.6; }
tbody td { padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: top; overflow-wrap: anywhere; }
tbody tr:hover { background: var(--surface-2); }
tbody tr.editable-row { cursor: pointer; }
td.wrap-cell { white-space: pre-wrap; word-break: break-word; }
td.nowrap-cell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill.green { background: var(--green-soft); color: var(--green); }
.pill.red { background: var(--red-soft); color: var(--red); }
.pill.gray { background: var(--gray-soft); color: var(--text-muted); }
.pill.orange { background: var(--brand-orange-soft); color: var(--brand-orange); }

.comment-cell { white-space: normal; }
.comment-text { display: block; white-space: pre-wrap; word-break: break-word; }
.comment-text.truncated {
  max-height: 3.2em; overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
}
.expand-link { font-size: 11px; color: var(--brand-orange); cursor: pointer; margin-top: 2px; display: inline-block; }

.empty-state { padding: 40px 20px; text-align: center; color: var(--text-muted); }

footer {
  max-width: 1600px; margin: 14px auto 0; padding: 0 20px 20px; font-size: 12px; color: var(--text-muted);
  text-align: center;
}

/* ---- Toast notifications (feedback after an action) ---- */
.toasts {
  position: fixed; right: 20px; bottom: 20px; z-index: 300; display: flex; flex-direction: column; gap: 8px;
  align-items: flex-end; pointer-events: none; max-width: calc(100vw - 32px);
}
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 10px; min-width: 260px; max-width: 420px;
  padding: 10px 10px 10px 12px; border-radius: 12px; background: var(--text); color: var(--surface);
  box-shadow: 0 12px 32px rgba(10,10,12,0.25), 0 2px 6px rgba(10,10,12,0.12); font-size: 13px; line-height: 1.4;
  animation: toast-in 0.22s ease-out;
}
.toast.leaving { animation: toast-out 0.2s ease-in forwards; }
.toast-icon {
  width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; color: var(--on-accent); background: var(--green);
}
.toast-error .toast-icon { background: var(--red); }
.toast-text { flex: 1; min-width: 0; }
.toast-close { border: none; background: transparent; color: inherit; opacity: 0.6; font-size: 16px; line-height: 1; cursor: pointer; padding: 2px 4px; border-radius: 6px; }
.toast-close:hover { opacity: 1; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(6px); } }
@media (max-width: 640px) { .toasts { left: 16px; right: 16px; bottom: 16px; align-items: stretch; } .toast { max-width: none; } }
@media (prefers-reduced-motion: reduce) { .toast, .toast.leaving { animation: none; } }

/* ---- Integrations ---- */
.page-head { margin: 4px 0 14px; }
.page-head h2 { margin: 0 0 4px; font-size: 20px; letter-spacing: -0.01em; }
.page-head p { margin: 0; color: var(--text-muted); font-size: 13px; }
.int-panel { display: flex; flex-direction: column; gap: 14px; }
/* The lists on the left, the request form beside them (sticky), like Admin → Clients. */
.int-panel.int-layout:not([hidden]) { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.int-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.int-side { position: sticky; top: calc(var(--topbar-h, 61px) + 16px); }
.int-side .int-request-row { grid-template-columns: 1fr; }
.int-side .int-request-foot .btn { width: 100%; justify-content: center; }
@media (max-width: 900px) {
  .int-panel.int-layout:not([hidden]) { grid-template-columns: 1fr; }
  .int-side { position: static; }
}
.int-section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.int-section-head { margin-bottom: 12px; }
.int-section-head h3 { margin: 0; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.int-section-head p { margin: 3px 0 0; color: var(--text-muted); font-size: 12px; }
.int-count { font-size: 11px; font-weight: 700; color: var(--text-muted); background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 0 7px; }
.int-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
/* Integration cards: logo tile, name + website, status corner, description, footer */
.int-card {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 14px 14px 12px;
  border: 1px solid var(--border); border-radius: 14px; background: var(--surface);
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.int-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(20,21,26,0.08); border-color: color-mix(in srgb, var(--cat, var(--brand-orange)) 35%, var(--border)); }
.int-card[hidden] { display: none; }
.int-card.is-active {
  border-color: color-mix(in srgb, var(--green) 32%, var(--border));
  background: linear-gradient(170deg, color-mix(in srgb, var(--green) 7%, var(--surface)), var(--surface) 55%);
}
.int-card.is-active::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--green); }
.int-card.is-requested { border-color: color-mix(in srgb, var(--amber) 40%, var(--border)); background: linear-gradient(170deg, color-mix(in srgb, var(--amber) 8%, var(--surface)), var(--surface) 55%); }
.int-card-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.int-card-logo { display: inline-flex; padding: 3px; border-radius: 14px; background: var(--surface); box-shadow: 0 1px 2px rgba(0,0,0,0.06), 0 0 0 1px var(--border); }
.int-card .int-avatar { width: 46px; height: 46px; font-size: 14px; border-radius: 11px; border: 0; }
.int-card-title { min-width: 0; }
.int-card-name { font-weight: 700; font-size: 14px; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.int-card-corner { display: flex; align-items: center; gap: 4px; align-self: start; }
.int-status { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.int-status.is-live { background: var(--green-soft); color: var(--green); }
.int-status.is-live i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); animation: int-live 2s ease-in-out infinite; }
@keyframes int-live { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 45%, transparent); } 50% { box-shadow: 0 0 0 4px transparent; } }
.int-status.is-requested { background: var(--amber-soft); color: var(--amber); }
.int-card-edit {
  display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: 0; border-radius: 8px; background: transparent;
  color: var(--text-muted); cursor: pointer; opacity: 0; transition: opacity 0.15s, background 0.15s, color 0.15s;
}
.int-card-edit svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.int-card:hover .int-card-edit, .int-card-edit:focus-visible { opacity: 1; }
.int-card-edit:hover { background: var(--surface-2); color: var(--brand-orange); }
@media (hover: none) { .int-card-edit { opacity: 1; } }
.int-card-desc {
  margin: 0; flex: 1; color: var(--text-muted); font-size: 12.5px; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.int-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid var(--border); }
.int-card-meta { font-size: 11.5px; color: var(--text-muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.int-card-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.int-card .int-enable { border-color: color-mix(in srgb, var(--cat, var(--brand-orange)) 40%, var(--border)); color: var(--cat, var(--brand-orange)); font-weight: 700; }
.int-card .int-enable:hover { background: var(--cat, var(--brand-orange)); border-color: var(--cat, var(--brand-orange)); color: #fff; }
.red-add { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.red-add input { flex: 1 1 220px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); }
.red-term { font-weight: 600; }
.red-muted { color: var(--text-muted); font-size: 13px; }
.red-auto { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.red-auto h3 { margin: 0 0 4px; font-size: 13px; }
.red-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.int-tag { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.int-tag.tag-low { background: var(--green-soft); color: var(--green); }
.int-tag.tag-med { background: var(--amber-soft); color: var(--amber); }
.int-tag.tag-info { background: var(--blue-soft); color: var(--blue); }
.int-empty-line { padding: 18px; text-align: center; color: var(--text-muted); font-size: 13px; border: 1px dashed var(--border); border-radius: var(--radius); }
.btn.small { padding: 4px 10px; font-size: 12px; }
.link-btn.subtle { color: var(--text-muted); font-size: 12px; }
.link-btn.subtle:hover { color: var(--brand-orange); }
.int-add { margin-top: 12px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.int-card-site { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; font-size: 11.5px; font-weight: 600; color: var(--text-muted); text-decoration: none; }
.int-card-site:hover { color: var(--brand-orange); }
img.int-avatar { object-fit: cover; background: #fff; border: 1px solid var(--border); }
.int-request-form { display: flex; flex-direction: column; gap: 8px; }
.int-request-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.int-request-form input, .int-request-form textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); font: inherit; resize: vertical;
}
.int-request-foot { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.int-request-foot .form-msg { flex: 1; margin: 0; text-align: left; }
.int-requests { margin-top: 14px; border-top: 1px solid var(--border); }
.int-request { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.int-request:last-child { border-bottom: none; }
.int-request-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.int-request-link { font-size: 12px; word-break: break-all; }
.int-request-meta { font-size: 11px; color: var(--text-muted); }
@media (max-width: 640px) { .int-request-row { grid-template-columns: 1fr; } }

/* ---- Overview: coming soon ---- */
.coming-soon {
  max-width: 560px; margin: 48px auto; padding: 40px 32px; text-align: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.coming-soon::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 160px; pointer-events: none;
  background: radial-gradient(60% 100% at 50% 0%, var(--brand-orange-soft), transparent 70%);
}
.coming-soon > * { position: relative; }
.coming-soon-art { margin: 0 auto 18px; width: 220px; }
.coming-soon-art svg { display: block; width: 100%; height: auto; }
.cs-card { fill: var(--surface); stroke: var(--border); stroke-width: 1.5; }
.cs-line { fill: var(--text); opacity: 0.18; }
.cs-line.faint { opacity: 0.1; }
.cs-bar { fill: var(--text); opacity: 0.12; }
.cs-bar.accent { fill: var(--brand-orange); opacity: 1; }
.cs-ring { fill: none; stroke: var(--gray-soft); stroke-width: 6; }
.cs-ring-fill { fill: none; stroke: var(--brand-orange); stroke-width: 6; stroke-linecap: round; }
.cs-trend { fill: none; stroke: var(--brand-orange); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.cs-dot { fill: var(--brand-orange); }
.cs-bubble { fill: var(--surface-2); stroke: var(--border); stroke-width: 1.5; stroke-linejoin: round; }
.cs-bubble.accent { fill: var(--brand-orange); stroke: var(--brand-orange); }
.cs-line.on-accent { fill: #fff; opacity: 0.9; }
.cs-line.on-accent.faint { opacity: 0.6; }
.coming-soon-badge {
  display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: 11px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; background: var(--brand-orange-soft); color: var(--brand-orange);
}
.coming-soon h2 { margin: 12px 0 8px; font-size: 22px; letter-spacing: -0.01em; }
.coming-soon p { margin: 0 auto 18px; max-width: 420px; color: var(--text-muted); font-size: 14px; line-height: 1.55; }
.coming-soon-list { list-style: none; padding: 0; margin: 0 0 24px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.coming-soon-list li {
  padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--border);
}
@media (max-width: 640px) { .coming-soon { margin: 20px auto; padding: 28px 18px; } }

/* Row form: a section their role can't edit. */
.view-only-tag {
  margin-left: 8px; padding: 1px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.04em;
  text-transform: none; background: var(--gray-soft); color: var(--text-muted); border: 1px solid var(--border);
}
.row-form-section.view-only input:disabled, .row-form-section.view-only textarea:disabled,
.row-form-section.view-only select:disabled {
  background: transparent; border-style: dashed; color: var(--text-muted); cursor: not-allowed; opacity: 1;
}
.row-form-section.view-only .seg, .row-form-section.view-only .switch { opacity: 0.6; cursor: not-allowed; }
.row-form-section.view-only .seg-btn:disabled { cursor: not-allowed; }

/* ---- Overview ---- */
.ov { max-width: 1100px; margin: 8px auto 0; display: flex; flex-direction: column; gap: 16px; }
.ov-hero {
  --tint: var(--brand-orange); --tint-soft: var(--brand-orange-soft);
  position: relative; overflow: hidden; padding: 22px 24px 18px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow);
}
/* The status colours the whole card: a wash of it from the left, a matching
   edge and border. */
.ov-hero.hero-onboarding { --tint: var(--amber); --tint-soft: var(--amber-soft); }
.ov-hero.hero-hypercare { --tint: var(--blue); --tint-soft: var(--blue-soft); }
.ov-hero.hero-live { --tint: var(--green); --tint-soft: var(--green-soft); }
.ov-hero.hero-suspended { --tint: var(--red); --tint-soft: var(--red-soft); }
.ov-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(60% 160% at 100% 0%, var(--tint-soft), transparent 75%),
    linear-gradient(100deg, var(--tint-soft) 0%, color-mix(in srgb, var(--tint-soft) 55%, transparent) 50%, color-mix(in srgb, var(--tint-soft) 25%, transparent) 100%);
}
.ov-hero::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--tint); }
.ov-hero[class*="hero-"] { border-color: color-mix(in srgb, var(--tint) 30%, var(--border)); }
.ov-hero > * { position: relative; }
.ov-hero-main { display: flex; align-items: center; gap: 18px; }
.ov-hero .client-logo { width: 72px; height: 72px; font-size: 22px; box-shadow: var(--shadow); }
.ov-titles { flex: 1; min-width: 0; }
.ov-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.ov-title { margin: 2px 0 0; font-size: 26px; letter-spacing: -0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-status { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.ov-status .status-pill { font-size: 15px; padding: 7px 16px; box-shadow: 0 2px 10px color-mix(in srgb, var(--tint) 22%, transparent); }
.ov-status .status-dot { width: 10px; height: 10px; }
.hero-live .status-live { background: var(--green); color: var(--on-accent); }
.hero-live .status-live .status-dot { background: var(--on-accent); }
/* Every status gets the same solid pill in the header, so it stands out
   from the tinted card rather than blending into it. */
.ov-hero .ov-status .status-pill { background: var(--tint); color: var(--on-accent); }
.ov-hero .ov-status .status-pill .status-dot { background: var(--on-accent); }

/* LIVE is live, quietly: the dot in the pill pulses, and a faint sheen
   passes across the card once when the page shows it. */
.hero-live .ov-status .status-dot { animation: live-breathe 1s ease-in-out infinite; }
@keyframes live-breathe { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
.ov-hero.hero-live .ov-hero-main { position: relative; }
.ov-hero.hero-live .ov-hero-main::after {
  content: ""; position: absolute; inset: -30px -40px; pointer-events: none;
  background: linear-gradient(105deg, transparent 40%, color-mix(in srgb, #fff 30%, transparent) 50%, transparent 60%);
  transform: translateX(-120%); animation: live-sheen 1.6s ease-in-out 0.3s 1 forwards;
}
@keyframes live-sheen { from { transform: translateX(-120%); } to { transform: translateX(120%); } }
@media (prefers-reduced-motion: reduce) {
  .hero-live .ov-status .status-dot { animation: none; }
  .ov-hero.hero-live .ov-hero-main::after { display: none; }
}

/* Lifecycle: Onboarding → Hypercare → LIVE. */
.ov-lifecycle { display: flex; align-items: center; list-style: none; margin: 18px 0 0; padding: 14px 0 0; border-top: 1px solid color-mix(in srgb, var(--tint) 18%, var(--border)); }
.ov-step { display: flex; align-items: center; gap: 8px; flex: 1; font-size: 12.5px; font-weight: 600; color: var(--text-muted); }
.ov-step:not(:last-child)::after { content: ""; flex: 1; height: 2px; margin: 0 10px; border-radius: 2px; background: var(--border); }
/* On load: finished steps tick in one by one, the line fills up to the
   current step, and the current step keeps a gentle pulse. */
.ov-step.done:not(:last-child)::after {
  background: linear-gradient(var(--tint), var(--tint)) no-repeat left / 0% 100%, var(--border);
  animation: ov-line-fill 0.5s ease-out forwards; animation-delay: calc(var(--i, 0) * 0.35s + 0.25s);
}
@keyframes ov-line-fill { to { background-size: 100% 100%, auto; } }
.ov-step.done .ov-step-dot { animation: ov-tick-in 0.35s cubic-bezier(.2,.8,.2,1.4) both; animation-delay: calc(var(--i, 0) * 0.35s); }
@keyframes ov-tick-in { from { transform: scale(0.4); opacity: 0; } to { transform: none; opacity: 1; } }
.ov-step.current .ov-step-dot { animation: ov-current-in 0.35s cubic-bezier(.2,.8,.2,1.4) both, ov-current-pulse 2s ease-out infinite; animation-delay: calc(var(--i, 0) * 0.35s), calc(var(--i, 0) * 0.35s + 0.4s); }
@keyframes ov-current-in { from { transform: scale(0.4); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes ov-current-pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--tint) 45%, transparent); }
  70%, 100% { box-shadow: 0 0 0 9px transparent; }
}
.ov-step.current .ov-step-label { animation: ov-label-in 0.4s ease-out both; animation-delay: calc(var(--i, 0) * 0.35s + 0.1s); }
@keyframes ov-label-in { from { opacity: 0; transform: translateX(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .ov-step.done:not(:last-child)::after { animation: none; background: var(--tint); }
  .ov-step.done .ov-step-dot, .ov-step.current .ov-step-dot, .ov-step.current .ov-step-label { animation: none; }
}
.ov-step:last-child { flex: 0 0 auto; }
.ov-step-dot {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; border: 2px solid var(--border); background: var(--surface); color: #fff;
}
.ov-step.done .ov-step-dot { background: var(--tint); border-color: var(--tint); }
.ov-step.done { color: var(--text); }
.ov-step.current { color: var(--tint); }
.ov-step.current .ov-step-dot { border-color: var(--tint); background: var(--tint-soft); }
.ov-step.current .ov-step-dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--tint); }
.hero-live .ov-step.current .ov-step-dot { background: var(--tint); }
.hero-live .ov-step.current .ov-step-dot::after { background: #fff; }
.ov-step.suspended .ov-step-dot { font-size: 8px; letter-spacing: -1px; color: var(--tint); background: var(--tint-soft); }
.ov-step.suspended .ov-step-dot::after { display: none; }
.ov-lifecycle.paused .ov-step.done .ov-step-dot { background: var(--text-muted); border-color: var(--text-muted); }
.ov-lifecycle.paused .ov-step.done:not(:last-child)::after { background: var(--text-muted); }
.ov-label { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.status-pill {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 700; letter-spacing: 0.01em;
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status-onboarding { color: var(--amber); background: var(--amber-soft); }
.status-hypercare { color: var(--blue); background: var(--blue-soft); }
.status-live { color: var(--green); background: var(--green-soft); }
.status-live .status-dot { box-shadow: 0 0 0 0 currentColor; animation: live-pulse 2s ease-out infinite; }
.hero-live .status-live .status-dot { box-shadow: none; }
.status-suspended { color: var(--red); background: var(--red-soft); }
@keyframes live-pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 55%, transparent); }
  70%, 100% { box-shadow: 0 0 0 7px transparent; }
}
@media (prefers-reduced-motion: reduce) { .status-live .status-dot { animation: none; } }
.ov-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); padding: 18px 20px; }
.ov-card-head { margin: 0 0 12px; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.ov-empty { margin: 0; font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.ov-contacts { padding: 14px 20px; }
.ov-contacts-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 10px; }
.ov-contacts-head .ov-card-head { margin: 0; }
.ov-contacts .ov-phase-note { margin: 0; font-size: 12.5px; color: var(--text-muted); }
.ov-people { display: flex; flex-wrap: wrap; gap: 12px 32px; }
.ov-person { display: flex; gap: 12px; align-items: center; min-width: 0; }
.ov-avatar {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand-orange); color: #fff; font-weight: 700; font-size: 14px;
}
.ov-person-body { min-width: 0; }
.ov-person-name { font-weight: 700; font-size: 14.5px; }
.ov-person-email { font-size: 13px; color: var(--text-muted); text-decoration: none; overflow-wrap: anywhere; }
.ov-person-email:hover { color: var(--brand-orange); text-decoration: underline; }
@media (max-width: 760px) {
  .ov-hero { padding: 18px; }
  .ov-hero-main { flex-wrap: wrap; }
  .ov-step-label { display: none; }
  .ov-step.current .ov-step-label { display: inline; }
  .ov-status { align-items: flex-start; width: 100%; }
  .ov-title { font-size: 22px; }
}

/* ---- Platform Hub ---- */
.hub-page-head { margin-bottom: 4px; }
.hub-tabs { margin-bottom: 16px; }
.hub-tab-count { margin-left: 6px; padding: 0 7px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); }
.hub-panel { display: flex; flex-direction: column; gap: 14px; }
.hub-toolbar { display: flex; justify-content: flex-end; }
.hub-empty { text-align: center; padding: 40px 20px; border: 1px dashed var(--border); border-radius: 16px; color: var(--text-muted); }
.hub-empty p { margin: 8px 0 0; }
.hub-empty-icon svg, .hub-icon svg, .hub-ann-icon svg, .hub-insight-icon svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hub-empty-icon { display: inline-flex; width: 44px; height: 44px; }
.hub-empty-icon svg { width: 44px; height: 44px; opacity: 0.5; }
.hub-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.hub-chip { padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: var(--brand-orange-soft); color: var(--brand-orange); }
.hub-when { font-size: 12px; color: var(--text-muted); font-weight: 600; }
.hub-draft { padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--gray-soft); color: var(--text-muted); border: 1px dashed var(--border); }
.hub-edit { font-size: 12px; text-decoration: none; }
.draft { opacity: 0.75; }
.hub-summary { margin: 6px 0 0; font-size: 13.5px; color: var(--text-muted); line-height: 1.5; }
.hub-kicker { font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--brand-orange); margin-bottom: 4px; }

/* What's New: release cards with a calendar-style date */
.hub-releases { display: flex; flex-direction: column; gap: 12px; }
.hub-release { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 18px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); }
.hub-date { display: flex; flex-direction: column; align-items: center; justify-content: center; align-self: start; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); background: var(--surface-2); }
.hub-date-month { width: 100%; text-align: center; padding: 3px 0; background: var(--brand-orange); color: #fff; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; }
.hub-date-day { font-size: 26px; font-weight: 800; line-height: 1.1; padding-top: 4px; }
.hub-date-year { font-size: 11px; color: var(--text-muted); font-weight: 600; padding-bottom: 5px; }
.hub-release h3 { margin: 8px 0 0; font-size: 19px; letter-spacing: -0.01em; }
.hub-new { margin-top: 12px; padding: 10px 14px; border-radius: 12px; background: var(--surface-2); }
.hub-new-label { font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--green); }
.hub-new ul { margin: 6px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 14px; }
.hub-new li { font-size: 13.5px; font-weight: 600; padding-left: 20px; position: relative; }
.hub-new li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 800; }
.hub-release-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.hub-products { display: flex; flex-wrap: wrap; gap: 5px; }

/* Announcements: happening now, coming up, earlier. Important / critical ones stand out. */
.hub-announcements { display: flex; flex-direction: column; gap: 22px; }
.hub-ann-group { display: flex; flex-direction: column; gap: 10px; }
.hub-ann-group-head { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.hub-ann-group-live .hub-ann-group-head { color: var(--text); }
.hub-live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.hub-ann-list { display: flex; flex-direction: column; gap: 10px; }
.hub-ann {
  --imp: var(--brand-orange); display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: start;
  padding: 16px 18px; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--border); border-radius: 14px; box-shadow: var(--shadow);
}
.hub-ann.imp-important { --imp: var(--amber); border-left-color: var(--amber); }
.hub-ann.imp-critical { --imp: var(--red); border-color: color-mix(in srgb, var(--red) 40%, var(--border)); border-left-color: var(--red); background: linear-gradient(90deg, var(--red-soft), var(--surface) 55%); }
/* Code freeze: its own look (ice blue), whatever its importance. */
.hub-ann.hub-ann-code_freeze { --imp: var(--blue); border-color: color-mix(in srgb, var(--blue) 35%, var(--border)); border-left-color: var(--blue); background: linear-gradient(90deg, var(--blue-soft), var(--surface) 55%); }
.hub-ann.hub-ann-code_freeze.past { background: transparent; }
.hub-ann.past { box-shadow: none; background: transparent; }
.hub-ann.past h3, .hub-ann.past .hub-summary { color: var(--text-muted); }
.hub-ann-icon { width: 46px; height: 46px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; color: var(--imp); background: color-mix(in srgb, var(--imp) 13%, var(--surface)); }
.hub-ann-icon svg { width: 20px; height: 20px; }
.hub-ann-date { width: 46px; display: inline-flex; flex-direction: column; align-items: center; overflow: hidden; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--imp) 35%, var(--border)); background: var(--surface); }
.hub-ann-date-mon { width: 100%; padding: 2px 0; text-align: center; font-size: 10px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--on-accent); background: var(--imp); }
.hub-ann-date-day { padding: 3px 0 4px; font-size: 19px; font-weight: 800; line-height: 1.1; }
.hub-ann h3 { margin: 6px 0 0; font-size: 16px; }
.hub-ann .hub-summary { margin: 4px 0 0; }
.hub-ann-kind { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; color: var(--imp); }
.hub-ann-kind-icon { display: inline-flex; width: 14px; height: 14px; }
.hub-ann-kind-icon svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.hub-ann-status { padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); }
.hub-ann-status.live { color: var(--green); background: var(--green-soft); border-color: transparent; }
.hub-ann-status.done { color: var(--text-muted); }
.hub-ann-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 10px; }
.hub-ann-foot .hub-when { font-size: 12px; }
.hub-imp { padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--on-accent); background: var(--imp); }
.hub-imp.imp-important { background: var(--amber); }
.hub-imp.imp-critical { background: var(--red); }
.hub-window { display: inline-flex; align-items: baseline; padding: 4px 10px; border-radius: 8px; font-size: 12.5px; font-weight: 700; background: var(--surface-2); border: 1px solid var(--border); }
.hub-ann-cta { align-self: center; }
.hub-window-label { margin-right: 8px; font-size: 10.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--imp); }

/* News (and other insights): magazine cards, a coloured band per type */
.hub-insights { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.hub-insight {
  --kind: var(--brand-orange); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  box-shadow: var(--shadow); overflow: hidden; transition: transform 0.15s, box-shadow 0.15s;
}
.hub-insight:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(20,21,26,0.1); }
.hub-insight.hub-kind-podcast { --kind: var(--brand-orange); }
.hub-insight.hub-kind-webinar { --kind: var(--blue); }
.hub-insight.hub-kind-report { --kind: var(--green); }
.hub-insight.hub-kind-interview { --kind: var(--amber); }
.hub-insight-band {
  display: flex; align-items: center; gap: 8px; padding: 16px 18px; color: #fff; font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  background: linear-gradient(120deg, var(--kind), color-mix(in srgb, var(--kind) 60%, #000));
}
.hub-insight-icon { display: inline-flex; width: 30px; height: 30px; border-radius: 9px; align-items: center; justify-content: center; background: rgba(255,255,255,0.18); }
.hub-insight-icon svg { width: 17px; height: 17px; stroke: #fff; }
.hub-insight-body { padding: 14px 18px 4px; flex: 1; }
.hub-insight-body .hub-kicker { color: var(--kind); }
.hub-insight h3 { margin: 0; font-size: 18px; letter-spacing: -0.01em; line-height: 1.3; }
.hub-insight .hub-meta { margin-top: 10px; }
.hub-insight-foot { padding: 12px 18px 16px; }

/* Podcasts: episode rows with a play button */
.hub-podcasts { display: flex; flex-direction: column; gap: 10px; }
.hub-episode { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); }
.hub-play {
  width: 52px; height: 52px; border-radius: 50%; border: 0; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--brand-orange), color-mix(in srgb, var(--brand-orange) 70%, #000)); box-shadow: 0 6px 18px color-mix(in srgb, var(--brand-orange) 35%, transparent); transition: transform 0.15s;
}
.hub-play:hover { transform: scale(1.06); }
.hub-play svg { width: 22px; height: 22px; fill: #fff; margin-left: 3px; }
.hub-episode h3 { margin: 2px 0 0; font-size: 17px; }
.hub-episode .hub-kicker { color: var(--brand-orange); margin: 4px 0 0; }
.hub-episode .hub-chip { background: var(--brand-orange-soft); color: var(--brand-orange); }

/* YouTube thumbnails (Podcasts, Insights): click through to YouTube */
.yt-thumb { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #000; }
.yt-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.35s ease, filter 0.2s; }
.yt-thumb:hover img { transform: scale(1.04); filter: brightness(0.85); }
.yt-play { position: absolute; left: 50%; top: 50%; width: 68px; height: 48px; transform: translate(-50%, -50%); transition: transform 0.15s; }
.yt-play svg { width: 100%; height: 100%; filter: drop-shadow(0 2px 8px rgba(0,0,0,0.35)); }
.yt-play-bg { fill: #212121; fill-opacity: 0.8; transition: fill 0.15s, fill-opacity 0.15s; }
.yt-thumb:hover .yt-play-bg, .yt-thumb:focus-visible .yt-play-bg { fill: #f00; fill-opacity: 1; }
.yt-thumb:hover .yt-play { transform: translate(-50%, -50%) scale(1.08); }
.yt-thumb:focus-visible { outline: 3px solid var(--brand-orange); outline-offset: -3px; }
.yt-duration { position: absolute; right: 8px; bottom: 8px; padding: 2px 6px; border-radius: 4px; font-size: 12px; font-weight: 700; background: rgba(0,0,0,0.8); color: #fff; }

/* Podcasts: video cards */
.hub-watch-progress { display: flex; align-items: center; gap: 12px; font-size: 12.5px; font-weight: 700; color: var(--text-muted); white-space: nowrap; }
.hub-watch-progress .hub-watch-bar { width: 180px; flex: 0 0 180px; }
.hub-podcast-page { display: flex; flex-direction: column; gap: 18px; }
.hub-episodes-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.hub-episodes-head h3 { margin: 0; font-size: 15px; }

/* Latest episode: featured, to break up the grid */
.hub-feature {
  position: relative; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); overflow: hidden;
  border-radius: 20px; color: #fff; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.3);
  background: radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--brand-orange) 45%, #000) 0%, #120801 45%, var(--brand-black) 100%);
}
.hub-feature::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(40% 60% at 85% 110%, color-mix(in srgb, var(--brand-orange) 45%, transparent), transparent 70%);
}
.hub-feature-media { position: relative; z-index: 1; }
.hub-feature-media .yt-thumb, .hub-feature-media .hub-video-fallback { height: 100%; min-height: 100%; aspect-ratio: 16 / 9; }
.hub-feature-media .yt-play { width: 88px; height: 62px; }
.hub-feature-body { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 28px 32px; }
.hub-feature-eyebrow { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.75); }
.hub-feature-eyebrow .hub-draft { color: #fff; background: rgba(255,255,255,0.15); }
.hub-feature-eyebrow .hub-edit { color: rgba(255,255,255,0.8); }
.hub-feature-new { padding: 3px 10px; border-radius: 999px; background: var(--brand-orange); color: #fff; letter-spacing: 0.08em; box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-orange) 30%, transparent); }
.hub-feature-series { font-size: 12.5px; font-weight: 700; color: color-mix(in srgb, var(--brand-orange) 55%, #fff); }
.hub-feature h3 { margin: 0; font-size: 26px; line-height: 1.2; letter-spacing: -0.02em; }
.hub-feature p { margin: 0; font-size: 14.5px; line-height: 1.55; color: rgba(255,255,255,0.8); }
.hub-feature-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.btn.hub-feature-watch {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border: 0; border-radius: 999px; font-weight: 700;
  background: #f00; color: #fff; text-decoration: none; box-shadow: 0 6px 18px rgba(255, 0, 0, 0.35);
}
.btn.hub-feature-watch:hover { background: #d90000; border: 0; }
.hub-feature-watch-icon svg { width: 16px; height: 16px; fill: #fff; display: block; }
.hub-feature .hub-watch-toggle { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.25); color: #fff; }
.hub-feature .hub-watch-toggle:hover { border-color: #86efac; color: #86efac; }
.hub-feature .hub-watch-toggle.on { background: rgba(74, 222, 145, 0.18); color: #86efac; border-color: transparent; }
.hub-feature .hub-watch-toggle.on .hub-watch-check { background: #4ade91; border-color: #4ade91; color: #0b2a18; }
@media (max-width: 860px) {
  .hub-feature { grid-template-columns: 1fr; }
  .hub-feature-body { padding: 20px; }
  .hub-feature h3 { font-size: 21px; }
}
.hub-watch-bar { flex: 0 1 220px; height: 6px; border-radius: 999px; background: var(--border); overflow: hidden; }
.hub-watch-bar span { display: block; height: 100%; background: #f00; border-radius: inherit; transition: width 0.3s; }
.hub-watched-badge {
  position: absolute; right: 8px; top: 8px; padding: 3px 9px; border-radius: 6px; font-size: 11.5px; font-weight: 700;
  color: #fff; background: rgba(0,0,0,0.78); pointer-events: none;
}
.hub-watched-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: #f00; pointer-events: none; }
.hub-video.watched .yt-thumb img { filter: brightness(0.6) saturate(0.7); }
.hub-video.watched .yt-thumb:hover img { filter: brightness(0.5) saturate(0.7); }
.hub-video-body { flex: 1; }
.hub-video-foot { margin-top: auto; padding-top: 10px; }
.hub-watch-toggle {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px 5px 6px; border-radius: 999px; cursor: pointer;
  font: inherit; font-size: 12.5px; font-weight: 600; color: var(--text-muted); background: var(--surface); border: 1px solid var(--border);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.hub-watch-toggle:hover { border-color: var(--green); color: var(--green); }
.hub-watch-check {
  width: 18px; height: 18px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; border: 1.5px solid currentColor; color: transparent; transition: background 0.15s, color 0.15s;
}
.hub-watch-toggle:hover .hub-watch-check { color: var(--green); }
.hub-watch-toggle.on { color: var(--green); background: var(--green-soft); border-color: transparent; }
.hub-watch-toggle.on .hub-watch-check { background: var(--green); border-color: var(--green); color: var(--on-accent); }
.hub-tab-new { margin-left: 6px; padding: 1px 7px; border-radius: 999px; font-size: 10.5px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; background: var(--brand-orange); color: #fff; }
.hub-videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.hub-video { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; transition: transform 0.15s, box-shadow 0.15s; }
.hub-video:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(20,21,26,0.12); }
.hub-video-body { padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 4px; }
.hub-video-body .hub-kicker { color: var(--brand-orange); margin: 2px 0 0; font-size: 10.5px; }
.hub-video h3 { margin: 0; font-size: 15.5px; line-height: 1.35; }
.hub-video .hub-summary { margin-top: 2px; font-size: 13px; }
.hub-chip-episode { background: var(--brand-orange-soft); color: var(--brand-orange); }
.hub-video-fallback { position: relative; aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, color-mix(in srgb, var(--brand-orange) 60%, #000), var(--brand-black)); }
.hub-insight-media { position: relative; }
.hub-insight-tag {
  position: absolute; left: 10px; top: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 4px; border-radius: 999px;
  font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: #fff; background: color-mix(in srgb, var(--kind) 88%, #000); pointer-events: none;
}
.hub-insight-tag .hub-insight-icon { width: 22px; height: 22px; border-radius: 50%; }
.hub-insight-tag .hub-insight-icon svg { width: 13px; height: 13px; }
.hub-insight.has-video .hub-insight-body { padding-bottom: 16px; }

/* Resources: grouped by type, with search */

/* Reading view */
/* Platform Hub reading view: brand header band, readable body, stepping footer */
.hub-reader { max-width: 740px; display: flex; flex-direction: column; max-height: calc(100vh - 80px); animation: hub-reader-in 0.22s ease-out; }
@keyframes hub-reader-in { from { opacity: 0; transform: translateY(10px) scale(0.985); } to { opacity: 1; transform: none; } }
.hub-reader.is-stepping .hub-reader-titles, .hub-reader.is-stepping .hub-reader-body { animation: hub-reader-step 0.22s ease-out; }
@keyframes hub-reader-step { from { opacity: 0; transform: translateX(8px); } to { opacity: 1; transform: none; } }
.hub-reader-head {
  position: relative; display: flex; align-items: flex-start; gap: 16px; padding: 24px 60px 22px 26px; color: #fff; overflow: hidden;
  background: radial-gradient(120% 160% at 100% 0%, color-mix(in srgb, var(--brand-orange) 50%, #000) 0%, #140801 50%, var(--brand-black) 100%);
}
.hub-reader-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--brand-orange); }
.hub-reader.imp-critical .hub-reader-head::after { background: var(--red); }
.hub-reader.imp-important .hub-reader-head::after { background: var(--amber); }
.hub-reader-head .modal-close-icon { position: absolute; top: 14px; right: 14px; color: rgba(255,255,255,0.75); }
.hub-reader-head .modal-close-icon:hover { background: rgba(255,255,255,0.12); border-color: transparent; color: #fff; }
.hub-reader-icon { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 14px; background: var(--brand-orange); box-shadow: 0 8px 20px color-mix(in srgb, var(--brand-orange) 35%, transparent); }
.hub-reader-icon-svg { display: inline-flex; width: 24px; height: 24px; }
.hub-reader-icon-svg svg { width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hub-reader-titles { min-width: 0; flex: 1; }
.hub-reader-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.hub-reader-tag { padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; background: rgba(255,255,255,0.12); color: #fff; }
.hub-reader-tag.is-draft { background: rgba(255,255,255,0.22); }
.hub-reader-kicker { font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: color-mix(in srgb, var(--brand-orange) 60%, #fff); }
.hub-reader .hub-reader-head h2 { margin: 10px 0 12px; font-size: 24px; line-height: 1.22; letter-spacing: -0.02em; color: #fff; }
.hub-reader-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.hub-reader-meta:empty { display: none; }
.hub-reader-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.14); color: rgba(255,255,255,0.88); }
.hub-reader-pill-icon { display: inline-flex; width: 14px; height: 14px; }
.hub-reader-pill-icon svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.hub-reader .hub-reader-body { flex: 1; min-height: 0; overflow-y: auto; padding: 22px 26px 24px; font-size: 14.5px; line-height: 1.65; max-height: none; display: flex; flex-direction: column; gap: 18px; }
.hub-reader-media { border-radius: 14px; overflow: hidden; border: 1px solid var(--border); }
.hub-reader-media img { display: block; width: 100%; height: auto; }
.hub-reader-lead { margin: 0; font-size: 16.5px; line-height: 1.55; font-weight: 600; color: var(--text); }
.hub-reader-callout { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--amber-soft); border: 1px solid color-mix(in srgb, var(--amber) 30%, transparent); }
.hub-reader-callout-icon { display: inline-flex; width: 34px; height: 34px; border-radius: 10px; align-items: center; justify-content: center; background: var(--surface); flex-shrink: 0; }
.hub-reader-callout-icon svg { width: 18px; height: 18px; fill: none; stroke: var(--amber); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.hub-reader-callout-label { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--amber); }
.hub-reader-callout strong { font-size: 14px; }
.hub-reader-section { padding: 16px 18px; border-radius: 14px; background: var(--surface-2); }
.hub-reader-section h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.hub-reader-section .hub-hl { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px 18px; }
.hub-reader-applies { padding: 0; background: none; }
.hub-reader-applies h3 { margin-bottom: 8px; }
.hub-reader-text p { margin: 0 0 12px; }
.hub-reader-text p:last-child, .hub-reader-text ul:last-child { margin-bottom: 0; }
.hub-reader-text ul { margin: 0 0 12px; padding: 0; list-style: none; }
.hub-reader-text li { position: relative; padding-left: 20px; margin: 4px 0; }
.hub-reader-text li::before { content: ""; position: absolute; left: 4px; top: 0.62em; width: 7px; height: 7px; border-radius: 2px; background: var(--brand-orange); }
.hub-reader .hub-reader-foot { gap: 8px; padding: 12px 18px; }
.hub-reader-nav { display: flex; align-items: center; gap: 6px; }
.hub-reader-step { padding: 6px 12px; font-size: 12.5px; }
.hub-reader-step:disabled { opacity: 0.4; cursor: default; }
.hub-reader-pos { min-width: 54px; text-align: center; font-size: 12px; color: var(--text-muted); font-weight: 600; }
@media (max-width: 560px) {
  .hub-reader-head { padding: 18px 52px 18px 18px; gap: 12px; }
  .hub-reader-icon { width: 40px; height: 40px; }
  .hub-reader .hub-reader-head h2 { font-size: 20px; }
  .hub-reader .hub-reader-body { padding: 18px; }
  .hub-reader-pos { display: none; }
}
.hub-edit-modal { max-width: 760px; }
.hub-edit-modal .row-modal-body { max-height: calc(100vh - 220px); overflow-y: auto; }
@media (max-width: 640px) {
  .hub-release { grid-template-columns: 1fr; }
  .hub-date { flex-direction: row; gap: 6px; padding: 4px 10px; width: fit-content; }
  .hub-ann, .hub-episode { grid-template-columns: auto 1fr; }
  .hub-ann-cta, .hub-episode > .btn { grid-column: 2; justify-self: start; }
}

/* Avatar red dot + account menu count: something's waiting on you. */
.avatar-btn { position: relative; }
.avatar-dot {
  position: absolute; top: 1px; left: 23px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--red); border: 2px solid var(--surface); box-sizing: content-box;
}
.menu-count {
  margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 11.5px; font-weight: 700; background: var(--brand-orange); color: #fff;
}
.menu-count.overdue { background: var(--red); }
#userMenuActions:not([hidden]) { display: flex; align-items: center; gap: 10px; }

/* Action Centre page */
.ac { max-width: 1100px; margin: 8px auto 0; display: flex; flex-direction: column; gap: 16px; }
.ac-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 0; }
.ac-head h2 { margin: 0; }
.ac-head p { margin: 4px 0 0; color: var(--text-muted); font-size: 13px; }
.ac-filters { margin: 0; }
.ac-filter-count { margin-left: 6px; font-size: 11.5px; color: var(--text-muted); }
.ac-none { margin: 0; color: var(--text-muted); font-size: 13.5px; }
/* Groups as on the Overview: a heading, then the compact list (no box around it). */
.ac-group { display: flex; flex-direction: column; gap: 8px; }
.ac-group .act-list { box-shadow: var(--shadow); }
.ac-group-head { display: flex; align-items: center; gap: 10px; padding: 0 4px; }
.ac-group-head .client-logo { width: 26px; height: 26px; font-size: 10px; }
.ac-group-head .pick-logo-stack { margin-right: 6px; }
.ac-group-head .pick-logo-stack .client-logo + .client-logo { width: 16px !important; height: 16px !important; font-size: 7px; right: -7px; bottom: -5px; border-color: var(--bg); }
.ac-group-head h3 { margin: 0; font-size: 14px; }
.ac-group-brand { color: var(--text-muted); font-weight: 600; }
.ac-group-head .act-count { font-size: 12px; min-width: 22px; height: 22px; }

/* Overview → Action required: prominent, card-based (not a ticket list). */
.act-section { padding: 16px 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.act-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.act-head h2 { margin: 0; display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--brand-orange); }
.act-section.empty .act-head h2 { color: var(--text-muted); }
.act-section.empty .act-head { margin-bottom: 8px; }
.act-count { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; background: var(--brand-orange); color: #fff; font-size: 12.5px; letter-spacing: 0; }
.act-clear { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-muted); }
.act-clear-icon { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--green-soft); color: var(--green); font-weight: 800; }
.act-list { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); overflow: hidden; }
.act-card {
  --state: var(--brand-orange);
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 12px;
  padding: 10px 14px; border-left: 3px solid var(--state); transition: background 0.15s;
}
.act-card + .act-card { border-top: 1px solid var(--border); }
.act-card:hover { background: var(--surface-2); }
.act-card.state-overdue { --state: var(--red); }
.act-card.state-soon { --state: var(--amber); }
.act-icon { width: 30px; height: 30px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--state, var(--brand-orange)) 13%, var(--surface)); }
.act-icon svg { width: 16px; height: 16px; fill: none; stroke: var(--state, var(--brand-orange)); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.act-body { min-width: 0; }
.act-subject { display: flex; align-items: baseline; gap: 8px; min-width: 0; font-size: 13.5px; }
.act-type { flex-shrink: 0; font-weight: 700; }
.act-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-muted); }
.act-title strong { font-weight: 600; color: var(--text); }
.act-desc { margin: 2px 0 0; font-size: 12.5px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-meta { display: flex; align-items: center; }
.act-state { padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; color: var(--state); background: color-mix(in srgb, var(--state) 12%, transparent); }
.act-state.state-overdue { --state: var(--red); }
.act-state.state-soon { --state: var(--amber); }
.act-state.state-open { --state: var(--brand-orange); }
.act-actions { display: flex; align-items: center; gap: 10px; }
.act-cta { white-space: nowrap; }
.act-done { font-size: 12px; text-decoration: none; white-space: nowrap; }
.act-more { display: block; margin: 12px auto 0; padding: 6px 16px; border-radius: 999px; font: inherit; font-size: 13px; font-weight: 600; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; }
.act-more:hover { border-color: var(--brand-orange); color: var(--brand-orange); }
.act-modal { max-width: 620px; }
.act-modal-body { padding: 14px 18px 16px; }
.act-modal-body textarea, .act-modal-body input[type="date"] { width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); font: inherit; color: var(--text); }
.act-respond-desc { margin: 0 0 12px; font-size: 13.5px; line-height: 1.5; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); }
#actRespondIcon { background: none; width: auto; height: auto; }
#actRespondIcon .act-icon { width: 32px; height: 32px; }
@media (max-width: 640px) {
  .act-card { grid-template-columns: auto minmax(0, 1fr); row-gap: 8px; }
  .act-meta, .act-actions { grid-column: 2; }
  .act-subject { flex-wrap: wrap; }
}

/* Overview → Brand Configuration: tabs, then parameter / value rows. */
.cfg-card { padding-bottom: 8px; }
.cfg-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin: -2px 0 12px; padding: 3px; border-radius: 999px; background: var(--surface-2); width: fit-content; }
.cfg-tab { border: 0; background: none; font: inherit; font-size: 13px; font-weight: 600; color: var(--text-muted); padding: 6px 14px; border-radius: 999px; cursor: pointer; }
.cfg-tab:hover { color: var(--text); }
.cfg-tab.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(20,21,26,0.12); }
.cfg-panels { display: grid; }
.cfg-panel { grid-area: 1 / 1; visibility: hidden; }
.cfg-panel.active { visibility: visible; }
.cfg-list { display: grid; grid-template-columns: 240px minmax(0, 1fr); margin: 0; font-size: 13.5px; }
.cfg-list dt, .cfg-list dd { padding: 9px 0; border-top: 1px solid var(--border); margin: 0; }
.cfg-list dt:first-of-type, .cfg-list dt:first-of-type + dd { border-top: 0; }
.cfg-list dt { color: var(--text-muted); font-weight: 500; }
.cfg-list dd { font-weight: 600; overflow-wrap: anywhere; }
.cfg-missing { color: var(--text-muted); font-weight: 400; font-style: italic; }
.cfg-none { color: var(--text-muted); }
.cfg-count { font-size: 12px; color: var(--text-muted); font-weight: 600; margin-bottom: 6px; }
.cfg-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.cfg-chip { display: inline-flex; align-items: baseline; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--surface-2); border: 1px solid var(--border); }
.cfg-chip-sub { color: var(--text-muted); font-weight: 500; }
@media (max-width: 760px) { .cfg-list { grid-template-columns: 1fr; } .cfg-list dd { border-top: 0; padding-top: 0; } }

/* Admin → brand → Configuration editor */
.brand-config-modal { max-width: 820px; }
.brand-config-modal .row-modal-body { max-height: calc(100vh - 220px); }
.cfg-rows { padding: 4px 0 12px; }
.cfg-rows-title { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.cfg-rows-list { display: flex; flex-direction: column; gap: 6px; }
.cfg-row { display: flex; gap: 6px; align-items: center; }
.cfg-row-input { padding: 6px 10px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); font: inherit; font-size: 13px; color: var(--text); min-width: 0; }
.cfg-row-input.flex { flex: 1; }
.cfg-row-input.code { flex: 0 0 80px; text-transform: uppercase; font-family: ui-monospace, Menlo, monospace; }
.cfg-row-input:focus { outline: none; border-color: var(--brand-orange); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-orange) 18%, transparent); }
.cfg-add { margin-left: 0; }
.cfg-add:hover:not(:disabled) { border-color: var(--brand-orange); color: var(--brand-orange); background: var(--brand-orange-soft); }
.cfg-edit-note { margin: 4px 0 10px; font-size: 12.5px; color: var(--text-muted); }

/* Admin: brand status select, tinted like the Overview's pill. */
.status-select[data-status="onboarding"] { color: var(--amber); background-color: var(--amber-soft); border-color: transparent; }
.status-select[data-status="hypercare"] { color: var(--blue); background-color: var(--blue-soft); border-color: transparent; }
.status-select[data-status="live"] { color: var(--green); background-color: var(--green-soft); border-color: transparent; }
.status-select[data-status="suspended"] { color: var(--red); background-color: var(--red-soft); border-color: transparent; }
/* Admin: brand status on each brand card, in Add new Brand, and summed up
   in the Clients table. */
.brand-status-inline { display: inline-flex; align-items: center; gap: 8px; margin-right: 6px; flex-shrink: 0; }
.brand-status-label { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.brand-status-field { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.brand-status-field .row-field-label { margin: 0; }
.brand-status-field .brand-manager-select { max-width: 190px; }
.brand-status-field.stacked { flex-direction: column; align-items: stretch; gap: 4px; }
.brand-status-field.stacked .brand-manager-select { max-width: none; width: 100%; }
.brand-form-hint { margin: -2px 0 0; font-size: 11.5px; color: var(--text-muted); line-height: 1.45; }
.brand-status-summary { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.status-mini { display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.status-mini .status-dot { width: 6px; height: 6px; animation: none; }

/* Admin → client: who looks after them. */
.client-detail-head .client-managers { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.manager-chip {
  padding: 4px 11px; border-radius: 999px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
}
.manager-chip:hover { border-color: var(--brand-orange); }
.manager-chip.missing { border-style: dashed; color: var(--amber); background: var(--amber-soft); border-color: transparent; }
.pm-warning { margin: 0 0 12px; padding: 10px 12px; border-radius: var(--radius); background: var(--amber-soft); color: var(--amber); font-size: 13px; font-weight: 600; }
.ov-phase-note { margin: -4px 0 12px; font-size: 12.5px; color: var(--text-muted); }

/* Admin: account manager contact fields. */
.manager-contact { display: flex; gap: 6px; margin: 6px 0 4px; flex-wrap: wrap; }
.add-user-form .name-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.manager-input { flex: 1 1 120px; min-width: 0; padding: 5px 9px; font: inherit; font-size: 12.5px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); color: var(--text); }
.manager-input:focus { outline: none; border-color: var(--brand-orange); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-orange) 18%, transparent); }

/* ---- Login screen ---- */
.login-screen {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px;
}
.login-card {
  width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px 24px;
}
.login-card .brand { flex-direction: column; justify-content: center; text-align: center; gap: 10px; margin-bottom: 18px; }
.login-card .brand .mark { width: 46px; height: 41px; }
.login-card .brand h1 { color: var(--text); font-size: 18px; }
.login-card .brand .sub { color: var(--text-muted); }
.login-card.picker-card { max-width: 600px; }
/* Fixed-width cards, wrapped and centred, so a short list doesn't leave empty columns on the right. */
.client-pick-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 18px; }
/* Compact cards, so many clients fit: five to a row. */
.client-pick-grid .client-pick { flex: 0 0 100px; }
.client-pick {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 8px 10px; min-height: 96px; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius); cursor: pointer; font: inherit; color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.client-pick:hover, .client-pick:focus-visible { border-color: var(--brand-orange); box-shadow: var(--shadow); transform: translateY(-1px); outline: none; }
.client-pick .client-logo { width: 40px; height: 40px; font-size: 12px; }
.client-pick-name { font-weight: 600; font-size: 12.5px; text-align: center; line-height: 1.25; overflow-wrap: anywhere; }
.client-pick-hint { font-size: 10.5px; color: var(--text-muted); }
.client-pick.last { border-color: var(--brand-orange); }
/* Client picker steps: clients, then (for a client with brands) its brands.
   The viewport's height is fixed up front (sizePickerViewport) so the box
   never resizes between steps; the client step sits centred in it. */
/* margin-bottom: space between the cards and the footer's divider. */
.picker-viewport { margin: 0 -6px 18px; padding: 0 6px; }
.picker-step { height: 100%; }
#pickStepClients:not([hidden]) { display: flex; flex-direction: column; justify-content: center; }
#pickStepClients .client-pick-grid { margin-bottom: 0; }
#pickStepBrands:not([hidden]) { display: flex; flex-direction: column; }
/* sizePickerViewport lays the brand step out invisibly to measure it (all
   before the browser paints, so it's never seen). */
#pickStepBrands.measuring { visibility: hidden; height: auto; }
/* Extra brands scroll inside the box. The padding (offset by the negative
   margin) keeps a hovered card's lift, border and shadow from being cut off. */
#brandPickGrid { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; margin: -8px -8px 0; padding: 8px 8px 12px; align-content: flex-start; }
/* Last opened: its own line above the others, in the same card. */
.pick-section-label { font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); margin: 0 0 6px; text-align: center; }
#pickOthersLabel { margin-top: 14px; }
.pick-last-row { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.pick-last-row .client-pick { width: 100px; }
.pick-logo-stack { position: relative; display: inline-flex; }
.pick-logo-stack .client-logo + .client-logo {
  position: absolute; right: -8px; bottom: -6px; width: 20px !important; height: 20px !important; font-size: 7px;
  border: 2px solid var(--surface-2); box-sizing: content-box;
}
.pick-last-holder { position: relative; }
.pick-other-brands {
  position: absolute; top: -8px; right: -8px; z-index: 2; width: 26px; height: 26px; padding: 0; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
  transition: border-color 0.15s, transform 0.15s, background 0.15s;
}
.pick-other-brands svg { width: 14px; height: 14px; fill: none; stroke: var(--text-muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pick-other-brands:hover, .pick-other-brands:focus-visible { border-color: var(--brand-orange); background: var(--brand-orange-soft); transform: rotate(180deg); outline: none; }
.pick-other-brands:hover svg, .pick-other-brands:focus-visible svg { stroke: var(--brand-orange); }
.pick-last-row.leaving .pick-other-brands, #pickOthersLabel.leaving { opacity: 0; transition: opacity 0.2s ease-in; }

/* Other clients: a one-row carousel (arrows appear when it overflows). */
.pick-carousel { position: relative; }
.pick-carousel-track {
  flex-wrap: nowrap; justify-content: safe center; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none; margin: -6px -2px 0; padding: 6px 2px 8px;
}
.pick-carousel-track::-webkit-scrollbar { display: none; }
.pick-carousel-track .client-pick { scroll-snap-align: start; flex-shrink: 0; }
.pick-carousel-track.fade-right { mask-image: linear-gradient(to right, #000 85%, transparent); }
.pick-carousel-track.fade-left { mask-image: linear-gradient(to left, #000 85%, transparent); }
.pick-carousel-track.fade-left.fade-right { mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent); }
.pick-carousel-arrow {
  position: absolute; top: 50%; transform: translateY(-55%); z-index: 3; width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 18px; line-height: 1;
  box-shadow: var(--shadow); cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.pick-carousel-arrow:hover { border-color: var(--brand-orange); color: var(--brand-orange); }
.pick-carousel-arrow.prev { left: -12px; }
.pick-carousel-arrow.next { right: -12px; }

.leaving .client-pick { pointer-events: none; }
.leaving .client-pick:not(.chosen) { opacity: 0; transform: scale(0.9); transition: opacity 0.2s ease-in, transform 0.2s ease-in; }
.leaving .client-pick.chosen {
  border-color: var(--brand-orange); transform: translateY(-3px) scale(1.04);
  box-shadow: 0 10px 30px color-mix(in srgb, var(--brand-orange) 22%, transparent);
}
.pick-in { animation: pick-in 0.42s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i, 0) * 55ms + 120ms); }
@keyframes pick-in {
  from { opacity: 0; transform: translateY(12px) scale(0.94); }
  to { opacity: 1; transform: none; }
}
.picker-chosen {
  display: flex; align-items: center; gap: 12px; margin-bottom: 14px; padding: 10px 12px; flex-shrink: 0;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2);
}
.picker-chosen .client-logo { width: 40px; height: 40px; font-size: 13px; transform-origin: top left; position: relative; z-index: 2; }
.picker-chosen-text { flex: 1; min-width: 0; }
.picker-chosen-name { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-chosen-sub { font-size: 12px; color: var(--text-muted); }
.picker-back { text-decoration: none; white-space: nowrap; }
.brand-pick-grid .client-pick { min-height: 96px; }
.brand-pick-grid .client-pick .client-logo { width: 40px; height: 40px; }
@media (prefers-reduced-motion: reduce) {
  .pick-in { animation: none; }
  .leaving .client-pick { transition: none; }
}
.picker-footer {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  padding-top: 12px; border-top: 1px solid var(--border); font-size: 11px; color: var(--text-muted);
}
.picker-user { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-user #clientPickUser { color: var(--text); }
.picker-actions { display: flex; gap: 4px; }
.login-card .picker-actions .btn { padding: 3px 8px; font-size: 11px; font-weight: 500; border-color: transparent; color: var(--text-muted); background: transparent; }
.login-card .picker-actions .btn:hover { color: var(--brand-orange); border-color: transparent; }
.login-card p.desc { color: var(--text-muted); font-size: 13px; margin: 0 0 16px; text-align: center; }
#clientPickDesc { min-height: 1.5em; }
.login-card input[type="email"], .login-card input[type="password"] {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); margin-bottom: 10px;
}
.login-card .btn.primary { width: 100%; justify-content: center; padding: 10px 12px; }
.form-msg { font-size: 13px; margin-top: 12px; text-align: center; }
.form-msg.error { color: var(--red); }
.form-msg.success { color: var(--green); }
.link-btn {
  background: none; border: none; padding: 0; margin: 0; cursor: pointer; font: inherit;
  color: var(--brand-orange); text-decoration: underline;
}
.invite-box { margin: 0 0 16px; padding: 12px; border: 1px solid var(--brand-orange); border-radius: 8px; background: var(--brand-orange-soft); }
.invite-label { font-size: 13px; margin-bottom: 8px; }
.invite-row { display: flex; gap: 8px; }
.invite-row input { flex: 1; min-width: 0; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); font-family: ui-monospace, Menlo, monospace; font-size: 12px; }
.auth-switch { font-size: 13px; color: var(--text-muted); text-align: center; margin: 14px 0 0; }
#twoFactorForm .auth-switch + .auth-switch { margin-top: 8px; }

/* Two-factor login step */
.login-card input.code-input {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); margin-bottom: 10px;
  text-align: center; font-family: ui-monospace, Menlo, monospace; font-size: 20px; letter-spacing: .2em;
}
.login-card input#twoFactorRecovery { font-size: 16px; letter-spacing: .08em; }
.totp-qr { display: block; width: 200px; height: 200px; margin: 0 auto 12px; background: #fff; padding: 8px; border-radius: 8px; border: 1px solid var(--border); image-rendering: pixelated; }
.totp-manual { font-size: 12.5px; color: var(--text-muted); text-align: center; margin: 0 0 14px; }
.totp-manual summary { cursor: pointer; }
.totp-manual summary:hover { color: var(--brand-orange); }
.totp-manual code { display: block; margin-top: 8px; padding: 8px; border-radius: 8px; background: var(--surface-2); color: var(--text); font-size: 13px; letter-spacing: .06em; word-break: break-all; user-select: all; }
.recovery-codes {
  list-style: none; margin: 0 0 12px; padding: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px;
  font-family: ui-monospace, Menlo, monospace; font-size: 14px; text-align: center; color: var(--text);
}
.recovery-actions { display: flex; gap: 8px; margin-bottom: 12px; }
.recovery-actions .btn { flex: 1; justify-content: center; }
.recovery-ack { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); margin-bottom: 12px; cursor: pointer; }
.recovery-ack input { accent-color: var(--brand-orange); }
#pendingScreen .desc { margin-bottom: 20px; }
#pendingScreen .btn { width: 100%; justify-content: center; }

/* ---- Modal (add/edit row) ---- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(10,10,12,0.5); display: flex; align-items: flex-start;
  justify-content: center; padding: 40px 16px; overflow-y: auto; z-index: 100;
}
.modal {
  position: relative; width: 100%; max-width: 640px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px;
}
.modal h2 { margin: 0 0 14px; font-size: 16px; }
.modal-close-icon {
  position: absolute; top: 12px; right: 12px; width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid transparent; border-radius: 8px;
  color: var(--text-muted); font-size: 22px; line-height: 1; cursor: pointer; padding: 0;
}
.modal-close-icon:hover { background: var(--surface-2); color: var(--text); border-color: var(--border); }

/* Add/edit row: header, scrolling sectioned body, pinned footer. */
#rowModalOverlay { align-items: center; backdrop-filter: blur(2px); }
.row-modal { max-width: 920px; padding: 0; border-radius: 14px; overflow: hidden; box-shadow: 0 24px 60px rgba(10,10,12,0.25); }
.row-modal form { display: flex; flex-direction: column; max-height: calc(100vh - 32px); }
.row-modal-head { position: relative; display: flex; align-items: center; gap: 10px; padding: 12px 52px 12px 18px; border-bottom: 1px solid var(--border); }
.row-modal-icon { width: 32px; height: 32px; border-radius: 9px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; background: var(--brand-orange-soft); }
.row-modal-icon svg { width: 18px; height: 18px; fill: none; stroke: var(--brand-orange); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.row-modal-titles { min-width: 0; }
.row-modal-titles h2 { margin: 0; font-size: 15px; letter-spacing: -0.01em; }
.row-modal-titles p { margin: 1px 0 0; font-size: 12px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-modal-titles p:empty { display: none; }
.row-modal-head .modal-close-icon { top: 50%; transform: translateY(-50%); right: 12px; }
.row-modal-body { overflow-y: auto; padding: 4px 18px; }
.row-form-section { padding: 10px 0 12px; border-bottom: 1px solid var(--border); }
.row-form-section:last-child { border-bottom: none; }
.row-form-section-head { margin: 0 0 8px; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.row-form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 12px; }
.row-field { min-width: 0; }
.row-field.span-2 { grid-column: span 2; }
.row-field.span-4 { grid-column: 1 / -1; }
.row-field-label { display: block; font-size: 12px; font-weight: 600; color: var(--text); margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-field-label .req { color: var(--brand-orange); }
.row-field input[type="text"], .row-field input[type="url"], .row-field textarea {
  width: 100%; padding: 6px 9px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); font: inherit; font-size: 13px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.row-field textarea { resize: vertical; min-height: 52px; line-height: 1.4; }
.row-field input[readonly] { background: var(--surface-2); color: var(--text-muted); cursor: not-allowed; }
.row-field input.mono { font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; }
.row-field input::placeholder, .row-field textarea::placeholder { color: color-mix(in srgb, var(--text-muted) 70%, transparent); }
.row-field input[type="text"]:focus, .row-field input[type="url"]:focus, .row-field textarea:focus {
  outline: none; border-color: var(--brand-orange); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-orange) 18%, transparent);
}
.seg { display: flex; padding: 2px; gap: 2px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 7px; }
.seg-btn { flex: 1; border: none; background: transparent; padding: 4px 6px; border-radius: 5px; font-size: 12.5px; font-weight: 600; color: var(--text-muted); cursor: pointer; white-space: nowrap; }
.seg-btn:hover { color: var(--text); }
.seg-btn.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(20,21,26,0.1), 0 0 0 1px var(--border); }
.seg-btn.seg-muted.on { color: var(--text-muted); }
.seg-btn:focus-visible { outline: 2px solid var(--brand-orange); outline-offset: 1px; }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; padding-top: 5px; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track { position: relative; width: 38px; height: 22px; border-radius: 999px; background: var(--border); transition: background 0.15s; flex-shrink: 0; }
.switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,0.25); transition: transform 0.15s; }
.switch input:checked + .switch-track { background: var(--red); }
.switch input:checked + .switch-track::after { transform: translateX(16px); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--brand-orange); outline-offset: 2px; }
.row-modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 10px 18px; border-top: 1px solid var(--border); background: var(--surface-2); }
.row-modal-foot .form-msg { flex: 1; margin: 0; text-align: left; }
@media (max-width: 760px) {
  .row-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .row-field.span-2, .row-field.span-4 { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  #rowModalOverlay { padding: 0; align-items: stretch; }
  .row-modal { border-radius: 0; max-width: none; }
  .row-modal form { max-height: 100vh; }
}

/* ---- Epic/issue detail modal (Jira) ----
   Styled to match the "jira-epic-export-pdf" skill's branded PDF export
   (kicker / title+tick / reference / status chip / Description label /
   navy-headed tables). Follows the app's own light/dark theme (via the same
   --text/--surface/etc. variables everything else uses) rather than forcing
   a fixed light look — only the table header bar stays a constant dark navy
   in both themes (like the top navbar elsewhere in the app), since that's a
   brand accent, not body content. Montserrat is loaded in index.html for
   this modal only. */
.epic-link {
  color: var(--brand-orange); text-decoration: underline; cursor: pointer; background: none; border: none;
  padding: 0; font: inherit;
}
.epic-link:hover { filter: brightness(1.1); }
.jira-loading { color: var(--text-muted); font-size: 13px; }

.jira-modal {
  --jira-orange: var(--brand-orange);
  --jira-navy: var(--text);
  --jira-slate: var(--text-muted);
  --jira-surface: var(--surface-2);
  --jira-hairline: var(--border);
  --jira-header-navy: #0D131D;
  --jira-green: var(--green);
  --jira-green-soft: var(--green-soft);
  --jira-amber-ink: var(--amber);
  --jira-amber-soft: var(--amber-soft);
  --jira-blue: var(--blue);
  --jira-blue-soft: var(--blue-soft);
  max-width: 760px;
  background: var(--surface);
  color: var(--jira-navy);
  border: 1px solid var(--jira-hairline);
  font-family: "Montserrat", -apple-system, BlinkMacSystemFont, sans-serif;
}
.jira-modal .modal-close-icon { color: var(--jira-slate); }
.jira-head-actions { position: absolute; top: 14px; right: 56px; display: flex; align-items: center; gap: 6px; }
.jira-refresh-btn {
  width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; padding: 0;
  border: 1px solid var(--jira-hairline); border-radius: 8px; background: var(--surface); color: var(--jira-slate); cursor: pointer;
}
.jira-refresh-btn:hover { color: var(--brand-orange); border-color: var(--brand-orange); }
.jira-refresh-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.jira-refresh-btn.spinning svg { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.jira-export-btn { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 9px; font-size: 12px; font-weight: 600; height: 30px; }
.jira-export-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.jira-export-btn:not(:disabled):hover { border-color: var(--brand-orange); color: var(--brand-orange); }
.jira-modal .modal-close-icon:hover { background: var(--jira-surface); color: var(--jira-navy); border-color: var(--jira-hairline); }
.jira-modal .jira-loading { color: var(--jira-slate); }
.jira-modal .epic-link { color: var(--jira-orange); }

.jira-breadcrumb {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 10px; font-size: 12px;
}
.jira-breadcrumb-link {
  background: none; border: none; padding: 0; cursor: pointer; color: var(--jira-orange); font: inherit; font-weight: 600;
}
.jira-breadcrumb-link:hover { text-decoration: underline; }
.jira-breadcrumb-current { color: var(--jira-slate); font-weight: 700; }
.jira-breadcrumb-sep { color: var(--jira-hairline); }

.jira-kicker {
  color: var(--jira-orange); font-weight: 800; font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.06em; margin-bottom: 8px;
}
.jira-title-row { display: flex; align-items: flex-start; gap: 10px; padding-right: 170px; }
.jira-title-tick { width: 4px; flex-shrink: 0; margin-top: 4px; align-self: stretch; background: var(--jira-orange); border-radius: 2px; }
.jira-modal h2 { margin: 0; font-size: 20px; font-weight: 800; color: var(--jira-navy); line-height: 1.3; }
.jira-reference { color: var(--jira-slate); font-size: 13px; margin: 4px 0 12px 14px; }
#jiraModalStatus { margin: 0 0 18px 14px; }

.jira-status-chip {
  display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.03em;
}
.jira-status-chip.status-delivered { background: var(--jira-green-soft); color: var(--jira-green); }
.jira-status-chip.status-progress { background: var(--jira-amber-soft); color: var(--jira-amber-ink); }
.jira-status-chip.status-testing { background: var(--jira-blue-soft); color: var(--jira-blue); }

.jira-scroll {
  max-height: 60vh; overflow-y: auto; overflow-x: hidden;
  padding-right: 12px; margin-right: -12px; scrollbar-gutter: stable;
}

.jira-section-label {
  font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--jira-navy); margin: 4px 0 12px; padding-bottom: 8px; border-bottom: 2px solid var(--jira-navy);
}

.jira-body { font-size: 14px; line-height: 1.65; color: var(--jira-navy); }
.jira-body p { margin: 0 0 12px; }
.jira-body ul, .jira-body ol { margin: 0 0 12px; padding-left: 22px; }
.jira-body li { margin-bottom: 4px; }
.jira-body blockquote {
  margin: 0 0 12px; padding: 10px 14px; border-left: 3px solid var(--jira-orange);
  background: var(--jira-surface); color: var(--jira-slate); border-radius: 0 6px 6px 0;
}
.jira-body h1, .jira-body h2, .jira-body h3, .jira-body h4 { margin: 18px 0 8px; color: var(--jira-navy); font-weight: 700; }
.jira-body h1:first-child, .jira-body h2:first-child, .jira-body h3:first-child { margin-top: 0; }
.jira-body code { background: var(--jira-surface); padding: 1px 5px; border-radius: 4px; font-size: 13px; }
.jira-body pre { background: var(--jira-surface); padding: 10px; border-radius: 8px; overflow-x: auto; }
.jira-body a { color: var(--jira-orange); word-break: break-word; }
.jira-body hr { border: none; border-top: 1px solid var(--jira-hairline); margin: 14px 0; }
.jira-body table { border-collapse: collapse; width: 100%; margin: 0 0 14px; font-size: 13px; }
.jira-body th, .jira-body td { border: 1px solid var(--jira-hairline); padding: 6px 10px; text-align: left; vertical-align: top; }
.jira-body th { background: var(--jira-header-navy); color: #FFFFFF; font-weight: 700; }

.jira-tabs { display: flex; gap: 20px; margin: 4px 0 12px; border-bottom: 2px solid var(--jira-hairline); }
.jira-tab {
  background: none; border: none; cursor: pointer; font: inherit;
  font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--jira-slate); padding: 0 0 8px; margin-bottom: -2px; border-bottom: 2px solid transparent;
}
.jira-tab:hover { color: var(--jira-navy); }
.jira-tab.active { color: var(--jira-navy); border-bottom-color: var(--jira-orange); }
.jira-tab-count { color: var(--jira-slate); font-weight: 700; }
.jira-tab-count:empty { display: none; }
.jira-child-row {
  display: grid; grid-template-columns: 90px 1fr auto auto; gap: 10px; align-items: center;
  padding: 8px 0; border-bottom: 1px solid var(--jira-hairline); font-size: 13px;
}
.jira-child-row:last-child { border-bottom: none; }
.jira-child-row .epic-link { text-align: left; }
.jira-child-summary { color: var(--jira-navy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jira-child-type { color: var(--jira-slate); font-size: 11px; text-transform: uppercase; white-space: nowrap; }

.jira-tag { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.jira-tag.tag-low { background: var(--jira-green-soft); color: var(--jira-green); }
.jira-tag.tag-med { background: var(--jira-amber-soft); color: var(--jira-amber-ink); }
.jira-tag.tag-info { background: var(--jira-blue-soft); color: var(--jira-blue); }

@media (max-width: 640px) {
  .jira-child-row { grid-template-columns: 70px 1fr; grid-template-rows: auto auto; }
  .jira-child-type { grid-column: 2; }
}

/* ---- Admin panel ---- */
.admin-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.admin-panel + .admin-panel { margin-top: 16px; }
.admin-tabs { display: flex; gap: 20px; margin: 0 0 16px; border-bottom: 2px solid var(--border); }
.admin-tab {
  background: none; border: none; border-bottom: 2px solid transparent; margin-bottom: -2px;
  padding: 8px 2px; font: inherit; font-size: 14px; font-weight: 600; color: var(--text-muted); cursor: pointer;
}
.admin-tab:hover { color: var(--text); }
.admin-tab.active { color: var(--text); border-bottom-color: var(--brand-orange); }
.admin-tabs ~ .admin-panel { margin-top: 0; }
/* Settings sits apart from the other tabs, as a cog on the far right. */
.admin-tab.admin-tab-cog { margin-left: auto; display: inline-flex; align-items: center; padding: 6px 4px; }
.admin-tab-cog svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.3s; }
.admin-tab-cog:hover svg { transform: rotate(45deg); }
.admin-tab-cog.active { color: var(--brand-orange); }
/* Settings: side menu on the left, the open section beside it. */
.settings-layout:not([hidden]) { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 16px; align-items: start; }
.settings-layout > .admin-panel { margin-top: 0; }
/* Settings → Roles: roles on the left, the open one's permissions beside it. */
.roles-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.roles-head h2 { margin: 0; }
.roles-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 16px; align-items: start; }
.roles-list { display: flex; flex-direction: column; gap: 6px; }
.role-item {
  text-align: left; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface-2); cursor: pointer; font: inherit; color: var(--text);
}
.role-item:hover { border-color: color-mix(in srgb, var(--brand-orange) 50%, var(--border)); }
.role-item.active { border-color: var(--brand-orange); background: var(--surface); box-shadow: 0 0 0 1px var(--brand-orange); }
.role-item-name { font-weight: 700; font-size: 13.5px; display: flex; align-items: center; gap: 6px; }
.role-item-meta { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
.role-editor-head { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.role-field { display: flex; flex-direction: column; gap: 4px; flex: 1 1 200px; min-width: 0; }
.role-field:last-child { flex: 2 1 260px; }
.role-input-wrap { position: relative; }
.role-editor-head input {
  width: 100%; padding: 8px 32px 8px 10px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); font: inherit; color: var(--text); transition: border-color 0.15s, box-shadow 0.15s;
}
.role-editor-head input:hover { border-color: color-mix(in srgb, var(--brand-orange) 45%, var(--border)); }
.role-editor-head input:focus { outline: none; border-color: var(--brand-orange); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-orange) 18%, transparent); }
.role-name-input { font-weight: 700; }
.role-input-pencil { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; pointer-events: none; }
.role-input-pencil svg { width: 14px; height: 14px; fill: none; stroke: var(--text-muted); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.perm-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.perm-group { margin: 0; padding: 10px 12px 8px; border: 1px solid var(--border); border-radius: var(--radius); min-width: 0; }
.perm-group legend { padding: 0 4px; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.perm-row { display: flex; align-items: flex-start; gap: 8px; padding: 5px 0; font-size: 13px; cursor: pointer; }
.perm-row input { margin-top: 2px; accent-color: var(--brand-orange); flex-shrink: 0; }
.perm-row.disabled { color: var(--text-muted); cursor: default; }
.perm-label { flex: 1; min-width: 0; }
.perm-badge {
  display: inline-block; padding: 0 7px; border-radius: 999px; font-size: 10.5px; font-weight: 700; white-space: nowrap;
  background: var(--brand-orange-soft); color: var(--brand-orange);
}
.perm-select-all { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.perm-select-all input { accent-color: var(--brand-orange); margin: 0; }
/* Delete role dialog */
.role-delete-modal { max-width: 720px; }
.role-delete-body { padding: 16px 18px; overflow-y: auto; }
.role-delete-bulk { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.role-delete-bulk .row-field-label { margin: 0; }
.role-delete-bulk select { min-width: 200px; }
.role-delete-table td { vertical-align: middle; }
.role-delete-table td:first-child { min-width: 240px; overflow-wrap: anywhere; }
.role-delete-modal { max-width: 780px; }
.role-where { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; }
.role-where .client-logo { width: 22px; height: 22px; font-size: 8px; }
.role-editor-foot { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.role-editor-foot .btn.danger { margin-left: auto; }
@media (max-width: 900px) { .roles-layout { grid-template-columns: 1fr; } }

/* Settings → Account Management: each manager's clients as chips. */
.manager-clients { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.manager-client {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 2px 2px 3px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface-2); font-size: 12.5px; font-weight: 600;
}
.manager-client .client-logo { width: 20px; height: 20px; font-size: 8px; }
.manager-client .icon-remove { width: 20px; height: 20px; font-size: 14px; border-radius: 999px; }
.managers-table td:first-child { width: 32%; }
.add-client-pick { border-style: dashed; color: var(--text-muted); }
.settings-nav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: calc(var(--topbar-h, 61px) + 16px); }
.settings-nav-item {
  text-align: left; background: none; border: none; border-left: 2px solid transparent; border-radius: 0 8px 8px 0;
  padding: 8px 12px; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--text-muted); cursor: pointer;
}
.settings-nav-item:hover { color: var(--text); background: var(--surface-2); }
.settings-nav-item.active { color: var(--text); border-left-color: var(--brand-orange); background: var(--surface); }
@media (max-width: 760px) {
  .settings-layout:not([hidden]) { grid-template-columns: 1fr; }
  .settings-nav { position: static; flex-direction: row; flex-wrap: wrap; }
  .settings-nav-item { border-left: none; border-bottom: 2px solid transparent; border-radius: 8px 8px 0 0; }
  .settings-nav-item.active { border-bottom-color: var(--brand-orange); }
}
.admin-panel h2 { margin: 0 0 12px; font-size: 15px; }
.settings-desc { font-size: 13px; color: var(--text-muted); margin: 0 0 14px; line-height: 1.5; }
/* "Add new User", in the side panel beside the users list: one field per line */
.add-user-form { display: flex; flex-direction: column; gap: 10px; }
.add-user-form input[type="email"], .add-user-form input[type="text"], .add-user-form select {
  width: 100%; min-width: 0; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); color: var(--text);
}
.add-user-form .btn { justify-content: center; text-align: center; }
#adminUsersPanel .invite-box { margin: 14px 0 0; }
#adminUsersPanel .invite-row { flex-direction: column; }
#adminUsersPanel .invite-row .btn { justify-content: center; }
.users-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 10px; }
.users-filters input[type="search"] {
  flex: 1 1 240px; min-width: 180px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); color: var(--text);
}
.users-filters select { padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); color: var(--text); max-width: 100%; }
.users-filters input:focus, .users-filters select:focus { outline: none; border-color: var(--brand-orange); }
.users-filters .users-count { margin-left: auto; font-size: 12px; color: var(--text-muted); white-space: nowrap; }
table.users-table td.users-empty { text-align: center; color: var(--text-muted); padding: 22px 10px; }
table.users-table { width: 100%; border-collapse: collapse; }
/* Fixed columns: the user (email) gets the most room, the ⋯ menu just its button */
table.users-table th:nth-child(1) { width: 62%; }
table.users-table th:nth-child(2) { width: 38%; }
table.users-table th:nth-child(3) { width: 124px; }
table.users-table .fixed-badge, table.users-table .access-summary { white-space: nowrap; }
table.users-table th:nth-child(4) { width: 150px; }
table.users-table th:nth-child(5) { width: 146px; }
table.users-table th { text-align: left; font-size: 12px; text-transform: uppercase; color: var(--text-muted); padding: 8px 10px; border-bottom: 1px solid var(--border); }
table.users-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.users-table td .pill-select { max-width: 100%; }
/* One line per user: actions behind a ⋯ menu */
table.users-table td.actions-cell { width: 1%; text-align: right; }
table.users-table td.nowrap { white-space: nowrap; }
table.users-table .user-email { display: flex; align-items: center; gap: 6px; min-width: 0; }
table.users-table .user-email-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
table.users-table .user-email .pill { flex-shrink: 0; }
table.users-table td.nowrap { overflow: hidden; text-overflow: ellipsis; }
/* Row actions: small icon buttons, label in the tooltip */
.user-actions { display: flex; gap: 4px; justify-content: flex-end; }
.user-icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0;
  border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text-muted); cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.user-icon-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.user-icon-btn:hover, .user-icon-btn:focus-visible { color: var(--brand-orange); border-color: var(--brand-orange); outline: none; }
.user-icon-btn.danger:hover, .user-icon-btn.danger:focus-visible { color: var(--red); border-color: var(--red); background: var(--red-soft); }
.user-icon-btn:disabled { opacity: .5; cursor: default; }
.user-icon-btn.is-unused { visibility: hidden; }
/* Role (a client's user): their role on their client(s) */
.role-badge { display: inline-block; max-width: 100%; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.role-badge.muted { color: var(--text-muted); font-weight: 500; }
.access-more { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.domain-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 13px;
}
.domain-row:last-child { border-bottom: none; }
.domain-row .domain-meta { color: var(--text-muted); font-size: 12px; }
/* Pill-shaped dropdown (Users table roles). Tinted by data-role. */
.pill-select {
  appearance: none; -webkit-appearance: none; font: inherit; font-size: 12px; font-weight: 600;
  padding: 5px 28px 5px 12px; border-radius: 999px; border: 1px solid var(--border); cursor: pointer;
  background-color: var(--surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%237a7f8e' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: right 11px center; background-size: 10px 6px; background-repeat: no-repeat;
  color: var(--text); transition: border-color 0.15s, box-shadow 0.15s;
}
.pill-select:hover:not(:disabled) { border-color: color-mix(in srgb, var(--brand-orange) 50%, var(--border)); }
.pill-select:focus-visible { outline: none; border-color: var(--brand-orange); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-orange) 18%, transparent); }
.pill-select:disabled { opacity: 0.8; cursor: not-allowed; }
.pill-select.small { font-size: 11.5px; padding: 3px 24px 3px 10px; background-position: right 9px center; }
.pill-select[data-role="pending"] { color: var(--text-muted); background-color: var(--surface-2); }
.pill-select[data-role="viewer"] { color: var(--blue); background-color: var(--blue-soft); border-color: transparent; }
.pill-select[data-role="contributor"] { color: var(--green); background-color: var(--green-soft); border-color: transparent; }
.pill-select[data-role="editor"] { color: var(--amber); background-color: var(--amber-soft); border-color: transparent; }
.pill-select.add { color: var(--text-muted); border-style: dashed; width: 100%; }
.pill-select option { color: var(--text); background: var(--surface); }

/* Client access: summary button + panel. */
.access-wrap { position: relative; }
.access-summary {
  display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 4px 10px 4px 5px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface); cursor: pointer; font-size: 12.5px; color: var(--text);
  transition: border-color 0.15s, background 0.15s;
}
.access-summary:hover, .access-summary[aria-expanded="true"] { border-color: color-mix(in srgb, var(--brand-orange) 50%, var(--border)); background: var(--surface-2); }
.access-summary.empty { padding-left: 12px; color: var(--text-muted); border-style: dashed; }
.access-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.access-role { color: var(--text-muted); font-weight: 500; }
.logo-stack { display: inline-flex; }
.logo-stack .client-logo { width: 22px; height: 22px; font-size: 9px; border: 2px solid var(--surface); box-sizing: content-box; background-color: var(--surface); }
.logo-stack .client-logo + .client-logo { margin-left: -8px; }
.access-panel {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 25; width: 320px; padding: 8px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 10px 30px rgba(20,21,26,0.12), 0 2px 6px rgba(20,21,26,0.06);
}
.access-panel-head { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); padding: 4px 6px 8px; }
.access-empty { font-size: 12.5px; color: var(--text-muted); padding: 4px 6px 8px; }
.access-row { display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 8px; }
.access-row:hover { background: var(--surface-2); }
.access-row .client-logo { width: 24px; height: 24px; font-size: 9px; flex-shrink: 0; }
.access-row-name { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.users-table .access-panel { width: 360px; }
.access-row .pill-select { flex: 0 1 auto; max-width: 160px; min-width: 0; }
.icon-remove { border: none; background: transparent; color: var(--text-muted); font-size: 16px; line-height: 1; width: 24px; height: 24px; border-radius: 6px; cursor: pointer; }
.icon-remove:hover { color: var(--red); background: var(--red-soft); }
/* Brand access under a client grant: toggle chips. */
.brand-access { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 6px 8px 38px; }
.brand-chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px 2px 3px; font: inherit; font-size: 11.5px; font-weight: 600;
  border: 1px dashed var(--border); border-radius: 999px; background: transparent; color: var(--text-muted); cursor: pointer;
}
.brand-chip .client-logo { width: 16px; height: 16px; font-size: 7px; }
.brand-chip:hover { border-color: color-mix(in srgb, var(--brand-orange) 50%, var(--border)); color: var(--text); }
.brand-chip.on { border-style: solid; border-color: var(--brand-orange); background: var(--brand-orange-soft); color: var(--text); }
.access-add { padding: 6px 6px 2px; border-top: 1px solid var(--border); margin-top: 4px; }
.domain-add { display: flex; gap: 6px; }
.domain-add input { flex: 1; min-width: 0; padding: 5px 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font-size: 12.5px; }
.domain-add input:focus { outline: none; border-color: var(--brand-orange); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-orange) 18%, transparent); }
.domain-icon { width: 22px; height: 22px; border-radius: 6px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; background: var(--brand-orange-soft); }
.domain-icon svg { width: 14px; height: 14px; fill: none; stroke: var(--brand-orange); stroke-width: 1.7; }
.access-summary .domain-icon { margin-left: 1px; }
.fixed-badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: var(--gray-soft); color: var(--text); border: 1px solid var(--border); cursor: default; user-select: none;
}
.fixed-badge.muted { color: var(--text-muted); }
.domain-row .domain-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.domain-row select { padding: 5px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); font-size: 12px; }
/* Clients tab: the clients table on the left, "New client" beside it. */
.clients-layout:not([hidden]) { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.clients-layout > .admin-panel + .admin-panel { margin-top: 0; }
.clients-layout > .admin-panel:last-child { position: sticky; top: calc(var(--topbar-h, 61px) + 16px); }
.add-client-form { display: flex; flex-direction: column; gap: 10px; }
.add-client-form input[type="text"] { width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); }
.add-client-form .btn { justify-content: center; text-align: center; }
.dropzone {
  display: flex; align-items: center; gap: 12px; padding: 14px; min-height: 84px; cursor: pointer;
  border: 2px dashed var(--border); border-radius: var(--radius); background: var(--surface-2);
  transition: border-color 0.15s, background 0.15s;
}
.dropzone:hover, .dropzone:focus-visible, .dropzone.dragging { border-color: var(--brand-orange); background: var(--brand-orange-soft); outline: none; }
.dropzone.has-file { border-style: solid; }
.dropzone-preview { width: 52px; height: 52px; object-fit: cover; border-radius: 22%; flex-shrink: 0; }
.dropzone-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 13px; }
.dropzone-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dropzone-text span { color: var(--text-muted); font-size: 12px; }
.dropzone:not(.has-file) .dropzone-text { width: 100%; align-items: center; text-align: center; }
@media (max-width: 900px) {
  .clients-layout:not([hidden]) { grid-template-columns: 1fr; }
  .clients-layout > .admin-panel:last-child { position: static; }
}
.clients-table td { vertical-align: middle; }
/* Its own column widths (not the users table's). */
table.users-table.clients-table { table-layout: fixed; }
table.users-table.clients-table th:nth-child(1) { width: auto; }
table.users-table.clients-table th:nth-child(2) { width: 26%; }
table.users-table.clients-table th:nth-child(3) { width: 26%; }
table.users-table.clients-table th:nth-child(4) { width: 84px; }
.clients-table .client-cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.clients-table .client-cell .logo-btn .client-logo { width: 36px; height: 36px; font-size: 12px; }
.clients-table .client-cell-text { min-width: 0; }
.clients-table .client-open { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clients-table .client-brands-cell { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.clients-table .brand-status-summary { margin: 0; }
.clients-table .client-brands-cell .access-summary { padding-left: 10px; }
.clients-table .client-name { font-weight: 600; }
.clients-table .domain-meta, .client-domains .domain-meta { color: var(--text-muted); font-size: 12px; }
.logo-cell { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.logo-btn { background: none; border: none; padding: 0; cursor: pointer; border-radius: 8px; }
.logo-btn:hover .client-logo { outline: 2px solid var(--brand-orange); outline-offset: 2px; }
/* Every client logo is the same square tile with app-icon rounded corners
   (22% of its size), whatever size it's shown at. */
.client-logo { display: block; width: 44px; height: 44px; object-fit: cover; border-radius: 22%; overflow: hidden; flex-shrink: 0; }
.client-logo.placeholder {
  display: flex; align-items: center; justify-content: center; background: var(--gray-soft);
  color: var(--text-muted); font-weight: 700; font-size: 14px; border: 1px dashed var(--border);
}
/* Clients table: the client name opens that client's brands and markets. */
.client-open { background: none; border: none; padding: 0; font: inherit; font-weight: 600; color: var(--text); cursor: pointer; text-align: left; }
.client-open:hover { color: var(--brand-orange); }
.chev.chev-right { transform: rotate(-45deg); margin: 0 2px; }

/* One client: Client -> Brands -> Markets. */
.client-back { text-decoration: none; font-size: 13px; margin-bottom: 12px; }
.client-detail-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.client-detail-head h2 { margin: 0; font-size: 18px; }
.client-detail-head .domain-meta { color: var(--text-muted); font-size: 12px; margin-top: 2px; }
.brand-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; }
.brand-card + .brand-card { margin-top: 12px; }
.brand-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.brand-card-head .client-logo { width: 36px; height: 36px; font-size: 12px; }
.brand-card-title { flex: 1; min-width: 0; }
.brand-card-head .client-name { font-weight: 600; }
.brand-card-head .domain-meta { color: var(--text-muted); font-size: 12px; }
.brand-card-head .actions-cell { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.brand-card-markets { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-left: 48px; }
.brand-card-markets .market-chips { margin: 0; }
.brand-card-markets .market-chips:empty { display: none; }
.brand-card-markets .market-add { flex: 1 1 260px; max-width: 360px; margin: 0; }
@media (max-width: 760px) {
  .brand-card-head { flex-wrap: wrap; }
  .brand-card-markets { padding-left: 0; }
}
.market-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.market-chip {
  display: inline-flex; align-items: center; gap: 2px; padding: 2px 2px 2px 10px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface-2); font-size: 12.5px;
}
.market-chip .icon-remove { width: 20px; height: 20px; font-size: 14px; border-radius: 999px; }
.market-chip-name { background: none; border: none; padding: 0; font: inherit; font-weight: 600; color: var(--text); cursor: pointer; }
.market-chip-name:hover { color: var(--brand-orange); }
.market-add { max-width: 420px; }

.client-block { padding: 4px 0 10px; border-bottom: 1px solid var(--border); }
.client-block:last-child { border-bottom: none; }
.client-block .domain-row { border-bottom: none; padding-bottom: 4px; }

@media (max-width: 760px) {
  .topbar-inner { grid-template-columns: 1fr auto; padding: 0 12px; }
  .topbar-right { grid-column: 2; }
  .topnav { display: none; }
  .brand-name, .topbar-divider { display: none; }
}
@media (max-width: 640px) {
  main { padding: 14px 12px 40px; }
  .brand h1 { font-size: 15px; }
  .table-wrap { max-height: 60vh; }
}

/* News: cover images (from the website's CDN); the latest article leads */
.hub-insight.hub-kind-news { --kind: var(--brand-orange); }
.hub-insight.hub-kind-press_release { --kind: var(--blue); }
.hub-insight.hub-kind-editorial { --kind: var(--brand-black); }
.hub-cover {
  display: block; aspect-ratio: 1152 / 556; overflow: hidden; cursor: pointer;
  background: linear-gradient(120deg, var(--kind), color-mix(in srgb, var(--kind) 55%, #000));
}
.hub-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.35s ease, filter 0.2s; }
.hub-insight:hover .hub-cover img { transform: scale(1.04); filter: brightness(0.92); }
.hub-insight.has-cover .hub-summary { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (min-width: 900px) {
  .hub-insight.lead { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); grid-template-rows: 1fr auto; }
  .hub-insight.lead .hub-insight-media { grid-row: 1 / span 2; }
  .hub-insight.lead .hub-cover { height: 100%; }
  .hub-insight.lead .hub-insight-body { padding: 26px 28px 4px; align-self: center; }
  .hub-insight.lead h3 { font-size: 26px; }
  .hub-insight.lead .hub-summary { font-size: 15px; -webkit-line-clamp: 4; }
  .hub-insight.lead .hub-insight-foot { padding: 12px 28px 26px; }
}

/* Integrations catalogue editor (admins): the logo tile beside the fields */
.int-edit-modal { max-width: 620px; }
.int-edit-grid { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 16px; align-items: start; }
.int-edit-logo { flex-direction: column; justify-content: center; gap: 8px; width: 132px; height: 132px; min-height: 0; padding: 10px; text-align: center; }
.int-edit-logo .dropzone-preview { width: 72px; height: 72px; }
.int-edit-logo .dropzone-text { align-items: center; text-align: center; width: 100%; }
.int-edit-logo .dropzone-text strong { font-size: 12px; white-space: normal; }
.int-edit-logo .dropzone-text span { font-size: 11px; }
.int-edit-logo-remove { margin: 6px 0 4px; padding-left: 2px; }
.int-edit-count { align-self: flex-end; font-size: 11px; color: var(--text-muted); }
.int-edit-usage { margin: 10px 0 0; padding: 8px 12px; border-radius: 8px; font-size: 12.5px; background: var(--amber-soft); color: var(--amber); font-weight: 600; }
@media (max-width: 560px) {
  .int-edit-grid { grid-template-columns: 1fr; }
  .int-edit-logo { width: 100%; height: auto; min-height: 110px; }
}

/* Settings → Integrations: the whole catalogue */
.int-cat-toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 4px 0 16px; }
.int-cat-toolbar input[type="search"] { flex: 1 1 220px; max-width: 320px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface-2); }
.int-cat-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.int-cat-filter {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 12.5px; font-weight: 600;
}
.int-cat-filter:hover { border-color: var(--brand-orange); }
.int-cat-filter.active { background: var(--brand-orange); border-color: var(--brand-orange); color: #fff; }
.int-cat-filter.active .int-count { background: rgba(255,255,255,0.22); border-color: transparent; color: #fff; }
.int-cat-group + .int-cat-group { margin-top: 18px; }
.int-cat-group h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.int-cat-rows { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.int-cat-row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) 140px 120px 40px; gap: 14px; align-items: center; width: 100%;
  padding: 10px 14px; border: 0; border-top: 1px solid var(--border); background: var(--surface); text-align: left; cursor: pointer; font: inherit; color: inherit;
}
.int-cat-row:first-child { border-top: 0; }
.int-cat-row:hover, .int-cat-row:focus-visible { background: var(--surface-2); outline: none; }
.int-cat-row .int-avatar { width: 38px; height: 38px; font-size: 13px; }
.int-cat-main { display: flex; flex-direction: column; min-width: 0; }
.int-cat-main .int-card-name { display: flex; align-items: center; gap: 8px; }
.int-cat-main .int-card-desc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.int-cat-site, .int-cat-usage { font-size: 12px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.int-cat-edit { font-size: 12px; font-weight: 700; color: var(--brand-orange); opacity: 0; transition: opacity 0.15s; }
.int-cat-row:hover .int-cat-edit, .int-cat-row:focus-visible .int-cat-edit { opacity: 1; }
@media (max-width: 760px) {
  .int-cat-row { grid-template-columns: auto minmax(0, 1fr) auto; }
  .int-cat-site, .int-cat-edit { display: none; }
}

/* Integrations: the four category cards (tabs) */
.int-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0 0 18px; }
.int-tab {
  --cat: var(--brand-orange); position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0;
  padding: 14px 16px 14px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow);
  font: inherit; color: var(--text); text-align: left; cursor: pointer; overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s, background 0.15s;
}
.int-tab::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--cat); transform: scaleX(0); transform-origin: left; transition: transform 0.25s ease; }
.int-tab:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(20,21,26,0.09); border-color: color-mix(in srgb, var(--cat) 35%, var(--border)); }
.int-tab:focus-visible { outline: 2px solid var(--cat); outline-offset: 2px; }
.int-tab.active { border-color: color-mix(in srgb, var(--cat) 55%, var(--border)); background: linear-gradient(160deg, color-mix(in srgb, var(--cat) 9%, var(--surface)), var(--surface) 70%); }
.int-tab.active::after { transform: scaleX(1); }
.int-tab-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; margin-bottom: 8px; }
.int-tab-icon { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 11px; background: var(--surface-2); transition: background 0.15s; }
.int-tab-icon svg { width: 20px; height: 20px; fill: none; stroke: var(--text-muted); transition: stroke 0.15s; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.int-tab:hover .int-tab-icon svg { stroke: var(--cat); }
.int-tab.active .int-tab-icon { background: var(--cat); }
.int-tab.active .int-tab-icon svg { stroke: #fff; }
.int-tab-pending { padding: 1px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 800; letter-spacing: 0.02em; background: var(--amber-soft); color: var(--amber); white-space: nowrap; }
.int-tab-label { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.int-tab-faces { display: flex; align-items: center; min-width: 0; padding-left: 8px; }
.int-tab-faces .int-avatar { width: 32px; height: 32px; margin-left: -8px; font-size: 10.5px; border-radius: 9px; border: 2px solid var(--surface); box-shadow: 0 1px 4px rgba(0,0,0,0.14); transition: transform 0.15s; }
.int-tab:hover .int-tab-faces .int-avatar { transform: translateY(-1px); }
.int-tab-more { margin-left: 6px; font-size: 11px; font-weight: 700; color: var(--text-muted); }
@media (max-width: 900px) { .int-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .int-tab-faces { display: none; } .int-tab { padding: 12px; } }

/* What's New: changelog — the newest update leads, the rest on a timeline */
.hub-changelog { display: flex; flex-direction: column; gap: 18px; }
.hub-kind-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.hub-kind-filter {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 10px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 12.5px; font-weight: 600;
}
.hub-kind-filter:hover { border-color: var(--brand-orange); }
.hub-kind-filter.active { background: var(--brand-black); border-color: var(--brand-black); color: #fff; }
.hub-kind-filter-icon { display: inline-flex; width: 15px; height: 15px; }
.hub-kind-filter-icon svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hub-kind-filter-n { font-size: 11px; color: var(--text-muted); }
.hub-kind-filter.active .hub-kind-filter-n { color: rgba(255,255,255,0.7); }

.hub-release-lead {
  position: relative; display: grid; grid-template-columns: 210px minmax(0, 1fr); overflow: hidden;
  background: var(--surface); border: 2px solid var(--brand-orange); border-radius: 20px;
  box-shadow: 0 14px 34px color-mix(in srgb, var(--brand-orange) 16%, transparent), var(--shadow);
}
.hub-release-lead-badge {
  position: absolute; top: 16px; right: 16px; z-index: 1; padding: 4px 12px; border-radius: 999px;
  background: var(--brand-orange); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
}
.hub-release-lead-side {
  position: relative; display: flex; flex-direction: column; gap: 10px; padding: 24px 22px; color: #fff; overflow: hidden;
  background: radial-gradient(130% 110% at 0% 100%, color-mix(in srgb, var(--brand-orange) 55%, #000) 0%, #140801 55%, var(--brand-black) 100%);
}
.hub-release-lead-eyebrow { font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: color-mix(in srgb, var(--brand-orange) 60%, #fff); }
.hub-release-lead-date { display: flex; flex-direction: column; }
.hub-release-lead-day { font-size: 54px; font-weight: 800; line-height: 1; letter-spacing: -0.03em; }
.hub-release-lead-month { font-size: 14px; font-weight: 600; color: rgba(255,255,255,0.75); }
.hub-release-lead-icon { position: absolute; right: -18px; bottom: -18px; width: 110px; height: 110px; opacity: 0.16; }
.hub-release-lead-icon svg { width: 100%; height: 100%; fill: none; stroke: #fff; stroke-width: 1.2; stroke-linejoin: round; }
.hub-release-lead-body { display: flex; flex-direction: column; gap: 10px; padding: 22px 26px 20px; min-width: 0; }
.hub-release-lead-body h3 { margin: 0; padding-right: 90px; font-size: 24px; line-height: 1.25; letter-spacing: -0.02em; }
.hub-release-lead-body .hub-summary { margin: 0; font-size: 14.5px; }
.hub-fresh { padding: 2px 9px; border-radius: 999px; background: var(--brand-orange); color: #fff; font-size: 10.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.hub-release-lead-hl { margin-top: 4px; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); }
.hub-hl-label { display: block; margin-bottom: 8px; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.hub-hl { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px 16px; }
.hub-hl li { display: flex; align-items: flex-start; gap: 9px; font-size: 13.5px; font-weight: 600; line-height: 1.4; }
.hub-hl-tick { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: var(--brand-orange-soft); }
.hub-hl-tick svg { width: 12px; height: 12px; fill: none; stroke: var(--brand-orange); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.hub-hl-more { color: var(--text-muted); font-weight: 600; padding-left: 29px; }
.hub-product { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: 12px; font-weight: 600; color: var(--text-muted); }
.hub-product::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: var(--brand-orange); }
.hub-release-lead .hub-release-foot { margin-top: 4px; }

.hub-timeline-head { margin: 6px 0 -4px; font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.hub-log { display: flex; flex-direction: column; gap: 8px; }
.hub-log-month { margin-top: 6px; font-size: 13px; font-weight: 800; }
.hub-log-rows { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.hub-log-row + .hub-log-row { border-top: 1px solid var(--border); }
.hub-log-head { display: grid; grid-template-columns: 44px 150px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 12px 16px; list-style: none; }
summary.hub-log-head { cursor: pointer; }
summary.hub-log-head::-webkit-details-marker { display: none; }
summary.hub-log-head:hover { background: var(--surface-2); }
summary.hub-log-head:focus-visible { outline: 2px solid var(--brand-orange); outline-offset: -2px; }
.hub-log-date { display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.hub-log-day { font-size: 18px; font-weight: 800; }
.hub-log-mon { font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.hub-log-kind { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--text-muted); white-space: nowrap; }
.hub-log-kind.hub-kind-release, .hub-log-kind.hub-kind-feature { color: var(--brand-orange); }
.hub-log-icon { display: inline-flex; width: 15px; height: 15px; }
.hub-log-icon svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.hub-log-text { display: flex; flex-direction: column; min-width: 0; }
.hub-log-title { font-size: 14px; font-weight: 700; }
.hub-log-summary { font-size: 13px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-log-end { display: flex; align-items: center; gap: 10px; }
.hub-log-chev { width: 8px; height: 8px; border-right: 2px solid var(--text-muted); border-bottom: 2px solid var(--text-muted); transform: rotate(45deg) translate(-2px, -2px); transition: transform 0.15s; }
details[open] > summary .hub-log-chev { transform: rotate(-135deg) translate(-2px, -2px); }
details[open] > summary .hub-log-summary { white-space: normal; }
.hub-log-detail { padding: 8px 16px 16px calc(16px + 44px + 14px + 150px + 14px); }
.hub-log-detail .hub-hl li { font-size: 13px; }
.hub-log-detail .hub-release-foot { margin-top: 12px; }
@media (max-width: 760px) {
  .hub-release-lead { grid-template-columns: 1fr; }
  .hub-release-lead-side { flex-direction: row; align-items: center; gap: 14px; padding: 16px 18px; }
  .hub-release-lead-date { flex-direction: row; align-items: baseline; gap: 8px; }
  .hub-release-lead-day { font-size: 34px; }
  .hub-release-lead-body { padding: 18px; }
  .hub-log-head { grid-template-columns: 40px minmax(0, 1fr) auto; row-gap: 4px; }
  .hub-log-kind { grid-column: 2; grid-row: 1; }
  .hub-log-text { grid-column: 2; }
  .hub-log-end { grid-column: 3; grid-row: 1 / span 2; }
  .hub-log-detail { padding-left: 16px; }
  .hub-ann-foot .hub-window { white-space: normal; }
}
.hub-reader-foot .inc-foot-spacer { flex: 1; }

/* Knowledge Base ---------------------------------------------------------- */
.kb-icon svg, .kb-card-icon svg, .kb-nav-icon svg, .kb-section-icon svg, .kb-row-icon svg, .kb-search-icon svg, .kb-note-icon svg {
  width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
/* Home: hero with search */
.kb-hero {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; margin: 4px 0 22px; padding: 34px 36px; overflow: hidden;
  border-radius: 22px; color: #fff; box-shadow: 0 18px 44px rgba(0,0,0,0.18);
  background: radial-gradient(90% 150% at 100% 0%, color-mix(in srgb, var(--brand-orange) 50%, #000) 0%, #140801 48%, var(--brand-black) 100%);
}
.kb-hero::after { content: ""; position: absolute; right: -60px; bottom: -80px; width: 280px; height: 280px; border-radius: 50%; border: 40px solid rgba(255,255,255,0.04); pointer-events: none; }
.kb-hero-text { position: relative; z-index: 1; max-width: 640px; }
.kb-hero-eyebrow { font-size: 11.5px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: color-mix(in srgb, var(--brand-orange) 60%, #fff); }
.kb-hero h2 { margin: 6px 0 6px; font-size: 32px; letter-spacing: -0.02em; line-height: 1.15; }
.kb-hero p { margin: 0; font-size: 14.5px; color: rgba(255,255,255,0.78); }
.kb-hero .kb-add { position: absolute; top: 18px; right: 18px; z-index: 2; }
.kb-search { position: relative; z-index: 1; display: flex; align-items: center; }
.kb-search-icon { position: absolute; left: 14px; width: 18px; height: 18px; color: var(--text-muted); pointer-events: none; }
.kb-search input { width: 100%; padding: 10px 14px 10px 42px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; font-size: 13.5px; }
.kb-search input:focus { outline: none; border-color: var(--brand-orange); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-orange) 18%, transparent); }
.kb-search.is-big { max-width: 640px; }
.kb-search.is-big input { padding: 15px 18px 15px 50px; font-size: 15.5px; border: 0; box-shadow: 0 10px 30px rgba(0,0,0,0.25); }
.kb-search.is-big .kb-search-icon { left: 18px; width: 20px; height: 20px; }

.kb-sections { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.kb-card {
  display: flex; flex-direction: column; gap: 8px; padding: 20px; border-radius: 18px; text-decoration: none; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.kb-card:hover { transform: translateY(-3px); box-shadow: 0 14px 32px rgba(20,21,26,0.1); border-color: color-mix(in srgb, var(--brand-orange) 40%, var(--border)); }
.kb-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.kb-card-icon { display: inline-flex; width: 44px; height: 44px; padding: 11px; border-radius: 13px; background: var(--brand-orange-soft); color: var(--brand-orange); transition: background 0.15s, color 0.15s; }
.kb-card:hover .kb-card-icon { background: var(--brand-orange); color: #fff; }
.kb-card-count { font-size: 11.5px; font-weight: 700; color: var(--text-muted); }
.kb-card-title { font-size: 16.5px; font-weight: 700; letter-spacing: -0.01em; }
.kb-card-desc { font-size: 13px; color: var(--text-muted); line-height: 1.45; }
.kb-card-topics { display: flex; flex-direction: column; gap: 5px; margin: 6px 0 4px; padding-top: 10px; border-top: 1px solid var(--border); flex: 1; }
.kb-card-topic { position: relative; padding-left: 14px; font-size: 12.5px; color: var(--text); }
.kb-card-topic::before { content: ""; position: absolute; left: 2px; top: 0.55em; width: 5px; height: 5px; border-radius: 1.5px; background: var(--brand-orange); }
.kb-card-topic.is-more { color: var(--text-muted); }
.kb-card-topic.is-more::before { display: none; }
.kb-card-go { font-size: 12.5px; font-weight: 700; color: var(--brand-orange); }
.kb-block { margin-top: 26px; }
.kb-block-head { margin: 0 0 10px; font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }

/* Section / article: breadcrumb + search bar, side nav + main */
.kb-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 4px 0 16px; }
.kb-bar .kb-search { flex: 0 1 340px; }
.kb-crumbs { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; color: var(--text-muted); }
.kb-crumbs a { color: var(--text-muted); text-decoration: none; font-weight: 600; }
.kb-crumbs a:hover { color: var(--brand-orange); }
.kb-crumbs [aria-current] { color: var(--text); font-weight: 700; }
.kb-crumb-current { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 360px; }
.kb-crumb-sep { color: var(--border); }
.kb-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 22px; align-items: start; }
.kb-side { position: sticky; top: calc(var(--topbar-h, 61px) + 16px); }
.kb-nav { display: flex; flex-direction: column; gap: 2px; padding: 8px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.kb-nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; text-decoration: none; color: var(--text); font-size: 13px; font-weight: 600; }
.kb-nav-item:hover { background: var(--surface-2); }
.kb-nav-item.active { background: var(--brand-orange-soft); color: var(--brand-orange); }
.kb-nav-icon { display: inline-flex; flex-shrink: 0; width: 18px; height: 18px; color: var(--text-muted); }
.kb-nav-item.active .kb-nav-icon { color: var(--brand-orange); }
.kb-nav-label { flex: 1; min-width: 0; line-height: 1.3; }
.kb-nav-n { font-size: 11px; font-weight: 700; color: var(--text-muted); }
.kb-nav-topics { display: flex; flex-direction: column; margin: 2px 0 6px 19px; padding-left: 10px; border-left: 2px solid var(--border); }
.kb-nav-topic { padding: 5px 8px; font-size: 12.5px; color: var(--text-muted); text-decoration: none; border-radius: 6px; line-height: 1.35; }
.kb-nav-topic:hover { color: var(--brand-orange); background: var(--surface-2); }

.kb-section { display: flex; flex-direction: column; gap: 14px; }
.kb-section-head { display: flex; align-items: center; gap: 16px; padding: 22px 24px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.kb-section-icon { display: inline-flex; flex-shrink: 0; width: 52px; height: 52px; padding: 13px; border-radius: 15px; background: var(--brand-orange); color: #fff; box-shadow: 0 8px 20px color-mix(in srgb, var(--brand-orange) 30%, transparent); }
.kb-section-head h2 { margin: 0; font-size: 22px; letter-spacing: -0.02em; }
.kb-section-head p { margin: 3px 0 0; color: var(--text-muted); font-size: 13.5px; }
.kb-topic { scroll-margin-top: calc(var(--topbar-h, 61px) + 16px); padding: 16px 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); }
.kb-topic-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.kb-topic-head h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 15px; letter-spacing: -0.01em; }
.kb-topic-empty { margin: 0; font-size: 13px; color: var(--text-muted); }
.kb-rows { display: flex; flex-direction: column; }
.kb-rows > .kb-row + .kb-row { border-top: 1px solid var(--border); }
.kb-block .kb-rows, .kb-results .kb-rows { border-radius: 16px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); overflow: hidden; }
.kb-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 12px; text-decoration: none; color: var(--text); border-radius: 10px; transition: background 0.12s; }
.kb-block .kb-row, .kb-results .kb-row { border-radius: 0; padding: 12px 16px; }
.kb-row:hover { background: var(--surface-2); }
.kb-row-icon { display: inline-flex; width: 34px; height: 34px; padding: 8px; border-radius: 10px; background: var(--surface-2); color: var(--text-muted); transition: background 0.12s, color 0.12s; }
.kb-row:hover .kb-row-icon { background: var(--brand-orange-soft); color: var(--brand-orange); }
.kb-row-main { display: flex; flex-direction: column; min-width: 0; }
.kb-row-title { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; }
.kb-row-summary { font-size: 12.5px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kb-row-meta { font-size: 11.5px; color: var(--text-muted); margin-top: 1px; }
.kb-row-go { color: var(--text-muted); font-weight: 700; transition: transform 0.15s, color 0.15s; }
.kb-row:hover .kb-row-go { color: var(--brand-orange); transform: translateX(3px); }

.kb-related { margin-top: 10px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); }
.kb-related-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.kb-related-more { font-size: 12px; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--brand-orange); text-decoration: none; }
.kb-related-posts { display: flex; flex-direction: column; gap: 6px; }
.kb-related-post { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); text-align: left; cursor: pointer; font: inherit; color: var(--text); }
.kb-related-post:hover { border-color: var(--brand-orange); }
.kb-related-icon { display: inline-flex; width: 28px; height: 28px; padding: 6px; border-radius: 8px; background: var(--brand-orange-soft); }
.kb-related-icon svg { width: 16px; height: 16px; fill: none; stroke: var(--brand-orange); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.kb-related-main { display: flex; flex-direction: column; min-width: 0; }
.kb-related-title { font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kb-related-meta { font-size: 11.5px; color: var(--text-muted); }
.kb-related.is-cta { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; border: 1px dashed color-mix(in srgb, var(--brand-orange) 40%, var(--border)); background: var(--brand-orange-soft); }
.kb-related.is-cta p { margin: 0; font-size: 13px; flex: 1 1 260px; }

/* Article */
.kb-article { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; align-items: start; }
.kb-article.has-toc { grid-template-columns: minmax(0, 1fr) 200px; }
.kb-article-card { padding: 30px 36px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); min-width: 0; }
.kb-article-head { position: relative; padding-bottom: 18px; margin-bottom: 20px; border-bottom: 1px solid var(--border); }
.kb-article-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.kb-audience { padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: var(--surface-2); color: var(--text-muted); }
.kb-article-head h1 { margin: 12px 0 8px; font-size: 30px; line-height: 1.18; letter-spacing: -0.025em; }
.kb-article-meta { display: flex; gap: 8px; font-size: 12.5px; color: var(--text-muted); font-weight: 600; }
.kb-article-edit { position: absolute; top: 0; right: 0; }
.kb-article-body { font-size: 15px; line-height: 1.7; color: var(--text); }
.kb-article-body > * { margin: 0 0 14px; }
.kb-article-lead { font-size: 17px; line-height: 1.6; font-weight: 500; color: var(--text); }
.kb-article-body h2 { scroll-margin-top: calc(var(--topbar-h, 61px) + 16px); margin: 28px 0 10px; font-size: 20px; letter-spacing: -0.015em; }
.kb-article-body h3 { scroll-margin-top: calc(var(--topbar-h, 61px) + 16px); margin: 22px 0 8px; font-size: 16.5px; }
.kb-article-body ul { padding: 0; list-style: none; }
.kb-article-body ul li { position: relative; padding-left: 22px; margin: 5px 0; }
.kb-article-body ul li::before { content: ""; position: absolute; left: 5px; top: 0.7em; width: 7px; height: 7px; border-radius: 2px; background: var(--brand-orange); }
.kb-steps { padding: 0; list-style: none; counter-reset: kb-step; }
.kb-steps li { position: relative; counter-increment: kb-step; padding: 2px 0 2px 38px; margin: 10px 0; }
.kb-steps li::before { content: counter(kb-step); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 800; background: var(--brand-black); color: #fff; }
.kb-article-body code { padding: 1px 6px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); font-size: 0.88em; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.kb-code { margin: 0 0 16px; padding: 14px 16px; border-radius: 12px; background: #0e0f12; color: #eceef2; overflow-x: auto; font-size: 13px; line-height: 1.55; }
.kb-code code { padding: 0; border: 0; background: none; color: inherit; font-size: inherit; }
.kb-article-body a { color: var(--brand-orange); font-weight: 600; }
.kb-note { display: flex; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--brand-orange-soft); border-left: 3px solid var(--brand-orange); }
.kb-note-icon { display: inline-flex; flex-shrink: 0; width: 18px; height: 18px; margin-top: 3px; color: var(--brand-orange); }
.kb-note p { margin: 0; font-size: 14px; }
.kb-article-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--border); }
.kb-pn { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); text-decoration: none; color: var(--text); transition: border-color 0.15s; }
.kb-pn:hover { border-color: var(--brand-orange); }
.kb-pn.is-next { text-align: right; }
.kb-pn-label { font-size: 11.5px; font-weight: 700; color: var(--text-muted); }
.kb-pn-title { font-size: 13.5px; font-weight: 700; }
.kb-toc { position: sticky; top: calc(var(--topbar-h, 61px) + 16px); display: flex; flex-direction: column; gap: 2px; padding: 4px 0 4px 14px; border-left: 2px solid var(--border); }
.kb-toc-head { margin-bottom: 6px; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.kb-toc-link { padding: 3px 0; font-size: 12.5px; color: var(--text-muted); text-decoration: none; line-height: 1.35; }
.kb-toc-link.lvl-3 { padding-left: 10px; }
.kb-toc-link:hover { color: var(--brand-orange); }

.kb-results { display: flex; flex-direction: column; gap: 10px; }
.kb-results .kb-block-head + .int-empty-line { background: var(--surface); }
.kb-topic-hits { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.kb-topic-hit { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); text-decoration: none; color: var(--text); font-size: 13px; font-weight: 700; }
.kb-topic-hit:hover { border-color: var(--brand-orange); }
.kb-topic-hit small { display: block; font-size: 11.5px; font-weight: 500; color: var(--text-muted); }

/* Editor */
.kb-edit-modal { max-width: 820px; }
.kb-body-input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; line-height: 1.55; }
.kb-format-help { margin: 6px 0 0; font-size: 11.5px; color: var(--text-muted); line-height: 1.7; }
.kb-format-help code { padding: 0 4px; border-radius: 4px; background: var(--surface-2); font-size: 11px; }
.kb-edit-modal .kb-spacer { flex: 1; }

@media (max-width: 1080px) {
  .kb-sections { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kb-article.has-toc { grid-template-columns: minmax(0, 1fr); }
  .kb-toc { display: none; }
}
@media (max-width: 820px) {
  .kb-layout { grid-template-columns: 1fr; }
  .kb-side { position: static; }
  .kb-nav { flex-direction: row; overflow-x: auto; }
  .kb-nav-item { flex-shrink: 0; }
  .kb-nav-label { white-space: nowrap; }
  .kb-nav-topics { display: none; }
}
@media (max-width: 620px) {
  .kb-sections { grid-template-columns: 1fr; }
  .kb-hero { padding: 24px 20px; }
  .kb-hero h2 { font-size: 25px; }
  .kb-hero .kb-add { position: static; justify-self: start; }
  .kb-article-card { padding: 20px; }
  .kb-article-head h1 { font-size: 24px; }
  .kb-article-edit { position: static; margin-top: 10px; }
  .kb-article-foot { grid-template-columns: 1fr; }
}

/* Integration cards v2: a banner washed in the provider's own logo colours,
   the logo tile overlapping it, and a little motion on hover. */
.int-card { padding: 0; gap: 0; border-radius: 16px; }
.int-card-banner {
  position: relative; height: 64px; overflow: hidden; isolation: isolate;
  background: var(--surface-2);
}
.int-card-banner::before {
  content: ""; position: absolute; inset: -40%; z-index: -1;
  background-image: var(--logo); background-size: cover; background-position: center;
  filter: blur(22px) saturate(1.5); opacity: 0.85; transform: scale(1.1); transition: transform 0.5s ease, opacity 0.3s;
}
.int-card-banner::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(255,255,255,0) 30%, color-mix(in srgb, var(--surface) 55%, transparent) 100%),
              radial-gradient(rgba(255,255,255,0.18) 1px, transparent 1.2px) 0 0 / 10px 10px;
}
.int-card-banner.no-logo::before { background: linear-gradient(135deg, var(--surface-2), color-mix(in srgb, var(--brand-orange) 10%, var(--surface-2))); filter: none; opacity: 1; }
.int-card:hover .int-card-banner::before { transform: scale(1.3) rotate(4deg); }
.int-card-banner .int-card-corner { position: absolute; top: 10px; right: 10px; display: flex; gap: 6px; align-items: center; }
.int-card-banner .int-status { box-shadow: 0 2px 8px rgba(0,0,0,0.15); }
.int-card-banner .int-status.is-live { background: var(--green); color: var(--on-accent); }
.int-card-banner .int-status.is-live i { background: #fff; }
.int-card-banner .int-status.is-requested { background: var(--amber); color: var(--on-accent); }
.int-card-banner .int-card-edit { opacity: 0; background: color-mix(in srgb, var(--surface) 85%, transparent); color: var(--text); backdrop-filter: blur(6px); box-shadow: 0 2px 8px rgba(0,0,0,0.12); }
.int-card:hover .int-card-banner .int-card-edit, .int-card-banner .int-card-edit:focus-visible { opacity: 1; }
.int-card-banner .int-card-edit:hover { color: var(--brand-orange); background: var(--surface); }
@media (hover: none) { .int-card-banner .int-card-edit { opacity: 1; } }

.int-card-head { grid-template-columns: auto minmax(0, 1fr); align-items: end; gap: 12px; margin-top: -30px; padding: 0 14px; position: relative; }
.int-card-logo { padding: 4px; border-radius: 16px; background: var(--surface); box-shadow: 0 6px 16px rgba(20,21,26,0.14), 0 0 0 1px var(--border); transition: transform 0.2s ease; }
.int-card .int-avatar { width: 56px; height: 56px; font-size: 17px; border-radius: 12px; }
.int-card:hover .int-card-logo { transform: translateY(-3px) rotate(-2deg); }
.int-card-title { padding-bottom: 2px; }
.int-card-name { font-size: 15px; }
.int-card-desc { margin: 10px 14px 0; }
.int-card-foot { margin: 12px 14px 0; padding: 10px 0 12px; }

/* Live: green edge and a gentle glow instead of the top bar */
.int-card.is-active::before { display: none; }
.int-card.is-active { background: var(--surface); box-shadow: 0 0 0 1px color-mix(in srgb, var(--green) 25%, transparent), 0 8px 22px color-mix(in srgb, var(--green) 10%, transparent); }
.int-card.is-requested { background: var(--surface); }

/* Enable: slides its arrow on hover */
.int-card .int-enable { transition: background 0.15s, color 0.15s, border-color 0.15s, padding 0.15s; }
.int-card:hover .int-enable { background: var(--brand-orange); border-color: var(--brand-orange); color: #fff; }

/* Integration cards: the name sits inside the banner, beside the logo; the
   banner fades into the card at the bottom so the name reads on any colour.
   The website sits just below the banner's edge. */
.int-card-banner { height: 76px; }
.int-card-banner::after {
  background: linear-gradient(180deg, transparent 0%, color-mix(in srgb, var(--surface) 25%, transparent) 38%, color-mix(in srgb, var(--surface) 92%, transparent) 100%),
              radial-gradient(rgba(255,255,255,0.18) 1px, transparent 1.2px) 0 0 / 10px 10px;
}
.int-card-banner .int-card-name {
  position: absolute; left: 90px; right: 14px; bottom: 8px;
  font-size: 15.5px; font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.int-card-head { align-items: stretch; margin-top: -42px; gap: 12px; }
.int-card-title { display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: 42px 0 0; }
.int-card-site { margin-top: 0; line-height: 1.3; }
.int-card-desc { margin: 12px 14px 0; }

/* Integration banners: soft gradients of the logo's two strongest colours
   (intWash in app.js) instead of a live blur filter, so scrolling long lists
   of cards stays smooth. */
.int-card-banner::before {
  inset: -30%; filter: none; opacity: 1; transform: scale(1); transition: transform 0.6s ease;
  background: var(--surface-2);
}
.int-card-banner.has-wash::before {
  background:
    radial-gradient(45% 80% at 22% 40%, var(--wash-a), transparent 70%),
    radial-gradient(40% 75% at 78% 30%, var(--wash-b), transparent 70%),
    radial-gradient(60% 90% at 50% 60%, color-mix(in srgb, var(--wash-a) 45%, var(--surface)), transparent 80%),
    color-mix(in srgb, var(--wash-b) 22%, var(--surface));
}
.int-card:hover .int-card-banner::before { transform: scale(1.12) translateX(3%); }
.int-card-banner.no-logo::before { background: linear-gradient(135deg, var(--surface-2), color-mix(in srgb, var(--brand-orange) 10%, var(--surface-2))); }
.int-grid { contain: layout; }
.int-card { contain: paint; }

/* Product Support ----------------------------------------------------------- */
.sp-icon svg, .sp-type-icon svg, .sp-mini-icon svg, .sp-inbox-icon svg, .sp-inbox-flag svg, .sp-seg-icon svg, .sp-grip-icon svg,
.sp-move-icon svg, .sp-question-icon svg, .sp-type-card-icon svg, .sp-empty-icon svg {
  width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.sp-page { display: flex; flex-direction: column; gap: 16px; }
.sp-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 0; }
.sp-page-head p { max-width: 720px; }
.sp-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.sp-stat { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.sp-stat-n { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.sp-stat-label { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.sp-stat.is-alert { border-color: color-mix(in srgb, var(--amber) 45%, var(--border)); background: linear-gradient(160deg, var(--amber-soft), var(--surface) 70%); }
.sp-stat.is-alert .sp-stat-n { color: var(--amber); }

.sp-inbox { padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 1px solid color-mix(in srgb, var(--amber) 40%, var(--border)); box-shadow: var(--shadow); }
.sp-inbox h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 14px; }
.sp-inbox-flag { display: inline-flex; width: 16px; height: 16px; color: var(--amber); }
.sp-inbox-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; }
.sp-inbox-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); text-decoration: none; color: var(--text); border: 1px solid transparent; transition: border-color 0.15s; }
.sp-inbox-item:hover { border-color: var(--amber); }
.sp-inbox-icon { display: inline-flex; width: 32px; height: 32px; padding: 7px; border-radius: 10px; background: var(--amber-soft); color: var(--amber); }
.sp-inbox-icon.is-quote { background: var(--brand-orange-soft); color: var(--brand-orange); }
.sp-inbox-icon.is-feedback { background: var(--green-soft); color: var(--green); }
.sp-inbox-main { display: flex; flex-direction: column; min-width: 0; }
.sp-inbox-reason { font-size: 11px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--amber); }
.sp-inbox-title { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-inbox-go { font-size: 12px; font-weight: 700; color: var(--brand-orange); white-space: nowrap; }

.sp-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sp-seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); }
.sp-seg-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 0; border-radius: 999px; background: transparent; color: var(--text-muted); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.sp-seg-btn.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.sp-seg-icon { display: inline-flex; width: 15px; height: 15px; }
.sp-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.sp-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.sp-chip:hover { border-color: var(--brand-orange); }
.sp-chip.active { background: var(--brand-black); border-color: var(--brand-black); color: #fff; }
.sp-chip-n { font-size: 11px; color: var(--text-muted); }
.sp-chip.active .sp-chip-n { color: rgba(255,255,255,0.7); }
.sp-search { margin-left: auto; flex: 0 1 260px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font: inherit; font-size: 13px; color: var(--text); }
.sp-search:focus { outline: none; border-color: var(--brand-orange); }

/* Status pills: grey while new, blue while planned, orange in progress,
   amber when it's waiting on the client, green released, red declined. */
.sp-status { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; background: var(--gray-soft); color: var(--text-muted); }
.sp-status.sp-grp-estimate, .sp-status.sp-grp-planned { background: var(--blue-soft); color: var(--blue); }
.sp-status.sp-grp-progress { background: var(--brand-orange-soft); color: var(--brand-orange); }
.sp-status.is-waiting { background: var(--amber-soft); color: var(--amber); }
.sp-status.sp-st-released { background: var(--green-soft); color: var(--green); }
.sp-status.sp-st-declined { background: var(--red-soft); color: var(--red); }
.sp-status.sp-st-on_hold { background: var(--gray-soft); color: var(--text-muted); }
.sp-status.is-big { padding: 6px 14px; font-size: 13px; }
.sp-type { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; color: var(--text-muted); }
.sp-type-icon { display: inline-flex; width: 14px; height: 14px; }
.sp-type-idea .sp-type-icon { color: var(--amber); }
.sp-type-feature .sp-type-icon { color: var(--brand-orange); }
.sp-type-change .sp-type-icon { color: var(--blue); }
.sp-key { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; font-weight: 700; color: var(--text-muted); }
.sp-mini-icon { display: inline-flex; width: 13px; height: 13px; }
.sp-size { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 22px; padding: 0 6px; border-radius: 6px; font-size: 11px; font-weight: 800; background: var(--brand-black); color: #fff; }
.sp-quote-chip, .sp-q-chip, .sp-c-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700; color: var(--text-muted); white-space: nowrap; }
.sp-quote-chip.is-pending { color: var(--amber); }
.sp-quote-chip.is-approved { color: var(--green); }
.sp-quote-chip.is-declined { color: var(--red); text-decoration: line-through; }
.sp-q-chip { color: var(--amber); }
.sp-wait-flag { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 800; background: var(--amber-soft); color: var(--amber); white-space: nowrap; }

/* Priority list */
.sp-list-wrap { display: flex; flex-direction: column; gap: 8px; }
.sp-list-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sp-list-head h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 15px; }
.sp-list-hint { font-size: 12px; color: var(--text-muted); }
.sp-rows { list-style: none; margin: 0; padding: 0; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); overflow: hidden; }
.sp-row { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto auto 64px auto; gap: 12px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--border); background: var(--surface); transition: background 0.12s; }
.sp-rows:not(.can-reorder) .sp-row { grid-template-columns: auto minmax(0, 1fr) auto auto 64px; }
.sp-row:first-child { border-top: 0; }
.sp-row:hover { background: var(--surface-2); }
.sp-row.is-waiting { box-shadow: inset 3px 0 0 var(--amber); }
.sp-row.is-dragging { opacity: 0.55; background: var(--brand-orange-soft); }
.sp-grip { display: inline-flex; width: 18px; height: 18px; color: var(--text-muted); cursor: grab; opacity: 0.75; }
.sp-row:hover .sp-grip { opacity: 1; }
.sp-grip-icon { display: inline-flex; width: 18px; height: 18px; }
.sp-grip-icon svg { fill: currentColor; stroke: none; }
.sp-rank { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 9px; font-size: 13px; font-weight: 800; background: var(--surface-2); color: var(--text-muted); }
.sp-rank.is-top { background: var(--brand-orange); color: #fff; }
.sp-rank.is-closed { background: transparent; }
.sp-row-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; text-decoration: none; color: var(--text); }
.sp-row-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sp-row-title { font-size: 14px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-row-main:hover .sp-row-title { color: var(--brand-orange); }
.sp-row-badges { display: flex; align-items: center; gap: 10px; }
.sp-row-when { font-size: 12px; color: var(--text-muted); text-align: right; }
.sp-row-move { display: flex; flex-direction: column; gap: 2px; opacity: 0; transition: opacity 0.15s; }
.sp-row:hover .sp-row-move, .sp-row:focus-within .sp-row-move { opacity: 1; }
.sp-move { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 18px; padding: 0; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text-muted); cursor: pointer; }
.sp-move:hover:not(:disabled) { border-color: var(--brand-orange); color: var(--brand-orange); }
.sp-move:disabled { opacity: 0.35; cursor: default; }
.sp-move-icon { display: inline-flex; width: 13px; height: 13px; }
.sp-closed { margin-top: 8px; }
.sp-closed summary { display: flex; align-items: baseline; gap: 10px; padding: 8px 2px; font-size: 14px; font-weight: 700; cursor: pointer; }
.sp-closed-sub { font-size: 12px; font-weight: 500; color: var(--text-muted); }
.sp-rows.is-closed .sp-row { opacity: 0.85; }
@media (hover: none) { .sp-row-move { opacity: 1; } }

/* Board */
.sp-board { display: grid; grid-template-columns: repeat(5, minmax(220px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.sp-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 10px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--border); }
.sp-col-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 4px; font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.sp-col-cards { display: flex; flex-direction: column; gap: 8px; }
.sp-col-empty { padding: 16px 8px; text-align: center; font-size: 12px; color: var(--text-muted); border: 1px dashed var(--border); border-radius: 12px; }
.sp-card { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); text-decoration: none; color: var(--text); box-shadow: var(--shadow); transition: transform 0.15s, border-color 0.15s; }
.sp-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--brand-orange) 40%, var(--border)); }
.sp-card.is-waiting { box-shadow: inset 3px 0 0 var(--amber), var(--shadow); }
.sp-card-top { display: flex; align-items: center; justify-content: space-between; }
.sp-card-rank { font-size: 11px; font-weight: 800; color: var(--brand-orange); }
.sp-card-title { font-size: 13.5px; font-weight: 700; line-height: 1.35; }
.sp-card-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sp-card-badges { display: flex; gap: 8px; margin-left: auto; }
.sp-card .sp-status { font-size: 10.5px; padding: 2px 8px; }
.sp-card .sp-wait-flag { align-self: flex-start; }

.sp-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 40px 20px; text-align: center; border-radius: 16px; background: var(--surface); border: 1px dashed var(--border); }
.sp-empty-icon { display: inline-flex; width: 44px; height: 44px; padding: 10px; border-radius: 14px; background: var(--brand-orange-soft); color: var(--brand-orange); }
.sp-empty h3 { margin: 6px 0 0; }
.sp-empty p { margin: 0; color: var(--text-muted); font-size: 13px; }

/* Ticket */
.sp-crumbs { margin: 4px 0 14px; }
.sp-back { font-weight: 700; }
.sp-t-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.sp-t-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.sp-t-head { position: relative; padding: 22px 24px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.sp-t-head > .btn { position: absolute; top: 18px; right: 18px; }
.sp-t-tags { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sp-jira { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 6px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; font-weight: 700; background: var(--blue-soft); color: var(--blue); }
.sp-t-head h1 { margin: 10px 0 6px; padding-right: 120px; font-size: 26px; line-height: 1.2; letter-spacing: -0.02em; }
.sp-t-meta { display: flex; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-muted); font-weight: 600; }

.sp-flow-wrap { padding: 16px 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); overflow-x: auto; }
.sp-flow { display: flex; list-style: none; margin: 0; padding: 0; min-width: 640px; }
.sp-flow-step { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.sp-flow-step::before { content: ""; position: absolute; top: 13px; left: -50%; right: 50%; height: 2px; background: var(--border); z-index: 0; }
.sp-flow-step:first-child::before { display: none; }
.sp-flow-step.is-done::before, .sp-flow-step.is-current::before { background: var(--brand-orange); }
.sp-flow-dot { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; font-size: 11.5px; font-weight: 800; background: var(--surface); border: 2px solid var(--border); color: var(--text-muted); }
.sp-flow-step.is-done .sp-flow-dot { background: var(--brand-orange); border-color: var(--brand-orange); color: #fff; }
.sp-flow-step.is-current .sp-flow-dot { border-color: var(--brand-orange); color: var(--brand-orange); box-shadow: 0 0 0 4px var(--brand-orange-soft); }
.sp-flow-step.is-current.is-waiting .sp-flow-dot { border-color: var(--amber); color: var(--amber); box-shadow: 0 0 0 4px var(--amber-soft); }
.sp-flow-label { font-size: 11.5px; font-weight: 600; color: var(--text-muted); }
.sp-flow-step.is-current .sp-flow-label { color: var(--text); font-weight: 800; }
.sp-flow.is-stopped { opacity: 0.55; }
.sp-flow-note { margin-top: 12px; padding: 8px 12px; border-radius: 10px; font-size: 13px; font-weight: 600; }
.sp-flow-note.is-declined { background: var(--red-soft); color: var(--red); }
.sp-flow-note.is-on_hold { background: var(--gray-soft); color: var(--text-muted); }

.sp-waiting-banner { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 14px; background: var(--amber-soft); border: 1px solid color-mix(in srgb, var(--amber) 35%, transparent); }
.sp-waiting-banner .sp-inbox-flag { width: 20px; height: 20px; }
.sp-waiting-banner div { display: flex; flex-direction: column; font-size: 13px; }
.sp-waiting-banner strong { color: var(--amber); }

.sp-t-card { padding: 18px 20px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.sp-t-card h3 { margin: 0 0 10px; font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.sp-t-sub { margin-top: 16px !important; }
.sp-t-text { font-size: 14.5px; line-height: 1.6; }
.sp-t-text p { margin: 0 0 8px; }
.sp-t-text p:last-child { margin: 0; }
.sp-t-text ul { margin: 0 0 8px; padding-left: 18px; }
.sp-muted { margin: 6px 0 0; font-size: 13px; color: var(--text-muted); }
.sp-t-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.sp-sizes { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.sp-size-step { display: flex; align-items: center; justify-content: center; height: 34px; border-radius: 8px; font-size: 12.5px; font-weight: 800; background: var(--surface-2); color: var(--text-muted); }
.sp-size-step.is-on { background: var(--brand-black); color: #fff; transform: scale(1.08); box-shadow: 0 6px 16px rgba(0,0,0,0.18); }
.sp-est-range { margin: 12px 0 0; font-size: 14px; }
.sp-est-note { margin: 8px 0 0; font-size: 13.5px; color: var(--text); line-height: 1.5; }

.sp-quote.is-pending { border-color: color-mix(in srgb, var(--amber) 45%, var(--border)); }
.sp-quote.is-approved { border-color: color-mix(in srgb, var(--green) 35%, var(--border)); }
.sp-quote-amount { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
.sp-quote-state { padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: 0; }
.sp-quote-state.is-pending { background: var(--amber-soft); color: var(--amber); }
.sp-quote-state.is-approved { background: var(--green-soft); color: var(--green); }
.sp-quote-state.is-declined { background: var(--red-soft); color: var(--red); }
.sp-decide { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.sp-decide textarea, .sp-answer textarea, .sp-comment-box textarea, .sp-feedback textarea, .sp-staff textarea, .sp-staff input {
  width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); font: inherit; font-size: 13.5px; color: var(--text); resize: vertical;
}
.sp-decide textarea:focus, .sp-answer textarea:focus, .sp-comment-box textarea:focus, .sp-feedback textarea:focus { outline: none; border-color: var(--brand-orange); background: var(--surface); }
.sp-decide-btns { display: flex; justify-content: flex-end; gap: 8px; }

.sp-question { padding: 16px 18px; border-radius: 16px; background: var(--surface); border: 1px solid color-mix(in srgb, var(--amber) 45%, var(--border)); box-shadow: inset 4px 0 0 var(--amber), var(--shadow); }
.sp-question-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.sp-question-head div { display: flex; flex-direction: column; font-size: 12px; color: var(--text-muted); }
.sp-question-head strong { font-size: 13.5px; color: var(--text); }
.sp-question-icon { display: inline-flex; width: 32px; height: 32px; padding: 7px; border-radius: 10px; background: var(--amber-soft); color: var(--amber); }
.sp-answer { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; align-items: flex-end; }

.sp-stars { display: flex; gap: 4px; margin: 6px 0 10px; }
.sp-star-btn { display: inline-flex; width: 32px; height: 32px; padding: 3px; border: 0; background: transparent; cursor: pointer; color: var(--border); }
.sp-star-btn svg, .sp-star svg { width: 100%; height: 100%; fill: currentColor; stroke: none; }
.sp-star-btn.is-on, .sp-star.is-on { color: var(--brand-orange); }
.sp-star { display: inline-flex; width: 22px; height: 22px; color: var(--border); }

.sp-feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.sp-feed-sys { display: flex; align-items: center; gap: 10px; padding-left: 12px; font-size: 12.5px; color: var(--text-muted); }
.sp-feed-sys-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); flex-shrink: 0; }
.sp-feed-sys > span:nth-child(2) { color: var(--text); font-weight: 600; }
.sp-feed-when { margin-left: auto; font-size: 11.5px; color: var(--text-muted); white-space: nowrap; }
.sp-feed-item { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; }
.sp-avatar { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; font-size: 12px; font-weight: 800; background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.sp-avatar.is-staff { background: var(--brand-black); color: #fff; border-color: var(--brand-black); }
.sp-feed-body { padding: 10px 14px; border-radius: 4px 14px 14px 14px; background: var(--surface-2); min-width: 0; }
.sp-feed-item.is-question .sp-feed-body { background: var(--amber-soft); }
.sp-feed-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; font-size: 13px; }
.sp-staff-tag { padding: 1px 7px; border-radius: 999px; font-size: 10.5px; font-weight: 800; background: var(--brand-orange-soft); color: var(--brand-orange); }
.sp-q-tag { padding: 1px 7px; border-radius: 999px; font-size: 10.5px; font-weight: 800; background: var(--amber); color: var(--on-accent); }
.sp-q-tag.is-done { background: var(--green-soft); color: var(--green); }
.sp-feed-answer { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--surface); border-left: 3px solid var(--green); }
.sp-comment-form { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.sp-comment-box { display: flex; flex-direction: column; gap: 8px; }

/* Not sticky: with the product team's tools it can be taller than the screen. */
.sp-t-side { display: flex; flex-direction: column; gap: 12px; }
.sp-side-card { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.sp-side-card > .sp-status { align-self: flex-start; }
.sp-side-label { font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.sp-side-prio { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--border); }
.sp-prio-row { display: flex; align-items: center; justify-content: space-between; }
.sp-prio-n { font-size: 24px; font-weight: 800; color: var(--brand-orange); }
.sp-prio-n small { font-size: 13px; font-weight: 600; color: var(--text-muted); }
.sp-prio-move { display: flex; gap: 4px; }
.sp-prio-move .sp-move { width: 30px; height: 28px; }
.sp-details { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 7px 12px; margin: 4px 0 0; font-size: 13px; }
.sp-details dt { color: var(--text-muted); font-weight: 600; }
.sp-details dd { margin: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.sp-staff { border-style: dashed; border-color: color-mix(in srgb, var(--brand-orange) 45%, var(--border)); }
.sp-staff-field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--text-muted); }
.sp-staff-sub { margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--border); }
.sp-quote-inputs { display: grid; grid-template-columns: 1fr 90px; gap: 6px; }

/* New request dialog */
.sp-new-modal { max-width: 700px; }
.sp-type-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 6px 0 14px; }
.sp-type-card { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 12px; border-radius: 12px; border: 1.5px solid var(--border); background: var(--surface); text-align: left; cursor: pointer; font: inherit; color: var(--text); transition: border-color 0.15s, background 0.15s; }
.sp-type-card:hover { border-color: color-mix(in srgb, var(--brand-orange) 45%, var(--border)); }
.sp-type-card.active { border-color: var(--brand-orange); background: var(--brand-orange-soft); }
.sp-type-card-icon { display: inline-flex; width: 22px; height: 22px; margin-bottom: 4px; color: var(--brand-orange); }
.sp-type-card-label { font-size: 13.5px; font-weight: 700; }
.sp-type-card-hint { font-size: 11.5px; color: var(--text-muted); line-height: 1.35; }
.sp-new-modal .sp-spacer { flex: 1; }

@media (max-width: 1080px) {
  .sp-t-layout { grid-template-columns: 1fr; }
  .sp-t-side { position: static; }
  .sp-row { grid-template-columns: auto auto minmax(0, 1fr) auto auto; }
  .sp-row-badges, .sp-row-when { display: none; }
  .sp-rows:not(.can-reorder) .sp-row { grid-template-columns: auto minmax(0, 1fr) auto; }
}
@media (max-width: 760px) {
  .sp-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sp-t-pair { grid-template-columns: 1fr; }
  .sp-type-pick { grid-template-columns: 1fr; }
  .sp-search { margin-left: 0; flex: 1 1 100%; }
  .sp-t-head h1 { padding-right: 0; font-size: 22px; }
  .sp-t-head > .btn { position: static; margin-top: 10px; }
  .sp-page-head { flex-direction: column; align-items: flex-start; }
}

/* News cards: the type tag sits small in the top-right corner, away from the
   text that's usually on the left of the cover image. */
.hub-insight-media .hub-insight-tag {
  left: auto; right: 8px; top: 8px; gap: 4px; padding: 2px 8px 2px 3px; font-size: 9.5px; letter-spacing: 0.05em;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
.hub-insight-media .hub-insight-tag .hub-insight-icon { width: 16px; height: 16px; }
.hub-insight-media .hub-insight-tag .hub-insight-icon svg { width: 10px; height: 10px; }

/* Reading view: article headings and emphasis */
.hub-reader-text h2 { margin: 22px 0 8px; font-size: 18px; letter-spacing: -0.01em; line-height: 1.3; }
.hub-reader-text h2:first-child { margin-top: 0; }
.hub-reader-text h3 { margin: 18px 0 6px; font-size: 15.5px; }
.hub-reader-text strong { font-weight: 700; }
.hub-reader-text a { color: var(--brand-orange); font-weight: 600; }
.hub-reader-text .kb-note { margin: 0 0 12px; }
/* Long articles scroll inside the body; the header and footer keep their size. */
.hub-reader .hub-reader-head, .hub-reader .hub-reader-foot { flex-shrink: 0; }
/* Quotes are in story points: the number, then the unit */
.sp-quote-amount { align-items: baseline; gap: 8px; }
.sp-quote-unit { font-size: 15px; font-weight: 700; letter-spacing: 0; color: var(--text-muted); margin-right: 4px; }
.sp-quote-amount .sp-quote-state { align-self: center; }

/* Priority list while filtering: every request stays in the order; the ones
   that don't match fade back. */
.sp-row.is-dimmed { opacity: 0.38; }
.sp-row.is-dimmed:hover { opacity: 0.8; }
.sp-list-hint.is-filtered { color: var(--brand-orange); font-weight: 600; }
.sp-list-hint .link-btn { margin-left: 4px; }

/* Product Support: stats, "Needs your input" and "Waiting on you" -------- */
.sp-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sp-stat { flex-direction: row; align-items: center; gap: 14px; }
.sp-stat-icon { display: inline-flex; flex-shrink: 0; width: 40px; height: 40px; padding: 10px; border-radius: 12px; background: var(--surface-2); color: var(--text-muted); }
.sp-stat-text { display: flex; flex-direction: column; }
.sp-stat-icon svg, .sp-attn-flag svg, .sp-attn-b-icon svg, .sp-attn-ask-icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.sp-attn {
  display: grid; grid-template-columns: 280px minmax(0, 1fr); overflow: hidden;
  border-radius: 20px; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 10px 30px rgba(20,21,26,0.06);
}
.sp-attn-summary {
  position: relative; display: flex; flex-direction: column; gap: 10px; padding: 22px; color: #fff; overflow: hidden;
  background: radial-gradient(120% 120% at 0% 100%, color-mix(in srgb, var(--brand-orange) 55%, #000) 0%, #140801 55%, var(--brand-black) 100%);
}
.sp-attn-summary::after { content: ""; position: absolute; right: -50px; top: -50px; width: 160px; height: 160px; border-radius: 50%; border: 26px solid rgba(255,255,255,0.05); }
.sp-attn-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: color-mix(in srgb, var(--brand-orange) 60%, #fff); }
.sp-attn-flag { display: inline-flex; width: 15px; height: 15px; }
.sp-attn-count { display: flex; flex-direction: column; }
.sp-attn-n { font-size: 52px; font-weight: 800; line-height: 1; letter-spacing: -0.03em; }
.sp-attn-n-label { font-size: 15px; font-weight: 700; margin-top: 4px; }
.sp-attn-summary p { margin: 0; font-size: 12.5px; line-height: 1.5; color: rgba(255,255,255,0.72); }
.sp-attn-breakdown { list-style: none; margin: 6px 0 0; padding: 12px 0 0; border-top: 1px solid rgba(255,255,255,0.12); display: flex; flex-direction: column; gap: 7px; }
.sp-attn-breakdown li { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: rgba(255,255,255,0.85); }
.sp-attn-breakdown b { color: #fff; }
.sp-attn-b-icon { display: inline-flex; width: 22px; height: 22px; padding: 4px; border-radius: 7px; background: rgba(255,255,255,0.1); color: #fff; }

.sp-attn-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; padding: 16px; align-content: start; }
.sp-attn-card { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s; }
.sp-attn-card:hover { border-color: color-mix(in srgb, var(--brand-orange) 40%, var(--border)); box-shadow: 0 8px 22px rgba(20,21,26,0.07); transform: translateY(-1px); }
.sp-attn-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sp-attn-card-top { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text-muted); }
.sp-attn-card-title { font-size: 14.5px; font-weight: 700; line-height: 1.35; color: var(--text); text-decoration: none; }
.sp-attn-card-title:hover { color: var(--brand-orange); }
.sp-attn-due { font-size: 11.5px; font-weight: 700; color: var(--text-muted); }

.sp-attn-asks { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.sp-attn-ask { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 11px; background: var(--surface-2); }
.sp-attn-ask-icon { display: inline-flex; width: 30px; height: 30px; padding: 7px; border-radius: 9px; }
.sp-attn-ask.is-question .sp-attn-ask-icon { background: var(--amber-soft); color: var(--amber); }
.sp-attn-ask.is-quote .sp-attn-ask-icon { background: var(--brand-orange-soft); color: var(--brand-orange); }
.sp-attn-ask.is-feedback .sp-attn-ask-icon { background: var(--green-soft); color: var(--green); }
.sp-attn-ask-text { display: flex; flex-direction: column; min-width: 0; }
.sp-attn-ask-text strong { font-size: 13px; }
.sp-attn-ask-text span { font-size: 11.5px; color: var(--text-muted); line-height: 1.35; }
.sp-attn-btn { white-space: nowrap; font-weight: 700; }
.sp-attn-btn.is-quote { background: var(--brand-orange); border-color: var(--brand-orange); color: #fff; }
.sp-attn-btn.is-quote:hover { filter: brightness(0.95); }

.sp-caught-up { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 16px; background: var(--surface); border: 1px solid color-mix(in srgb, var(--green) 30%, var(--border)); }
.sp-caught-up-icon { display: inline-flex; flex-shrink: 0; width: 36px; height: 36px; padding: 8px; border-radius: 50%; background: var(--green-soft); color: var(--green); }
.sp-caught-up-icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.sp-caught-up div { display: flex; flex-direction: column; font-size: 13px; }
.sp-caught-up span { color: var(--text-muted); font-size: 12.5px; }

/* Ticket: "Waiting on you" checklist */
.sp-waiting { padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 1px solid color-mix(in srgb, var(--amber) 40%, var(--border)); box-shadow: inset 4px 0 0 var(--amber), var(--shadow); }
.sp-waiting-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.sp-waiting-head .sp-attn-flag { color: var(--amber); width: 16px; height: 16px; }
.sp-waiting-head strong { font-size: 14px; }
.sp-waiting-sub { font-size: 12.5px; color: var(--text-muted); }
.sp-waiting .sp-attn-ask { background: var(--surface-2); }

/* The part of the ticket an ask points to: a brief highlight on arrival */
@keyframes sp-flash { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand-orange) 55%, transparent); } 100% { box-shadow: 0 0 0 14px transparent; } }
.is-flash { animation: sp-flash 0.9s ease-out 2; }

@media (max-width: 900px) {
  .sp-attn { grid-template-columns: 1fr; }
  .sp-attn-summary { flex-direction: row; flex-wrap: wrap; align-items: flex-end; gap: 14px; }
  .sp-attn-summary p { flex-basis: 100%; }
}
@media (max-width: 620px) {
  .sp-stats { grid-template-columns: 1fr; }
  .sp-attn-ask { grid-template-columns: auto minmax(0, 1fr); }
  .sp-attn-btn { grid-column: 1 / -1; justify-self: end; }
}
/* Needs your input: roomier cards; each ask's button sits under its text */
.sp-attn-cards { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.sp-attn .sp-key, .sp-attn .sp-type { white-space: nowrap; }
.sp-attn-card-top { flex-wrap: nowrap; min-width: 0; }
.sp-attn-ask { grid-template-columns: auto minmax(0, 1fr); align-items: start; row-gap: 8px; padding: 10px 12px; }
.sp-attn-ask .sp-attn-btn { grid-column: 2; justify-self: start; }
.sp-attn-ask-text strong { font-size: 13.5px; }
.sp-attn-ask-text span { font-size: 12px; margin-top: 1px; }
.sp-waiting .sp-attn-asks { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
/* Ticket checklist: items stretch across, button on the right */
.sp-waiting .sp-attn-asks { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.sp-waiting .sp-attn-ask { grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; }
.sp-waiting .sp-attn-ask .sp-attn-btn { grid-column: auto; }
@media (max-width: 620px) {
  .sp-waiting .sp-attn-ask { grid-template-columns: auto minmax(0, 1fr); }
  .sp-waiting .sp-attn-ask .sp-attn-btn { grid-column: 2; justify-self: start; }
}

/* Product Support v2: cleaner header, stage chips, sticky toolbar, compact
   rows with a progress track, and the quick view panel. */
.sp-page { gap: 14px; }
.sp-page-head { align-items: center; }
.sp-page-head h2 { font-size: 24px; letter-spacing: -0.02em; }
.sp-new-btn { display: inline-flex; align-items: center; gap: 10px; }
.sp-new-btn kbd, .sp-search-box kbd {
  display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 5px;
  font: 700 10.5px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}
.sp-new-btn kbd { background: rgba(255,255,255,0.22); color: #fff; }
.sp-stats { display: none; }

.sp-stages { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 4px; scrollbar-width: none; }
.sp-stages::-webkit-scrollbar { display: none; }
.sp-stage {
  position: relative; display: inline-flex; align-items: baseline; gap: 8px; padding: 10px 16px; border-radius: 14px; cursor: pointer; flex-shrink: 0;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; box-shadow: var(--shadow);
  transition: border-color 0.15s, transform 0.15s, background 0.15s;
}
.sp-stage:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--brand-orange) 40%, var(--border)); }
.sp-stage-n { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; line-height: 1; }
.sp-stage-label { font-size: 12.5px; font-weight: 600; color: var(--text-muted); }
.sp-stage.is-empty .sp-stage-n { color: var(--text-muted); }
.sp-stage.active { background: var(--brand-black); border-color: var(--brand-black); }
.sp-stage.active .sp-stage-n, .sp-stage.active .sp-stage-label { color: #fff; }
.sp-stage-waiting:not(.is-empty) .sp-stage-n { color: var(--amber); }
.sp-stage-waiting.active { background: var(--amber); border-color: var(--amber); }
.sp-stage::after { content: ""; position: absolute; left: 16px; right: 16px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: transparent; }
.sp-stage-progress:not(.is-empty)::after { background: var(--brand-orange); }
.sp-stage-done:not(.is-empty)::after { background: var(--green); }
.sp-stage-planned:not(.is-empty)::after, .sp-stage-estimate:not(.is-empty)::after { background: var(--blue); }

.sp-toolbar {
  position: sticky; top: var(--topbar-h, 61px); z-index: 12; margin: 0 -4px; padding: 10px 4px;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px);
}
.sp-chip { gap: 6px; }
.sp-chip-icon { display: inline-flex; width: 14px; height: 14px; }
.sp-chip-icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sp-search-box {
  margin-left: auto; flex: 0 1 280px; display: flex; align-items: center; gap: 8px; padding: 0 8px 0 12px; height: 36px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface); cursor: text; transition: border-color 0.15s, box-shadow 0.15s;
}
.sp-search-box:focus-within { border-color: var(--brand-orange); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-orange) 15%, transparent); }
.sp-search-box input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 13px; color: var(--text); outline: none; }
.sp-search-icon { display: inline-flex; width: 16px; height: 16px; color: var(--text-muted); }
.sp-search-icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.sp-search-box kbd { background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); }
.sp-search-box:focus-within kbd { display: none; }

/* Rows: cleaner and clickable */
.sp-row { grid-template-columns: auto auto minmax(0, 1fr) auto 150px 64px auto; cursor: pointer; padding: 12px 16px; }
.sp-rows:not(.can-reorder) .sp-row { grid-template-columns: auto minmax(0, 1fr) auto 150px 64px; }
.sp-row:focus-visible { outline: 2px solid var(--brand-orange); outline-offset: -2px; }
.sp-row.is-peeked { background: var(--brand-orange-soft); }
.sp-row-state { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.sp-row-title { font-size: 14.5px; }
.sp-row:hover .sp-row-title { color: var(--brand-orange); }
.sp-row-badges { gap: 12px; }
.sp-row-move { flex-direction: row; gap: 4px; }
.sp-row-move .sp-move { width: 26px; height: 26px; }
.sp-move-top { border-color: color-mix(in srgb, var(--brand-orange) 35%, var(--border)); color: var(--brand-orange); }

.sp-track { display: grid; grid-template-columns: repeat(8, 1fr); gap: 3px; width: 120px; }
.sp-track i { height: 4px; border-radius: 2px; background: var(--border); }
.sp-track i.is-done { background: var(--brand-orange); }
.sp-track i.is-now { background: var(--brand-orange); box-shadow: 0 0 0 2px var(--brand-orange-soft); }
.sp-track.is-waiting i.is-now { background: var(--amber); box-shadow: 0 0 0 2px var(--amber-soft); }
.sp-track.is-stopped i { background: var(--border); box-shadow: none; }
.sp-status + .sp-track { margin-left: 1px; }

/* Board cards: open the quick view */
.sp-card { cursor: pointer; }

/* Quick view */
.sp-peek { position: fixed; inset: 0; z-index: 90; pointer-events: none; }
.sp-peek-backdrop { position: absolute; inset: 0; background: rgba(10,10,12,0.28); opacity: 0; transition: opacity 0.2s; }
.sp-peek-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(460px, 100vw); display: flex; flex-direction: column;
  background: var(--surface); border-left: 1px solid var(--border); box-shadow: -18px 0 50px rgba(10,10,12,0.18);
  transform: translateX(100%); transition: transform 0.26s cubic-bezier(.2,.8,.2,1);
}
.sp-peek.is-open { pointer-events: auto; }
.sp-peek.is-open .sp-peek-backdrop { opacity: 1; }
.sp-peek.is-open .sp-peek-panel { transform: none; }
.sp-peek-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px 12px 20px; border-bottom: 1px solid var(--border); }
.sp-peek-id { display: inline-flex; align-items: center; gap: 10px; }
.sp-peek-tools { display: inline-flex; align-items: center; gap: 4px; }
.sp-peek-pos { font-size: 11.5px; font-weight: 700; color: var(--text-muted); margin-right: 6px; }
.sp-peek-nav { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text-muted); cursor: pointer; }
.sp-peek-nav:hover:not(:disabled) { color: var(--brand-orange); border-color: var(--brand-orange); }
.sp-peek-nav:disabled { opacity: 0.35; cursor: default; }
.sp-peek-nav .sp-move-icon { width: 15px; height: 15px; }
.sp-peek-body { flex: 1; overflow-y: auto; padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 16px; }
.sp-peek-title { margin: 0; font-size: 21px; line-height: 1.25; letter-spacing: -0.02em; }
.sp-peek-state { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sp-peek-rank { font-size: 12px; font-weight: 800; color: var(--brand-orange); }
.sp-peek-asks .sp-attn-ask { grid-template-columns: auto minmax(0, 1fr); }
.sp-peek-asks .sp-attn-btn { grid-column: 2; justify-self: start; }
.sp-peek-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 0; border-radius: 12px; overflow: hidden; background: var(--border); border: 1px solid var(--border); }
.sp-peek-facts > div { padding: 10px 12px; background: var(--surface); }
.sp-peek-facts dt { font-size: 10.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.sp-peek-facts dd { margin: 3px 0 0; font-size: 13px; font-weight: 600; }
.sp-peek-sec h3 { margin: 0 0 8px; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.sp-peek-sec p { margin: 0; font-size: 13.5px; line-height: 1.6; }
.sp-peek-feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.sp-peek-feed li { display: grid; grid-template-columns: 10px minmax(0, 1fr); gap: 10px; }
.sp-peek-feed-dot { width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: var(--border); }
.sp-peek-feed li.is-question .sp-peek-feed-dot { background: var(--amber); }
.sp-peek-feed li.is-comment .sp-peek-feed-dot { background: var(--brand-orange); }
.sp-peek-feed-body { display: flex; flex-direction: column; min-width: 0; }
.sp-peek-feed-text { font-size: 13px; line-height: 1.45; }
.sp-peek-feed-meta { font-size: 11.5px; color: var(--text-muted); }
.sp-peek-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--border); background: var(--surface-2); }
.sp-btn-icon { display: inline-flex; width: 14px; height: 14px; margin-right: 6px; vertical-align: -2px; }
.sp-btn-icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (prefers-reduced-motion: reduce) { .sp-peek-panel, .sp-peek-backdrop { transition: none; } }

@media (max-width: 1080px) {
  .sp-row { grid-template-columns: auto auto minmax(0, 1fr) auto auto; }
  .sp-rows:not(.can-reorder) .sp-row { grid-template-columns: auto minmax(0, 1fr) auto; }
  .sp-track { display: none; }
}
@media (max-width: 760px) {
  .sp-search-box { flex: 1 1 100%; margin-left: 0; }
  .sp-new-btn kbd { display: none; }
}
/* The quick view's footer isn't the page footer. */
.sp-peek-panel > .sp-peek-foot { width: auto; max-width: none; margin: 0; text-align: left; font-size: inherit; color: inherit; }
/* Priority order: only submitted requests move; the rest are locked in place */
.sp-lock { display: inline-flex; width: 18px; height: 18px; color: var(--text-muted); opacity: 0.7; cursor: help; }
.sp-lock .sp-grip-icon svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sp-row.is-locked .sp-rank { background: var(--surface-2); color: var(--text-muted); }
.sp-row.is-locked .sp-rank.is-top { background: color-mix(in srgb, var(--brand-orange) 14%, var(--surface-2)); color: var(--brand-orange); }
.sp-rows.is-sorting .sp-row.is-locked { background: repeating-linear-gradient(135deg, var(--surface), var(--surface) 8px, var(--surface-2) 8px, var(--surface-2) 16px); opacity: 0.7; }
.sp-rows.is-sorting .sp-row.is-movable:not(.is-dragging) { box-shadow: inset 3px 0 0 var(--brand-orange); }
.sp-peek-locked, .sp-prio-lock { display: inline-flex; align-items: center; margin-right: auto; font-size: 12px; font-weight: 600; color: var(--text-muted); }
.sp-prio-lock { margin-right: 0; }
/* List: Backlog, then In Progress */
.sp-list-head-next { margin-top: 14px; }
.sp-rank.is-step { width: auto; min-width: 34px; padding: 0 6px; font-size: 10.5px; background: var(--brand-orange-soft); color: var(--brand-orange); }
.sp-rows.is-progress .sp-row { background: var(--surface); }
.sp-filter-note { padding: 8px 12px; border-radius: 10px; background: var(--brand-orange-soft); color: var(--brand-orange); font-size: 12.5px; font-weight: 600; }
.sp-filter-note .link-btn { margin-left: 4px; }
.sp-rows.is-sorting .sp-row.is-movable:not(.is-dragging) { box-shadow: inset 3px 0 0 var(--brand-orange); }

/* Video player modal (Platform Hub podcasts / videos) */
.video-overlay { z-index: 120; align-items: center; background: rgba(6,6,8,0.82); backdrop-filter: blur(4px); padding: 32px 20px; }
.video-modal {
  position: relative; width: min(1100px, 100%); border-radius: 18px; overflow: hidden; background: #0c0c0e; color: #fff;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5); animation: hub-reader-in 0.22s ease-out;
}
.video-stage { position: relative; aspect-ratio: 16 / 9; background: #000; }
.video-stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-stage:fullscreen { aspect-ratio: auto; width: 100vw; height: 100vh; }
.video-close {
  position: absolute; top: 10px; right: 10px; z-index: 2; width: 36px; height: 36px; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(0,0,0,0.55); color: #fff; font-size: 22px; line-height: 1; backdrop-filter: blur(6px); transition: background 0.15s;
}
.video-close:hover { background: var(--brand-orange); }
.video-bar { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 16px 20px 18px; border-top: 3px solid var(--brand-orange); }
.video-info { min-width: 0; flex: 1 1 380px; }
.video-eyebrow { font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: color-mix(in srgb, var(--brand-orange) 60%, #fff); }
.video-info h2 { margin: 4px 0 4px; font-size: 19px; line-height: 1.3; letter-spacing: -0.01em; color: #fff; }
.video-info p { margin: 0; font-size: 13px; line-height: 1.5; color: rgba(255,255,255,0.7); }
.video-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.video-steps { display: inline-flex; gap: 6px; margin-right: 4px; }
.video-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px; cursor: pointer; text-decoration: none;
  border: 1px solid rgba(255,255,255,0.16); background: rgba(255,255,255,0.06); color: #fff; font: inherit; font-size: 12.5px; font-weight: 700;
  transition: background 0.15s, border-color 0.15s;
}
.video-btn:hover:not(:disabled) { background: rgba(255,255,255,0.14); border-color: rgba(255,255,255,0.3); }
.video-btn:disabled { opacity: 0.35; cursor: default; }
.video-btn.is-on { background: var(--green); border-color: var(--green); }
#videoFullBtn { background: var(--brand-orange); border-color: var(--brand-orange); }
#videoFullBtn:hover { filter: brightness(1.05); }
.video-btn-icon { display: inline-flex; width: 15px; height: 15px; }
.video-btn-icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 620px) {
  .video-overlay { padding: 0; }
  .video-modal { border-radius: 0; }
  .video-bar { padding: 12px 14px; }
}
/* Close sits just outside the player's corner, clear of YouTube's controls */
.video-modal { overflow: visible; }
.video-stage { border-radius: 18px 18px 0 0; overflow: hidden; }
.video-bar { border-radius: 0 0 18px 18px; background: #0c0c0e; }
.video-close { top: -44px; right: 0; }
.video-overlay { padding-top: 64px; }
@media (max-width: 620px) {
  .video-close { top: 8px; right: 8px; }
  .video-overlay { padding-top: 0; }
  .video-stage, .video-bar { border-radius: 0; }
}

/* In Progress and Closed rows have no priority column */
.sp-rows.is-progress .sp-row, .sp-rows.is-closed .sp-row { grid-template-columns: minmax(0, 1fr) auto 150px 64px; }
@media (max-width: 1080px) {
  .sp-rows.is-progress .sp-row, .sp-rows.is-closed .sp-row { grid-template-columns: minmax(0, 1fr) auto; }
}

/* Product Support → New request: the four-step form */
.sp-new-modal { max-width: 780px; }
.sp-wiz-stepper li.done:not(:last-child)::after { background: var(--brand-orange); }
.sp-wiz-stepper li.current .inc-step-num { border-color: var(--brand-orange); color: var(--brand-orange); box-shadow: 0 0 0 4px var(--brand-orange-soft); }
.sp-wiz-stepper li.done .inc-step-num { background: var(--brand-orange); border-color: var(--brand-orange); }
.sp-wiz-body { height: min(560px, calc(100vh - 240px)); overflow-y: auto; padding: 16px 22px 20px; }
.sp-wiz-step { display: flex; flex-direction: column; gap: 16px; animation: hub-reader-step 0.2s ease-out; }
.sp-wiz-h { margin: 0; font-size: 16px; letter-spacing: -0.01em; }
.sp-wiz-intro { margin: -8px 0 0; font-size: 13px; color: var(--text-muted); }
.sp-wiz-foot { gap: 8px; }
.sp-wiz-draft { font-size: 12px; color: var(--text-muted); }
.sp-draft-note { margin-bottom: 12px; padding: 8px 12px; border-radius: 10px; background: var(--brand-orange-soft); color: var(--brand-orange); font-size: 12.5px; font-weight: 600; }

.sp-f { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.sp-f-label { font-size: 13px; font-weight: 700; color: var(--text); }
.sp-f-label .req { color: var(--brand-orange); }
.sp-opt { font-weight: 500; color: var(--text-muted); font-size: 12px; }
.sp-hint { margin: -2px 0 0; font-size: 12px; color: var(--text-muted); line-height: 1.45; }
.sp-f input[type="text"], .sp-f input[type="date"], .sp-f textarea, .sp-f select.field-select {
  width: 100%; padding: 9px 11px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; font-size: 13.5px;
}
.sp-f select.field-select { height: 40px; }
.sp-f textarea { resize: vertical; line-height: 1.5; min-height: 64px; }
.sp-f input:focus, .sp-f textarea:focus, .sp-f select:focus { outline: none; border-color: var(--brand-orange); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-orange) 15%, transparent); }
.sp-f.has-error input[aria-invalid], .sp-f.has-error textarea[aria-invalid], .sp-f.has-error select[aria-invalid], .sp-f.has-error .sp-chipset { border-color: var(--red); }
.sp-err { margin: 0; font-size: 12.5px; font-weight: 600; color: var(--red); }
.sp-fixed { margin: 0; font-size: 13.5px; font-weight: 600; }

.sp-new-modal .sp-type-pick { margin: 0; }
.sp-new-modal .sp-type-card { padding: 14px; }
.sp-new-modal .sp-type-card:focus-visible { outline: 2px solid var(--brand-orange); outline-offset: 2px; }

.sp-chipset { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px; border: 1px solid transparent; border-radius: 12px; }
.sp-chipbox { position: relative; display: inline-flex; cursor: pointer; }
.sp-chipbox input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sp-chipbox span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: 12.5px; font-weight: 600; transition: background 0.12s, border-color 0.12s; }
.sp-chipbox span::before { content: ""; width: 14px; height: 14px; border-radius: 4px; border: 1.5px solid var(--border); background: var(--surface); flex-shrink: 0; }
.sp-chipbox input:checked + span { background: var(--brand-orange-soft); border-color: var(--brand-orange); color: var(--brand-orange); }
.sp-chipbox input:checked + span::before { border-color: var(--brand-orange); background: var(--brand-orange) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 11px no-repeat; }
.sp-chipbox input:focus-visible + span { outline: 2px solid var(--brand-orange); outline-offset: 2px; }
.sp-f .sp-chipset + input[type="text"] { margin-top: 2px; }

.sp-seg-radios { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); align-self: flex-start; }
.sp-seg-radio { position: relative; cursor: pointer; }
.sp-seg-radio input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sp-seg-radio span { display: inline-block; padding: 6px 16px; border-radius: 999px; font-size: 12.5px; font-weight: 700; color: var(--text-muted); }
.sp-seg-radio input:checked + span { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.sp-seg-radio input:focus-visible + span { outline: 2px solid var(--brand-orange); outline-offset: 1px; }

.sp-reqs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.sp-req { display: flex; align-items: center; gap: 8px; }
.sp-req-n { width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; color: #fff; background: var(--brand-orange); }
.sp-req input { flex: 1; }
.sp-req-del { flex-shrink: 0; width: 28px; height: 28px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text-muted); font-size: 16px; line-height: 1; cursor: pointer; }
.sp-req-del:hover { color: var(--red); border-color: var(--red); }
.sp-req-add { align-self: flex-start; }

.sp-date-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.sp-date-row input[type="date"] { width: 200px; }
.sp-check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; cursor: pointer; }
.sp-check input { width: 16px; height: 16px; accent-color: var(--brand-orange); }
.sp-deadline { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border-left: 3px solid var(--brand-orange); }

.sp-drop { display: flex; flex-direction: column; gap: 3px; align-items: center; text-align: center; padding: 16px; border: 2px dashed var(--border); border-radius: 12px; background: var(--surface-2); cursor: pointer; font-size: 13px; transition: border-color 0.15s, background 0.15s; }
.sp-drop span { font-size: 11.5px; color: var(--text-muted); }
.sp-drop:hover, .sp-drop:focus-visible, .sp-drop.dragging { border-color: var(--brand-orange); background: var(--brand-orange-soft); outline: none; }
.sp-files { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.sp-file { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); }
.sp-file-icon { display: inline-flex; width: 30px; height: 30px; padding: 6px; border-radius: 8px; background: var(--surface-2); color: var(--text-muted); }
.sp-file-icon.is-img { background: var(--brand-orange-soft); color: var(--brand-orange); }
.sp-file-icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sp-file-thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
.sp-file-name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
a.sp-file-name { color: var(--brand-orange); text-decoration: none; }
a.sp-file-name:hover { text-decoration: underline; }
.sp-file-size { font-size: 11.5px; color: var(--text-muted); white-space: nowrap; }
.sp-file.is-saved { background: var(--surface-2); }
.sp-attach-add { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.sp-attach-card h3 { display: flex; align-items: center; gap: 8px; }
.sp-req-view { margin: 0; padding-left: 20px; font-size: 14.5px; line-height: 1.6; }
.sp-details-card .sp-t-text { white-space: pre-wrap; }

.sp-submit-note { margin: 4px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--blue-soft); color: var(--blue); font-size: 12.5px; line-height: 1.5; font-weight: 600; }
.sp-done { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 40px 20px; }
.sp-done-icon { display: inline-flex; width: 60px; height: 60px; padding: 14px; border-radius: 50%; background: var(--green-soft); color: var(--green); animation: hub-reader-in 0.3s ease-out; }
.sp-done-icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.sp-done h3 { margin: 4px 0 0; font-size: 20px; }
.sp-done p { margin: 0; max-width: 460px; font-size: 13.5px; color: var(--text-muted); line-height: 1.55; }
.sp-done-actions { margin-top: 8px; }
.sp-domain-suggest { font-size: 12px; color: var(--text-muted); }

@media (max-width: 620px) {
  .sp-wiz-body { height: auto; max-height: calc(100vh - 200px); padding: 14px; }
  .sp-deadline { grid-template-columns: 1fr; }
  .sp-date-row input[type="date"] { width: 100%; }
  .sp-new-modal .sp-type-pick { grid-template-columns: 1fr; }
}

/* Product Support → Your Priorities */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.sp-head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sp-prio-btn { display: inline-flex; align-items: center; font-weight: 700; }
.sp-staff-alert { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; background: var(--amber-soft); border: 1px solid color-mix(in srgb, var(--amber) 35%, transparent); font-size: 13px; }
.sp-staff-alert .sp-attn-flag { color: var(--amber); width: 16px; height: 16px; }
.sp-staff-alert > span:nth-child(2) { flex: 1; }

.sp-prio-note { display: block; padding: 12px 16px; border-radius: 12px; background: var(--blue-soft); color: var(--blue); font-size: 13px; line-height: 1.55; border-left: 3px solid var(--blue); }
.sp-prio-note strong { font-weight: 800; }
.sp-prio-note.is-small { font-size: 12.5px; padding: 8px 12px; margin: 0; }
.sp-prio-brands { margin-top: 2px; }
.sp-prio-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
.sp-prio-layout.has-side { grid-template-columns: minmax(0, 1fr) 340px; }
.sp-prio-main { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.sp-prio-list { list-style: none; margin: 0; padding: 0; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); overflow: hidden; }
.sp-prio-row { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 12px 14px; border-top: 1px solid var(--border); background: var(--surface); }
.sp-prio-row:first-child { border-top: 0; }
.sp-prio-row.is-committed { grid-template-columns: minmax(0, 1fr) auto; }
.sp-prio-row.is-dragging { opacity: 0.5; background: var(--brand-orange-soft); }
.sp-prio-row.is-grabbed { background: var(--brand-orange-soft); box-shadow: inset 3px 0 0 var(--brand-orange); }
.sp-prio-grip { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 32px; padding: 0; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--text-muted); cursor: grab; }
.sp-prio-grip:hover { background: var(--surface-2); }
.sp-prio-grip:focus-visible { outline: 2px solid var(--brand-orange); outline-offset: 1px; }
.sp-prio-grip[aria-pressed="true"] { border-color: var(--brand-orange); color: var(--brand-orange); background: var(--surface); }
.sp-prio-grip .sp-grip-icon { width: 16px; height: 16px; }
.sp-prio-grip .sp-grip-icon svg { fill: currentColor; stroke: none; }
.sp-prio-main-col { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sp-prio-title { font-size: 14.5px; font-weight: 700; color: var(--text); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-prio-title:hover { color: var(--brand-orange); }
.sp-prio-why { margin: 2px 0 0; font-size: 12px; color: var(--text-muted); line-height: 1.4; }
.sp-prio-brandtag { font-size: 11px; font-weight: 700; color: var(--text-muted); }
.sp-prio-actions { display: flex; gap: 6px; }
.sp-prio-row .sp-row-move { opacity: 1; flex-direction: column; gap: 2px; }
.sp-prio-row .sp-row-move .sp-move { width: 24px; height: 18px; }

.sp-urg-seg { display: inline-flex; padding: 2px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); }
.sp-urg-opt { padding: 4px 10px; border: 0; border-radius: 999px; background: transparent; font: inherit; font-size: 11.5px; font-weight: 700; color: var(--text-muted); cursor: pointer; }
.sp-urg-opt:disabled { cursor: default; }
.sp-urg-opt:not(:disabled):hover { color: var(--text); }
.sp-urg-opt:focus-visible { outline: 2px solid var(--brand-orange); outline-offset: 1px; }
.sp-urg-opt.active.is-normal { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.sp-urg-opt.active.is-high { background: var(--amber); color: var(--on-accent); }
.sp-urg-opt.active.is-critical { background: var(--red); color: var(--on-accent); }
.sp-urg-seg.is-big .sp-urg-opt { padding: 7px 16px; font-size: 13px; }
.sp-urg { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 800; letter-spacing: 0.02em; white-space: nowrap; }
.sp-urg-normal { background: var(--gray-soft); color: var(--text-muted); }
.sp-urg-high { background: var(--amber-soft); color: var(--amber); }
.sp-urg-critical { background: var(--red-soft); color: var(--red); }

.sp-urg-modal { max-width: 560px; }
.sp-urg-form { display: flex; flex-direction: column; max-height: calc(100vh - 80px); }
.sp-urg-body { display: flex; flex-direction: column; gap: 14px; padding: 16px 20px; overflow-y: auto; }
.sp-urg-warn { margin: 0; padding: 8px 12px; border-radius: 10px; background: var(--red-soft); color: var(--red); font-size: 12.5px; font-weight: 600; line-height: 1.5; }

.sp-prio-side { display: flex; flex-direction: column; gap: 12px; }
.sp-side-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sp-audit { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.sp-audit-item { display: grid; grid-template-columns: 10px minmax(0, 1fr); gap: 8px; }
.sp-audit-dot { width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: var(--border); }
.sp-audit-item.is-significant .sp-audit-dot { background: var(--amber); }
.sp-audit-item.is-new .sp-audit-dot { box-shadow: 0 0 0 3px var(--amber-soft); }
.sp-audit-body { display: flex; flex-direction: column; min-width: 0; font-size: 12.5px; }
.sp-audit-ticket { font-size: 12px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-audit-ticket b { color: var(--text); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }
.sp-audit-what { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; font-weight: 700; }
.sp-audit-new { padding: 0 6px; border-radius: 999px; background: var(--amber); color: var(--on-accent); font-size: 10px; }
.sp-audit-why { color: var(--text); line-height: 1.4; }
.sp-audit-meta { font-size: 11.5px; color: var(--text-muted); }
.sp-decision { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); margin-top: 4px; }
.sp-decision input { width: 100%; padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); font: inherit; font-size: 12.5px; }

.sp-prio-card .sp-prio-row-mini { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sp-prio-card .sp-prio-n { font-size: 22px; }
.sp-prio-card > .btn { align-self: flex-start; }
.sp-prio-open { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 10px; background: var(--amber-soft); font-size: 12.5px; }
.sp-prio-open strong { color: var(--amber); }
.sp-prio-foot { margin: 4px 0 0; font-size: 11.5px; color: var(--text-muted); }
.sp-prio-history { display: flex; flex-direction: column; gap: 6px; }

@media (max-width: 1080px) {
  .sp-prio-layout.has-side { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .sp-prio-row { grid-template-columns: auto auto minmax(0, 1fr) auto; }
  .sp-prio-row .sp-urg-seg { grid-column: 3 / -1; justify-self: start; }
  .sp-prio-row.is-committed { grid-template-columns: 1fr; }
  .sp-head-actions { width: 100%; }
}

/* Game Providers: Direct integrations / Aggregators, and the vertical filter */
/* Integrations: search and filters above the lists. */
.int-toolbar { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.int-toolbar-search { position: relative; display: block; }
.int-toolbar-search-icon { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; margin-top: -9px; color: var(--text-muted); pointer-events: none; }
.int-toolbar-search-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.int-toolbar-search-input {
  width: 100%; padding: 11px 14px 11px 42px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2);
  font: inherit; font-size: 14.5px; color: var(--text); transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.int-toolbar-search-input:focus { outline: none; border-color: var(--brand-orange); background: var(--surface); box-shadow: 0 0 0 3px var(--brand-orange-soft); }
.int-toolbar-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.int-seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); }
.int-seg-btn { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border: 0; border-radius: 999px; background: transparent; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--text-muted); cursor: pointer; }
.int-seg-btn:hover { color: var(--text); }
.int-seg-btn.active { background: var(--brand-black); color: #fff; }
.int-seg-n { font-size: 11px; font-weight: 600; opacity: 0.7; }
.int-filter-select { font-size: 12.5px; }
.int-filter-select.is-set { border-color: var(--brand-orange); color: var(--brand-orange); background-color: var(--brand-orange-soft); }
.int-filter-clear { margin-left: auto; font-size: 12.5px; }
.int-results-summary { margin: -4px 2px 0; font-size: 12.5px; font-weight: 600; color: var(--text-muted); }
.int-results { display: flex; flex-direction: column; gap: inherit; }
.int-card-tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 14px 0; }
.int-vtag { display: inline-flex; padding: 1px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 700; background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); white-space: nowrap; }
.int-vtag.is-agg { background: var(--blue-soft); color: var(--blue); border-color: transparent; }
.int-vtag.is-via { border-style: dashed; color: var(--text); }
.int-edit-games { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; margin: 10px 0 4px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); }
.int-edit-games .sp-chipset { padding: 0; }
@media (max-width: 620px) { .int-edit-games { grid-template-columns: 1fr; } .int-filter-clear { margin-left: 0; } }

/* Direct game providers: "Also available via" the aggregators that carry them */
/* How a game provider is reached: Direct, and "Also via N aggregators" (opens a list). */
.int-route { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 10px 14px 0; }
.int-route-badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); }
.int-route-badge i { width: 6px; height: 6px; border-radius: 50%; background: var(--brand-orange); }
.int-route-badge.is-via { background: transparent; border-style: dashed; }
.int-route-badge.is-via i { background: transparent; border: 1.5px solid var(--brand-orange); width: 7px; height: 7px; }
.int-route-via { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px 2px 9px; border-radius: 999px; font: inherit; font-size: 11.5px; font-weight: 700; color: var(--brand-orange); background: transparent; border: 1px dashed color-mix(in srgb, var(--brand-orange) 45%, var(--border)); cursor: pointer; }
.int-route-via:hover, .int-route-via[aria-expanded="true"] { background: var(--brand-orange-soft); border-style: solid; }
.int-route-via:focus-visible { outline: 2px solid var(--brand-orange); outline-offset: 2px; }
.int-route-via .chev { width: 6px; height: 6px; border-color: currentColor; }
.int-route-badge .int-avatar { width: 16px; height: 16px; border-radius: 4px; font-size: 7px; border: 0; margin-left: -4px; }
.int-route-warn { display: inline-flex; width: 15px; height: 15px; margin-left: 2px; color: var(--amber); cursor: help; }
.int-route-warn svg { width: 15px; height: 15px; fill: var(--amber-soft); stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.int-card-asked { display: flex; align-items: center; gap: 6px; margin: 10px 14px 0; font-size: 12px; color: var(--text-muted); }
.int-card-asked .int-card-note-label { margin-right: 0; }

/* Active integrations: a carousel of compact tiles. */
.int-carousel { position: relative; display: flex; align-items: center; gap: 8px; }
.int-carousel-track { flex: 1; min-width: 0; display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 2px 2px 4px; }
.int-carousel-track::-webkit-scrollbar { display: none; }
.int-carousel-track:focus-visible { outline: 2px solid var(--brand-orange); outline-offset: 2px; border-radius: 12px; }
.int-carousel-btn {
  flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow);
  font-size: 20px; line-height: 1; color: var(--text); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding-bottom: 2px;
}
.int-carousel-btn:hover:not(:disabled) { border-color: var(--brand-orange); color: var(--brand-orange); }
.int-carousel-btn:disabled { opacity: 0.35; cursor: default; box-shadow: none; }
.int-carousel.is-static .int-carousel-btn { display: none; }
.int-tile {
  flex: 0 0 236px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 10px; padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--green) 30%, var(--border)); border-radius: 14px; background: var(--surface);
}
.int-tile-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.int-tile-head > .int-avatar { width: 40px; height: 40px; border-radius: 10px; font-size: 12px; flex-shrink: 0; }
.int-tile-titles { min-width: 0; }
.int-tile-name { font-size: 14px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.int-tile-since { display: flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; color: var(--text-muted); white-space: nowrap; }
.int-tile-since i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); flex-shrink: 0; }
.int-tile-route { display: flex; min-height: 22px; }
.int-tile-route .int-route-badge { max-width: 100%; overflow: hidden; white-space: nowrap; }
.int-tile-kind { font-size: 11.5px; font-weight: 600; color: var(--text-muted); text-transform: capitalize; }
.int-tile-actions { display: flex; justify-content: space-between; gap: 8px; padding-top: 8px; border-top: 1px solid var(--border); font-size: 12px; }
.int-tile-actions .link-btn { font-size: 12px; }
.int-tile-actions .link-btn:only-child { margin-left: auto; }

/* Enable modal: the route picker. */
.int-enable-route { display: flex; flex-direction: column; gap: 6px; }
.int-route-options { display: flex; flex-direction: column; gap: 4px; max-height: 220px; overflow-y: auto; }
.int-route-option { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; font-size: 13px; font-weight: 600; }
.int-route-option:hover { border-color: color-mix(in srgb, var(--brand-orange) 45%, var(--border)); }
.int-route-option:has(input:checked) { border-color: var(--brand-orange); background: var(--brand-orange-soft); }
.int-route-option input { accent-color: var(--brand-orange); margin: 0; }
.int-route-option .int-avatar { width: 22px; height: 22px; border-radius: 6px; font-size: 8px; }
.int-route-option-direct { width: 22px; height: 22px; border-radius: 6px; background: var(--brand-orange-soft); position: relative; }
.int-route-option-direct::after { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--brand-orange); }
.int-route-option-label { flex: 1; }
.int-route-option-hint { font-size: 11px; font-weight: 700; color: var(--green); }
.int-route-option-hint.is-current { color: var(--text-muted); }
.int-route-option-hint.is-asked { color: var(--brand-orange); }
.int-tile.has-pending { border-color: color-mix(in srgb, var(--amber) 55%, var(--border)); }
.int-tile-pending { display: flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 8px; background: var(--amber-soft); color: color-mix(in srgb, var(--amber) 80%, var(--text)); font-size: 11.5px; font-weight: 700; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.int-tile-pending-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); flex-shrink: 0; }
.int-tile-actions { align-items: center; }

.int-via-pop {
  position: fixed; z-index: 60; width: 260px; max-height: 300px; overflow-y: auto; padding: 8px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 10px 30px rgba(20,21,26,0.14), 0 2px 6px rgba(20,21,26,0.06);
}
.int-via-pop-head { padding: 4px 6px 8px; font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.int-via-pop ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.int-via-pop li { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 8px; font-size: 13px; font-weight: 600; }
.int-via-pop li:hover { background: var(--surface-2); }
.int-via-pop .int-avatar { width: 24px; height: 24px; border-radius: 6px; font-size: 9px; }
.int-card-note { margin: 10px 14px 0; font-size: 12px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.int-card-note-label { margin-right: 6px; font-size: 10.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
/* Enable / request modal */
.int-enable-modal { max-width: 520px; }
.int-enable-logo .int-avatar { width: 40px; height: 40px; border-radius: 10px; font-size: 13px; }
.int-enable-body { display: flex; flex-direction: column; gap: 12px; padding: 14px 18px 16px; }
.int-enable-desc { margin: 0; font-size: 13.5px; color: var(--text-muted); line-height: 1.5; }
.int-enable-next { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); }
.int-enable-next-label { display: block; margin-bottom: 6px; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.int-enable-next ol { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.int-enable-next li::marker { color: var(--brand-orange); font-weight: 800; }
.int-enable-optional { font-weight: 400; color: var(--text-muted); }
.int-enable-body textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); font: inherit; color: var(--text); resize: vertical; }
.int-vtag.is-carries { background: transparent; border-style: dashed; }
.int-edit-via { grid-column: 1 / -1; }
.int-edit-via .sp-chipset { max-height: 140px; overflow-y: auto; }

/* Account security */
.security-modal { max-width: 560px; }
.security-body { padding-bottom: 18px; }
.security-section { padding: 14px 0; border-top: 1px solid var(--border); }
.security-section:first-child { border-top: none; }
.security-section h3 { margin: 0 0 8px; font-size: 14px; }
.security-section p.desc { margin: 0 0 10px; font-size: 13px; color: var(--text-muted); }
.security-sessions { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.security-sessions li { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; }
.security-sessions .muted { color: var(--text-muted); font-size: 12px; }
.security-form { display: grid; gap: 8px; }
.security-form input { width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); color: var(--text); }
.security-form .btn { justify-self: start; }

/* Settings → Roles: Admin roles / User roles */
.roles-kind-tabs { display: flex; gap: 4px; margin: 4px 0 8px; border-bottom: 1px solid var(--border); }
.role-kind-row { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; }
