


:root {
  
  --neutral-900: #171717;
  --neutral-700: #404040;
  --neutral-500: #737373;

  
  --bg: #FFFFFF;              
  --surface: #FAFAFA;         
  --surface-2: #F2F2F2;       
  --surface-3: #F5F5F5;       
  --sidebar-bg: var(--surface-3);

  
  --line: #E5E5E5;            
  --line-strong: #C7C7C7;     

  
  --fg: #000000;              
  --fg-2: #525252;            
  --fg-3: #6B6B6B;            
  --fg-hover: var(--neutral-700);
  --on-fg: #FFFFFF;           
  --ring: rgba(0, 0, 0, 0.12); 
  --shadow-pop: 0 8px 24px rgba(0, 0, 0, 0.12); 
  --shadow-modal: 0 16px 48px rgba(0, 0, 0, 0.16);

  
  --allow: #12794A;
  --allow-bg: rgba(18, 121, 74, 0.10);
  --block: #B42318;
  --block-bg: rgba(180, 35, 24, 0.10);
  --block-strong: #8F1C12;     
  --escalate: #A15C00;
  --escalate-bg: rgba(161, 92, 0, 0.10);

  
  --font-display: 'Geist', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', monospace;

  
  --radius: 6px;
  --radius-sm: 4px;
  --max-w: 1120px;

  
  --dur-fast: 120ms;
  --dur-base: 200ms;
  --dur-slow: 300ms;
  --dur-scene: 600ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-in: cubic-bezier(0.5, 0, 0.75, 0);
  --stagger: 60ms;

  
  --ink-900: var(--bg);
  --ink-800: var(--surface-3);
  --ink-700: var(--surface);
  --ink-600: var(--surface-2);

  --royal-900: var(--surface);
  --royal-800: var(--surface-2);
  --royal-600: var(--line);
  --royal-500: var(--neutral-500);
  --royal-400: var(--fg-3);
  --royal-300: var(--neutral-700);

  --gold-600: var(--fg);       
  --gold-500: var(--fg);
  --gold-400: var(--neutral-700);
  --gold-200: var(--line);
  --gold-text: var(--fg);

  --text-primary: var(--fg);
  --text-secondary: var(--fg-2);
  --text-muted: var(--fg-3);

  --hairline: var(--line);
  --hairline-strong: var(--line-strong);
  --hairline-cool: var(--line);

  --on-gold: var(--on-fg);
  --inset-highlight: transparent;
  --hero-glow: transparent;
  --grid-line: transparent;

  color-scheme: light;
}


:root[data-theme="dark"] {
  --neutral-900: #E5E5E5;
  --neutral-700: #D4D4D4;
  --neutral-500: #8A8A8A;

  --bg: #0A0A0A;
  --surface: #111111;
  --surface-2: #1A1A1A;
  --surface-3: #141414;

  --line: #262626;
  --line-strong: #404040;

  --fg: #FAFAFA;
  --fg-2: #A3A3A3;
  --fg-3: #8A8A8A;
  --on-fg: #0A0A0A;
  --ring: rgba(255, 255, 255, 0.18);
  --shadow-pop: 0 8px 24px rgba(0, 0, 0, 0.6);
  --shadow-modal: 0 16px 48px rgba(0, 0, 0, 0.7);

  --allow: #3FCF8E;
  --allow-bg: rgba(63, 207, 142, 0.14);
  --block: #F97066;
  --block-bg: rgba(249, 112, 102, 0.14);
  --block-strong: #FDA29B;
  --escalate: #F5B04A;
  --escalate-bg: rgba(245, 176, 74, 0.14);

  color-scheme: dark;
}
:root[data-theme="dark"] .skeleton::after {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.07), transparent);
}
:root[data-theme="dark"] .modal-overlay { background: rgba(0, 0, 0, 0.7); }


*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--fg);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  
  animation: pageIn var(--dur-slow) var(--ease-out) backwards;
}
@keyframes pageIn { from { opacity: 0; } }

a { color: var(--neutral-700); text-decoration: none; }
a:hover { color: var(--neutral-700); }

.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }


h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-wrap: balance;
}
h2 { font-size: clamp(1.75rem, 3.5vw, 2.25rem); }
h3 { font-size: 1.0625rem; }

.tabular { font-variant-numeric: tabular-nums; }


.eyebrow {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg);
  margin-bottom: 0.75rem;
}


.section-rule {
  width: 48px;
  height: 1px;
  background: var(--fg);
  border: 0;
  margin: 1rem 0 0;
}
.text-center .section-rule,
.section-head.text-center .section-rule { margin-left: auto; margin-right: auto; }

.section-sub {
  color: var(--fg-2);
  font-size: 1rem;
  max-width: 660px;
  line-height: 1.7;
}
.text-center { text-align: center; }
.text-center .section-sub { margin-left: auto; margin-right: auto; }


section { padding: 7rem 0; border-top: 1px solid var(--line); }
section:nth-of-type(even) { background: var(--surface-3); }

@media (max-width: 720px) {
  section { padding: 4.5rem 0; }
}


.btn, .pill, .field, .input, .form-input, .copy-btn, .avatar, .tab,
.card, a.session-row, a.evt, .user-dropdown button, .user-dropdown a {
  transition:
    background-color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out);
}


.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.9rem 1.9rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
}
.btn:active:not(:disabled) { transform: scale(0.98); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }


.btn-primary { background: var(--fg); color: var(--on-fg); }
.btn-primary:hover { background: var(--neutral-700); color: var(--on-fg); }
.btn-primary:disabled { background: var(--fg); }


.btn-secondary,
.btn-outline {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--fg);
}
.btn-secondary:hover,
.btn-outline:hover { background: var(--surface-2); border-color: var(--line-strong); color: var(--fg); }


.btn-ghost { background: transparent; color: var(--fg-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--fg); }

.btn-lg { padding: 1rem 2.25rem; font-size: 1rem; }


.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
}
.card:hover { border-color: var(--line-strong); }
.card h3 { margin-bottom: 0.5rem; }
.card p { color: var(--fg-2); font-size: 0.9375rem; }

.card-lift:hover { transform: translateY(-2px); }


.label,
.form-label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--fg-2);
}
.input,
.form-input {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: var(--bg);
  color: var(--fg);
}
.input::placeholder,
.form-input::placeholder { color: var(--fg-3); }
.input:hover:not(:disabled):not(:focus),
.form-input:hover:not(:disabled):not(:focus) { border-color: var(--fg-3); }
.input:focus,
.form-input:focus { outline: none; border-color: var(--fg); box-shadow: 0 0 0 2px var(--ring); }
.input:disabled,
.form-input:disabled { opacity: 0.6; cursor: not-allowed; }
.input.invalid,
.form-input.invalid { border-color: var(--block); }


.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 1.4;
  padding: 0.22rem 0.6rem;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid var(--line-strong);
  color: var(--fg-2);
  background: transparent;
}
.badge-allow    { background: var(--allow-bg);    color: var(--allow);    border-color: var(--allow); }
.badge-block    { background: var(--block-bg);    color: var(--block);    border-color: var(--block); }
.badge-escalate { background: var(--escalate-bg); color: var(--escalate); border-color: var(--escalate); }
.badge-neutral  { background: var(--surface-2);   color: var(--fg-2);     border-color: var(--line); }


.table-wrap { overflow-x: auto; }
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}
.table th {
  text-align: left;
  padding: 0.65rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-3);
  border-bottom: 1px solid var(--line-strong);
  white-space: nowrap;
}
.table td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--line);
  color: var(--fg);
  vertical-align: middle;
}
.table tbody tr { transition: background-color var(--dur-fast) var(--ease-out); }
.table tbody tr:hover { background: var(--surface-2); }
.table td.mono, .table .mono { font-family: var(--font-mono); font-size: 0.8125rem; }
.table td.num, .table th.num { text-align: right; }


.tabs {
  display: flex;
  gap: 1.5rem;
  padding-bottom: 1px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}
.tab {
  flex-shrink: 0;
  padding: 0.65rem 0;
  margin-bottom: -1px;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--fg-2);
  cursor: pointer;
}
.tab:hover { color: var(--fg); }
.tab.active,
.tab[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--fg); }
.tab-panel { animation: tabIn var(--dur-base) var(--ease-out); }
.tab-panel[hidden] { display: none; }
@keyframes tabIn { from { opacity: 0; } }


.skeleton {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  color: transparent;
  user-select: none;
  pointer-events: none;
}
.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.75), transparent);
  transform: translateX(-100%);
  animation: skeletonSweep 1.4s var(--ease-in-out) infinite;
}
@keyframes skeletonSweep { to { transform: translateX(100%); } }
.skeleton-text  { height: 0.875rem; width: 100%; margin: 0.35rem 0; }
.skeleton-block { height: 5rem; width: 100%; }


.motion-ready [data-reveal]:not(.is-visible) {
  opacity: 0;
  transform: translateY(8px);
}

.motion-ready [data-reveal].is-visible {
  animation: revealUp var(--dur-slow) var(--ease-out) var(--reveal-delay, 0ms) backwards;
}
@keyframes revealUp { from { opacity: 0; transform: translateY(8px); } }
[data-count] { font-variant-numeric: tabular-nums; }


.signal-path {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.35rem 1.75rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.sp-track {
  position: relative;
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-width: 0;
  height: 1px;
  background: var(--line-strong);
  margin: 0 0.25rem;
}
.sp-station {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.sp-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 2px solid var(--fg);
  box-shadow: 0 0 0 4px var(--surface);
  z-index: 1;
}
.sp-label {
  position: absolute;
  top: 16px;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-3);
  white-space: nowrap;
}
.sp-pulse {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--fg);
  box-shadow: 0 0 10px 2px var(--neutral-700);
  transform: translate(-50%, -50%);
  opacity: 0;
  animation: spTravel 3.4s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}
@keyframes spTravel {
  0%   { left: 0%;   opacity: 0; }
  6%   { opacity: 1; }
  90%  { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}
.sp-decision {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--allow);
  background: var(--allow-bg);
  color: var(--allow);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  flex-shrink: 0;
}
.sp-decision-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 6px currentColor;
}
.sp-decision.is-block    { border-color: var(--block);    background: var(--block-bg);    color: var(--block); }
.sp-decision.is-escalate { border-color: var(--escalate); background: var(--escalate-bg); color: var(--escalate); }

@media (max-width: 620px) {
  .signal-path { flex-direction: column; align-items: stretch; gap: 1.75rem; padding: 1.5rem; }
  .sp-track { margin: 0; }
  .sp-label { top: 14px; font-size: 0.5625rem; }
  .sp-decision { align-self: center; }
}


.icon { width: 22px; height: 22px; flex-shrink: 0; display: block; }
.icon-sm { width: 16px; height: 16px; }
.icon-gold { color: var(--fg); }
.icon-royal { color: var(--neutral-700); }


:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 2px;
}




html.motion-off *:not(.sidebar):not(.sidebar *):not(.dash-main), html.motion-off *:not(.sidebar):not(.sidebar *):not(.dash-main)::before, html.motion-off *:not(.sidebar):not(.sidebar *):not(.dash-main)::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
html.motion-off.motion-ready [data-reveal]:not(.is-visible) { opacity: 1; transform: none; }
html.motion-off .sp-pulse { animation: none; }
html.motion-off .skeleton::after { animation: none; display: none; }






.sidebar {
  position: fixed;
  top: 8px;
  left: 8px;
  bottom: 8px;
  width: 224px;
  z-index: 30;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  padding: 0;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow-y: auto;
  overflow-x: hidden;
  transition: width var(--dur-base) var(--ease-in-out);
}
html.sb-collapsed .sidebar { width: 64px; }

.sb-main { display: flex; flex-direction: column; flex: 1; min-width: 0; padding: 1rem 0.75rem 0; }
.sb-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0 0.25rem;
}
.sb-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.02em;
  color: var(--fg);
  text-decoration: none;
  white-space: nowrap;
}
.sb-brand:hover { color: var(--fg); }
.sb-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--fg);
}
.sb-icon .brand { --brand-h: 20px; }
.sb-collapse {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--fg-2);
  cursor: pointer;
  transition: background var(--dur-fast), color var(--dur-fast);
}
.sb-collapse:hover { background: var(--surface-2); color: var(--fg); }
.sb-collapse svg { width: 18px; height: 18px; }
html.sb-collapsed .sb-collapse svg { transform: scaleX(-1); }

.sb-nav { margin-top: 1.5rem; display: flex; flex-direction: column; gap: 1.5rem; }
.sb-section { display: flex; flex-direction: column; gap: 0.25rem; }
.sb-section-title {
  padding: 0 0.5rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-3);
  white-space: nowrap;
}


.sb-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  width: 100%;
  padding: 0.6rem 0.75rem;
  background: transparent;
  border: 0;
  border-radius: 10px;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 500;
  text-align: left;
  color: var(--fg-2);
  text-decoration: none;
  cursor: pointer;
  transition: background var(--dur-fast), color var(--dur-fast);
}
.sb-link:hover { background: var(--surface-2); color: var(--fg); }
.sb-link-icon { width: 20px; height: 20px; flex-shrink: 0; color: currentColor; }
.sb-link-icon svg { width: 100%; height: 100%; display: block; }
.sb-link-label { display: inline-block; white-space: pre; }
.sb-link.active { background: var(--surface-2); color: var(--fg); }
.sb-link.active .sb-link-label { font-weight: 600; }

.sb-fade { opacity: 1; transition: opacity var(--dur-fast); }
html.sb-collapsed .sidebar .sb-fade,
html.sb-collapsed .sidebar .sb-section-title,
html.sb-collapsed .sidebar .sb-brand span.sb-fade { display: none; }
html.sb-collapsed .sb-head { flex-direction: column; gap: 0.75rem; padding: 0; }
html.sb-collapsed .sb-link { padding-left: 0; padding-right: 0; justify-content: center; }
html.sb-collapsed .sb-nav { gap: 0.75rem; }
html.sb-collapsed .sb-bottom .sb-link { justify-content: center; padding-left: 0; padding-right: 0; }
html.sb-collapsed .sidebar { overflow: visible; }
html.sb-collapsed .sb-dropdown { width: 220px; }
html.sb-collapsed .dash-main { margin-left: 80px; }


.sb-pref-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.4rem 0.5rem;
}
.sb-pref-title { display: flex; align-items: center; gap: 0.5rem; font-size: 0.8125rem; color: var(--fg-2); }
.sb-pref-title svg { width: 16px; height: 16px; }
.sb-switch {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 72px;
  padding: 2px;
  background: var(--bg);
  border: 1px solid var(--fg);
  border-radius: 999px;
}
.sb-switch-thumb {
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 2px;
  width: calc(50% - 2px);
  background: var(--fg);
  border-radius: 999px;
  transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1);
}
.sb-switch:has(button[data-val="en"][aria-checked="true"]) .sb-switch-thumb,
.sb-switch:has(button[data-val="dark"][aria-checked="true"]) .sb-switch-thumb { transform: translateX(100%); }
.sb-dropdown .sb-switch button {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  padding: 0.2rem 0;
  border-radius: 999px;
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  transition: color 200ms;
}
.sb-dropdown .sb-switch button svg { width: 14px; height: 14px; }
.sb-dropdown .sb-switch button[aria-checked="true"] { color: var(--on-fg); }
.sb-dropdown .sb-switch button:hover { background: transparent; }

html.motion-off .sb-switch-thumb { transition: none; } 


.sb-bottom { display: flex; flex-direction: column; gap: 0.25rem; padding: 0.5rem 0.75rem; border-top: 1px solid var(--line); }
.sb-user-menu { position: relative; }
.sb-bottom .sb-link { padding: 0.5rem 0.5rem; gap: 0.75rem; }
.sb-avatar-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--fg);
  color: var(--on-fg);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.sb-account-info { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.sb-account-info strong { font-size: 0.875rem; font-weight: 600; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-account-info span { font-size: 0.75rem; color: var(--fg-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sb-dropdown {
  display: none;
  position: absolute;
  left: 0;
  
  width: calc(222px - 1.5rem);
  bottom: calc(100% + 0.5rem);
  z-index: 40;
  padding: 0.5rem;
  background: var(--bg);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-sm);
  animation: sbDropdownIn 150ms ease-out;
}
.sb-dropdown.open { display: block; }
@keyframes sbDropdownIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: none; }
}
.sb-who {
  padding: 0.4rem 0.5rem 0.55rem;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 0.4rem;
}
.sb-who strong { display: block; font-size: 0.8125rem; font-weight: 600; color: var(--text-primary); }
.sb-who span { font-size: 0.6875rem; color: var(--text-secondary); word-break: break-all; }
.sb-dropdown a,
.sb-dropdown button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.4rem 0.5rem;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  cursor: pointer;
  text-decoration: none;
}
.sb-dropdown a:hover,
.sb-dropdown button:hover { background: var(--ink-600); color: var(--text-primary); }

#navLogout, #navLogout:hover { color: var(--block); }
#navLogout:hover { background: var(--block-bg); }
#pfLogout .security-row-text strong,
#pfLogout .security-row-icon { color: var(--block); }
#pfLogout .security-row-icon { background: var(--block-bg); }
#pfLogout:hover { border-color: var(--block); background: var(--block-bg); }


.sb-mobile-toggle,
.sb-close { display: none; }


.dash-main { margin-left: 240px; padding: 2rem 2rem 5rem 2rem; }

.dash-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.dash-head h1 { font-size: 1.25rem; font-weight: 500; }
.dash-head h2 { font-size: 1.0625rem; font-weight: 500; }
.doc-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-right: auto;
  font-size: 0.8125rem;
  color: var(--text-secondary, inherit);
  opacity: 0.75;
  text-decoration: none;
}
.doc-link svg { width: 14px; height: 14px; }
.doc-link:hover { opacity: 1; text-decoration: underline; }
.ov-title .doc-link { margin-right: 0; margin-left: 0.5rem; }
.dash-head-btn { padding: 0.55rem 1.15rem; font-size: 0.875rem; }
.dash-section { margin-top: 2.5rem; }


.stat-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  text-align: center;
}
.stat-value {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  color: var(--fg);
}
.stat-label {
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-3);
  margin-top: 0.35rem;
}
.stat-allow    .stat-value { color: var(--allow); }
.stat-block    .stat-value { color: var(--block); }
.stat-escalate .stat-value { color: var(--escalate); }


.decision-badge {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  padding: 0.22rem 0.6rem;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid;
  flex-shrink: 0;
}
.badge-ALLOW    { background: var(--allow-bg);    color: var(--allow);    border-color: var(--allow); }
.badge-BLOCK    { background: var(--block-bg);    color: var(--block);    border-color: var(--block); }
.badge-ESCALATE { background: var(--escalate-bg); color: var(--escalate); border-color: var(--escalate); }

.badge-SHADOW_BLOCK, .badge-SHADOW_ESCALATE { background: transparent; color: var(--fg-2); border: 1px dashed var(--fg-2); }


.verdict-chip {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  line-height: 1.5;
}
.verdict-flagged { background: var(--block-bg); color: var(--block); border-color: var(--block); }
.verdict-clean   { background: var(--allow-bg); color: var(--allow); border-color: var(--allow); }


.evt-list { display: flex; flex-direction: column; gap: 0.65rem; }
.evt {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 2px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.1rem;
  color: inherit;
  animation: dashFadeIn var(--dur-slow) var(--ease-out) both;
}
a.evt:hover { border-color: var(--line-strong); background: var(--surface-2); color: inherit; }
.evt-ALLOW    { border-left-color: var(--allow); }
.evt-BLOCK    { border-left-color: var(--block); }
.evt-ESCALATE { border-left-color: var(--escalate); }
.evt-SHADOW_BLOCK, .evt-SHADOW_ESCALATE { border-left-color: var(--fg-3); }
.evt-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.evt-tool {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--fg);
}
.evt-meta {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--fg-3);
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
}
.evt-reason {
  color: var(--fg-2);
  font-size: 0.8125rem;
  line-height: 1.6;
  margin-top: 0.4rem;
}
.evt-label {
  color: var(--fg-3);
  font-size: 0.625rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0.75rem 0 0.35rem;
}
.evt pre {
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--fg-2);
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
}
.evt-verdicts { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }


@keyframes dashFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}


.session-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.8rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  color: inherit;
}
a.session-row:hover { border-color: var(--fg); color: inherit; }
.mono-id {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--fg-hover);
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
}


.filter-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.pill {
  font-size: 0.8125rem;
  font-family: var(--font-sans);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--fg-2);
  cursor: pointer;
}
.pill:hover { border-color: var(--line-strong); color: var(--fg); }
.pill.active {
  
  border-color: var(--fg);
  color: var(--on-fg);
  background: var(--fg);
  font-weight: 500;
}
.field {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--fg);
}
.field:focus { border-color: var(--fg); outline: none; box-shadow: 0 0 0 2px var(--ring); }


.switch {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--fg-2);
  cursor: pointer;
  user-select: none;
}
.switch input { accent-color: var(--fg); cursor: pointer; }
.live-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--allow);
  box-shadow: 0 0 0 0 var(--allow);
  animation: livePulse 2s ease-out infinite;
}
@keyframes livePulse {
  0%   { box-shadow: 0 0 0 0 rgba(18, 121, 74, 0.45); }
  70%  { box-shadow: 0 0 0 7px rgba(18, 121, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(18, 121, 74, 0); }
}


.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.empty-state .icon { width: 34px; height: 34px; color: var(--fg); margin: 0 auto 1.1rem; }
.empty-state h3 { font-size: 1.0625rem; margin-bottom: 0.5rem; }
.empty-state p { color: var(--fg-2); font-size: 0.9375rem; max-width: 440px; margin: 0 auto; }
.empty-actions { margin-top: 1.75rem; display: flex; flex-direction: column; align-items: center; gap: 0.85rem; }
.empty-actions .hint { font-size: 0.8125rem; color: var(--fg-3); }
code {
  font-family: var(--font-mono);
  font-size: 0.8125em;
  
  color: var(--fg);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
}


.toast {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 50;
  max-width: 420px;
  padding: 0.85rem 1.15rem;
  border-radius: var(--radius-sm);
  border: 1px solid;
  font-size: 0.875rem;
  background: var(--surface);
  box-shadow: var(--shadow-pop);
  animation: dashFadeIn var(--dur-base) var(--ease-out) both;
}
.toast-ok    { border-color: var(--allow); color: var(--allow); }
.toast-error { border-color: var(--block); color: var(--block); }


@media (max-width: 1000px) {
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
  
  .sidebar,
  html.sb-collapsed .sidebar {
    display: none;
    top: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    padding: 1.5rem;
    border: 0;
    border-radius: 0;
    background: var(--bg);
    z-index: 100;
    transition: none;
    overflow-y: auto;
  }
  .sidebar.open { display: flex; }
  .sb-dropdown,
  html.sb-collapsed .sb-dropdown { width: 100%; }
  .sb-main { padding: 0; }
  .sb-bottom { padding: 0.5rem 0 0; }
  .sb-collapse { display: none; }
  
  html.sb-collapsed .sidebar .sb-fade,
  html.sb-collapsed .sidebar .sb-section-title { display: block; }
  html.sb-collapsed .sb-link { justify-content: flex-start; padding-left: 0.75rem; padding-right: 0.75rem; }
  html.sb-collapsed .dash-main { margin-left: 0; }
  html.sb-collapsed .sb-head { flex-direction: row; gap: 0.5rem; padding: 0 0.25rem; }
  .sb-close {
    display: flex;
    position: absolute;
    top: 2.5rem;
    right: 2.5rem;
    padding: 0;
    background: transparent;
    border: 0;
    color: var(--fg);
    cursor: pointer;
  }
  .sb-close svg { width: 24px; height: 24px; }
  .sb-mobile-toggle {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 31;
    height: 40px;
    padding: 0 1rem;
    align-items: center;
    justify-content: flex-end;
    background: var(--ink-800);
    border: 0;
    border-bottom: 1px solid var(--hairline);
    color: var(--fg);
    cursor: pointer;
  }
  .sb-mobile-toggle svg { width: 24px; height: 24px; }
  .dash-main { margin-left: 0; padding: 3.5rem 1.1rem 4rem; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .evt-meta { margin-left: 0; width: 100%; }
}




.form-group { margin-bottom: 1.15rem; }
.form-error {
  display: none;
  margin-top: 0.4rem;
  font-size: 0.8125rem;
  color: var(--block);
}
.form-error.show { display: block; }


.form-banner {
  display: none;
  margin-bottom: 1.15rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--block);
  background: var(--block-bg);
  color: var(--block);
  font-size: 0.875rem;
}
.form-banner.show { display: block; }

.form-hint { margin-top: 0.4rem; font-size: 0.75rem; color: var(--fg-3); }
.btn-block { width: 100%; }


.auth-controls { position: fixed; top: 1.25rem; right: 1.25rem; display: flex; gap: 0.5rem; z-index: 10; }
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr); background: var(--bg); }
.auth-main { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 4rem 1.25rem 3rem; }
.auth-card {
  width: 100%; max-width: 24rem; padding: 2rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  animation: auth-rise var(--dur-scene) var(--ease-out) both;
}
@keyframes auth-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.auth-brand { display: flex; justify-content: center; margin-bottom: 1.75rem; color: var(--fg); }
.auth-card h1 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 500; letter-spacing: -0.02em; text-wrap: balance; text-align: center; margin: 0 0 0.5rem; }
.auth-sub { text-align: center; color: var(--fg-2); font-size: 0.875rem; line-height: 1.6; margin: 0 0 1.5rem; }
.auth-alt { margin: 1.25rem 0 0; text-align: center; font-size: 0.875rem; color: var(--fg-2); }
.auth-alt a { color: var(--fg); font-weight: 500; text-decoration: none; }
.auth-alt a:hover { text-decoration: underline; }
.auth-foot { margin-top: 1.5rem; text-align: center; font-size: 0.8125rem; }
.auth-foot a { color: var(--fg-2); text-decoration: none; }
.auth-foot a:hover { color: var(--fg); }
.auth-divider { display: flex; align-items: center; margin: 1.5rem 0 1rem; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; border-top: 1px dashed var(--line-strong); }
.auth-divider span { margin: 0 0.5rem; font-size: 0.75rem; color: var(--fg-2); }
.auth-link { font-size: 0.75rem; font-weight: 500; color: var(--fg-2); text-decoration: none; }
.auth-link:hover { color: var(--fg); text-decoration: underline; }
.auth-row { display: flex; justify-content: flex-end; margin: -0.25rem 0 0.9rem; }


.auth-card .form-group { margin-bottom: 0.9rem; }
.auth-field { position: relative; }
.auth-field .auth-ico { position: absolute; left: 0.75rem; top: 50%; width: 1rem; height: 1rem; transform: translateY(-50%); color: var(--fg-3); pointer-events: none; transition: color var(--dur-base) var(--ease-out); }
.auth-field:focus-within .auth-ico { color: var(--fg); }
.auth-field .form-input { padding-left: 2.5rem; background: var(--surface-2); transition: border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), background var(--dur-base) var(--ease-out); }
.auth-field .form-input:focus { background: var(--bg); box-shadow: 0 0 0 2px var(--ring); }
.auth-field .form-input.has-toggle { padding-right: 2.75rem; }
.auth-field .form-input.otp-input { padding-left: 0.9rem; text-align: center; font-size: 1.25rem; letter-spacing: 0.5rem; font-family: var(--font-mono); }
.pw-toggle { position: absolute; right: 0.25rem; top: 50%; transform: translateY(-50%); width: 2.25rem; height: 2.25rem; display: grid; place-items: center; background: none; border: 0; border-radius: var(--radius-sm); color: var(--fg-3); cursor: pointer; transition: color var(--dur-fast) var(--ease-out); }
.pw-toggle:hover { color: var(--fg); }
.pw-toggle:focus-visible, .auth-card .btn:focus-visible, .auth-link:focus-visible, .resend-btn:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
.pw-toggle .eye-off { display: none; }
.pw-toggle[aria-pressed="true"] .eye { display: none; }
.pw-toggle[aria-pressed="true"] .eye-off { display: block; }


.pw-meter { display: none; margin-top: 0.5rem; }
.pw-meter.show { display: block; }
.pw-meter-bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.pw-meter-bars i { height: 3px; border-radius: 2px; background: var(--line); transition: background var(--dur-base) var(--ease-out); }
.pw-meter[data-level="1"] i:nth-child(-n+1) { background: var(--block); }
.pw-meter[data-level="2"] i:nth-child(-n+2) { background: var(--escalate); }
.pw-meter[data-level="3"] i:nth-child(-n+3) { background: var(--allow); }
.pw-meter[data-level="4"] i { background: var(--allow); }
.pw-meter-label { margin-top: 0.35rem; font-size: 0.75rem; color: var(--fg-3); }


.auth-card .form-banner { display: block; max-height: 0; margin: 0; padding: 0 0.75rem; overflow: hidden; opacity: 0; border-width: 0; font-size: 0.8125rem; line-height: 1.5; transition: opacity var(--dur-slow) var(--ease-out), max-height var(--dur-slow) var(--ease-out), margin var(--dur-slow) var(--ease-out), padding var(--dur-slow) var(--ease-out); }
.auth-card .form-banner.show { max-height: 9rem; margin-bottom: 0.9rem; padding: 0.625rem 0.75rem; opacity: 1; border-width: 1px; }
.auth-card .form-banner.ok { color: var(--allow); background: var(--allow-bg); border-color: var(--allow); }
.auth-card .form-banner.warn { color: var(--escalate); background: var(--escalate-bg); border-color: var(--escalate); }


.auth-card .btn-block { margin-top: 0.5rem; }
.btn.is-loading { pointer-events: none; }
.btn.is-loading::before { content: ""; width: 0.875rem; height: 0.875rem; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: auth-spin 0.7s linear infinite; }
.btn-primary.is-loading:disabled { opacity: 0.8; }
@keyframes auth-spin { to { transform: rotate(360deg); } }


.auth-state { text-align: center; }
.auth-state .auth-state-icon { display: grid; place-items: center; width: 3rem; height: 3rem; margin: 0 auto 1rem; border-radius: 50%; border: 1px solid var(--line-strong); color: var(--fg); }
.auth-state.is-bad .auth-state-icon { color: var(--block); border-color: var(--block); background: var(--block-bg); }
.auth-state.is-ok .auth-state-icon { color: var(--allow); border-color: var(--allow); background: var(--allow-bg); }
.auth-state p { font-size: 0.9375rem; color: var(--fg-2); line-height: 1.6; margin: 0 0 1.5rem; }
.auth-state h1 { margin-bottom: 0.5rem; }
.auth-state .btn { width: 100%; }
.invite-for { margin: 0 0 1.25rem; padding: 0.6rem 0.9rem; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); font-family: var(--font-mono); font-size: 0.8125rem; color: var(--fg-2); word-break: break-all; text-align: center; }
.invite-loading { text-align: center; padding: 1rem 0; color: var(--fg-3); font-size: 0.875rem; }
.otp-sent-msg { text-align: center; font-size: 0.875rem; color: var(--fg-2); margin: 0 0 1.25rem; }
.resend-btn { background: none; border: 0; color: var(--fg-3); font-size: 0.8125rem; cursor: pointer; font-family: var(--font-sans); }
.resend-btn:hover { color: var(--fg); text-decoration: underline; }
.fade-in { animation: auth-rise var(--dur-slow) var(--ease-out) both; }


.auth-aside {
  display: none; position: relative; overflow: hidden; flex-direction: column; justify-content: flex-end; padding: 3rem;
  color: #fff; background: #111 url(/static/assets/photos/fog-forest.jpg) 50% 70% / cover no-repeat;
}
.auth-aside::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05) 0%, rgba(0,0,0,.35) 45%, rgba(0,0,0,.82) 100%); }
.auth-aside > * { position: relative; }
.auth-aside h2 { font-family: var(--font-display); font-size: 2rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; text-wrap: balance; margin: 0 0 1.25rem; color: #fff; }
.auth-aside ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; font-size: 0.875rem; color: rgba(255,255,255,.86); }
.auth-aside li { display: flex; gap: 0.6rem; align-items: baseline; }
.auth-aside li::before { content: ""; flex: none; width: 0.4rem; height: 0.4rem; background: #fff; transform: translateY(-1px); }
@media (min-width: 960px) { .auth-shell { grid-template-columns: minmax(0, 1fr) 26rem; } .auth-aside { display: flex; } }
@media (min-width: 1280px) { .auth-shell { grid-template-columns: minmax(0, 1fr) 32rem; } }
@media (max-width: 480px) { .auth-card { padding: 1.5rem 1.25rem; } .auth-main { padding-top: 4.5rem; } }

.auth-shell--login { background: var(--bg); }
.auth-shell--login .auth-main {
  position: relative;
  background-image: radial-gradient(var(--line-strong) 1px, transparent 1px);
  background-size: 20px 20px;
  -webkit-mask-image: none; mask-image: none;
}
.auth-shell--login .auth-main::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 60% 55% at 50% 50%, var(--bg) 35%, transparent 100%);
}
.auth-shell--login .auth-main > * { position: relative; }
.auth-shell--login .auth-card { background: var(--bg); box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 12px 32px -16px rgba(0,0,0,.12); }
.auth-shell--login .auth-field .form-input { background: var(--surface); }
.auth-shell--login .auth-field .form-input:focus { background: var(--bg); }

.auth-aside--feed {
  background: var(--surface); color: var(--fg); border-left: 1px solid var(--line);
  justify-content: space-between; gap: 2.5rem; padding: 3rem;
}
.auth-aside--feed::before { content: none; }
.auth-aside--feed h2 { color: var(--fg); font-size: 1.75rem; margin-bottom: 1rem; }
.auth-aside--feed ul { color: var(--fg-2); }
.auth-aside--feed li::before { background: var(--fg); }
.gate-feed { display: flex; flex-direction: column; gap: 0.75rem; margin: auto 0; }
.gate-feed-head { display: flex; align-items: center; justify-content: space-between; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-2); }
.gate-feed-head .gate-feed-live { display: inline-flex; align-items: center; gap: 0.5rem; }
.gate-feed-head .gate-feed-live::before { content: ""; width: 0.4rem; height: 0.4rem; border-radius: 50%; background: var(--allow); }
.gate-feed-list { list-style: none; margin: 0; padding: 0; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: block; }
.auth-aside--feed .gate-feed-list li { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.75rem 1rem; border-top: 1px solid var(--line); animation: auth-rise var(--dur-slow) var(--ease-out) both; animation-delay: calc(var(--i, 0) * 60ms + 200ms); }
.auth-aside--feed .gate-feed-list li:first-child { border-top: 0; }
.auth-aside--feed .gate-feed-list li::before { content: none; }
.gate-feed-call { min-width: 0; display: grid; gap: 0.125rem; }
.gate-feed-tool { font-family: var(--font-mono); font-size: 0.8125rem; font-weight: 500; color: var(--fg); }
.gate-feed-arg { font-family: var(--font-mono); font-size: 0.75rem; color: var(--fg-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gate-feed-meta { flex: none; display: flex; align-items: center; gap: 0.625rem; }
.gate-feed-ms { font-family: var(--font-mono); font-size: 0.75rem; color: var(--fg-3); font-variant-numeric: tabular-nums; }
@media (min-width: 960px) { .auth-shell--login { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (min-width: 1280px) { .auth-shell--login { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }


html.motion-off .auth-aside--feed .gate-feed-list li { animation: none; }
html.motion-off .auth-card,html.motion-off .fade-in, html.motion-off .btn.is-loading::before { animation: none; }
html.motion-off .auth-card .form-banner, html.motion-off .auth-field .form-input, html.motion-off .pw-meter-bars i { transition: none; }



.landing-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
}
.landing-nav .nav-brand { color: var(--fg); font-size: 0.9375rem; }
.landing-nav .nav-brand .icon { color: var(--fg); }
.landing-nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-size: 0.875rem;
}

.landing-nav-links a:not(.btn) { color: var(--fg-2); }
.landing-nav-links a:not(.btn):hover { color: var(--fg-hover); }
.landing-nav-links .btn { padding: 0.55rem 1.15rem; font-size: 0.875rem; }
@media (max-width: 620px) {
  .landing-nav { justify-content: center; }
  .landing-nav-links { gap: 1rem; justify-content: center; }
}


.user-menu { position: relative; display: inline-flex; align-items: center; margin-left: 0.5rem; }
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--fg);
  background: var(--surface-2);
  color: var(--fg);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  padding: 0;
}
.avatar:hover { border-color: var(--fg-hover); }
.user-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 0.6rem);
  z-index: 40;
  min-width: 200px;
  padding: 0.6rem;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-pop);
}
.user-dropdown.open { display: block; }
.user-dropdown .who {
  padding: 0.4rem 0.55rem 0.65rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0.5rem;
}
.user-dropdown .who strong { display: block; font-size: 0.875rem; font-weight: 600; }
.user-dropdown .who span { font-size: 0.75rem; color: var(--fg-2); word-break: break-all; }
.user-dropdown button,
.user-dropdown a {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.45rem 0.55rem;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--fg-2);
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  cursor: pointer;
}
.user-dropdown button:hover,
.user-dropdown a:hover { background: var(--surface-2); color: var(--fg); }


.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.45);
  
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur-base) var(--ease-out), visibility 0s linear var(--dur-base);
}
.modal-overlay.open {
  opacity: 1;
  visibility: visible;
  transition: opacity var(--dur-base) var(--ease-out);
}
.modal {
  width: 100%;
  max-width: 520px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 1.85rem;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-modal);
}

.modal-overlay.open .modal {
  animation: modalPopIn var(--dur-slow) var(--ease-out);
}
@keyframes modalPopIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
.modal h2 { font-size: 1.125rem; margin-bottom: 0.4rem; }
.modal .modal-sub { color: var(--fg-2); font-size: 0.875rem; margin-bottom: 1.5rem; }
.modal-actions { display: flex; gap: 0.7rem; justify-content: flex-end; margin-top: 1.5rem; }
.modal-actions .btn { padding: 0.65rem 1.35rem; font-size: 0.875rem; }


.code-block { position: relative; margin: 0.85rem 0; }
.code-block pre {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1rem 3.25rem 1rem 1rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.7;
  color: var(--fg);
  white-space: pre;
}
.copy-btn {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--fg-2);
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  cursor: pointer;
}
.copy-btn:hover { border-color: var(--fg); color: var(--fg); }
.copy-btn.copied { border-color: var(--allow); color: var(--allow); }


.copy-btn .ic-done { display: none; }
.copy-btn.copied .ic-copy { display: none; }
.copy-btn.copied .ic-done { display: inline; }
.copy-btn.copied { animation: copyPop var(--dur-base) var(--ease-out); }
@keyframes copyPop { 0% { transform: scale(0.94); } 60% { transform: scale(1.04); } 100% { transform: none; } }
.copy-btn svg { width: 12px; height: 12px; }
.copy-row .copy-btn { position: static; flex-shrink: 0; min-width: 5.25rem; justify-content: center; }
.copy-row .copy-val { flex: 1; min-width: 0; font-family: var(--font-mono); font-size: 0.8125rem; color: var(--fg); word-break: break-all; white-space: pre-wrap; }
.btn-ghost-danger { background: transparent; color: var(--fg-2); }
.btn-ghost-danger:hover { background: var(--block-bg); color: var(--block); }
.btn-confirm-danger { background: var(--block); border-color: var(--block); color: var(--on-fg); }
.btn-confirm-danger:hover { background: var(--block-strong); border-color: var(--block-strong); color: var(--on-fg); }
.btn-confirm-danger:disabled { background: var(--block); }


.guide-step {
  display: flex;
  gap: 1.15rem;
  align-items: flex-start;
  padding: 1.75rem 0;
  border-top: 1px solid var(--line);
}
.guide-step:first-of-type { border-top: 0; padding-top: 0.5rem; }
.guide-step > .body { flex: 1; min-width: 0; }
.guide-step h2 { font-size: 1.0625rem; font-weight: 600; margin-bottom: 0.35rem; }
.guide-step p { color: var(--fg-2); font-size: 0.9375rem; }
.step-num-badge {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--fg);
  color: var(--on-fg);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
}


.key-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.85rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
}
.key-row .key-prefix {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--fg);
}
.key-row .key-label { color: var(--fg); font-weight: 500; }
.key-row .key-dates { margin-left: auto; display: flex; gap: 1.15rem; color: var(--fg-3); font-size: 0.75rem; flex-wrap: wrap; }
@media (max-width: 720px) {
  
  .key-row .key-dates { margin-left: 0; width: 100%; }
}
.btn-danger {
  background: transparent;
  border-color: var(--block);
  color: var(--block);
}
.btn-danger:hover { background: var(--block-bg); color: var(--block); }


.secret-reveal {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--bg);
  border: 1px solid var(--fg);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  word-break: break-all;
}
.warn-note {
  margin-top: 0.85rem;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--escalate-bg);
  color: var(--fg-2);
  font-size: 0.8125rem;
}


.section-card {
  padding: 1.75rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.stack { display: flex; flex-direction: column; gap: 0.75rem; }
.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}


.dd { position: relative; display: inline-block; max-width: 100%; vertical-align: middle; }
.dd:has(> .dd-btn.input), .dd:has(> .dd-btn.form-input) { display: block; }
.dd .dd-native {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: 0; border: 0;
  opacity: 0; pointer-events: none; overflow: hidden; clip-path: inset(50%);
}
.dd-btn {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  width: 100%; text-align: left; cursor: pointer;
  font-family: var(--font-sans); font-size: 0.8125rem; font-weight: 500; line-height: 1.3;
  padding: 0.45rem 0.65rem 0.45rem 0.75rem;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--bg); color: var(--fg);
}
.dd-btn.input, .dd-btn.form-input { font-size: 0.9375rem; font-weight: 400; padding: 0.7rem 0.75rem 0.7rem 0.9rem; border-radius: var(--radius); }
.dd-btn:hover:not(:disabled) { background: var(--surface-2); }
.dd-btn:focus-visible, .dd-btn[aria-expanded="true"] { outline: none; border-color: var(--fg); box-shadow: 0 0 0 2px var(--ring); }
.dd-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.dd-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-chev { flex: none; width: 15px; height: 15px; color: var(--fg-3); transition: transform var(--dur-base) var(--ease-out); }
.dd.is-open .dd-chev { transform: rotate(180deg); color: var(--fg); }

.dd-menu {
  display: none; position: absolute; z-index: 60; top: calc(100% + 4px); left: 0;
  min-width: 100%; width: max-content; max-width: min(24rem, 90vw); max-height: 260px; overflow-y: auto;
  margin: 0; padding: 4px; list-style: none;
  background: var(--bg); border: 1px solid var(--line-strong); border-radius: var(--radius);
  box-shadow: var(--shadow-pop);
  opacity: 0; transform: translateY(-4px); clip-path: inset(0 0 100% 0 round var(--radius));
  transform-origin: top; pointer-events: none;
  transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-base) var(--ease-out), clip-path var(--dur-base) var(--ease-out);
}
.dd.dd-up .dd-menu { top: auto; bottom: calc(100% + 4px); transform: translateY(4px); transform-origin: bottom; clip-path: inset(100% 0 0 0 round var(--radius)); }
.dd-menu.is-open { opacity: 1; transform: none; clip-path: inset(0 round var(--radius)); pointer-events: auto; }
.dd-opt {
  padding: 0.45rem 0.6rem; border-radius: var(--radius-sm); cursor: pointer;
  font-size: 0.8125rem; color: var(--fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.dd-opt + .dd-opt { margin-top: 2px; }
.dd-opt.is-active { background: var(--surface-2); color: var(--fg); }
.dd-opt[aria-selected="true"] { background: var(--fg); color: var(--on-fg); font-weight: 500; }
.dd-opt[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; }


.foot-tools { display: inline-flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.motion-toggle {
  min-height: 34px; padding: 0 0.75rem; border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--bg); color: var(--fg-2); font: 500 0.8125rem var(--font-sans); cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.motion-toggle:hover { background: var(--surface-2); color: var(--fg); }
.motion-toggle:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }


html.motion-off [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }

.sim-note { margin: 10px auto 0; max-width: 960px; padding: 0 24px; font-size: .8125rem; color: var(--fg-3); text-align: center; }


@media (max-width: 860px) {
  html, body { overflow-x: clip; }
  img, svg, video, canvas { max-width: 100%; }
  textarea, pre, .policy-mini { max-width: 100%; box-sizing: border-box; }
  pre, code.block, .code-block { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .table-wrap, .ev-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  
  input:not([type="checkbox"]):not([type="radio"]), select, textarea,
  .field, .input, .form-input { font-size: 16px; }
  .btn, .pill, .tab, .user-dropdown button, .user-dropdown a { min-height: 40px; }
  .dash-main { padding-left: max(1.1rem, env(safe-area-inset-left)); padding-right: max(1.1rem, env(safe-area-inset-right)); padding-bottom: calc(4rem + env(safe-area-inset-bottom)); }
  .dash-head { gap: 0.6rem; }
  .dash-head > * { min-width: 0; }
  .modal { max-width: calc(100vw - 1.5rem); max-height: 90dvh; overflow-y: auto; }
  .toast, .toast-ok, .toast-error { max-width: calc(100vw - 1.5rem); }
}
@media (max-width: 480px) {
  .dash-main { padding-top: 3.25rem; }
  .stat-grid { gap: 0.6rem; }
  .doc-link, .sb-hint, .kbd, kbd { display: none; }
}


html body :is(.code-block pre, .json-pre, .preset-yaml, .ed, .ed-status) {
  --bg: #0A0A0A; --fg: #FAFAFA; --fg-2: #C4C4C4; --fg-3: #8A8A8A;
  --line: #262626; --line-strong: #404040; --surface: #111111; --surface-2: #1A1A1A;
  --allow: #3FCF8E; --allow-bg: rgba(63,207,142,.14);
  --block: #F97066; --block-bg: rgba(249,112,102,.14);
  --ring: rgba(250,250,250,.28);
  background: #0A0A0A; color: #FAFAFA;
  border-color: #262626;
}
html body :is(.code-block pre, .json-pre, .preset-yaml) { color: #E5E5E5; }
html body .ed { border-color: #404040; }
html body .ed-status { background: #111111; border-color: #404040; }
html body .ed-gutter { background: #111111; border-right-color: #262626; }
html body .ed-text { color: #FAFAFA; caret-color: #FAFAFA; }
html body .ed-text[readonly] { color: #A3A3A3; }
html body .preset-yaml code { color: inherit; background: none; border: 0; padding: 0; }
html body .code-block .copy-btn { background: #1A1A1A; border-color: #404040; color: #C4C4C4; }
html body .code-block .copy-btn:hover { border-color: #FAFAFA; color: #FAFAFA; }
html body .code-block .copy-btn.copied { border-color: #3FCF8E; color: #3FCF8E; }


html.app-shell {
  --canvas: #E9E9E9;
  --card: #F4F4F4;
  --card-edge: rgba(255, 255, 255, 0.95);
  --tile: #FFFFFF;
  --bg: #FFFFFF;
  --surface: #F4F4F4;
  --surface-2: #ECECEC;
  --line: #E1E1E1;
  --line-strong: #CDCDCD;
  --fg: #0F0F0F;
  --fg-2: #4D4D4D;
  --fg-3: #6B6B6B;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-card: 22px;
  --radius-tile: 14px;
  
  --app-max: 2200px;
  --app-gutter: clamp(1rem, 1.4vw, 1.5rem);
  --shadow-card: 0 0 0 1px rgba(0, 0, 0, 0.035), 0 1px 2px rgba(0, 0, 0, 0.03), 0 8px 24px rgba(0, 0, 0, 0.035);
  --shadow-tile: 0 0 0 1px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06), 0 4px 10px rgba(0, 0, 0, 0.04);
  --shadow-tile-hover: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 2px 4px rgba(0, 0, 0, 0.07), 0 8px 18px rgba(0, 0, 0, 0.06);
  --allow-soft: #DDF3E4;
  --block-soft: #FBE3E1;
  --escalate-soft: #FBEBD3;
}
html.app-shell[data-theme="dark"] {
  --canvas: #0B0B0B;
  --card: #151515;
  --card-edge: rgba(255, 255, 255, 0.05);
  --tile: #1F1F1F;
  --bg: #1A1A1A;
  --surface: #151515;
  --surface-2: #232323;
  --line: #2A2A2A;
  --line-strong: #3D3D3D;
  --fg: #F5F5F5;
  --fg-2: #B0B0B0;
  --fg-3: #8A8A8A;
  --shadow-card: 0 0 0 1px rgba(255, 255, 255, 0.04), 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-tile: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 2px 6px rgba(0, 0, 0, 0.5);
  --shadow-tile-hover: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 4px 12px rgba(0, 0, 0, 0.55);
  --allow-soft: rgba(63, 207, 142, 0.16);
  --block-soft: rgba(249, 112, 102, 0.16);
  --escalate-soft: rgba(245, 176, 74, 0.16);
}

html.app-shell body { background: var(--canvas); min-height: 100vh; }


.tb {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: center; gap: 1rem;
  max-width: var(--app-max); margin: 0 auto;
  padding: 1rem var(--app-gutter) 0.75rem;
  background: linear-gradient(var(--canvas) 70%, transparent);
}
.tb-left { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.tb-right { display: flex; align-items: center; gap: 0.5rem; margin-left: 0.25rem; flex-shrink: 0; }

.tb-tile {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  height: 48px; min-width: 48px; padding: 0 0.85rem;
  background: var(--tile); color: var(--fg);
  border: 0; border-radius: var(--radius-tile);
  box-shadow: var(--shadow-tile);
  font-family: var(--font-sans); font-size: 0.875rem; font-weight: 500;
  text-decoration: none; cursor: pointer; position: relative;
  transition: box-shadow var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.tb-tile:hover { color: var(--fg); box-shadow: var(--shadow-tile-hover); }
.tb-tile:active { transform: scale(0.97); }
.tb-tile svg { width: 21px; height: 21px; flex-shrink: 0; }
.tb-home {
  display: inline-flex; align-items: center; gap: 0.7rem; flex-shrink: 0;
  margin-right: 0.5rem; color: var(--fg); text-decoration: none;
}
.tb-home:hover { color: var(--fg); }
.tb-brand { padding: 0; width: 40px; background: none; box-shadow: none; }
.tb-brand:hover { box-shadow: none; }
.tb-brand .brand { --brand-h: 32px; }
.tb-brand-name {
  font-family: var(--font-display); font-size: 1.1875rem; font-weight: 600;
  letter-spacing: -0.02em; white-space: nowrap;
}


.tb-group {
  position: relative;
  display: flex; align-items: center; gap: 2px;
  padding: 5px; border-radius: 20px;
  background: var(--surface-2);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06), inset 0 0 0 1px rgba(0, 0, 0, 0.03);
  overflow-x: auto; scrollbar-width: none;
}
.tb-group::-webkit-scrollbar { display: none; }
.tb-group .tb-nav {
  position: relative; z-index: 1;
  flex-direction: column; gap: 4px; flex-shrink: 0;
  height: 58px; min-width: 76px; padding: 0 0.75rem;
  background: transparent; box-shadow: none; color: var(--fg-3);
}
.tb-group .tb-nav:hover { box-shadow: none; color: var(--fg); }
.tb-group .tb-nav:active { transform: none; }
.tb-group .tb-nav svg { width: 20px; height: 20px; transition: color var(--dur-fast) var(--ease-out); }
.tb-nav-label {
  font-size: 0.6875rem; font-weight: 500; line-height: 1.1; letter-spacing: 0.01em;
  white-space: nowrap; color: inherit;
}
.tb-group .tb-nav.active { color: var(--fg); background: transparent; }
.tb-group .tb-nav.active .tb-nav-label { font-weight: 600; }
.tb-group:not(.has-ind) .tb-nav.active { background: var(--tile); box-shadow: var(--shadow-tile); }

.tb-ind {
  position: absolute; top: 5px; left: 0; z-index: 0;
  height: 58px; width: 0;
  border-radius: 15px; background: var(--tile); box-shadow: var(--shadow-tile);
  opacity: 0; pointer-events: none;
  transition: transform 280ms var(--ease-out), width 280ms var(--ease-out), opacity var(--dur-fast);
}
.tb-group.has-ind .tb-ind { opacity: 1; }
.tb-ind::after {
  content: ""; position: absolute; left: 50%; bottom: 5px;
  width: 16px; height: 2.5px; margin-left: -8px; border-radius: 2px;
  background: var(--fg); opacity: 0;
  transition: opacity var(--dur-fast) var(--ease-out);
}
.tb-ind.on-active::after { opacity: 1; }
.tb-ind.no-anim { transition: none; }
html.app-shell[data-theme="dark"] .tb-group { background: #111111; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05); }
html.app-shell[data-theme="dark"] .tb-ind { background: #262626; }

.tb-search {
  flex: 0 1 460px; min-width: 220px;
  display: flex; align-items: center; gap: 0.65rem;
  height: 52px; padding: 0 1.15rem;
  background: var(--tile); border-radius: 18px; box-shadow: var(--shadow-tile);
  cursor: text;
  transition: box-shadow var(--dur-fast) var(--ease-out);
}
.tb-search:focus-within { box-shadow: 0 0 0 2px var(--fg), var(--shadow-tile); }
.tb-search svg { width: 20px; height: 20px; color: var(--fg-2); flex-shrink: 0; }
.tb-search input {
  flex: 1; min-width: 0; height: 100%;
  border: 0; outline: 0; background: transparent;
  font-family: var(--font-sans); font-size: 0.9375rem; color: var(--fg);
}
.tb-search input::placeholder { color: var(--fg-3); }
.tb-search { position: relative; }

.tb-search input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; display: none; }
.tb-clear {
  flex-shrink: 0; width: 28px; height: 28px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 8px; background: transparent; color: var(--fg-3); cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.tb-clear:hover { background: var(--surface-2); color: var(--fg); }
.tb-clear[hidden] { display: none; }
.tb-clear svg { width: 16px; height: 16px; }
.tb-kbd {
  flex-shrink: 0; min-width: 24px; height: 24px; padding: 0 6px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 7px; background: var(--surface-2); color: var(--fg-3);
  font-family: var(--font-mono); font-size: 0.75rem;
}
.tb-search:focus-within .tb-kbd { display: none; }


.tb-results {
  position: absolute; top: calc(100% + 10px); left: 0; right: 0; z-index: 45;
  max-height: min(70vh, 560px); overflow-y: auto; overscroll-behavior: contain;
  padding: 0.4rem; cursor: default;
  background: var(--tile); border-radius: 20px;
  box-shadow: var(--shadow-pop), 0 0 0 1px rgba(0, 0, 0, 0.05);
  animation: sbDropdownIn 150ms ease-out;
}
.tb-results[hidden] { display: none; }
.tb-r-group + .tb-r-group { border-top: 1.5px dashed var(--line); margin-top: 0.3rem; padding-top: 0.3rem; }
.tb-r-head {
  padding: 0.45rem 0.7rem 0.3rem;
  font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-3);
}
.tb-r-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.5rem 0.6rem; border-radius: 12px;
  color: var(--fg); text-decoration: none;
}
.tb-r-item:hover, .tb-r-item.is-active { background: var(--surface-2); color: var(--fg); }
.tb-r-icon {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--tile); box-shadow: var(--shadow-tile); color: var(--fg-2);
}
.tb-r-icon svg { width: 17px; height: 17px; }
.tb-r-item.is-active .tb-r-icon { background: var(--fg); color: var(--on-fg); box-shadow: none; }
.tb-r-text { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.35; }
.tb-r-title { font-size: 0.875rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-r-title.is-mono { font-family: var(--font-mono); font-size: 0.8125rem; }
.tb-r-sub { font-size: 0.75rem; color: var(--fg-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-r-item mark { background: transparent; color: inherit; font-weight: 700; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 2px; }
.tb-r-item .decision-badge { flex-shrink: 0; }
.tb-r-empty { padding: 0.75rem 0.8rem; font-size: 0.8125rem; color: var(--fg-3); }
.tb-r-tip { padding: 0.5rem 0.8rem 0.3rem; font-size: 0.6875rem; color: var(--fg-3); text-align: right; }
@media (max-width: 620px) { .tb-r-tip, .tb-kbd { display: none; } }

.tb-count {
  position: absolute; top: 7px; right: 7px;
  min-width: 18px; height: 18px; padding: 0 5px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; background: var(--escalate); color: #FFFFFF;
  font-size: 0.6875rem; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums;
  box-shadow: 0 0 0 2px var(--tile);
}
.tb-count[hidden] { display: none; }
.tb-user { position: relative; }
.tb-avatar {
  width: 52px; height: 52px; padding: 0; border-radius: 16px;
  background: var(--fg); color: var(--on-fg);
  font-family: var(--font-display); font-size: 0.9375rem; font-weight: 600; letter-spacing: 0.02em;
}
.tb-avatar:hover { color: var(--on-fg); }
.tb-avatar { overflow: hidden; }
.tb-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }

.tb-notif { position: relative; }
.sb-dropdown.tb-notif-drop { width: 320px; padding: 0.5rem; }
.tb-notif-tabs { display: flex; gap: 4px; padding: 2px; margin-bottom: 0.35rem; background: var(--surface-2); border-radius: 12px; }
.sb-dropdown .tb-notif-tab { flex: 1; text-align: center; padding: 0.4rem 0.5rem; border-radius: 10px; font-size: 0.8125rem; font-weight: 500; color: var(--fg-2); }
.sb-dropdown .tb-notif-tab:hover { background: transparent; color: var(--fg); }
.sb-dropdown .tb-notif-tab.active { background: var(--fg); color: var(--on-fg); }
.tb-notif-list { display: flex; flex-direction: column; max-height: 340px; overflow-y: auto; }
.sb-dropdown .tb-notif-item { display: flex; flex-direction: column; gap: 2px; border-radius: 10px; padding: 0.5rem 0.65rem; }
.tb-notif-title { font-family: var(--font-mono); font-size: 0.8125rem; font-weight: 500; }
.tb-notif-sub { font-size: 0.75rem; color: var(--fg-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-notif-empty { padding: 0.75rem 0.65rem; font-size: 0.8125rem; color: var(--fg-3); }
.sb-dropdown .tb-notif-all { border-top: 1px dashed var(--line); border-radius: 0 0 10px 10px; margin-top: 0.25rem; text-align: center; font-size: 0.8125rem; font-weight: 500; }
@media (max-width: 620px) { .sb-dropdown.tb-notif-drop { position: fixed; left: 12px; right: 12px; width: auto; top: 76px; } }

.sb-dropdown.tb-dropdown {
  top: calc(100% + 10px); bottom: auto; left: auto; right: 0;
  width: 248px; padding: 0.5rem;
  background: var(--tile); border: 0; border-radius: 18px;
  box-shadow: var(--shadow-pop), 0 0 0 1px rgba(0, 0, 0, 0.05);
}
.tb-dropdown > a, .tb-dropdown > button { border-radius: 10px; padding: 0.5rem 0.65rem; }
.tb-dropdown > a:hover, .tb-dropdown > button:hover { background: var(--surface-2); }
.tb-dropdown .sb-who { padding: 0.5rem 0.65rem 0.65rem; }


.tb-dropdown .tb-help { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.5rem 0.65rem; border-radius: 10px; }
.tb-dropdown .tb-help:hover { background: var(--surface-2); }
.tb-dropdown .tb-help-mail { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; width: auto; padding: 0; background: transparent; }
.tb-dropdown .tb-help-mail:hover { background: transparent; }
.tb-dropdown .tb-help-label { font-size: 0.75rem; color: var(--fg-3); }
.tb-dropdown .tb-help-addr { font-size: 0.8125rem; color: var(--fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-dropdown .tb-help-copy { width: auto; flex: none; padding: 0.25rem 0.4rem; background: transparent; color: #2563eb; font-size: 0.8125rem; font-weight: 500; }
.tb-dropdown .tb-help-copy:hover { background: transparent; color: #1d4ed8; }


html.app-shell .dash-main {
  margin: 0 auto; max-width: var(--app-max);
  padding: 0.75rem var(--app-gutter) 4rem;
}


html.app-shell :is(.card, .ov-panel, .stat, .sidebar-card, .section-card, .table-wrap, .ov-quickstart, .guide-step) {
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}
html.app-shell .card:hover { border-color: var(--card-edge); }
html.app-shell .table-wrap { padding: 0.35rem 0.5rem; }
html.app-shell :is(.table th, .table td) { border-bottom-style: dashed; }
html.app-shell .table tbody tr:hover { background: var(--tile); }


html.app-shell .btn { border-radius: 12px; }
html.app-shell :is(.btn-secondary, .btn-outline) {
  background: var(--tile); border-color: transparent; color: var(--fg);
  box-shadow: var(--shadow-tile);
}
html.app-shell :is(.btn-secondary, .btn-outline):hover:not(:disabled) {
  background: var(--tile); border-color: transparent; box-shadow: var(--shadow-tile-hover);
}
html.app-shell .btn-ghost:hover { background: var(--tile); }


html.app-shell :is(.input, .form-input, .field) {
  background: var(--tile); border-color: var(--line); border-radius: 12px;
}
html.app-shell .pill { background: var(--tile); border-color: transparent; box-shadow: var(--shadow-tile); }
html.app-shell .pill:hover { border-color: transparent; box-shadow: var(--shadow-tile-hover); }
html.app-shell .pill.active { background: var(--fg); color: var(--on-fg); box-shadow: none; }


html.app-shell .tabs {
  display: inline-flex; gap: 4px; padding: 4px;
  border: 0; border-radius: 16px; background: var(--surface-2);
}
html.app-shell .tab { border: 0; border-radius: 12px; margin: 0; padding: 0.5rem 1rem; }
html.app-shell :is(.tab.active, .tab[aria-selected="true"]) {
  background: var(--tile); box-shadow: var(--shadow-tile); border-bottom-color: transparent;
}


html.app-shell .tabs:has(.tab-indicator) .tab { position: relative; z-index: 1; background: transparent; box-shadow: none; }
html.app-shell .tab-indicator {
  top: 4px; bottom: 4px; height: auto; z-index: 0;
  background: var(--tile); border-radius: 12px; box-shadow: var(--shadow-tile);
}


html.app-shell .dash-main h1 { font-family: var(--font-display); font-size: 1.875rem; font-weight: 600; letter-spacing: -0.02em; }


html.app-shell :is(.badge, .decision-badge) { border-radius: 999px; border-color: transparent; }
html.app-shell :is(.badge-allow, .badge-ALLOW)       { background: var(--allow-soft); }
html.app-shell :is(.badge-block, .badge-BLOCK)       { background: var(--block-soft); }
html.app-shell :is(.badge-escalate, .badge-ESCALATE) { background: var(--escalate-soft); }

html.app-shell .modal { border-radius: 24px; border: 0; background: var(--card); }
html.app-shell .doc-link {
  padding: 0.3rem 0.7rem; border-radius: 999px; opacity: 1;
  background: var(--tile); box-shadow: var(--shadow-tile); color: var(--fg-2);
}
html.app-shell .doc-link:hover { color: var(--fg); text-decoration: none; }

@media (max-width: 1180px) {
  .tb { flex-wrap: wrap; }
  .tb-search { order: 3; flex: 1 1 100%; max-width: none; }
  .tb { justify-content: space-between; }
}
@media (max-width: 620px) {
  .tb { padding: 0.75rem 1rem 0.5rem; gap: 0.6rem; }
  .tb-home { display: none; }
  .tb-left { flex: 1; min-width: 0; }
  .tb-group { gap: 2px; padding: 4px; border-radius: 16px; }
  .tb-group .tb-nav { height: 50px; min-width: 58px; padding: 0 0.6rem; border-radius: 12px; gap: 2px; }
  .tb-ind { top: 4px; height: 50px; border-radius: 12px; }
  .tb-group .tb-nav svg { width: 18px; height: 18px; }
  .tb-nav-label { font-size: 0.625rem; }
  .tb-tile { height: 44px; min-width: 44px; }
  .tb-avatar { width: 44px; height: 44px; border-radius: 14px; }
  .tb-search { height: 46px; }
  html.app-shell .dash-main { padding: 0.5rem 1rem 3rem; }
}
.sb-dropdown .tb-notif-all[hidden] { display: none; }


html.app-shell .sidebar {
  background: var(--tile);
  border: 1px solid var(--card-edge);
  box-shadow: var(--shadow-card);
  border-radius: 18px;
}
html.app-shell[data-theme="dark"] .sidebar { border-color: var(--line); }
html.app-shell .sb-brand { font-family: var(--font-display); font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.02em; }
html.app-shell .sb-link { border-radius: 12px; }
html.app-shell .sb-link:hover,
html.app-shell .sb-link.active { background: var(--surface-2); }
html.app-shell .sb-bottom { border-top-color: var(--line); }


html.app-shell .sb-dropdown.tb-dropdown.sb-dropdown--user {
  top: auto; right: auto; left: 0; bottom: calc(100% + 10px); width: 100%;
}
html.sb-collapsed.app-shell .sb-dropdown.tb-dropdown.sb-dropdown--user { width: 248px; }


html.app-shell .tb {
  max-width: none; margin: 0 0 0 240px;
  justify-content: space-between;
  padding: 1rem var(--app-gutter) 0.75rem;
}
html.app-shell .dash-main { margin: 0 0 0 240px; max-width: none; }
html.sb-collapsed.app-shell .tb,
html.sb-collapsed.app-shell .dash-main { margin-left: 80px; }
html.app-shell .tb { flex-wrap: nowrap; }
html.app-shell .tb-search { flex: 0 1 520px; order: 0; }

@media (max-width: 860px) {
  html.app-shell .sidebar { background: var(--tile); border-radius: 0; }
  html.app-shell .sb-mobile-toggle { background: var(--canvas); border-bottom-color: var(--line); }
  html.app-shell .tb,
  html.sb-collapsed.app-shell .tb { margin: 40px 0 0; top: 40px; padding: 0.6rem 1rem 0.5rem; gap: 0.6rem; }
  html.app-shell .tb-search { flex: 1 1 auto; min-width: 0; max-width: none; order: 0; }
  html.app-shell .dash-main,
  html.sb-collapsed.app-shell .dash-main { margin-left: 0; padding: 0.5rem 1rem 3rem; }
  html.app-shell .sb-dropdown.tb-dropdown.sb-dropdown--user { width: 100%; }
}


.sb-avatar-circle { position: relative; overflow: hidden; }
.sb-avatar-circle img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }


html.app-shell .sb-icon { width: 32px; height: 32px; background: transparent; border-radius: 0; }
html.app-shell .sb-icon .brand { --brand-h: 26px; }
