:root {
  --bg-app: #fafafa;
  --bg-sidebar: #ffffff;
  --bg-card: #ffffff;
  --bg-card-elevated: #f3f3f3;
  --bg-input: #fafafa;
  --border: #dedede;
  --border-subtle: #f3f3f3;
  --text-primary: #171717;
  --text-secondary: #595959;
  --text-muted: #737373;
  --brand-primary: #171717;
  --brand-accent: #404040;
  --success: #404040;
  --success-bg: rgba(0, 0, 0, 0.14);
  --warning: #525252;
  --warning-bg: rgba(0, 0, 0, 0.14);
  --danger: #262626;
  --danger-bg: rgba(0, 0, 0, 0.14);
  --demo-badge: #737373;
  --demo-bg: rgba(0, 0, 0, 0.16);
  --radius: 10px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Cascadia Code', Consolas, monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
}

/* Sidebar Navigation */
.app-shell {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

.sidebar {
  width: 272px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.brand-header {
  padding: 1.35rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fafafa;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
}

.brand-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.brand-subtitle {
  font-size: 0.72rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.nav-section-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 1.1rem 1.25rem 0.4rem;
  font-weight: 600;
}

.nav-list {
  list-style: none;
  padding: 0 0.75rem;
}

.nav-btn {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  padding: 0.68rem 0.85rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.25rem;
  transition: all 0.15s ease;
}

.nav-btn:hover {
  background-color: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
}

.nav-btn.active {
  background-color: rgba(0, 0, 0, 0.12);
  color: var(--brand-primary);
  border-color: rgba(0, 0, 0, 0.28);
  font-weight: 600;
}

.nav-pill {
  font-size: 0.7rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: var(--bg-card-elevated);
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.nav-pill.alert {
  background: var(--warning-bg);
  color: var(--warning);
  border: 1px solid rgba(0, 0, 0, 0.35);
}

.sidebar-footer {
  margin-top: auto;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.76rem;
  color: var(--text-secondary);
}

.safety-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--success);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.dot-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--success);
  box-shadow: 0 0 8px var(--success);
}

/* Main Content Area */
.main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  height: 64px;
  border-bottom: 1px solid var(--border);
  background-color: #ffffff;
  backdrop-filter: blur(8px);
  padding: 0 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar-title {
  font-size: 1.1rem;
  font-weight: 700;
}

.topbar-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.demo-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.demo-toggle input {
  accent-color: var(--demo-badge);
  cursor: pointer;
}

.view-container {
  padding: 1.75rem;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

/* Badges & Status Pills */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.18rem 0.55rem;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-family: var(--font-mono);
}

.badge-demo {
  background: var(--demo-bg);
  color: #525252;
  border: 1px solid rgba(0, 0, 0, 0.35);
}

.badge-live {
  background: var(--success-bg);
  color: #404040;
  border: 1px solid rgba(0, 0, 0, 0.35);
}

.badge-working {
  background: var(--success-bg);
  color: #404040;
  border: 1px solid rgba(0, 0, 0, 0.35);
}

.badge-planned {
  background: rgba(0, 0, 0, 0.14);
  color: #525252;
  border: 1px solid rgba(0, 0, 0, 0.28);
}

.badge-warn {
  background: var(--warning-bg);
  color: #525252;
  border: 1px solid rgba(0, 0, 0, 0.35);
}

.badge-danger {
  background: var(--danger-bg);
  color: #262626;
  border: 1px solid rgba(0, 0, 0, 0.35);
}

/* Grid & Cards */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.1rem;
  margin-bottom: 1.5rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.card-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-value {
  font-size: 1.85rem;
  font-weight: 800;
  font-family: var(--font-mono);
  margin: 0.35rem 0;
}

.stat-meta {
  font-size: 0.78rem;
  color: var(--text-secondary);
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

/* Forms & Buttons */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-field label {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-secondary);
}

input[type="text"],
input[type="url"],
input[type="number"],
select,
textarea {
  background-color: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 0.55rem 0.75rem;
  border-radius: 6px;
  font-size: 0.86rem;
  font-family: var(--font-sans);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand-primary);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 0.95rem;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.btn-primary {
  background-color: var(--brand-primary);
  color: #fafafa;
}

.btn-primary:hover {
  background-color: #333333;
}

.btn-secondary {
  background-color: var(--bg-card-elevated);
  color: var(--text-primary);
  border-color: var(--border);
}

.btn-secondary:hover {
  border-color: var(--brand-primary);
}

.btn-success {
  background-color: var(--success);
  color: #ffffff;
}

.btn-danger {
  background-color: var(--danger-bg);
  color: #404040;
  border-color: rgba(0, 0, 0, 0.4);
}

/* Tables & Lists */
.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

th, td {
  text-align: left;
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: top;
}

th {
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 600;
}

.evidence-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.evidence-item {
  font-size: 0.8rem;
  background: #f5f5f5;
  border: 1px solid var(--border-subtle);
  padding: 0.45rem 0.65rem;
  border-radius: 6px;
}

.disclosure-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.75rem;
  margin: 0.85rem 0;
  background: var(--bg-input);
  padding: 0.9rem;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.disclosure-box {
  font-size: 0.8rem;
}

.disclosure-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brand-primary);
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.toast-banner {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  background: var(--bg-card-elevated);
  border: 1px solid var(--brand-primary);
  color: var(--text-primary);
  padding: 0.8rem 1.1rem;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.45);
  font-size: 0.85rem;
  z-index: 100;
  max-width: 420px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 1.5rem;
}

.modal-window {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 100%;
  max-width: 980px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-body {
  padding: 1rem;
  overflow-y: auto;
  flex: 1;
}

@media (max-width: 900px) {
  .app-shell {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

/* ShiftSwift workspace: quiet monochrome, readable type, consistent controls. */
:root { --font-sans: 'Segoe UI Variable Text', 'Segoe UI', Arial, sans-serif; --font-mono: 'Segoe UI Variable Text', 'Segoe UI', Arial, sans-serif; --radius: 12px; color-scheme: light; }
body { font-size: 14px; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
a { color: #262626; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid #171717; outline-offset: 3px; }
.sidebar { width: 248px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand-header { border: 0; padding: 30px 22px 26px; }
.brand-mark { background: #171717; color: #fff; border-radius: 10px; width: 34px; height: 34px; font-size: 12px; letter-spacing: -.5px; }
.brand-title { font-size: 16px; font-weight: 650; }
.brand-subtitle { text-transform: none; letter-spacing: 0; font-size: 12px; margin-top: 2px; }
.nav-section-label { text-transform: none; letter-spacing: 0; font-size: 11px; padding: 12px 24px 10px; }
.nav-list { padding: 0 12px; }
.nav-btn { padding: 11px 12px; font-size: 13px; border: 0; border-radius: 7px; margin-bottom: 3px; }
.nav-btn:hover { background: #f6f6f6; }
.nav-btn.active { background: #eeeeee; color: #171717; box-shadow: inset 2px 0 #171717; }
.nav-pill { background: #f1f1f1; color: #666; font-size: 10px; font-variant-numeric: tabular-nums; }
.nav-pill.alert { border: 0; background: #e9e9e9; color: #171717; }
.sidebar-footer { margin-top: auto; font-size: 11px; line-height: 1.7; padding: 20px 24px; }
.dot-pulse { box-shadow: none; width: 6px; height: 6px; }
.topbar { height: auto; min-height: 76px; padding: 18px 36px; background: #fff; backdrop-filter: none; }
.topbar-title { font-size: 17px; font-weight: 600; letter-spacing: -.4px; }
.topbar-controls { gap: 10px; flex-wrap: wrap; }
.demo-toggle { border: 0; background: transparent; padding: 6px; font-size: 11px; }
.view-container { max-width: 1440px; padding: 32px 36px 60px; }
.card { padding: 24px; box-shadow: 0 1px 2px rgba(0,0,0,.025); }
.card-title { font-size: 14px; font-weight: 600; letter-spacing: -.15px; }
.card-header { border-bottom-color: #ededed; padding-bottom: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.stat-value { font-size: 32px; font-weight: 550; letter-spacing: -1.2px; font-variant-numeric: tabular-nums; line-height: 1.3; margin: 12px 0 8px; }
.stat-meta { font-size: 11px; line-height: 1.7; }
.badge { text-transform: none; letter-spacing: 0; font-family: var(--font-sans); font-weight: 500; font-size: 10px; padding: 4px 7px; border: 1px solid #dedede; color: #444; background: #f7f7f7; }
.badge-danger { border-style: dashed; font-weight: 650; }
.badge-demo { border-style: dotted; }
.btn { min-height: 35px; padding: 8px 13px; font-size: 12px; font-family: var(--font-sans); border-radius: 7px; font-weight: 550; }
.btn-primary, .btn-success { background: #171717; color: #fff; }
.btn-primary:hover, .btn-success:hover { background: #333; }
.btn-secondary { background: #fff; border-color: #d9d9d9; }
.btn-secondary:hover { background: #f5f5f5; border-color: #aaa; }
.btn-danger { color: #262626; background: #eee; border-color: #ccc; }
input[type=text], input[type=url], input[type=email], input[type=number], select, textarea { background: #fff; border: 1px solid #d6d6d6; color: #171717; border-radius: 7px; padding: 10px 12px; min-width: 0; }
.form-field label { font-size: 12px; color: #444; }
table { font-size: 12px; line-height: 1.65; }
th { text-transform: none; letter-spacing: 0; font-size: 11px; background: #fafafa; color: #595959; }
th, td { padding: 14px 12px; }
tr:hover td { background: #fcfcfc; }
.evidence-item { background: #f6f6f6; line-height: 1.7; }
.disclosure-label { text-transform: none; letter-spacing: 0; }
.toast-banner { box-shadow: 0 6px 24px rgba(0,0,0,.08); background: #fff; }
.modal-backdrop { background: rgba(0,0,0,.4); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
@media(max-width:1100px) { .topbar { align-items: flex-start; flex-direction: column; gap: 8px; } .view-container { padding: 24px; } .grid-2 { grid-template-columns: 1fr; } }
@media(max-width:900px) { .sidebar { position: static; width: 100%; height: auto; } .brand-header { padding: 18px 22px; } .nav-list { display: flex; overflow-x: auto; padding-bottom: 10px; gap: 4px; } .nav-list li { flex-shrink: 0; } .nav-btn { gap: 12px; } .nav-section-label, .nav-group-label, .sidebar-footer { display: none; } .sidebar > div[style] { display: none; } .topbar { position: static; padding: 20px; } .view-container { padding: 18px; } .card { padding: 18px; } }
@media(prefers-reduced-motion:reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* Theme switch and restrained semantic accents. */
:root { --bg-app:#fafafa; --bg-sidebar:#fff; --bg-card:#fff; --bg-card-elevated:#f5f5f5; --bg-input:#fff; --border:#e5e5e5; --border-subtle:#ededed; --text-primary:#171717; --text-secondary:#525252; --text-muted:#666; --brand-primary:#171717; --brand-accent:#404040; --success:#167653; --warning:#946200; --danger:#b33c43; --demo-badge:#6554a4; --success-bg:#edf7f1; --warning-bg:#fff8e8; --danger-bg:#fff0f1; --demo-bg:#f5f1fc; }
.brand-header { gap:12px; }
.brand-mark { width:40px; height:40px; flex-shrink:0; border-radius:12px; background:#111; box-shadow:0 2px 4px rgba(0,0,0,.08); }
.brand-mark svg { width:30px; height:30px; }
.brand-title { font-size:16px; letter-spacing:-.65px; font-weight:700; }
.brand-subtitle { font-size:11px; }
.theme-toggle { display:inline-flex; align-items:center; gap:7px; padding:8px 11px; min-height:34px; background:var(--bg-card); color:var(--text-primary); border:1px solid var(--border); border-radius:8px; font-size:11px; cursor:pointer; white-space:nowrap; }
.theme-toggle:hover { background:var(--bg-card-elevated); }
.theme-icon { font-size:16px; line-height:1; }
.badge-live,.badge-working { color:var(--success); background:var(--success-bg); border-color:var(--success-bg); }
.badge-warn { color:var(--warning); background:var(--warning-bg); border-color:var(--warning-bg); }
.badge-danger { color:var(--danger); background:var(--danger-bg); border-color:var(--danger-bg); }
.badge-demo { color:var(--demo-badge); background:var(--demo-bg); border-color:var(--demo-bg); }
.dot-pulse { background:var(--success); }
.safety-indicator { color:var(--success); }
:root[data-theme=dark] { color-scheme:dark; --bg-app:#0c0c0c; --bg-sidebar:#101010; --bg-card:#141414; --bg-card-elevated:#1c1c1c; --bg-input:#101010; --border:#2a2a2a; --border-subtle:#242424; --text-primary:#f5f5f5; --text-secondary:#c1c1c1; --text-muted:#a3a3a3; --brand-primary:#f4f4f4; --brand-accent:#ccc; --success:#84d4af; --success-bg:#142a20; --warning:#e5c071; --warning-bg:#2d2515; --danger:#eda1a6; --danger-bg:#311c1e; --demo-badge:#c0b0e9; --demo-bg:#261f35; }
[data-theme=dark] .topbar { background:var(--bg-sidebar); }
[data-theme=dark] .nav-btn:hover,[data-theme=dark] .nav-btn.active { background:#222; color:#fff; }
[data-theme=dark] .nav-btn.active { box-shadow:inset 2px 0 #fff; }
[data-theme=dark] .nav-pill { background:#262626; color:#ccc; }
[data-theme=dark] a { color:#ededed; }
[data-theme=dark] .brand-mark { background:#f5f5f5; color:#111; }
[data-theme=dark] .badge { color:var(--text-secondary); background:var(--bg-card-elevated); border-color:var(--border); }
[data-theme=dark] .badge-live,[data-theme=dark] .badge-working { color:var(--success); background:var(--success-bg); }
[data-theme=dark] .badge-warn { color:var(--warning); background:var(--warning-bg); }
[data-theme=dark] .badge-danger { color:var(--danger); background:var(--danger-bg); }
[data-theme=dark] .badge-demo { color:var(--demo-badge); background:var(--demo-bg); }
[data-theme=dark] .btn-primary,[data-theme=dark] .btn-success { background:#f5f5f5; color:#111; }
[data-theme=dark] .btn-primary:hover,[data-theme=dark] .btn-success:hover { background:#d9d9d9; }
[data-theme=dark] .btn-secondary,[data-theme=dark] .btn-danger { background:#1c1c1c; color:#eee; border-color:#373737; }
[data-theme=dark] .btn-secondary:hover { background:#282828; }
[data-theme=dark] input,[data-theme=dark] select,[data-theme=dark] textarea { background:#101010; color:#eee; border-color:#373737; }
[data-theme=dark] .form-field label { color:#ccc; }
[data-theme=dark] th { background:#1a1a1a; color:#aaa; }
[data-theme=dark] tr:hover td { background:#1a1a1a; }
[data-theme=dark] .evidence-item { background:#1c1c1c; }
[data-theme=dark] .toast-banner { background:#1c1c1c; }
[data-theme=dark] .card-header { border-bottom-color:#292929; }
[data-theme=dark] :focus-visible { outline-color:#eee; }
/* Existing view templates use inline neutral styles; keep them legible in dark mode. */
[data-theme=dark] #view-container [style*="color: #525252"],
[data-theme=dark] #view-container [style*="color:#525252"] { color:var(--text-secondary) !important; }
[data-theme=dark] #view-container [style*="background:#ffffff"],
[data-theme=dark] #view-container [style*="background: #ffffff"] { background:var(--bg-card-elevated) !important; }

/* Readability: regular weights, comfortable sizes, open spacing. */
:root { --font-sans: 'Segoe UI', Arial, sans-serif; --font-mono: 'Segoe UI', Arial, sans-serif; }
body { font-size:16px; line-height:1.65; font-weight:400; text-rendering:auto; }
.brand-title { font-size:17px; font-weight:600; letter-spacing:-.25px; line-height:1.4; white-space:nowrap; }
.brand-subtitle { font-size:12px; line-height:1.6; }
.brand-header { padding-left:18px; padding-right:16px; gap:10px; }
.brand-mark svg { width:30px; height:30px; }
.nav-btn { font-size:14px; font-weight:400; padding-top:12px; padding-bottom:12px; line-height:1.5; }
.nav-btn.active { font-weight:600; }
.nav-section-label { font-size:12px; }
.nav-pill { font-size:11px; }
.topbar-title { font-size:19px; font-weight:600; letter-spacing:0; }
.card-title { font-size:16px; line-height:1.55; font-weight:600; letter-spacing:0; }
.stat-value { font-size:32px; font-weight:500; letter-spacing:-.5px; line-height:1.4; overflow-wrap:anywhere; }
.stat-meta, .form-field label, .disclosure-box, .evidence-item, .toast-banner { font-size:14px; line-height:1.7; }
.badge { font-size:12px; line-height:1.5; font-weight:400; letter-spacing:0; padding:4px 8px; }
.btn { font-size:14px; font-weight:500; line-height:1.5; min-height:40px; }
.demo-toggle, .theme-toggle { font-size:13px; line-height:1.5; }
input[type=text], input[type=url], input[type=email], input[type=number], select, textarea { font-size:15px; line-height:1.6; }
table { font-size:14px; line-height:1.7; }
th { font-size:13px; font-weight:500; }
th,td { padding:16px 14px; }
.disclosure-label { font-size:13px; font-weight:600; }
.sidebar-footer { font-size:12px; }
#view-container strong { font-weight:600; }
#view-container code { font-family:var(--font-sans); overflow-wrap:anywhere; }
.grid-4 { grid-template-columns:repeat(auto-fit,minmax(210px,1fr)); }
.prototype-notice { display:flex; align-items:baseline; flex-wrap:wrap; gap:8px 16px; padding:12px 36px; border-bottom:1px solid var(--border); background:var(--bg-card); color:var(--text-secondary); font-size:13px; line-height:1.6; }
.prototype-notice strong { font-weight:600; color:var(--text-primary); }
[hidden] { display:none !important; }
.evidence-ledger { margin-top:24px; }
.ledger-help { font-size:14px; color:var(--text-secondary); line-height:1.7; margin:8px 0 16px; max-width:85ch; }
.evidence-ledger summary { cursor:pointer; font-size:15px; font-weight:600; padding:12px 0; }
.ledger-form { display:grid; gap:14px; padding:12px 0; }
.ledger-form label { display:grid; gap:6px; font-size:14px; }
.ledger-form input,.ledger-form select { width:100%; background:var(--bg-input); color:var(--text-primary); border:1px solid var(--border); border-radius:7px; padding:10px 12px; font-size:15px; }
.ledger-form .ledger-confirm { display:flex; align-items:flex-start; gap:10px; line-height:1.6; }
.ledger-form input[type=checkbox] { width:17px; height:17px; margin-top:4px; flex-shrink:0; }
.ledger-subtitle { font-size:15px; font-weight:600; margin:20px 0 12px; }
button:disabled { opacity:.45; cursor:not-allowed; }
.capability-note { border:1px solid var(--border); border-left:3px solid var(--warning); border-radius:8px; padding:16px 20px; margin-bottom:24px; background:var(--bg-card); font-size:14px; color:var(--text-secondary); line-height:1.7; } .capability-note strong { font-weight:600; color:var(--text-primary); }
.studio-intro { margin-bottom:24px; }
.studio-steps { display:flex; flex-wrap:wrap; gap:8px; margin:20px 0; }
.studio-steps span { border:1px solid var(--border); border-radius:6px; padding:8px 12px; font-size:13px; color:var(--text-secondary); }
.studio-package { display:flex; flex-direction:column; gap:6px; text-align:left; width:100%; margin-top:10px; border:1px solid var(--border); border-radius:8px; padding:16px; background:var(--bg-card); color:var(--text-primary); cursor:pointer; }
.studio-package.selected { border-color:var(--text-primary); }
.studio-package span { font-size:13px; color:var(--text-secondary); }
.studio-site { width:100%; height:560px; border:1px solid var(--border); border-radius:10px; background:white; }
.studio-video,.studio-canvas { display:block; width:100%; max-width:960px; border:1px solid var(--border); border-radius:10px; margin:16px 0; }
.studio-canvas { aspect-ratio:16/9; }
.studio-script { font-size:14px; color:var(--text-secondary); padding-left:22px; line-height:1.7; margin:20px 0; }
.studio-script li { margin-bottom:12px; }
#studio-review .card { margin-top:24px; }
.brief-editor { border:1px solid var(--border); border-radius:10px; padding:16px 20px; margin:20px 0; } .brief-editor summary { cursor:pointer; font-size:15px; font-weight:600; }
.sales-timeline { display:grid; gap:12px; margin:16px 0 28px; } .sales-message { padding:18px; border:1px solid var(--border); border-radius:9px; background:var(--bg-input); } .sales-message p { margin:12px 0; font-size:15px; line-height:1.7; } #sales-detail { margin-top:24px; }
.whatsapp-setup { border:1px solid var(--border); border-radius:9px; padding:18px 20px; margin:20px 0; }
.whatsapp-setup summary { cursor:pointer; font-size:15px; font-weight:600; color:var(--text-primary); }
.whatsapp-setup ol { padding-left:22px; }
.whatsapp-setup li { margin:14px 0; line-height:1.8; }
.whatsapp-setup strong { color:var(--text-primary); }

/* Charts (charts.js) and grouped navigation */
:root { --chart-1:#2a78d6; --chart-muted:#a3a3a3; --chart-track:#f1f1f1; }
:root[data-theme=dark] { --chart-1:#3987e5; --chart-muted:#6b6b6b; --chart-track:#1f1f1f; }
.chart { margin:0; display:flex; flex-direction:column; gap:12px; }
.chart figcaption { display:flex; flex-direction:column; gap:2px; }
.chart-title { font-weight:600; font-size:0.95rem; color:var(--text-primary); }
.chart-subtitle { font-size:0.82rem; color:var(--text-secondary); }
.chart-bars { display:flex; flex-direction:column; gap:6px; }
.chart-row { display:grid; grid-template-columns:minmax(90px,34%) 1fr auto; align-items:center; gap:10px; padding:3px 4px; border-radius:6px; outline-offset:2px; }
.chart-row:hover, .chart-row:focus-visible { background:var(--bg-card-elevated); }
.chart-row-compact { grid-template-columns:72px 1fr auto; padding:1px 4px; }
.chart-label { font-size:0.85rem; color:var(--text-secondary); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.chart-value { font-size:0.85rem; font-weight:600; color:var(--text-primary); font-variant-numeric:tabular-nums; min-width:3ch; text-align:right; }
.chart-track { display:block; height:14px; background:var(--chart-track); border-radius:4px; overflow:hidden; }
.chart-bar { display:block; height:100%; background:var(--chart-1); border-radius:0 4px 4px 0; }
.chart-bar-muted { background:var(--chart-muted); }
.chart-meter .chart-track { height:10px; }
.chart-group { display:flex; flex-direction:column; gap:2px; padding-bottom:6px; }
.chart-group + .chart-group { border-top:1px solid var(--border-subtle); padding-top:8px; }
.chart-group-title { font-size:0.85rem; font-weight:600; color:var(--text-primary); }
.chart-legend { display:flex; gap:16px; font-size:0.8rem; color:var(--text-secondary); }
.chart-legend span { display:inline-flex; align-items:center; gap:6px; }
.chart-key { display:inline-block; width:12px; height:12px; border-radius:3px; background:var(--chart-1); }
.chart-key.chart-bar-muted { background:var(--chart-muted); }
.chart-empty { font-size:0.85rem; color:var(--text-muted); padding:8px 0; }
.chart-table summary { font-size:0.8rem; color:var(--text-muted); cursor:pointer; }
.chart-table table { margin-top:8px; font-size:0.82rem; }
.chart-table caption { text-align:left; color:var(--text-secondary); padding-bottom:4px; }
.chart-tip { position:absolute; z-index:1000; max-width:280px; padding:6px 10px; border-radius:6px; font-size:0.8rem; background:var(--text-primary); color:var(--bg-card); pointer-events:none; box-shadow:0 4px 14px rgba(0,0,0,.18); }
.chart-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(320px,1fr)); gap:1.25rem; margin-bottom:1.25rem; }
.nav-group-label { font-size:11px; font-weight:600; color:var(--text-muted); padding:14px 12px 6px; list-style:none; }
.nav-group-label:first-child { padding-top:4px; }
.stat-help { font-size:0.8rem; color:var(--text-secondary); margin-top:6px; }

/* Section tabs: each sidebar section's pages, shown under the top bar. */
.section-tabs { display:flex; gap:4px; padding:10px 36px 0; border-bottom:1px solid var(--border); background:var(--bg-card); overflow-x:auto; }
.section-tabs[hidden] { display:none; }
.section-tab { font:inherit; font-size:14px; background:none; border:0; border-bottom:2px solid transparent; padding:10px 14px 12px; color:var(--text-secondary); cursor:pointer; white-space:nowrap; }
.section-tab:hover { color:var(--text-primary); }
.section-tab.active { color:var(--text-primary); font-weight:600; border-bottom-color:var(--text-primary); }
.section-intro { margin:0; padding:14px 36px 0; color:var(--text-secondary); font-size:14px; line-height:1.6; }
.section-intro:empty { display:none; }
details.capability-note summary { cursor:pointer; list-style:none; }
details.capability-note summary::-webkit-details-marker { display:none; }
details.capability-note summary::after { content:' ▾'; color:var(--text-muted); }
details.capability-note[open] summary::after { content:' ▴'; }
details.capability-note p { margin-top:8px; }
@media(max-width:900px) { .section-tabs { padding:6px 18px 0; } .section-intro { padding:12px 18px 0; } }

/* Agents page */
.agent-card { margin-bottom: 14px; }
.agent-dot { display:inline-block; width:10px; height:10px; border-radius:50%; margin-right:10px; vertical-align:middle; }
.agent-attention { margin:10px 0 0; padding:8px 12px; border-left:3px solid var(--text-primary); background:var(--bg-subtle, rgba(0,0,0,.03)); font-size:14px; }
.grid-3 { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
@media(max-width:900px) { .grid-3 { grid-template-columns:1fr; } }

/* Animated agents command center (same idea as the ShiftSwift website hero, in black and white) */
.ag-wrap { --ok:#16a34a; --warn:#d97706; --bad:#dc2626; --off:#9ca3af; }
.ag-panel { background:#0b0b0c; color:#f4f4f5; border-radius:16px; padding:18px 20px 16px; margin-bottom:22px; border:1px solid #1f1f22; box-shadow:0 20px 50px -30px rgba(0,0,0,.6); overflow:hidden; }
.ag-top { display:flex; align-items:center; gap:14px; font-size:13px; color:#a1a1aa; }
.ag-top .ag-time { margin-left:auto; font-variant-numeric:tabular-nums; }
.ag-live { display:inline-flex; align-items:center; gap:8px; color:#f4f4f5; font-weight:600; }
.ag-live i { width:8px; height:8px; border-radius:50%; background:var(--ok); animation:ag-ping 2s infinite; }
.ag-kpis { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin:14px 0 6px; }
.ag-kpis div { background:#141416; border:1px solid #232327; border-radius:12px; padding:12px 14px; display:flex; flex-direction:column; gap:2px; }
.ag-kpis .k { font-size:12px; color:#a1a1aa; }
.ag-kpis .v { font-size:28px; font-weight:600; letter-spacing:-.5px; font-variant-numeric:tabular-nums; }
.ag-kpis .d { font-size:12px; color:#71717a; }
.ag-net { display:block; width:100%; height:auto; margin:4px 0; }
.ag-net .ag-ln { stroke:rgba(255,255,255,.18); stroke-width:1; fill:none; stroke-dasharray:3 6; }
.ag-net .ag-ln.s-WORKING { stroke:rgba(255,255,255,.45); animation:ag-flow 1.2s linear infinite; }
.ag-net .ag-ln.s-OFFLINE { stroke:rgba(220,38,38,.55); }
.ag-net .ag-ring { fill:none; stroke:rgba(255,255,255,.14); }
.ag-net .ag-ring.r2 { stroke-dasharray:2 10; animation:ag-spin 28s linear infinite; transform-origin:320px 180px; }
.ag-net .ag-pk { fill:#fff; filter:drop-shadow(0 0 4px rgba(255,255,255,.9)); }
.ag-net .ag-hub circle { fill:#fafafa; }
.ag-net .ag-hub text { fill:#0b0b0c; font:600 13px inherit; font-family:inherit; }
.ag-net .ag-hub text.s { fill:#52525b; font-size:9.5px; letter-spacing:.12em; font-weight:500; }
.ag-net .ag-node { cursor:pointer; }
.ag-net .ag-node rect { fill:#141416; stroke:rgba(255,255,255,.12); transition:stroke .2s; }
.ag-net .ag-node:hover rect,.ag-net .ag-node:focus rect { stroke:rgba(255,255,255,.6); outline:none; }
.ag-net .ag-node:focus { outline:none; }
.ag-net .ag-node text { fill:#f4f4f5; font-size:12px; font-weight:500; font-family:inherit; }
.ag-net .ag-node text.s { fill:#8a8a93; font-size:9.5px; letter-spacing:.04em; font-weight:400; }
.ag-net .ag-node .dot { fill:var(--off); }
.ag-net .s-WORKING .dot { fill:var(--ok); animation:ag-glow 2s ease-in-out infinite; }
.ag-net .s-WAITING .dot,.ag-net .s-PAUSED .dot { fill:var(--warn); }
.ag-net .s-OFFLINE .dot { fill:var(--bad); animation:ag-blinkdot 1.2s steps(2) infinite; }
.ag-ticker { display:flex; align-items:center; gap:10px; background:#141416; border:1px solid #232327; border-radius:10px; padding:9px 12px; font-size:13px; }
.ag-ticker .tag { background:#f4f4f5; color:#0b0b0c; border-radius:6px; padding:2px 8px; font-size:11px; font-weight:600; white-space:nowrap; }
.ag-ticker .msg { flex:1; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; animation:ag-in .5s cubic-bezier(.2,.8,.2,1); }
.ag-ticker .when { color:#71717a; white-space:nowrap; font-size:12px; }
.ag-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:14px; margin-bottom:14px; }
.ag-card { background:var(--bg-card); border:1px solid var(--border); border-radius:14px; padding:16px 18px; display:flex; flex-direction:column; gap:6px; transition:transform .2s, box-shadow .2s; }
.ag-card:hover { transform:translateY(-2px); box-shadow:0 12px 30px -20px rgba(0,0,0,.35); }
.ag-first .ag-card { animation:ag-pop .5s cubic-bezier(.2,.8,.2,1) both; animation-delay:calc(var(--i) * 70ms); }
.ag-card-top { display:flex; align-items:center; gap:10px; }
.ag-card-top strong { font-size:15px; }
.ag-state { margin-left:auto; font-size:12px; color:var(--text-secondary); display:inline-flex; align-items:center; gap:6px; }
.ag-dot { width:9px; height:9px; border-radius:50%; background:var(--off); flex:none; }
.ag-card.s-WORKING .ag-dot { background:var(--ok); animation:ag-ping 2s infinite; }
.ag-card.s-WAITING .ag-dot,.ag-card.s-PAUSED .ag-dot { background:var(--warn); }
.ag-card.s-OFFLINE .ag-dot { background:var(--bad); }
.ag-card.s-OFFLINE { border-color:rgba(220,38,38,.45); }
.ag-role { margin:0; font-size:13px; color:var(--text-secondary); }
.ag-detail { margin:4px 0 0; font-size:14px; line-height:1.55; }
.ag-bar { height:6px; border-radius:6px; background:var(--border); overflow:hidden; margin-top:6px; }
.ag-bar span { display:block; height:100%; width:var(--w); background:var(--text-primary); border-radius:6px; }
.ag-first .ag-bar span { animation:ag-grow 1s cubic-bezier(.2,.8,.2,1) both; animation-delay:calc(var(--i) * 70ms + .2s); }
.ag-bar-label { margin:0; font-size:12px; color:var(--text-secondary); }
.ag-flag { margin:6px 0 0; padding:8px 10px; border-left:3px solid var(--text-primary); background:rgba(127,127,127,.08); font-size:13px; border-radius:0 6px 6px 0; }
.ag-card .btn { align-self:flex-start; margin-top:8px; }
.ag-typing { display:inline-flex; gap:3px; }
.ag-typing i { width:4px; height:4px; border-radius:50%; background:currentColor; animation:ag-blink 1s infinite; }
.ag-typing i:nth-child(2) { animation-delay:.15s; } .ag-typing i:nth-child(3) { animation-delay:.3s; }
@keyframes ag-ping { 0% { box-shadow:0 0 0 0 rgba(22,163,74,.5); } 80%,100% { box-shadow:0 0 0 8px rgba(22,163,74,0); } }
@keyframes ag-glow { 50% { opacity:.45; } }
@keyframes ag-blinkdot { 50% { opacity:.25; } }
@keyframes ag-flow { to { stroke-dashoffset:-18; } }
@keyframes ag-spin { to { transform:rotate(360deg); } }
@keyframes ag-in { from { opacity:0; transform:translateY(6px); } }
@keyframes ag-pop { from { opacity:0; transform:scale(.97) translateY(8px); } }
@keyframes ag-grow { from { width:0; } }
@keyframes ag-blink { 0%,60%,100% { opacity:.3; transform:none; } 30% { opacity:1; transform:translateY(-2px); } }
@media (max-width:700px) { .ag-kpis { grid-template-columns:1fr; } .ag-top .ag-time { display:none; } }
@media (prefers-reduced-motion: reduce) { .ag-wrap *, .ag-wrap *::before { animation:none !important; transition:none !important; } }

/* ===== Futuristic layer: soft particles, glass surfaces, gentle motion ===== */
:root { --glass: rgba(255,255,255,.80); --glass-strong: rgba(255,255,255,.90); --glow: rgba(23,23,23,.06); --ease: cubic-bezier(.2,.8,.2,1); }
:root[data-theme=dark] { --glass: rgba(20,20,20,.74); --glass-strong: rgba(16,16,16,.86); --glow: rgba(255,255,255,.07); }
body { background: radial-gradient(1200px 600px at 85% -10%, var(--glow), transparent 60%), radial-gradient(900px 500px at -10% 110%, var(--glow), transparent 60%), var(--bg-app); background-attachment: fixed; }
.fx-particles { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.app-shell { position: relative; z-index: 1; }

/* Sidebar and top bar float above the particles */
.sidebar { background: var(--glass-strong); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); border-right: 1px solid var(--border); }
.topbar { background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.section-tabs { background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.nav-list { padding: 6px 14px; }
.nav-btn { position: relative; padding: 13px 14px; margin-bottom: 4px; border-radius: 10px; transition: background .25s var(--ease), transform .25s var(--ease), color .25s; }
.nav-btn:hover { transform: translateX(3px); }
.nav-btn::before { content: ''; position: absolute; left: 0; top: 50%; width: 3px; height: 0; border-radius: 3px; background: var(--text-primary); transform: translateY(-50%); transition: height .3s var(--ease); }
.nav-btn.active { box-shadow: none; }
.nav-btn.active::before { height: 60%; }
.section-tab { transition: color .2s, border-color .3s var(--ease); }
.section-tab:hover { border-bottom-color: var(--border); }

/* Breathing room */
.view-container { padding: 40px 44px 80px; }
.section-intro { padding: 18px 44px 0; font-size: 15px; }
.section-tabs { padding: 10px 44px 0; }
.card { padding: 26px 28px; margin-bottom: 20px; border-radius: 16px; }
.grid-2, .grid-4, .chart-grid, .grid-3 { gap: 20px; }

/* Glass cards with a gentle lift */
.card { background: var(--glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s; }
.card:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -28px rgba(0,0,0,.35); border-color: color-mix(in srgb, var(--text-primary) 18%, var(--border)); }
.card-title { letter-spacing: -.2px; }
.stat-value { background: linear-gradient(180deg, var(--text-primary), var(--text-secondary)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Buttons and fields */
.btn { transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s, border-color .2s; }
.btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 8px 20px -12px rgba(0,0,0,.45); }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn-primary { position: relative; overflow: hidden; }
.btn-primary::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.28) 50%, transparent 70%); transform: translateX(-120%); transition: transform .7s var(--ease); }
.btn-primary:hover::after { transform: translateX(120%); }
input:focus, select:focus, textarea:focus { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--text-primary) 14%, transparent); border-color: var(--text-primary); transition: box-shadow .2s; }

/* Page open: content rises in, one block after another */
.view-enter > * { animation: fx-rise .45s var(--ease) both; }
.view-enter > *:nth-child(2) { animation-delay: .05s; } .view-enter > *:nth-child(3) { animation-delay: .1s; }
.view-enter > *:nth-child(4) { animation-delay: .15s; } .view-enter > *:nth-child(5) { animation-delay: .2s; }
.view-enter > *:nth-child(n+6) { animation-delay: .25s; }
@keyframes fx-rise { from { opacity: 0; transform: translateY(10px); } }

/* Brand mark breathes slowly */
.brand-mark { animation: fx-breathe 6s ease-in-out infinite; }
@keyframes fx-breathe { 50% { transform: scale(1.04); filter: drop-shadow(0 0 6px var(--glow)); } }

@media (max-width: 900px) { .view-container { padding: 22px 18px 60px; } .section-intro, .section-tabs { padding-left: 18px; padding-right: 18px; } .card { padding: 20px; } }
@media (prefers-reduced-motion: reduce) { .view-enter > *, .brand-mark, .card, .btn, .nav-btn { animation: none !important; transition: none !important; } .card:hover, .btn:hover, .nav-btn:hover { transform: none; } }

/* ===== Futuristic layer, round 2: clearly visible tech details ===== */
:root { --grid-line: rgba(23,23,23,.045); --scan: rgba(23,23,23,.55); }
:root[data-theme=dark] { --grid-line: rgba(255,255,255,.05); --scan: rgba(255,255,255,.7); }
body { background:
  linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 44px 44px,
  linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 44px 44px,
  radial-gradient(1100px 620px at 88% -12%, var(--glow), transparent 60%),
  radial-gradient(900px 520px at -10% 112%, var(--glow), transparent 60%),
  var(--bg-app); background-attachment: fixed; }
:root { --glow: rgba(23,23,23,.09); }
:root[data-theme=dark] { --glow: rgba(255,255,255,.10); }
/* A thin light sweeps along the top bar */
.topbar { position: sticky; }
.topbar::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--scan), transparent); background-size: 40% 100%; background-repeat: no-repeat; animation: fx-scan 5s linear infinite; }
@keyframes fx-scan { from { background-position: -40% 0; } to { background-position: 140% 0; } }
/* Title shimmer */
.topbar-title { background: linear-gradient(90deg, var(--text-primary) 0%, var(--text-secondary) 50%, var(--text-primary) 100%); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: fx-shimmer 6s linear infinite; font-size: 22px; }
@keyframes fx-shimmer { to { background-position: -200% 0; } }
/* Cards glow at the edge on hover, with corner ticks like a HUD */
.card { position: relative; }
.card::before { content: ''; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; background: linear-gradient(var(--text-primary), var(--text-primary)) top left / 14px 1.5px no-repeat, linear-gradient(var(--text-primary), var(--text-primary)) top left / 1.5px 14px no-repeat, linear-gradient(var(--text-primary), var(--text-primary)) bottom right / 14px 1.5px no-repeat, linear-gradient(var(--text-primary), var(--text-primary)) bottom right / 1.5px 14px no-repeat; opacity: .0; transition: opacity .3s var(--ease); }
.card:hover::before { opacity: .55; }
.card:hover { box-shadow: 0 0 0 1px color-mix(in srgb, var(--text-primary) 22%, transparent), 0 22px 46px -30px rgba(0,0,0,.45); }
/* Active menu item glows */
.nav-btn.active { background: color-mix(in srgb, var(--text-primary) 8%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--text-primary) 12%, transparent); }
.nav-btn.active::before { box-shadow: 0 0 10px var(--scan); }
/* Section tabs: active tab underline glows */
.section-tab.active { border-bottom-width: 2px; text-shadow: 0 0 18px var(--glow); }
@media (prefers-reduced-motion: reduce) { .topbar::after, .topbar-title { animation: none !important; } }
