/* ============================================================================
   Section 8: The campus (schematic twin)
   landing/assets/css/landing-twin.css

   Re-declares scope colours on .twin because landing-scope.css scoped
   them to .scope. Reuses .pill-planned from landing-graphrag.css.

   NOTE: padding-block uses var(--section-pad) verbatim — same as .scope
   in landing-scope.css. That token is not defined in this project, so it
   resolves to 0 and section spacing comes from neighbours. Matches
   Section 5 exactly. Do not "fix" here alone; fixing it properly means
   defining --section-pad in tokens.css and re-checking Section 5.
   ============================================================================ */

/* ---------- Section 8: The campus ---------- */
.twin { --s1: #C8442B; --s2-dark: #7B6CF0; --s3: #14A39A; --night-panel: rgba(18,16,26,.78); padding-block: var(--section-pad); }

.twinboard {
  display: grid; grid-template-columns: 7fr 5fr; max-width: 1200px; margin: 0 auto; color: #fff; overflow: hidden;
  background: var(--glass-dark);
  -webkit-backdrop-filter: blur(14px) saturate(120%); backdrop-filter: blur(14px) saturate(120%);
  border: 1px solid var(--hairline-light); border-radius: var(--radius-lg); box-shadow: var(--shadow-2);
}
.twinboard__plan { display: flex; flex-direction: column; border-right: 1px solid var(--hairline-light); }
.planbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 24px; background: var(--glass-dark-strong); border-bottom: 1px solid var(--hairline-light); }
.planbar__title { font: 500 13px/18px 'Inter', sans-serif; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.78); }
.planwrap { padding: 24px; }
.plan { display: block; width: 100%; height: auto; }

/* Units */
.unit { cursor: pointer; transition: opacity .35s var(--ease); transition-delay: calc(var(--i) * 70ms); }
.unit__shape { fill: rgba(255,255,255,.10); stroke: rgba(255,255,255,.55); stroke-width: 1; transition: fill .2s var(--ease), stroke .2s var(--ease); }
.unit__id { fill: #fff; font: 600 18px 'Outfit', sans-serif; pointer-events: none; transition: fill .2s var(--ease); }
.unit__marks { fill: none; stroke: rgba(255,255,255,.7); stroke-width: 1.5; pointer-events: none; }
.unit:hover .unit__shape, .unit.is-hover .unit__shape { fill: rgba(255,255,255,.20); }
.unit.is-active .unit__shape { fill: #fff; stroke: #fff; }
.unit.is-active .unit__id { fill: var(--ink, #26232B); }

.unit--site .unit__shape { fill: rgba(18,16,26,.18); stroke-dasharray: 6 6; }
.unit--site .unit__id { font-size: 13px; letter-spacing: .12em; }
.unit--site.is-active .unit__shape { fill: rgba(255,255,255,.14); stroke: #fff; stroke-width: 2; stroke-dasharray: none; }
.unit--site.is-active .unit__id { fill: #fff; }
.plan__note { fill: rgba(255,255,255,.78); font: 500 12px 'Inter', sans-serif; }

/* Spotlight: opacity by share when data exists, hatched and dashed when pending */
.plan[data-spot] .unit { opacity: var(--o, .7); }
.plan[data-spot] .unit.is-pending:not(.is-active) .unit__shape { fill: url(#hatch); stroke-dasharray: 3 5; }

/* Entrance: places appear once, in order */
.twinboard:not(.is-in) .unit { opacity: 0; }

/* Controls under the plan */
.unitbar { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--hairline-light); }
.unitbtn { min-height: 48px; padding: 0 8px; color: #fff; background: transparent; border: 0; border-left: 1px solid var(--hairline-light); font: 600 14px/20px 'Outfit', sans-serif; cursor: pointer; transition: background .2s var(--ease), color .2s var(--ease); }
.unitbtn:first-child { border-left: 0; }
.unitbtn:hover { background: rgba(255,255,255,.08); }
.unitbtn[aria-pressed="true"] { background: #fff; color: var(--ink, #26232B); }
.unitbtn:focus-visible { outline-offset: -3px; }
.planstatus { margin: 0; padding: 12px 24px 0; min-height: 30px; font: 500 13px/18px 'Inter', sans-serif; color: rgba(255,255,255,.9); }
.plannote { margin: 0; padding: 8px 24px 20px; font: 500 13px/18px 'Inter', sans-serif; color: rgba(255,255,255,.72); }

/* Place ledger */
.place { display: flex; flex-direction: column; padding: 32px; background: var(--night-panel); }
.place__eyebrow { margin: 0; font: 500 13px/18px 'Inter', sans-serif; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.78); }
.place__id { margin: 4px 0 0; font: 600 40px/44px 'Outfit', sans-serif; letter-spacing: -.01em; }
.place__share { margin: 6px 0 0; min-height: 24px; font: 400 16px/24px 'Inter', sans-serif; font-variant-numeric: tabular-nums; color: rgba(255,255,255,.9); }

.slot {
  display: inline-block; padding: 2px 10px; border: 1px dashed rgba(255,255,255,.65); border-radius: 999px;
  font: 500 13px/18px 'Inter', sans-serif; color: rgba(255,255,255,.92);
  background: repeating-linear-gradient(135deg, rgba(255,255,255,.07) 0 6px, transparent 6px 12px);
}

.prows { list-style: none; margin: 24px 0 0; padding: 0; }
.prow {
  position: relative; display: grid; grid-template-columns: 14px 1fr auto; column-gap: 16px; align-items: center;
  width: 100%; min-height: 68px; padding: 0 8px 0 12px; text-align: left; color: #fff; font: inherit;
  background: transparent; border: 0; border-top: 1px solid var(--hairline-light); cursor: pointer;
  transition: background .2s var(--ease);
}
.prow::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--rule); transform: scaleY(0); transition: transform .28s var(--ease); }
.prow:hover, .prow[aria-pressed="true"] { background: rgba(255,255,255,.08); }
.prow:hover::before, .prow:focus-visible::before, .prow[aria-pressed="true"]::before { transform: scaleY(1); }
.prow:focus-visible { outline-offset: -3px; }
.prow--1 { --rule: var(--s1); } .prow--2 { --rule: var(--s2-dark); } .prow--3 { --rule: var(--s3); }
.prow__sw { width: 14px; height: 14px; border-radius: 3px; background: var(--rule); box-shadow: 0 0 0 1px rgba(255,255,255,.35); }
.prow--1 .prow__sw { background: repeating-linear-gradient(135deg, var(--s1) 0 3px, rgba(255,255,255,.55) 3px 4px); }
.prow--3 .prow__sw { background: radial-gradient(rgba(255,255,255,.7) 1px, var(--s3) 1.5px) 0 0 / 5px 5px; }
.prow__n { font: 600 18px/26px 'Outfit', sans-serif; }
.prow__n small { display: block; font: 500 13px/18px 'Inter', sans-serif; color: rgba(255,255,255,.78); }
.prow__v { font: 600 18px/26px 'Outfit', sans-serif; font-variant-numeric: tabular-nums; text-align: right; }

.place .footing { margin: 24px 0 0; padding-top: 16px; border-top: 1px solid var(--hairline-light); }
.place .footing__note { margin: 6px 0 0; }

/* Page close */
.closenote { margin: 40px 0 0; text-align: center; font: 500 14px/20px 'Inter', sans-serif; color: rgba(255,255,255,.9); }
.closenote a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 899px) {
  .twinboard { grid-template-columns: 1fr; }
  .twinboard__plan { border-right: 0; border-bottom: 1px solid var(--hairline-light); }
}
@media (max-width: 767px) {
  .planwrap { padding: 16px; }
  .planbar { padding: 12px 16px; flex-wrap: wrap; }
  .unitbtn { font-size: 12px; padding: 0 2px; }
  .planstatus, .plannote { padding-inline: 16px; }
  .place { padding: 24px 20px 28px; }
  .place__id { font-size: 32px; line-height: 36px; }
  .prow { min-height: 64px; column-gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .unit, .prow::before, .unit__shape, .unit__id { transition: none !important; }
  .twinboard:not(.is-in) .unit { opacity: 1; }
}


/* ============================================================================
   View toggle (By scope / ISO 14064-1) — appended for the ISO view
   ============================================================================ */

.viewtoggle {
  display: inline-flex;
  align-self: flex-start;
  gap: 2px;
  padding: 3px;
  margin: 0 0 20px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--hairline-light);
  border-radius: 999px;
}
.viewtoggle__btn {
  position: relative;
  padding: 6px 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255,255,255,.72);
  font: 600 13px/18px 'Inter', sans-serif;
  letter-spacing: .02em;
  cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.viewtoggle__btn:hover { color: #fff; }
.viewtoggle__btn.is-active {
  background: #fff;
  color: var(--ink, #26232B);
}
.viewtoggle__btn:focus-visible { outline-offset: 2px; }

/* Illustrative-number tilde: quieter than the number, never invisible */
.place__share .tilde,
.prow__v .tilde {
  color: rgba(255,255,255,.55);
  font-weight: 400;
  margin-right: 1px;
}

/* ISO view: six rows instead of three. .prows grows; nothing else moves. */
.prows.is-iso .prow {
  min-height: 60px;
}
.prows.is-iso .prow__n {
  font-size: 16px;
  line-height: 22px;
}
.prows.is-iso .prow__n small {
  font-size: 12px;
  line-height: 16px;
}

/* Scope-mix bars at the top of each place heading (used by ISO view) */
.place__mix {
  display: flex;
  gap: 2px;
  height: 6px;
  margin: 12px 0 0;
  border-radius: 2px;
  overflow: hidden;
  background: rgba(255,255,255,.06);
}
.place__mix span {
  display: block;
  height: 100%;
}
.place__mix .mix--1 { background: var(--s1); }
.place__mix .mix--2 { background: var(--s2-dark); }
.place__mix .mix--3 { background: var(--s3); }
.place__mix .mix--4 { background: rgba(20,163,154,.72); }
.place__mix .mix--5 { background: rgba(20,163,154,.48); }
.place__mix .mix--6 { background: rgba(20,163,154,.28); }

/* Illustrative notice (below the ledger rows) */
.place__note {
  margin: 12px 0 0;
  font: 500 12px/18px 'Inter', sans-serif;
  color: rgba(255,255,255,.62);
  letter-spacing: .01em;
}


/* ============================================================================
   Frameworks grid (Scope panel + ISO panel, side by side)
   ============================================================================ */

.frameworks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 20px 0 0;
}
@media (max-width: 899px) {
  .frameworks { grid-template-columns: 1fr; gap: 16px; }
}

.framework {
  display: flex;
  flex-direction: column;
  padding: 16px;
  border: 1px solid var(--hairline-light);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.02);
  transition: opacity .3s var(--ease), border-color .3s var(--ease), background .3s var(--ease);
}
.framework.is-active {
  background: rgba(255,255,255,.05);
  border-color: rgba(255,255,255,.40);
}
.framework.is-reference {
  opacity: .42;
}
.framework.is-reference:hover {
  opacity: .68;
}

.framework__head {
  margin: 0 0 10px;
  font: 500 11px/16px 'Inter', sans-serif;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.72);
}
.framework.is-active .framework__head {
  color: #fff;
}

/* Mix bar (inside each framework) */
.framework .place__mix {
  margin: 0 0 12px;
  height: 4px;
}

/* Override .prows top margin inside frameworks (the framework head provides spacing) */
.framework .prows {
  margin: 0;
}

/* ISO category row accents — Cat 1 = S1, Cat 2 = S2, Cat 3–6 = teal ramp */
.prow--cat1 { --rule: var(--s1); }
.prow--cat2 { --rule: var(--s2-dark); }
.prow--cat3 { --rule: var(--s3); }
.prow--cat4 { --rule: rgba(20,163,154,.78); }
.prow--cat5 { --rule: rgba(20,163,154,.54); }
.prow--cat6 { --rule: rgba(20,163,154,.32); }

.prow--cat1 .prow__sw {
  background: repeating-linear-gradient(135deg, var(--s1) 0 3px, rgba(255,255,255,.55) 3px 4px);
}
.prow--cat2 .prow__sw {
  background: var(--s2-dark);
}
.prow--cat3 .prow__sw {
  background: radial-gradient(rgba(255,255,255,.7) 1px, var(--s3) 1.5px) 0 0 / 5px 5px;
}
.prow--cat4 .prow__sw,
.prow--cat5 .prow__sw,
.prow--cat6 .prow__sw {
  background: rgba(20,163,154,.6);
}

/* ISO rows slightly tighter than scope rows */
.prows.is-iso .prow {
  min-height: 52px;
}
.prows.is-iso .prow__n {
  font-size: 15px;
  line-height: 20px;
}
.prows.is-iso .prow__n small {
  font-size: 11px;
  line-height: 14px;
}
.prows.is-iso .prow__v {
  font-size: 15px;
  line-height: 20px;
}

/* Framework panels on mobile: reduce padding */
@media (max-width: 767px) {
  .framework { padding: 12px; }
  .prows.is-iso .prow { min-height: 48px; }
  .prows.is-iso .prow__n { font-size: 14px; line-height: 18px; }
  .prows.is-iso .prow__v { font-size: 14px; line-height: 18px; }
}

/* Frameworks: single column (one panel visible at a time, switched by JS) */
.frameworks {
  grid-template-columns: 1fr;
  gap: 0;
}
.framework[hidden] {
  display: none;
}


/* ============================================================================
   Building inner void (Section 8, direction C)
   ============================================================================ */

.unit__void {
  fill: rgba(18,16,26,.28);
  stroke: rgba(255,255,255,.28);
  stroke-width: 1;
  pointer-events: none;
  transition: fill .2s var(--ease), stroke .2s var(--ease);
}
.unit.is-active .unit__void {
  fill: rgba(18,16,26,.08);
  stroke: rgba(38,35,43,.25);
}

/* ============================================================================
   Footprint bars: white on glass, ink on active building. No scope colours.
   ============================================================================ */

.fp__track {
  fill: none;
  stroke: rgba(255,255,255,.6);
  stroke-width: 1;
  stroke-dasharray: 3 3;
}
.fp__fill {
  fill: #fff;
  transition: width .5s var(--ease);
}
.fp--loaded .fp__track {
  stroke-dasharray: none;
  fill: rgba(255,255,255,.12);
}
.unit.is-active .fp__track {
  stroke: rgba(38,35,43,.6);
}
.unit.is-active .fp--loaded .fp__track {
  fill: rgba(38,35,43,.12);
}
.unit.is-active .fp__fill {
  fill: var(--ink, #26232B);
}

@media (prefers-reduced-motion: reduce) {
  .fp__fill, .unit__void { transition: none !important; }
}


/* ============================================================================
   Isometric plan (Section 8, Path B)
   ============================================================================ */

.iso__site {
  fill: rgba(18,16,26,.18);
  stroke: rgba(255,255,255,.55);
  stroke-dasharray: 6 6;
}
.iso__face {
  stroke: rgba(255,255,255,.45);
  stroke-width: 1;
}
.iso__face--l { fill: rgba(255,255,255,.12); }
.iso__face--r { fill: rgba(255,255,255,.05); }

.unit--bld .unit__shape { fill: rgba(255,255,255,.22); }
.unit--bld.is-active .unit__shape { fill: #fff; }
.unit--bld.is-active .iso__face--l { fill: rgba(255,255,255,.55); }
.unit--bld.is-active .iso__face--r { fill: rgba(255,255,255,.35); }

/* Isometric plan hides the old flat-only styles where they'd conflict */
.plan--overlay .unit__shape,
.iso__site.unit__shape { fill: inherit; }


/* ============================================================================
   Face fill: side faces become data bars. White fill rising from the base.
   ============================================================================ */

.face__fill {
  fill: rgba(255,255,255,.85);
  stroke: none;
  pointer-events: none;
  transition: all .45s var(--ease);
}
.unit.is-active .face__fill {
  fill: #fff;
}