:root {
  --bg: #07100f;
  --bg-deep: #030706;
  --surface: #0c1715;
  --surface-raised: #11211e;
  --surface-soft: #152824;

  --border: rgba(136, 255, 216, 0.14);
  --border-strong: rgba(136, 255, 216, 0.30);

  --text: #edf7f3;
  --muted: #94aaa3;
  --soft: #bfd0ca;

  --accent: #66e6b8;
  --accent-strong: #8df5d0;

  --danger: #ff8f8f;
  --warning: #e8d779;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;

  --shadow:
    0 18px 60px rgba(0,0,0,0.34);

  --max-width: 1580px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background:
    radial-gradient(circle at top center, #10221e 0, transparent 36%),
    var(--bg-deep);

  color: var(--text);

  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

button,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

.matrix-app {
  min-height: 100vh;
}


/* ==========================================================
   HEADER
========================================================== */

.matrix-header {
  min-height: 78px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 24px;

  padding: 14px 28px;

  background:
    rgba(5, 12, 11, 0.92);

  border-bottom:
    1px solid var(--border);

  position: sticky;
  top: 0;
  z-index: 20;

  backdrop-filter: blur(18px);
}

.matrix-brand {
  display: flex;
  align-items: center;

  gap: 12px;
}

.matrix-mark {
  width: 46px;
  height: 46px;

  border-radius: 14px;

  display: grid;
  place-items: center;

  font-weight: 900;
  font-size: 21px;

  color: #03100c;

  background:
    linear-gradient(
      135deg,
      var(--accent-strong),
      var(--accent)
    );

  box-shadow:
    0 0 28px rgba(102,230,184,0.24);
}

.matrix-brand-name {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.matrix-brand-tagline {
  margin-top: 2px;

  color: var(--muted);

  font-size: 12px;
}

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

.icon-button,
.profile-button {
  min-height: 39px;

  border:
    1px solid var(--border);

  border-radius:
    var(--radius-sm);

  background:
    var(--surface);

  padding:
    0 13px;

  cursor:
    pointer;
}


/* ==========================================================
   PRIMARY NAVIGATION
========================================================== */

.matrix-primary-nav {
  max-width:
    var(--max-width);

  margin:
    0 auto;

  display:
    flex;

  overflow-x:
    auto;

  gap:
    4px;

  padding:
    12px 24px;

  border-bottom:
    1px solid var(--border);
}

.nav-item {
  border:
    0;

  background:
    transparent;

  padding:
    10px 13px;

  color:
    var(--muted);

  border-radius:
    10px;

  white-space:
    nowrap;

  cursor:
    pointer;
}

.nav-item:hover,
.nav-item.active {
  color:
    var(--text);

  background:
    var(--surface-raised);
}

.jahcore-nav {
  color:
    var(--accent);
}


/* ==========================================================
   THREE-COLUMN APPLICATION FRAME
========================================================== */

.matrix-layout {
  max-width:
    var(--max-width);

  margin:
    0 auto;

  display:
    grid;

  grid-template-columns:
    minmax(210px, 260px)
    minmax(0, 1fr)
    minmax(230px, 310px);

  gap:
    18px;

  padding:
    20px 24px 30px;
}

.matrix-left-rail,
.matrix-right-rail {
  display:
    flex;

  flex-direction:
    column;

  gap:
    14px;
}


/* ==========================================================
   PANELS
========================================================== */

.panel,
.composer-card,
.feed-card {
  background:
    linear-gradient(
      180deg,
      rgba(18, 35, 31, 0.96),
      rgba(10, 21, 19, 0.96)
    );

  border:
    1px solid var(--border);

  border-radius:
    var(--radius-md);

  box-shadow:
    var(--shadow);
}

.panel {
  padding:
    16px;
}

.panel-title {
  margin:
    0 0 12px;

  font-size:
    16px;
}

.eyebrow {
  margin-bottom:
    6px;

  color:
    var(--accent);

  font-size:
    10px;

  font-weight:
    800;

  letter-spacing:
    0.16em;
}

.profile-avatar,
.feed-avatar {
  border-radius:
    50%;

  background:
    linear-gradient(
      145deg,
      #284a42,
      #10241f
    );

  border:
    1px solid var(--border-strong);
}

.profile-avatar {
  width:
    58px;

  height:
    58px;

  margin-bottom:
    14px;
}

.identity-status {
  display:
    flex;

  align-items:
    center;

  gap:
    8px;

  color:
    var(--soft);

  font-size:
    12px;
}

.status-dot {
  width:
    8px;

  height:
    8px;

  border-radius:
    50%;

  background:
    var(--accent);
}

.identity-meta {
  margin-top:
    12px;

  color:
    var(--muted);

  font-size:
    12px;

  line-height:
    1.5;
}


/* ==========================================================
   LEFT RAIL
========================================================== */

.rail-link {
  width:
    100%;

  border:
    0;

  background:
    transparent;

  color:
    var(--muted);

  text-align:
    left;

  padding:
    9px 10px;

  border-radius:
    9px;

  cursor:
    pointer;
}

.rail-link:hover,
.rail-link.active {
  background:
    var(--surface-soft);

  color:
    var(--text);
}


/* ==========================================================
   CENTER SURFACE
========================================================== */

.matrix-main-surface {
  min-width:
    0;
}

.composer-card {
  padding:
    16px;

  margin-bottom:
    18px;
}

.composer-heading {
  font-size:
    13px;

  font-weight:
    700;

  margin-bottom:
    10px;
}

.composer-card textarea {
  width:
    100%;

  min-height:
    92px;

  resize:
    vertical;

  border:
    1px solid var(--border);

  outline:
    none;

  border-radius:
    12px;

  background:
    #08120f;

  color:
    var(--text);

  padding:
    13px;
}

.composer-card textarea::placeholder {
  color:
    #71847e;
}

.composer-actions {
  display:
    flex;

  align-items:
    center;

  justify-content:
    space-between;

  gap:
    14px;

  margin-top:
    12px;
}

.composer-tools {
  display:
    flex;

  flex-wrap:
    wrap;

  gap:
    6px;
}

.composer-tools button {
  border:
    1px solid var(--border);

  background:
    var(--surface);

  color:
    var(--muted);

  padding:
    7px 10px;

  border-radius:
    8px;
}

.primary-button {
  border:
    0;

  border-radius:
    9px;

  background:
    var(--accent);

  color:
    #03100c;

  font-weight:
    800;

  padding:
    9px 17px;

  cursor:
    pointer;
}

.surface-heading {
  display:
    flex;

  align-items:
    end;

  justify-content:
    space-between;

  gap:
    16px;

  margin:
    20px 2px 12px;
}

.surface-heading h1 {
  margin:
    0;

  font-size:
    28px;

  letter-spacing:
    -0.035em;
}

.feed-filter {
  color:
    var(--muted);

  font-size:
    12px;
}

.feed-card {
  overflow:
    hidden;
}

.feed-author {
  display:
    flex;

  align-items:
    center;

  gap:
    11px;

  padding:
    16px;
}

.feed-avatar {
  width:
    42px;

  height:
    42px;
}

.feed-author-name {
  font-weight:
    750;
}

.feed-author-meta {
  margin-top:
    2px;

  color:
    var(--muted);

  font-size:
    11px;
}

.feed-content {
  padding:
    0 16px 16px;

  line-height:
    1.62;

  color:
    var(--soft);
}

.trust-strip {
  display:
    flex;

  flex-wrap:
    wrap;

  gap:
    8px;

  padding:
    12px 16px;

  border-top:
    1px solid var(--border);

  border-bottom:
    1px solid var(--border);

  background:
    rgba(102,230,184,0.035);
}

.trust-strip span {
  padding:
    5px 8px;

  border-radius:
    999px;

  background:
    rgba(102,230,184,0.08);

  color:
    var(--accent);

  font-size:
    10px;
}

.feed-actions {
  display:
    grid;

  grid-template-columns:
    repeat(4, 1fr);

  gap:
    1px;
}

.feed-actions button {
  border:
    0;

  background:
    transparent;

  color:
    var(--muted);

  padding:
    12px;

  cursor:
    pointer;
}

.feed-actions button:hover {
  background:
    var(--surface-soft);

  color:
    var(--text);
}


/* ==========================================================
   RIGHT RAIL
========================================================== */

.aligner-panel {
  border-color:
    rgba(102,230,184,0.25);
}

.aligner-panel p,
.jahcore-panel p {
  color:
    var(--muted);

  font-size:
    12px;

  line-height:
    1.5;
}

.aligner-status {
  margin:
    13px 0;

  padding:
    8px 10px;

  border-radius:
    9px;

  background:
    rgba(102,230,184,0.07);

  color:
    var(--accent);

  font-size:
    11px;
}

.secondary-button {
  width:
    100%;

  border:
    1px solid var(--border-strong);

  border-radius:
    9px;

  background:
    rgba(102,230,184,0.04);

  color:
    var(--accent);

  padding:
    9px;

  cursor:
    pointer;
}

.security-line {
  display:
    flex;

  align-items:
    center;

  justify-content:
    space-between;

  gap:
    12px;

  color:
    var(--muted);

  font-size:
    12px;

  padding:
    8px 0;

  border-bottom:
    1px solid rgba(255,255,255,0.04);
}

.security-line span {
  color:
    var(--soft);
}


/* ==========================================================
   ECOSYSTEM
========================================================== */

.ecosystem-bridge {
  max-width:
    var(--max-width);

  margin:
    0 auto;

  padding:
    0 24px 30px;
}

.ecosystem-title {
  color:
    var(--muted);

  font-size:
    11px;

  font-weight:
    800;

  letter-spacing:
    0.12em;

  text-transform:
    uppercase;

  margin-bottom:
    10px;
}

.ecosystem-grid {
  display:
    grid;

  grid-template-columns:
    repeat(4, 1fr);

  gap:
    10px;
}

.ecosystem-card {
  display:
    flex;

  flex-direction:
    column;

  gap:
    5px;

  padding:
    14px;

  border:
    1px solid var(--border);

  border-radius:
    12px;

  background:
    var(--surface);
}

.ecosystem-card strong {
  font-size:
    12px;
}

.ecosystem-card span {
  color:
    var(--muted);

  font-size:
    10px;
}


/* ==========================================================
   FOOTER
========================================================== */

.matrix-footer {
  display:
    flex;

  align-items:
    center;

  justify-content:
    space-between;

  gap:
    20px;

  padding:
    20px 28px;

  border-top:
    1px solid var(--border);

  color:
    var(--muted);

  font-size:
    10px;
}


/* ==========================================================
   RESPONSIVE FOUNDATION
========================================================== */

@media (max-width: 1120px) {

  .matrix-layout {
    grid-template-columns:
      220px
      minmax(0, 1fr);
  }

  .matrix-right-rail {
    grid-column:
      1 / -1;

    display:
      grid;

    grid-template-columns:
      repeat(3, 1fr);
  }

}

@media (max-width: 780px) {

  .matrix-header {
    padding:
      12px 15px;
  }

  .matrix-brand-tagline {
    display:
      none;
  }

  .matrix-header-actions .icon-button {
    display:
      none;
  }

  .matrix-primary-nav {
    padding:
      8px 12px;
  }

  .matrix-layout {
    display:
      block;

    padding:
      14px 12px 24px;
  }

  .matrix-left-rail {
    display:
      none;
  }

  .matrix-right-rail {
    display:
      grid;

    grid-template-columns:
      1fr;

    margin-top:
      16px;
  }

  .ecosystem-bridge {
    padding:
      0 12px 22px;
  }

  .ecosystem-grid {
    grid-template-columns:
      repeat(2, 1fr);
  }

  .matrix-footer {
    align-items:
      flex-start;

    flex-direction:
      column;

    padding:
      18px 14px;
  }

}

@media (max-width: 480px) {

  .matrix-brand-name {
    font-size:
      17px;
  }

  .matrix-mark {
    width:
      40px;

    height:
      40px;
  }

  .surface-heading {
    align-items:
      flex-start;

    flex-direction:
      column;
  }

  .composer-actions {
    align-items:
      stretch;

    flex-direction:
      column;
  }

  .primary-button {
    width:
      100%;
  }

  .ecosystem-grid {
    grid-template-columns:
      1fr;
  }

  .feed-actions {
    grid-template-columns:
      repeat(2, 1fr);
  }

}


/* ==========================================================
   MATRIXALIGNER PHASE 1 PART 4 — PROFILE FOUNDATION
========================================================== */

.profile-foundation-card {
  display:flex;
  align-items:center;
  gap:14px;
  margin-bottom:16px;
  padding:14px 16px;

  border:1px solid var(--border);
  border-radius:var(--radius-md);

  background:
    linear-gradient(
      135deg,
      rgba(102,230,184,.07),
      rgba(12,23,21,.95)
    );
}

.profile-foundation-avatar {
  width:52px;
  height:52px;
  flex:0 0 52px;
  border-radius:50%;

  border:1px solid var(--border-strong);

  background:
    radial-gradient(
      circle at 35% 30%,
      #3f6d60,
      #142923 64%
    );
}

.profile-foundation-main {
  min-width:0;
  flex:1;
}

.profile-foundation-name {
  font-size:16px;
  font-weight:800;
}

.profile-foundation-state {
  margin-top:4px;
  color:var(--muted);
  font-size:11px;
}

.profile-foundation-badges {
  display:flex;
  flex-wrap:wrap;
  gap:7px;
}

.identity-type-badge,
.verification-badge {
  padding:6px 9px;
  border-radius:999px;
  border:1px solid var(--border);

  background:rgba(255,255,255,.025);
  color:var(--muted);
  font-size:10px;
}

.verification-badge {
  border-color:rgba(102,230,184,.22);
  color:var(--accent);
}

.trust-passport-foundation {
  margin-bottom:16px;
  padding:17px;

  border:1px solid var(--border-strong);
  border-radius:var(--radius-md);

  background:
    linear-gradient(
      180deg,
      rgba(18,35,31,.97),
      rgba(8,18,15,.97)
    );
}

.trust-passport-foundation h2 {
  margin:0 0 7px;
  font-size:18px;
}

.trust-passport-foundation > p {
  margin:0 0 14px;
  color:var(--muted);
  font-size:12px;
  line-height:1.55;
}

.trust-passport-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}

.trust-passport-grid > div {
  display:flex;
  flex-direction:column;
  gap:4px;
  padding:10px;

  border:1px solid var(--border);
  border-radius:10px;

  background:rgba(255,255,255,.018);
}

.trust-passport-grid strong {
  font-size:11px;
}

.trust-passport-grid span {
  color:var(--muted);
  font-size:10px;
}

@media (max-width:650px) {

  .profile-foundation-card {
    align-items:flex-start;
  }

  .profile-foundation-badges {
    flex-direction:column;
    align-items:flex-end;
  }

  .trust-passport-grid {
    grid-template-columns:1fr;
  }

}


/* ==========================================================
   MATRIXALIGNER PHASE 1 PART 5 — SOCIAL GRAPH
========================================================== */

.social-graph-foundation {
  margin-bottom:16px;
  padding:16px;

  border:1px solid var(--border);
  border-radius:var(--radius-md);

  background:
    linear-gradient(
      180deg,
      rgba(18,35,31,.96),
      rgba(9,19,17,.97)
    );
}

.social-graph-heading {
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;

  margin-bottom:14px;
}

.social-graph-heading h2 {
  margin:0;
  font-size:18px;
}

.social-graph-status {
  color:var(--muted);
  font-size:10px;
  text-align:right;
}

.social-graph-controls {
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:7px;

  margin-bottom:14px;
}

.social-graph-controls button {
  padding:9px 10px;

  border:1px solid var(--border);
  border-radius:9px;

  background:var(--surface);
  color:var(--muted);
}

.social-graph-controls button:disabled {
  opacity:.58;
  cursor:not-allowed;
}

.social-graph-summary {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:8px;
}

.social-graph-summary > div {
  display:flex;
  flex-direction:column;
  gap:3px;

  padding:10px;

  border:1px solid var(--border);
  border-radius:10px;

  background:rgba(255,255,255,.018);
}

.social-graph-summary strong {
  color:var(--accent);
  font-size:16px;
}

.social-graph-summary span {
  color:var(--muted);
  font-size:10px;
}

.social-graph-note {
  margin:12px 0 0;

  color:var(--muted);

  font-size:10px;
  line-height:1.5;
}

@media (max-width:650px) {

  .social-graph-heading {
    align-items:flex-start;
    flex-direction:column;
  }

  .social-graph-status {
    text-align:left;
  }

  .social-graph-controls {
    grid-template-columns:repeat(2,1fr);
  }

}


/* ==========================================================
   MATRIXALIGNER PHASE 1 PART 6 — POST FEED
========================================================== */

.composer-state {
  margin-top:9px;
  color:var(--muted);
  font-size:10px;
}

.primary-button:disabled {
  opacity:.55;
  cursor:not-allowed;
}

.trust-feed-runtime {
  min-height:230px;
}

.feed-zero-state {
  padding:24px;

  border:1px solid var(--border);
  border-radius:var(--radius-md);

  background:
    linear-gradient(
      180deg,
      rgba(18,35,31,.96),
      rgba(8,18,16,.97)
    );
}

.feed-zero-state h2 {
  margin:0 0 8px;
  font-size:20px;
}

.feed-zero-state > p {
  margin:0;
  color:var(--muted);
  line-height:1.6;
  font-size:12px;
  max-width:700px;
}

.feed-zero-metrics {
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:8px;
  margin-top:18px;
}

.feed-zero-metrics > div {
  display:flex;
  flex-direction:column;
  gap:3px;

  padding:11px;

  border:1px solid var(--border);
  border-radius:10px;

  background:rgba(255,255,255,.018);
}

.feed-zero-metrics strong {
  color:var(--accent);
  font-size:17px;
}

.feed-zero-metrics span {
  color:var(--muted);
  font-size:10px;
}

.matrix-feed-list {
  display:flex;
  flex-direction:column;
  gap:14px;
  margin-top:14px;
}

.matrix-runtime-post {
  overflow:hidden;

  border:1px solid var(--border);
  border-radius:var(--radius-md);

  background:
    linear-gradient(
      180deg,
      rgba(18,35,31,.97),
      rgba(9,19,17,.97)
    );
}

.matrix-runtime-post-header {
  display:flex;
  align-items:center;
  gap:10px;
  padding:14px 16px;
}

.matrix-runtime-post-author {
  font-weight:800;
  font-size:13px;
}

.matrix-runtime-post-meta {
  margin-top:2px;
  color:var(--muted);
  font-size:10px;
}

.matrix-runtime-post-body {
  padding:0 16px 16px;
  color:var(--soft);
  line-height:1.6;
  font-size:13px;
}

.matrix-runtime-trust-strip {
  display:flex;
  flex-wrap:wrap;
  gap:6px;

  padding:10px 16px;

  border-top:1px solid var(--border);
  border-bottom:1px solid var(--border);
}

.matrix-runtime-trust-strip span {
  padding:5px 7px;

  border-radius:999px;

  background:rgba(102,230,184,.06);
  color:var(--accent);

  font-size:9px;
}

.matrix-runtime-interactions {
  display:grid;
  grid-template-columns:repeat(4,1fr);
}

.matrix-runtime-interactions button {
  border:0;
  background:transparent;
  color:var(--muted);
  padding:11px;
}

.matrix-runtime-interactions button:disabled {
  opacity:.5;
  cursor:not-allowed;
}

@media (max-width:650px) {

  .feed-zero-metrics {
    grid-template-columns:repeat(2,1fr);
  }

}


/* ==========================================================
   MATRIXALIGNER PHASE 1 PART 7 — NAVIGATION POLISH
========================================================== */

html {
  overflow-x:hidden;
}

body {
  overflow-x:hidden;
}

button,
textarea,
a {
  -webkit-tap-highlight-color:transparent;
}

button:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline:2px solid var(--accent);
  outline-offset:3px;
}

.mobile-nav-toggle {
  display:none;

  min-height:40px;

  border:1px solid var(--border);
  border-radius:10px;

  background:var(--surface);
  color:var(--text);

  padding:0 12px;
  cursor:pointer;
}

.matrix-interaction-status {
  max-width:var(--max-width);
  margin:0 auto;

  padding:8px 24px 0;

  color:var(--muted);
  font-size:10px;
}

.nav-item {
  min-height:40px;
}

.nav-item[data-foundation-only="true"]::after {
  content:"";
  display:inline-block;

  width:5px;
  height:5px;

  margin-left:6px;

  border-radius:50%;

  background:var(--muted);
  opacity:.65;

  vertical-align:middle;
}

.rail-link {
  min-height:38px;
}

.matrix-main-surface,
.matrix-left-rail,
.matrix-right-rail {
  min-width:0;
}

@media (max-width:780px) {

  .mobile-nav-toggle {
    display:inline-flex;
    align-items:center;
    justify-content:center;
  }

  .matrix-primary-nav {
    display:none;

    flex-direction:column;
    align-items:stretch;

    overflow:visible;

    padding:10px 12px 12px;

    background:rgba(5,12,11,.97);
  }

  .matrix-primary-nav.mobile-open {
    display:flex;
  }

  .matrix-primary-nav .nav-item {
    width:100%;
    text-align:left;
  }

  .matrix-interaction-status {
    padding:8px 14px 0;
  }

}

@media (min-width:781px) {

  .matrix-primary-nav {
    display:flex !important;
  }

}

@media (prefers-reduced-motion:reduce) {

  *,
  *::before,
  *::after {
    scroll-behavior:auto !important;
    transition:none !important;
    animation:none !important;
  }

}


/* ==========================================================
   MATRIXALIGNER PHASE 2 PART 1 — TRUST PASSPORT + ALIGNER
========================================================== */

.trust-passport-runtime-status {
  margin-top:12px;
  padding:9px 10px;

  border:1px solid var(--border);
  border-radius:9px;

  background:rgba(102,230,184,.04);
  color:var(--muted);

  font-size:10px;
  line-height:1.5;
}

.aligner-capability-list {
  display:flex;
  flex-wrap:wrap;
  gap:6px;

  margin:10px 0 12px;
}

.aligner-capability-list span {
  padding:5px 7px;

  border-radius:999px;

  background:rgba(102,230,184,.06);
  border:1px solid rgba(102,230,184,.13);

  color:var(--accent);
  font-size:9px;
}

#matrix-evidence-panel-button:disabled {
  opacity:.55;
  cursor:not-allowed;
}


/* ==========================================================
   MATRIXALIGNER PHASE 2 PART 2 — EVIDENCE CONTEXT
========================================================== */

.matrix-evidence-context-panel {
  margin-bottom:16px;
  padding:17px;

  border:1px solid var(--border-strong);
  border-radius:var(--radius-md);

  background:
    linear-gradient(
      180deg,
      rgba(17,36,31,.98),
      rgba(7,17,15,.98)
    );
}

.evidence-context-header {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;

  margin-bottom:14px;
}

.evidence-context-header h2 {
  margin:0;
  font-size:19px;
}

.evidence-runtime-state {
  padding:6px 8px;

  border:1px solid var(--border);
  border-radius:999px;

  color:var(--muted);
  font-size:9px;
}

.evidence-context-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}

.evidence-context-grid > div,
.evidence-why {
  display:flex;
  flex-direction:column;
  gap:4px;

  padding:10px;

  border:1px solid var(--border);
  border-radius:10px;

  background:rgba(255,255,255,.018);
}

.evidence-context-grid strong,
.evidence-why strong {
  font-size:10px;
}

.evidence-context-grid span,
.evidence-why span {
  color:var(--muted);
  font-size:10px;
  line-height:1.45;
}

.evidence-why {
  margin-top:8px;
}

@media (max-width:650px) {

  .evidence-context-grid {
    grid-template-columns:1fr;
  }

  .evidence-context-header {
    flex-direction:column;
  }

}


/* ==========================================================
   MATRIXALIGNER PHASE 2 PART 3 — PROVENANCE
========================================================== */

.provenance-panel-button {
  margin-top:7px;
}

.matrix-provenance-panel {
  margin-bottom:16px;
  padding:17px;

  border:1px solid var(--border-strong);
  border-radius:var(--radius-md);

  background:
    linear-gradient(
      180deg,
      rgba(17,34,31,.98),
      rgba(7,15,14,.98)
    );
}

.provenance-header {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;

  margin-bottom:14px;
}

.provenance-header h2 {
  margin:0;
  font-size:19px;
}

.provenance-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}

.provenance-grid > div {
  display:flex;
  flex-direction:column;
  gap:4px;

  padding:10px;

  border:1px solid var(--border);
  border-radius:10px;

  background:rgba(255,255,255,.018);
}

.provenance-grid strong,
.provenance-history strong {
  font-size:10px;
}

.provenance-grid span,
.provenance-history div {
  color:var(--muted);
  font-size:10px;
  line-height:1.45;
}

.provenance-history {
  display:flex;
  flex-direction:column;
  gap:6px;

  margin-top:8px;
  padding:10px;

  border:1px solid var(--border);
  border-radius:10px;

  background:rgba(255,255,255,.018);
}

@media (max-width:650px) {

  .provenance-grid {
    grid-template-columns:1fr;
  }

  .provenance-header {
    flex-direction:column;
  }

}


/* ==========================================================
   MATRIXALIGNER PHASE 2 PART 4 — AI DISCLOSURE
========================================================== */

.matrix-ai-disclosure-panel {
  margin-bottom:16px;
  padding:17px;

  border:1px solid var(--border-strong);
  border-radius:var(--radius-md);

  background:
    linear-gradient(
      180deg,
      rgba(18,33,35,.98),
      rgba(8,15,17,.98)
    );
}

.ai-disclosure-header {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;

  margin-bottom:14px;
}

.ai-disclosure-header h2 {
  margin:0;
  font-size:19px;
}

.ai-disclosure-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}

.ai-disclosure-grid > div {
  display:flex;
  flex-direction:column;
  gap:4px;

  padding:10px;

  border:1px solid var(--border);
  border-radius:10px;

  background:rgba(255,255,255,.018);
}

.ai-disclosure-grid strong {
  font-size:10px;
}

.ai-disclosure-grid span {
  color:var(--muted);
  font-size:10px;
  line-height:1.45;
}

.ai-disclosure-note {
  margin-top:10px;
  padding:10px;

  border:1px solid var(--border);
  border-radius:10px;

  color:var(--muted);
  font-size:10px;
  line-height:1.55;

  background:rgba(255,255,255,.015);
}

@media (max-width:650px) {

  .ai-disclosure-grid {
    grid-template-columns:1fr;
  }

  .ai-disclosure-header {
    flex-direction:column;
  }

}


/* ==========================================================
   MATRIXALIGNER PHASE 2 PART 5 — CORRECTIONS
========================================================== */

.matrix-community-corrections-panel {
  margin-bottom:16px;
  padding:17px;

  border:1px solid var(--border-strong);
  border-radius:var(--radius-md);

  background:
    linear-gradient(
      180deg,
      rgba(20,34,31,.98),
      rgba(8,16,14,.98)
    );
}

.corrections-header {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:14px;
}

.corrections-header h2 {
  margin:0;
  font-size:19px;
}

.corrections-summary {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:8px;
}

.corrections-summary > div {
  display:flex;
  flex-direction:column;
  gap:4px;
  padding:10px;

  border:1px solid var(--border);
  border-radius:10px;

  background:rgba(255,255,255,.018);
}

.corrections-summary strong {
  color:var(--accent);
  font-size:17px;
}

.corrections-summary span {
  color:var(--muted);
  font-size:10px;
}

.matrix-corrections-list,
.corrections-principle {
  margin-top:10px;
  padding:10px;

  border:1px solid var(--border);
  border-radius:10px;

  background:rgba(255,255,255,.015);

  color:var(--muted);
  font-size:10px;
  line-height:1.55;
}

.matrix-correction-item {
  padding:10px 0;
  border-bottom:1px solid var(--border);
}

.matrix-correction-item:last-child {
  border-bottom:0;
}

.matrix-correction-item strong {
  display:block;
  margin-bottom:4px;
  color:var(--soft);
  font-size:11px;
}

@media (max-width:650px) {

  .corrections-summary {
    grid-template-columns:1fr;
  }

  .corrections-header {
    flex-direction:column;
  }

}


/* ==========================================================
   MATRIXALIGNER PHASE 2 PART 6 — APPEALS
========================================================== */

.matrix-appeals-transparency-panel {
  margin-bottom:16px;
  padding:17px;

  border:1px solid var(--border-strong);
  border-radius:var(--radius-md);

  background:
    linear-gradient(
      180deg,
      rgba(21,34,33,.98),
      rgba(8,16,16,.98)
    );
}

.appeals-header {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;

  margin-bottom:14px;
}

.appeals-header h2 {
  margin:0;
  font-size:19px;
}

.appeals-summary {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:8px;
}

.appeals-summary > div {
  display:flex;
  flex-direction:column;
  gap:4px;

  padding:10px;

  border:1px solid var(--border);
  border-radius:10px;

  background:rgba(255,255,255,.018);
}

.appeals-summary strong {
  color:var(--accent);
  font-size:17px;
}

.appeals-summary span {
  color:var(--muted);
  font-size:10px;
}

.matrix-appeal-list,
.appeal-transparency-principle {
  margin-top:10px;
  padding:10px;

  border:1px solid var(--border);
  border-radius:10px;

  background:rgba(255,255,255,.015);

  color:var(--muted);
  font-size:10px;
  line-height:1.55;
}

.matrix-appeal-record {
  padding:10px 0;
  border-bottom:1px solid var(--border);
}

.matrix-appeal-record:last-child {
  border-bottom:0;
}

.matrix-appeal-record strong {
  display:block;

  margin-bottom:4px;

  color:var(--soft);
  font-size:11px;
}

.matrix-appeal-record span {
  display:block;

  color:var(--muted);
  font-size:10px;
}

@media (max-width:650px) {

  .appeals-summary {
    grid-template-columns:1fr;
  }

  .appeals-header {
    flex-direction:column;
  }

}


/* ==========================================================
   MATRIXALIGNER PHASE 2 PART 7 — TRUST NETWORK
========================================================== */

.matrix-trust-network-status {
  margin-bottom:16px;
  padding:17px;

  border:1px solid var(--border-strong);
  border-radius:var(--radius-md);

  background:
    linear-gradient(
      135deg,
      rgba(102,230,184,.06),
      rgba(10,22,19,.98)
    );
}

.trust-network-header {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:14px;
}

.trust-network-header h2 {
  margin:0;
  font-size:20px;
}

.trust-network-grid {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
}

.trust-network-grid button {
  min-height:84px;

  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:flex-start;

  gap:5px;

  padding:11px;

  border:1px solid var(--border);
  border-radius:11px;

  background:rgba(255,255,255,.018);
  color:var(--text);

  text-align:left;
  cursor:pointer;
}

.trust-network-grid button:hover,
.trust-network-grid button:focus-visible {
  border-color:var(--border-strong);
  background:rgba(102,230,184,.055);
}

.trust-network-grid strong {
  font-size:11px;
}

.trust-network-grid span {
  color:var(--muted);
  font-size:10px;
  line-height:1.4;
}

.trust-network-principle {
  margin-top:10px;
  padding:10px;

  border:1px solid var(--border);
  border-radius:10px;

  color:var(--muted);
  font-size:10px;
  line-height:1.55;

  background:rgba(255,255,255,.012);
}

@media (max-width:900px) {

  .trust-network-grid {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

}

@media (max-width:560px) {

  .trust-network-grid {
    grid-template-columns:1fr;
  }

  .trust-network-header {
    flex-direction:column;
  }

}


/* ==========================================================
   MATRIXALIGNER PHASE 3 PART 1 — COMMUNITIES
========================================================== */

.matrix-communities-surface {
  margin-bottom:16px;
  padding:17px;

  border:1px solid var(--border-strong);
  border-radius:var(--radius-md);

  background:
    linear-gradient(
      180deg,
      rgba(18,34,32,.98),
      rgba(8,16,15,.98)
    );
}

.communities-header {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:14px;
}

.communities-header h2 {
  margin:0;
  font-size:20px;
}

.communities-summary {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:8px;
}

.communities-summary > div {
  display:flex;
  flex-direction:column;
  gap:4px;

  padding:10px;

  border:1px solid var(--border);
  border-radius:10px;

  background:rgba(255,255,255,.018);
}

.communities-summary strong {
  color:var(--accent);
  font-size:17px;
}

.communities-summary span {
  color:var(--muted);
  font-size:10px;
}

.matrix-community-list,
.community-principle {
  margin-top:10px;
  padding:10px;

  border:1px solid var(--border);
  border-radius:10px;

  color:var(--muted);
  font-size:10px;
  line-height:1.55;

  background:rgba(255,255,255,.015);
}

.matrix-community-card {
  padding:10px 0;
  border-bottom:1px solid var(--border);
}

.matrix-community-card:last-child {
  border-bottom:0;
}

.matrix-community-card strong {
  display:block;
  margin-bottom:4px;
  color:var(--soft);
  font-size:11px;
}

@media (max-width:650px) {

  .communities-summary {
    grid-template-columns:1fr;
  }

  .communities-header {
    flex-direction:column;
  }

}


/* ==========================================================
   MATRIXALIGNER PHASE 3 PART 2 — MESSAGING
========================================================== */

.matrix-messages-surface {
  margin-bottom:16px;
  padding:17px;

  border:1px solid var(--border-strong);
  border-radius:var(--radius-md);

  background:
    linear-gradient(
      180deg,
      rgba(18,32,31,.98),
      rgba(8,15,15,.98)
    );
}

.messages-header {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:14px;
}

.messages-header h2 {
  margin:0;
  font-size:20px;
}

.messages-layout {
  display:grid;
  grid-template-columns:minmax(180px,240px) minmax(0,1fr);
  gap:10px;
}

.messages-conversation-list,
.messages-thread {
  border:1px solid var(--border);
  border-radius:11px;

  background:rgba(255,255,255,.014);
}

.messages-conversation-list {
  padding:10px;
}

.messages-section-label {
  margin-bottom:8px;

  color:var(--muted);
  font-size:9px;
  font-weight:800;

  letter-spacing:.1em;
  text-transform:uppercase;
}

.matrix-conversation-list {
  color:var(--muted);
  font-size:10px;
  line-height:1.5;
}

.matrix-conversation-item {
  width:100%;

  display:flex;
  flex-direction:column;
  gap:3px;

  padding:9px;

  border:0;
  border-bottom:1px solid var(--border);

  background:transparent;
  color:var(--text);

  text-align:left;
}

.matrix-conversation-item:last-child {
  border-bottom:0;
}

.matrix-conversation-item strong {
  font-size:11px;
}

.matrix-conversation-item span {
  color:var(--muted);
  font-size:9px;
}

.messages-thread {
  overflow:hidden;
}

.messages-thread-header {
  padding:12px;

  border-bottom:1px solid var(--border);
}

.messages-thread-header > div {
  display:flex;
  flex-direction:column;
  gap:3px;
}

.messages-thread-header strong {
  font-size:12px;
}

.messages-thread-header span {
  color:var(--muted);
  font-size:9px;
}

.matrix-message-list {
  min-height:160px;
  max-height:330px;
  overflow-y:auto;

  padding:12px;

  color:var(--muted);
  font-size:10px;
}

.matrix-message-record {
  max-width:78%;

  margin-bottom:8px;
  padding:9px 10px;

  border:1px solid var(--border);
  border-radius:10px;

  background:rgba(255,255,255,.02);
}

.matrix-message-record strong {
  display:block;

  margin-bottom:3px;

  color:var(--soft);
  font-size:10px;
}

.matrix-message-record span {
  font-size:10px;
  line-height:1.5;
}

.message-composer-foundation {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:8px;

  padding:10px;

  border-top:1px solid var(--border);
}

.message-composer-foundation textarea {
  width:100%;
  min-height:42px;
  max-height:100px;

  resize:vertical;

  border:1px solid var(--border);
  border-radius:9px;

  background:#08120f;
  color:var(--text);

  padding:10px;
}

.message-runtime-note {
  padding:0 10px 10px;

  color:var(--muted);
  font-size:9px;
  line-height:1.5;
}

.messages-summary {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:8px;

  margin-top:10px;
}

.messages-summary > div {
  display:flex;
  flex-direction:column;
  gap:4px;

  padding:10px;

  border:1px solid var(--border);
  border-radius:10px;

  background:rgba(255,255,255,.018);
}

.messages-summary strong {
  color:var(--accent);
  font-size:16px;
}

.messages-summary span {
  color:var(--muted);
  font-size:10px;
}

@media (max-width:700px) {

  .messages-layout {
    grid-template-columns:1fr;
  }

  .messages-summary {
    grid-template-columns:1fr;
  }

  .messages-header {
    flex-direction:column;
  }

}


/* ==========================================================
   MATRIXALIGNER PHASE 3 PART 3 — MEDIA VIDEO LIVE
========================================================== */

.matrix-media-live-surface {
  margin-bottom:16px;
  padding:17px;

  border:1px solid var(--border-strong);
  border-radius:var(--radius-md);

  background:
    linear-gradient(
      180deg,
      rgba(20,31,31,.98),
      rgba(8,15,15,.98)
    );
}

.media-live-header {
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:14px;
  margin-bottom:14px;
}

.media-live-header h2 {
  margin:0;
  font-size:20px;
}

.media-live-summary {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:8px;
  margin-bottom:10px;
}

.media-live-summary > div {
  display:flex;
  flex-direction:column;
  gap:4px;

  padding:10px;

  border:1px solid var(--border);
  border-radius:10px;

  background:rgba(255,255,255,.018);
}

.media-live-summary strong {
  color:var(--accent);
  font-size:17px;
}

.media-live-summary span {
  color:var(--muted);
  font-size:10px;
}

.matrix-live-stage {
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(190px,260px);
  gap:10px;
}

.matrix-live-stage-display {
  min-height:250px;

  display:flex;
  align-items:center;
  justify-content:center;

  padding:18px;

  border:1px solid var(--border);
  border-radius:12px;

  background:
    radial-gradient(
      circle at center,
      rgba(45,112,93,.12),
      transparent 60%
    ),
    #07100e;
}

.matrix-live-zero-state {
  max-width:420px;
  text-align:center;
}

.matrix-live-zero-state strong {
  display:block;
  margin-top:10px;
  font-size:15px;
}

.matrix-live-zero-state p {
  margin:8px 0 0;
  color:var(--muted);
  font-size:10px;
  line-height:1.6;
}

.matrix-live-badge {
  display:inline-flex;
  padding:5px 8px;

  border:1px solid var(--border-strong);
  border-radius:999px;

  color:var(--muted);
  font-size:9px;
  font-weight:800;
  letter-spacing:.1em;
}

.matrix-live-trust-panel {
  padding:12px;

  border:1px solid var(--border);
  border-radius:12px;

  background:rgba(255,255,255,.014);
}

.matrix-live-trust-row {
  display:flex;
  justify-content:space-between;
  gap:10px;

  padding:9px 0;

  border-bottom:1px solid var(--border);

  font-size:9px;
}

.matrix-live-trust-row:last-child {
  border-bottom:0;
}

.matrix-live-trust-row span {
  color:var(--muted);
}

.matrix-live-trust-row strong {
  color:var(--soft);
}

.matrix-media-list {
  margin-top:10px;
  padding:11px;

  border:1px solid var(--border);
  border-radius:10px;

  color:var(--muted);
  font-size:10px;
  line-height:1.55;
}

.matrix-media-card {
  display:grid;
  grid-template-columns:70px minmax(0,1fr);
  gap:10px;

  padding:10px 0;

  border-bottom:1px solid var(--border);
}

.matrix-media-card:last-child {
  border-bottom:0;
}

.matrix-media-card strong {
  display:block;
  margin-bottom:3px;
  color:var(--soft);
  font-size:11px;
}

.matrix-media-card span {
  color:var(--muted);
  font-size:9px;
}

.matrix-media-controls {
  display:flex;
  justify-content:flex-end;
  gap:8px;
  margin-top:10px;
}

@media (max-width:760px) {

  .matrix-live-stage {
    grid-template-columns:1fr;
  }

  .media-live-summary {
    grid-template-columns:1fr;
  }

  .media-live-header {
    flex-direction:column;
  }

  .matrix-media-controls {
    flex-direction:column;
  }

}


/* ==========================================================
   MATRIXALIGNER PHASE 3 PART 4 — JAHCORE SOCIAL
========================================================== */

.matrix-jahcore-social-intelligence {
  margin-bottom:16px;
  padding:17px;

  border:1px solid var(--border-strong);
  border-radius:var(--radius-md);

  background:
    linear-gradient(
      135deg,
      rgba(102,230,184,.055),
      rgba(9,19,17,.98)
    );
}

.jahcore-social-header {
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:14px;

  margin-bottom:14px;
}

.jahcore-social-header h2 {
  margin:0;
  font-size:20px;
}

.jahcore-social-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}

.jahcore-social-grid > div {
  display:flex;
  flex-direction:column;
  gap:5px;

  padding:11px;

  border:1px solid var(--border);
  border-radius:10px;

  background:rgba(255,255,255,.016);
}

.jahcore-social-grid strong {
  font-size:11px;
}

.jahcore-social-grid span {
  color:var(--muted);
  font-size:10px;
  line-height:1.5;
}

.jahcore-social-chat-foundation {
  margin-top:10px;

  border:1px solid var(--border);
  border-radius:11px;

  overflow:hidden;

  background:rgba(255,255,255,.012);
}

.jahcore-social-response {
  min-height:80px;

  padding:12px;

  color:var(--muted);
  font-size:10px;
  line-height:1.55;
}

.jahcore-social-composer {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:8px;

  padding:10px;

  border-top:1px solid var(--border);
}

.jahcore-social-composer textarea {
  width:100%;
  min-height:44px;

  resize:vertical;

  border:1px solid var(--border);
  border-radius:9px;

  padding:10px;

  background:#08120f;
  color:var(--text);
}

@media (max-width:650px) {

  .jahcore-social-grid {
    grid-template-columns:1fr;
  }

  .jahcore-social-header {
    flex-direction:column;
  }

  .jahcore-social-composer {
    grid-template-columns:1fr;
  }

}


/* ==========================================================
   MATRIXALIGNER PHASE 3 PART 5 — AIOS ECOSYSTEM
========================================================== */

.matrix-aios-ecosystem-surface {
  margin-bottom:16px;
  padding:17px;

  border:1px solid var(--border-strong);
  border-radius:var(--radius-md);

  background:
    linear-gradient(
      135deg,
      rgba(102,230,184,.045),
      rgba(8,18,16,.98)
    );
}

.ecosystem-header {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;

  margin-bottom:14px;
}

.ecosystem-header h2 {
  margin:0;
  font-size:20px;
}

.ecosystem-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}

.ecosystem-grid button {
  min-height:92px;

  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:5px;

  padding:12px;

  border:1px solid var(--border);
  border-radius:11px;

  background:rgba(255,255,255,.016);
  color:var(--text);

  text-align:left;
  cursor:pointer;
}

.ecosystem-grid button:hover,
.ecosystem-grid button:focus-visible {
  border-color:var(--border-strong);
  background:rgba(102,230,184,.045);
}

.ecosystem-grid strong {
  font-size:12px;
}

.ecosystem-grid span {
  color:var(--muted);
  font-size:10px;
  line-height:1.45;
}

.ecosystem-bridge-detail,
.ecosystem-principle {
  margin-top:10px;
  padding:11px;

  border:1px solid var(--border);
  border-radius:10px;

  background:rgba(255,255,255,.012);

  color:var(--muted);
  font-size:10px;
  line-height:1.55;
}

@media (max-width:650px) {

  .ecosystem-grid {
    grid-template-columns:1fr;
  }

  .ecosystem-header {
    flex-direction:column;
  }

}


/* ==========================================================
   MATRIXALIGNER PHASE 3 PART 6 — DISCOVERY
========================================================== */

.matrix-discovery-surface {
  margin-bottom:16px;
  padding:17px;

  border:1px solid var(--border-strong);
  border-radius:var(--radius-md);

  background:
    linear-gradient(
      180deg,
      rgba(18,33,31,.98),
      rgba(8,16,15,.98)
    );
}

.discovery-header {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:14px;
}

.discovery-header h2 {
  margin:0;
  font-size:20px;
}

.matrix-search-bar {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:8px;
}

.matrix-search-bar input {
  min-height:44px;

  border:1px solid var(--border);
  border-radius:10px;

  background:#08120f;
  color:var(--text);

  padding:0 12px;
}

.discovery-domains {
  display:flex;
  flex-wrap:wrap;
  gap:6px;

  margin-top:10px;
}

.discovery-domains span {
  padding:5px 7px;

  border:1px solid var(--border);
  border-radius:999px;

  background:rgba(255,255,255,.015);

  color:var(--muted);
  font-size:9px;
}

.discovery-layout {
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(200px,280px);
  gap:10px;

  margin-top:12px;
}

.discovery-layout > div,
.discovery-layout > aside {
  padding:11px;

  border:1px solid var(--border);
  border-radius:11px;

  background:rgba(255,255,255,.013);
}

.matrix-search-results,
.matrix-recommendation-list {
  color:var(--muted);
  font-size:10px;
  line-height:1.55;
}

.matrix-discovery-result,
.matrix-recommendation-item {
  padding:9px 0;
  border-bottom:1px solid var(--border);
}

.matrix-discovery-result:last-child,
.matrix-recommendation-item:last-child {
  border-bottom:0;
}

.matrix-discovery-result strong,
.matrix-recommendation-item strong {
  display:block;
  margin-bottom:3px;
  color:var(--soft);
  font-size:11px;
}

.matrix-discovery-result span,
.matrix-recommendation-item span {
  color:var(--muted);
  font-size:9px;
}

.discovery-summary {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:8px;

  margin-top:10px;
}

.discovery-summary > div {
  display:flex;
  flex-direction:column;
  gap:4px;

  padding:10px;

  border:1px solid var(--border);
  border-radius:10px;

  background:rgba(255,255,255,.018);
}

.discovery-summary strong {
  color:var(--accent);
  font-size:16px;
}

.discovery-summary span {
  color:var(--muted);
  font-size:10px;
}

.discovery-principle {
  margin-top:10px;
  padding:10px;

  border:1px solid var(--border);
  border-radius:10px;

  color:var(--muted);
  font-size:10px;
  line-height:1.55;

  background:rgba(255,255,255,.012);
}

@media (max-width:760px) {

  .discovery-layout {
    grid-template-columns:1fr;
  }

  .discovery-summary {
    grid-template-columns:1fr;
  }

  .discovery-header {
    flex-direction:column;
  }

  .matrix-search-bar {
    grid-template-columns:1fr;
  }

}


/* ==========================================================
   MATRIXALIGNER PHASE 3 PART 7 — SOCIAL ECOSYSTEM
========================================================== */

.matrix-social-ecosystem-hub {
  margin-bottom:16px;
  padding:17px;

  border:1px solid var(--border-strong);
  border-radius:var(--radius-md);

  background:
    linear-gradient(
      135deg,
      rgba(102,230,184,.055),
      rgba(8,18,16,.98)
    );
}

.social-hub-header {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:14px;
}

.social-hub-header h2 {
  margin:0;
  font-size:20px;
}

.social-hub-grid {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
}

.social-hub-grid button {
  min-height:86px;

  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:5px;

  padding:11px;

  border:1px solid var(--border);
  border-radius:11px;

  background:rgba(255,255,255,.016);
  color:var(--text);

  text-align:left;
  cursor:pointer;
}

.social-hub-grid button:hover,
.social-hub-grid button:focus-visible {
  border-color:var(--border-strong);
  background:rgba(102,230,184,.05);
}

.social-hub-grid strong {
  font-size:11px;
}

.social-hub-grid span {
  color:var(--muted);
  font-size:10px;
  line-height:1.4;
}

.social-hub-principle {
  margin-top:10px;
  padding:10px;

  border:1px solid var(--border);
  border-radius:10px;

  background:rgba(255,255,255,.012);

  color:var(--muted);
  font-size:10px;
  line-height:1.55;
}

@media (max-width:900px) {

  .social-hub-grid {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

}

@media (max-width:560px) {

  .social-hub-grid {
    grid-template-columns:1fr;
  }

  .social-hub-header {
    flex-direction:column;
  }

}

/* MATRIXALIGNER BANNER VISIBILITY FIX */
.matrix-social-banner {
  display: block !important;
  width: 100% !important;
  max-width: 1500px !important;
  margin: 20px auto !important;
  padding: 0 18px !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: relative !important;
  z-index: 5 !important;
}

.matrix-social-banner-image {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  visibility: visible !important;
  opacity: 1 !important;
}


/* ==========================================================
   MATRIXALIGNER PHASE 4 PART 1 — SECURITY PRIVACY
========================================================== */

.matrix-security-privacy-surface {
  margin-bottom:16px;
  padding:17px;

  border:1px solid var(--border-strong);
  border-radius:var(--radius-md);

  background:
    linear-gradient(
      135deg,
      rgba(102,230,184,.045),
      rgba(8,17,16,.98)
    );
}

.security-privacy-header {
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:14px;

  margin-bottom:14px;
}

.security-privacy-header h2 {
  margin:0;
  font-size:20px;
}

.security-privacy-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}

.security-privacy-grid > div {
  display:flex;
  flex-direction:column;
  gap:5px;

  padding:11px;

  border:1px solid var(--border);
  border-radius:10px;

  background:rgba(255,255,255,.016);
}

.security-privacy-grid strong {
  font-size:11px;
}

.security-privacy-grid span {
  color:var(--muted);
  font-size:10px;
  line-height:1.5;
}

.security-summary {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:8px;

  margin-top:10px;
}

.security-summary > div {
  display:flex;
  flex-direction:column;
  gap:4px;

  padding:10px;

  border:1px solid var(--border);
  border-radius:10px;

  background:rgba(255,255,255,.018);
}

.security-summary strong {
  color:var(--accent);
  font-size:16px;
}

.security-summary span {
  color:var(--muted);
  font-size:10px;
}

.security-actions-foundation {
  display:flex;
  justify-content:flex-end;
  gap:8px;

  margin-top:10px;
}

.security-principle {
  margin-top:10px;
  padding:10px;

  border:1px solid var(--border);
  border-radius:10px;

  background:rgba(255,255,255,.012);

  color:var(--muted);
  font-size:10px;
  line-height:1.55;
}

@media (max-width:650px) {

  .security-privacy-grid,
  .security-summary {
    grid-template-columns:1fr;
  }

  .security-privacy-header {
    flex-direction:column;
  }

  .security-actions-foundation {
    flex-direction:column;
  }

}


/* ==========================================================
   MATRIXALIGNER PHASE 4 PART 2 — SECURITY EVIDENCE
========================================================== */

.matrix-security-evidence-panel {
  margin-top:10px;
  padding:11px;

  border:1px solid var(--border);
  border-radius:10px;

  background:rgba(255,255,255,.014);
}

.security-evidence-row {
  display:flex;
  justify-content:space-between;
  gap:12px;

  padding:8px 0;

  border-bottom:1px solid var(--border);

  font-size:10px;
}

.security-evidence-row:last-child {
  border-bottom:0;
}

.security-evidence-row span {
  color:var(--muted);
}

.security-evidence-row strong {
  color:var(--soft);
  text-align:right;
}


/* ==========================================================
   MATRIXALIGNER PHASE 4 PART 3 — COMPLIANCE
========================================================== */

.matrix-compliance-surface {
  margin-bottom:16px;
  padding:17px;

  border:1px solid var(--border-strong);
  border-radius:var(--radius-md);

  background:
    linear-gradient(
      135deg,
      rgba(102,230,184,.04),
      rgba(8,17,16,.98)
    );
}

.compliance-header {
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:14px;

  margin-bottom:14px;
}

.compliance-header h2 {
  margin:0;
  font-size:20px;
}

.compliance-framework-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}

.compliance-framework-grid > div {
  display:flex;
  flex-direction:column;
  gap:5px;

  padding:11px;

  border:1px solid var(--border);
  border-radius:10px;

  background:rgba(255,255,255,.016);
}

.compliance-framework-grid strong {
  font-size:11px;
}

.compliance-framework-grid span {
  color:var(--muted);
  font-size:10px;
  line-height:1.45;
}

.compliance-summary {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:8px;

  margin-top:10px;
}

.compliance-summary > div {
  display:flex;
  flex-direction:column;
  gap:4px;

  padding:10px;

  border:1px solid var(--border);
  border-radius:10px;

  background:rgba(255,255,255,.018);
}

.compliance-summary strong {
  color:var(--accent);
  font-size:16px;
}

.compliance-summary span {
  color:var(--muted);
  font-size:10px;
}

.matrix-compliance-status-list,
.compliance-principle {
  margin-top:10px;
  padding:10px;

  border:1px solid var(--border);
  border-radius:10px;

  background:rgba(255,255,255,.012);

  color:var(--muted);
  font-size:10px;
  line-height:1.55;
}

@media (max-width:650px) {

  .compliance-framework-grid,
  .compliance-summary {
    grid-template-columns:1fr;
  }

  .compliance-header {
    flex-direction:column;
  }

}


/* ==========================================================
   MATRIXALIGNER PHASE 4 PART 5 — RUNTIME CERTIFICATION
========================================================== */

.matrix-runtime-certification-panel {
  margin-top:10px;
  padding:11px;

  border:1px solid var(--border);
  border-radius:10px;

  background:rgba(255,255,255,.014);
}

.runtime-certification-row {
  display:flex;
  justify-content:space-between;
  gap:12px;

  padding:8px 0;

  border-bottom:1px solid var(--border);

  font-size:10px;
}

.runtime-certification-row:last-child {
  border-bottom:0;
}

.runtime-certification-row span {
  color:var(--muted);
}

.runtime-certification-row strong {
  color:var(--soft);
  text-align:right;
}


/* ==========================================================
   MATRIXALIGNER PHASE 4 PART 6 — PRODUCTION READINESS
========================================================== */

.matrix-production-readiness-panel {
  margin-top:10px;
  padding:11px;

  border:1px solid var(--border);
  border-radius:10px;

  background:rgba(255,255,255,.014);
}

.production-readiness-row {
  display:flex;
  justify-content:space-between;
  gap:12px;

  padding:8px 0;

  border-bottom:1px solid var(--border);

  font-size:10px;
}

.production-readiness-row:last-child {
  border-bottom:0;
}

.production-readiness-row span {
  color:var(--muted);
}

.production-readiness-row strong {
  color:var(--soft);
  text-align:right;
}


/* ==========================================================
   MATRIXALIGNER PHASE 4 PART 7 — FINAL LAUNCH READINESS
========================================================== */

.matrix-final-launch-readiness {
  margin-bottom:16px;
  padding:17px;

  border:1px solid var(--border-strong);
  border-radius:var(--radius-md);

  background:
    linear-gradient(
      135deg,
      rgba(102,230,184,.07),
      rgba(8,17,16,.98)
    );
}

.final-readiness-header {
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:14px;

  margin-bottom:14px;
}

.final-readiness-header h2 {
  margin:0;
  font-size:20px;
}

.final-readiness-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}

.final-readiness-grid > div {
  display:flex;
  flex-direction:column;
  gap:5px;

  padding:11px;

  border:1px solid var(--border);
  border-radius:10px;

  background:rgba(255,255,255,.018);
}

.final-readiness-grid strong {
  font-size:11px;
}

.final-readiness-grid span {
  color:var(--muted);
  font-size:10px;
  line-height:1.45;
}

.final-readiness-principle {
  margin-top:10px;
  padding:10px;

  border:1px solid var(--border);
  border-radius:10px;

  background:rgba(255,255,255,.012);

  color:var(--muted);
  font-size:10px;
  line-height:1.55;
}

@media (max-width:650px) {

  .final-readiness-grid {
    grid-template-columns:1fr;
  }

  .final-readiness-header {
    flex-direction:column;
  }

}


/* ==========================================================
   MATRIXALIGNER V2 PHASE 1 PART 7 — IDENTITY GATEWAY
========================================================== */

.matrix-identity-gateway-runtime {
  margin:12px 0 16px;
  padding:14px;

  border:1px solid var(--border-strong);
  border-radius:12px;

  background:
    linear-gradient(
      135deg,
      rgba(102,230,184,.06),
      rgba(255,255,255,.012)
    );
}

.identity-gateway-heading {
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;

  margin-bottom:12px;
}

.identity-gateway-heading h3 {
  margin:2px 0 0;
  font-size:17px;
}

.matrix-gateway-state-panel {
  padding:12px;

  border:1px solid var(--border);
  border-radius:10px;

  background:rgba(255,255,255,.014);
}

.matrix-gateway-state-panel p {
  color:var(--muted);
  font-size:11px;
  line-height:1.55;
}

.matrix-gateway-profile-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}

.matrix-gateway-profile-grid > div {
  display:flex;
  flex-direction:column;
  gap:5px;

  padding:10px;

  border:1px solid var(--border);
  border-radius:9px;

  background:rgba(255,255,255,.015);
}

.matrix-gateway-profile-grid span {
  color:var(--muted);
  font-size:9px;
  text-transform:uppercase;
  letter-spacing:.08em;
}

.matrix-gateway-profile-grid strong {
  font-size:11px;
  overflow-wrap:anywhere;
}

@media (max-width:650px) {

  .identity-gateway-heading {
    flex-direction:column;
  }

  .matrix-gateway-profile-grid {
    grid-template-columns:1fr;
  }

}


/* MATRIXALIGNER EXTERNAL MEDIA PORTAL LINKS */
.matrix-primary-nav .matrix-portal-link {
  text-decoration: none;
}
