/* ===========================
   TSL — Institutional Theme
   Sovereign capital vehicle
   Charcoal + White + Single Accent
   =========================== */

:root {
  --bg: #F7F6F3;
  --bg-2: #EEECE8;
  --bg-3: #E5E3DE;
  --fg: #1A1917;
  --fg-2: #6B6762;
  --fg-3: #A8A49F;
  --border: rgba(26, 25, 23, 0.10);
  --border-2: rgba(26, 25, 23, 0.06);
  --rule: rgba(26, 25, 23, 0.15);

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;
  --space-2xl: 8rem;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---- Selection ---- */
::selection { background: var(--fg); color: var(--bg); }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--fg-3); border-radius: 2px; }

/* =======================
   PAGE CONTAINER
   ======================= */
.tsl-page {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* =======================
   HERO
   ======================= */
.hero {
  padding: 7rem 0 5rem;
  border-bottom: 1px solid var(--rule);
}
.hero-label {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 2.5rem;
}
.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 5.2rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin-bottom: 2rem;
}
.hero-sub {
  max-width: 520px;
  font-size: 1.05rem;
  color: var(--fg-2);
  line-height: 1.75;
  margin-bottom: 3rem;
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg);
  border: 1px solid var(--fg);
  padding: 0.8rem 1.75rem;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.hero-cta:hover { background: var(--fg); color: var(--bg); }
.hero-cta svg { transition: transform 0.2s; }
.hero-cta:hover svg { transform: translateX(3px); }

/* =======================
   SECTION SHARED
   ======================= */
.section {
  padding: 4rem 0;
  border-bottom: 1px solid var(--rule);
}
.section:last-child { border-bottom: none; }

.section-header {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}
.section-index {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--fg-3);
  flex-shrink: 0;
}
.section-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg);
}
.section-body {
  font-size: 0.9rem;
  color: var(--fg-2);
  line-height: 1.75;
}

/* =======================
   INSTRUMENT (T1)
   ======================= */
.instrument-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
  border: 1px solid var(--border);
}
.inst-cell {
  padding: 2rem 1.75rem;
  border-right: 1px solid var(--border);
  border-top: 2px solid var(--fg);
}
.inst-cell:last-child { border-right: none; }
.inst-cell-top { border-top: none; }
.inst-label {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 0.6rem;
}
.inst-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: -0.02em;
  line-height: 1;
}
.inst-value-sm {
  font-size: 1.1rem;
}
.inst-note {
  font-size: 0.78rem;
  color: var(--fg-2);
  margin-top: 0.5rem;
  line-height: 1.5;
}

/* =======================
   CAPITAL STACK TABLE
   ======================= */
.stack-table {
  width: 100%;
  border-collapse: collapse;
}
.stack-table thead th {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-3);
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--rule);
}
.stack-table thead th:first-child { padding-left: 0; }
.stack-table tbody td {
  font-size: 0.88rem;
  color: var(--fg);
  padding: 0.75rem 0.75rem;
  border-bottom: 1px solid var(--border-2);
  vertical-align: middle;
}
.stack-table tbody td:first-child { padding-left: 0; }
.stack-table tbody tr:last-child td { border-bottom: none; }
.tier-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--fg);
  border: 1px solid var(--fg);
  padding: 0.2rem 0.5rem;
  margin-right: 0.75rem;
}
.amount-cell {
  font-weight: 500;
  font-size: 0.92rem;
}
.term-cell {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--fg-2);
}
.footnote {
  margin-top: 1.25rem;
  font-size: 0.78rem;
  color: var(--fg-3);
  font-style: italic;
}

/* =======================
   PROTECTION MECHANICS
   ======================= */
.prot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
.prot-item { padding: 1.75rem 0; border-top: 1px solid var(--border-2); }
.prot-item:first-child { border-top: none; }
.prot-num {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--fg-3);
  margin-bottom: 0.5rem;
}
.prot-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 0.6rem;
}
.prot-body {
  font-size: 0.85rem;
  color: var(--fg-2);
  line-height: 1.7;
}

/* =======================
   STRUCTURE (ENTITY DIAGRAM)
   ======================= */
.structure-diagram {
  padding: 2.5rem;
  background: var(--bg-2);
  border: 1px solid var(--border);
}
.entity-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 0;
}
.entity { }
.entity-label {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--fg);
  line-height: 1.3;
}
.entity-sub {
  font-size: 0.75rem;
  color: var(--fg-3);
  font-style: italic;
  margin-top: 0.15rem;
}
.entity-type {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--fg-3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}
.connector-line {
  width: 1px;
  height: 1.5rem;
  background: var(--rule);
  margin: 0 0 0 4.5rem;
}
.connector-branch {
  display: flex;
  flex-direction: column;
}
.branch-hz {
  display: flex;
  align-items: flex-start;
  gap: 0;
}
.branch-line-hz {
  width: 2rem;
  height: 1px;
  background: var(--rule);
  flex-shrink: 0;
  margin-top: 0.75rem;
}
.branch-items {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  width: 100%;
}
.entity-mini {
  border: 1px solid var(--border);
  padding: 0.65rem 1rem;
  background: var(--bg);
  min-width: 0;
  text-align: left;
}
.entity-mini .entity-type { margin-bottom: 0.15rem; }
.entity-mini .entity-label { font-size: 0.78rem; }
/* =======================
   PROOF
   ======================= */
.proof {
  padding: 4rem 0;
  border-bottom: 1px solid var(--rule);
}
.proof-line {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 3vw, 2rem);
  font-weight: 400;
  font-style: italic;
  color: var(--fg-2);
  line-height: 1.5;
  max-width: 680px;
}

/* =======================
   NEXT STEP (CTA)
   ======================= */
.nextstep {
  padding: 5rem 0 6rem;
}
.nextstep-inner {
  max-width: 560px;
}
.nextstep-label {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 1.5rem;
}
.nextstep-headline {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.5rem);
  font-weight: 600;
  color: var(--fg);
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin-bottom: 1.5rem;
}
.nextstep-body {
  font-size: 0.92rem;
  color: var(--fg-2);
  line-height: 1.75;
  margin-bottom: 2.5rem;
}
.nextstep-docs {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 2.5rem;
}
.nextstep-doc {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.82rem;
  color: var(--fg-2);
}
.nextstep-doc svg { color: var(--fg-3); flex-shrink: 0; }
.nextstep-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--fg);
  padding: 0.85rem 1.75rem;
  text-decoration: none;
  transition: opacity 0.2s;
}
.nextstep-cta:hover { opacity: 0.8; }
.nextstep-cta svg { transition: transform 0.2s; }
.nextstep-cta:hover svg { transform: translateX(3px); }

/* =======================
   FOOTER
   ======================= */
.tsl-footer {
  padding: 2rem 0;
  border-top: 1px solid var(--rule);
}
.tsl-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.footer-left {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--fg-3);
}
.footer-right {
  font-size: 0.75rem;
  color: var(--fg-3);
  font-family: var(--font-mono);
}

/* =======================
   RESPONSIVE
   ======================= */
@media (max-width: 768px) {
  .tsl-page { padding: 0 1.25rem; }
  .hero { padding: 5rem 0 3.5rem; }
  .instrument-grid { grid-template-columns: 1fr; }
  .inst-cell { border-right: none; border-bottom: 1px solid var(--border); }
  .inst-cell:last-child { border-bottom: none; }
  .prot-grid { grid-template-columns: 1fr; gap: 0; }
  .structure-diagram { padding: 1.5rem; }
  .branch-items { flex-direction: column; gap: 0.75rem; }
  .branch-line-hz { display: none; }
  .tsl-footer-inner { flex-direction: column; align-items: flex-start; }
}