@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700;800&display=swap");

@font-face {
  font-family: "New Zelek";
  src: url("./assets/New Zelek.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --color-bg: #fdfdf8;
  --color-surface: #fdfdf8;
  --color-panel: #eeefe9;
  --color-ink: #4d4f46;
  --color-outline: #bfc1b7;
  --color-deep-olive: #23251d;
  --color-orange: #F54E00;
  --color-amber: #F7A501;
  --color-gundam-blue: #4b6f82;
  --color-gundam-red: #a84728;
  --color-gundam-yellow: #b17816;
  --color-gundam-white: #fdfdf8;
  --color-steel: #65675e;
  --color-signal-green: #3DDC84;
  --color-thruster-orange: #F54E00;
  --color-warning-amber: #FFC928;
  --color-dark-navy: #1e1f23;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --radius-sm: 4px;
  --radius-md: 6px;
  --border-strong: 2px solid var(--color-deep-olive);
  --border-default: 1px solid var(--color-outline);
  --shadow-panel: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --font-display: "New Zelek", "Jost", "Outfit", sans-serif;
  --font-heading: "IBM Plex Sans", "Jost", "Outfit", "Noto Sans", sans-serif;
  --font-body: "IBM Plex Sans", "Noto Sans", "Outfit", "Jost", sans-serif;
  --font-mono: "Roboto Mono", "Courier Prime", monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
* {
  cursor: url("https://cdn.cursors-4u.net/previews/mobile-suit-gundam-rx-78-2-ae211299-32.webp") 32 32, auto !important;
}
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  background-image:
    linear-gradient(rgba(77, 79, 70, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(77, 79, 70, 0.035) 1px, transparent 1px);
  background-size: 32px 32px;
  color: var(--color-ink);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-5);
}

.particle-background,
.ghost-canvas,
.grain-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.particle-background { display: none; }
.ghost-canvas { width: 100%; height: 100%; z-index: 150; }
.grain-overlay {
  z-index: 200;
  opacity: 0.16;
  mix-blend-mode: multiply;
  background-image:
    radial-gradient(rgba(0, 0, 0, 0.16) 0.7px, transparent 0.7px),
    radial-gradient(rgba(255, 255, 255, 0.16) 0.7px, transparent 0.7px);
  background-size: 3px 3px, 4px 4px;
  background-position: 0 0, 1px 1px;
  animation: grainShift 0.32s steps(2) infinite;
}

.particle {
  position: absolute;
  border-radius: 999px;
  opacity: 0.9;
  will-change: transform, opacity;
  animation-name: particleDrift;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  box-shadow: 0 0 10px currentColor;
}
.particle-cyan { background: #59f8e8; color: #59f8e8; }
.particle-blue { background: #4a78ff; color: #4a78ff; }
.particle-pink { background: #ff4fa8; color: #ff4fa8; }

main, .header, .footer { position: relative; z-index: 1; }

.header {
  background: rgba(253, 253, 248, 0.94);
  border-bottom: var(--border-default);
  padding: var(--space-4) 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; }
.logo {
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-deep-olive);
}
.logo-accent { color: var(--color-orange); }

.back-link,
.nav-label {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-deep-olive);
}
.back-link:hover { color: var(--color-orange); }

.hero { padding: var(--space-9) 0 var(--space-4); text-align: center; }
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(48px, 10vw, 88px);
  text-transform: uppercase;
  letter-spacing: 4px;
  line-height: 1.1;
  margin-bottom: var(--space-4);
  animation: fadeSlideUp 0.6s ease-out forwards;
  opacity: 0;
}
.hero-subtitle {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--color-steel);
  animation: fadeSlideUp 0.6s ease-out 0.15s forwards;
  opacity: 0;
}
.hero-accent { color: var(--color-gundam-blue); }

.board-section { padding: var(--space-7) 0 var(--space-9); overflow-x: hidden; }
.board-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
  max-width: 1400px;
  margin: 0 auto;
}
.board-card {
  position: relative;
  background: transparent;
  border: none;
  padding: var(--space-2);
  cursor: pointer;
  animation: floatIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards, float 6s ease-in-out infinite;
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.board-card.large { width: 400px; height: 350px; }
.board-card.medium { width: 280px; height: 245px; }
.board-card.small { width: 220px; height: 193px; }
.board-card:nth-child(1) { animation-delay: 0.2s, 0s; animation-duration: 0.8s, 6s; }
.board-card:nth-child(2) { animation-delay: 0.3s, 0.5s; animation-duration: 0.8s, 7s; }
.board-card:nth-child(3) { animation-delay: 0.4s, 1s; animation-duration: 0.8s, 5.5s; }
.board-card:nth-child(4) { animation-delay: 0.5s, 0.3s; animation-duration: 0.8s, 6.5s; }
.board-card:nth-child(5) { animation-delay: 0.6s, 0.8s; animation-duration: 0.8s, 5s; }
.board-card:nth-child(6) { animation-delay: 0.7s, 1.2s; animation-duration: 0.8s, 7.5s; }
.board-card:nth-child(7) { animation-delay: 0.8s, 0.2s; animation-duration: 0.8s, 6s; }
.board-card:nth-child(8) { animation-delay: 0.9s, 0.6s; animation-duration: 0.8s, 5.5s; }
.board-card:nth-child(9) { animation-delay: 1s, 0.9s; animation-duration: 0.8s, 6.5s; }
.board-card:hover { transform: scale(1.15); z-index: 10; animation-play-state: paused; }
.board-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: filter 0.3s ease-out;
  filter: brightness(0.97);
}
.board-card:hover .board-image { filter: brightness(1) drop-shadow(0 8px 24px rgba(0, 91, 184, 0.3)); }
.board-label,
.board-tag {
  position: absolute;
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 1px;
  background: rgba(252, 252, 253, 0.85);
  opacity: 0;
  transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}
.board-label {
  bottom: var(--space-2);
  left: var(--space-3);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-ink);
  padding: var(--space-1) var(--space-2);
  transform: translateY(8px);
}
.board-tag {
  top: var(--space-2);
  right: var(--space-3);
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--color-steel);
  padding: var(--space-1) var(--space-2);
  transform: translateY(-8px);
}
.board-card:hover .board-label,
.board-card:hover .board-tag { opacity: 1; transform: translateY(0); }

.window-layer {
  position: fixed;
  inset: 0;
  z-index: 300;
  pointer-events: none;
}

.desktop-window {
  position: absolute;
  width: min(880px, calc(100vw - 32px));
  height: min(680px, calc(100vh - 96px));
  min-width: min(360px, calc(100vw - 32px));
  min-height: 360px;
  background: var(--color-bg);
  border: 2px solid var(--color-deep-olive);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-panel);
  overflow: hidden;
  pointer-events: auto;
}

.desktop-window.is-focused {
  border-color: var(--color-orange);
}

.desktop-window.is-full-page {
  border-radius: 0;
}

.window-titlebar {
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  background: var(--color-panel);
  border-bottom: var(--border-default);
  padding: 0 var(--space-2) 0 var(--space-4);
  user-select: none;
  touch-action: none;
}

.window-title {
  min-width: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-deep-olive);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.window-controls {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.window-button {
  position: relative;
  z-index: 1;
  width: 24px;
  height: 24px;
  border: var(--border-default);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  color: var(--color-deep-olive);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1;
}

.window-button:hover {
  color: var(--color-orange);
  background: #f6e9df;
}

.window-close-button {
  z-index: 5;
}

.window-frame {
  width: calc(100% - 16px);
  height: calc(100% - 46px);
  display: block;
  border: 0;
  margin: var(--space-1) var(--space-2) var(--space-2);
  background: var(--color-bg);
  overflow: auto;
}

.window-resize-handle {
  position: absolute;
  z-index: 2;
  touch-action: none;
}

.resize-top,
.resize-bottom {
  left: 12px;
  right: 12px;
  height: 10px;
  cursor: ns-resize !important;
}

.resize-top { top: 0; }
.resize-bottom { bottom: 0; }

.resize-left,
.resize-right {
  top: 12px;
  bottom: 12px;
  width: 10px;
  cursor: ew-resize !important;
}

.resize-left { left: 0; }
.resize-right { right: 0; }

.resize-top-left,
.resize-top-right,
.resize-bottom-right,
.resize-bottom-left {
  width: 24px;
  height: 24px;
}

.resize-top-left {
  top: 0;
  left: 0;
  cursor: nwse-resize !important;
}

.resize-top-right {
  top: 0;
  right: 0;
  cursor: nesw-resize !important;
}

.resize-bottom-right {
  right: 0;
  bottom: 0;
  cursor: nwse-resize !important;
}

.resize-bottom-left {
  left: 0;
  bottom: 0;
  cursor: nesw-resize !important;
}

.resize-bottom-right::before {
  content: "";
  position: absolute;
  right: 5px;
  bottom: 5px;
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--color-deep-olive);
  border-bottom: 2px solid var(--color-deep-olive);
  box-shadow: 4px 4px 0 -2px var(--color-deep-olive);
}

.desktop-window.is-focused .resize-bottom-right::before {
  border-color: var(--color-orange);
  box-shadow: 4px 4px 0 -2px var(--color-orange);
}

.is-resizing-window {
  user-select: none;
}

.content-page .container {
  max-width: 1180px;
  padding: 0 var(--space-6);
}
.page-header {
  padding: var(--space-9) 0 var(--space-7);
  background: var(--color-bg);
}
.page-badge {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--color-orange);
  margin-bottom: var(--space-3);
}
.page-title {
  font-family: var(--font-heading);
  font-size: clamp(38px, 7vw, 72px);
  font-weight: 800;
  text-transform: none;
  letter-spacing: -0.75px;
  line-height: 1.08;
  color: var(--color-deep-olive);
  max-width: 920px;
}
.page-subtitle {
  font-family: var(--font-heading);
  font-size: 19px;
  font-weight: 600;
  color: var(--color-steel);
  margin-top: var(--space-4);
  max-width: 1180px;
  line-height: 1.56;
}
.content { padding: var(--space-7) 0 var(--space-9); }
.content .container { max-width: 1180px; padding: 0 var(--space-6); }
.section { margin-bottom: var(--space-7); }
.section-title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--space-5);
  color: var(--color-ink);
}
.section-text { font-size: 17px; line-height: 1.85; color: var(--color-ink); }
.section-text p { margin-bottom: var(--space-5); }
.section-text p:last-child { margin-bottom: 0; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  margin-top: var(--space-8);
  padding-top: var(--space-6);
}
.stat-value { font-family: var(--font-display); font-size: 40px; color: var(--color-gundam-blue); }
.stat-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-steel);
  margin-top: var(--space-2);
}

.footer {
  background: var(--color-deep-olive);
  color: var(--color-bg);
  padding: var(--space-7) 0;
  text-align: center;
}
.footer-text {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  opacity: 0.7;
}

.animate-in { animation: fadeSlideUp 0.5s ease-out forwards; opacity: 0; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes floatIn {
  0% { opacity: 0; transform: translateY(40px) scale(0.95); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes particleDrift {
  0% { transform: translate3d(-12vw, var(--start-y), 0); opacity: 0; }
  7% { opacity: 0.95; }
  92% { opacity: 0.95; }
  100% { transform: translate3d(112vw, calc(var(--start-y) + var(--drift-y)), 0); opacity: 0; }
}
@keyframes grainShift {
  0% { transform: translate(0, 0); }
  100% { transform: translate(2px, 1px); }
}

@media (max-width: 900px) {
  .board-card.large { width: 320px; height: 280px; }
  .board-card.medium { width: 240px; height: 210px; }
}
@media (max-width: 600px) {
  .board-card.large, .board-card.medium, .board-card.small { width: 160px; height: 140px; }
  .stats-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .particle, .ghost-canvas { animation: none; opacity: 0; }
  .grain-overlay { animation: none; }
}

/* ===== SUBPAGE REDESIGN ===== */

.content-page .header {
  backdrop-filter: blur(10px);
}

.content-page .back-link::before {
  content: "[ ";
  color: var(--color-outline);
}

.content-page .back-link::after {
  content: " ]";
  color: var(--color-outline);
}

.page-header {
  border-bottom: var(--border-default);
  position: relative;
}

.page-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  background: repeating-linear-gradient(
    90deg,
    var(--color-deep-olive) 0 32px,
    transparent 32px 40px,
    var(--color-orange) 40px 48px,
    transparent 48px 56px
  );
}

.page-body {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.section-block { margin-bottom: var(--space-7); }

.section-heading {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}
.section-heading-bar {
  width: 6px;
  min-height: 34px;
  background: var(--color-orange);
  border: 1px solid var(--color-deep-olive);
  flex-shrink: 0;
  margin-top: 5px;
}
.section-heading h2 {
  font-family: var(--font-heading);
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.35;
  color: var(--color-deep-olive);
}

.sub-heading {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
  color: var(--color-deep-olive);
  margin: var(--space-6) 0 var(--space-3);
  padding-left: var(--space-3);
  border-left: 4px solid var(--color-orange);
}

.body-text {
  font-size: 16px;
  line-height: 1.72;
  color: var(--color-ink);
}
.body-text p { margin-bottom: var(--space-5); }
.body-text p:last-child { margin-bottom: 0; }

.source-link {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: rgba(101, 103, 94, 0.74);
  border-bottom: 1px dotted rgba(101, 103, 94, 0.55);
  white-space: nowrap;
  vertical-align: 0.08em;
  margin-left: 0.15rem;
}

.fig figcaption a,
.ref-list a {
  color: rgba(101, 103, 94, 0.82);
  border-bottom: 1px dotted rgba(101, 103, 94, 0.55);
}

.source-link:hover,
.fig figcaption a:hover,
.ref-list a:hover {
  color: var(--color-orange);
  border-bottom-color: currentColor;
}

.fig {
  background: var(--color-surface);
  border: var(--border-default);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin: var(--space-6) 0;
}
/* Natural aspect ratio + contain: show full image (no 16:9 crop) */
.fig img,
.fig video {
  width: 100%;
  display: block;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
  object-position: center;
  background: var(--color-panel);
}

.fig--contain img,
.fig--contain video {
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
}

.fig-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--color-outline);
}
.fig-pair img {
  aspect-ratio: auto;
  height: auto;
  object-fit: contain;
}

/* FTIR software screenshots: native aspect ratio; avoid 16:9 crop */
.fig--ftir img {
  aspect-ratio: auto;
  height: auto;
  object-fit: contain;
  object-position: center top;
}

/* Stack FTIR exports full-width — wide plots read poorly in two-up layouts */
.media-split--spectra {
  grid-template-columns: 1fr;
  gap: var(--space-5);
}
.fig figcaption {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-steel);
  padding: var(--space-3) var(--space-4);
  border-top: var(--border-default);
  line-height: 1.65;
}

.media-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  /* Short column(s) stay vertically centered vs the tall column — whole bordered figure moves as a unit */
  align-items: center;
  margin: var(--space-6) 0;
}

.media-split .text-col {
  align-self: start;
  min-width: 0;
}

.media-split .img-col {
  min-width: 0;
}

.media-split .fig {
  margin: 0;
  width: 100%;
  max-width: 100%;
}

.media-split .fig img,
.media-split .fig video {
  display: block;
  width: auto;
  max-width: 100%;
  /* Keep tall photos/videos closer to text-column scale (avoids huge portrait assets) */
  max-height: min(46vh, 400px);
  height: auto;
  margin-left: auto;
  margin-right: auto;
  aspect-ratio: auto;
  object-fit: contain;
  object-position: center;
}

.callout {
  border: var(--border-default);
  border-left: 6px solid var(--color-gundam-blue);
  border-radius: var(--radius-sm);
  background: var(--color-panel);
  padding: var(--space-5);
  margin: var(--space-6) 0;
}
.callout.red { border-left-color: var(--color-gundam-red); }
.callout.yellow { border-left-color: var(--color-gundam-yellow); }
.callout-label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--color-deep-olive);
  margin-bottom: var(--space-2);
}
.callout.red .callout-label { color: var(--color-gundam-red); }
.callout.yellow .callout-label { color: #9a7000; }
.callout p { font-size: 16px; line-height: 1.75; margin: 0; }

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  margin: var(--space-6) 0;
}
.stat-card {
  background: var(--color-surface);
  border: var(--border-default);
  border-radius: var(--radius-sm);
  padding: var(--space-5);
  text-align: left;
}
.stat-card .stat-num {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 34px;
  color: var(--color-deep-olive);
  line-height: 1;
}
.stat-card .stat-lbl {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-steel);
  margin-top: var(--space-2);
}

.timeline { list-style: none; padding: 0; margin: var(--space-5) 0; }
.tl-item {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
  position: relative;
}
.tl-item:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 37px;
  top: 34px;
  bottom: -16px;
  width: 2px;
  background: var(--color-outline);
}
.tl-year {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--color-deep-olive);
  background: var(--color-panel);
  border: var(--border-default);
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tl-text { font-size: 15px; line-height: 1.7; padding-top: 6px; }

.step-cards { display: flex; flex-direction: column; gap: var(--space-4); margin: var(--space-5) 0; }
.step-card {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: var(--space-4);
  background: var(--color-surface);
  border: var(--border-default);
  border-radius: var(--radius-sm);
  padding: var(--space-4);
  align-items: start;
}
.step-num {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 800;
  color: var(--color-orange);
  line-height: 1;
  text-align: center;
  border-right: var(--border-default);
  padding-right: var(--space-4);
  padding-top: 2px;
}
.step-title {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--space-2);
  color: var(--color-ink);
}
.step-text { font-size: 15px; line-height: 1.75; }

.step-num.step-letter {
  font-family: var(--font-mono);
  font-size: 18px;
  padding-top: 8px;
}

.section-divider { border: none; border-top: var(--border-default); margin: var(--space-7) 0; }

.table-wrapper {
  border: var(--border-default);
  border-radius: var(--radius-sm);
  overflow-x: auto;
  background: var(--color-surface);
}

.properties-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.properties-table th {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: var(--color-deep-olive);
  color: var(--color-bg);
  padding: var(--space-3) var(--space-4);
  text-align: left;
}
.properties-table td {
  padding: var(--space-3) var(--space-4);
  border-bottom: var(--border-default);
  vertical-align: top;
}
.properties-table tr:nth-child(even) td { background: var(--color-panel); }
.properties-table tr:hover td { background: #f6e9df; color: var(--color-deep-olive); }

.ref-list { list-style: none; padding: 0; }
.ref-list li {
  font-size: 15px;
  line-height: 1.75;
  padding: var(--space-3) 0;
  border-bottom: var(--border-default);
  padding-left: var(--space-4);
  position: relative;
}
.ref-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--color-orange);
}

.key-list { list-style: none; padding: 0; margin: var(--space-4) 0; }
.key-list li {
  font-size: 16px;
  line-height: 1.75;
  padding: var(--space-4) 0 var(--space-4) var(--space-6);
  border-bottom: var(--border-default);
  position: relative;
}
.key-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--color-orange);
  font-weight: 700;
}

.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mt-6 { margin-top: var(--space-6); }
.mb-4 { margin-bottom: var(--space-4); }
.m-0 { margin: 0; }
.stats-row.two-up { grid-template-columns: 1fr 1fr; margin: 0 0 var(--space-4); }
.span-2 { grid-column: span 2; }

.content-page a:hover,
.content-page .stat-card:hover .stat-num,
.content-page .step-card:hover .step-title,
.content-page .fig:hover figcaption {
  color: var(--color-orange);
}

.content-page .fig img {
  cursor: zoom-in !important;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(253, 253, 248, 0.96);
}

.image-lightbox-viewport {
  width: 100%;
  height: 100%;
  overflow: auto;
  position: relative;
  padding: 72px var(--space-5) var(--space-5);
  cursor: default;
}

.image-lightbox-stage {
  position: relative;
  display: grid;
  place-items: center;
  margin: 0 auto;
}

.image-lightbox-viewport img {
  position: static;
  max-width: none;
  max-height: none;
  transform: none;
  transition: width 0.12s ease-out, height 0.12s ease-out;
  object-fit: contain;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.45);
  user-select: none;
  -webkit-user-drag: none;
}

.image-lightbox-toolbar {
  position: fixed;
  top: var(--space-4);
  right: var(--space-4);
  z-index: 2;
  display: flex;
  gap: var(--space-1);
}

.image-lightbox-button {
  width: 36px;
  height: 36px;
  border: 2px solid var(--color-gundam-white);
  border-radius: var(--radius-sm);
  background: var(--color-deep-olive);
  color: var(--color-gundam-white);
  font-family: var(--font-mono);
  font-size: 22px;
  line-height: 1;
}

.image-lightbox-zoom-label {
  min-width: 60px;
  height: 36px;
  border: 2px solid var(--color-gundam-white);
  border-radius: var(--radius-sm);
  background: var(--color-deep-olive);
  color: var(--color-gundam-white);
  font-family: var(--font-mono);
  font-size: 12px;
  display: grid;
  place-items: center;
  padding: 0 var(--space-2);
}

.image-lightbox-close {
  z-index: 3;
}

.image-lightbox-button:hover,
.image-lightbox-button:focus-visible {
  border-color: var(--color-orange);
  color: var(--color-orange);
}

.has-expanded-image {
  overflow: hidden;
}

.content-page.windowed {
  background-size: 24px 24px;
}

.content-page.windowed .header,
.content-page.windowed .footer,
.content-page.windowed .ghost-canvas {
  display: none;
}

.content-page.windowed .grain-overlay {
  opacity: 0.08;
}

.content-page.windowed .page-header {
  padding: var(--space-6) 0 var(--space-5);
}

.content-page.windowed .content {
  padding: var(--space-5) 0 var(--space-7);
}

.content-page.windowed .container {
  padding: 0 var(--space-5);
}

.content-page.windowed .page-body {
  padding-left: var(--space-5);
  padding-right: var(--space-5);
}

.content-page.windowed .page-title {
  font-size: clamp(30px, 6vw, 48px);
}

.content-page.windowed .page-subtitle {
  font-size: 16px;
}

@media (max-width: 700px) {
  body.has-open-window {
    overflow: hidden;
  }

  .window-layer {
    position: fixed;
    inset: 0;
    z-index: 300;
    padding: 0;
  }

  .desktop-window {
    position: absolute;
    left: auto !important;
    top: auto !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100dvh !important;
    min-width: 0;
    min-height: 0;
    margin: 0;
    border-radius: 0;
  }

  .window-resize-handle { display: none; }

  .media-split { grid-template-columns: 1fr; }
  .fig-pair { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .tl-item { grid-template-columns: 56px 1fr; }
  .page-body { padding: var(--space-5) var(--space-4); }
}
