/* TT-OS MASTER SHELL v003 */
/* One navigation source. No page-level nav drift. */

:root {
  --ttos-bg-deep: #171b14;
  --ttos-bg-green: #2e5a44;
  --ttos-surface: #234533;
  --ttos-surface-2: #2f6048;
  --ttos-lime: #a3e635;
  --ttos-white: #ffffff;
  --ttos-muted: rgba(255,255,255,0.84);
  --ttos-border: rgba(255,255,255,0.12);
  --ttos-max: 800px;
  --ttos-nav-max: 1180px;
}

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

body {
  background: linear-gradient(180deg, var(--ttos-bg-deep), var(--ttos-bg-green)) !important;
  color: var(--ttos-white) !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
  line-height: 1.65 !important;
  padding: 0 1rem !important;
  overflow-x: hidden !important;
}

body.ttos-master-nav-mounted {
  padding-top: 0 !important;
}

.container,
main,
.content,
.page-shell,
.main-content {
  max-width: var(--ttos-max) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.container,
.content,
.page-shell,
.main-content {
  padding-top: 4rem !important;
  padding-bottom: 4rem !important;
}

h1,
h2,
h3,
h4 {
  color: var(--ttos-white) !important;
  line-height: 1.22 !important;
}

h1 {
  font-family: Georgia, "Times New Roman", serif !important;
  font-size: clamp(2.6rem, 7vw, 5.6rem) !important;
  letter-spacing: -0.045em !important;
  margin-top: 0 !important;
  margin-bottom: 1.5rem !important;
}

h2 {
  font-size: 1.8rem !important;
  margin-top: 2.5rem !important;
  margin-bottom: 1rem !important;
  border-bottom: 1px solid var(--ttos-border) !important;
  padding-bottom: 0.5rem !important;
}

h3 {
  color: var(--ttos-lime) !important;
  margin-bottom: 0.5rem !important;
}

p,
li,
td,
th {
  color: var(--ttos-muted) !important;
}

p,
ul,
ol,
table {
  margin-top: 0 !important;
  margin-bottom: 1.5rem !important;
}

a {
  color: var(--ttos-lime);
}

.ttos-card,
.card,
.doc-card,
.metric-box,
.project-card,
.platform-card,
.arch-card,
.econ-card,
.library-card,
.regional-card,
.layer-card,
.framework-card,
.logic-node,
.anchor-card,
.theme-box,
.data-node-card,
article {
  background: var(--ttos-surface) !important;
  color: var(--ttos-white) !important;
  border: 1px solid var(--ttos-border) !important;
  border-left: 4px solid var(--ttos-lime) !important;
  border-radius: 16px !important;
  padding: 1.5rem !important;
  margin-bottom: 1.5rem !important;
  box-shadow: none !important;
}

.metric-box {
  text-align: center !important;
  border-left: 1px solid var(--ttos-border) !important;
  border-top: 3px solid var(--ttos-lime) !important;
}

.metric-num {
  display: block !important;
  color: var(--ttos-lime) !important;
  font-size: 2rem !important;
  font-weight: 800 !important;
}

.metric-lbl {
  color: var(--ttos-white) !important;
  font-size: 0.85rem !important;
}

.metrics-grid,
.dashboard-grid,
.theme-grid,
.logic-grid,
.telemetry-grid,
.grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)) !important;
  gap: 1.5rem !important;
}

.boundary-box,
.notice,
.evidence-box,
.callout,
pre,
code,
blockquote {
  background: rgba(0,0,0,0.24) !important;
  color: var(--ttos-muted) !important;
  border: 1px solid var(--ttos-border) !important;
  border-left: 4px solid var(--ttos-lime) !important;
  border-radius: 16px !important;
  padding: 1.5rem !important;
  white-space: pre-wrap !important;
  overflow-x: auto !important;
}

[style*="background:#fff"],
[style*="background: #fff"],
[style*="background-color:#fff"],
[style*="background-color: #fff"],
[style*="background:white"],
[style*="background: white"],
[style*="background-color:white"],
[style*="background-color: white"],
[style*="#ffffff"],
[style*="#FFFFFF"],
[style*="#FCFCFA"],
[style*="#fcfcfa"],
[style*="#F4EAD5"],
[style*="#f4ead5"],
.white,
.bg-white,
.cream,
.bg-cream {
  background: var(--ttos-surface) !important;
  background-color: var(--ttos-surface) !important;
  color: var(--ttos-white) !important;
}

/* Master navigation */
.ttos-master-header {
  background: var(--ttos-surface) !important;
  border-bottom: 1px solid var(--ttos-border) !important;
  margin: 0 calc(1rem * -1) !important;
  padding: 0 1rem !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 99999 !important;
}

.ttos-master-header-inner {
  max-width: var(--ttos-nav-max) !important;
  margin: 0 auto !important;
  padding: 0.42rem 0 0.35rem !important;
}

.ttos-master-brand-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 1rem !important;
  min-width: 0 !important;
}

.ttos-master-brand {
  color: var(--ttos-lime) !important;
  text-decoration: none !important;
  font-weight: 850 !important;
  letter-spacing: 0.04em !important;
  font-size: 0.78rem !important;
  white-space: nowrap !important;
  flex: 0 0 auto !important;
}

.ttos-master-engine {
  color: var(--ttos-lime) !important;
  font-size: 0.72rem !important;
  white-space: nowrap !important;
  flex: 0 0 auto !important;
}

.ttos-master-nav-scroll {
  width: 100% !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  white-space: nowrap !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: none !important;
  padding: 0.75rem 0 0.38rem !important;
}

.ttos-master-nav-scroll::-webkit-scrollbar {
  display: none !important;
}

.ttos-master-nav {
  display: inline-flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 0.82rem !important;
  white-space: nowrap !important;
  min-width: max-content !important;
}

.ttos-master-nav a {
  color: var(--ttos-white) !important;
  text-decoration: none !important;
  font-size: 0.72rem !important;
  font-weight: 760 !important;
  line-height: 1 !important;
  flex: 0 0 auto !important;
  display: inline-block !important;
  padding-bottom: 3px !important;
  border-bottom: 2px solid transparent !important;
}

.ttos-master-nav a:hover,
.ttos-master-nav a.ttos-active {
  color: var(--ttos-lime) !important;
  border-bottom-color: var(--ttos-lime) !important;
}

.ttos-master-footer {
  background: rgba(0,0,0,0.22) !important;
  border-top: 1px solid var(--ttos-border) !important;
  margin: 4rem calc(1rem * -1) 0 !important;
  padding: 3rem 1rem !important;
}

.ttos-master-footer-inner {
  max-width: var(--ttos-max) !important;
  margin: 0 auto !important;
  color: rgba(255,255,255,0.64) !important;
  font-size: 0.85rem !important;
}

.ttos-master-footer-boundary {
  padding-bottom: 1.5rem !important;
  margin-bottom: 1.5rem !important;
  border-bottom: 1px solid rgba(255,255,255,0.08) !important;
}

.ttos-master-footer-meta {
  display: flex !important;
  justify-content: space-between !important;
  gap: 1rem !important;
  flex-wrap: wrap !important;
  color: rgba(255,255,255,0.52) !important;
}

@media (max-width: 760px) {
  .ttos-master-header {
    position: static !important;
  }

  .ttos-master-engine {
    display: none !important;
  }

  .ttos-master-nav {
    gap: 0.72rem !important;
  }

  .ttos-master-nav a {
    font-size: 0.7rem !important;
  }

  h1 {
    font-size: clamp(2.4rem, 13vw, 3.5rem) !important;
  }
}
