:root {
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "Berkeley Mono", "SF Mono", ui-monospace, Menlo, monospace;
  --radius: 6px;
  --radius-lg: 10px;
  --sidebar-w: 244px;
  --accent: #1c75bc;
  --accent-hover: #2b88d2;
  --accent-text: #fff;
  --st-uncovered: #62666d;
  --st-in_progress: #f0bf00;
  --st-in_review: #4cb782;
  --st-implemented: #5e6ad2;
  --st-failing: #eb5757;
  --st-not_applicable: #62666d;
  --pr-urgent: #fc7840;
  --ok: #4cb782;
  --warn: #f0bf00;
  --bad: #eb5757;
  color-scheme: light;
  --bg-app: #f4f4f5;
  --bg-panel: #ffffff;
  --bg-elev: #fafafa;
  --bg-menu: #ffffff;
  --bg-input: #ffffff;
  --bg-hover: rgba(0, 0, 0, 0.035);
  --bg-active: rgba(0, 0, 0, 0.06);
  --bg-group: rgba(0, 0, 0, 0.022);
  --bg-selected: rgba(28, 117, 188, 0.09);
  --border: #e9e9eb;
  --border-strong: #dcdcdf;
  --border-menu: #e2e2e5;
  --text: #1b1b1f;
  --text-2: #3c3d42;
  --text-3: #6b6f76;
  --text-4: #9a9ca2;
  --st-not_started: #a0a3a9;
  --shadow-menu: 0 0 0 1px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.06);
  --scrim: rgba(14, 22, 36, 0.48);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg-app: #08090a;
  --bg-panel: #0f1011;
  --bg-elev: #161718;
  --bg-menu: #1c1d1f;
  --bg-input: #141516;
  --bg-hover: rgba(255, 255, 255, 0.045);
  --bg-active: rgba(255, 255, 255, 0.075);
  --bg-group: rgba(255, 255, 255, 0.025);
  --bg-selected: rgba(28, 117, 188, 0.13);
  --border: #1f2023;
  --border-strong: #2b2c30;
  --border-menu: #2e2f33;
  --text: #f7f8f8;
  --text-2: #d0d6e0;
  --text-3: #8a8f98;
  --text-4: #62666d;
  --st-not_started: #8a8f98;
  --shadow-menu: 0 0 0 1px rgba(0, 0, 0, 0.2), 0 8px 24px rgba(0, 0, 0, 0.5), 0 2px 6px rgba(0, 0, 0, 0.3);
  --scrim: rgba(3, 7, 13, 0.68);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg-app);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.5;
  font-feature-settings: "cv01", "ss03", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
::selection { background: rgba(28, 117, 188, 0.35); }
.i { flex: none; display: block; }
.i.inline { display: inline-block; vertical-align: -2px; }
.mono { font-family: var(--mono); font-size: 12px; }
.muted { color: var(--text-3); }
.faint { color: var(--text-4); }
.hidden, [hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- App shell ---------- */
.app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); height: 100vh; }
.sidebar { display: flex; flex-direction: column; min-height: 0; padding: 8px 8px 8px 10px; }
.brand-row { display: flex; align-items: center; height: 40px; padding: 2px 6px 10px; flex: none; }
.brand { display: inline-flex; align-items: center; height: var(--bh, 22px); }
.brand-img { height: 100%; width: auto; display: block; }
.brand-on-dark { display: none; }
:root[data-theme="dark"] .brand-on-light { display: none; }
:root[data-theme="dark"] .brand-on-dark { display: block; }
.sidebar-top { display: flex; align-items: center; gap: 4px; padding: 2px 0 10px; }
.ws-switch {
  display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1;
  padding: 4px 6px; border-radius: var(--radius); font-weight: 590; font-size: 13px;
}
.ws-switch:hover { background: var(--bg-hover); }
.ws-logo {
  width: 20px; height: 20px; border-radius: 5px; flex: none; display: grid; place-items: center;
  background: linear-gradient(140deg, #3eaee4 0%, #0f5fa8 100%); color: #fff; font-size: 11px; font-weight: 650;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.ws-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn {
  width: 28px; height: 28px; display: grid; place-items: center; border-radius: var(--radius); color: var(--text-3);
}
.icon-btn:hover { background: var(--bg-hover); color: var(--text); }
.icon-btn.sm { width: 24px; height: 24px; }

.side-search {
  display: flex; align-items: center; gap: 8px; height: 28px; padding: 0 8px; margin-bottom: 10px;
  border: 1px solid var(--border); border-radius: var(--radius); color: var(--text-3); background: var(--bg-panel);
  width: 100%; text-align: left;
}
.side-search:hover { border-color: var(--border-strong); color: var(--text-2); }
.side-search kbd { margin-left: auto; }

.nav { display: flex; flex-direction: column; gap: 1px; overflow-y: auto; min-height: 0; flex: 1; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav-item {
  display: flex; align-items: center; gap: 8px; height: 28px; padding: 0 8px; border-radius: var(--radius);
  color: var(--text-2); font-weight: 510; white-space: nowrap;
}
.nav-item .i { color: var(--text-3); }
.nav-item:hover { background: var(--bg-hover); color: var(--text); }
.nav-item.active { background: var(--bg-active); color: var(--text); }
.nav-item.active .i { color: var(--text); }
.nav-item .count { margin-left: auto; color: var(--text-4); font-size: 12px; font-weight: 450; }
.nav-item .count.alert { color: var(--bad); }
.nav-item.sub { padding-left: 30px; font-weight: 450; height: 27px; }
.nav-item.sub .i { width: 14px; height: 14px; }
.nav-section {
  display: flex; align-items: center; gap: 4px; height: 28px; margin-top: 14px; padding: 0 8px;
  color: var(--text-3); font-size: 12px; font-weight: 510; border-radius: var(--radius); width: 100%;
}
.nav-section:hover { background: var(--bg-hover); }
.nav-section .chev { transition: transform 0.15s ease; color: var(--text-4); }
.nav-section[aria-expanded="false"] .chev { transform: rotate(-90deg); }
.nav-group { display: flex; flex-direction: column; gap: 1px; }
.nav-group[hidden] { display: none; }
.nav-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); margin-left: auto; flex: none; }

.sidebar-bottom { padding-top: 8px; display: flex; flex-direction: column; gap: 1px; }
.user-chip {
  display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 8px; border-radius: var(--radius);
  color: var(--text-2); width: 100%; text-align: left;
}
.user-chip:hover { background: var(--bg-hover); }
.user-chip .name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 510; }

.main {
  margin: 8px 8px 8px 0; background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius-lg);
  display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}
.topbar {
  display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px 0 20px; flex: none;
  border-bottom: 1px solid var(--border);
}
.crumbs { display: flex; align-items: center; gap: 6px; min-width: 0; font-weight: 510; color: var(--text-2); }
.crumbs a { color: var(--text-3); }
.crumbs a:hover { color: var(--text); }
.crumbs .sep { color: var(--text-4); }
.crumbs .cur { color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .spacer { flex: 1; }
.subbar {
  display: flex; align-items: center; gap: 6px; height: 44px; padding: 0 12px 0 16px; flex: none;
  border-bottom: 1px solid var(--border);
}
.content { flex: 1; overflow-y: auto; min-height: 0; }
.content.padded { padding: 28px 32px 64px; }

/* ---------- Buttons, inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 28px; padding: 0 12px;
  border-radius: var(--radius); font-weight: 510; font-size: 13px; white-space: nowrap;
  border: 1px solid var(--border-strong); background: var(--bg-elev); color: var(--text-2);
  transition: background 0.1s, border-color 0.1s, color 0.1s;
}
.btn:hover { background: var(--bg-active); color: var(--text); }
.btn.primary { background: var(--accent); border-color: transparent; color: var(--accent-text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 1px 2px rgba(0, 0, 0, 0.2); }
.btn.primary:hover { background: var(--accent-hover); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-3); }
.btn.ghost:hover { background: var(--bg-hover); color: var(--text); }
.btn.danger { color: var(--bad); }
.btn.danger:hover { background: rgba(235, 87, 87, 0.1); }
.btn.sm { height: 24px; padding: 0 8px; font-size: 12px; }
.btn.lg { height: 36px; padding: 0 16px; font-size: 14px; }
.btn[disabled], .btn.loading { opacity: 0.55; pointer-events: none; }
.btn .i { color: currentColor; }

.tabs { display: flex; gap: 2px; }
.tab {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: var(--radius);
  color: var(--text-3); font-weight: 510; border: 1px solid transparent;
}
.tab:hover { color: var(--text); background: var(--bg-hover); }
.tab.active { color: var(--text); background: var(--bg-active); border-color: var(--border-strong); }
.tab .n { color: var(--text-4); font-weight: 450; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-size: 12px; font-weight: 510; color: var(--text-2); }
.field .hint { font-size: 12px; color: var(--text-3); }
.input, .textarea, .select {
  width: 100%; height: 32px; padding: 0 10px; border-radius: var(--radius); border: 1px solid var(--border-strong);
  background: var(--bg-input); color: var(--text); outline: none; transition: border-color 0.12s, box-shadow 0.12s;
}
.textarea { height: auto; min-height: 84px; padding: 8px 10px; resize: vertical; line-height: 1.5; }
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(28, 117, 188, 0.2);
}
.input::placeholder, .textarea::placeholder { color: var(--text-4); }
/* Rendered as text with masked glyphs so browsers don't treat integration credentials as a login form and autofill saved passwords. */
.secret-input { -webkit-text-security: disc; text-security: disc; font-family: var(--mono); letter-spacing: 0.08em; }
.select { appearance: none; padding-right: 28px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a8f98' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.filter-input {
  height: 26px; width: 220px; padding: 0 8px 0 28px; border-radius: var(--radius); border: 1px solid transparent;
  background: transparent; color: var(--text); outline: none;
}
.filter-wrap { position: relative; display: flex; align-items: center; }
.filter-wrap .i { position: absolute; left: 8px; color: var(--text-4); pointer-events: none; }
.filter-input:hover { background: var(--bg-hover); }
.filter-input:focus { background: var(--bg-input); border-color: var(--border-strong); }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; color: var(--text-2); }
.check input { accent-color: var(--accent); width: 14px; height: 14px; margin: 0; }
.seg { display: inline-flex; align-self: flex-start; padding: 2px; gap: 2px; border-radius: 7px; background: var(--bg-hover); border: 1px solid var(--border); }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span { display: inline-flex; align-items: center; height: 26px; padding: 0 12px; border-radius: 5px; color: var(--text-3); font-weight: 510; }
.seg input:checked + span { background: var(--bg-panel); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.2), 0 0 0 1px var(--border-strong); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); }

kbd, .kbd {
  display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: 4px; border: 1px solid var(--border-strong); background: var(--bg-elev); color: var(--text-3);
  font-family: var(--font); font-size: 11px; font-weight: 510; line-height: 1;
}

/* ---------- Status, priority, avatars, chips ---------- */
.status-icon { flex: none; display: block; }
.st-not_started { color: var(--st-not_started); }
.st-uncovered { color: var(--st-uncovered); }
.st-in_progress, .st-warning { color: var(--st-in_progress); }
.st-in_review, .st-submitted { color: var(--st-in_review); }
.st-implemented, .st-pass, .st-accepted { color: var(--st-implemented); }
.st-failing, .st-fail, .st-rejected { color: var(--st-failing); }
.st-not_applicable, .st-error { color: var(--st-not_applicable); }
.st-pass { color: var(--ok); }
.priority-icon { flex: none; color: var(--text-3); display: block; }
.pr-urgent { color: var(--pr-urgent); }
.pr-none { color: var(--text-4); }
.avatar {
  --s: 20px; width: var(--s); height: var(--s); border-radius: 50%; display: inline-grid; place-items: center; flex: none;
  background: hsl(var(--h) 45% 42%); color: #fff; font-size: calc(var(--s) * 0.42); font-weight: 600; letter-spacing: 0.02em;
}
.avatar-empty { background: transparent; border: 1px dashed var(--text-4); color: var(--text-4); }
.logo-tile {
  --s: 28px; width: var(--s); height: var(--s); border-radius: 7px; display: inline-grid; place-items: center; flex: none;
  background: linear-gradient(150deg, hsl(var(--h) 55% 50%), hsl(calc(var(--h) + 25) 50% 38%));
  color: #fff; font-size: calc(var(--s) * 0.36); font-weight: 650; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}
.chip {
  display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 7px 0 6px; border-radius: 999px;
  border: 1px solid var(--border-strong); color: var(--text-2); font-size: 11.5px; font-weight: 510; white-space: nowrap;
  background: transparent;
}
a.chip:hover { border-color: var(--text-4); color: var(--text); }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--text-3)); flex: none; }
.chip.cat-security { --c: #5e6ad2; }
.chip.cat-availability { --c: #4cb782; }
.chip.cat-confidentiality { --c: #f2994a; }
.chip.cat-processing_integrity { --c: #26b5ce; }
.chip.cat-privacy { --c: #d864a6; }
.badge {
  display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border-radius: 5px;
  font-size: 11.5px; font-weight: 550; white-space: nowrap;
}
.badge.accent { background: rgba(28, 117, 188, 0.16); color: #1565a8; }
.badge.ok { background: rgba(76, 183, 130, 0.14); color: var(--ok); }
.badge.warn { background: rgba(240, 191, 0, 0.14); color: #a07a00; }
.badge.bad { background: rgba(235, 87, 87, 0.14); color: #f07070; }
.badge.neutral { background: var(--bg-active); color: var(--text-3); }
:root[data-theme="dark"] .badge.accent { color: #5fb4ea; }
:root[data-theme="dark"] .badge.warn { color: #e2b300; }
.domain-tag {
  display: inline-grid; place-items: center; height: 18px; padding: 0 5px; border-radius: 4px; font-family: var(--mono);
  font-size: 10.5px; color: var(--text-3); background: var(--bg-active);
}

/* ---------- List (Linear issue list) ---------- */
.list { padding-bottom: 80px; }
.group-head {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 8px; height: 36px;
  padding: 0 12px 0 22px; background: color-mix(in srgb, var(--bg-panel) 94%, var(--text) 6%);
  border-bottom: 1px solid var(--border); font-weight: 510; color: var(--text);
}
.group-head .n { color: var(--text-3); font-weight: 450; }
.group-head .spacer { flex: 1; }
.group-head .icon-btn { opacity: 0; }
.group-head:hover .icon-btn { opacity: 1; }
.row {
  display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 16px 0 22px; position: relative;
  border-bottom: 1px solid var(--border); color: var(--text-2); cursor: default;
}
.row:hover { background: var(--bg-hover); }
.row.kb-focus { background: var(--bg-selected); }
.row.kb-focus::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--accent); }
.row .key { width: 58px; flex: none; color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.row .title { flex: 1; min-width: 0; color: var(--text); font-weight: 510; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .title .sub { color: var(--text-3); font-weight: 450; margin-left: 8px; }
.row .meta { display: flex; align-items: center; gap: 8px; flex: none; color: var(--text-3); font-size: 12px; }
.row .meta .chips { display: flex; gap: 4px; }
.row .date { width: 52px; text-align: right; color: var(--text-3); font-size: 12px; flex: none; }
.row-link { position: absolute; inset: 0; z-index: 0; }
.row > :not(.row-link) { position: relative; z-index: 1; }
.row .title, .row .meta-pass { pointer-events: none; }
.status-btn, .prio-btn { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 5px; flex: none; }
.status-btn:hover, .prio-btn:hover { background: var(--bg-active); }
.mini-stat { display: inline-flex; align-items: center; gap: 4px; color: var(--text-3); font-size: 12px; }
.mini-stat .i { color: var(--text-4); }
.mini-stat.bad, .mini-stat.bad .i { color: var(--bad); }
.mini-stat.ok .i { color: var(--ok); }
.empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px;
  padding: 80px 24px; color: var(--text-3);
}
.empty .i { color: var(--text-4); }
.empty h3 { margin: 4px 0 0; color: var(--text); font-size: 14px; font-weight: 590; }
.empty p { margin: 0; max-width: 360px; }

/* ---------- Detail (Linear issue view) ---------- */
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 300px; flex: 1; min-height: 0; }
.detail-main { overflow-y: auto; min-height: 0; }
.detail-inner { max-width: 820px; margin: 0 auto; padding: 36px 48px 120px; }
.detail-side { border-left: 1px solid var(--border); overflow-y: auto; padding: 14px 14px 40px; min-height: 0; }
.detail-key { display: flex; align-items: center; gap: 8px; color: var(--text-3); font-size: 12px; margin-bottom: 10px; }
.detail-title {
  font-size: 24px; line-height: 1.3; font-weight: 600; letter-spacing: -0.012em; margin: 0 0 10px; outline: none;
  border-radius: 4px; padding: 2px 4px; margin-left: -4px;
}
.detail-desc { color: var(--text-2); font-size: 14px; line-height: 1.65; outline: none; border-radius: 4px; padding: 2px 4px; margin-left: -4px; white-space: pre-wrap; }
[contenteditable="true"]:hover { background: var(--bg-hover); }
[contenteditable="true"]:focus { background: var(--bg-hover); box-shadow: 0 0 0 1px var(--border-strong); }
.callout {
  display: flex; gap: 10px; padding: 12px 14px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--bg-elev); color: var(--text-2); margin-top: 22px;
}
.callout .i { color: var(--text-3); margin-top: 2px; }
.callout strong { color: var(--text); font-weight: 590; display: block; margin-bottom: 2px; font-size: 12.5px; }
.callout.warn { border-color: rgba(240, 191, 0, 0.3); background: rgba(240, 191, 0, 0.06); }
.callout.warn .i { color: var(--warn); }
.callout.bad { border-color: rgba(235, 87, 87, 0.3); background: rgba(235, 87, 87, 0.06); }
.callout.bad .i { color: var(--bad); }
.section { margin-top: 36px; }
.section-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.section-head h2 { margin: 0; font-size: 13px; font-weight: 590; color: var(--text); }
.section-head .n { color: var(--text-3); }
.section-head .spacer { flex: 1; }
.divider { height: 1px; background: var(--border); margin: 32px 0 0; }

.props { display: flex; flex-direction: column; gap: 2px; }
.props h4 { margin: 18px 6px 6px; font-size: 12px; font-weight: 510; color: var(--text-3); }
.props h4:first-child { margin-top: 4px; }
.prop { display: grid; grid-template-columns: 92px minmax(0, 1fr); align-items: center; min-height: 32px; }
.prop .k { color: var(--text-3); padding-left: 6px; font-size: 12.5px; }
.prop .v {
  display: flex; align-items: center; gap: 8px; min-height: 30px; padding: 4px 8px; border-radius: var(--radius);
  color: var(--text); font-weight: 510; min-width: 0; text-align: left; flex-wrap: wrap;
}
button.prop-btn.v:hover { background: var(--bg-hover); }
.prop .v .faint { font-weight: 450; }
.prop .v input[type="date"] { background: transparent; border: 0; color: var(--text); font: inherit; font-weight: 510; outline: none; padding: 0; flex: 1; min-width: 0; width: auto; color-scheme: inherit; }
.prop label.v { flex-wrap: nowrap; }

.card { border: 1px solid var(--border); border-radius: 8px; background: var(--bg-panel); }
.card-pad { padding: 16px; }

/* Evidence */
.dropzone {
  display: flex; align-items: center; justify-content: center; gap: 10px; padding: 18px; border-radius: 8px;
  border: 1px dashed var(--border-strong); color: var(--text-3); text-align: center; cursor: pointer;
  transition: border-color 0.12s, background 0.12s, color 0.12s;
}
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: rgba(28, 117, 188, 0.06); color: var(--text-2); }
.dropzone strong { color: var(--text); font-weight: 510; }
.ev-list { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; margin-bottom: 10px; }
.ev { border-bottom: 1px solid var(--border); }
.ev:last-child { border-bottom: 0; }
.ev-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; }
.ev-thumb {
  width: 64px; height: 44px; border-radius: 5px; border: 1px solid var(--border); background: var(--bg-elev) center / cover no-repeat;
  flex: none; display: grid; place-items: center; color: var(--text-3); overflow: hidden;
}
.ev-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ev-body { flex: 1; min-width: 0; }
.ev-title { font-weight: 510; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 8px; }
.ev-meta { color: var(--text-3); font-size: 12px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ev-actions { display: flex; align-items: center; gap: 4px; flex: none; }
.ev-ai { padding: 0 12px 12px 88px; }
.ai-box { border-radius: 8px; background: var(--bg-elev); border: 1px solid var(--border); padding: 12px 14px; color: var(--text-2); }
.ai-box .ai-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-weight: 590; color: var(--text); font-size: 12.5px; }
.ai-box .ai-head .i { color: #5fb4ea; }
.ai-box ul { margin: 6px 0 0; padding-left: 18px; }
.ai-box li { margin: 2px 0; }
.ai-box h5 { margin: 10px 0 0; font-size: 11.5px; font-weight: 590; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.04em; }
.spinner { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--text-4); border-top-color: var(--accent); animation: spin 0.7s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.coverage { display: inline-flex; align-items: center; gap: 8px; color: var(--text-3); font-size: 12px; }
.pips { display: inline-flex; gap: 3px; }
.pip { width: 14px; height: 6px; border-radius: 2px; background: var(--bg-active); }
.pip.on { background: var(--st-in_review); }

/* Checks */
.checks { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.check-row { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.check-row:last-child { border-bottom: 0; }
.check-row .status-icon { margin-top: 3px; }
.check-row .body { flex: 1; min-width: 0; }
.check-row .t { font-weight: 510; color: var(--text); }
.check-row .s { color: var(--text-3); font-size: 12px; }
.check-row details { margin-top: 6px; }
.check-row summary { color: var(--text-3); font-size: 12px; cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 4px; }
.check-row summary::-webkit-details-marker { display: none; }
.check-row summary:hover { color: var(--text); }
.check-row pre {
  margin: 8px 0 0; padding: 10px; border-radius: 6px; background: var(--bg-app); border: 1px solid var(--border);
  font-family: var(--mono); font-size: 11.5px; color: var(--text-2); max-height: 260px; overflow: auto; white-space: pre-wrap; word-break: break-word;
}
.history { display: inline-flex; gap: 2px; align-items: flex-end; }
.history span { width: 4px; height: 12px; border-radius: 1px; background: var(--text-4); }
.history .pass { background: var(--ok); }
.history .fail { background: var(--bad); }
.history .warning { background: var(--warn); }

/* Activity */
.timeline { display: flex; flex-direction: column; gap: 0; position: relative; }
.tl-item { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; color: var(--text-3); font-size: 12.5px; position: relative; }
.tl-item .tl-icon { width: 20px; display: grid; place-items: center; flex: none; margin-top: 1px; }
.tl-item .tl-icon .i { color: var(--text-4); }
.tl-item strong { color: var(--text-2); font-weight: 510; }
.tl-comment { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; background: var(--bg-elev); margin: 6px 0; }
.tl-comment .who { display: flex; align-items: center; gap: 8px; color: var(--text-3); font-size: 12px; margin-bottom: 4px; }
.tl-comment .who strong { color: var(--text); font-weight: 510; }
.tl-comment .body { color: var(--text); white-space: pre-wrap; font-size: 13px; }
.composer { margin-top: 14px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--bg-input); transition: border-color .12s; }
.composer:focus-within { border-color: var(--text-4); }
.composer textarea { width: 100%; border: 0; background: transparent; resize: none; outline: none; padding: 12px 14px 4px; min-height: 44px; color: var(--text); }
.composer-bar { display: flex; justify-content: flex-end; padding: 6px 8px 8px; gap: 6px; }

/* ---------- Overview ---------- */
.ov-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; max-width: 1240px; }
.ov-card { grid-column: span 4; border: 1px solid var(--border); border-radius: 10px; padding: 18px; background: var(--bg-panel); min-width: 0; }
.ov-card.wide { grid-column: span 8; }
.ov-card.full { grid-column: span 12; }
.ov-card.half { grid-column: span 6; }
.ov-card h3 { margin: 0 0 14px; font-size: 12.5px; font-weight: 590; color: var(--text-2); display: flex; align-items: center; gap: 8px; }
.ov-card h3 .spacer { flex: 1; }
.ov-card h3 a { color: var(--text-3); font-weight: 510; font-size: 12px; }
.ov-card h3 a:hover { color: var(--text); }
.grade { display: flex; align-items: center; gap: 18px; }
.grade-ring { position: relative; width: 92px; height: 92px; flex: none; }
.grade-ring svg { transform: rotate(-90deg); }
.grade-ring .letter { position: absolute; inset: 0; display: grid; place-items: center; font-size: 34px; font-weight: 650; letter-spacing: -0.02em; }
.grade-ring .track { stroke: var(--bg-active); }
.grade-ring .bar { stroke: var(--accent); transition: stroke-dashoffset 1s cubic-bezier(.2,.8,.2,1); }
.big-num { font-size: 28px; font-weight: 620; letter-spacing: -0.02em; color: var(--text); line-height: 1.1; }
.big-num small { font-size: 14px; color: var(--text-3); font-weight: 500; }
.stack { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--bg-active); gap: 2px; }
.stack span { display: block; height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; }
.legend .li { display: inline-flex; align-items: center; gap: 6px; color: var(--text-3); font-size: 12px; }
.legend .li b { color: var(--text); font-weight: 560; }
.bar-row { display: grid; grid-template-columns: 140px 1fr 56px; align-items: center; gap: 12px; padding: 7px 0; }
.bar-row .lbl { color: var(--text-2); font-weight: 510; }
.bar-row .val { text-align: right; color: var(--text-3); font-variant-numeric: tabular-nums; font-size: 12px; }
.bar { height: 6px; border-radius: 3px; background: var(--bg-active); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 3px; background: var(--accent); }
.checklist { display: flex; flex-direction: column; }
.cl-item { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--border); }
.cl-item:last-child { border-bottom: 0; }
.cl-item .lbl { flex: 1; color: var(--text); font-weight: 510; }
.cl-item .det { color: var(--text-3); font-size: 12px; max-width: 50%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.period-bar { position: relative; height: 6px; border-radius: 3px; background: var(--bg-active); margin: 14px 0 8px; }
.period-bar span { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: linear-gradient(90deg, var(--accent), #5fb4ea); }
.period-dates { display: flex; justify-content: space-between; color: var(--text-3); font-size: 12px; }
.mini-list .row { padding-left: 4px; padding-right: 4px; height: 36px; }
.mini-list .row:last-child { border-bottom: 0; }
.page-head { display: flex; align-items: flex-end; gap: 16px; margin: 0 0 22px; max-width: 1240px; }
.page-head h1 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -0.012em; }
.page-head p { margin: 4px 0 0; color: var(--text-3); }
.page-head .spacer { flex: 1; }

/* ---------- Integrations ---------- */
.int-row { height: 52px; }
.int-row .title { display: flex; flex-direction: column; justify-content: center; gap: 0; }
.int-row .title .sub { margin: 0; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.int-hero { display: flex; align-items: center; gap: 16px; }
.int-hero h1 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
.int-hero p { margin: 2px 0 0; color: var(--text-3); }
.bullets { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.bullets li { display: flex; gap: 10px; color: var(--text-2); }
.bullets li::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--text-4); margin-top: 8px; flex: none; }
.form-stack { display: flex; flex-direction: column; gap: 14px; }
.conn-card { border: 1px solid var(--border); border-radius: 10px; padding: 14px; background: var(--bg-elev); }
.conn-card h3 { margin: 0 0 10px; font-size: 13px; font-weight: 590; display: flex; align-items: center; gap: 8px; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 6px 10px; font-size: 12.5px; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; color: var(--text); word-break: break-all; }

/* ---------- Menus, modals, palette, toasts ---------- */
.menu {
  position: fixed; z-index: 100; min-width: 220px; max-width: 320px; max-height: 360px; display: flex; flex-direction: column;
  background: var(--bg-menu); border: 1px solid var(--border-menu); border-radius: 9px; box-shadow: var(--shadow-menu);
  overflow: hidden; animation: pop 0.12s ease-out;
}
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(0.98); } to { opacity: 1; transform: none; } }
.menu input.menu-filter {
  border: 0; border-bottom: 1px solid var(--border-menu); background: transparent; outline: none; height: 38px; padding: 0 12px; color: var(--text);
}
.menu input.menu-filter::placeholder { color: var(--text-4); }
.menu-items { overflow-y: auto; padding: 4px; }
.menu-item {
  display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 8px; border-radius: 6px; color: var(--text-2); cursor: pointer; width: 100%; text-align: left;
}
.menu-item.hl { background: var(--bg-active); color: var(--text); }
.menu-item .lbl { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-item .sel { color: var(--text-2); }
.menu-item .num { color: var(--text-4); font-size: 11.5px; }
.menu-sep { height: 1px; background: var(--border-menu); margin: 4px 0; }
.menu-item.danger { color: var(--bad); }

.overlay { position: fixed; inset: 0; z-index: 90; background: rgba(20, 20, 30, 0.18); display: flex; align-items: flex-start; justify-content: center; padding-top: 12vh; animation: fade .12s ease-out; }
:root[data-theme="dark"] .overlay { background: rgba(0, 0, 0, 0.45); }
@keyframes fade { from { opacity: 0; } }
.modal {
  width: min(560px, calc(100vw - 32px)); background: var(--bg-menu); border: 1px solid var(--border-menu); border-radius: 12px;
  box-shadow: var(--shadow-menu); display: flex; flex-direction: column; max-height: 76vh; animation: pop .15s ease-out;
}
.modal-head { display: flex; align-items: center; gap: 8px; padding: 14px 16px 6px; color: var(--text-3); font-size: 12px; font-weight: 510; }
.modal-head .spacer { flex: 1; }
.modal-body { padding: 6px 16px 14px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.modal-title-input { font-size: 18px; font-weight: 590; border: 0; background: transparent; outline: none; color: var(--text); padding: 4px 0; }
.modal-desc-input { border: 0; background: transparent; outline: none; color: var(--text-2); resize: none; min-height: 60px; padding: 0; font-size: 14px; }
.modal-foot { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border-menu); }
.modal-foot .spacer { flex: 1; }
.pill-btn { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 9px; border-radius: 6px; border: 1px solid var(--border-strong); color: var(--text-2); font-size: 12px; font-weight: 510; }
.pill-btn:hover { background: var(--bg-hover); color: var(--text); }
.palette { width: min(640px, calc(100vw - 32px)); }
.palette input { width: 100%; height: 52px; padding: 0 18px; font-size: 15px; border: 0; border-bottom: 1px solid var(--border-menu); background: transparent; color: var(--text); outline: none; }
.palette .results { max-height: 420px; overflow-y: auto; padding: 6px; }
.palette .grp { padding: 8px 10px 4px; font-size: 11.5px; color: var(--text-3); font-weight: 510; }
.palette .menu-item { height: 38px; }
.palette .menu-item .hint { color: var(--text-4); font-size: 12px; }
.palette .foot { display: flex; gap: 14px; padding: 8px 14px; border-top: 1px solid var(--border-menu); color: var(--text-4); font-size: 11.5px; }
.palette .foot span { display: inline-flex; gap: 5px; align-items: center; }
.toasts { position: fixed; bottom: 18px; right: 18px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast {
  display: flex; align-items: center; gap: 10px; min-width: 260px; max-width: 420px; padding: 10px 14px; border-radius: 9px;
  background: var(--bg-menu); border: 1px solid var(--border-menu); box-shadow: var(--shadow-menu); color: var(--text); animation: pop .15s ease-out;
}
.toast .i { color: var(--ok); }
.toast.error .i { color: var(--bad); }
.shortcuts { display: grid; grid-template-columns: 1fr auto; gap: 8px 24px; }
.shortcuts .keys { display: flex; gap: 4px; justify-content: flex-end; }

/* ---------- Auth & onboarding ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px;
  background: radial-gradient(1200px 600px at 50% -20%, rgba(28, 117, 188, 0.14), transparent 60%), var(--bg-app); }
.auth-brand { display: flex; justify-content: center; margin: 0 auto 10px; }
.auth-card { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 14px; text-align: center; }
.auth h1 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.auth p { margin: 0; color: var(--text-3); }
.auth form { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; text-align: left; }
.auth .input { height: 40px; font-size: 14px; }
.auth .btn.primary { height: 40px; font-size: 14px; }
.auth .alt { color: var(--text-3); font-size: 12.5px; margin-top: 6px; }
.auth .alt a { color: var(--text); font-weight: 510; }
.form-error { color: var(--bad); font-size: 12.5px; min-height: 18px; }
.onb { min-height: 100vh; display: grid; grid-template-columns: 300px minmax(0, 1fr); background: var(--bg-app); }
.onb-side { padding: 28px 24px; display: flex; flex-direction: column; gap: 4px; border-right: 1px solid var(--border); }
.onb-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; margin-bottom: 28px; }
.onb-org { display: flex; align-items: center; gap: 8px; font-weight: 590; color: var(--text-2); }
.onb-step { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border-radius: 7px; color: var(--text-3); font-weight: 510; }
.onb-step .num { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--border-strong); font-size: 11px; color: var(--text-3); }
.onb-step.done .num { background: var(--accent); border-color: var(--accent); color: #fff; }
.onb-step.cur { background: var(--bg-active); color: var(--text); }
.onb-step.cur .num { border-color: var(--text-3); color: var(--text); }
a.onb-step:hover { color: var(--text); background: var(--bg-hover); }
.onb-main { overflow-y: auto; padding: 56px 24px 120px; }
.onb-inner { max-width: 640px; margin: 0 auto; }
.onb-inner h1 { margin: 0; font-size: 26px; font-weight: 620; letter-spacing: -0.02em; }
.onb-inner > p { margin: 8px 0 30px; color: var(--text-3); font-size: 14px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 16px; }
.form-grid .span2 { grid-column: span 2; }
.fieldset { border: 1px solid var(--border); border-radius: 10px; padding: 16px; display: flex; flex-direction: column; gap: 14px; background: var(--bg-panel); }
.fieldset legend, .fs-title { font-weight: 590; color: var(--text); font-size: 13px; }
.repeat-row { display: grid; gap: 8px; align-items: center; padding: 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-panel); }
.repeat-list { display: flex; flex-direction: column; gap: 8px; }
.form-actions { display: flex; align-items: center; gap: 10px; margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--border); }
.form-actions .spacer { flex: 1; }
.tsc-opt { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--border); border-radius: 9px; cursor: pointer; background: var(--bg-panel); }
.tsc-opt:hover { border-color: var(--border-strong); }
.tsc-opt:has(input:checked) { border-color: var(--accent); background: rgba(28, 117, 188, 0.07); }
.tsc-opt input { accent-color: var(--accent); margin-top: 3px; }
.tsc-opt b { display: block; font-weight: 590; color: var(--text); }
.tsc-opt span { color: var(--text-3); font-size: 12.5px; }
.review-block { border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; background: var(--bg-panel); margin-bottom: 12px; }
.review-block h3 { margin: 0 0 8px; font-size: 13px; font-weight: 590; display: flex; align-items: center; gap: 8px; }
.review-block h3 a { margin-left: auto; color: var(--text-3); font-size: 12px; font-weight: 510; }
.settings-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 28px; padding: 28px 32px 80px; max-width: 1080px; }
.settings-nav { display: flex; flex-direction: column; gap: 1px; position: sticky; top: 0; align-self: start; }
.settings-body h1 { margin: 0 0 20px; font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; font-weight: 510; color: var(--text-3); padding: 8px 10px; border-bottom: 1px solid var(--border); }
.table td { padding: 10px; border-bottom: 1px solid var(--border); color: var(--text-2); }
.table td strong { color: var(--text); font-weight: 510; }

/* ---------- Sign in & sign up (always light) ---------- */
.auth-body {
  color-scheme: light; background: #fff;
  --bg-app: #fff; --bg-panel: #fff; --bg-input: #fff; --bg-elev: #fafafa;
  --bg-hover: rgba(0, 0, 0, 0.035); --bg-active: rgba(0, 0, 0, 0.06);
  --border: #ececee; --border-strong: #dfdfe2;
  --text: #1b1b1f; --text-2: #3c3d42; --text-3: #6b6f76; --text-4: #9a9ca2;
}
.signin { min-height: 100vh; display: grid; place-items: center; padding: 48px 16px; }
.signin-col { width: 100%; max-width: 340px; display: flex; flex-direction: column; text-align: center; animation: rise 0.45s cubic-bezier(.2, .8, .2, 1) both; }
.signin-mark { align-self: center; display: block; width: 44px; height: 44px; margin-bottom: 28px; }
.signin-mark img { width: 100%; height: 100%; display: block; }
.signin-title { margin: 0; font-size: 22px; font-weight: 590; line-height: 1.3; letter-spacing: -0.02em; color: var(--text); }
.signin-lede { margin: 6px 0 0; color: var(--text-3); font-size: 14px; }
.auth-form { display: flex; flex-direction: column; gap: 10px; margin-top: 32px; text-align: left; }
.af-input {
  width: 100%; height: 44px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--border-strong);
  background: var(--bg-input); color: var(--text); font-size: 14px; outline: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04); transition: border-color 0.12s, box-shadow 0.12s;
}
.af-input::placeholder { color: var(--text-4); }
.af-input:hover { border-color: #cfd0d4; }
.af-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(28, 117, 188, 0.15); }
.af-password { position: relative; }
.af-password .af-input { padding-right: 44px; }
.af-reveal {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 6px;
  display: grid; place-items: center; color: var(--text-4); transition: color 0.12s, background 0.12s;
}
.af-reveal:hover { color: var(--text-2); background: var(--bg-hover); }
.af-reveal:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.af-reveal::after {
  content: ""; position: absolute; width: 18px; height: 1.5px; border-radius: 1px; background: currentColor;
  transform: rotate(-45deg) scaleX(0); transition: transform 0.16s ease;
}
.af-reveal[aria-pressed="true"]::after { transform: rotate(-45deg) scaleX(1); }
.af-submit {
  display: flex; align-items: center; justify-content: center; height: 44px; margin-top: 6px; border-radius: 8px;
  background: var(--accent); color: #fff; font-size: 14px; font-weight: 510;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 1px 2px rgba(0, 0, 0, 0.12); transition: background 0.12s;
}
.af-submit:hover { background: var(--accent-hover); }
.af-submit:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.af-submit.loading { opacity: 0.6; pointer-events: none; }
.auth-form .form-error { min-height: 0; text-align: center; }
.auth-form .form-error:empty { display: none; }
.signin-alt { margin: 28px 0 0; color: var(--text-3); font-size: 13px; }
.signin-alt a { color: var(--text); font-weight: 510; }
.signin-alt a:hover { text-decoration: underline; text-underline-offset: 3px; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* ---------- Product tour ---------- */
.tour { position: fixed; inset: 0; z-index: 150; }
.tour-spot {
  position: absolute; border-radius: 10px; pointer-events: none; box-shadow: 0 0 0 200vmax var(--scrim);
  transition: top 0.4s cubic-bezier(.2, .8, .2, 1), left 0.4s cubic-bezier(.2, .8, .2, 1), width 0.4s cubic-bezier(.2, .8, .2, 1), height 0.4s cubic-bezier(.2, .8, .2, 1);
  animation: fade 0.25s ease-out;
}
.tour-spot::after {
  content: ""; position: absolute; inset: -3px; border-radius: 12px; border: 1.5px solid var(--accent);
  box-shadow: 0 0 0 4px rgba(28, 117, 188, 0.18); animation: halo 2s ease-in-out infinite;
}
.tour-spot.untargeted::after { display: none; }
@keyframes halo { 50% { opacity: 0.5; inset: -6px; border-radius: 14px; } }
.tour-card {
  position: absolute; width: 340px; max-width: calc(100vw - 32px); padding: 16px 16px 12px; border-radius: 12px;
  background: var(--bg-menu); border: 1px solid var(--border-menu); box-shadow: var(--shadow-menu);
  transition: top 0.4s cubic-bezier(.2, .8, .2, 1), left 0.4s cubic-bezier(.2, .8, .2, 1);
}
.tour-card.enter { animation: pop 0.22s ease-out; }
.tour-card.nudge { animation: nudge 0.4s ease; }
@keyframes nudge { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
.tour-meta { display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 510; color: var(--text-3); }
.tour-dots { display: flex; gap: 4px; }
.tour-dots span { width: 5px; height: 5px; border-radius: 3px; background: var(--border-strong); transition: width 0.25s, background 0.25s; }
.tour-dots span.on { width: 14px; background: var(--accent); }
.tour-dots span.done { background: var(--text-4); }
.tour-title { margin: 10px 0 4px; font-size: 15px; font-weight: 590; line-height: 1.35; letter-spacing: -0.01em; color: var(--text); }
.tour-body { margin: 0; color: var(--text-2); font-size: 13px; line-height: 1.55; }
.tour-keys { display: flex; align-items: center; gap: 4px; margin-top: 10px; color: var(--text-3); font-size: 12px; }
.tour-keys kbd:last-of-type { margin-right: 4px; }
.tour-demo {
  position: relative; height: 88px; margin-top: 12px; border-radius: 8px; border: 1px dashed var(--border-strong);
  display: grid; place-items: center; overflow: hidden; color: var(--text-3); font-size: 12px; animation: zone 3.4s ease-in-out infinite;
}
.tour-demo-label { display: flex; align-items: center; gap: 8px; }
.tour-demo-file {
  position: absolute; left: calc(50% - 15px); top: 26px; width: 30px; height: 38px; border-radius: 4px 9px 4px 4px;
  background: linear-gradient(160deg, #e9f2fb, #b9d3ec); box-shadow: 0 8px 18px -6px rgba(0, 0, 0, 0.5);
  animation: drop 3.4s cubic-bezier(.3, .7, .3, 1) infinite;
}
.tour-demo-file::before { content: ""; position: absolute; left: 6px; right: 6px; top: 12px; height: 3px; border-radius: 2px; background: rgba(21, 101, 168, 0.5); box-shadow: 0 6px 0 rgba(21, 101, 168, 0.3), 0 12px 0 rgba(21, 101, 168, 0.3); }
@keyframes drop {
  0% { opacity: 0; transform: translate(-120px, -60px) rotate(-16deg); }
  12% { opacity: 1; }
  42% { transform: translate(0, 0) rotate(0); }
  50% { transform: translate(0, 0) scale(0.92); }
  58%, 78% { opacity: 1; transform: translate(0, 0) scale(1); }
  92%, 100% { opacity: 0; transform: translate(0, 6px) scale(0.9); }
}
@keyframes zone { 0%, 38%, 86%, 100% { border-color: var(--border-strong); background: transparent; } 46%, 78% { border-color: var(--accent); background: rgba(28, 117, 188, 0.08); } }
.tour-foot { display: flex; align-items: center; gap: 6px; margin-top: 16px; }
.tour-foot .spacer { flex: 1; }
.dropzone.tour-flash { animation: dz-flash 1.4s ease-out 2; }
@keyframes dz-flash { 30% { border-color: var(--accent); background: rgba(28, 117, 188, 0.1); color: var(--text); box-shadow: 0 0 0 4px rgba(28, 117, 188, 0.15); } }

@media (max-width: 1100px) {
  .ov-card, .ov-card.wide, .ov-card.half { grid-column: span 12; }
  .detail { grid-template-columns: 1fr; }
  .detail-side { border-left: 0; border-top: 1px solid var(--border); }
}
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .main { margin: 0; border-radius: 0; border: 0; }
  .row .meta .chips, .row .date, .filter-wrap { display: none; }
  .detail-inner { padding: 24px 16px 80px; }
  .content.padded { padding: 20px 16px 60px; }
  .onb { grid-template-columns: 1fr; }
  .onb-side { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span2 { grid-column: auto; }
  .settings-layout { grid-template-columns: 1fr; padding: 20px 16px; }
  .tour-card { left: 16px !important; right: 16px; top: auto !important; bottom: 16px; width: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
