/* ================================================================
   IntrinsicIQ editorial pages
   Shared by About, Insights, and Disclaimer.

   The editorial system borrows the valuation workspace's hierarchy:
   one continuous ground, fine rules, restrained gold, and explicit
   structure. It deliberately avoids decorative shadows and effects.
   Depends on tokens.css, base.css, pages.css, and public-shell.css.
   ================================================================ */

.editorial-page {
  background: var(--bg);
}

.editorial-main {
  min-height: 70vh;
  border-bottom: 1px solid var(--border-zinc);
}

.editorial-wrap {
  width: min(calc(100% - 48px), var(--max-w));
  margin-inline: auto;
}

.editorial-masthead {
  position: relative;
  padding: clamp(72px, 10vw, 124px) 0 clamp(56px, 8vw, 92px);
}

.editorial-masthead::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--gold-dim), var(--border-zinc) 28%, var(--border-zinc));
}

.editorial-eyebrow,
.editorial-section-label,
.editorial-card-kicker,
.editorial-meta,
.legal-toc-title,
.legal-section-number,
.insights-status-label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .16em;
  line-height: 1.45;
  text-transform: uppercase;
}

.editorial-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--gold-dim);
}

.editorial-eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--gilt);
}

.editorial-title {
  max-width: 900px;
  margin-top: 20px;
  font-family: var(--display);
  font-size: clamp(46px, 7vw, 78px);
  font-weight: 600;
  letter-spacing: -.025em;
  line-height: .98;
  text-wrap: balance;
}

.editorial-title .gilt,
.editorial-heading .gilt {
  background: var(--gilt);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.editorial-lead {
  max-width: 780px;
  margin-top: 26px;
  color: var(--text-muted);
  font-size: clamp(15px, 1.6vw, 17px);
  line-height: 1.78;
}

.editorial-meta {
  margin-top: 28px;
  color: var(--text-dim);
  letter-spacing: .08em;
}

.editorial-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 44px;
  border-top: 1px solid var(--border-zinc);
  border-bottom: 1px solid var(--border-zinc);
}

.editorial-fact {
  min-width: 0;
  padding: 18px 20px 20px 0;
}

.editorial-fact + .editorial-fact {
  padding-left: 20px;
  border-left: 1px solid var(--border-zinc);
}

.editorial-fact dt {
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .13em;
  line-height: 1.4;
  text-transform: uppercase;
}

.editorial-fact dd {
  margin-top: 7px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

.editorial-sections {
  border-bottom: 1px solid var(--border-zinc);
}

.editorial-section {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: clamp(32px, 6vw, 84px);
  padding: clamp(52px, 7vw, 82px) 0;
  border-top: 1px solid var(--border-zinc);
}

.editorial-sections > .editorial-section:first-child {
  border-top: 0;
}

.editorial-section-label {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding-top: 9px;
  color: var(--text-dim);
  letter-spacing: .1em;
}

.editorial-section-label .section-index {
  color: var(--gold-dim);
}

.editorial-section-content {
  min-width: 0;
  max-width: 800px;
}

.editorial-heading {
  max-width: 690px;
  margin-bottom: 24px;
  font-family: var(--display);
  font-size: clamp(30px, 4vw, 43px);
  font-weight: 600;
  letter-spacing: -.015em;
  line-height: 1.06;
  text-wrap: balance;
}

.editorial-subheading {
  margin: 30px 0 10px;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
}

.editorial-copy {
  max-width: 760px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.82;
}

.editorial-copy + .editorial-copy {
  margin-top: 14px;
}

.editorial-copy strong,
.editorial-list strong,
.legal-section strong {
  color: var(--text);
  font-weight: 600;
}

.editorial-copy a,
.contact-list a,
.editorial-link {
  color: var(--gold);
  text-decoration-color: var(--gold-line);
  text-underline-offset: 3px;
}

.editorial-copy a:hover,
.contact-list a:hover,
.editorial-link:hover {
  text-decoration-color: currentColor;
}

.editorial-list,
.legal-list {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
}

.editorial-list li,
.legal-list li {
  position: relative;
  padding-left: 22px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.75;
}

.editorial-list li + li,
.legal-list li + li {
  margin-top: 10px;
}

.editorial-list li::before,
.legal-list li::before {
  content: "";
  position: absolute;
  top: .78em;
  left: 2px;
  width: 8px;
  height: 1px;
  background: var(--gold-dim);
}

.editorial-card-grid,
.principle-grid,
.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 30px;
  padding: 1px;
  background: var(--border-zinc);
  list-style: none;
}

.editorial-card,
.principle-card,
.roadmap-card {
  min-width: 0;
  background: var(--bg);
}

.editorial-card {
  padding: 25px;
}

.editorial-card-kicker {
  margin-bottom: 13px;
  color: var(--gold-dim);
  letter-spacing: .11em;
}

.editorial-card h3,
.principle-card h3,
.roadmap-card :is(h2, h3) {
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.42;
}

.editorial-card p,
.principle-card p,
.roadmap-card p {
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.72;
}

.editorial-card .editorial-card-kicker {
  margin-top: 0;
  margin-bottom: 13px;
  color: var(--gold-dim);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.45;
}

.principle-grid {
  counter-reset: principle;
}

.principle-card {
  counter-increment: principle;
  padding: 26px;
}

.principle-card::before {
  content: "0" counter(principle);
  display: block;
  margin-bottom: 22px;
  color: var(--gold-dim);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .12em;
}

.editorial-callout {
  margin-top: 28px;
  padding: 22px 24px;
  border: 1px solid var(--border-zinc);
  border-left: 2px solid var(--red);
  background: var(--surface);
}

.editorial-callout .editorial-callout-title {
  margin-bottom: 8px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .12em;
  line-height: 1.4;
  text-transform: uppercase;
}

.editorial-callout p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.75;
}

.architecture-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 30px;
  border-top: 1px solid var(--border-zinc);
}

.architecture-item {
  padding: 22px 24px 22px 0;
  border-bottom: 1px solid var(--border-zinc);
}

.architecture-item:nth-child(even) {
  padding-right: 0;
  padding-left: 24px;
  border-left: 1px solid var(--border-zinc);
}

.architecture-item h3 {
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
}

.architecture-item p {
  margin-top: 7px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.7;
}

.stack-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.stack-list li {
  padding: 6px 9px;
  border: 1px solid var(--border-zinc);
  border-radius: var(--r-ctl);
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1;
}

.discipline-table-wrap {
  margin-top: 26px;
  overflow-x: auto;
  border-top: 1px solid var(--border-zinc);
}

.discipline-table {
  width: 100%;
  border-collapse: collapse;
}

.discipline-table :is(th, td) {
  padding: 17px 14px;
  border-bottom: 1px solid var(--border-zinc);
  font-size: 14px;
  line-height: 1.65;
  text-align: left;
  vertical-align: top;
}

.discipline-table th {
  width: 215px;
  padding-left: 0;
  color: var(--text);
  font-weight: 600;
}

.discipline-table td {
  padding-right: 0;
  color: var(--text-muted);
}

.contact-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 26px;
  padding: 1px;
  background: var(--border-zinc);
  list-style: none;
}

.contact-list li {
  padding: 22px;
  background: var(--bg);
}

.contact-list span {
  display: block;
  margin-bottom: 7px;
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.contact-list a {
  font-size: 14px;
}

/* Insights ------------------------------------------------------- */

.insights-status {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 18px;
  max-width: 780px;
  margin-top: 38px;
  padding: 18px 0;
  border-top: 1px solid var(--border-zinc);
  border-bottom: 1px solid var(--border-zinc);
}

.insights-status-label {
  color: var(--gold-dim);
  letter-spacing: .1em;
}

.insights-status p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.65;
}

.roadmap-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 400px);
  align-items: end;
  gap: 48px;
  padding: clamp(56px, 8vw, 88px) 0 34px;
}

.roadmap-intro .editorial-heading {
  margin-bottom: 0;
}

.roadmap-intro .editorial-copy {
  max-width: 400px;
}

.roadmap-grid {
  margin: 0 0 clamp(64px, 9vw, 104px);
}

.roadmap-card {
  padding: clamp(24px, 4vw, 36px);
}

.roadmap-card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}

.roadmap-card-number,
.roadmap-card-state {
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .12em;
  line-height: 1.4;
  text-transform: uppercase;
}

.roadmap-card-state {
  color: var(--gold-dim);
}

.roadmap-card :is(h2, h3) {
  max-width: 430px;
  font-family: var(--display);
  font-size: clamp(24px, 3vw, 31px);
  font-weight: 600;
  letter-spacing: -.01em;
  line-height: 1.08;
}

.roadmap-card p {
  max-width: 500px;
}

.editorial-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
}

.editorial-action-primary,
.editorial-action-secondary {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: var(--r-ctl);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
}

.editorial-action-primary {
  border: 1px solid rgba(148,116,23,.82);
  background: var(--gilt-button);
  color: #111;
}

.editorial-action-secondary {
  border: 1px solid var(--border-light);
  color: var(--text);
  background: transparent;
}

.editorial-action-primary:hover {
  filter: brightness(1.06);
}

.editorial-action-secondary:hover {
  border-color: var(--gold-dim);
  color: var(--gold);
}

/* Disclaimer ----------------------------------------------------- */

.legal-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  align-items: start;
  gap: clamp(42px, 8vw, 100px);
  padding: clamp(56px, 8vw, 88px) 0 clamp(72px, 10vw, 116px);
}

.legal-toc {
  position: sticky;
  top: calc(var(--chrome-h) + 24px);
}

.legal-toc-title {
  margin-bottom: 14px;
  color: var(--gold-dim);
  letter-spacing: .11em;
}

.legal-toc ol {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border-zinc);
  list-style: none;
}

.legal-toc a {
  display: block;
  padding: 9px 0;
  border-bottom: 1px solid var(--border-zinc);
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.4;
  text-decoration: none;
}

.legal-toc a:hover {
  color: var(--gold);
}

.legal-document {
  min-width: 0;
  max-width: 780px;
}

.legal-section {
  scroll-margin-top: calc(var(--chrome-h) + 28px);
  padding: 0 0 46px;
  border-bottom: 1px solid var(--border-zinc);
}

.legal-section + .legal-section {
  padding-top: 46px;
}

.legal-section-number {
  display: block;
  margin-bottom: 12px;
  color: var(--gold-dim);
  letter-spacing: .1em;
}

.legal-section h2 {
  margin-bottom: 20px;
  color: var(--text);
  font-family: var(--display);
  font-size: clamp(27px, 3.4vw, 36px);
  font-weight: 600;
  letter-spacing: -.01em;
  line-height: 1.1;
}

.legal-section p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.86;
}

.legal-section p + p {
  margin-top: 14px;
}

.legal-list {
  margin: 18px 0;
}

.legal-acceptance {
  scroll-margin-top: calc(var(--chrome-h) + 28px);
  margin-top: 46px;
  padding: 24px 26px;
  border: 1px solid var(--border-light);
  border-left: 2px solid var(--gold-dim);
  background: var(--surface);
}

.legal-acceptance h2 {
  margin-bottom: 9px;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
}

.legal-acceptance p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.75;
}

/* The JavaScript public shell replaces this fallback footer. Keeping it
   styled makes the legal and provider text available when scripts fail. */
.editorial-fallback-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  width: min(calc(100% - 48px), var(--max-w));
  margin-inline: auto;
  padding: 28px 0;
  color: var(--text-dim);
  font-size: 11px;
  line-height: 1.6;
}

@media (max-width: 820px) {
  .editorial-section {
    grid-template-columns: 130px minmax(0, 1fr);
    gap: 30px;
  }

  .roadmap-intro {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 18px;
  }

  .legal-layout {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .legal-toc {
    position: static;
  }

  .legal-toc ol {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 24px;
  }
}

@media (max-width: 640px) {
  .editorial-wrap,
  .editorial-fallback-footer {
    width: min(calc(100% - 32px), var(--max-w));
  }

  .editorial-masthead {
    padding-top: 58px;
  }

  .editorial-title {
    font-size: clamp(42px, 14vw, 60px);
  }

  .editorial-facts,
  .editorial-section,
  .editorial-card-grid,
  .principle-grid,
  .roadmap-grid,
  .architecture-list,
  .contact-list {
    grid-template-columns: 1fr;
  }

  .editorial-fact,
  .editorial-fact + .editorial-fact {
    padding: 14px 0;
    border-left: 0;
  }

  .editorial-fact + .editorial-fact {
    border-top: 1px solid var(--border-zinc);
  }

  .editorial-section {
    gap: 20px;
  }

  .editorial-section-label {
    padding-top: 0;
  }

  .editorial-card-grid,
  .principle-grid,
  .roadmap-grid,
  .contact-list {
    gap: 1px;
  }

  .architecture-item,
  .architecture-item:nth-child(even) {
    padding: 19px 0;
    border-left: 0;
  }

  .discipline-table :is(th, td) {
    display: block;
    width: 100%;
    padding-right: 0;
    padding-left: 0;
  }

  .discipline-table th {
    padding-bottom: 4px;
    border-bottom: 0;
  }

  .discipline-table td {
    padding-top: 0;
  }

  .legal-toc ol {
    grid-template-columns: 1fr;
  }

  .insights-status {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .editorial-fallback-footer {
    flex-direction: column;
  }
}

@media print {
  .editorial-page {
    background: #fff;
  }

  .editorial-masthead {
    padding-block: 36px;
  }

  .editorial-title {
    font-size: 48px;
  }

  .legal-layout {
    display: block;
    padding-block: 30px;
  }

  .legal-toc {
    display: none;
  }

  .legal-section {
    break-inside: avoid;
  }

  .editorial-fallback-footer {
    display: none;
  }
}
