/* Gjallarhorn Brand System — Corporate Brand Guidelines v1.0 */
:root {
  --midnight: #0A1A3F;
  --midnight-deep: #061028;
  --midnight-elevated: #0F234F;
  --midnight-card: #122650;
  --horn-gold: #B8860B;
  --horn-gold-bright: #D4A017;
  --horn-gold-dim: #8B6914;
  --echo-silver: #708090;
  --echo-muted: #5A6A7A;
  --body-dark: #1A1A1A;
  --white: #FFFFFF;
  --off-white: #F4F6F8;
  --danger: #C0392B;
  --danger-soft: rgba(192, 57, 43, 0.15);
  --success: #2E8B57;
  --success-soft: rgba(46, 139, 87, 0.15);
  --warn: #B8860B;
  --border: rgba(112, 128, 144, 0.28);
  --border-gold: rgba(184, 134, 11, 0.45);
  --glow-gold: rgba(184, 134, 11, 0.18);
  --radius: 6px;
  --radius-lg: 10px;
  --space: 0.5rem;
  --font: Calibri, Carlito, "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "Cascadia Mono", "Consolas", "Courier New", monospace;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--midnight);
  color: var(--white);
  line-height: 1.55;
  font-size: 16px;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--horn-gold); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--horn-gold-bright); }

/* Typography hierarchy (brandbook) */
.h-headline { font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; }
.h-subhead { font-size: clamp(1.15rem, 2vw, 1.35rem); font-weight: 700; line-height: 1.3; }
.h-body { font-size: 1rem; font-weight: 400; line-height: 1.6; color: rgba(255,255,255,0.88); }
.h-annotation { font-size: 0.75rem; font-weight: 400; line-height: 1.4; color: var(--echo-silver); letter-spacing: 0.04em; text-transform: uppercase; }

.text-gold { color: var(--horn-gold); }
.text-silver { color: var(--echo-silver); }
.text-muted { color: rgba(255,255,255,0.65); }

/* Layout */
.container {
  width: min(1180px, calc(100% - 2.5rem));
  margin-inline: auto;
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.25rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 0.75rem 1.35rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--horn-gold);
  color: var(--body-dark);
  border-color: var(--horn-gold);
}
.btn-primary:hover {
  background: var(--horn-gold-bright);
  color: var(--body-dark);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--white);
  border-color: var(--border);
}
.btn-ghost:hover {
  border-color: var(--horn-gold);
  color: var(--horn-gold-bright);
}

.btn-danger {
  background: var(--danger);
  color: var(--white);
  border-color: var(--danger);
}
.btn-danger:hover { filter: brightness(1.08); }

.btn-sm { padding: 0.4rem 0.75rem; font-size: 0.82rem; }

/* Cards */
.card {
  background: var(--midnight-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
}

.card-elevated {
  background: linear-gradient(180deg, var(--midnight-elevated) 0%, var(--midnight-card) 100%);
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
}

.card-gold {
  border-color: var(--border-gold);
  box-shadow: 0 0 0 1px var(--glow-gold), 0 8px 28px rgba(0,0,0,0.2);
}

/* Site header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 26, 63, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 1rem;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--white);
  text-decoration: none;
}
.brand-lockup:hover { color: var(--white); }
.brand-lockup img,
.brand-lockup svg { width: 36px; height: 36px; }
.brand-lockup .wordmark {
  font-weight: 700;
  letter-spacing: 0.14em;
  font-size: 0.95rem;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}
.nav-links a {
  color: rgba(255,255,255,0.78);
  padding: 0.5rem 0.75rem;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: var(--radius);
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--horn-gold);
  background: rgba(184, 134, 11, 0.08);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--white);
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius);
  cursor: pointer;
}

/* Hero */
.hero {
  position: relative;
  padding: 5.5rem 0 4.5rem;
  /* Do not use overflow:hidden here — it flattens 3D and can hide the logo flip faces */
  overflow: visible;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 70% 20%, rgba(184,134,11,0.12), transparent 55%),
    radial-gradient(ellipse 50% 40% at 10% 80%, rgba(112,128,144,0.08), transparent 50%),
    linear-gradient(180deg, var(--midnight-deep) 0%, var(--midnight) 100%);
  pointer-events: none;
  z-index: 0;
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(112,128,144,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(112,128,144,0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black, transparent);
  pointer-events: none;
  z-index: 0;
}
.hero .container { position: relative; z-index: 1; }

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 2.5rem 3rem;
  align-items: center;
}

.hero-copy { min-width: 0; }

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--horn-gold);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}
.hero-kicker::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--horn-gold);
}

.hero h1 {
  max-width: 18ch;
  margin-bottom: 1.25rem;
}
.hero .lead {
  max-width: 52ch;
  font-size: 1.1rem;
  color: rgba(255,255,255,0.78);
  margin-bottom: 2rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 3rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  max-width: 900px;
}
.stat-tile {
  border-left: 2px solid var(--horn-gold);
  padding: 0.35rem 0 0.35rem 1rem;
}
.stat-tile .value {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--horn-gold);
  font-variant-numeric: tabular-nums;
}
.stat-tile .label {
  font-size: 0.78rem;
  color: var(--echo-silver);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 0.2rem;
}

/* Hero logo flip card — grid stack + opacity (always shows logo; no backface bugs) */
.hero-mark {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 360px;
}

.logo-flip {
  --flip-size: min(360px, 48vw);
  width: var(--flip-size);
  height: var(--flip-size);
  min-width: 240px;
  min-height: 240px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: var(--font);
  color: inherit;
  appearance: none;
  -webkit-appearance: none;
}

.logo-flip-inner {
  position: relative;
  display: grid;
  width: 100%;
  height: 100%;
  perspective: 1200px;
}

.logo-flip-face {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  transition:
    opacity 0.45s ease,
    transform 0.7s cubic-bezier(0.4, 0.15, 0.2, 1);
  transform-style: preserve-3d;
}

.logo-flip-front {
  z-index: 2;
  opacity: 1;
  transform: rotateY(0deg);
  background:
    radial-gradient(circle at 50% 45%, rgba(184,134,11,0.18), transparent 62%),
    radial-gradient(circle at 50% 50%, #0F234F 0%, #061028 100%);
  border: 1px solid var(--border-gold);
  box-shadow:
    0 0 0 1px rgba(184,134,11,0.08),
    0 20px 60px rgba(0,0,0,0.35),
    0 0 80px rgba(184,134,11,0.12);
}

.logo-flip-back {
  z-index: 1;
  opacity: 0;
  transform: rotateY(-90deg);
  pointer-events: none;
  background:
    linear-gradient(160deg, #0F234F 0%, var(--midnight-deep) 55%, #0A1528 100%);
  border: 1px solid var(--border-gold);
  box-shadow:
    0 0 0 1px rgba(184,134,11,0.12),
    0 20px 60px rgba(0,0,0,0.4),
    inset 0 0 60px rgba(184,134,11,0.06);
  padding: 1.75rem 1.5rem;
  text-align: center;
}

.logo-flip:hover .logo-flip-front,
.logo-flip:focus-visible .logo-flip-front,
.logo-flip.is-flipped .logo-flip-front {
  opacity: 0;
  transform: rotateY(90deg);
  pointer-events: none;
}

.logo-flip:hover .logo-flip-back,
.logo-flip:focus-visible .logo-flip-back,
.logo-flip.is-flipped .logo-flip-back {
  opacity: 1;
  transform: rotateY(0deg);
  z-index: 3;
  pointer-events: auto;
}

.logo-flip:focus-visible {
  outline: 2px solid var(--horn-gold);
  outline-offset: 6px;
  border-radius: 50%;
}

.hero-logo-img {
  display: block !important;
  width: 72% !important;
  height: auto !important;
  max-width: 260px;
  max-height: 260px;
  margin: 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 24px rgba(184,134,11,0.35));
  user-select: none;
  pointer-events: none;
  opacity: 1;
  visibility: visible;
}

.logo-flip-hint {
  position: absolute;
  bottom: 1.15rem;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--echo-silver);
  opacity: 0.9;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.logo-flip:hover .logo-flip-hint,
.logo-flip.is-flipped .logo-flip-hint {
  opacity: 0;
}

.logo-flip-back-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  max-width: 26ch;
}

.logo-flip-back-kicker {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--horn-gold);
}

.logo-flip-back-title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--white);
  margin-bottom: 0.15rem;
}

.logo-flip-back-body {
  font-size: 0.82rem;
  line-height: 1.5;
  color: rgba(255,255,255,0.78);
}

.logo-flip-back-emphasis {
  color: var(--horn-gold-bright);
  font-weight: 600;
  margin-top: 0.15rem;
}

@media (prefers-reduced-motion: reduce) {
  .logo-flip-face {
    transition: opacity 0.2s ease;
  }
  .logo-flip:hover .logo-flip-front,
  .logo-flip:focus-visible .logo-flip-front,
  .logo-flip.is-flipped .logo-flip-front,
  .logo-flip:hover .logo-flip-back,
  .logo-flip:focus-visible .logo-flip-back,
  .logo-flip.is-flipped .logo-flip-back {
    transform: none;
  }
}

/* Sections */
.section {
  padding: 4.5rem 0;
}
.section-alt {
  background: var(--midnight-deep);
  border-block: 1px solid var(--border);
}
.section-header {
  max-width: 640px;
  margin-bottom: 2.5rem;
}
.section-header .h-annotation { margin-bottom: 0.65rem; color: var(--horn-gold); }
.section-header .h-subhead { margin-bottom: 0.75rem; }
.section-header p { color: rgba(255,255,255,0.72); }

/* Pillars */
.pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.pillar {
  padding: 1.4rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--midnight-card);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.pillar:hover {
  border-color: var(--border-gold);
  transform: translateY(-2px);
}
.pillar-icon {
  width: 40px;
  height: 40px;
  border: 1.5px solid var(--horn-gold);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--horn-gold);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}
.pillar h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.45rem;
}
.pillar p {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.68);
}

/* Comparison table */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.compare-table th,
.compare-table td {
  text-align: left;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.compare-table th {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--echo-silver);
  font-weight: 700;
  background: rgba(0,0,0,0.2);
}
.compare-table th.col-gh {
  color: var(--horn-gold);
  background: rgba(184,134,11,0.08);
}
.compare-table td.col-gh {
  color: rgba(255,255,255,0.95);
  background: rgba(184,134,11,0.04);
  font-weight: 600;
}
.compare-table td.dim { color: var(--echo-silver); }
.compare-table tr:last-child td { border-bottom: none; }

/* Architecture steps */
.arch-flow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  position: relative;
}
.arch-step {
  text-align: center;
  padding: 1.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--midnight-card);
  position: relative;
}
.arch-step.highlight {
  border-color: var(--border-gold);
  background: rgba(184,134,11,0.08);
}
.arch-step .num {
  width: 36px;
  height: 36px;
  margin: 0 auto 0.85rem;
  border-radius: 50%;
  border: 1.5px solid var(--horn-gold);
  display: grid;
  place-items: center;
  font-weight: 700;
  color: var(--horn-gold);
  font-size: 0.85rem;
}
.arch-step h3 { font-size: 0.95rem; margin-bottom: 0.4rem; }
.arch-step p { font-size: 0.85rem; color: rgba(255,255,255,0.65); }

/* Use case cards */
.use-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
}
.use-card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--midnight-card);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  color: inherit;
  text-decoration: none;
  height: 100%;
}
.use-card:hover {
  border-color: var(--border-gold);
  box-shadow: 0 0 0 1px var(--glow-gold);
  color: inherit;
}
.use-card .tag {
  align-self: flex-start;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--body-dark);
  background: var(--horn-gold);
  padding: 0.25rem 0.55rem;
  border-radius: 3px;
}
.use-card h3 { font-size: 1.1rem; font-weight: 700; }
.use-card p { font-size: 0.9rem; color: rgba(255,255,255,0.68); flex: 1; }
.use-card .link {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--horn-gold);
}

/* Metrics bar */
.metrics-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.metric-card {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--midnight-card);
  text-align: center;
}
.metric-card .big {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--horn-gold);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.metric-card .sub {
  margin-top: 0.4rem;
  font-size: 0.88rem;
  color: var(--echo-silver);
}

/* CTA band */
.cta-band {
  margin: 0;
  padding: 3.5rem 0;
  background: linear-gradient(135deg, var(--midnight-deep) 0%, #0C2048 50%, var(--midnight-deep) 100%);
  border-block: 1px solid var(--border-gold);
  text-align: center;
}
.cta-band h2 { margin-bottom: 0.75rem; }
.cta-band p {
  max-width: 48ch;
  margin: 0 auto 1.5rem;
  color: rgba(255,255,255,0.72);
}

/* Footer */
.site-footer {
  padding: 2.5rem 0 2rem;
  border-top: 1px solid var(--border);
  background: var(--midnight-deep);
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: flex-start;
}
.footer-brand .wordmark {
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
}
.footer-brand p { font-size: 0.85rem; color: var(--echo-silver); max-width: 36ch; }
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  list-style: none;
}
.footer-nav a { color: rgba(255,255,255,0.7); font-size: 0.88rem; font-weight: 600; }
.footer-copy {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--echo-muted);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ========== DASHBOARD CHROME ========== */
.dash-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 240px 1fr;
  background: var(--midnight-deep);
}

.dash-sidebar {
  background: var(--midnight);
  border-right: 1px solid var(--border);
  padding: 1.25rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.dash-sidebar .brand-lockup {
  padding: 0.35rem 0.5rem 1.1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.75rem;
}

.dash-nav-label {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--echo-muted);
  padding: 0.75rem 0.65rem 0.35rem;
  font-weight: 700;
}

.dash-nav-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.7rem;
  border-radius: var(--radius);
  color: rgba(255,255,255,0.72);
  font-size: 0.88rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  background: transparent;
  width: 100%;
  text-align: left;
  font-family: var(--font);
  text-decoration: none;
}
.dash-nav-item:hover {
  background: rgba(255,255,255,0.04);
  color: var(--white);
}
.dash-nav-item.active {
  background: rgba(184,134,11,0.12);
  border-color: var(--border-gold);
  color: var(--horn-gold);
}
.dash-nav-item .ico {
  width: 18px;
  text-align: center;
  opacity: 0.9;
  flex-shrink: 0;
}

.dash-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.dash-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: rgba(10,26,63,0.85);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.dash-topbar h1 {
  font-size: 1.05rem;
  font-weight: 700;
}
.dash-topbar .meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--echo-silver);
}
.live-dot {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--success);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.live-dot::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 0 rgba(46,139,87,0.6);
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(46,139,87,0.5); }
  70% { box-shadow: 0 0 0 8px rgba(46,139,87,0); }
  100% { box-shadow: 0 0 0 0 rgba(46,139,87,0); }
}

.dash-content {
  padding: 1.35rem 1.5rem 2rem;
  flex: 1;
}

.dash-panel { display: none; }
.dash-panel.active { display: block; animation: fadeIn 0.25s ease; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.9rem;
  margin-bottom: 1.15rem;
}
.kpi {
  background: var(--midnight-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.1rem;
}
.kpi .label {
  font-size: 0.72rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--echo-silver);
  font-weight: 700;
  margin-bottom: 0.35rem;
}
.kpi .value {
  font-size: 1.55rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}
.kpi .delta {
  margin-top: 0.3rem;
  font-size: 0.78rem;
  color: var(--echo-silver);
}
.kpi .delta.up { color: var(--success); }
.kpi .delta.down { color: var(--danger); }
.kpi.critical .value { color: var(--horn-gold); }
.kpi.alert {
  border-color: var(--border-gold);
  box-shadow: inset 0 0 0 1px rgba(184,134,11,0.15);
}

.panel-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}
.panel-grid.equal { grid-template-columns: 1fr 1fr; }
.panel-grid.triple { grid-template-columns: 1fr 1fr 1fr; }
.panel-grid.stack { grid-template-columns: 1fr; }

.panel-card {
  background: var(--midnight-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 0;
}
.panel-card .panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--border);
}
.panel-card .panel-head h2 {
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.panel-card .panel-body { padding: 1rem 1.1rem; }

/* Tables in dashboards */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}
.data-table th {
  text-align: left;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--echo-silver);
  padding: 0.45rem 0.55rem;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
}
.data-table td {
  padding: 0.7rem 0.55rem;
  border-bottom: 1px solid rgba(112,128,144,0.15);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(255,255,255,0.02); }
.mono { font-family: var(--mono); font-size: 0.78rem; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.22rem 0.5rem;
  border-radius: 3px;
  border: 1px solid transparent;
}
.badge-critical {
  background: rgba(184,134,11,0.18);
  color: var(--horn-gold-bright);
  border-color: var(--border-gold);
}
.badge-high {
  background: rgba(192,57,43,0.18);
  color: #E74C3C;
  border-color: rgba(192,57,43,0.4);
}
.badge-medium {
  background: rgba(112,128,144,0.2);
  color: #A8B8C8;
  border-color: var(--border);
}
.badge-low {
  background: rgba(46,139,87,0.15);
  color: #3CB371;
  border-color: rgba(46,139,87,0.35);
}
.badge-info {
  background: rgba(112,128,144,0.15);
  color: var(--echo-silver);
  border-color: var(--border);
}

/* Charts (CSS/SVG) */
.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 0.55rem;
  height: 140px;
  padding-top: 0.5rem;
}
.chart-bars .bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  height: 100%;
  justify-content: flex-end;
}
.chart-bars .bar {
  width: 100%;
  max-width: 36px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, var(--horn-gold-bright), var(--horn-gold-dim));
  min-height: 4px;
  transition: height 0.4s ease;
}
.chart-bars .bar.muted {
  background: linear-gradient(180deg, #5A6A7A, #3A4A5A);
}
.chart-bars .bar-label {
  font-size: 0.68rem;
  color: var(--echo-silver);
}

.sparkline {
  width: 100%;
  height: 48px;
}

/* Feed / timeline */
.feed-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: 360px;
  overflow-y: auto;
}
.feed-item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(112,128,144,0.15);
  font-size: 0.85rem;
}
.feed-item:last-child { border-bottom: none; }
.feed-item .time {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--echo-silver);
  padding-top: 0.15rem;
}
.feed-item .title { font-weight: 700; margin-bottom: 0.15rem; }
.feed-item .detail { color: rgba(255,255,255,0.6); font-size: 0.8rem; }

/* Network / graph viz */
.network-map {
  position: relative;
  height: 280px;
  background:
    radial-gradient(circle at 50% 50%, rgba(184,134,11,0.06), transparent 55%),
    linear-gradient(rgba(112,128,144,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(112,128,144,0.05) 1px, transparent 1px);
  background-size: auto, 24px 24px, 24px 24px;
  border-radius: var(--radius);
  overflow: hidden;
}
.network-map svg { width: 100%; height: 100%; }

/* Score meter */
.score-meter {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.score-bar {
  flex: 1;
  height: 8px;
  background: rgba(112,128,144,0.25);
  border-radius: 4px;
  overflow: hidden;
}
.score-bar > span {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: var(--horn-gold);
}

/* ZK flow */
.zk-flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 0.75rem;
  align-items: center;
}
.zk-node {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.1rem;
  background: var(--midnight-elevated);
  text-align: center;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.zk-node.local {
  border-color: var(--echo-silver);
}
.zk-node.cloud {
  border-color: var(--border-gold);
  background: rgba(184,134,11,0.08);
}
.zk-arrow {
  color: var(--horn-gold);
  font-size: 1.4rem;
  font-weight: 700;
}
.zk-node h3 { font-size: 0.85rem; margin-bottom: 0.4rem; }
.zk-node p { font-size: 0.78rem; color: var(--echo-silver); }

/* Demo banner */
.demo-banner {
  background: rgba(184,134,11,0.1);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius);
  padding: 0.65rem 1rem;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.demo-banner strong { color: var(--horn-gold); }

/* Log stream */
.log-stream {
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 1.55;
  background: rgba(0,0,0,0.25);
  border-radius: var(--radius);
  padding: 0.85rem;
  max-height: 220px;
  overflow-y: auto;
  color: rgba(255,255,255,0.75);
}
.log-stream .ok { color: #3CB371; }
.log-stream .warn { color: var(--horn-gold-bright); }
.log-stream .err { color: #E74C3C; }
.log-stream .dim { color: var(--echo-muted); }

/* Responsive */
@media (max-width: 1100px) {
  .pillars, .use-grid, .hero-stats, .arch-flow, .metrics-row { grid-template-columns: repeat(2, 1fr); }
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .panel-grid, .panel-grid.triple { grid-template-columns: 1fr; }
  .zk-flow { grid-template-columns: 1fr; }
  .zk-arrow { transform: rotate(90deg); justify-self: center; }
  .hero-layout {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .hero-mark { order: -1; }
  .logo-flip { --flip-size: min(280px, 70vw); }
}

@media (max-width: 860px) {
  .dash-shell { grid-template-columns: 1fr; }
  .dash-sidebar {
    position: relative;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .dash-nav-item { font-size: 0.82rem; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--midnight);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem;
  }
  .nav-toggle { display: inline-flex; }
  .pillars, .use-grid, .hero-stats, .arch-flow, .metrics-row, .kpi-row {
    grid-template-columns: 1fr;
  }
  .compare-table { display: block; overflow-x: auto; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .logo-flip-back { padding: 1.35rem 1.15rem; }
  .logo-flip-back-title { font-size: 1.05rem; }
  .logo-flip-back-body { font-size: 0.78rem; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(112,128,144,0.35);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(184,134,11,0.45); }
