/* ═══════════════════════════════════════════════════════
   ARUSVYX · Switchboard Mast (方案 C)
   Top mast only · panel rails · sparse figures
   ═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@500;600;700&family=IBM+Plex+Sans:wght@300;400;500;600&family=Share+Tech+Mono&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }

:root {
  --signal: #F5C518;
  --page: #0A0B0D;
  --nav-h: 4rem;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

body {
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 47px,
      rgba(245, 197, 24, 0.025) 47px,
      rgba(245, 197, 24, 0.025) 48px
    ),
    #0A0B0D;
  color: #E6E7E9;
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── Mast · refined floating bar ── */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
}

.mast {
  background: rgba(10, 11, 13, 0.82);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid rgba(38, 42, 49, 0.9);
  transition: background 0.25s ease, box-shadow 0.25s ease;
}
.mast.is-compact {
  background: rgba(10, 11, 13, 0.94);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.35);
}
.mast.is-compact .mast__inner {
  height: 3.35rem;
}

.mast__inner {
  max-width: 1280px;
  margin: 0 auto;
  height: var(--nav-h);
  padding-top: 0;
  padding-bottom: 0;
  padding-left: max(1.25rem, env(safe-area-inset-left, 0px));
  padding-right: max(1.25rem, env(safe-area-inset-right, 0px));
  display: flex;
  align-items: center;
  gap: 1.5rem;
  transition: height 0.25s ease;
}
@media (min-width: 1024px) {
  .mast__inner {
    padding-left: max(2rem, env(safe-area-inset-left, 0px));
    padding-right: max(2rem, env(safe-area-inset-right, 0px));
    gap: 2rem;
  }
}

.mast-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  flex-shrink: 0;
}
.mast-logo img {
  width: 28px;
  height: 28px;
  display: block;
  object-fit: cover;
}
.mast-logo span {
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #FFE566;
}

.mast-nav {
  display: none;
  align-items: center;
  gap: 0.15rem;
  flex: 1;
  justify-content: center;
  min-width: 0;
}
@media (min-width: 1024px) {
  .mast-nav { display: flex; }
}
.mast-nav__link {
  position: relative;
  padding: 0.45rem 0.85rem;
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #7A8088;
  text-decoration: none;
  transition: color 0.2s ease;
}
.mast-nav__link::after {
  content: '';
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: 0.15rem;
  height: 1.5px;
  background: var(--signal);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.22s ease;
}
.mast-nav__link:hover { color: #E6E7E9; }
.mast-nav__link:hover::after { transform: scaleX(0.45); }
.mast-nav__link.is-active {
  color: #FFE566;
  font-weight: 600;
}
.mast-nav__link.is-active::after { transform: scaleX(1); }

.mast-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
  margin-left: auto;
}
@media (min-width: 1024px) {
  .mast-actions { margin-left: 0; }
}

.mast-supply {
  display: none;
  align-items: center;
  gap: 0.4rem;
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: #636970;
}
@media (min-width: 720px) {
  .mast-supply { display: inline-flex; }
}

.led {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2A2E35;
  display: inline-block;
  flex-shrink: 0;
}
.led--live {
  background: var(--signal);
  box-shadow: 0 0 6px rgba(245, 197, 24, 0.55);
  animation: led-pulse 2.2s ease-in-out infinite;
}
@keyframes led-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}
@media (prefers-reduced-motion: reduce) {
  .led--live { animation: none; }
}

.lang-toggle {
  display: inline-flex;
  border: 1px solid #2A2E35;
  overflow: hidden;
}
.lang-btn {
  padding: 0.28rem 0.55rem;
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.06em;
  color: #636970;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.lang-btn:hover { color: #E6E7E9; }
.lang-btn.is-active {
  background: var(--signal);
  color: #0A0B0D;
}

.mast-cta {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0.42rem 0.9rem;
  font-family: 'Chakra Petch', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: #0A0B0D;
  background: var(--signal);
  border: 1px solid var(--signal);
  transition: background 0.2s ease, transform 0.2s ease;
}
.mast-cta:hover {
  background: #FFE566;
}
@media (min-width: 900px) {
  .mast-cta { display: inline-flex; }
}

.nav-toggle {
  width: 2.2rem;
  height: 2.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #2A2E35;
  background: transparent;
  color: #E6E7E9;
  cursor: pointer;
}
.nav-toggle:hover {
  border-color: var(--signal);
  color: var(--signal);
}
@media (min-width: 1024px) {
  .nav-toggle { display: none; }
}
.nav-toggle__icon--close { display: none; }
#navToggle[aria-expanded="true"] .nav-toggle__icon--open { display: none; }
#navToggle[aria-expanded="true"] .nav-toggle__icon--close { display: block; }

.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  visibility: hidden;
}
@media (min-width: 1024px) {
  .mobile-drawer { display: none; }
}
.mobile-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  opacity: 0;
  transition: opacity 0.3s;
}
.mobile-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(90vw, 300px);
  background: #0E1013;
  border-left: 1px solid #262A31;
  padding: 5rem 1.5rem 2rem;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}
.mobile-drawer.is-open { pointer-events: auto; visibility: visible; }
.mobile-drawer.is-open .mobile-drawer__backdrop { opacity: 1; }
.mobile-drawer.is-open .mobile-drawer__panel { transform: translateX(0); }
.mobile-nav-link {
  display: flex;
  align-items: baseline;
  gap: 0.85rem;
  padding: 1rem 0;
  border-bottom: 1px solid #1C1F24;
  text-decoration: none;
  color: #9AA0A8;
  font-family: 'Chakra Petch', sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.mobile-nav-link__n {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  color: #3A3F48;
  min-width: 1.4rem;
}
.mobile-nav-link.is-active,
.mobile-nav-link:hover { color: #FFE566; }
.mobile-nav-link.is-active .mobile-nav-link__n,
.mobile-nav-link:hover .mobile-nav-link__n { color: var(--signal); }

/* ── Panel layout ── */
.panel {
  max-width: 1280px;
  margin: 0 auto;
  padding:
    2.5rem
    max(1.25rem, env(safe-area-inset-right, 0px))
    max(2.5rem, env(safe-area-inset-bottom, 0px))
    max(1.25rem, env(safe-area-inset-left, 0px));
}
@media (min-width: 640px) {
  .panel {
    padding-top: 3rem;
    padding-left: max(1.75rem, env(safe-area-inset-left, 0px));
    padding-right: max(1.75rem, env(safe-area-inset-right, 0px));
    padding-bottom: max(3rem, env(safe-area-inset-bottom, 0px));
  }
}
@media (min-width: 1024px) {
  .panel {
    padding-top: 3.5rem;
    padding-left: max(2rem, env(safe-area-inset-left, 0px));
    padding-right: max(2rem, env(safe-area-inset-right, 0px));
    padding-bottom: max(3.5rem, env(safe-area-inset-bottom, 0px));
  }
}

.panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  margin-bottom: 1.75rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid #262A31;
}
.panel-head__tag {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--signal);
}
.panel-head__status {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #636970;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.display {
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  line-height: 1.05;
}

/* Status console hero */
.console {
  border: 1px solid #262A31;
  background: #101215;
  display: grid;
  gap: 0;
}
@media (min-width: 900px) {
  .console { grid-template-columns: 1.2fr 0.8fr; }
}
.console__main {
  padding: 1.5rem 1.15rem;
  border-bottom: 1px solid #262A31;
}
@media (min-width: 640px) {
  .console__main { padding: 2rem 1.5rem; }
}
@media (min-width: 900px) {
  .console__main {
    padding: 2.5rem 2rem;
    border-bottom: 0;
    border-right: 1px solid #262A31;
  }
}
.console__side {
  padding: 0;
  background: #0A0B0D;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
@media (min-width: 900px) {
  .console__side {
    display: flex;
    flex-direction: column;
    padding: 0;
  }
}
.console__brand {
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 700;
  font-size: clamp(1.75rem, 6vw, 3.25rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #FFE566;
}
.console__title {
  margin-top: 1rem;
  font-family: 'Chakra Petch', sans-serif;
  font-size: clamp(1.05rem, 3.2vw, 1.5rem);
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.3;
  color: #E6E7E9;
  max-width: 28ch;
}
.console__desc {
  margin-top: 1rem;
  max-width: 42ch;
  font-size: clamp(0.875rem, 2.5vw, 0.95rem);
  line-height: 1.6;
  color: #9AA0A8;
}
.console__actions {
  margin-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}
.console__actions .btn {
  flex: 1 1 auto;
  min-width: min(100%, 10rem);
}

.status-cell {
  flex: 1;
  padding: 1rem 1rem;
  border-bottom: 1px solid #262A31;
  border-right: 1px solid #262A31;
  min-height: 4.75rem;
  min-width: 0;
}
.status-cell:nth-child(2n) { border-right: 0; }
.status-cell:nth-last-child(-n+2) { border-bottom: 0; }
@media (min-width: 900px) {
  .status-cell {
    padding: 1.15rem 1.25rem;
    min-height: 5.5rem;
    border-right: 0;
  }
  .status-cell:nth-child(2n) { border-right: 0; }
  .status-cell:nth-last-child(-n+2) { border-bottom: 1px solid #262A31; }
  .status-cell:last-child { border-bottom: 0; }
}
.status-cell__k {
  font-family: 'Share Tech Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #636970;
}
@media (min-width: 640px) {
  .status-cell__k { font-size: 10px; letter-spacing: 0.14em; }
}
.status-cell__v {
  margin-top: 0.45rem;
  font-family: 'Chakra Petch', sans-serif;
  font-size: clamp(1.25rem, 4vw, 1.65rem);
  font-weight: 700;
  color: #FFE566;
  letter-spacing: 0.02em;
  word-break: break-word;
}

/* Rail modules */
.rail {
  border: 1px solid #262A31;
  background: #101215;
  margin-top: 2.75rem;
}
.panel-head + .rail,
.console + .rail {
  margin-top: 2rem;
}
.rail__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 1.15rem;
  border-bottom: 1px solid #262A31;
  background: #16181C;
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #636970;
}
.rail__label strong { color: var(--signal); font-weight: 400; }
.rail__body { padding: 1.5rem 1.25rem 1.75rem; }
@media (min-width: 768px) {
  .rail__body { padding: 1.75rem 1.5rem 2rem; }
}
@media (min-width: 1024px) {
  .rail { margin-top: 3.5rem; }
  .panel-head + .rail,
  .console + .rail { margin-top: 2.5rem; }
}

.split-2 {
  display: grid;
  gap: 1px;
  background: #262A31;
  border: 1px solid #262A31;
}
@media (min-width: 768px) {
  .split-2 { grid-template-columns: 1fr 1fr; }
}
.split-2__a {
  background: var(--signal);
  color: #0A0B0D;
  padding: 1.75rem 1.35rem;
  min-height: 11rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.split-2__b {
  background: #101215;
  padding: 1.75rem 1.35rem;
  min-height: 11rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.split-2__code {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.split-2__name {
  font-family: 'Chakra Petch', sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1;
  margin-top: 1rem;
}

.matrix {
  display: grid;
  gap: 0;
  border: 1px solid #262A31;
  grid-template-columns: 1fr;
}
.matrix--3 {
  grid-template-columns: 1fr;
}
@media (min-width: 520px) {
  .matrix:not(.matrix--3) { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 640px) {
  .matrix--3 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) {
  .matrix:not(.matrix--3) { grid-template-columns: repeat(4, 1fr); }
}
.matrix__cell {
  padding: 1.15rem 1rem;
  border-bottom: 1px solid #262A31;
  background: #101215;
  position: relative;
  min-width: 0;
}
.matrix__cell:last-child { border-bottom: 0; }
@media (min-width: 520px) {
  .matrix:not(.matrix--3) .matrix__cell {
    border-right: 1px solid #262A31;
  }
  .matrix:not(.matrix--3) .matrix__cell:nth-child(2n) { border-right: 0; }
  .matrix:not(.matrix--3) .matrix__cell:nth-last-child(-n+2) { border-bottom: 0; }
}
@media (min-width: 640px) {
  .matrix--3 .matrix__cell {
    border-bottom: 0;
    border-right: 1px solid #262A31;
  }
  .matrix--3 .matrix__cell:nth-child(2n) { border-right: 1px solid #262A31; }
  .matrix--3 .matrix__cell:nth-child(3n) { border-right: 0; }
}
@media (min-width: 900px) {
  .matrix:not(.matrix--3) .matrix__cell {
    border-bottom: 0;
    border-right: 1px solid #262A31;
  }
  .matrix:not(.matrix--3) .matrix__cell:nth-child(2n) {
    border-right: 1px solid #262A31;
  }
  .matrix:not(.matrix--3) .matrix__cell:nth-child(4n) {
    border-right: 0;
  }
}
.matrix__cell::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--signal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s ease;
}
.matrix__cell.is-in::before { transform: scaleX(1); }
.matrix__n {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  color: var(--signal);
}
.matrix__t {
  margin-top: 0.65rem;
  font-family: 'Chakra Petch', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  word-break: break-word;
}

.list-board {
  list-style: none;
  padding: 0;
  margin: 0;
  border: 1px solid #262A31;
}
.list-board li {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 0.75rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid #262A31;
  background: #101215;
}
.list-board li:last-child { border-bottom: 0; }
.list-board__n {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  color: var(--signal);
  padding-top: 0.15rem;
}
.list-board__t {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  text-transform: uppercase;
}
.list-board__d {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: #636970;
}

.phase-row {
  display: grid;
  gap: 0;
  border: 1px solid #262A31;
  grid-template-columns: 1fr;
}
@media (min-width: 560px) {
  .phase-row { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .phase-row { grid-template-columns: repeat(4, 1fr); }
}
.phase-row__cell {
  padding: 1.2rem 1rem;
  border-bottom: 1px solid #262A31;
  background: #101215;
  min-width: 0;
}
@media (min-width: 560px) {
  .phase-row__cell {
    border-right: 1px solid #262A31;
  }
  .phase-row__cell:nth-child(2n) { border-right: 0; }
  .phase-row__cell:nth-child(odd) { background: #16181C; }
  .phase-row__cell:nth-last-child(-n+2) { border-bottom: 0; }
}
@media (min-width: 960px) {
  .phase-row__cell {
    border-bottom: 0;
    border-right: 1px solid #262A31;
    padding: 1.35rem 1.15rem;
  }
  .phase-row__cell:nth-child(2n) { border-right: 1px solid #262A31; }
  .phase-row__cell:last-child { border-right: 0; }
  .phase-row__cell:nth-child(odd) { background: #16181C; }
}

/* ═══════════════════════════════════════════════════════
   Figure formats — three distinct presentations
   ═══════════════════════════════════════════════════════ */

/* Shared outer rhythm: figures sit BETWEEN rails, not jammed inside */
.fig-break {
  margin-top: 2.5rem;
  margin-bottom: 0.5rem;
}
@media (min-width: 1024px) {
  .fig-break {
    margin-top: 3.25rem;
    margin-bottom: 0.75rem;
  }
}

/* A · Curtain — full-bleed light stage, caption as footer bar */
.fig-band {
  border: 1px solid #262A31;
  background: #0A0B0D;
  overflow: hidden;
}
.fig-band__stage {
  background: #eef1f2;
  padding: clamp(1rem, 3vw, 2rem) clamp(0.75rem, 2vw, 1.5rem);
}
.fig-band__stage img {
  display: block;
  width: 100%;
  max-width: 1080px;
  max-height: min(620px, 72vh);
  height: auto;
  margin: 0 auto;
  object-fit: contain;
}
.fig-band__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.4rem 1.25rem;
  padding: 0.85rem 1.15rem;
  background: var(--signal);
  color: #0A0B0D;
}
.fig-band__id {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
}
.fig-band__cap {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.75;
}

/* B · Dock — caption column + image (or flipped) */
.fig-dock {
  display: grid;
  gap: 0;
  border: 1px solid #262A31;
  background: #101215;
  overflow: hidden;
}
@media (min-width: 900px) {
  .fig-dock {
    grid-template-columns: minmax(11rem, 0.32fr) 1fr;
    min-height: 22rem;
  }
  .fig-dock--flip {
    grid-template-columns: 1fr minmax(11rem, 0.32fr);
  }
  .fig-dock--flip .fig-dock__aside { order: 2; }
  .fig-dock--flip .fig-dock__stage { order: 1; }
}
.fig-dock__aside {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.5rem 1.25rem;
  background: #16181C;
  border-bottom: 1px solid #262A31;
}
@media (min-width: 900px) {
  .fig-dock__aside {
    border-bottom: 0;
    border-right: 1px solid #262A31;
    padding: 1.75rem 1.35rem;
  }
  .fig-dock--flip .fig-dock__aside {
    border-right: 0;
    border-left: 1px solid #262A31;
  }
}
.fig-dock__id {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--signal);
}
.fig-dock__cap {
  margin-top: 0.85rem;
  font-family: 'Chakra Petch', sans-serif;
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  font-weight: 600;
  text-transform: uppercase;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: #E6E7E9;
  max-width: 16ch;
}
.fig-dock__mark {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #636970;
}
.fig-dock__stage {
  background: #eef1f2;
  padding: clamp(0.85rem, 2vw, 1.5rem);
  display: flex;
  align-items: center;
  justify-content: center;
}
.fig-dock__stage img {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(480px, 60vh);
  object-fit: contain;
}

/* C · Inset — narrower centered frame with breathing room */
.fig-inset {
  display: grid;
  justify-items: center;
  padding: 0.5rem 0 0.25rem;
}
.fig-inset__frame {
  width: 100%;
  max-width: 820px;
  border: 1px solid #262A31;
  background: #0A0B0D;
  box-shadow: 6px 6px 0 #16181C;
  overflow: hidden;
}
@media (min-width: 640px) {
  .fig-inset__frame { box-shadow: 12px 12px 0 #16181C; }
}
.fig-inset__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid #262A31;
  background: #101215;
}
.fig-inset__id {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--signal);
}
.fig-inset__cap {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #636970;
}
.fig-inset__stage {
  position: relative;
  background: #eef1f2;
  padding: clamp(0.75rem, 2vw, 1.25rem);
}
.fig-inset__stage::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: var(--signal);
}
.fig-inset__stage img {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(460px, 58vh);
  object-fit: contain;
  margin: 0 auto;
}

.bay-row {
  display: grid;
  grid-template-columns: 2.5rem 3.5rem minmax(0, 1fr);
  gap: 0.5rem 0.85rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid #262A31;
  align-items: center;
}
.bay-row__photo {
  width: 3.5rem;
  height: 3.5rem;
  object-fit: cover;
  border-radius: 0.35rem;
  background: #1A1D22;
}
.bay-row__body {
  min-width: 0;
}
.bay-row__meta {
  grid-column: 3;
  margin-top: -0.15rem;
}
@media (min-width: 768px) {
  .bay-row {
    grid-template-columns: 2.5rem 3.75rem minmax(0, 1fr) minmax(0, 1.15fr);
    gap: 1rem;
  }
  .bay-row__photo {
    width: 3.75rem;
    height: 3.75rem;
  }
  .bay-row__meta {
    grid-column: auto;
    margin-top: 0;
    text-align: right;
  }
}
.bay-row__id {
  font-family: 'Share Tech Mono', monospace;
  font-size: 12px;
  color: var(--signal);
}
.bay-row__role {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #636970;
  margin-top: 0.2rem;
}

.alloc-layout {
  display: grid;
  gap: 1.75rem;
  align-items: center;
}
.alloc-layout__chart { order: -1; }
@media (min-width: 900px) {
  .alloc-layout {
    grid-template-columns: minmax(0, 1fr) minmax(14rem, 0.9fr);
    gap: 2.5rem 3rem;
  }
  .alloc-layout__chart { order: 0; }
}
.alloc-layout__list { min-width: 0; }
.alloc-layout__chart {
  display: flex;
  justify-content: center;
  align-items: center;
}

.alloc-pie {
  position: relative;
  width: min(100%, 240px);
  aspect-ratio: 1;
}
@media (min-width: 640px) {
  .alloc-pie { width: min(100%, 280px); }
}
.alloc-pie__svg {
  display: block;
  width: 100%;
  height: auto;
  transform: rotate(-90deg);
}
.alloc-pie__track {
  fill: none;
  stroke: #1C1F24;
  stroke-width: 28;
}
.alloc-pie__seg {
  fill: none;
  stroke-width: 28;
  stroke-linecap: butt;
  transition: opacity 0.25s ease, stroke-width 0.25s ease;
}
.alloc-pie.is-ready .alloc-pie__seg {
  animation: alloc-pie-in 0.9s cubic-bezier(0.4, 0, 0.2, 1) both;
}
.alloc-pie__seg[data-slice="1"] { animation-delay: 0.06s; }
.alloc-pie__seg[data-slice="2"] { animation-delay: 0.12s; }
.alloc-pie__seg[data-slice="3"] { animation-delay: 0.18s; }
.alloc-pie__seg[data-slice="4"] { animation-delay: 0.24s; }
.alloc-pie__seg[data-slice="5"] { animation-delay: 0.3s; }
.alloc-pie__seg[data-slice="6"] { animation-delay: 0.36s; }
@keyframes alloc-pie-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.alloc-pie__hole {
  position: absolute;
  inset: 28%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #101215;
  border: 1px solid #262A31;
  text-align: center;
  pointer-events: none;
}
.alloc-pie__k {
  font-family: 'Share Tech Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #636970;
}
.alloc-pie__v {
  margin-top: 0.2rem;
  font-family: 'Chakra Petch', sans-serif;
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  font-weight: 700;
  color: #FFE566;
  letter-spacing: -0.02em;
  line-height: 1;
}

/* Hover sync: list ↔ pie via .is-hot (JS) */
.alloc-row[data-slice] { cursor: default; }
.alloc-pie { cursor: pointer; }
.alloc-pie__seg { pointer-events: none; }
.alloc-layout.is-syncing .alloc-pie__seg { opacity: 0.35; }
.alloc-layout.is-syncing .alloc-row { opacity: 0.4; }
.alloc-layout.is-syncing .alloc-row.is-hot {
  opacity: 1;
}
.alloc-layout.is-syncing .alloc-row.is-hot .alloc-bar__fill {
  filter: brightness(1.15);
}
.alloc-layout.is-syncing .alloc-pie__seg.is-hot {
  opacity: 1;
  stroke-width: 32;
}
@media (prefers-reduced-motion: reduce) {
  .alloc-pie.is-ready .alloc-pie__seg { animation: none; }
}

.alloc-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid #262A31;
  transition: opacity 0.2s ease;
}
.alloc-bar {
  grid-column: 1 / -1;
  height: 4px;
  background: #1C1F24;
  overflow: hidden;
}
.alloc-bar__fill {
  height: 100%;
  width: 0;
  background: var(--signal);
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}
.alloc-row[data-slice="0"] .alloc-bar__fill { background: #F5C518; }
.alloc-row[data-slice="1"] .alloc-bar__fill { background: #D4A017; }
.alloc-row[data-slice="2"] .alloc-bar__fill { background: #A88B2E; }
.alloc-row[data-slice="3"] .alloc-bar__fill { background: #2A9B9F; }
.alloc-row[data-slice="4"] .alloc-bar__fill { background: #3D7A8A; }
.alloc-row[data-slice="5"] .alloc-bar__fill { background: #5A6B78; }
.alloc-row[data-slice="6"] .alloc-bar__fill { background: #6B7280; }
.alloc-row[data-slice="0"] .font-mono { color: #F5C518; }
.alloc-row[data-slice="1"] .font-mono { color: #D4A017; }
.alloc-row[data-slice="2"] .font-mono { color: #C4A84A; }
.alloc-row[data-slice="3"] .font-mono { color: #2A9B9F; }
.alloc-row[data-slice="4"] .font-mono { color: #4A9AAA; }
.alloc-row[data-slice="5"] .font-mono { color: #8A95A0; }
.alloc-row[data-slice="6"] .font-mono { color: #9AA0A8; }

.cta-bar {
  margin-top: 2.5rem;
  border: 1px solid var(--signal);
  background: var(--signal);
  color: #0A0B0D;
  padding: 1.5rem 1.15rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1.15rem;
}
.cta-bar .flex {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}
.cta-bar .btn {
  flex: 1 1 auto;
  min-width: min(100%, 9.5rem);
}
@media (min-width: 720px) {
  .cta-bar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 2rem 1.5rem;
    margin-top: 3rem;
  }
}
@media (min-width: 1024px) {
  .cta-bar { margin-top: 3.75rem; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.65rem 1.25rem;
  font-family: 'Chakra Petch', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  border: none;
  border-radius: 0;
  transition: background 0.2s, color 0.2s;
}
.btn-sm { padding: 4px 10px; font-size: 10px; min-height: 26px; }
.btn-primary { background: var(--signal); color: #0A0B0D; }
.btn-primary:hover { background: #FFE566; }
.btn-secondary {
  background: transparent;
  color: var(--signal);
  border: 1px solid var(--signal);
}
.btn-secondary:hover { background: var(--signal); color: #0A0B0D; }
.btn-dark {
  background: #0A0B0D;
  color: var(--signal);
  border: 1px solid #0A0B0D;
}
.btn-dark:hover {
  background: #1C1F24;
  color: #FFE566;
  border-color: #FFE566;
}

/* On yellow CTA: invert to light fill so text stays readable */
.cta-bar .btn-dark:hover {
  background: #FFF8DC;
  color: #0A0B0D;
  border-color: #0A0B0D;
}
.site-footer {
  border-top: 1px solid #262A31;
  background: #070809;
  margin-top: 2rem;
}
.footer-strip {
  max-width: 1280px;
  margin: 0 auto;
  padding:
    1.75rem
    max(1.25rem, env(safe-area-inset-right, 0px))
    max(2.25rem, env(safe-area-inset-bottom, 0px))
    max(1.25rem, env(safe-area-inset-left, 0px));
  display: grid;
  gap: 1rem;
}
@media (min-width: 640px) {
  .footer-strip {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
  .footer-strip__nav { grid-column: 1 / -1; }
}
@media (min-width: 1024px) {
  .footer-strip {
    padding-left: max(2rem, env(safe-area-inset-left, 0px));
    padding-right: max(2rem, env(safe-area-inset-right, 0px));
    grid-template-columns: auto 1fr auto;
  }
  .footer-strip__nav { grid-column: auto; justify-self: center; }
}
.footer-strip__brand {
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.85rem;
}
.footer-strip__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.1rem;
}
.footer-strip__nav a {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #636970;
  text-decoration: none;
}
.footer-strip__nav a:hover { color: var(--signal); }
.footer-strip__copy { font-size: 12px; color: #636970; }

@media (prefers-reduced-motion: reduce) {
  .matrix__cell::before { transform: scaleX(1); transition: none; }
}

/* ═══════════════════════════════════════════════════════
   Responsive polish — phones · tablets · laptops
   ═══════════════════════════════════════════════════════ */

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Very small phones */
@media (max-width: 379px) {
  :root { --nav-h: 3.5rem; }
  .mast-logo span { font-size: 0.8rem; letter-spacing: 0.06em; }
  .mast__inner {
    gap: 0.75rem;
    padding-left: max(0.75rem, env(safe-area-inset-left, 0px));
    padding-right: max(0.75rem, env(safe-area-inset-right, 0px));
  }
  .mast-actions { gap: 0.4rem; }
  .panel { padding-top: 1.5rem; }
  .console__main { padding: 1.35rem 1rem; }
  .console__actions .btn { flex: 1 1 100%; }
  .rail { margin-top: 1.75rem; }
  .rail__body { padding: 1.15rem 1rem 1.35rem; }
  .fig-break { margin-top: 1.75rem; }
  .split-2__a,
  .split-2__b { padding: 1.25rem 1rem; min-height: 8.5rem; }
  .list-board li { padding: 0.85rem 0.9rem; }
  .list-board__t { font-size: 0.95rem; }
  .cta-bar .btn { flex: 1 1 100%; }
}

/* Phones */
@media (max-width: 639px) {
  .panel { padding-top: 1.75rem; }
  .panel-head {
    margin-bottom: 1.25rem;
    gap: 0.4rem;
  }
  .rail { margin-top: 2rem; }
  .panel-head + .rail,
  .console + .rail { margin-top: 1.35rem; }
  .fig-band__bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    padding: 0.75rem 1rem;
  }
  .fig-band__stage img,
  .fig-dock__stage img,
  .fig-inset__stage img {
    max-height: min(360px, 55vh);
  }
  .fig-dock__cap { max-width: none; }
  .bay-row {
    grid-template-columns: 2rem 3rem minmax(0, 1fr);
    gap: 0.35rem 0.65rem;
    padding: 0.95rem 0;
  }
  .bay-row__photo {
    width: 3rem;
    height: 3rem;
  }
  .display.text-3xl { font-size: 1.65rem !important; }
  .display.text-2xl { font-size: 1.35rem !important; }
  .lang-btn {
    min-height: 2rem;
    min-width: 2.25rem;
    padding: 0.35rem 0.5rem;
  }
  .nav-toggle {
    width: 2.5rem;
    height: 2.5rem;
  }
  .mobile-drawer__panel {
    width: min(100vw - 2.5rem, 300px);
    padding-top: max(4.5rem, calc(env(safe-area-inset-top, 0px) + 3.5rem));
    padding-bottom: max(2rem, env(safe-area-inset-bottom, 0px));
  }
  .phase-row__cell:last-child { border-bottom: 0; }
}

/* Tablet portrait: CTA + hamburger, hide supply to free space */
@media (min-width: 900px) and (max-width: 1023px) {
  .mast-supply { display: none; }
  .mast-actions { gap: 0.5rem; }
}

/* Tablet landscape / small laptop: denser nav */
@media (min-width: 1024px) and (max-width: 1199px) {
  .mast-nav__link {
    padding: 0.4rem 0.55rem;
    font-size: 12px;
  }
  .mast-nav__link::after {
    left: 0.55rem;
    right: 0.55rem;
  }
  .mast__inner { gap: 1rem; }
  .mast-actions { gap: 0.5rem; }
}

/* Touch: avoid hover-only affordances being required */
@media (hover: none) {
  .mast-nav__link:hover::after { transform: scaleX(0); }
  .mast-nav__link.is-active::after { transform: scaleX(1); }
  .alloc-layout.is-syncing .alloc-row { opacity: 1; }
  .alloc-layout.is-syncing .alloc-pie__seg { opacity: 1; }
}

/* Prevent horizontal bleed from long mono strings */
.rail__body,
.console__main,
.alloc-layout__list,
.list-board,
.bay-row,
.matrix__t,
.fig-band__cap,
.fig-inset__cap {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.rail__label span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
