/* Office of Stoneypoint-Payne — Design Standards Doctrine (Institutional Axis Implementation) */

:root {
  --archive-white: #f5f2ec;
  --midnight-navy: #0c1b33;
  --aged-gold: #9a7b3a;
  --ashwood-stone: #5c5448;
  --page-gutter: clamp(1.5rem, 5vw, 5.5rem);
  --content-max: min(92rem, 100%);
  --rule-subtle: rgba(12, 27, 51, 0.15);
  --rule-mid: rgba(12, 27, 51, 0.3);
}

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

html {
  background-color: var(--archive-white);
  color: var(--midnight-navy);
}

body {
  margin: 0;
  background-color: var(--archive-white);
  color: var(--midnight-navy);
  font-family: "EB Garamond", Garamond, "Times New Roman", serif;
  font-size: 1.125rem;
  line-height: 1.65;
  min-height: 100vh;
}

img { max-width: 100%; height: auto; }

/* --- PAGE STRUCTURE --- */
.void {
  height: clamp(1.25rem, 3vw, 2.25rem);
  min-height: 20px; width: 100%;
}

.sheet {
  width: 100%;
  padding: 0 var(--page-gutter) calc(6rem + env(safe-area-inset-bottom, 0px));
}

/* 
   THE GRID AXIS: 
   Identity, Nav, Rules, Main, and Footer all share the exact same 
   max-width and auto-margins to lock their left edges perfectly.
*/
.identity, .nav, .rule-gold, .sheet main, .doc-footer {
  width: 100%;
  max-width: var(--content-max);
  margin-left: auto;
  margin-right: auto;
}

/* --- BRANDING & NAV --- */
.identity { 
  text-align: left; 
  margin-bottom: 32px; 
}

.identity-logotype { margin: 0; padding: 0; }

.logotype-img {
  display: block; 
  margin: 0; /* Left aligned, zeroed out auto-margins */
  width: 100%;
  max-width: min(600px, 85vw); /* Scaled up for stronger desktop presence */
}

.nav {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 0.65rem; 
  font-weight: 500; 
  letter-spacing: 0.12em;
  text-transform: uppercase; 
  display: flex; flex-wrap: wrap;
  justify-content: flex-start; /* Shifted from center to left */
  gap: 24px clamp(1.5rem, 4vw, 3rem);
  margin-bottom: 32px; 
  padding-bottom: 4px;
}

.nav a {
  color: var(--midnight-navy); 
  text-decoration: none;
  border-bottom: 1px solid transparent; 
  padding-bottom: 6px;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.nav a:hover { opacity: 1; }
.nav a.active { 
  opacity: 1;
  border-bottom-color: var(--aged-gold); 
}

.rule-gold {
  border: none; border-top: 1px solid var(--aged-gold);
  margin-bottom: 56px; 
}

/* --- TYPOGRAPHY HIERARCHY --- */
h1, h2, h3 {
  font-family: "EB Garamond", Garamond, "Times New Roman", serif;
  font-weight: 500; 
  color: var(--midnight-navy);
  margin: 0;
}

/* Primary Layer: Dominant, large, tight tracking */
h1 { 
  font-size: 2.25rem; 
  letter-spacing: 0.05em; 
  text-transform: uppercase;
  margin-bottom: 0.25rem; 
}

/* Secondary Layer: Section breaks, generous breathing room */
h2 { 
  font-size: 1.15rem; 
  letter-spacing: 0.1em; 
  text-transform: uppercase;
  margin: 3.5rem 0 1.25rem; 
}

/* Tertiary Layer: Labels, quiet, wide tracking */
.label-technical {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 0.65rem; 
  letter-spacing: 0.15em;
  text-transform: uppercase; 
  color: var(--midnight-navy);
  opacity: 0.6;
  margin: 0 0 2rem; 
  display: block;
}

/* Body Text */
p { margin: 0 0 1.25em; text-align: left; }

.narrative p {
  max-width: 48rem; /* Creates comfortable, document-like reading lines */
  opacity: 0.85; /* Softens black text slightly for reading comfort */
}

.text-block { margin-bottom: 3rem; }

/* --- DOCUMENT INSET (narrative quote / summary blocks) --- */
.doc-inset {
  border-left: 2px solid var(--aged-gold);
  padding: 0.25rem 0 0.25rem 2.5rem;
  margin: 2rem 0 3.5rem;
  max-width: 52rem;
}

/* --- LIST TREATMENT (institutional em-dash style) --- */
.narrative ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25em;
  max-width: 48rem;
}

.narrative ul li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 0.65em;
  opacity: 0.85;
}

.narrative ul li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--aged-gold);
  font-style: normal;
}

/* --- MODULAR COMPONENTS --- */
.doc-masthead {
  border-top: 1px solid rgba(12, 27, 51, 0.2);
  border-bottom: 1px solid rgba(12, 27, 51, 0.2);
  padding: 16px 0; 
  margin-bottom: 3rem;
  max-width: 48rem;
}

.doc-masthead-meta {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 0.6rem; 
  letter-spacing: 0.15em; 
  text-transform: uppercase;
  color: var(--midnight-navy); 
  opacity: 0.5;
  display: flex; flex-wrap: wrap;
  justify-content: space-between; gap: 8px 16px;
}

/* --- DATA & LEDGERS --- */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 0 4rem;
}

.technical-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  margin: 1.5rem 0 0;
}

/* --- LEDGER FOOTNOTES & LEGAL DISCLOSURES --- */
.ledger-footnotes {
  margin-top: 4rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--aged-gold);
  max-width: 56rem;
}

.footnote-list {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: footnote;
}

.footnote-list li {
  counter-increment: footnote;
  display: grid;
  grid-template-columns: 1.5rem 1fr;
  gap: 0 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule-subtle);
  font-family: "EB Garamond", Garamond, "Times New Roman", serif;
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--midnight-navy);
  opacity: 0.85;
}

.footnote-list li::before {
  content: counter(footnote);
  font-family: "EB Garamond", Garamond, serif;
  font-size: 0.95rem;
  color: var(--aged-gold);
  padding-top: 0.05em;
  opacity: 0.9;
}

.ledger-legal {
  margin-top: 4rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--rule-mid);
  max-width: 56rem;
}

.legal-item {
  padding: 2rem 0;
  border-bottom: 1px solid var(--rule-subtle);
}

.legal-item:last-child {
  border-bottom: none;
}

.legal-item-heading {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--midnight-navy);
  opacity: 0.6;
  margin: 0 0 0.85rem !important;
}

.legal-item p {
  font-family: "EB Garamond", Garamond, "Times New Roman", serif;
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--midnight-navy);
  opacity: 0.85;
  margin: 0 0 1.25em;
}

.legal-item p:last-child {
  margin: 0;
}

/* Stripped vertical grids, clean horizontal ledger lines */
.technical-table th, .technical-table td {
  padding: 14px 16px; 
  text-align: left;
  border-bottom: 1px solid rgba(12, 27, 51, 0.15);
}

.technical-table th {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--midnight-navy);
  opacity: 0.7;
  vertical-align: bottom;
  border-bottom: 1px solid rgba(12, 27, 51, 0.5); /* Stronger baseline for headers */
}

.technical-table td {
  font-size: 0.85rem;
  line-height: 1.5;
  vertical-align: top;
}

/* Definition Lists (Disclosures) */
.disclosure-pairs dl {
  margin: 0 0 4rem; 
  display: grid; 
  grid-template-columns: 14rem 1fr;
  border-top: 1px solid rgba(12, 27, 51, 0.2);
}

.disclosure-pairs dt, .disclosure-pairs dd {
  margin: 0; 
  padding: 16px 14px; 
  border-bottom: 1px solid rgba(12, 27, 51, 0.15);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.disclosure-pairs dt {
  color: var(--midnight-navy); 
  opacity: 0.6;
  text-transform: uppercase;
  font-size: 0.65rem; 
  letter-spacing: 0.1em;
}

.disclosure-pairs dd {
  font-size: 0.9rem;
  opacity: 0.9;
}

.spec-lattice {
  margin: 2rem 0 4rem; 
  border-top: 1px solid rgba(12, 27, 51, 0.2);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.spec-row {
  display: grid; 
  grid-template-columns: 14rem 1fr;
  border-bottom: 1px solid rgba(12, 27, 51, 0.15);
}

.spec-lattice dt, .spec-lattice dd { margin: 0; padding: 16px 14px; }
.spec-lattice dt {
  color: var(--midnight-navy); 
  opacity: 0.6;
  text-transform: uppercase; 
  font-size: 0.65rem; 
  letter-spacing: 0.1em;
}
.spec-lattice dd { font-size: 0.9rem; line-height: 1.5; opacity: 0.9; }

/* --- PUBLICATIONS & DIRECTIVES --- */
.pub-record {
  margin-bottom: 3rem;
  max-width: 52rem;
}

.pub-record-header {
  display: flex; flex-wrap: wrap; justify-content: space-between;
  align-items: baseline; gap: 12px; margin-bottom: 12px;
}

.pub-record-header h2 { 
  margin: 0; 
  flex: 1 1 12rem; 
  font-size: 1.1rem;
}

.pub-ref {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 0.6rem; 
  letter-spacing: 0.15em; 
  color: var(--midnight-navy);
  opacity: 0.5;
}

/* --- LEGAL & TERTIARY --- */
.disclaimer-inset {
  border: 1px solid rgba(92, 84, 72, 0.25); 
  padding: 24px 32px; 
  margin: 48px 0;
  max-width: 48rem;
}

.disclaimer-inset p { opacity: 0.7; }

.index-closure {
  margin-top: 4rem; 
  padding-top: 32px;
  border-top: 1px solid rgba(12, 27, 51, 0.2);
  max-width: 48rem;
}

.index-closure-note {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 0.65rem; 
  letter-spacing: 0.12em; 
  text-transform: uppercase;
  color: var(--midnight-navy); 
  opacity: 0.5;
  margin: 0;
}

/* --- FOOTER --- */
.doc-footer {
  margin-top: 80px; 
  padding-top: 24px; 
  border-top: 1px solid rgba(12, 27, 51, 0.3);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 0.55rem; 
  letter-spacing: 0.15em; 
  text-transform: uppercase;
  color: var(--midnight-navy); 
  display: flex; 
  justify-content: space-between;
  gap: 2rem;
}

.doc-footer-meta { opacity: 0.4; }

.doc-footer a {
  color: var(--midnight-navy); 
  opacity: 0.4;
  text-decoration: none; 
  transition: opacity 0.2s ease;
}

.doc-footer a:hover { opacity: 0.8; }

/* --- MOBILE GATE --- */
.mobile-gate {
  display: none;
}

/* Responsive adjustments */
@media (max-width: 767px) {

  /* Activate full-screen access gate */
  .mobile-gate {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background-color: var(--archive-white);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 3rem 2.5rem;
    text-align: left;
  }

  .mobile-gate-mark {
    width: min(88px, 22vw);
    height: auto;
    opacity: 0.90;
    margin-bottom: 2.5rem;
  }

  .mobile-gate-divider {
    width: 28px;
    height: 1px;
    background: var(--aged-gold);
    opacity: 0.75;
    margin-bottom: 2.5rem;
    flex-shrink: 0;
  }

  .mobile-gate-heading {
    font-family: "EB Garamond", Garamond, "Times New Roman", serif;
    font-size: 1.2rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--midnight-navy);
    margin: 0 0 1.25rem;
    opacity: 0.88;
  }

  .mobile-gate-body {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 0.6rem;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--midnight-navy);
    opacity: 0.45;
    line-height: 2.1;
    max-width: 22rem;
    margin: 0 0 3rem;
  }

  .mobile-gate-email {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 0.58rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--aged-gold);
    opacity: 0.75;
    text-decoration: none;
    transition: opacity 0.2s ease;
  }

  .mobile-gate-email:hover { opacity: 1; }
}

/* Tablet responsive adjustments (768px–1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
  .disclosure-pairs dl, .spec-row { grid-template-columns: 10rem 1fr; }
  h1 { font-size: 2rem; }
  .technical-table th, .technical-table td { padding: 10px 12px; }
}

/* Narrow desktop / large tablet adjustments */
@media (max-width: 767px) {
  .disclosure-pairs dl, .spec-row { grid-template-columns: 1fr; }
  .disclosure-pairs dt, .spec-lattice dt { padding-bottom: 4px; border-bottom: none; }
  .disclosure-pairs dd, .spec-lattice dd { padding-top: 0; }
  h1 { font-size: 1.75rem; }
  .doc-footer { flex-direction: column; gap: 0.5rem; }
}