/* ============================================================
   PROSPECT — Global Stylesheet
   Tokens, resets, nav, footer, gold-line spine, shared components.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;1,300;1,400&family=DM+Mono:wght@300;400&display=swap');

:root {
  /* Colours */
  --forest-deep:   #0D1A0F;
  --forest-mid:    #1C2E1A;
  --forest-canopy: #2C4A28;
  --moss:          #4A6840;
  --stone:         #8A9080;
  --bark:          #5C4A32;
  --gold:          #8B6000;
  --gold-light:    #B8851A;
  --gold-pale:     #D4AA5A;
  --cream:         #F0EBE0;
  --parchment:     #E8E0D0;
  --linen:         #F6F2EC;
  --ash:           #C8C4B8;

  /* Typography */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Cormorant Garamond', Georgia, serif;
  --font-mono:    'DM Mono', 'Courier New', monospace;

  /* Layout */
  --content-max:  1200px;
  --gutter:       56px;
  --gutter-sm:    24px;

  /* Effects */
  --hairline: 1px;
  --dur-fast: 140ms;
  --dur-base: 240ms;
  --dur-slow: 420ms;
  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);

  /* Gold line spine */
  --line-inset: 40px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--cream);
  color: var(--forest-deep);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--gold-pale); color: var(--forest-deep); }

img, svg { display: block; max-width: 100%; }

a { color: inherit; }

/* ── Placeholder reference tags ── */
.ref {
  display: none;
}

/* ============================================================
   GOLD LINE SPINE
   ============================================================ */
.gold-spine {
  position: absolute;
  top: 0;
  left: var(--line-inset);
  width: 1px;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.gold-spine__track {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 100%;
  background: var(--parchment);
}

.gold-spine__fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 0%;
  background: var(--gold);
  transition: height 60ms linear;
}

/* Horizontal feed connecting the spine to an animation placeholder
   that sits away from the left margin (e.g. hero's two-column layout) */
.line-feed {
  position: absolute;
  left: var(--line-inset);
  width: 0;
  height: 1px;
  background: var(--gold);
  z-index: 2;
  transition: width var(--dur-slow) var(--ease-out);
}

/* Horizontal branch rule at each section boundary — the spine
   feeds into this rule; it brightens gold once scrolled into view.
   Aligned to the same content bounds as section titles (max-width +
   gutter), not an arbitrary centered percentage. */
.section-branch {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  z-index: 1;
}

.section-branch__line {
  height: 1px;
  width: 100%;
  background: var(--parchment);
  transition: background var(--dur-slow) var(--ease-out);
}

.section-branch.is-active .section-branch__line {
  background: var(--gold-light);
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--cream);
  border-bottom: var(--hairline) solid var(--gold);
}

.site-nav__inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 18px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-nav__brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.site-nav__mark { width: 30px; height: 30px; flex-shrink: 0; }

.site-nav__wordmark {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 22px;
  letter-spacing: 6px;
  color: var(--forest-deep);
}

.site-nav__links {
  display: flex;
  align-items: center;
  gap: 40px;
}

.site-nav__link {
  position: relative;
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: 11px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--stone);
  text-decoration: none;
  padding-bottom: 4px;
}

.site-nav__link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width var(--dur-base) var(--ease-out);
}

.site-nav__link:hover::after { width: 100%; }
.site-nav__link:hover { color: var(--forest-deep); }

.site-nav__link.is-active {
  color: var(--forest-deep);
}
.site-nav__link.is-active::after {
  width: 100%;
}

.site-nav__link.is-disabled {
  color: var(--ash);
  pointer-events: none;
  cursor: default;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  text-decoration: none;
  padding: 15px 32px;
  border: 1px solid var(--gold);
  color: var(--forest-deep);
  background: transparent;
  cursor: pointer;
  transition: background var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out);
  white-space: nowrap;
}

.btn:hover {
  background: var(--gold);
  color: var(--cream);
}

.btn-fill {
  background: var(--gold);
  color: var(--cream);
}

.btn-fill:hover {
  background: var(--bark);
  color: var(--cream);
}

/* ============================================================
   SECTION LABELS / SHARED
   ============================================================ */
.section-label {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 24px;
}

.section-wrap {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 40px var(--gutter) 96px;
  position: relative;
}

/* ============================================================
   ANIMATION PLACEHOLDERS
   ============================================================ */
.animation-placeholder {
  background: var(--linen);
  border: 1px dashed var(--gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px;
  position: relative;
  animation: gold-pulse 3.2s ease-in-out infinite;
}

.animation-placeholder__label {
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--stone);
  max-width: 32ch;
}

@keyframes gold-pulse {
  0%, 100% { border-color: rgba(184, 133, 26, 0.35); }
  50%      { border-color: rgba(184, 133, 26, 0.9); }
}

.animation-placeholder.is-connected {
  border-left: 1px solid var(--gold);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--cream);
  border-top: 1px solid var(--gold);
}

.site-footer__inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 56px var(--gutter) 40px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
}

.site-footer__brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.site-footer__mark { width: 26px; height: 26px; flex-shrink: 0; }

.site-footer__wordmark {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 18px;
  letter-spacing: 5px;
  color: var(--forest-deep);
}

.site-footer__tagline {
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--stone);
  margin-top: 6px;
}

.site-footer__col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.site-footer__link {
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--stone);
  text-decoration: none;
  transition: color var(--dur-base) var(--ease-out);
}

.site-footer__link:hover { color: var(--gold); }

.site-footer__legal {
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: 9px;
  letter-spacing: 1.5px;
  color: var(--stone);
  margin-top: 10px;
}

/* ============================================================
   CONTENT PATTERNS — tables, quotes, containers
   Shared library so text sections read as designed structures
   (definition wells, quote panels, bubbles, step lists, stat
   trios) instead of a single column of prose with dead space
   beside it. Used on both index.html and isaac.html.
   ============================================================ */
.two-col {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 48px;
  align-items: start;
}

@media (max-width: 860px) {
  .two-col { grid-template-columns: 1fr; gap: 24px; }
}

/* Definition well — a termed callout, gold-edged on parchment. */
.definition-well {
  background: var(--parchment);
  border-radius: 4px;
  padding: 32px 34px;
  border-left: 2px solid var(--gold);
}

.definition-well__label {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}

.definition-well__term {
  font-family: var(--font-display);
  font-weight: 300;
  font-style: italic;
  font-size: 23px;
  color: var(--forest-deep);
  margin-bottom: 10px;
}

.definition-well__body {
  font-family: var(--font-body);
  font-size: 18px;
  color: var(--moss);
  line-height: 1.75;
  text-align: justify;
}

/* Quote panel — centred, gold-ringed mark, editorial pull quote. */
.quote-panel {
  background: var(--linen);
  border: 1px solid var(--gold);
  border-radius: 4px;
  padding: 40px 34px;
  text-align: center;
}

.quote-panel__mark {
  width: 36px;
  height: 36px;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gold);
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--gold);
}

.quote-panel__text {
  font-family: var(--font-display);
  font-weight: 300;
  font-style: italic;
  font-size: 19px;
  color: var(--forest-deep);
  line-height: 1.5;
}

.quote-panel__meta {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--stone);
  margin-top: 16px;
}

/* Bubble — a floating annotation with a folded-corner tail. */
.bubble {
  position: relative;
  background: var(--linen);
  border: 1px solid var(--parchment);
  border-radius: 4px;
  box-shadow: var(--shadow-md, 0 2px 14px rgba(13, 26, 15, 0.08));
  padding: 26px 26px 22px;
  margin-top: 14px;
}

/* Sized to its own content instead of stretching to the full section
   width — for a short, single-line quote that shouldn't read as a
   full-width banner. */
.bubble--fit {
  width: fit-content;
  max-width: 100%;
}

.bubble::before {
  content: '';
  position: absolute;
  top: -13px;
  left: 26px;
  width: 13px;
  height: 13px;
  background: var(--linen);
  border-left: 1px solid var(--parchment);
  border-top: 1px solid var(--parchment);
  transform: rotate(45deg);
}

.bubble__text {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 18px;
  color: var(--forest-deep);
  line-height: 1.6;
  text-align: justify;
}

.bubble__text + .bubble__text { margin-top: 12px; }

.bubble__meta {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--stone);
  margin-top: 14px;
}

/* Bubble B — Green, light sage. */
.bubble--green {
  background: color-mix(in srgb, var(--moss) 13%, var(--linen));
  border-color: color-mix(in srgb, var(--moss) 32%, var(--parchment));
}

.bubble--green::before {
  background: color-mix(in srgb, var(--moss) 13%, var(--linen));
  border-left-color: color-mix(in srgb, var(--moss) 32%, var(--parchment));
  border-top-color: color-mix(in srgb, var(--moss) 32%, var(--parchment));
}

.bubble--green .bubble__meta { color: var(--moss); }

/* Bubble C — Gold. */
.bubble--gold {
  border-color: var(--gold);
}

.bubble--gold::before {
  border-left-color: var(--gold);
  border-top-color: var(--gold);
}

.bubble--gold .bubble__label {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}

/* Bubble D — Night, tail bottom-right (reply style). */
.bubble--dark {
  background: var(--forest-deep);
  border: none;
  box-shadow: none;
  padding: 24px 26px;
  margin-top: 0;
  margin-bottom: 14px;
}

.bubble--dark::before {
  top: auto;
  bottom: -12px;
  left: auto;
  right: 26px;
  width: 12px;
  height: 12px;
  background: var(--forest-deep);
  border: none;
}

.bubble--dark .bubble__text { color: var(--cream); }
.bubble--dark .bubble__meta { color: var(--gold-light); }

/* Green list — problem symptoms in the "Green — System Status" frame. */
.green-list {
  background: color-mix(in srgb, var(--moss) 15%, var(--linen));
  border: 1px solid color-mix(in srgb, var(--moss) 35%, var(--parchment));
  border-radius: 4px;
  padding: 32px 34px;
}

/* Two columns, filled top-to-bottom then across (4 items, then the
   remaining 3) — fills the width instead of one long single column
   with empty space beside it. */
.green-list__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(4, auto);
  grid-auto-flow: column;
  gap: 0 40px;
}

.green-list__item {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 1px;
  color: var(--forest-deep);
  padding: 13px 0;
  border-bottom: 0.5px solid color-mix(in srgb, var(--moss) 35%, var(--parchment));
}

.green-list__item:last-child,
.green-list__item:nth-child(4) { border-bottom: none; }

.green-list__arrow {
  color: var(--gold);
  margin-right: 8px;
}

@media (max-width: 640px) {
  .green-list__grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    grid-auto-flow: row;
  }
  .green-list__item:nth-child(4) { border-bottom: 0.5px solid color-mix(in srgb, var(--moss) 35%, var(--parchment)); }
}

/* Numbered steps — a compact ordered list inside a card. */
.numbered-steps {
  background: var(--linen);
  border: 1px solid var(--parchment);
  border-radius: 4px;
  padding: 32px 34px;
}

.numbered-steps__label {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 18px;
}

.numbered-steps__item {
  display: flex;
  gap: 14px;
  align-items: baseline;
}

.numbered-steps__item + .numbered-steps__item {
  margin-top: 14px;
}

.numbered-steps__num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--stone);
  flex-shrink: 0;
}

.numbered-steps__text {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--forest-deep);
  line-height: 1.5;
}

/* Grid variant — items flow left to right, wrapping into rows, instead
   of stacking in a single column. */
.numbered-steps__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px 24px;
}

.numbered-steps__grid .numbered-steps__item + .numbered-steps__item {
  margin-top: 0;
}

@media (max-width: 640px) {
  .numbered-steps__grid {
    grid-template-columns: 1fr;
  }
  .numbered-steps__grid .numbered-steps__item {
    grid-column: 1 !important;
  }
}

/* Stat trio — three figures in one card. */
.stat-trio {
  background: var(--linen);
  border: 1px solid var(--parchment);
  border-radius: 4px;
  padding: 30px 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.stat-trio__item {
  text-align: center;
  border-right: 0.5px solid var(--parchment);
}

.stat-trio__item:last-child { border-right: none; }

.stat-trio__num {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 32px;
  color: var(--gold);
}

.stat-trio__label {
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--stone);
  margin-top: 6px;
}

/* Status console — dark, terminal-style readout. */
.status-console {
  background: var(--forest-deep);
  border-radius: 4px;
  padding: 30px 32px;
}

.status-console__line {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--linen);
  line-height: 2.1;
}

.status-console__line > span {
  color: var(--gold-pale);
  margin-right: 8px;
}

/* Pattern table — an actual <table>, "Day — Boxed Grid" by default,
   with a --dark modifier ("Green — System Status" family, adapted to
   the forest-deep + gold-network panel) for use on dark grounds. */
.pattern-table-wrap {
  position: relative;
  background: var(--linen);
  border: 1px solid var(--parchment);
  border-radius: 4px;
  padding: 30px 32px;
  margin: 24px 0;
  overflow: hidden;
}

.pattern-table-wrap__label {
  position: relative;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 9px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 18px;
}

.pattern-table {
  position: relative;
  width: 100%;
  border-collapse: collapse;
}

.pattern-table th {
  text-align: left;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 10.5px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--moss);
  padding: 0 16px 12px 0;
  border-bottom: 1px solid var(--bark);
}

.pattern-table td {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.4;
  color: var(--forest-deep);
  text-align: justify;
  padding: 14px 16px 14px 0;
  border-bottom: 0.5px solid var(--parchment);
  vertical-align: top !important;
}

.pattern-table tr:last-child td { border-bottom: none; }

.pattern-table td.pattern-table__accent {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--gold);
  text-align: left;
  white-space: nowrap;
  width: 1%;
  vertical-align: top !important;
}

/* Dark modifier — sits on a forest-deep / gold-network ground. */
.pattern-table-wrap--dark {
  background: var(--forest-deep);
  border: 1px solid var(--gold);
  padding: 44px var(--gutter-sm);
}

.pattern-table-wrap--dark .pattern-table-wrap__label { color: var(--gold-pale); }

.pattern-table-wrap--dark .pattern-table { max-width: 980px; margin: 0 auto; }

.pattern-table-wrap--dark .pattern-table th {
  color: var(--stone);
  border-bottom-color: rgba(240, 235, 224, 0.25);
}

.pattern-table-wrap--dark .pattern-table th.pattern-table__th-isaac { color: var(--gold-pale); }

.pattern-table-wrap--dark .pattern-table td {
  color: var(--ash);
  border-bottom-color: rgba(240, 235, 224, 0.14);
}

.pattern-table-wrap--dark .pattern-table td.pattern-table__cell-isaac { color: var(--linen); }

.pattern-table-wrap--dark .pattern-table tbody tr:nth-child(even) td {
  background: rgba(240, 235, 224, 0.04);
}

/* Striped-rows modifier — "Day — Striped Rows": alternating row bands
   instead of dividing lines, ends rounded into a pill per row. */
.pattern-table-wrap--striped .pattern-table th {
  padding: 10px 16px;
  border-bottom: none;
}

.pattern-table-wrap--striped .pattern-table td {
  padding: 14px 16px;
  border-bottom: none;
}

.pattern-table-wrap--striped .pattern-table tbody tr:nth-child(odd) td {
  background: var(--parchment);
}

.pattern-table-wrap--striped .pattern-table tbody tr td:first-child { border-radius: 2px 0 0 2px; }
.pattern-table-wrap--striped .pattern-table tbody tr td:last-child { border-radius: 0 2px 2px 0; }

.pattern-table th.pattern-table__th-isaac { color: var(--gold); }

/* Frame and tint the Isaac column so it reads as the stronger option at
   a glance — a gold box drawn around the column, not just a colour
   change on the text. */
.pattern-table-wrap--striped .pattern-table th.pattern-table__th-isaac {
  background: color-mix(in srgb, var(--gold) 10%, transparent);
  border-top: 2px solid var(--gold);
  border-left: 2px solid var(--gold);
  border-right: 2px solid var(--gold);
  border-radius: 4px 4px 0 0;
}

/* Isaac column alternates in the OPPOSITE phase to the generic column:
   where the row is gold-tinted on the left, it's plain on the right,
   and vice versa — a visible rhythm rather than a flat highlight. */
.pattern-table-wrap--striped .pattern-table td.pattern-table__cell-isaac {
  border-left: 2px solid var(--gold);
  border-right: 2px solid var(--gold);
  border-radius: 0;
}

.pattern-table-wrap--striped .pattern-table tbody tr:nth-child(odd) td.pattern-table__cell-isaac {
  background: var(--linen);
}

.pattern-table-wrap--striped .pattern-table tbody tr:nth-child(even) td.pattern-table__cell-isaac {
  background: color-mix(in srgb, var(--gold) 16%, var(--linen));
}

.pattern-table-wrap--striped .pattern-table tbody tr:first-child td.pattern-table__cell-isaac { border-radius: 0; }
.pattern-table-wrap--striped .pattern-table tbody tr:last-child td.pattern-table__cell-isaac {
  border-bottom: 2px solid var(--gold);
  border-radius: 0 0 4px 4px;
}

@media (max-width: 860px) {
  .pattern-table-wrap { padding: 24px; }
  .pattern-table-wrap--dark { padding: 28px var(--gutter-sm); }
  .pattern-table, .pattern-table thead, .pattern-table tbody, .pattern-table th, .pattern-table td, .pattern-table tr {
    display: block;
  }
  .pattern-table thead { display: none; }
  .pattern-table tr { margin-bottom: 18px; }
  .pattern-table tr:last-child { margin-bottom: 0; }
  .pattern-table td { border-bottom: none; padding: 4px 0; width: auto !important; }
}

/* ============================================================
   SCROLL FADE-IN
   ============================================================ */
.fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
}

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
  :root {
    --gutter: var(--gutter-sm);
    --line-inset: 20px;
  }

  .site-nav__links { gap: 20px; }
  .site-nav__wordmark { font-size: 18px; letter-spacing: 4px; }
  .section-wrap { padding: 32px var(--gutter) 64px; }
  .site-footer__inner { flex-direction: column; }
  .site-footer__col { align-items: flex-start; }
}

@media (max-width: 480px) {
  .site-nav__inner { padding: 16px var(--gutter-sm); }
  .site-nav__brand { gap: 10px; }
  .site-nav__mark { width: 24px; height: 24px; }
  .site-nav__wordmark { font-size: 15px; letter-spacing: 2px; }
  .site-nav__links { gap: 13px; }
  .site-nav__link { font-size: 9.5px; letter-spacing: 1.5px; }
}
