/* ==========================================================================
   TURNITOUT: Dual-Mode Unified Design System
   Mode 1: "The Student's Revenge" — Warm Scrapbook Manifesto & Interactive Notebook
   Mode 2: Spatial "Academic Desk" — Infinite Canvas, Radial Dial, Blueprint & Tools
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@600;700&family=Courier+Prime:ital,wght@0,400;0,700;1,400&family=EB+Garamond:ital,wght@0,400;0,600;0,700;1,400;1,600&family=IBM+Plex+Serif:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Inter:wght@400;500;600;700&family=Space+Mono:ital,wght@0,400;0,700;1,400&family=Special+Elite&display=swap');

:root {
  /* ------------------------------------------------------------------------
     1. Scrapbook & Warm Workspace Palette (Default Reading Mode)
     ------------------------------------------------------------------------ */
  --bg-paper: #F4EFE6;              /* Warm parchment desk surface */
  --bg-card: #FAF6EE;               /* Soft warm cream / off-white paper */
  --bg-card-alt: #F6F1E6;           /* Slightly deeper cream accent */
  --bg-notebook: #FCFBF7;           /* Off-white lined notebook sheet */
  --text-ink: #2C2621;              /* Warm charcoal espresso ink (no harsh pure black) */
  --text-muted: #615951;            /* Soft warm umber */
  --crimson-banner: #400609;        /* Deep academic crimson header */
  --red-pen: #BA1A32;               /* Teacher's red grading pen */
  --red-pen-dark: #870E22;
  --highlighter: #F6D86B;           /* Worn yellow chisel highlighter */
  --highlighter-subtle: rgba(246, 216, 107, 0.42);
  --ballpoint-blue: #234873;        /* Classic blue Bic ballpoint pen */
  --coffee-stain: rgba(130, 102, 65, 0.13);
  --masking-tape: rgba(244, 235, 204, 0.88);
  --tape-border: rgba(180, 162, 122, 0.35);
  --border-rough: rgba(68, 54, 42, 0.11); /* Soft physical paper edge */
  --line-blue: #D8E3EB;             /* Soft faint notebook horizontal rule */
  --margin-red: #EFA6AD;            /* Soft notebook vertical margin rule */
  
  /* Multi-layered Soft Physical Paper Shadows */
  --shadow-paper: 
    0 1px 3px rgba(45, 34, 23, 0.04),
    0 6px 16px rgba(45, 34, 23, 0.06),
    0 16px 34px rgba(45, 34, 23, 0.05),
    0 28px 60px rgba(45, 34, 23, 0.03),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);

  --shadow-paper-hover:
    0 2px 6px rgba(45, 34, 23, 0.06),
    0 12px 26px rgba(45, 34, 23, 0.08),
    0 24px 50px rgba(45, 34, 23, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);

  /* ------------------------------------------------------------------------
     2. Spatial Academic Desk Palette (Look Down Mode)
     ------------------------------------------------------------------------ */
  --desk-wood-base: #141416;
  --desk-wood-fiber: #1C1C20;
  --desk-wood-highlight: #26262B;
  --lamp-glow: rgba(255, 245, 225, 0.14);
  --lamp-vignette: rgba(8, 8, 10, 0.78);
  --paper-white: #FAF9F6;
  --paper-white-pure: #FFFFFF;
  --paper-grid-mat: #E8E8E8;
  --paper-grid-line: rgba(30, 30, 30, 0.12);
  --paper-grid-dark: rgba(30, 30, 30, 0.28);
  --postit-yellow: #FFF9B0;
  --ink-primary: #121214;
  --ink-secondary: #484850;
  --ink-muted: #7E7E88;
  --ink-faint: rgba(20, 20, 24, 0.12);
  --ink-blue-ballpoint: #1A3E72;
  --ink-red-pen: #B8182D;
  --ink-green-safe: #238636;
  --accent-crimson: #E63946;

  --shadow-main-paper: 
    0 1px 2px rgba(0, 0, 0, 0.25),
    0 6px 16px rgba(0, 0, 0, 0.35),
    0 20px 48px rgba(0, 0, 0, 0.45),
    0 40px 90px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 1);

  --shadow-grid-mat:
    0 2px 4px rgba(0, 0, 0, 0.3),
    0 12px 32px rgba(0, 0, 0, 0.5),
    0 30px 70px rgba(0, 0, 0, 0.6);

  --shadow-prop:
    0 2px 4px rgba(0, 0, 0, 0.4),
    0 10px 24px rgba(0, 0, 0, 0.55),
    0 24px 44px rgba(0, 0, 0, 0.6);

  /* ------------------------------------------------------------------------
     3. 5-Tier Unified Typography Hierarchy
     ------------------------------------------------------------------------ */
  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-academic: 'EB Garamond', 'IBM Plex Serif', Georgia, serif;
  --font-typewriter: 'Special Elite', 'Courier Prime', monospace;
  --font-mono: 'Space Mono', 'Courier Prime', Consolas, monospace;
  --font-handwriting: 'Caveat', cursive;
  --font-body: var(--font-academic);
}

/* 3 AM Study Session (Dark Mode) */
body.dark-mode {
  --bg-paper: #131211;
  --bg-card: #1C1A18;
  --bg-card-alt: #181715;
  --bg-notebook: #211F1C;
  --text-ink: #ECE6DD;
  --text-muted: #A39B90;
  --crimson-banner: #230204;
  --red-pen: #FF4242;
  --red-pen-dark: #C41E3A;
  --highlighter: #FFB84D;
  --highlighter-subtle: rgba(255, 184, 77, 0.32);
  --ballpoint-blue: #6DB3F2;
  --coffee-stain: rgba(255, 255, 255, 0.04);
  --masking-tape: rgba(58, 55, 50, 0.85);
  --tape-border: rgba(90, 85, 78, 0.4);
  --border-rough: rgba(255, 255, 255, 0.08);
  --line-blue: #282622;
  --margin-red: #5C252E;
  --shadow-paper: 
    0 2px 6px rgba(0, 0, 0, 0.45),
    0 8px 24px rgba(0, 0, 0, 0.55),
    0 20px 48px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  --shadow-paper-hover:
    0 4px 10px rgba(0, 0, 0, 0.5),
    0 14px 32px rgba(0, 0, 0, 0.65),
    0 28px 60px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

/* ==========================================================================
   Base, Watercolor Wash & Organic Paper Grain
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  overflow-x: hidden;
}

body {
  background-color: var(--bg-paper);
  background-image: 
    radial-gradient(ellipse at 15% 15%, rgba(248, 241, 225, 0.75) 0%, transparent 45%),
    radial-gradient(ellipse at 85% 25%, rgba(234, 220, 195, 0.5) 0%, transparent 50%),
    radial-gradient(ellipse at 30% 70%, rgba(242, 230, 206, 0.55) 0%, transparent 50%),
    radial-gradient(ellipse at 78% 85%, rgba(230, 214, 188, 0.4) 0%, transparent 45%);
  background-attachment: fixed;
  color: var(--text-ink);
  font-family: var(--font-body);
  font-size: 17.5px;
  line-height: 1.82;
  letter-spacing: 0.012em;
  position: relative;
  overflow-x: hidden;
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* Subtle organic paper grain overlay */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  opacity: 0.038;
  z-index: 9999;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

body.dark-mode {
  background-image: 
    radial-gradient(ellipse at 15% 15%, rgba(28, 25, 23, 0.7) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 30%, rgba(24, 20, 28, 0.6) 0%, transparent 45%),
    radial-gradient(ellipse at 40% 80%, rgba(22, 20, 25, 0.7) 0%, transparent 55%);
}

body.dark-mode::before {
  opacity: 0.045;
  mix-blend-mode: screen;
  filter: invert(1);
}

/* When desk mode is active, freeze outer scroll and maximize canvas */
body.is-desk-mode {
  overflow: hidden !important;
  user-select: none;
  -webkit-user-select: none;
}

/* Perspective Views Visibility */
.manifesto-view {
  display: block;
  opacity: 1;
  transition: opacity 0.3s ease;
}

body.is-desk-mode .manifesto-view {
  display: none !important;
}

.spatial-desk-view {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 999;
  background-color: var(--desk-wood-base);
  overflow: hidden;
}

body.is-desk-mode .spatial-desk-view {
  display: flex !important;
  flex-direction: column;
}

/* ==========================================================================
   Header & Streamlit Banner Heritage
   ========================================================================== */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--crimson-banner);
  border-bottom: 2px solid rgba(0, 0, 0, 0.25);
  padding: 11px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.32);
}


.brand-logo-img {
  height: 32px;
  width: auto;
  max-width: 145px;
  display: block;
  object-fit: contain;
}

.hud-logo-img {
  height: 28px;
  width: auto;
  max-width: 130px;
  display: block;
  object-fit: contain;
}

.brand-wrapper {
  display: flex;
  align-items: baseline;
  gap: 14px;
  text-decoration: none;
}

.brand-title {
  font-family: 'Segoe UI', var(--font-typewriter), sans-serif;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 1.5px;
  color: #FFFFFF;
}

.brand-title span {
  color: #E63946;
}

.brand-tagline {
  font-family: var(--font-handwriting);
  font-size: 19.5px;
  color: #FFE066;
  font-weight: 600;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  list-style: none;
}

.nav-link {
  color: #ECEFF4;
  text-decoration: none;
  font-family: var(--font-typewriter);
  font-size: 13.5px;
  transition: color 0.15s ease;
}

.nav-link:hover {
  color: #FFE066;
  text-decoration: underline;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Look Down at Desk Toggle Button in Top Nav */
.nav-perspective-btn {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.38);
  color: #FFE066;
  font-family: var(--font-typewriter);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 14px;
  cursor: pointer;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all 0.18s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.nav-perspective-btn:hover {
  background-color: #FFE066;
  color: #400609;
  border-color: #FFE066;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.theme-toggle-btn {
  background: transparent;
  border: 1px dashed rgba(255, 255, 255, 0.4);
  color: #ECEFF4;
  font-family: var(--font-typewriter);
  font-size: 13px;
  padding: 6px 12px;
  cursor: pointer;
  border-radius: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.theme-toggle-btn:hover {
  background-color: rgba(255, 255, 255, 0.12);
  border-color: #FFF;
}

.app-launch-btn {
  background-color: #E63946;
  color: #FFFFFF !important;
  font-family: var(--font-typewriter);
  font-weight: bold;
  font-size: 14px;
  padding: 8px 16px;
  border-radius: 4px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.app-launch-btn:hover {
  background-color: #FF2E42;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

/* ==========================================================================
   Lived-in Desk Container & Physical Scrapbook Elements
   ========================================================================== */
.container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 34px 24px 90px 24px;
  position: relative;
}

/* Desk Perspective Banner inside container */
.desk-perspective-banner {
  background: linear-gradient(135deg, #1C2331 0%, #111620 100%);
  color: #ECEFF4;
  border-radius: 6px;
  padding: 16px 22px;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: 
    0 4px 14px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  border: 1px dashed rgba(255, 255, 255, 0.22);
  position: relative;
  transform: rotate(-0.4deg);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.desk-perspective-banner:hover {
  transform: rotate(0deg) translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.desk-banner-inner {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.desk-banner-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  color: #48CAE4;
  text-transform: uppercase;
  font-weight: 700;
}

.desk-banner-text {
  font-family: var(--font-ui);
  font-size: 14.5px;
  color: #D8DEE9;
  line-height: 1.45;
}

.desk-banner-text strong {
  color: #FFFFFF;
}

.desk-banner-btn {
  background-color: #48CAE4;
  color: #0B132B;
  font-family: var(--font-typewriter);
  font-weight: bold;
  font-size: 13.5px;
  padding: 10px 18px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.desk-banner-btn:hover {
  background-color: #90E0EF;
  transform: translateY(-2px);
}

/* Tape, Staples & Coffee Rings */
.tape {
  position: absolute;
  height: 28px;
  width: 105px;
  background-color: var(--masking-tape);
  background-image: 
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.12) 0px,
      rgba(255, 255, 255, 0.12) 2px,
      transparent 2px,
      transparent 7px
    ),
    linear-gradient(
      180deg,
      rgba(250, 243, 218, 0.9) 0%,
      rgba(238, 227, 190, 0.78) 50%,
      rgba(244, 235, 204, 0.85) 100%
    );
  clip-path: polygon(
    0% 5%, 2% 0%, 5% 8%, 1% 15%, 4% 23%, 2% 31%, 6% 40%, 1% 48%,
    5% 57%, 2% 66%, 6% 75%, 1% 84%, 5% 93%, 2% 100%,
    98% 97%, 95% 90%, 99% 81%, 94% 72%, 98% 63%, 95% 53%,
    99% 44%, 94% 34%, 98% 25%, 95% 16%, 99% 7%, 97% 0%
  );
  filter: drop-shadow(0 2px 3px rgba(45, 34, 23, 0.18));
  z-index: 10;
  pointer-events: none;
  backdrop-filter: blur(0.5px);
}

body.dark-mode .tape {
  background-image: 
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.05) 0px,
      rgba(255, 255, 255, 0.05) 2px,
      transparent 2px,
      transparent 7px
    ),
    linear-gradient(
      180deg,
      rgba(62, 59, 54, 0.9) 0%,
      rgba(48, 45, 42, 0.8) 50%,
      rgba(55, 52, 48, 0.86) 100%
    );
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.55));
}

.tape.top-left { top: -14px; left: 28px; transform: rotate(-4.2deg); }
.tape.top-right { top: -13px; right: 28px; transform: rotate(3.6deg); }
.tape.center { top: -14px; left: 50%; transform: translateX(-50%) rotate(-2.4deg); }

.manifesto-card .tape.top-left { transform: rotate(3.8deg); }
.manifesto-card .tape.top-right { transform: rotate(-4.5deg); }
.notebook-wrapper .tape.center { transform: translateX(-50%) rotate(-3.5deg); }

.feature-box:nth-child(1) .tape { transform: rotate(4.2deg); }
.feature-box:nth-child(2) .tape { transform: rotate(-3.6deg); }
.feature-box:nth-child(3) .tape { transform: rotate(3.1deg); }
.feature-box:nth-child(4) .tape { transform: rotate(-4.5deg); }

.pledge-card .tape.top-left { transform: rotate(-5.2deg); }
.pledge-card .tape.top-right { transform: rotate(2.8deg); }

/* Coffee Rings */
.coffee-ring {
  position: absolute;
  width: 145px;
  height: 145px;
  border-radius: 52% 48% 51% 49% / 48% 53% 47% 52%;
  border: 4px solid var(--coffee-stain);
  box-shadow: 
    inset 0 0 10px var(--coffee-stain),
    0 0 5px var(--coffee-stain);
  pointer-events: none;
  z-index: 1;
}

.coffee-ring::after {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 49% 51% 52% 48% / 53% 47% 53% 47%;
  border: 2px dashed var(--coffee-stain);
  opacity: 0.5;
}

/* Metal Staple */
.staple {
  position: absolute;
  width: 28px;
  height: 6px;
  background: linear-gradient(180deg, #A8A29E 0%, #57534E 100%);
  border-radius: 1px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  z-index: 11;
  pointer-events: none;
}

.staple.top-left {
  top: 14px;
  left: 14px;
  transform: rotate(-35deg);
}

/* ==========================================================================
   Ink Stamps & Badges
   ========================================================================== */
.stamp {
  display: inline-block;
  font-family: var(--font-typewriter);
  font-weight: bold;
  font-size: 13px;
  letter-spacing: 1.5px;
  padding: 3px 9px;
  border: 2px solid;
  border-radius: 3px;
  text-transform: uppercase;
  transform: rotate(-1.5deg);
  opacity: 0.92;
  user-select: none;
  mask-image: radial-gradient(circle, black 85%, rgba(0, 0, 0, 0.5) 100%);
  -webkit-mask-image: radial-gradient(circle, black 85%, rgba(0, 0, 0, 0.5) 100%);
}

.stamp-red {
  color: var(--red-pen);
  border-color: var(--red-pen);
}

.stamp-blue {
  color: var(--ballpoint-blue);
  border-color: var(--ballpoint-blue);
}

.stamp-yellow {
  color: #9A6700;
  border-color: #B57C00;
  background-color: var(--highlighter-subtle);
}

/* ==========================================================================
   Hero: Student's Revenge Manifesto Card
   ========================================================================== */
.manifesto-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-rough);
  border-radius: 3px;
  padding: 44px 44px 38px 44px;
  box-shadow: var(--shadow-paper);
  position: relative;
  margin-bottom: 50px;
  transform: rotate(-0.6deg);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.manifesto-card:hover {
  transform: rotate(-0.2deg) translateY(-2px);
  box-shadow: var(--shadow-paper-hover);
}

.manifesto-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.manifesto-title {
  font-family: var(--font-academic);
  font-size: 38px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-ink);
  letter-spacing: -0.015em;
  flex: 1;
  min-width: 290px;
}

.manifesto-story {
  font-size: 19px;
  line-height: 1.82;
  color: var(--text-ink);
}

.highlight {
  background: linear-gradient(104deg, transparent 0%, var(--highlighter-subtle) 10%, var(--highlighter) 85%, transparent 100%);
  padding: 1px 6px;
  border-radius: 2px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.handwritten-aside {
  font-family: var(--font-handwriting);
  font-size: 26px;
  line-height: 1.4;
  color: var(--red-pen);
  margin: 24px 0 20px 0;
  padding: 4px 18px;
  border-left: 3px dashed var(--red-pen);
  transform: rotate(-0.8deg);
}

.manifesto-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px dashed var(--border-rough);
}

/* ==========================================================================
   Section: The Interactive Ruled Notebook Simulator
   ========================================================================== */
.notebook-wrapper {
  background-color: var(--bg-card);
  border: 1px solid var(--border-rough);
  border-radius: 4px;
  padding: 34px 38px;
  box-shadow: var(--shadow-paper);
  position: relative;
  margin-bottom: 56px;
  transform: rotate(0.5deg);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.notebook-wrapper:hover {
  transform: rotate(0.2deg) translateY(-2px);
  box-shadow: var(--shadow-paper-hover);
}

.notebook-header {
  margin-bottom: 18px;
}

.notebook-label {
  font-family: var(--font-typewriter);
  font-size: 12.5px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.notebook-title {
  font-family: var(--font-academic);
  font-size: 28px;
  font-weight: 700;
  color: var(--text-ink);
  margin-top: 4px;
}

.preset-buttons {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.preset-btn {
  background-color: var(--bg-card-alt);
  border: 1px solid var(--border-rough);
  color: var(--text-ink);
  font-family: var(--font-typewriter);
  font-size: 12.5px;
  padding: 6px 12px;
  border-radius: 3px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.preset-btn:hover {
  background-color: var(--bg-paper);
  border-color: var(--text-muted);
}

/* Ruled Notebook Paper Sheet */
.paper-sheet {
  background-color: var(--bg-notebook);
  background-image: 
    linear-gradient(90deg, transparent 79px, var(--margin-red) 79px, var(--margin-red) 81px, transparent 81px),
    repeating-linear-gradient(
      transparent 0px,
      transparent 33px,
      var(--line-blue) 33px,
      var(--line-blue) 34px
    );
  line-height: 34px;
  font-family: var(--font-academic);
  font-size: 19px;
  color: var(--text-ink);
  padding: 34px 28px 34px 100px;
  min-height: 238px;
  border-radius: 2px;
  border: 1px solid var(--border-rough);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.03);
  outline: none;
  white-space: pre-wrap;
  word-wrap: break-word;
  position: relative;
  transition: background-color 0.2s ease;
}

.paper-sheet:focus {
  border-color: var(--ballpoint-blue);
}

/* Strikethrough & Handwriting Annotations in Notebook */
.ai-crossed {
  color: var(--red-pen);
  text-decoration: line-through 2px;
  text-decoration-color: var(--red-pen);
  opacity: 0.82;
  margin-right: 4px;
  font-family: var(--font-academic);
}

.human-replacement {
  font-family: var(--font-handwriting);
  font-size: 25px;
  color: var(--ballpoint-blue);
  font-weight: 700;
  display: inline-block;
  transform: rotate(-1.5deg);
  margin-right: 6px;
  line-height: 1;
}

/* Detector Meter & Action Bar */
.notebook-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 22px;
  flex-wrap: wrap;
  gap: 16px;
}

.detector-meter {
  display: flex;
  align-items: center;
  gap: 12px;
}

.detector-label {
  font-family: var(--font-typewriter);
  font-size: 13.5px;
  font-weight: bold;
}

.meter-track {
  width: 140px;
  height: 14px;
  background-color: rgba(0, 0, 0, 0.08);
  border-radius: 7px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.12);
}

body.dark-mode .meter-track {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
}

.meter-fill {
  height: 100%;
  width: 96%;
  background-color: var(--red-pen);
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.5s ease;
}

.meter-score {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: bold;
  color: var(--red-pen);
  min-width: 44px;
  transition: color 0.5s ease;
}

.action-buttons-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.humanize-btn {
  background-color: var(--red-pen);
  color: #FFFFFF;
  border: none;
  font-family: var(--font-typewriter);
  font-weight: bold;
  font-size: 14.5px;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 6px rgba(186, 26, 50, 0.35);
  transition: all 0.15s ease;
}

.humanize-btn:hover {
  background-color: var(--red-pen-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(186, 26, 50, 0.45);
}

.copy-btn {
  background-color: transparent;
  border: 1px solid var(--border-rough);
  color: var(--text-ink);
  font-family: var(--font-typewriter);
  font-size: 13.5px;
  padding: 9px 16px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.copy-btn:hover {
  background-color: var(--bg-card-alt);
  border-color: var(--text-muted);
}

/* ==========================================================================
   Section: 4 Core Superpowers (Collage Grid)
   ========================================================================== */
.section-heading {
  font-family: var(--font-academic);
  font-size: 30px;
  font-weight: 700;
  color: var(--text-ink);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-icon {
  width: 26px;
  height: 26px;
  color: var(--red-pen);
  stroke-width: 2;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  margin-bottom: 56px;
}

.feature-box {
  background-color: var(--bg-card);
  border: 1px solid var(--border-rough);
  border-radius: 3px;
  padding: 30px;
  box-shadow: var(--shadow-paper);
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.feature-box:nth-child(1) { transform: rotate(-0.7deg); }
.feature-box:nth-child(2) { transform: rotate(0.8deg); }
.feature-box:nth-child(3) { transform: rotate(0.6deg); }
.feature-box:nth-child(4) { transform: rotate(-0.5deg); }

.feature-box:hover {
  transform: rotate(0deg) translateY(-3px);
  box-shadow: var(--shadow-paper-hover);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 4px;
  background-color: var(--bg-card-alt);
  border: 1px dashed var(--border-rough);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--red-pen);
}

.feature-icon-svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-title {
  font-family: var(--font-academic);
  font-size: 21px;
  font-weight: 700;
  color: var(--text-ink);
  margin-bottom: 10px;
}

.feature-desc {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-muted);
}

/* ==========================================================================
   Section: Xerox Comparison Table
   ========================================================================== */
.table-wrapper {
  background-color: var(--bg-card);
  border: 1px solid var(--border-rough);
  border-radius: 4px;
  padding: 16px;
  box-shadow: var(--shadow-paper);
  overflow-x: auto;
  margin-bottom: 56px;
  transform: rotate(-0.3deg);
  transition: transform 0.2s ease;
}

.table-wrapper:hover {
  transform: rotate(0deg);
}

.xerox-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15.5px;
  text-align: left;
}

.xerox-table th {
  font-family: var(--font-typewriter);
  font-size: 13.5px;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 14px 16px;
  border-bottom: 2px solid var(--text-ink);
  color: var(--text-ink);
}

.xerox-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border-rough);
  color: var(--text-ink);
}

.xerox-table tr:hover td {
  background-color: rgba(0, 0, 0, 0.02);
}

.col-turnitout {
  background-color: rgba(186, 26, 50, 0.06);
  font-weight: bold;
  color: var(--red-pen) !important;
  border-left: 2px solid var(--red-pen);
  border-right: 2px solid var(--red-pen);
}

/* ==========================================================================
   Section: Community Star-Gate Pledge Card
   ========================================================================== */
.pledge-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-rough);
  border-radius: 4px;
  padding: 38px 44px;
  box-shadow: var(--shadow-paper);
  position: relative;
  margin-bottom: 56px;
  transform: rotate(0.4deg);
  transition: transform 0.2s ease;
}

.pledge-card:hover {
  transform: rotate(0deg) translateY(-2px);
}

.checklist-group {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.check-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16.5px;
}

.hand-box {
  width: 22px;
  height: 22px;
  border: 2px solid var(--ballpoint-blue);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ballpoint-blue);
}

/* ==========================================================================
   Section: FAQ List
   ========================================================================== */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 50px;
}

.faq-item {
  background-color: var(--bg-card);
  border: 1px solid var(--border-rough);
  border-radius: 3px;
  padding: 24px 30px;
  box-shadow: var(--shadow-paper);
  transform: rotate(-0.2deg);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.faq-item:nth-child(even) {
  transform: rotate(0.3deg);
}

.faq-item:hover {
  transform: rotate(0deg) translateY(-2px);
  box-shadow: var(--shadow-paper-hover);
}

.faq-question {
  font-family: var(--font-academic);
  font-size: 21px;
  font-weight: 700;
  color: var(--text-ink);
  margin-bottom: 8px;
}

.faq-answer {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-muted);
}

/* ==========================================================================
   Footer & Developer Hotline
   ========================================================================== */
.footer-section {
  text-align: center;
  padding-top: 30px;
  border-top: 1px dashed var(--border-rough);
  color: var(--text-muted);
  font-size: 14.5px;
}

.footer-hotline {
  background-color: var(--bg-card);
  border: 1px dashed var(--red-pen);
  border-radius: 4px;
  display: inline-block;
  padding: 12px 22px;
  margin-bottom: 22px;
  font-size: 15px;
  color: var(--text-ink);
}

.footer-hotline a {
  color: var(--red-pen);
  font-weight: bold;
  text-decoration: underline;
}

/* ==========================================================================
   SPATIAL ACADEMIC DESK VIEW STYLES (Look Down Mode)
   ========================================================================== */
.spatial-top-hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 54px;
  background: rgba(14, 14, 18, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  z-index: 1000;
  color: #ECEFF4;
  gap: 16px;
  box-sizing: border-box;
}

.hud-left-group {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.hud-brand-link {
  display: flex;
  align-items: baseline;
  text-decoration: none;
  color: inherit;
}

.hud-brand-title {
  font-family: 'Segoe UI', var(--font-typewriter), sans-serif;
  font-weight: 900;
  letter-spacing: 1.2px;
  font-size: 20px;
  color: #FFF;
}

.hud-brand-title span {
  color: var(--accent-crimson);
}

.hud-look-up-btn {
  background: #FAF6EE;
  color: #2C2621;
  font-family: var(--font-typewriter);
  font-weight: bold;
  font-size: 12.5px;
  padding: 6px 14px;
  border: 1px solid rgba(44, 38, 33, 0.25);
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  transition: all 0.18s ease;
  white-space: nowrap;
}

.hud-look-up-btn:hover {
  background: #FFFFFF;
  color: #BA1A32;
  border-color: #BA1A32;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}

.spatial-focus-group {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.06);
  padding: 3px 4px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.spatial-jump-btn {
  background: transparent;
  border: none;
  color: #D8DEE9;
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 5px 11px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.spatial-jump-btn:hover,
.spatial-jump-btn.active {
  background: rgba(255, 255, 255, 0.14);
  color: #FFF;
}

.hud-right-group {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.hud-doc-links {
  display: flex;
  align-items: center;
  gap: 14px;
}

.hud-doc-link {
  color: #D8DEE9;
  font-family: var(--font-typewriter);
  font-size: 12.5px;
  text-decoration: none;
  transition: color 0.15s ease;
  white-space: nowrap;
}

.hud-doc-link:hover {
  color: #FFE066;
  text-decoration: underline;
}

.hud-cta-app-btn {
  background-color: var(--accent-crimson);
  color: #FFF !important;
  font-family: var(--font-typewriter);
  font-weight: bold;
  font-size: 12.5px;
  padding: 6px 14px;
  border-radius: 4px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.hud-cta-app-btn:hover {
  background-color: #FF2E42;
  transform: translateY(-1px);
}

.desk-viewport {
  position: absolute;
  top: 52px;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  background-color: var(--desk-wood-base);
  background-image: 
    radial-gradient(ellipse at 45% 40%, #1A1A1E 0%, #121214 70%, #0A0A0C 100%),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.012) 0px, rgba(255,255,255,0.012) 1px, transparent 1px, transparent 14px);
  cursor: grab;
}

.desk-viewport:active {
  cursor: grabbing;
}

.desk-lamp-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 35%, var(--lamp-glow) 0%, transparent 65%);
  z-index: 5;
}

.desk-world {
  position: absolute;
  top: 0;
  left: 0;
  width: 2800px;
  height: 2200px;
  transform-origin: 0 0;
  will-change: transform;
}

/* Green/Grey Engineering Cutting Mat */
.grid-cutting-mat {
  position: absolute;
  top: 180px;
  left: 220px;
  width: 1420px;
  height: 820px;
  background-color: #1F2E24;
  border: 4px solid #142018;
  border-radius: 8px;
  box-shadow: var(--shadow-grid-mat);
  background-image: 
    linear-gradient(rgba(255,255,255,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px;
  pointer-events: none;
}

.mat-ruler-labels {
  display: flex;
  justify-content: space-between;
  padding: 6px 16px;
  color: rgba(255, 255, 255, 0.4);
  font-family: var(--font-mono);
  font-size: 10px;
}

/* Main Printed Paper Sheet */
.main-printed-sheet {
  position: absolute;
  top: 240px;
  left: 310px;
  width: 1240px;
  background-color: var(--paper-white);
  border-radius: 6px;
  box-shadow: var(--shadow-main-paper);
  display: grid;
  grid-template-columns: 370px 1fr 390px;
  gap: 0;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.printed-card {
  padding: 34px 28px;
  position: relative;
  border-right: 1px dashed rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
}

.printed-card:last-child {
  border-right: none;
}

.card-header-handwriting {
  font-family: var(--font-academic);
  font-size: 26px;
  font-weight: 700;
  color: var(--ink-primary);
}

.card-subtitle-handwriting {
  font-family: var(--font-handwriting);
  font-size: 22px;
  color: var(--ink-blue-ballpoint);
  margin-bottom: 18px;
}

.card-notch-slit {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 5px;
  background-color: var(--desk-wood-base);
  border-radius: 0 0 4px 4px;
}

/* 5 Concentric Ring Metrics */
.metric-rings-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 22px;
}

.metric-ring-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.concentric-circle-icon {
  width: 38px;
  height: 38px;
}

.metric-ring-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: bold;
  margin-top: 3px;
  color: var(--ink-primary);
}

.metric-ring-label {
  font-family: var(--font-ui);
  font-size: 9.5px;
  color: var(--ink-muted);
  text-transform: uppercase;
}

/* Big 64-Ray Radial Dial */
.big-radial-dial-container {
  position: relative;
  width: 250px;
  height: 250px;
  margin: 10px auto 20px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.radial-ray-svg {
  width: 100%;
  height: 100%;
  transform: rotate(0deg);
  transition: transform 0.4s cubic-bezier(0.17, 0.67, 0.29, 0.98);
}

.dial-center-hub {
  position: absolute;
  width: 110px;
  height: 110px;
  background: #FFF;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 
    0 4px 14px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 #FFF;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.dial-center-score {
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 800;
  color: var(--ink-red-pen);
  line-height: 1;
}

.dial-center-label {
  font-family: var(--font-ui);
  font-size: 10px;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-top: 4px;
}

.dial-action-arrow {
  position: absolute;
  bottom: 8px;
  right: 14px;
  width: 34px;
  height: 34px;
  background: var(--ink-primary);
  color: #FFF;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.dial-action-arrow:hover {
  transform: scale(1.1);
  background: var(--accent-crimson);
}

.handwritten-callout-block {
  background: rgba(0, 0, 0, 0.03);
  border-left: 3px solid var(--ink-red-pen);
  padding: 10px 14px;
  border-radius: 0 4px 4px 0;
  margin-top: auto;
}

.callout-title {
  font-family: var(--font-typewriter);
  font-size: 11.5px;
  font-weight: bold;
  letter-spacing: 1px;
  color: var(--ink-red-pen);
}

.callout-body {
  font-family: var(--font-handwriting);
  font-size: 20px;
  line-height: 1.35;
  color: var(--ink-secondary);
  margin-top: 4px;
}

.card-bottom-pills {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 14px;
}

.bottom-pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.14);
}

/* Panel 2: Segmented Controls & Battery */
.segmented-toggle-bar {
  display: flex;
  background: rgba(0, 0, 0, 0.05);
  padding: 3px;
  border-radius: 6px;
  margin-bottom: 18px;
}

.toggle-segment-btn {
  flex: 1;
  background: transparent;
  border: none;
  font-family: var(--font-ui);
  font-size: 12.5px;
  padding: 6px 0;
  border-radius: 4px;
  cursor: pointer;
  color: var(--ink-muted);
  font-weight: 500;
  transition: all 0.15s ease;
}

.toggle-segment-btn.active {
  background: #FFF;
  color: var(--ink-primary);
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.metric-row-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}

.metric-row-title {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-secondary);
}

.metric-row-score {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: bold;
  color: var(--ink-primary);
}

.segmented-battery-bar {
  display: flex;
  gap: 3px;
  height: 22px;
  margin-bottom: 4px;
}

.battery-pill {
  flex: 1;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 2px;
  transition: background 0.3s ease;
}

.battery-pill.filled {
  background: var(--ink-blue-ballpoint);
}

.battery-labels {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--ink-muted);
  margin-bottom: 18px;
}

.panel-interactive-box {
  background: #FFF;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  padding: 12px;
  margin-bottom: 14px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.02);
}

.interactive-box-label {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
}

.interactive-editable-sheet {
  font-family: var(--font-academic);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100px;
  outline: none;
  white-space: pre-wrap;
}

.execute-humanize-btn {
  width: 100%;
  background: var(--ink-primary);
  color: #FFF;
  border: none;
  font-family: var(--font-typewriter);
  font-size: 13px;
  font-weight: bold;
  padding: 10px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.15s ease;
}

.execute-humanize-btn:hover {
  background: var(--accent-crimson);
}

.submetric-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.submetric-box {
  background: rgba(0, 0, 0, 0.03);
  padding: 10px;
  border-radius: 4px;
}

.submetric-label {
  font-family: var(--font-ui);
  font-size: 10px;
  color: var(--ink-muted);
  text-transform: uppercase;
}

.submetric-value {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: bold;
  color: var(--ink-primary);
  margin-top: 2px;
}

/* Panel 3: Tasks */
.planner-task-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.planner-task-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14.5px;
  cursor: pointer;
  user-select: none;
}

.task-checkbox-box {
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--ink-muted);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.planner-task-row.is-done .task-checkbox-box {
  background: var(--ink-blue-ballpoint);
  border-color: var(--ink-blue-ballpoint);
  color: #FFF;
}

.planner-task-row.is-done .task-label-text {
  text-decoration: line-through;
  color: var(--ink-muted);
}

.task-check-svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Post-it Note Prop */
.postit-note-prop {
  position: absolute;
  top: 190px;
  left: 1470px;
  width: 220px;
  background: var(--postit-yellow);
  padding: 18px;
  box-shadow: var(--shadow-prop);
  transform: rotate(3.2deg);
  border-radius: 2px;
  z-index: 12;
}

.postit-heading {
  font-family: var(--font-typewriter);
  font-size: 11px;
  font-weight: bold;
  text-transform: uppercase;
  color: #7A6500;
  margin-bottom: 6px;
}

.postit-text {
  font-family: var(--font-handwriting);
  font-size: 21px;
  line-height: 1.35;
  color: #382E00;
}

.postit-signature {
  font-family: var(--font-handwriting);
  font-size: 19px;
  font-weight: bold;
  text-align: right;
  margin-top: 8px;
  color: #7A6500;
}

/* Mechanical Drafting Pencil Prop */
.drafting-pencil-prop {
  position: absolute;
  top: 420px;
  left: 1580px;
  width: 14px;
  height: 480px;
  background: linear-gradient(90deg, #1C1C1F 0%, #38383E 45%, #18181A 100%);
  border-radius: 4px;
  box-shadow: 
    12px 14px 22px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transform: rotate(-12deg);
  z-index: 15;
}

.pencil-knurled-grip {
  position: absolute;
  bottom: 40px;
  left: 0;
  right: 0;
  height: 70px;
  background: repeating-linear-gradient(45deg, #50505A 0px, #50505A 2px, #2A2A30 2px, #2A2A30 4px);
}

.pencil-tip-cone {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(180deg, #6C6C78 0%, #303036 100%);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

.pencil-lead {
  position: absolute;
  bottom: -10px;
  left: 5px;
  width: 4px;
  height: 10px;
  background: #111;
  border-radius: 1px;
}

/* Architect's Triangular Scale Ruler Prop */
.architect-ruler-prop {
  position: absolute;
  top: 140px;
  left: 520px;
  width: 580px;
  height: 24px;
  background: linear-gradient(180deg, #FFFDF8 0%, #E6E0D4 100%);
  box-shadow: 
    0 10px 24px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 #FFF;
  border-radius: 2px;
  transform: rotate(-1.5deg);
  z-index: 14;
}

.ruler-white-ticks {
  height: 100%;
  background-image: repeating-linear-gradient(90deg, rgba(0,0,0,0.6) 0px, rgba(0,0,0,0.6) 1px, transparent 1px, transparent 10px);
}

/* Black Leather Journal Prop */
.black-notebook-prop {
  position: absolute;
  top: 220px;
  left: 1720px;
  width: 260px;
  height: 380px;
  background: #18181A;
  border-radius: 6px;
  box-shadow: 
    18px 24px 44px rgba(0, 0, 0, 0.65),
    inset 0 0 12px rgba(0, 0, 0, 0.8);
  transform: rotate(8deg);
  z-index: 10;
}

.notebook-ribbon {
  position: absolute;
  bottom: -30px;
  left: 110px;
  width: 14px;
  height: 60px;
  background: var(--accent-crimson);
  box-shadow: 2px 4px 8px rgba(0,0,0,0.4);
}

/* Academic Benchmark & FAQ Archive Sheet on Desk */
.academic-archive-sheet {
  position: absolute;
  top: 1120px;
  left: 310px;
  width: 1240px;
  background-color: var(--paper-white);
  border-radius: 6px;
  box-shadow: var(--shadow-main-paper);
  padding: 44px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: var(--ink-primary);
}

.archive-header-tag {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 1.5px;
  color: var(--ink-muted);
  margin-bottom: 8px;
}

.archive-main-title {
  font-family: var(--font-academic);
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 12px;
}

.archive-intro-desc {
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--ink-secondary);
  margin-bottom: 28px;
}

.archive-table-container {
  overflow-x: auto;
  margin-bottom: 34px;
}

.archive-matrix-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.archive-matrix-table th {
  font-family: var(--font-mono);
  font-size: 12.5px;
  padding: 12px 14px;
  border-bottom: 2px solid var(--ink-primary);
  text-align: left;
}

.archive-matrix-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.archive-study-block {
  background: rgba(0, 0, 0, 0.03);
  border-left: 3px solid var(--ink-blue-ballpoint);
  padding: 18px 24px;
  border-radius: 0 4px 4px 0;
  margin-bottom: 36px;
}

.archive-study-block h3 {
  font-family: var(--font-academic);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.archive-study-block p {
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--ink-secondary);
}

.archive-faq-heading {
  font-family: var(--font-academic);
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 22px;
}

.archive-faq-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 36px;
}

.archive-faq-card {
  background: #FFF;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 4px;
  padding: 18px 20px;
}

.archive-faq-question {
  font-family: var(--font-academic);
  font-size: 17.5px;
  font-weight: 700;
  color: var(--ink-primary);
  margin-bottom: 6px;
}

.archive-faq-answer {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-secondary);
}

.archive-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px dashed rgba(0, 0, 0, 0.15);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-muted);
  flex-wrap: wrap;
  gap: 14px;
}

/* Floating Spatial Bottom Controls */
.spatial-bottom-controls {
  position: absolute;
  bottom: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(18, 18, 22, 0.92);
  backdrop-filter: blur(10px);
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  z-index: 1000;
}

.floating-look-up-btn {
  background: #FAF6EE;
  color: #2C2621;
  border: 1px solid rgba(0,0,0,0.2);
  border-radius: 4px;
  font-family: var(--font-typewriter);
  font-size: 12px;
  font-weight: bold;
  padding: 0 12px;
  height: 32px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.floating-look-up-btn:hover {
  background: #FFFFFF;
  color: #BA1A32;
  border-color: #BA1A32;
}

.zoom-btn {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #FFF;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease;
}

.zoom-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

.zoom-indicator-text {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #FFF;
  min-width: 44px;
  text-align: center;
}

.spatial-toast-hint {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(14, 14, 18, 0.9);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #D8DEE9;
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 8px 16px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 1000;
  pointer-events: none;
  animation: fadeInOut 6s forwards;
}

@keyframes fadeInOut {
  0% { opacity: 0; transform: translate(-50%, 10px); }
  15% { opacity: 1; transform: translate(-50%, 0); }
  75% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, 10px); }
}

/* ==========================================================================
   Mobile & Tablet Responsive Rules
   ========================================================================== */
@media (max-width: 1200px) {
  .brand-tagline {
    display: none;
  }
  .hud-doc-links {
    display: none;
  }
}

@media (max-width: 960px) {
  .top-nav {
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 16px;
  }
  .nav-links {
    display: none;
  }
  .spatial-focus-group {
    display: none;
  }
}

@media (max-width: 860px) {
  .container {
    padding: 20px 14px 60px 14px;
  }
  .manifesto-card {
    padding: 24px 20px;
  }
  .manifesto-title {
    font-size: 28px;
  }
  .features-grid {
    grid-template-columns: 1fr;
  }
  .paper-sheet {
    padding-left: 20px;
    background-image: repeating-linear-gradient(
      transparent 0px,
      transparent 33px,
      var(--line-blue) 33px,
      var(--line-blue) 34px
    );
  }
  .desk-perspective-banner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 600px) {
  .nav-actions {
    flex-wrap: wrap;
    gap: 8px;
  }
  .theme-toggle-btn span {
    display: none;
  }
  .nav-perspective-btn span {
    font-size: 11.5px;
  }
  .hud-look-up-btn span {
    font-size: 11px;
  }
}

/* ==========================================================================
   3D PERSPECTIVE SCENE MORPHING KEYFRAMES
   ========================================================================== */
body.morphing-to-desk .manifesto-view {
  display: block !important;
  animation: tiltDownPaper 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  pointer-events: none;
}

body.morphing-to-desk .spatial-desk-view {
  display: flex !important;
  animation: swoopDownToDesk 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  pointer-events: none;
}

body.morphing-to-paper .spatial-desk-view {
  display: flex !important;
  animation: riseFromDesk 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  pointer-events: none;
}

body.morphing-to-paper .manifesto-view {
  display: block !important;
  animation: riseUpPaper 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  pointer-events: none;
}

@keyframes tiltDownPaper {
  0% {
    opacity: 1;
    transform: perspective(1200px) rotateX(0deg) translateY(0) scale(1);
    filter: blur(0px);
  }
  100% {
    opacity: 0;
    transform: perspective(1200px) rotateX(32deg) translateY(-70px) scale(0.92);
    filter: blur(3px);
  }
}

@keyframes swoopDownToDesk {
  0% {
    opacity: 0;
    transform: scale(0.82) translateY(50px);
    filter: brightness(1.2);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: brightness(1);
  }
}

@keyframes riseFromDesk {
  0% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
  100% {
    opacity: 0;
    transform: scale(0.88) translateY(40px);
  }
}

@keyframes riseUpPaper {
  0% {
    opacity: 0;
    transform: perspective(1200px) rotateX(32deg) translateY(-70px) scale(0.92);
    filter: blur(3px);
  }
  100% {
    opacity: 1;
    transform: perspective(1200px) rotateX(0deg) translateY(0) scale(1);
    filter: blur(0px);
  }
}

/* ==========================================================================
   COMPREHENSIVE DARK MODE: SPATIAL DESK & READING VIEW
   ========================================================================== */
body.dark-mode {
  --desk-wood-base: #0B0B0D;
  --desk-wood-fiber: #121215;
  --desk-wood-highlight: #1B1B20;
  --paper-white: #1C1C20;
  --paper-white-pure: #24242A;
  --ink-primary: #ECEFF4;
  --ink-secondary: #B0B5C0;
  --ink-muted: #7E8592;
  --ink-faint: rgba(255, 255, 255, 0.12);
  --postit-yellow: #2E270A;
  --paper-grid-mat: #0F1712;
}

body.dark-mode .main-printed-sheet {
  background-color: #1A1A1E;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

body.dark-mode .printed-card {
  border-right-color: rgba(255, 255, 255, 0.08);
  color: #ECEFF4;
}

body.dark-mode .card-header-handwriting {
  color: #FFFFFF;
}

body.dark-mode .metric-ring-num {
  color: #FFFFFF;
}

body.dark-mode .metric-row-title,
body.dark-mode .metric-row-score {
  color: #ECEFF4;
}

body.dark-mode .dial-center-hub {
  background: #18181C;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}

body.dark-mode .panel-interactive-box {
  background: #151518;
  border-color: rgba(255, 255, 255, 0.12);
}

body.dark-mode .interactive-editable-sheet {
  color: #ECEFF4;
}

body.dark-mode .toggle-segment-btn {
  color: #8E95A5;
}

body.dark-mode .toggle-segment-btn.active {
  background: #2D2D35;
  color: #FFFFFF;
}

body.dark-mode .postit-note-prop {
  background: #2E270A;
  color: #FFE066;
  border: 1px solid rgba(255, 224, 102, 0.2);
}

body.dark-mode .postit-text {
  color: #FFE066;
}

body.dark-mode .postit-heading,
body.dark-mode .postit-signature {
  color: #FFD13B;
}

body.dark-mode .academic-archive-sheet {
  background-color: #18181C;
  color: #ECEFF4;
  border-color: rgba(255, 255, 255, 0.12);
}

body.dark-mode .archive-main-title {
  color: #FFFFFF;
}

body.dark-mode .archive-faq-card {
  background: #1F1F24;
  border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .archive-faq-question {
  color: #FFFFFF;
}

body.dark-mode .archive-matrix-table th {
  border-bottom-color: rgba(255, 255, 255, 0.25);
  color: #FFFFFF;
}

body.dark-mode .archive-matrix-table td {
  border-bottom-color: rgba(255, 255, 255, 0.08);
  color: #ECEFF4;
}

body.dark-mode .submetric-box {
  background: rgba(255, 255, 255, 0.05);
}

body.dark-mode .submetric-value {
  color: #FFFFFF;
}

body.dark-mode .hud-look-up-btn {
  background: #1E1E24;
  color: #ECEFF4;
  border-color: rgba(255, 255, 255, 0.18);
}

body.dark-mode .hud-look-up-btn:hover {
  background: #282832;
  color: #FF6B7A;
  border-color: #FF6B7A;
}

body.dark-mode .floating-look-up-btn {
  background: #1E1E24;
  color: #ECEFF4;
  border-color: rgba(255, 255, 255, 0.18);
}
