/* Mobius Labs sandbox visual system (loads after site.css + band-core.css).
   Neo-industrial terminal layout: every top-level file fits inside one desktop screen;
   nested detail files show their animated schematic immediately and scroll cleanly inside the pane. */

:root {
  --ink: #0A0F1A;
  --ink2: #0F1624;
  --ink3: #141E32;
  --paper: #E8E4DA;
  --paper-soft: #CDD3DC;
  --dim: #9AABC2;
  --line: rgba(91, 141, 184, .36);
  --line-hi: rgba(174, 216, 246, .46);
  --sig: #F26A2E;
  --sig-line: rgba(242, 106, 46, .72);
  --blue: #3D7FD9;
  --ice: #AED8F6;
  --grid: #5B8DB8;
  --untrusted: #6B788B;
}

/* ---- Browser surfaces & interactive polish ---- */
body { font-family: var(--m); }
::selection { background: var(--sig); color: var(--ink); }
:focus-visible { outline: 2px solid var(--sig); outline-offset: 3px; }

.btn:not(.ghost),
.rail a.btn,
.foot-sub button {
  position: relative;
  background-color: var(--sig);
  background-image:
    linear-gradient(rgba(10, 15, 26, .46), rgba(10, 15, 26, .46)),
    linear-gradient(rgba(10, 15, 26, .46), rgba(10, 15, 26, .46)),
    linear-gradient(225deg, rgba(10, 15, 26, .76) 50%, transparent 50.5%);
  background-size: 24px 1px, 1px 4px, 6px 6px;
  background-position:
    3px calc(100% - 3px),
    3px calc(100% - 3px),
    calc(100% - 3px) 3px;
  background-repeat: no-repeat;
}
.rail a.btn {
  background-size: 30% 1px, 1px 6px, 7px 7px;
}
.foot-sub button {
  background-size: 16px 1px, 1px 4px, 5px 5px;
}
.btn {
  transition: background-color .16s ease, color .16s ease, border-color .16s ease, transform .14s ease, box-shadow .16s ease;
  cursor: pointer;
}
.btn:hover { background-color: #FF7B3F; box-shadow: 0 0 16px rgba(242, 106, 46, .26); }
.btn:active { transform: translateY(1px); }
.btn.ghost {
  background: rgba(15, 22, 36, .82);
  color: var(--paper);
  border: 1px solid var(--line-hi);
}
.btn.ghost:hover {
  border-color: var(--sig);
  color: var(--sig);
  background: rgba(242, 106, 46, .08);
  box-shadow: none;
}

.sr {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---- Outer terminal frame (quiet Aliens / neo-industrial registration ticks) ---- */
.frame { inset: 12px; grid-template-columns: 214px 1fr; grid-template-rows: 58px 1fr 50px; }
.frame::after {
  content: "";
  position: absolute;
  inset: -1px;
  pointer-events: none;
  background:
    linear-gradient(var(--ice), var(--ice)) left top/11px 1px,
    linear-gradient(var(--ice), var(--ice)) left top/1px 11px,
    linear-gradient(var(--ice), var(--ice)) right top/11px 1px,
    linear-gradient(var(--ice), var(--ice)) right top/1px 11px,
    linear-gradient(var(--ice), var(--ice)) left bottom/11px 1px,
    linear-gradient(var(--ice), var(--ice)) left bottom/1px 11px,
    linear-gradient(var(--ice), var(--ice)) right bottom/11px 1px,
    linear-gradient(var(--ice), var(--ice)) right bottom/1px 11px;
  background-repeat: no-repeat;
  opacity: .5;
  z-index: 30;
}

.top { padding: 0 24px; }
.wm img { height: 32px; }
.top-r { display: flex; align-items: center; gap: 18px; }
.top .hbtn { padding: 7px 14px; font-size: 11px; }
.sys-stat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 10.5px var(--m);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--dim);
}
.sys-stat i {
  width: 6px; height: 6px;
  background: var(--sig);
  box-shadow: 0 0 7px rgba(242, 106, 46, .6);
}
@media (prefers-reduced-motion: no-preference) {
  .sys-stat i { animation: sys-blink 3.8s ease-in-out infinite; }
}
@keyframes sys-blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* ---- Sidebar rail ---- */
.rail { padding: 18px 0 20px; }
.rail a {
  padding: 11px 20px;
  font-size: 11.5px;
  letter-spacing: .13em;
  transition: color .16s ease, background-color .16s ease, border-color .16s ease;
}
.rail a:hover:not(.btn) { color: var(--paper); background: rgba(91, 141, 184, .08); }
.rail a:hover:not(.btn) i { border-color: var(--ice); }
.rail .n { font-size: 10.5px; opacity: .62; }
.rail a[aria-current] {
  color: var(--paper);
  border-left-color: var(--sig);
  background: rgba(242, 106, 46, .09);
}
.rail a.btn { margin: auto 20px 0; padding: 9px 16px; }

/* ---- Stage & ambient vignette ---- */
.stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 42%, transparent 46%, rgba(6, 10, 18, .52) 100%);
  z-index: 0;
}
.stage > * { z-index: 1; }

/* ---- Home: single-screen monitor view with legible scrim behind hero copy ---- */
.home .stage { overflow: hidden; }
.home .home-band {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 36px 14px;
  gap: 0;
}
.home .band {
  width: min(78%, calc((100vh - 380px) * 1568 / 968));
  max-width: 760px;
  min-width: 260px;
  aspect-ratio: 1568 / 968;
}

/* Soft translucent ink backing under hero text so grid lines never impair legibility */
.hero-copy {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 780px;
  padding: 14px 28px 16px;
  margin-top: 2px;
  background: radial-gradient(ellipse at 50% 50%, rgba(10, 15, 26, .88) 0%, rgba(10, 15, 26, .74) 68%, rgba(10, 15, 26, 0) 100%);
}
.home-band .motto {
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.3;
  color: var(--paper);
  margin-top: 0;
  text-shadow: 0 2px 14px rgba(10, 15, 26, .9);
}
.home-band .thesis {
  color: var(--paper-soft);
  font-size: clamp(14.5px, 1.2vw, 16px);
  line-height: 1.55;
  max-width: 680px;
  margin-top: 10px;
  text-shadow: 0 1px 10px rgba(10, 15, 26, .95);
}
.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 15px;
}
.hero-index {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 14px;
  font: 10.5px var(--m);
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--dim);
}
.hero-index a {
  text-decoration: none;
  color: var(--dim);
  border-bottom: 1px solid rgba(91, 141, 184, .35);
  padding-bottom: 2px;
  transition: color .15s ease, border-color .15s ease;
}
.hero-index a:hover { color: var(--sig); border-color: var(--sig); }
.hero-index b { color: var(--sig); font-weight: 500; margin-right: 5px; }

@media (prefers-reduced-motion: no-preference) {
  .home-band .motto { animation: hb-rise .45s cubic-bezier(.2, .7, .2, 1) .2s both; }
  .home-band .motto + p.thesis { animation: hb-rise .45s cubic-bezier(.2, .7, .2, 1) .32s both; }
  .home-band .hero-actions { animation: hb-rise .45s cubic-bezier(.2, .7, .2, 1) .42s both; }
  .home-band .hero-index { animation: hb-rise .45s cubic-bezier(.2, .7, .2, 1) .5s both; }
}

/* Compact laptop height tuning (e.g. 1280x720) so all 8 top-level files hit 0px vertical overflow */
@media (min-width: 761px) and (max-height: 780px) {
  .frame { inset: 8px; grid-template-rows: 52px 1fr 44px; }
  .file { inset: 32px 22px 14px; }
  .fbody { padding: 14px 22px 14px; }
  .home .band { width: min(72%, calc((100vh - 355px) * 1568 / 968)); min-width: 220px; }
  .hero-copy { padding: 8px 20px 10px; }
  .home-band .motto { font-size: 22px; }
  .home-band .thesis { font-size: 14px; margin-top: 6px; }
  .hero-actions { margin-top: 10px; }
  .hero-index { margin-top: 10px; }
  .svc-head { margin-bottom: 6px; }
  .lede { font-size: 12.5px; margin-bottom: 8px; line-height: 1.48; }
  .facts { margin-bottom: 8px; gap: 8px; }
  .facts li { padding: 6px 12px; font-size: 12px; }
  .svc-cards .card, .cards .card { padding: 11px 14px; gap: 6px; }
  .card h2 { font-size: 14px; }
  .card p { font-size: 12px; line-height: 1.45; }
  .svc-list li { font-size: 11.5px; line-height: 1.4; }
  .ioa-stack { gap: 5px; margin-top: 8px; }
  .ioa-layer { padding: 6px 10px; font-size: 10px; }
  .svc-bar { padding-top: 8px; }
  .svc-bar-inner { padding: 8px 14px; }
  .gi-grid { gap: 10px; }
  .gi-top { padding: 8px 12px 7px; }
  .gi-photo { width: 64px; height: 74px; }
  .gi-quote { margin: 0 12px 9px; padding-top: 6px; }
  .gi-quote p { font-size: 13px; line-height: 1.4; }
  .about-copy .bio { font-size: 13.5px; line-height: 1.48; }
  .about-copy .bio + .bio { margin-top: .55em; }
  .book-panel { padding: 11px 14px; gap: 7px; }
  .cal-cell { font-size: 10px; }
  .slot-btn { padding: 5px 4px; font-size: 10px; }
  .book-form { gap: 7px; }
  .bf-field input, .bf-field select, .bf-field textarea { padding: 6px 8px; font-size: 13px; }
  .bf-field textarea { min-height: 46px; }
  .links { padding-top: 10px; }
}

/* ---- File viewport panes (tight, machined, fits one screen for top-level views) ---- */
.file {
  position: absolute;
  inset: 38px 28px 18px;
  background: rgba(10, 15, 26, .82);
  backdrop-filter: blur(4px);
}
.tab { height: 26px; font-size: 10.5px; }
.close { height: 26px; font-size: 10.5px; gap: 6px; transition: color .15s ease, background-color .15s ease; }
.close:hover { background: rgba(242, 106, 46, .12); color: var(--sig); }

.fbody {
  padding: clamp(14px, 1.8vh, 24px) clamp(20px, 2.2vw, 34px) clamp(12px, 1.6vh, 20px);
  display: flex;
  flex-direction: column;
}
.fh {
  font-family: Michroma;
  font-weight: 400;
  font-size: clamp(17px, 1.9vh, 23px);
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: clamp(6px, 1vh, 12px);
  flex: none;
}
.lede {
  color: var(--paper-soft);
  font-family: var(--m);
  font-size: clamp(12px, 1.45vh, 14.5px);
  line-height: 1.52;
  letter-spacing: 0;
  max-width: 100%;
  margin-bottom: clamp(10px, 1.4vh, 16px);
  flex: none;
}

/* ---- Tags & status indicators ---- */
.tag {
  display: inline-block;
  font: 500 10.5px var(--m);
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--sig);
  border: 1px dashed var(--sig-line);
  padding: 2px 7px;
  vertical-align: middle;
  line-height: 1.35;
  white-space: nowrap;
}
.tag.status {
  border-style: solid;
  border-color: var(--line);
  background: rgba(15, 22, 36, .9);
  color: var(--paper);
  font-size: 10.5px;
  padding: 3px 9px;
}
.tag.status i {
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--sig);
  margin-right: 7px;
  vertical-align: 1px;
}
.tag.status.concept i { background: var(--ice); }
.tag.status.dev i { background: var(--blue); }
.card .tag.status { align-self: flex-start; font-size: 10px; padding: 2px 7px; }

/* ---- Cards (IBM Plex Mono copy + Michroma display titles; vh-aware so all top-level panes stay 100% single-screen) ---- */
.cards { gap: clamp(12px, 1.2vw, 18px); }
.cards.four { gap: 12px; }
.card {
  border: 1px solid var(--line);
  border-left: 2px solid var(--line-hi);
  background: rgba(15, 22, 36, .82);
  padding: clamp(14px, 1.7vh, 18px) 18px;
  gap: 8px;
  min-height: 0;
  transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}
.cards.four .card { min-height: 0; }
.card .k { font: 500 10.5px var(--m); letter-spacing: .15em; color: var(--sig); }
.card h2 {
  font-family: Michroma;
  font-weight: 400;
  font-size: 13.5px;
  letter-spacing: .03em;
  color: var(--paper);
  line-height: 1.35;
}
.card p {
  font-family: var(--m);
  color: var(--paper-soft);
  font-size: 14.5px;
  line-height: 1.5;
  letter-spacing: 0;
}
.card .st, .card .cta { font: 500 10.5px var(--m); letter-spacing: .14em; padding-top: 4px; border-top: 1px dashed rgba(91, 141, 184, .32); }

/* Deliverable / spec bullet lists inside Services & Build cards */
.svc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: clamp(5px, .72vh, 9px);
  margin: 2px 0;
  padding-top: clamp(6px, .85vh, 10px);
  border-top: 1px dashed rgba(91, 141, 184, .28);
}
.svc-list li {
  position: relative;
  padding-left: 14px;
  font-family: var(--m);
  font-size: 13px;
  line-height: 1.42;
  color: var(--paper);
}
.svc-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 5px;
  height: 5px;
  background: var(--sig);
}

a.card { text-decoration: none; }
.card.featured {
  border-left: 2px solid var(--line-hi);
  background: rgba(15, 22, 36, .82);
}
/* Clickable cards only (a.card[href]). .card.featured's solid background
   must not override the gradient hover (it previously won on specificity+order). */
a.card:hover, a.card:focus-visible {
  border-color: var(--sig-line);
  border-left-color: var(--sig);
  background: linear-gradient(135deg, rgba(242, 106, 46, .08), rgba(20, 30, 50, .92) 48%);
  box-shadow: inset 0 0 0 1px rgba(242, 106, 46, .14);
}

.links { margin-top: auto; padding-top: clamp(8px, 1.1vh, 14px); gap: 22px; font-size: 11.5px; flex: none; }
.links a { transition: color .15s ease; }
.links a:hover { color: var(--sig); }

/* ---- Services (single-viewport compact fit) ---- */
.svc-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 20px;
  margin-bottom: clamp(10px, 1.4vh, 14px);
}
.svc-k {
  font: 500 11px var(--m);
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--sig);
}
.facts {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 clamp(12px, 1.6vh, 16px);
}
.facts li {
  border: 1px solid var(--line);
  border-left: 2px solid var(--ice);
  background: rgba(15, 22, 36, .66);
  padding: 9px 14px;
  color: var(--paper-soft);
  font-size: 13.5px;
  line-height: 1.45;
}
.facts li b {
  font: 500 10.5px var(--m);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--paper);
  margin-right: 6px;
}
.svc-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.svc-cards .card { border-left: 2px solid var(--line-hi); }
.svc-meta {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px dashed rgba(91, 141, 184, .32);
  font: 10.5px var(--m);
  letter-spacing: .08em;
  color: var(--dim);
}
.svc-bar {
  margin-top: auto;
  padding-top: 14px;
}
.svc-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  border: 1px solid var(--line);
  background: rgba(15, 22, 36, .78);
  padding: 13px 18px;
}
.svc-bar-inner p { color: var(--paper-soft); font-size: 14px; line-height: 1.45; max-width: 560px; }
.svc-bar-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ---- Research (single-viewport 2-column split: Featured IoA left + 4 structured areas right) ---- */
.res-split {
  display: grid;
  grid-template-columns: 1.05fr 1.25fr;
  gap: clamp(12px, 1.3vw, 18px);
  flex: 1;
  min-height: 0;
  align-items: stretch;
}
.res-split > .card.featured {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px 20px;
}
.ioa-stack {
  display: flex;
  flex-direction: column;
  gap: clamp(4px, .65vh, 8px);
  margin-top: clamp(8px, 1.1vh, 14px);
}
.ioa-layer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--ice);
  background: rgba(10, 15, 26, .78);
  padding: clamp(5px, .75vh, 9px) 11px;
  font: 500 clamp(9.5px, 1.05vh, 11px) var(--m);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--paper);
}
.ioa-layer.hot { border-left-color: var(--sig); border-color: rgba(242, 106, 46, .48); }
.ioa-layer.dim { border-style: dashed; border-left-style: solid; border-left-color: var(--untrusted); color: var(--dim); }
.ioa-layer em { font-style: normal; font-weight: 400; color: var(--dim); font-size: clamp(8.5px, .95vh, 10px); letter-spacing: .08em; }
.ioa-layer.hot em { color: var(--sig); }

.res-areas {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(10px, 1.1vw, 14px);
}
.res-areas .card { padding: 13px 15px; gap: 6px; }
.res-areas .card p { font-size: 13.5px; line-height: 1.45; }
.res-focus {
  margin-top: auto;
  padding-top: 6px;
  border-top: 1px dashed rgba(91, 141, 184, .32);
  font: 500 clamp(8.5px, 1vh, 10px) var(--m);
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--dim);
}
.res-focus b { color: var(--ice); font-weight: 500; margin-right: 4px; }

/* ---- About (single-viewport portrait + tightened approved bio) ---- */
.about-grid {
  display: grid;
  grid-template-columns: 206px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
.portrait-card {
  border: 1px solid var(--line);
  background: rgba(15, 22, 36, .84);
  padding: 10px;
}
.portrait-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 50% 35%, rgba(61, 127, 217, .14), transparent 65%),
    repeating-linear-gradient(0deg, rgba(174, 216, 246, .03) 0 1px, transparent 1px 4px),
    var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.portrait-frame::before {
  content: "";
  position: absolute;
  inset: 6px;
  pointer-events: none;
  background:
    linear-gradient(var(--sig), var(--sig)) left top/9px 1px,
    linear-gradient(var(--sig), var(--sig)) left top/1px 9px,
    linear-gradient(var(--sig), var(--sig)) right top/9px 1px,
    linear-gradient(var(--sig), var(--sig)) right top/1px 9px,
    linear-gradient(var(--sig), var(--sig)) left bottom/9px 1px,
    linear-gradient(var(--sig), var(--sig)) left bottom/1px 9px,
    linear-gradient(var(--sig), var(--sig)) right bottom/9px 1px,
    linear-gradient(var(--sig), var(--sig)) right bottom/1px 9px;
  background-repeat: no-repeat;
  z-index: 2;
}
.portrait-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; filter: saturate(.84) contrast(1.03); z-index: 1; }
.portrait-silhouette { width: 58%; height: auto; opacity: .52; color: var(--dim); }
.portrait-slot-hint {
  margin-top: 8px;
  font: 9.5px var(--m);
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--dim);
  text-align: center;
  padding: 0 8px;
  line-height: 1.4;
}
.portrait-meta {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed rgba(91, 141, 184, .35);
  display: grid;
  gap: 4px;
  font: 10.5px var(--m);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.portrait-meta .pm-name { color: var(--paper); font-weight: 500; font-size: 11.5px; }
.portrait-meta .pm-role { color: var(--sig); font-size: 10px; }
.portrait-meta .pm-loc { color: var(--dim); font-size: 10px; }

.about-copy { display: flex; flex-direction: column; height: 100%; }
.about-copy .bio { font-family: var(--m); font-size: clamp(11.8px, 1.35vh, 14.2px); line-height: 1.58; color: var(--paper-soft); max-width: 860px; }
.about-copy .bio + .bio { margin-top: .85em; }
.about-copy .bio:first-child { color: var(--paper); }

/* ---- G.I. Joe Tactical File Cards (Testimonials: 2x2 grid fitting ONE desktop screen) ---- */
.gi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  flex: 1;
  align-content: start;
}
.gi-card {
  position: relative;
  border: 1px dashed rgba(154, 171, 194, .5);
  background: linear-gradient(180deg, rgba(19, 29, 48, .86), rgba(10, 15, 26, .92));
  display: flex;
  flex-direction: column;
  transition: border-color .18s ease, transform .18s ease;
}
.gi-card[hidden] { display: none; }
.gi-foot {
  margin-top: auto;
  padding-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}
.gi-foot .links { margin-top: 0; padding-top: 0; }
.gi-pager {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 500 11px var(--m);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--dim);
}
.gi-pager button {
  background: rgba(15, 22, 36, .85);
  color: var(--paper);
  border: 1px solid var(--line-hi);
  padding: 5px 11px;
  font: 500 10.5px var(--m);
  letter-spacing: .14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease, background-color .15s ease;
}
.gi-pager button:hover:not(:disabled) {
  border-color: var(--sig);
  color: var(--sig);
  background: rgba(242, 106, 46, .08);
}
.gi-pager button:disabled { opacity: .35; cursor: default; }
.gi-pager .gi-count { color: var(--ice); min-width: 72px; text-align: center; }
.gi-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  pointer-events: none;
  background:
    linear-gradient(var(--sig), var(--sig)) left top/9px 2px,
    linear-gradient(var(--sig), var(--sig)) left top/2px 9px,
    linear-gradient(var(--sig), var(--sig)) right top/9px 2px,
    linear-gradient(var(--sig), var(--sig)) right top/2px 9px,
    linear-gradient(var(--sig), var(--sig)) left bottom/9px 2px,
    linear-gradient(var(--sig), var(--sig)) left bottom/2px 9px,
    linear-gradient(var(--sig), var(--sig)) right bottom/9px 2px,
    linear-gradient(var(--sig), var(--sig)) right bottom/2px 9px;
  background-repeat: no-repeat;
}
.gi-tab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 12px;
  background: rgba(242, 106, 46, .11);
  border-bottom: 1px solid var(--line);
  font: 500 10px var(--m);
  letter-spacing: .15em;
  text-transform: uppercase;
}
.gi-tab-id { display: inline-flex; align-items: center; gap: 7px; color: var(--paper); }
.gi-tab-id i { width: 5px; height: 5px; background: var(--sig); }
.gi-tab-tag { font-size: 9px; color: var(--sig); border: 1px dashed var(--sig-line); padding: 1px 5px; }

.gi-top {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 14px;
  padding: 11px 14px 9px;
  align-items: center;
}
.gi-photo {
  position: relative;
  width: 74px;
  height: 86px;
  border: 1px solid var(--line-hi);
  background:
    repeating-linear-gradient(0deg, rgba(174, 216, 246, .04) 0 1px, transparent 1px 4px),
    var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.gi-photo::after {
  content: "";
  position: absolute;
  inset: 3px;
  pointer-events: none;
  background:
    linear-gradient(var(--sig), var(--sig)) left top/6px 1px,
    linear-gradient(var(--sig), var(--sig)) left top/1px 6px,
    linear-gradient(var(--sig), var(--sig)) right bottom/6px 1px,
    linear-gradient(var(--sig), var(--sig)) right bottom/1px 6px;
  background-repeat: no-repeat;
}
.gi-photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.2) contrast(1.04); }
.gi-photo svg { width: 46px; height: 46px; opacity: .5; color: var(--dim); }

.gi-specs {
  display: grid;
  gap: 4px;
  font: 10.5px var(--m);
  letter-spacing: .09em;
  text-transform: uppercase;
  min-width: 0;
}
.gi-row {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 6px;
  padding-bottom: 3px;
  border-bottom: 1px dotted rgba(91, 141, 184, .4);
  align-items: baseline;
}
.gi-row:last-child { border-bottom: 0; padding-bottom: 0; }
.gi-row dt { color: var(--dim); font-size: 9.5px; }
.gi-row dd { color: var(--paper); font-weight: 500; overflow-wrap: break-word; }
.gi-row.gi-name dd { font-size: 11.5px; letter-spacing: .11em; }
.gi-row.gi-co dd { color: var(--ice); }

.gi-quote {
  margin: 0 14px 11px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.gi-quote-lbl { font: 500 9px var(--m); letter-spacing: .15em; text-transform: uppercase; color: var(--sig); }
.gi-quote p { font-size: 13.5px; line-height: 1.48; color: var(--paper-soft); }

/* ---- Nested detail file panes (diagram immediately visible at top, prose scrolls cleanly inside .fbody) ---- */
.file.detail .fbody { overflow-y: auto; display: block; }
.p-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-bottom: 8px;
}
.p-head .fh { margin-bottom: 0; flex: 1 1 280px; }
.psub {
  font-family: Michroma;
  font-size: clamp(14.5px, 1.35vw, 17px);
  line-height: 1.48;
  color: var(--paper);
  max-width: 840px;
  margin: 4px 0 14px;
}
.note {
  font-size: 13px;
  line-height: 1.5;
  color: var(--dim);
  max-width: 820px;
  border-left: 2px solid var(--ice);
  background: rgba(15, 22, 36, .66);
  padding: 8px 12px;
  margin: 0 0 14px;
}

.pfig {
  margin: 4px 0 20px;
  border: 1px solid var(--line);
  background: rgba(8, 12, 22, .88);
  padding: 14px 14px 10px;
  max-width: 880px;
}
.pfig figcaption {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed rgba(91, 141, 184, .3);
  font: 10.5px var(--m);
  letter-spacing: .07em;
  color: var(--dim);
  line-height: 1.45;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.scroll-cue { color: var(--sig); text-transform: uppercase; letter-spacing: .14em; }

.psec { margin-top: 22px; max-width: 860px; }
.psec h2 {
  font: 500 11.5px var(--m);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--sig);
  margin-bottom: 9px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.psec h2::after { content: ""; flex: 1; height: 1px; background: rgba(91, 141, 184, .25); }
.psec p { color: var(--paper-soft); font-size: 15.5px; line-height: 1.68; margin-bottom: 10px; }
.psec p b, .psec p strong { color: var(--paper); font-weight: 500; }

.pgrid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 12px 0 8px; }
.pgrid-4 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 12px 0 8px; }
.pbox {
  border: 1px solid var(--line);
  border-left: 2px solid var(--line-hi);
  background: rgba(15, 22, 36, .76);
  padding: 14px 16px;
  transition: border-color .16s ease, background-color .16s ease;
}
.pbox.hot { border-left-color: var(--line-hi); }
.pbox .pk { display: block; font: 500 10px var(--m); letter-spacing: .14em; text-transform: uppercase; color: var(--sig); margin-bottom: 5px; }
.pbox h3 { font: 500 13px var(--m); letter-spacing: .08em; text-transform: uppercase; color: var(--paper); margin-bottom: 6px; }
.pbox p { font-size: 14px; line-height: 1.54; color: var(--paper-soft); margin: 0; }

.stat-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 14px 0 10px; }
.stat-cell { border: 1px solid var(--line); background: rgba(10, 15, 26, .82); padding: 12px 14px; }
.stat-cell strong { display: block; font-family: Michroma; font-size: 18px; color: var(--paper); margin-bottom: 4px; }
.stat-cell strong.sig { color: var(--sig); }
.stat-cell span { display: block; font: 10.5px var(--m); letter-spacing: .06em; color: var(--dim); line-height: 1.45; }

/* ---- Animated SVG Diagrams (compact height so entire diagram sits in first viewport) ---- */
.dg { width: 100%; max-width: 840px; height: auto; display: block; margin: 0 auto; }
.dg.t { display: none; }
.dg text { font-family: var(--m); letter-spacing: .07em; fill: var(--paper); font-size: 12.5px; font-weight: 500; }
.dg text.sm { font-size: 11px; }
.dg .sub { fill: var(--dim); font-size: 9.8px; font-weight: 400; letter-spacing: .04em; }
.dg text.sig { fill: var(--sig); }
.dg text.ice { fill: var(--ice); }
.dg .box { fill: rgba(15, 22, 36, .92); stroke: var(--grid); stroke-width: 1.5; }
.dg .box.hot { stroke: var(--sig); fill: rgba(242, 106, 46, .09); }
.dg .box.ice { stroke: var(--ice); fill: rgba(61, 127, 217, .11); }
.dg .box.ext { stroke: var(--untrusted); fill: rgba(107, 120, 139, .1); }
.dg .zone { fill: rgba(154, 171, 194, .04); stroke: rgba(91, 141, 184, .45); stroke-width: 1.2; }
.dg .zone.sig { fill: rgba(242, 106, 46, .04); stroke: rgba(242, 106, 46, .55); }
.dg .zone.ext { fill: rgba(107, 120, 139, .05); stroke: rgba(107, 120, 139, .48); }
.dg .ln { fill: none; stroke: var(--ice); stroke-width: 1.5; }
.dg .ln.sig { stroke: var(--sig); }
.dg .ln.dim { stroke: rgba(154, 171, 194, .45); }
.dg .dash .box, .dg .dash .ln, .dg .dash .zone, .dg .dashl { stroke-dasharray: 6 5; }
.dg .ah { fill: var(--ice); }
.dg .ah.sig { fill: var(--sig); }
.dg .wv { fill: var(--blue); transform-box: fill-box; transform-origin: center; }
.dg .tl { fill: rgba(154, 171, 194, .34); }
.dg .claim { fill: rgba(242, 106, 46, .62); }
.dg .pill { fill: rgba(242, 106, 46, .12); stroke: var(--sig); stroke-width: 1.2; }

.dg .flow {
  fill: none;
  stroke: var(--ice);
  stroke-width: 2.2;
  stroke-dasharray: 10 38;
  stroke-linecap: round;
  opacity: .9;
}
.dg .flow.sig { stroke: var(--sig); }

@media (prefers-reduced-motion: no-preference) {
  .dg.live .flow { animation: dg-flow 2.8s linear infinite; }
  .dg.live .flow.slow { animation-duration: 4.2s; }
  .dg.live .pulse-node { animation: dg-pulse 3.4s ease-in-out infinite; }
  .dg.live .wv { animation: dg-wave 1.8s ease-in-out infinite alternate; }
  .dg.live .wv:nth-child(odd) { animation-delay: .25s; animation-duration: 1.45s; }
  .dg.live .wv:nth-child(3n) { animation-delay: .55s; animation-duration: 2.05s; }
  .dg.live .scan-claim { animation: dg-claim 3s ease-in-out infinite; }
}
@keyframes dg-flow { from { stroke-dashoffset: 48; } to { stroke-dashoffset: 0; } }
@keyframes dg-pulse {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(242, 106, 46, 0)); }
  50% { filter: drop-shadow(0 0 8px rgba(242, 106, 46, .52)); }
}
@keyframes dg-wave { 0% { transform: scaleY(.55); opacity: .7; } 100% { transform: scaleY(1.18); opacity: 1; } }
@keyframes dg-claim { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }

@media (max-width: 980px) {
  .dg.w { display: none; }
  .dg.t { display: block; max-width: 390px; }
}

.pcta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  max-width: 860px;
}
.pcta p { color: var(--dim); font-size: 14px; line-height: 1.5; max-width: 540px; }

.pn { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 20px; max-width: 860px; }
.pn a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 1px solid var(--line);
  background: rgba(15, 22, 36, .68);
  padding: 12px 15px;
  text-decoration: none;
  color: var(--paper);
  font: 500 12px var(--m);
  letter-spacing: .1em;
  text-transform: uppercase;
  transition: border-color .16s ease;
}
.pn a span { font-size: 10px; color: var(--dim); letter-spacing: .13em; }
.pn a:hover { border-color: var(--sig-line); }
.pn .next { text-align: right; grid-column: 2; }

/* Directional View Transitions when clicking up/down the sidebar */
@media (prefers-reduced-motion: no-preference) {
  html[data-flip="next"]::view-transition-old(file) { animation: flip-out-up 180ms ease-out both; }
  html[data-flip="next"]::view-transition-new(file) { animation: flip-in-up 240ms cubic-bezier(.2, .75, .2, 1) 60ms both; }
  html[data-flip="prev"]::view-transition-old(file) { animation: flip-out-dn 180ms ease-out both; }
  html[data-flip="prev"]::view-transition-new(file) { animation: flip-in-dn 240ms cubic-bezier(.2, .75, .2, 1) 60ms both; }
}
@keyframes flip-out-up { to { opacity: 0; transform: translateY(-14px) scale(.99); } }
@keyframes flip-in-up  { from { opacity: 0; transform: translateY(16px) scale(.99); } to { opacity: 1; transform: none; } }
@keyframes flip-out-dn { to { opacity: 0; transform: translateY(14px) scale(.99); } }
@keyframes flip-in-dn  { from { opacity: 0; transform: translateY(-16px) scale(.99); } to { opacity: 1; transform: none; } }

/* ---- Footer with compact email Updates signup ---- */
.foot {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 24px;
  font: 10.5px var(--m);
  letter-spacing: .09em;
  gap: 16px;
}
.foot .fc { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; justify-self: center; }
.foot .fr { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap; justify-self: end; }
.foot a { color: var(--dim); text-decoration: none; transition: color .15s ease; }
.foot a:hover { color: var(--sig); }
.foot .fc a[href^="https://"] { color: var(--paper); font-weight: 500; }
.foot .fc a[href^="https://"]:hover { color: var(--sig); }
.foot .fc .em,
.foot .fr .co { border-left: 1px solid rgba(91, 141, 184, .42); padding-left: 12px; line-height: 1.15; }
.foot .em { text-transform: none; letter-spacing: .04em; color: var(--paper-soft); }
.foot .co { margin-left: 0; margin-right: 0; color: var(--dim); white-space: nowrap; }

.foot-sub { display: flex; align-items: center; gap: 8px; margin-left: 0; justify-self: start; }
.foot-sub label { font: 10px var(--m); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); white-space: nowrap; }
.foot-sub input[type="email"] {
  background: var(--ink2);
  border: 1px solid var(--line);
  color: var(--paper);
  font: 11.5px var(--m);
  padding: 4px 10px;
  width: 185px;
  height: 27px;
}
.foot-sub input[type="email"]::placeholder { color: rgba(154, 171, 194, .65); }
.foot-sub input[type="email"]:focus { border-color: var(--sig); outline: none; }
.foot-sub button {
  background-color: var(--sig);
  color: var(--ink);
  border: 0;
  height: 27px;
  padding: 0 11px;
  font: 500 10px var(--m);
  letter-spacing: .14em;
  text-transform: uppercase;
  cursor: pointer;
}
.foot-sub button:hover { background-color: #FF7B3F; }
.foot-sub .sub-msg { display: none; font: 500 10.5px var(--m); letter-spacing: .12em; text-transform: uppercase; color: var(--ice); }
.foot-sub.done input, .foot-sub.done button, .foot-sub.done label { display: none; }
.foot-sub.done .sub-msg { display: inline; }

/* ---- Articles & Contact ---- */
.art { max-width: 760px; }
.art p { color: var(--paper-soft); font-size: 16px; line-height: 1.7; margin-bottom: 14px; }
.ameta { margin: 12px 0 18px; font: 11px var(--m); letter-spacing: .14em; color: var(--dim); text-transform: uppercase; }
.lede.small { margin-top: 14px; font-size: 14.5px; }
.lede a { color: var(--paper); }
.lede a:hover, .lede a:focus-visible { color: var(--sig); }

.contact-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 18px; max-width: 880px; }
.contact-card {
  border: 1px solid var(--line);
  border-left: 2px solid var(--line-hi);
  background: rgba(15, 22, 36, .78);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
.contact-card h2 { font: 500 12.5px var(--m); letter-spacing: .14em; text-transform: uppercase; color: var(--paper); }
.contact-card p { color: var(--paper-soft); font-size: 14.5px; line-height: 1.55; }
.contact-list { list-style: none; display: grid; gap: 9px; }
.contact-list li { border-left: 1px solid var(--line-hi); padding-left: 12px; color: var(--paper-soft); font-size: 14px; line-height: 1.48; }
.contact-list b { color: var(--paper); font-weight: 500; }

/* ---- Native 15-Min Discovery Booking Pane (book.html) ---- */
.book-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 10px; }
.book-meta { font: 500 10px var(--m); letter-spacing: .14em; text-transform: uppercase; color: var(--ice); }
.book-grid { display: grid; grid-template-columns: 1.02fr 1fr; gap: 16px; flex: 1; min-height: 0; align-items: stretch; }
.book-panel {
  border: 1px solid var(--line);
  border-left: 2px solid var(--line-hi);
  background: rgba(15, 22, 36, .8);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  min-height: 0;
}
.book-panel h2 {
  font: 500 11px var(--m);
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.book-tz { font: 400 10px var(--m); letter-spacing: .08em; color: var(--dim); text-transform: none; }
.book-picker { display: grid; grid-template-columns: 1.25fr .95fr; gap: 14px; flex: 1; min-height: 0; }
.cal-box { display: flex; flex-direction: column; gap: 6px; }
.cal-nav { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.cal-month { font: 500 10.5px var(--m); letter-spacing: .14em; text-transform: uppercase; color: var(--paper); }
.cal-arrow {
  background: rgba(10, 15, 26, .88);
  border: 1px solid var(--line);
  color: var(--paper-soft);
  width: 24px;
  height: 24px;
  font: 13px var(--m);
  line-height: 1;
  cursor: pointer;
  transition: border-color .14s ease, color .14s ease;
}
.cal-arrow:hover:not(:disabled) { border-color: var(--sig); color: var(--sig); }
.cal-arrow:disabled { opacity: .28; cursor: not-allowed; }
.cal-dow { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; text-align: center; font: 500 9px var(--m); letter-spacing: .1em; text-transform: uppercase; color: var(--dim); padding-top: 2px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-cell {
  aspect-ratio: 1 / .92;
  background: rgba(10, 15, 26, .84);
  border: 1px solid var(--line);
  color: var(--paper);
  font: 500 11px var(--m);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .14s ease, color .14s ease, background .14s ease;
}
.cal-cell:hover:not(:disabled) { border-color: var(--sig); color: var(--sig); }
.cal-cell.active { border-color: var(--sig); background: rgba(242, 106, 46, .18); color: var(--sig); box-shadow: inset 0 1px 0 rgba(242, 106, 46, .35); }
.cal-cell:disabled { opacity: .26; cursor: not-allowed; border-color: transparent; background: rgba(10, 15, 26, .35); }
.cal-cell.blank { background: transparent; border: 0; pointer-events: none; }
.slots-col { display: flex; flex-direction: column; gap: 7px; min-height: 0; border-left: 1px dashed rgba(91, 141, 184, .32); padding-left: 12px; }
.slots-day-lbl { font: 500 10px var(--m); letter-spacing: .13em; text-transform: uppercase; color: var(--ice); }
.book-slots-wrap { flex: 1; min-height: 0; overflow-y: auto; padding-right: 2px; }
.book-slots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.slot-btn {
  background: rgba(10, 15, 26, .84);
  border: 1px solid var(--line);
  color: var(--paper);
  padding: 7px 5px;
  font: 500 10.5px var(--m);
  letter-spacing: .06em;
  cursor: pointer;
  transition: border-color .14s ease, background .14s ease, color .14s ease;
}
.slot-btn:hover { border-color: var(--sig); color: var(--sig); }
.slot-btn.active { background: var(--sig); border-color: var(--sig); color: var(--ink); }
.book-note-bar {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px dashed rgba(91, 141, 184, .32);
  font: 10px var(--m);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--dim);
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.book-note-bar b { color: var(--ice); font-weight: 500; }

.book-form { display: flex; flex-direction: column; gap: 10px; flex: 1; min-height: 0; }
.bf-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.bf-field { display: flex; flex-direction: column; gap: 4px; }
.bf-field label { font: 500 9.5px var(--m); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.bf-field input,
.bf-field select,
.bf-field textarea {
  background: rgba(10, 15, 26, .9);
  border: 1px solid var(--line);
  color: var(--paper);
  font: 12.5px var(--m);
  padding: 8px 10px;
  transition: border-color .14s ease;
}
.bf-field select { font-family: var(--m); cursor: pointer; }
.bf-field textarea { resize: none; min-height: 62px; line-height: 1.45; }
.bf-field input:focus,
.bf-field select:focus,
.bf-field textarea:focus { border-color: var(--sig); outline: none; }
.bf-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.bf-foot {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.bf-picked {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 500 10.5px var(--m);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--paper);
  border: 1px solid rgba(91, 141, 184, .42);
  background: rgba(10, 15, 26, .9);
  padding: 6px 10px;
}
.bf-picked i { width: 6px; height: 6px; background: var(--sig); flex: none; }
.bf-picked.empty { color: var(--dim); border-color: var(--line); }
.bf-picked.empty i { background: var(--dim); }
.bf-status { font: 11px var(--m); letter-spacing: .06em; color: var(--sig); min-height: 16px; }
.book-confirm {
  display: none;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  justify-content: center;
  border: 1px dashed rgba(242, 106, 46, .5);
  background: rgba(10, 15, 26, .82);
  padding: 18px;
}
.book-confirm.show { display: flex; }
.book-confirm .bc-k { font: 500 10.5px var(--m); letter-spacing: .16em; text-transform: uppercase; color: var(--sig); }
.book-confirm h3 { font-family: Michroma; font-size: 16px; font-weight: 400; color: var(--paper); }
.book-confirm p { font-size: 13.5px; line-height: 1.55; color: var(--paper-soft); }
.book-confirm .bc-slot { font: 500 11.5px var(--m); letter-spacing: .1em; color: var(--ice); }

/* ---- 404 Higher-Dimensional Polytope Fault Pane (404.html) ---- */
.nf-body { padding: 16px 22px 16px; }
.nf-grid { display: grid; grid-template-columns: 1.55fr .82fr; gap: 20px; flex: 1; min-height: 0; align-items: stretch; }
.nf-stage {
  position: relative;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 50% 50%, rgba(61, 127, 217, .12), rgba(10, 15, 26, .92) 72%),
    var(--ink);
  overflow: hidden;
  min-height: 300px;
  cursor: grab;
  touch-action: none;
}
.nf-stage.grabbing { cursor: grabbing; }
#nf-canvas { display: block; width: 100%; height: 100%; }
.nf-hud-top, .nf-hud-bot {
  position: absolute;
  left: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  pointer-events: none;
}
.nf-hud-top { top: 10px; font: 500 9.5px var(--m); letter-spacing: .14em; text-transform: uppercase; }
.nf-tag { color: var(--sig); }
.nf-angles { color: var(--dim); font-weight: 400; }
.nf-hud-bot { bottom: 10px; }
.nf-dims { display: flex; gap: 6px; pointer-events: auto; }
.nf-dbtn, .nf-ctrl-toggle {
  background: rgba(10, 15, 26, .88);
  border: 1px solid var(--line);
  color: var(--dim);
  padding: 5px 9px;
  font: 500 9.5px var(--m);
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
  pointer-events: auto;
  transition: border-color .14s ease, color .14s ease, background .14s ease;
}
.nf-dbtn:hover:not(:disabled), .nf-ctrl-toggle:hover { border-color: var(--sig); color: var(--paper); }
.nf-dbtn.active, .nf-ctrl-toggle[aria-expanded="true"] { border-color: var(--sig); background: rgba(242, 106, 46, .16); color: var(--sig); }
.nf-dbtn:disabled { opacity: .28; cursor: not-allowed; }
.nf-hint { font: 9px var(--m); letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }

/* Collapsible lab controls drawer (closed by default) */
.nf-drawer {
  position: absolute;
  right: 12px;
  bottom: 42px;
  width: 244px;
  border: 1px solid var(--line-hi);
  background: rgba(10, 15, 26, .92);
  backdrop-filter: blur(8px);
  padding: 12px 13px;
  display: none;
  flex-direction: column;
  gap: 9px;
  z-index: 4;
  cursor: default;
}
.nf-drawer.open { display: flex; }
.nfd-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.nfd-lbl { font: 500 9px var(--m); letter-spacing: .13em; text-transform: uppercase; color: var(--dim); }
.nfd-seg { display: flex; gap: 4px; }
.nfd-btn {
  background: rgba(15, 22, 36, .9);
  border: 1px solid var(--line);
  color: var(--dim);
  padding: 3px 7px;
  font: 500 9px var(--m);
  letter-spacing: .09em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color .14s ease, color .14s ease, background .14s ease;
}
.nfd-btn:hover { border-color: var(--sig); color: var(--paper); }
.nfd-btn.active { border-color: var(--sig); background: rgba(242, 106, 46, .18); color: var(--sig); }
.nfd-slide { display: flex; flex-direction: column; gap: 3px; font: 9px var(--m); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.nfd-slide span { display: flex; justify-content: space-between; }
.nfd-slide b { color: var(--paper); font-weight: 500; }
.nfd-slide input[type="range"] { width: 100%; accent-color: var(--sig); height: 14px; cursor: pointer; }
.nfd-foot { display: flex; align-items: center; justify-content: space-between; padding-top: 6px; border-top: 1px dashed rgba(91, 141, 184, .32); }
.nfd-reset {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ice);
  padding: 3px 8px;
  font: 500 9px var(--m);
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
}
.nfd-reset:hover { border-color: var(--sig); color: var(--sig); }

.nf-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding: 4px 2px;
}
.nf-code { font: 500 10px var(--m); letter-spacing: .16em; text-transform: uppercase; color: var(--sig); }
.nf-title { font-family: Michroma; font-weight: 400; font-size: clamp(18px, 1.8vw, 23px); line-height: 1.34; color: var(--paper); }
.nf-trace {
  border: 1px solid var(--line);
  border-left: 2px solid var(--line-hi);
  background: rgba(15, 22, 36, .76);
  padding: 12px 14px;
  display: grid;
  gap: 6px;
  font: 11px var(--m);
  letter-spacing: .08em;
}
.nf-trace .tk { color: var(--dim); display: inline-block; width: 64px; }
.nf-trace .tv { color: var(--paper); }
.nf-trace .tv.sig { color: var(--sig); }
.nf-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.nf-files {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px dashed rgba(91, 141, 184, .32);
  font: 10.5px var(--m);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.nf-files a { color: var(--dim); text-decoration: none; transition: color .14s ease; }
.nf-files a:hover { color: var(--sig); }
.nf-files b { color: var(--sig); font-weight: 500; margin-right: 4px; }

/* ---- Responsive ---- */
@media (max-width: 980px) {
  .res-split { grid-template-columns: 1fr; }
  .svc-cards { grid-template-columns: 1fr; }
  .pgrid-3, .stat-strip { grid-template-columns: 1fr; }
  .foot { display: flex; justify-content: space-between; gap: 12px; }
  .foot-sub label { display: none; }
  .foot-sub input[type="email"] { width: 148px; }
}
@media (max-width: 980px) {
  .sys-stat { display: none; }
  .about-grid { grid-template-columns: 1fr; }
  .portrait-card { max-width: 210px; }
  .gi-grid { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; }
  .pgrid-4 { grid-template-columns: 1fr; }
  .contact-grid, .book-grid, .nf-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .frame::after { display: none; }
  .top .hbtn { padding: 7px 11px; font-size: 10px; }
  .rail {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    justify-content: space-between;
    gap: 2px;
    padding: 6px 8px;
  }
  .rail::-webkit-scrollbar { display: none; }
  .rail a { white-space: nowrap; padding: 7px 5px; font-size: 9.5px; letter-spacing: .06em; }
  .rail a[aria-current] { color: var(--sig); }
  .rail a.btn { flex: none; margin: 2px 0 2px 4px; padding: 6px 8px; font-size: 9.5px; letter-spacing: .06em; }

  .home .stage { overflow: visible; }
  .home .home-band { position: static; padding: 20px 14px 28px; }
  .home .band { width: 100%; min-width: 0; }
  .hero-copy { padding: 12px 10px; }
  .file { position: relative; inset: auto; margin: 42px 12px 20px; }
  .fbody { padding: 20px 16px 24px; overflow: visible; }
  .res-areas { grid-template-columns: 1fr; }
  .pn { grid-template-columns: 1fr; }
  .pn .next { grid-column: 1; text-align: left; }
  .gi-top { grid-template-columns: 68px minmax(0, 1fr); gap: 12px; }
  .gi-photo { width: 68px; height: 80px; }
  .gi-row { grid-template-columns: 62px minmax(0, 1fr); }
  .bf-row { grid-template-columns: 1fr; }
  .book-picker { grid-template-columns: 1fr; }
  .slots-col { border-left: 0; padding-left: 0; border-top: 1px dashed rgba(91, 141, 184, .32); padding-top: 10px; }
  .book-slots { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .foot { display: flex; flex-direction: column; align-items: flex-start; padding: 18px 16px; gap: 12px; }
  .foot .fc, .foot .fr { justify-content: flex-start; justify-self: start; }
  .foot .co { margin: 0 !important; display: inline !important; }
  .foot .fc .em,
  .foot .fr .co { border-left: 0; padding-left: 0; }
  .foot-sub { margin-left: 0; width: 100%; }
  .foot-sub input[type="email"] { flex: 1; width: auto; }
  .labels a[href$="services.html"] text { transform: translateY(-10px); }
}

/* ---- Narrow-screen guard (Nov 29 port): nothing may push the page wider than the phone ---- */
@media (max-width: 760px) {
  html, body { max-width: 100%; overflow-x: clip; }
  .frame, .file, .fbody, .cards, .svc-cards, .res-split, .card, .ioa-stack, .ioa-layer { min-width: 0; max-width: 100%; }
  .lede, .card p, .card h2, .svc-list li, .ioa-layer span, .ioa-layer em, .res-focus, .tag { overflow-wrap: anywhere; }
  .ioa-layer { flex-wrap: wrap; row-gap: 2px; }
  .btn { max-width: 100%; white-space: normal; text-align: center; }
  .contact-grid, .book-grid, .nf-grid, .book-picker { grid-template-columns: minmax(0, 1fr); }
  .book-panel, .book-head, .book-picker, .book-form, .cal-box { min-width: 0; max-width: 100%; }
  .fh { overflow-wrap: anywhere; min-width: 0; }
  .bf-row { grid-template-columns: minmax(0, 1fr); }
  .bf-field { min-width: 0; }
  .bf-field input, .bf-field select, .bf-field textarea { min-width: 0; max-width: 100%; box-sizing: border-box; }
}
@media (max-width: 380px) {
  .fh { font-size: 14px; flex-wrap: wrap; }
  .fh::after { min-width: 24px; }
}

/* Re-assert compact type after the sandbox 14.5px card rules so 1280x720
   and other max-height 780px windows keep a single-screen fit. */
@media (min-width: 761px) and (max-height: 780px) {
  .fh { font-size: 16px; margin-bottom: 6px; }
  .lede { font-size: 12.5px; margin-bottom: 6px; line-height: 1.4; }
  .svc-head { margin-bottom: 4px; }
  .card h2 { font-size: 13px; line-height: 1.28; }
  .card p { font-size: 12.5px; line-height: 1.38; }
  .svc-cards .card, .cards .card { padding: 8px 12px; gap: 4px; }
  .svc-cards .card p { font-size: 12.5px; line-height: 1.38; }
  .res-areas .card { padding: 8px 11px; gap: 4px; }
  .res-areas .card p { font-size: 12px; line-height: 1.35; }
  .res-split { gap: 10px; }
  .res-split > .card.featured { padding: 12px 14px; }
  .svc-list { gap: 3px; padding-top: 5px; }
  .svc-list li { font-size: 11.5px; line-height: 1.3; }
  .ioa-stack { gap: 4px; margin-top: 6px; }
  .ioa-layer { font-size: 10px; padding: 4px 8px; }
  .ioa-layer em { font-size: 9px; }
  .svc-bar { padding-top: 6px; }
  .svc-bar-inner { padding: 6px 12px; }
  .svc-bar-inner p { font-size: 12.5px; }
  .about-copy .bio { font-size: 13px; line-height: 1.42; }
  .links { font-size: 11px; padding-top: 6px; }
  .gi-grid { gap: 8px; }
  .gi-quote p { font-size: 12.5px; line-height: 1.35; }
}

/* Extra squeeze for short + narrow desktops (e.g. 1024x768) where the
   14.5px sandbox type wraps to more lines than at 1280. */
@media (min-width: 761px) and (max-width: 1100px) and (max-height: 780px) {
  .fh { font-size: 15px; margin-bottom: 4px; }
  .lede { font-size: 12px; margin-bottom: 4px; line-height: 1.35; }
  .svc-head { margin-bottom: 2px; }
  .card h2 { font-size: 12.5px; line-height: 1.22; }
  .card p { font-size: 12px; line-height: 1.32; }
  .svc-cards .card, .cards .card { padding: 7px 10px; gap: 3px; }
  .svc-cards .card p { font-size: 12px; line-height: 1.32; }
  .res-areas .card { padding: 7px 10px; gap: 3px; }
  .res-areas .card p { font-size: 11.5px; line-height: 1.32; }
  .res-split { gap: 8px; }
  .res-split > .card.featured { padding: 10px 12px; }
  .svc-list { gap: 2px; padding-top: 4px; }
  .svc-list li { font-size: 11px; line-height: 1.25; }
  .ioa-stack { gap: 3px; margin-top: 4px; }
  .ioa-layer { font-size: 9.5px; padding: 3px 7px; }
  .svc-bar { padding-top: 4px; }
  .svc-bar-inner { padding: 5px 10px; }
  .svc-bar-inner p { font-size: 11.5px; line-height: 1.3; }
  .about-copy .bio { font-size: 12.5px; line-height: 1.38; }
  .links { padding-top: 4px; font-size: 10.5px; }
}

/* ---- "For agents" nav pill (Nov 29): reverse of the orange JOIN pill: ink interior, orange outline + text, same size & corner marks.
   Unnumbered and placed after any future Testimonials/Thought links, just before the Contact button. ---- */
.rail a.agents-pill {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0;
  height: 27px;
  margin: 10px 20px 0;
  padding: 0 11px;
  font: 500 10px var(--m);
  letter-spacing: .14em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--sig);
  background-color: var(--ink);
  border: 1px solid var(--sig) !important;
  background-image:
    linear-gradient(rgba(242, 106, 46, .7), rgba(242, 106, 46, .7)),
    linear-gradient(rgba(242, 106, 46, .7), rgba(242, 106, 46, .7)),
    linear-gradient(225deg, rgba(242, 106, 46, .85) 50%, transparent 50.5%);
  background-size: 16px 1px, 1px 4px, 5px 5px;
  background-position: 3px calc(100% - 3px), 3px calc(100% - 3px), calc(100% - 3px) 3px;
  background-repeat: no-repeat;
}
.rail a.agents-pill:hover { color: #FF7B3F; background-color: rgba(242, 106, 46, .1); border-color: #FF7B3F !important; }
.rail a.agents-pill[aria-current] { color: var(--paper); border-color: var(--sig) !important; background-color: rgba(242, 106, 46, .12); }
@media (max-width: 760px) {
  .rail a.agents-pill { flex: none; height: auto; margin: 2px 0 2px 4px; padding: 5px 7px; font-size: 9.5px; letter-spacing: .06em; background-color: var(--ink) !important; }
  .rail a.agents-pill[aria-current] { background-color: rgba(242, 106, 46, .12) !important; }
}

/* ---- /agents page ---- */
.ag-doc { max-width: 980px; }
.ag-doc .ag-files { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 4px 0 8px; }
.ag-doc .ag-files .card { display: flex; flex-direction: column; text-decoration: none; }
.ag-doc .ag-files .card h2 { margin: 0; font-size: 18px; }
.ag-doc .ag-files .card p { margin: 0; }
.ag-map, .ag-map ul { list-style: none; margin: 0; padding: 0; }
.ag-map > li { border-left: 2px solid var(--line-hi); padding: 10px 0 10px 14px; margin: 0 0 10px; }
.ag-map ul { margin-top: 8px; }
.ag-map ul li { border-left: 1px dashed rgba(91, 141, 184, .45); padding: 6px 0 6px 14px; margin: 0 0 6px 4px; }
.doc .ag-map li { margin-left: 0; }
.ag-map a { font: 500 13px var(--m); letter-spacing: .1em; text-transform: uppercase; color: var(--paper); }
.ag-map a:hover { color: var(--sig); }
.ag-map .tag.status { margin-left: 10px; font-size: 10px; padding: 2px 7px; vertical-align: 1px; }
.ag-map .ag-d { display: block; color: #C9CED6; font-size: 15px; line-height: 1.6; margin-top: 4px; }
.ag-doc .ag-upd { color: var(--dim); font: 500 11px var(--m); letter-spacing: .12em; text-transform: uppercase; margin-top: 18px; }
@media (max-width: 760px) {
  .ag-doc .ag-files { grid-template-columns: minmax(0, 1fr); }
  .ag-map .tag.status { margin: 4px 0 0; display: inline-flex; }
  .ag-map .ag-d { font-size: 14px; }
  .ag-map a, .ag-map .ag-d, .ag-doc p { overflow-wrap: anywhere; }
}
@media (max-width: 430px) {
  .rail { gap: 0; padding: 6px 6px; }
  .rail a { padding: 7px 3px; font-size: 9px; letter-spacing: .04em; }
  .rail a.btn { margin: 2px 0 2px 3px; padding: 6px 6px; font-size: 9px; letter-spacing: .04em; }
  .rail a.agents-pill { margin: 2px 0 2px 3px; padding: 5px 5px; font-size: 9px; letter-spacing: .04em; background-size: 10px 1px, 1px 3px, 4px 4px; }
}

/* ---- "For agents" pill = Contact button size (Nov 29 symmetry pass): same box on every breakpoint, text centered ---- */
.rail a.btn, .rail a.agents-pill { box-sizing: border-box; display: flex; align-items: center; justify-content: center; text-align: center; height: 33px; padding-top: 0; padding-bottom: 0; }
.rail a.agents-pill { align-self: stretch; margin: 10px 20px 0; padding-left: 16px; padding-right: 16px; font-size: 11.5px; letter-spacing: .13em; }
@media (max-width: 760px) {
  .rail a.btn, .rail a.agents-pill { flex: none; width: 82px; height: 25px; padding: 0 4px; margin: 2px 0 2px 4px; font-size: 9.5px; letter-spacing: .06em; align-self: center; }
}
@media (max-width: 430px) {
  .rail a.btn, .rail a.agents-pill { width: 66px; height: 23px; padding: 0 3px; margin: 2px 0 2px 3px; font-size: 9px; letter-spacing: .04em; }
}
