/* SafeSpace console - visual system aligned with OpenWork's DESIGN.md:
   Radix slate neutrals, navy ink primary (#011627), blue for links/selection/presence,
   hairlines + layered soft shadows, 16px shells / 8px controls, 13px system type, sentence case. */

:root {
  color-scheme: light;
  /* neutrals (Radix slate) */
  --bg: #f9f9fb;            /* canvas            slate-2 */
  --surface: #ffffff;       /* cards, inputs */
  --surface-2: #f0f0f3;     /* hover, muted fill slate-3 */
  --surface-3: #e8e8ec;     /* active            slate-4 */
  --border: #e0e1e6;        /* controls          slate-5 */
  --hairline: #ececf0;      /* dividers, cards */
  --text: #1c2024;          /* slate-12 */
  --text-2: #60646c;        /* slate-11 */
  --muted: #80838d;         /* slate-10 */
  /* primary action: OpenWork ink */
  --accent: #011627;
  --accent-hover: #0a2540;
  --accent-ink: #ffffff;
  --accent-rgb: 1 22 39;
  --accent-soft: #eef1f4;
  /* links, selection, presence (Radix blue) */
  --info: #0090ff;
  --info-ink: #0d74ce;
  --info-soft: #e6f4fe;
  /* status */
  --good: #218358;  --good-soft: #e6f6eb;
  --warning: #ab6400; --warning-soft: #fff7c2;
  --serious: #cc4e00;
  --critical: #ce2c31; --critical-soft: #feebec; --destructive: #e5484d;
  /* sign-in background */
  --dot: rgba(96, 100, 108, .22);
  --illustration: #b9bbc6;
  /* charts */
  --viz-surface: #ffffff;
  --viz-line: #0588f0;
  --viz-area: rgba(5, 136, 240, .12);
  --viz-grid: #f0f0f3;
  --viz-axis: #d9d9e0;
  --viz-empty: #f0f0f3;
  /* depth, shape, motion */
  --shadow: 0 8px 24px rgba(15, 23, 42, .05);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow-shell: 0 10px 30px rgba(15, 23, 42, .06);
  --focus-ring: inset 0 0 0 1px rgba(var(--accent-rgb) / .35), 0 0 0 3px rgba(var(--accent-rgb) / .10);
  --radius: 16px;
  --radius-sm: 8px;
  --radius-lg: 24px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --sidebar: 240px;
  font: 13px/1.5 -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #111113; --surface: #18191b; --surface-2: #212225; --surface-3: #272a2d;
    --border: #2e3135; --hairline: #26282b;
    --text: #edeef0; --text-2: #b0b4ba; --muted: #777b84;
    --accent: #edeef0; --accent-hover: #ffffff; --accent-ink: #111113; --accent-rgb: 237 238 240; --accent-soft: #212225;
    --info: #0090ff; --info-ink: #70b8ff; --info-soft: #0d2847;
    --good: #3dd68c; --good-soft: #132d21;
    --warning: #ffca16; --warning-soft: #302008;
    --serious: #ff8b3e;
    --critical: #ff9592; --critical-soft: #3b1219; --destructive: #e5484d;
    --dot: rgba(176, 180, 186, .12);
    --illustration: #43484e;
    --viz-surface: #18191b; --viz-line: #3b9eff; --viz-area: rgba(59, 158, 255, .16);
    --viz-grid: #212225; --viz-axis: #363a3f; --viz-empty: #212225;
    --shadow: 0 14px 36px rgba(0, 0, 0, .24); --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-shell: 0 18px 48px rgba(0, 0, 0, .32);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111113; --surface: #18191b; --surface-2: #212225; --surface-3: #272a2d;
  --border: #2e3135; --hairline: #26282b;
  --text: #edeef0; --text-2: #b0b4ba; --muted: #777b84;
  --accent: #edeef0; --accent-hover: #ffffff; --accent-ink: #111113; --accent-rgb: 237 238 240; --accent-soft: #212225;
  --info: #0090ff; --info-ink: #70b8ff; --info-soft: #0d2847;
  --good: #3dd68c; --good-soft: #132d21;
  --warning: #ffca16; --warning-soft: #302008;
  --serious: #ff8b3e;
  --critical: #ff9592; --critical-soft: #3b1219; --destructive: #e5484d;
  --dot: rgba(176, 180, 186, .12);
  --illustration: #43484e;
  --viz-surface: #18191b; --viz-line: #3b9eff; --viz-area: rgba(59, 158, 255, .16);
  --viz-grid: #212225; --viz-axis: #363a3f; --viz-empty: #212225;
  --shadow: 0 14px 36px rgba(0, 0, 0, .24); --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-shell: 0 18px 48px rgba(0, 0, 0, .32);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
a { color: var(--info-ink); text-decoration-thickness: 1px; text-underline-offset: 2px; }
h1, h2, h3 { margin: 0 0 .5rem; line-height: 1.3; letter-spacing: -.01em; color: var(--text); }
h1 { font-size: 20px; font-weight: 600; }
h2 { font-size: 14px; font-weight: 600; }
h3 { font-size: 13px; font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
[hidden] { display: none !important; }
::selection { background: var(--info-soft); }
.icon { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- layout ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar {
  background: var(--bg); border-right: 1px solid var(--hairline); padding: 14px 10px;
  display: flex; flex-direction: column; gap: 1px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 15px; padding: 4px 8px 14px; letter-spacing: -.01em; }
.brand-mark { width: 26px; height: 26px; flex: none; border-radius: 7px; }
.brand-name span { color: var(--info-ink); }
.auth-card .brand-mark { width: 34px; height: 34px; border-radius: 9px; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: var(--radius-sm); color: var(--text-2);
  text-decoration: none; font-weight: 500; transition: background-color .15s var(--ease), color .15s var(--ease);
}
.nav a .icon { color: var(--muted); transition: color .15s var(--ease); }
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a:hover .icon { color: var(--text-2); }
.nav a.active { background: var(--surface-3); color: var(--text); font-weight: 600; }
.nav a.active .icon { color: var(--text); }
.nav a .ext { margin-left: auto; width: 13px; height: 13px; opacity: .6; }
.nav .badge { margin-left: auto; }
.nav-section { font-size: 11.5px; font-weight: 500; color: var(--muted); padding: 16px 10px 4px; }
.sidebar-foot { margin-top: auto; border-top: 1px solid var(--hairline); padding: 12px 6px 2px; font-size: 12px; }
.sidebar-foot b { font-weight: 600; }
.main { min-width: 0; }
.topbar {
  display: flex; align-items: center; gap: 12px; padding: 10px 28px; border-bottom: 1px solid var(--hairline);
  background: var(--bg); position: sticky; top: 0; z-index: 20; flex-wrap: wrap; min-height: 52px;
}
.topbar .spacer { flex: 1; }
.content { padding: 24px 28px 40px; max-width: 1360px; }
.menu-btn { display: none; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 264px; z-index: 50; transform: translateX(-100%); transition: transform .2s var(--ease); background: var(--surface); }
  .sidebar.open { transform: none; box-shadow: var(--shadow-shell); }
  .menu-btn { display: inline-flex; }
  .content { padding: 16px; }
  .topbar { padding: 8px 16px; }
}

/* ---------- surfaces ---------- */
.card {
  background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 18px;
  box-shadow: var(--shadow);
}
.card + .card { margin-top: 16px; }
.grid > .card + .card, .grid > .card { margin-top: 0; }
.card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; min-height: 32px; }
.card-head h1, .card-head h2, .card-head h3 { margin: 0; }
.card-head .spacer { flex: 1; }
.card .card { box-shadow: none; border-color: var(--hairline); background: var(--bg); }   /* no heavy card-in-card */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.stack > * + * { margin-top: 12px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.content > h1 { margin-bottom: 16px; }

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 32px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); padding: 6px 12px;
  border-radius: var(--radius-sm); font: inherit; font-weight: 500; cursor: pointer; text-decoration: none; white-space: nowrap;
  box-shadow: var(--shadow-sm);
  transition: background-color .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease), box-shadow .15s var(--ease);
}
.btn:hover { background: var(--surface-2); }
.btn:active { background: var(--surface-3); }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.btn-primary {
  background: var(--accent); border-color: var(--accent); color: var(--accent-ink);
  box-shadow: 0 8px 20px -16px rgba(var(--accent-rgb) / .6);
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-primary:active { background: var(--accent); }
.btn-danger { color: var(--critical); }
.btn-danger:hover { background: var(--critical-soft); border-color: transparent; }
.btn-sm { min-height: 26px; padding: 3px 9px; font-size: 12px; border-radius: 7px; }
.btn-ghost { border-color: transparent; background: transparent; box-shadow: none; }
.btn-ghost:hover { background: var(--surface-2); }

label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-size: 12px; font-weight: 500; color: var(--text-2); margin-bottom: 5px; }
input, select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 7px 10px; min-height: 34px;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
input::placeholder, textarea::placeholder { color: var(--muted); }
input:hover, select:hover, textarea:hover { border-color: #cdced6; }
input:focus, select:focus, textarea:focus { outline: 2px solid transparent; border-color: transparent; box-shadow: var(--focus-ring); }
.btn:focus-visible, a:focus-visible, .nav a:focus-visible, .tabs a:focus-visible { outline: 2px solid transparent; box-shadow: var(--focus-ring); }
input[type=checkbox], input[type=radio] { width: auto; min-height: 0; accent-color: var(--accent); }
select.inline, input.inline { width: auto; min-height: 30px; padding: 4px 8px; }
textarea { resize: vertical; min-height: 44px; }

/* ---------- tables: compact rows, hairlines, sentence-case headers ---------- */
.table-wrap { overflow-x: auto; margin: 0 -4px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--hairline); vertical-align: middle; }
th { font-size: 12px; font-weight: 500; color: var(--muted); padding-top: 6px; padding-bottom: 8px; }
tbody tr { transition: background-color .15s var(--ease); }
tbody tr:hover { background: var(--bg); }
tr:last-child td { border-bottom: 0; }

/* ---------- badges & status ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 999px; font-size: 11.5px;
  font-weight: 500; background: var(--surface-2); color: var(--text-2); white-space: nowrap; line-height: 1.5;
}
.badge.good { background: var(--good-soft); color: var(--good); }
.badge.warning { background: var(--warning-soft); color: var(--warning); }
.badge.critical { background: var(--critical-soft); color: var(--critical); }
.badge.info { background: var(--info-soft); color: var(--info-ink); }
.bdot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: inline-block; flex: none; }
.bdot.hollow { background: transparent; box-shadow: inset 0 0 0 1.5px currentColor; }
.badge.good .bdot { box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 18%, transparent); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--muted); }
.dot.good { background: var(--good); }
.dot.warning { background: var(--warning); }
.dot.critical { background: var(--critical); }

.stat { display: flex; flex-direction: column; gap: 2px; }
.stat .v { font-size: 24px; font-weight: 600; line-height: 1.15; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat .l { font-size: 12px; color: var(--muted); }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--hairline); margin-bottom: 18px; overflow-x: auto; }
.tabs a {
  padding: 8px 12px; text-decoration: none; color: var(--text-2); border-bottom: 2px solid transparent; margin-bottom: -1px;
  font-weight: 500; white-space: nowrap; border-radius: 6px 6px 0 0; transition: color .15s var(--ease), border-color .15s var(--ease);
}
.tabs a:hover { color: var(--text); }
.tabs a.active { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }

.site-card { cursor: pointer; transition: box-shadow .15s var(--ease), border-color .15s var(--ease); text-decoration: none; color: inherit; display: block; }
.site-card:hover { border-color: var(--border); box-shadow: var(--shadow-shell); }
.site-card .kpis { display: flex; gap: 24px; margin-top: 14px; }

.room {
  border: 1px solid var(--hairline); border-radius: 12px; padding: 14px; background: var(--surface);
  transition: border-color .3s var(--ease), background-color .3s var(--ease);
}
.room.present { border-color: color-mix(in srgb, var(--info) 45%, transparent); background: var(--info-soft); }
.room.fall { border-color: color-mix(in srgb, var(--critical) 50%, transparent); background: var(--critical-soft); }
.room .people { font-size: 26px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.room .meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); margin-top: 6px; }
.room .stale { opacity: .55; }

.alert-item { display: flex; gap: 10px; align-items: flex-start; padding: 11px 0; border-bottom: 1px solid var(--hairline); }
.alert-item:last-child { border-bottom: 0; }
.alert-item .body { flex: 1; min-width: 0; }
.alert-item .title { font-weight: 600; }

.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.notice { padding: 10px 12px; border-radius: 10px; background: var(--surface-2); font-size: 12.5px; color: var(--text); }
.notice.warn, .notice.warning { background: var(--warning-soft); }
.notice.error { background: var(--critical-soft); color: var(--critical); }
.notice.ok, .notice.good { background: var(--good-soft); }
.notice + .notice, .notice + ol, .notice + p { margin-top: 10px; }

code, .mono { font-family: ui-monospace, SFMono-Regular, "Cascadia Code", Menlo, Consolas, monospace; font-size: 12px; }
:not(pre) > code { background: var(--surface-2); padding: 1px 5px; border-radius: 5px; }
.secret { word-break: break-all; background: var(--bg); padding: 9px 11px; border-radius: var(--radius-sm); border: 1px solid var(--hairline); }
details > summary { cursor: pointer; color: var(--text-2); font-weight: 500; }
details > summary:hover { color: var(--text); }

/* ---------- auth ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 16px; position: relative; overflow: hidden; }
.auth-card {
  width: 100%; max-width: 400px; position: relative; z-index: 1; padding: 28px 28px 24px;
  border-radius: var(--radius-lg); box-shadow: var(--shadow-shell);
}
.auth-card h1 { text-align: center; font-size: 18px; }
.auth-card .btn-primary { width: 100%; min-height: 38px; }
/* sign-in background: dot grid + greyed-out "how it works" illustration */
.auth-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; color: var(--illustration); }
.auth-bg::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(circle, var(--dot) 1.1px, transparent 1.5px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,.35) 0%, #000 70%);
  mask-image: radial-gradient(ellipse at center, rgba(0,0,0,.35) 0%, #000 70%);
}
.auth-illustration { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .7; }
@media (max-width: 760px) { .auth-illustration { opacity: .3; } }
.auth-card .brand { justify-content: center; font-size: 18px; padding-bottom: 18px; }

/* ---------- modal ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(17, 17, 19, .38); display: grid; place-items: center; z-index: 100; padding: 16px; animation: fade-in .15s var(--ease); }
.modal { width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow-y: auto; border-radius: var(--radius-lg); box-shadow: var(--shadow-shell); padding: 22px; animation: pop-in .18s var(--ease); }
@keyframes fade-in { from { opacity: 0; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(6px) scale(.985); } }

/* ---------- toast ---------- */
.toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 200; max-width: min(380px, calc(100vw - 32px)); }
.toast { background: var(--text); color: var(--bg); padding: 10px 14px; border-radius: 10px; box-shadow: var(--shadow-shell); font-size: 12.5px; font-weight: 500; animation: pop-in .18s var(--ease); }
.toast.error { background: var(--destructive); color: #fff; }

/* ---------- chat ---------- */
.chat { display: flex; flex-direction: column; height: calc(100vh - 170px); min-height: 420px; }
.chat-log { flex: 1; overflow-y: auto; padding: 4px 2px 12px; display: flex; flex-direction: column; gap: 12px; }
.msg { max-width: 78%; padding: 10px 14px; border-radius: 14px; line-height: 1.55; word-wrap: break-word; }
.msg.user { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 4px; }
.msg.assistant { align-self: flex-start; background: var(--bg); border: 1px solid var(--hairline); border-bottom-left-radius: 4px; }
.msg p { margin: 0 0 .5em; } .msg p:last-child { margin: 0; }
.msg ul { margin: .3em 0; padding-left: 1.2em; }
.msg table { font-size: 12px; margin: .4em 0; }
.msg .tools { font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.chat-form { display: flex; gap: 8px; align-items: flex-end; border: 1px solid var(--border); border-radius: var(--radius); padding: 8px; background: var(--surface); box-shadow: var(--shadow); }
.chat-form:focus-within { box-shadow: var(--focus-ring), var(--shadow); border-color: transparent; }
.chat-form textarea { flex: 1; border: 0; box-shadow: none; background: transparent; min-height: 40px; }
.chat-form textarea:focus { box-shadow: none; }
.chat-form .btn-primary { border-radius: 999px; min-width: 64px; }
.suggestions { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.suggestions .btn { border-radius: 999px; box-shadow: none; background: var(--bg); color: var(--text-2); }

/* ---------- charts ---------- */
.viz { position: relative; background: var(--viz-surface); border-radius: 10px; }
.viz svg { display: block; max-width: 100%; }
.viz-grid { stroke: var(--viz-grid); stroke-width: 1; }
.viz-axis { stroke: var(--viz-axis); stroke-width: 1; }
.viz-tick { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.viz-empty { fill: var(--muted); font-size: 12.5px; }
.viz-line { fill: none; stroke: var(--viz-line); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.viz-area { fill: var(--viz-area); }
.viz-dot { fill: var(--viz-line); }
.viz-dot-ring { stroke: var(--viz-surface); stroke-width: 2; }
.viz-cross { stroke: var(--viz-axis); stroke-width: 1; stroke-dasharray: 3 3; }
.viz-cell:hover { stroke: var(--text); stroke-width: 1.5; }
.viz-tip {
  position: absolute; pointer-events: none; background: var(--surface); color: var(--text); border: 1px solid var(--hairline);
  border-radius: 10px; padding: 6px 10px; font-size: 12px; box-shadow: var(--shadow-shell); white-space: nowrap; z-index: 5;
}
.viz-tip-t { color: var(--muted); font-size: 11.5px; }
.viz-legend { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); padding: 6px 8px 8px; }
.viz-ramp { display: inline-block; width: 140px; height: 10px; border-radius: 3px; }
.bar-row { display: grid; grid-template-columns: minmax(90px, 160px) 1fr 56px; gap: 10px; align-items: center; padding: 5px 8px; }
.bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.bar-track { height: 8px; background: var(--viz-empty); border-radius: 999px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--viz-line); border-radius: 999px; }
.bar-value { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- firmware ---------- */
.fw-card { margin-bottom: 10px; }
.fw-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.fw-header strong { font-size: 14px; }
.fw-header .muted { font-size: 12.5px; }
.fw-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.fw-meta { display: flex; gap: 14px; margin-top: 8px; font-size: 12px; color: var(--muted); }

/* ---------- webhooks / integrations ---------- */
.wh-card { margin-bottom: 8px; }
.wh-header { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.wh-url { font-family: ui-monospace, monospace; font-size: 12px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 300px; }
.wh-events { font-size: 11.5px; color: var(--muted); }
.wh-actions { display: flex; gap: 4px; }
.int-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--hairline); }
.int-row:last-child { border-bottom: none; }
.int-name { font-weight: 500; }
.int-status { font-size: 12px; }

/* ---------- devices, integrations, skills ---------- */
.board-grid { border: 0; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; }
.board-grid legend { margin-bottom: 6px; }
.board-opt {
  display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; border: 1px solid var(--border); border-radius: 12px;
  cursor: pointer; background: var(--surface); transition: border-color .15s var(--ease), background-color .15s var(--ease);
}
.board-opt:hover { background: var(--bg); }
.board-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.board-opt input { margin-top: 3px; width: auto; flex: none; min-height: 0; }
.board-opt > span { display: flex; flex-direction: column; gap: 2px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 8px 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-all; }
.steps { padding-left: 18px; line-height: 1.7; }
.skill-card { text-decoration: none; color: inherit; transition: box-shadow .15s var(--ease), border-color .15s var(--ease); }
.skill-card:hover { border-color: var(--border); box-shadow: var(--shadow-shell); }
.skill-doc .md { line-height: 1.65; max-width: 760px; }
.skill-doc .md table { margin: 8px 0; }
.access-grid td, .access-grid th { white-space: nowrap; }
.access-grid select.changed { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
