:root {
  --bg-core: #eef2f5;
  --bg-void: #ffffff;
  --bg-panel: rgba(255, 255, 255, 0.82);
  --bg-card: rgba(255, 255, 255, 0.9);
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --border-subtle: rgba(15, 23, 42, 0.12);
  --border-active: rgba(15, 23, 42, 0.24);
  --neon-cyan: #10b981;
  --neon-cyan-rgb: 16, 185, 129;
  --neon-blue: #3b82f6;
  --neon-violet: #8b5cf6;
  --neon-gold: #f59e0b;
  --neon-red: #ef4444;
  --neon-green: #10b981;
  --shadow-soft: 0 18px 50px rgba(15, 23, 42, 0.1);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text-primary);
  background: var(--bg-core);
}

body.body--dark {
  --bg-core: #030712;
  --bg-void: #000000;
  --bg-panel: rgba(17, 24, 39, 0.68);
  --bg-card: rgba(15, 23, 42, 0.72);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border-subtle: rgba(255, 255, 255, 0.09);
  --border-active: rgba(255, 255, 255, 0.18);
  --neon-cyan: #4ade80;
  --neon-cyan-rgb: 74, 222, 128;
  --neon-blue: #60a5fa;
  --neon-violet: #a78bfa;
  --neon-gold: #fbbf24;
  --neon-red: #f87171;
  --neon-green: #4ade80;
  --shadow-soft: 0 24px 70px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background: var(--bg-core);
  color: var(--text-primary);
}

body {
  overflow-x: hidden;
  transition: background 180ms ease, color 180ms ease;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

code,
pre,
.tech-label,
.tech-tag,
.font-tech,
.intent-tag,
.state,
.silence-badge {
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: var(--text-primary);
  letter-spacing: 0;
}

p {
  color: var(--text-secondary);
  line-height: 1.7;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-thumb {
  background: var(--border-active);
  border-radius: 8px;
}

.text-neon-cyan {
  color: var(--neon-cyan);
}

.text-muted {
  color: var(--text-muted);
}

.spacer {
  flex: 1;
}

.ambient-glow,
.law-ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    linear-gradient(125deg, rgba(var(--neon-cyan-rgb), 0.1), transparent 34%),
    linear-gradient(250deg, rgba(139, 92, 246, 0.1), transparent 38%);
  opacity: 0.7;
}

.bg-grid,
.law-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--border-subtle) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-subtle) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.22;
  mask-image: linear-gradient(to bottom, black, transparent 90%);
}

.glass-panel,
.data-pane,
.whisper-card,
.rule-card,
.channel-card,
.filter-card,
.guardian-card,
.stat-card,
.profile-header-card,
.visig-showcase,
.setting-group,
.setting-row,
.document-card,
.context-brief,
.stakeholders-section,
.next-steps-section {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.btn-tech-primary,
.btn-tech-secondary,
.auth-btn,
.continue-btn,
.submit-btn,
.action-btn,
.add-guardian-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  gap: 10px;
  padding: 0 18px;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text-primary);
  font-weight: 700;
}

.btn-tech-primary,
.auth-btn,
.continue-btn,
.submit-btn,
.action-btn.vault-action {
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
  background: rgba(var(--neon-cyan-rgb), 0.08);
}

.btn-tech-primary:hover,
.auth-btn:hover,
.continue-btn:hover,
.submit-btn:hover {
  box-shadow: 0 0 18px rgba(var(--neon-cyan-rgb), 0.22);
}

.btn-tech-secondary:hover,
.nav-item:hover,
.header-links a:hover {
  color: var(--neon-cyan);
  border-color: var(--border-active);
}

.public-layout,
.access-layout,
.landing-page,
.law-page {
  min-height: 100vh;
  position: relative;
  background: var(--bg-core);
}

.public-header,
.top-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  min-height: 64px;
  gap: 16px;
  padding: 10px 24px;
  border-bottom: 1px solid var(--border-subtle);
  background: color-mix(in srgb, var(--bg-core) 82%, transparent);
  backdrop-filter: blur(12px);
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border-radius: 8px;
  padding: 4px 8px;
}

.logo-icon {
  height: 26px;
  width: auto;
}

.top-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-header {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 500;
}

.silence-badge,
.tech-tag,
.tech-label {
  font-size: 11px;
  letter-spacing: 0;
  color: var(--neon-cyan);
}

.silence-badge {
  padding: 4px 10px;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  background: rgba(var(--neon-cyan-rgb), 0.09);
  font-size: 9px;
}

.governance-seal {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--neon-gold);
  font-size: 12px;
  font-weight: 700;
}

.governance-seal.large {
  justify-content: center;
}

.seal-mark,
.seal-large {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid currentColor;
  border-radius: 50%;
  position: relative;
}

.seal-mark::before,
.seal-large::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.seal-mark::after,
.seal-large::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 4px;
  height: 4px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: currentColor;
}

.seal-large {
  width: 72px;
  height: 72px;
  color: var(--neon-gold);
}

.seal-large::before {
  inset: 18px;
}

.seal-large.small {
  width: 44px;
  height: 44px;
}

.seal-large.small::before {
  inset: 11px;
}

.header-links,
.footer-links {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text-secondary);
  font-size: 13px;
}

.nav-cta {
  color: var(--neon-cyan);
}

.theme-toggle,
.icon-button {
  min-height: 34px;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  padding: 0 10px;
}

.public-main,
.access-main {
  position: relative;
  z-index: 1;
}

.public-footer {
  position: relative;
  z-index: 1;
  padding: 48px 24px 28px;
  text-align: center;
  color: var(--text-muted);
}

.public-footer.compact {
  padding-top: 18px;
}

.public-footer .footer-links {
  justify-content: center;
  margin: 20px 0 8px;
}

.particle-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.particle-canvas.local {
  position: absolute;
}

.landing-content,
.law-content {
  position: relative;
  z-index: 1;
  width: min(1060px, calc(100% - 40px));
  margin: 0 auto;
}

.landing-content {
  padding: 92px 0 72px;
}

.hero-section {
  text-align: center;
  margin-bottom: 100px;
}

.hero-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 72px;
  line-height: 1.06;
  font-weight: 400;
  margin: 18px 0 24px;
}

.hero-subtitle {
  max-width: 640px;
  margin: 0 auto 32px;
  font-size: 18px;
}

.hero-actions,
.cta-section,
.form-actions,
.action-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.section-header {
  text-align: center;
  margin-bottom: 30px;
}

.section-title,
.cta-title {
  font-size: 36px;
  font-weight: 500;
}

.faq-grid,
.philosophy-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.faq-card,
.philosophy-grid article {
  padding: 22px;
}

.faq-card h3,
.philosophy-grid h3 {
  margin-bottom: 10px;
}

.card-icon {
  display: inline-flex;
  margin-bottom: 16px;
  color: var(--neon-cyan);
  font-weight: 700;
}

.comparison-section,
.cta-section {
  margin-top: 90px;
}

.comparison-table-wrapper {
  overflow-x: auto;
  padding: 0;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

.comparison-table th,
.comparison-table td {
  padding: 18px;
  border-bottom: 1px solid var(--border-subtle);
  text-align: left;
}

.comparison-table th {
  color: var(--text-secondary);
  font-size: 12px;
  text-transform: uppercase;
}

.landing-quote {
  text-align: center;
  margin: 32px 0 0;
  color: var(--text-secondary);
}

.cta-section {
  flex-direction: column;
  padding: 72px 20px;
}

.law-content {
  padding: 64px 0;
}

.law-header {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 48px;
}

.law-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 56px;
  font-weight: 400;
  margin: 18px 0;
}

.status-block {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 28px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  overflow: hidden;
}

.status-block div {
  display: grid;
  gap: 4px;
  padding: 14px;
  background: var(--bg-card);
}

.status-block span,
.law-article span {
  color: var(--text-muted);
  font-size: 11px;
}

.status-enforced {
  color: var(--neon-cyan);
}

.preamble {
  padding: 28px;
  text-align: center;
  margin-bottom: 48px;
}

.preamble blockquote {
  margin: 0 0 12px;
  font-size: 20px;
  color: var(--text-primary);
}

.section-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  color: var(--text-muted);
}

.section-divider span {
  height: 1px;
  background: var(--border-subtle);
}

.articles-list {
  display: grid;
  gap: 14px;
}

.law-article {
  padding: 22px;
  border-left: 3px solid var(--border-subtle);
}

.law-article.right {
  border-left-color: var(--neon-cyan);
}

.law-article.obligation {
  border-left-color: var(--neon-blue);
}

.law-article.mutual {
  border-left-color: var(--neon-gold);
}

.law-article h3 {
  margin: 8px 0;
}

.closing-section {
  text-align: center;
  padding: 52px 0 16px;
}

.protocol-stamp {
  display: inline-flex;
  margin-top: 18px;
  padding: 8px 14px;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  color: var(--neon-cyan);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
}

.login-page,
.signup-page {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 140px);
  padding: 44px 20px;
}

.login-container,
.signup-container {
  width: min(520px, 100%);
  position: relative;
  z-index: 1;
}

.login-header,
.step-header,
.page-heading.center {
  text-align: center;
}

.icon-ring,
.icon-hexagon,
.vault-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin: 0 auto 22px;
  border: 1px solid var(--neon-cyan);
  border-radius: 8px;
  color: var(--neon-cyan);
  background: rgba(var(--neon-cyan-rgb), 0.08);
}

.method-tabs,
.field-tabs,
.section-tabs,
.visig-tabs {
  display: flex;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--bg-card);
}

.method-tab,
.tab-btn,
.tab,
.visig-tabs button,
.mode-option,
.delay-options button {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  padding: 10px 14px;
}

.method-tab.active,
.tab-btn.active,
.tab.active,
.visig-tabs .active,
.mode-option.active,
.delay-options .active {
  background: rgba(var(--neon-cyan-rgb), 0.12);
  color: var(--text-primary);
}

.auth-form,
.anchor-form {
  margin-top: 18px;
  display: grid;
  gap: 16px;
}

.form-section,
.tab-panel,
.settings-section {
  display: none;
}

.form-section.active,
.tab-panel.active,
.settings-section.active {
  display: block;
}

.key-dropzone,
.anchor-preview,
.key-card,
.seed-grid,
.input-wrapper,
.glass-pill {
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--bg-card);
}

.key-dropzone {
  display: grid;
  place-items: center;
  min-height: 120px;
  margin-bottom: 16px;
  color: var(--text-secondary);
}

.input-label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-muted);
  font-size: 12px;
  font-family: "JetBrains Mono", monospace;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text-primary);
  padding: 12px 14px;
  outline: 0;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 0 3px rgba(var(--neon-cyan-rgb), 0.14);
}

.auth-btn,
.continue-btn {
  width: 100%;
  margin-top: 18px;
}

.login-footer,
.login-link {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

.anchor-preview {
  padding: 18px;
  text-align: center;
  font-size: 32px;
  color: var(--neon-cyan);
}

.input-wrapper {
  display: flex;
  align-items: center;
  padding: 0 12px;
}

.input-wrapper input {
  border: 0;
  background: transparent;
}

.anchor-rules {
  display: grid;
  gap: 10px;
}

.rule {
  display: flex;
  gap: 10px;
  color: var(--text-secondary);
}

.key-display {
  display: grid;
  gap: 12px;
}

.entry-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 140px);
  padding: 32px;
  color: var(--text-primary);
}

.entry-panel {
  width: min(400px, 100%);
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 48px 40px;
  text-align: center;
  animation: fadeInUp 600ms ease both;
}

.entry-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin: 0 auto 24px;
  border: 1px solid var(--neon-cyan);
  border-radius: 999px;
  color: var(--neon-cyan);
  background: rgba(var(--neon-cyan-rgb), 0.08);
  font-family: "Material Symbols Outlined";
  font-size: 40px;
}

.entry-title {
  font-family: "Playfair Display", serif;
  font-size: 26px;
  font-weight: 400;
  margin: 0 0 8px;
}

.entry-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 40px;
}

.anchor-group {
  text-align: left;
  margin-bottom: 24px;
}

.anchor-label {
  display: block;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.anchor-input-wrapper {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
  transition: border-color 180ms ease;
}

.anchor-input-wrapper:focus-within {
  border-color: var(--neon-cyan);
}

.tilde {
  color: var(--text-secondary);
  font-size: 20px;
  margin-right: 4px;
}

.anchor-input-wrapper .anchor-input {
  flex: 1;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
  font-family: "JetBrains Mono", monospace;
  font-size: 20px;
}

.anchor-input-wrapper .anchor-input::placeholder {
  color: var(--text-muted);
  opacity: 0.45;
}

.generate-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 16px;
  background: rgba(var(--neon-cyan-rgb), 0.1);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  color: var(--text-primary);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.generate-btn:hover {
  background: var(--neon-cyan);
  border-color: var(--neon-cyan);
  color: var(--bg-void);
}

.generate-arrow {
  font-family: "Material Symbols Outlined";
  font-size: 18px;
}

.recovery-link {
  display: inline-block;
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: underline;
  margin: 24px 0 32px;
  transition: color 180ms ease;
}

.recovery-link:hover {
  color: var(--text-primary);
}

.disclaimer {
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
  opacity: 0.75;
}

.key-card {
  padding: 14px;
}

.key-card.private {
  border-color: rgba(239, 68, 68, 0.35);
}

.key-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: var(--text-muted);
  font-size: 12px;
}

.key-header button {
  border: 0;
  background: transparent;
  color: var(--neon-cyan);
}

.seed-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 12px;
}

.seed-grid span {
  padding: 8px;
  border-radius: 6px;
  background: rgba(var(--neon-cyan-rgb), 0.08);
  text-align: center;
  color: var(--text-secondary);
}

.whisper-app {
  min-height: 100vh;
  background: var(--bg-core);
}

.top-bar {
  position: fixed;
  left: 0;
  right: 0;
}

.mobile-menu {
  display: none;
}

.listening-modes {
  display: flex;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  background: var(--bg-card);
}

.mode-btn {
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 7px 14px;
}

.mode-btn.active {
  background: rgba(var(--neon-cyan-rgb), 0.12);
  color: var(--text-primary);
}

.anchor-avatar,
.anchor-chip,
.identity-visig,
.visig-symbol {
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--neon-cyan);
  color: var(--neon-cyan);
  background: rgba(var(--neon-cyan-rgb), 0.1);
  font-weight: 800;
}

.anchor-avatar,
.anchor-chip {
  width: 34px;
  height: 34px;
}

.nav-rail {
  position: fixed;
  top: 64px;
  left: 0;
  bottom: 0;
  z-index: 40;
  width: 218px;
  display: flex;
  flex-direction: column;
  padding: 14px 10px;
  border-right: 1px solid var(--border-subtle);
  background: color-mix(in srgb, var(--bg-core) 88%, transparent);
  backdrop-filter: blur(14px);
}

.nav-items {
  display: grid;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--text-secondary);
  border-left: 3px solid transparent;
}

.nav-item.is-active {
  color: var(--text-primary);
  background: rgba(var(--neon-cyan-rgb), 0.1);
  border-left-color: var(--neon-cyan);
}

.nav-icon {
  width: 20px;
  height: 20px;
  background: currentColor;
  mask: var(--icon) center / contain no-repeat;
  -webkit-mask: var(--icon) center / contain no-repeat;
}

.nav-icon--field { --icon: url("/icons/nav/field.svg"); }
.nav-icon--whispers { --icon: url("/icons/nav/whispers.svg"); }
.nav-icon--flow { --icon: url("/icons/nav/flow.svg"); }
.nav-icon--briefs { --icon: url("/icons/nav/briefs.svg"); }
.nav-icon--decisions { --icon: url("/icons/nav/decisions.svg"); }
.nav-icon--fade { --icon: url("/icons/nav/fade.svg"); }
.nav-icon--openlogs { --icon: url("/icons/nav/openlogs.svg"); }
.nav-icon--vault { --icon: url("/icons/nav/vault.svg"); }
.nav-icon--filters { --icon: url("/icons/nav/filters.svg"); }
.nav-icon--guardians { --icon: url("/icons/nav/guardians.svg"); }

.nav-separator {
  height: 1px;
  background: var(--border-subtle);
  margin: 10px 8px;
}

.exit-btn {
  margin-top: auto;
  display: flex;
  justify-content: center;
  min-height: 40px;
  align-items: center;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-muted);
}

.main-content {
  min-height: 100vh;
  padding: 88px 30px 40px 248px;
}

.app-page {
  width: min(1060px, 100%);
  margin: 0 auto;
}

.app-page.narrow {
  width: min(820px, 100%);
}

.page-heading {
  margin-bottom: 28px;
}

.page-heading h1,
.field-title,
.login-title,
.step-title,
.vault-header h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: 34px;
  margin-bottom: 8px;
}

.field-header {
  text-align: center;
  margin-bottom: 16px;
}

.field-tabs {
  width: min(480px, 100%);
  margin: 0 auto 18px;
}

.tab-content {
  width: min(780px, 100%);
  margin: 0 auto;
}

.rules-grid,
.channels-grid,
.presence-list,
.stack-list,
.briefs-list,
.decisions-list,
.filters-grid,
.guardians-list,
.history-list,
.fade-actions {
  display: grid;
  gap: 14px;
}

.rule-card,
.channel-card,
.presence-row,
.fade-card,
.guardian-card,
.filter-card,
.decision-card,
.list-card,
.history-item,
.storage-info div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
}

.rule-label,
.channel-card strong,
.presence-row span,
.filter-card strong,
.guardian-card strong {
  display: block;
  color: var(--text-primary);
  font-weight: 700;
}

.rule-desc,
.channel-card p,
.presence-row small,
.filter-card small,
.guardian-card small,
.list-card p {
  color: var(--text-muted);
  font-size: 13px;
  margin: 4px 0 0;
}

.switch {
  display: inline-flex;
  width: 46px;
  height: 26px;
}

.switch input {
  display: none;
}

.switch span {
  position: relative;
  width: 100%;
  border-radius: 999px;
  background: var(--border-active);
}

.switch span::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  top: 3px;
  left: 3px;
  border-radius: 50%;
  background: var(--bg-void);
  transition: transform 160ms ease;
}

.switch input:checked + span {
  background: var(--neon-cyan);
}

.switch input:checked + span::after {
  transform: translateX(20px);
}

.whisper-card {
  padding: 22px;
}

.whisper-header,
.whisper-meta,
.document-meta,
.logs-header,
.decision-header,
.form-header,
.flow-header,
.compose-footer,
.footer-row,
.header-content,
.header-stats,
.visig-info,
.export-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.whisper-meta {
  justify-content: flex-start;
}

.intent-tag,
.state,
.type-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(var(--neon-cyan-rgb), 0.1);
  color: var(--neon-cyan);
  font-size: 12px;
}

.whisper-content {
  margin: 18px 0;
  color: var(--text-primary);
}

.whisper-actions {
  display: flex;
  gap: 8px;
}

.action-btn.echo,
.action-btn.fade {
  min-height: 34px;
  padding: 0 12px;
}

.action-btn.fade,
.danger-text,
.reject {
  color: var(--neon-red);
}

.flow-page {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  height: calc(100vh - 112px);
  width: min(1000px, 100%);
  margin: 0 auto;
}

.flow-header {
  padding: 12px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.back-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
}

.flow-top {
  display: flex;
  gap: 8px;
  align-items: center;
}

.flow-top em {
  color: var(--neon-green);
  font-style: normal;
}

.ephemeral-badge,
.info-line {
  color: var(--text-muted);
  font-size: 13px;
}

.messages-area {
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 0;
}

.message {
  max-width: 72%;
  align-self: flex-start;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 12px 14px;
  background: var(--bg-card);
}

.message.is-me {
  align-self: flex-end;
  border-color: rgba(var(--neon-cyan-rgb), 0.34);
}

.message p {
  margin: 0;
}

.attachment-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
  padding: 10px;
  border-radius: 8px;
  background: rgba(var(--neon-cyan-rgb), 0.08);
}

.flow-input-area {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--border-subtle);
}

.send-btn {
  border: 1px solid var(--neon-cyan);
  border-radius: 8px;
  background: rgba(var(--neon-cyan-rgb), 0.1);
  color: var(--neon-cyan);
  padding: 0 16px;
}

.inline-dialog {
  position: fixed;
  right: 30px;
  top: 88px;
  z-index: 80;
  width: min(440px, calc(100vw - 40px));
  max-height: calc(100vh - 120px);
  overflow: auto;
  padding: 20px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--bg-core);
  box-shadow: var(--shadow-soft);
}

.inline-dialog.center {
  left: 50%;
  top: 50%;
  right: auto;
  transform: translate(-50%, -50%);
}

.inline-dialog[hidden] {
  display: none;
}

.flow-meta,
.artifacts-timeline {
  display: grid;
  gap: 12px;
  margin: 16px 0;
}

.flow-meta div,
.artifact-entry {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  background: var(--bg-card);
}

.artifact-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--neon-cyan);
  margin-top: 4px;
}

.list-card {
  align-items: stretch;
  flex-direction: column;
  color: inherit;
}

.list-card > div:first-child,
.decision-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.state.active,
.state.approved,
.state.executed {
  color: var(--neon-green);
}

.state.proposed {
  color: var(--neon-gold);
}

.avatar-stack {
  display: flex;
}

.avatar-stack span {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--bg-core);
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-violet));
  margin-left: -7px;
}

.avatar-stack span:first-child {
  margin-left: 0;
}

.inline-action {
  margin-top: 18px;
}

.artifact-form {
  display: grid;
  gap: 18px;
}

.document-card {
  padding: 28px;
}

.document-card pre {
  white-space: pre-wrap;
  color: var(--text-secondary);
  line-height: 1.7;
}

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

.decision-card small,
.decision-meta {
  display: block;
  color: var(--text-muted);
  margin-top: 4px;
}

.decision-icon {
  color: var(--neon-gold);
}

.state-timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 24px 0;
}

.state-timeline span {
  padding: 10px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-muted);
  text-align: center;
  font-size: 12px;
}

.state-timeline .active {
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
}

.context-brief,
.stakeholders-section,
.next-steps-section {
  padding: 20px;
  margin-bottom: 16px;
}

.stakeholder-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.approve {
  color: var(--neon-green);
}

.compose-page {
  min-height: calc(100vh - 130px);
  display: grid;
  place-items: center;
}

.compose-panel {
  width: min(540px, 100%);
  display: grid;
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--bg-card);
  box-shadow: var(--shadow-soft);
}

.close-btn {
  justify-self: end;
  color: var(--text-muted);
}

.input-row,
.red-panel label {
  display: flex;
  gap: 12px;
  align-items: center;
}

.intent-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.intent-tags button,
.compose-footer button,
.footer-row button {
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  padding: 8px 12px;
}

.intent-tags .selected,
.intent-tags .active,
.compose-footer button,
.footer-row button {
  color: var(--neon-cyan);
  border-color: var(--neon-cyan);
}

.red-whisper-page {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 130px);
}

.red-panel {
  width: min(540px, 100%);
  padding: 24px;
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 8px;
  background: var(--bg-card);
  box-shadow: 0 0 60px rgba(239, 68, 68, 0.08);
}

.red-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.red-icon-small {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--neon-red);
  color: var(--neon-red);
}

.red-warning strong {
  color: var(--neon-red);
}

.form-compact {
  display: grid;
  gap: 14px;
}

.form-compact label {
  color: var(--text-secondary);
}

.input-field {
  display: flex;
  align-items: center;
  flex: 1;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding-left: 10px;
}

.input-field input {
  border: 0;
  background: transparent;
}

.token-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.token-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid var(--border-active);
}

.token-dots .active {
  background: var(--neon-red);
  border-color: var(--neon-red);
}

.fade-card span {
  display: block;
  color: var(--text-muted);
  font-size: 13px;
}

.global-fade-btn {
  min-height: 180px;
  display: grid;
  place-items: center;
  gap: 8px;
  border: 1px dashed var(--border-active);
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
}

.vault-page {
  position: relative;
}

.vault-content {
  position: relative;
  z-index: 1;
}

.vault-header {
  text-align: center;
  margin-bottom: 28px;
}

.token-display {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 20px;
  margin-bottom: 30px;
}

.token-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.token-cell {
  display: grid;
  place-items: center;
  min-height: 120px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text-muted);
}

.token-cell.available {
  color: var(--neon-cyan);
  border-color: rgba(var(--neon-cyan-rgb), 0.34);
}

.token-cell.burned {
  color: var(--neon-red);
  opacity: 0.65;
}

.token-stats {
  display: grid;
  gap: 12px;
}

.stat-card {
  padding: 18px;
}

.stat-card strong {
  display: block;
  font-size: 28px;
}

.philosophy-grid {
  margin: 26px 0;
}

.history-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
}

.history-item.burned strong {
  color: var(--neon-red);
}

.history-item.regenerated strong {
  color: var(--neon-cyan);
}

.vault-action {
  margin-top: 20px;
}

.filter-card {
  cursor: pointer;
}

.filter-card.active {
  border-color: rgba(var(--neon-cyan-rgb), 0.32);
}

.indicator-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border-active);
}

.filter-card.active .indicator-dot {
  background: var(--neon-cyan);
}

.glass-pill {
  display: inline-flex;
  margin-top: 12px;
  padding: 8px 14px;
}

.recovery-progress {
  margin-bottom: 18px;
}

.progress-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--border-subtle);
  overflow: hidden;
}

.progress-bar span {
  display: block;
  height: 100%;
  background: var(--neon-cyan);
}

.progress-bar--guardians span {
  width: 66%;
}

.guardian-card.verified {
  border-color: rgba(var(--neon-cyan-rgb), 0.34);
}

.guardians-info {
  color: var(--text-muted);
  margin: 20px 0;
}

.logs-table {
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  overflow: auto;
}

.table-header,
.table-row {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1.4fr 0.8fr;
  gap: 12px;
  min-width: 760px;
  padding: 14px 16px;
}

.table-header {
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
}

.table-row {
  border-top: 1px solid var(--border-subtle);
}

.type-badge.green {
  color: var(--neon-green);
}

.type-badge.red {
  color: var(--neon-red);
}

.profile-content {
  width: min(860px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 18px;
}

.profile-header-card,
.visig-showcase {
  padding: 22px;
}

.identity-visig {
  width: 78px;
  height: 78px;
  font-size: 28px;
}

.key-preview {
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  background: transparent;
  color: var(--text-secondary);
  padding: 6px 10px;
}

.header-stats > *,
.visig-info > div,
.storage-info div {
  display: grid;
  gap: 4px;
  color: var(--text-secondary);
}

.visig-display {
  display: grid;
  place-items: center;
  min-height: 180px;
}

.visig-symbol {
  width: 150px;
  height: 150px;
  font-size: 52px;
  border-width: 2px;
}

.mode-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.mode-selector button {
  display: grid;
  gap: 5px;
  text-align: left;
  padding: 14px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: transparent;
  color: var(--text-primary);
}

.mode-selector .active {
  border-color: var(--neon-cyan);
  background: rgba(var(--neon-cyan-rgb), 0.08);
}

.setting-group,
.setting-row {
  padding: 18px;
  margin-bottom: 14px;
}

.delay-options,
.storage-info {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.export-options > * {
  flex: 1;
  display: grid;
  place-items: center;
  min-height: 70px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text-primary);
}

.not-found-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.log-terminal {
  width: min(620px, 100%);
  padding: 28px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--bg-card);
}

.log-terminal pre {
  color: var(--text-secondary);
  white-space: pre-wrap;
}

.fab-container {
  position: fixed;
  z-index: 45;
  right: 28px;
  bottom: 28px;
  display: grid;
  gap: 10px;
}

.fab-main,
.fab-red {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  box-shadow: var(--shadow-soft);
}

.fab-main {
  background: var(--neon-cyan);
  color: #03120b;
}

.fab-red {
  width: 42px;
  height: 42px;
  justify-self: center;
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: var(--neon-red);
  background: var(--bg-card);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 100;
  transform: translateX(-50%);
  padding: 10px 16px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--bg-core);
  color: var(--text-primary);
  box-shadow: var(--shadow-soft);
}

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

.animate-scan {
  animation: scanReveal 700ms ease both;
}

@media (max-width: 900px) {
  .hero-title {
    font-size: 48px;
  }

  .faq-grid,
  .philosophy-grid,
  .token-display,
  .mode-selector {
    grid-template-columns: 1fr;
  }

  .mobile-menu {
    display: inline-flex;
  }

  .top-left .silence-badge,
  .header-seal,
  .listening-modes {
    display: none;
  }

  .nav-rail {
    transform: translateX(-105%);
    transition: transform 180ms ease;
  }

  .nav-rail.is-open {
    transform: translateX(0);
  }

  .main-content {
    padding-left: 20px;
    padding-right: 20px;
  }

  .table-header,
  .table-row {
    min-width: 680px;
  }
}

@media (max-width: 620px) {
  .public-header,
  .top-bar {
    padding: 10px 12px;
    gap: 8px;
  }

  .brand-header {
    font-size: 15px;
  }

  .logo-icon {
    height: 22px;
  }

  .header-links {
    gap: 8px;
    font-size: 12px;
  }

  .hero-title {
    font-size: 38px;
  }

  .section-title,
  .cta-title,
  .law-title {
    font-size: 32px;
  }

  .status-block,
  .state-timeline,
  .token-grid,
  .seed-grid {
    grid-template-columns: 1fr;
  }

  .rule-card,
  .channel-card,
  .presence-row,
  .fade-card,
  .guardian-card,
  .filter-card,
  .decision-card,
  .whisper-header,
  .footer-row,
  .header-content,
  .header-stats {
    align-items: flex-start;
    flex-direction: column;
  }

  .message {
    max-width: 92%;
  }

  .fab-container {
    right: 16px;
    bottom: 16px;
  }

  .entry-panel {
    padding: 32px 20px;
    border-radius: 0;
    max-width: none;
    min-height: calc(100vh - 140px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: transparent;
  }
}
