:root {
  color-scheme: light dark;
  /* Light Theme - Sterile Cyber-Grey / Warm Paper */
  --bg: #F6F5F0;
  --paper: #FDFDFA;
  --ink: #1D1B20;
  --muted: #5C5866;
  --soft: #A29CB0;
  --line: rgba(92, 88, 102, 0.1);
  --line-strong: rgba(92, 88, 102, 0.18);
  --violet: #6E62B4;
  --violet-dim: rgba(110, 98, 180, 0.05);
  --violet-glow: rgba(110, 98, 180, 0.12);
  --revision-red: #E04B4B;
  --revision-red-bg: rgba(224, 75, 75, 0.08);
  --revision-green: #24A36B;
  --revision-green-bg: rgba(36, 163, 107, 0.08);
  --max-width: 1200px;
  --radius: 6px;
  font-family: 'Outfit', sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Dark Theme - Obsidian Night */
    --bg: #110F13;
    --paper: #161418;
    --ink: #EBE7F0;
    --muted: #A29CB0;
    --soft: #6E6A78;
    --line: rgba(235, 231, 240, 0.08);
    --line-strong: rgba(235, 231, 240, 0.16);
    --violet: #B5AFCF;
    --violet-dim: rgba(181, 175, 207, 0.08);
    --violet-glow: rgba(181, 175, 207, 0.2);
    --revision-red: #F26262;
    --revision-red-bg: rgba(242, 98, 98, 0.12);
    --revision-green: #37C283;
    --revision-green-bg: rgba(55, 194, 131, 0.12);
  }
}

/* Explicit Manual Theme Overrides */
html[data-theme="light"] {
  color-scheme: light;
  --bg: #F6F5F0;
  --paper: #FDFDFA;
  --ink: #1D1B20;
  --muted: #5C5866;
  --soft: #A29CB0;
  --line: rgba(92, 88, 102, 0.1);
  --line-strong: rgba(92, 88, 102, 0.18);
  --violet: #6E62B4;
  --violet-dim: rgba(110, 98, 180, 0.05);
  --violet-glow: rgba(110, 98, 180, 0.12);
  --revision-red: #E04B4B;
  --revision-red-bg: rgba(224, 75, 75, 0.08);
  --revision-green: #24A36B;
  --revision-green-bg: rgba(36, 163, 107, 0.08);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #110F13;
  --paper: #161418;
  --ink: #EBE7F0;
  --muted: #A29CB0;
  --soft: #6E6A78;
  --line: rgba(235, 231, 240, 0.08);
  --line-strong: rgba(235, 231, 240, 0.16);
  --violet: #B5AFCF;
  --violet-dim: rgba(181, 175, 207, 0.08);
  --violet-glow: rgba(181, 175, 207, 0.2);
  --revision-red: #F26262;
  --revision-red-bg: rgba(242, 98, 98, 0.12);
  --revision-green: #37C283;
  --revision-green-bg: rgba(55, 194, 131, 0.12);
}

/* Theme logo display rules */
@media (prefers-color-scheme: light) {
  html:not([data-theme="dark"]) .theme-dark-only {
    display: none !important;
  }
}
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .theme-light-only {
    display: none !important;
  }
}
html[data-theme="light"] .theme-dark-only {
  display: none !important;
}
html[data-theme="dark"] .theme-light-only {
  display: none !important;
}

/* Base Styles */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s cubic-bezier(0.16, 1, 0.3, 1), color 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Low-noise Background Texture */
.bg-texture {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    radial-gradient(var(--line) 1px, transparent 0),
    radial-gradient(var(--line) 1px, transparent 0);
  background-size: 40px 40px;
  background-position: 0 0, 20px 20px;
  pointer-events: none;
}

.bg-texture::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, var(--violet-dim), transparent 60%);
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Sticky Header */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line);
  background: rgba(246, 245, 240, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: background-color 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

html[data-theme="dark"] header {
  background: rgba(17, 15, 19, 0.8);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) header {
    background: rgba(17, 15, 19, 0.8);
  }
}

.header-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  line-height: 1;
  flex: 0 0 auto;
}

.brand-mark {
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  flex: 0 0 auto;
}

.brand-icon {
  height: 38px;
  width: auto;
  display: block;
  object-fit: contain;
}

.brand span {
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand small {
  font-size: 0.65rem;
  color: var(--soft);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  white-space: nowrap;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

nav a {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 6px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--muted);
}

nav a:hover, nav a:focus-visible {
  color: var(--ink);
  border-color: var(--line-strong);
  background: rgba(92, 88, 102, 0.05);
  outline: none;
}

.nav-company-link {
  border: 1px solid var(--line-strong) !important;
}

/* Language and Theme Controls */
.controls-cluster {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.language-switch, .theme-switch {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  padding: 2px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(253, 253, 250, 0.3);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

html[data-theme="dark"] .language-switch, html[data-theme="dark"] .theme-switch {
  background: rgba(22, 20, 24, 0.3);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .language-switch,
  html:not([data-theme="light"]) .theme-switch {
    background: rgba(22, 20, 24, 0.3);
  }
}

.language-switch button, .theme-btn {
  appearance: none;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.language-switch button {
  font: 700 0.65rem/1 'Outfit', sans-serif;
  letter-spacing: 0.08em;
  height: 26px;
  padding: 0 8px;
  text-transform: uppercase;
}

.theme-btn {
  width: 26px;
  height: 26px;
}

.theme-btn svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
}

.language-switch button[aria-pressed="true"], .theme-btn.active {
  background: var(--ink);
  color: var(--paper);
}

.language-switch button:focus-visible, .theme-btn:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 1px;
}

/* Hero Section */
.hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 60px 24px 60px;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
  align-items: center;
  min-height: calc(100vh - 63px);
}

.hero-content {
  max-width: 500px;
}

h1 {
  font-family: 'Cardo', serif;
  font-size: 3.8rem;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 0 0 24px;
  text-wrap: balance;
}

.lead {
  font-size: 1.125rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 32px;
  font-weight: 300;
}

.hero-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.btn-disabled {
  font-family: 'Outfit', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 12px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: var(--line);
  color: var(--soft);
  cursor: not-allowed;
  display: inline-block;
  white-space: nowrap;
}

.btn-secondary {
  font-family: 'Outfit', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 12px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  background: rgba(253, 253, 250, 0.4);
  display: inline-block;
}

html[data-theme="dark"] .btn-secondary {
  background: rgba(22, 20, 24, 0.4);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .btn-secondary {
    background: rgba(22, 20, 24, 0.4);
  }
}

.btn-secondary:hover {
  border-color: var(--ink);
  background: var(--line);
}

.beta-explanation {
  font-size: 0.8rem;
  color: var(--soft);
  line-height: 1.5;
}

.beta-explanation a {
  color: var(--violet);
  text-decoration: underline;
}

/* High-Fidelity Desktop Cockpit Mockup */
.cockpit {
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08), 0 0 1px var(--line-strong);
  aspect-ratio: 1.48;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

html[data-theme="dark"] .cockpit {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 1px var(--line-strong);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .cockpit {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 1px var(--line-strong);
  }
}

.cockpit-titlebar {
  height: 34px;
  background: rgba(0, 0, 0, 0.02);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 14px;
  justify-content: space-between;
  flex-shrink: 0;
  user-select: none;
}

.cockpit-dots {
  display: flex;
  gap: 6px;
}

.cockpit-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--line-strong);
}

.cockpit-filename {
  font-size: 0.7rem;
  font-family: monospace;
  color: var(--muted);
  letter-spacing: 0.05em;
  font-weight: 500;
}

.cockpit-status-tag {
  font-size: 0.65rem;
  background: var(--violet-dim);
  border: 1px solid var(--line-strong);
  color: var(--violet);
  padding: 1px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.cockpit-body {
  display: flex;
  flex: 1;
  min-height: 0;
}

/* Sidebar: Binder */
.binder-sidebar {
  width: 170px;
  border-right: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.005);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-family: 'Outfit', sans-serif;
  flex-shrink: 0;
  user-select: none;
}

.binder-section-title {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--soft);
  letter-spacing: 0.12em;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.binder-items {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.binder-item {
  font-size: 0.72rem;
  padding: 4px 8px;
  border-radius: 4px;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.binder-item::before {
  content: "";
  width: 0.46rem;
  height: 0.34rem;
  border: 1px solid currentColor;
  border-radius: 2px;
  opacity: 0.55;
  flex: 0 0 auto;
}

.binder-item.active::before {
  border-color: var(--violet);
  background: var(--violet-dim);
  opacity: 1;
}

.binder-item:hover {
  background: var(--line);
  color: var(--ink);
}

.binder-item.active {
  background: var(--violet-dim);
  border: 1px solid var(--line-strong);
  color: var(--violet);
  font-weight: 600;
}

/* Main Editor Area */
.editor-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--paper);
}

/* Real App-faithful Editor AI Context Strip */
.editor-workbench-context-strip {
  border-bottom: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.005);
  padding: 8px 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
  user-select: none;
}

.editor-workbench-ai-target {
  font-size: 0.6rem;
  background: var(--ink);
  color: var(--paper);
  padding: 1px 6px;
  border-radius: 3px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.editor-workbench-context-chip {
  font-size: 0.6rem;
  background: var(--line);
  border: 1px solid var(--line-strong);
  color: var(--muted);
  padding: 1px 6px;
  border-radius: 3px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.editor-workbench-context-chip[data-tone="success"] {
  background: var(--revision-green-bg);
  border-color: rgba(36, 163, 107, 0.2);
  color: var(--revision-green);
}

.editor-workbench-context-chip[data-tone="warn"] {
  background: rgba(224, 150, 40, 0.08);
  border-color: rgba(224, 150, 40, 0.2);
  color: #c98018;
}

.editor-workbench-context-subtle-chip {
  font-size: 0.6rem;
  color: var(--soft);
  font-weight: 500;
}

.context-chip-row {
  display: flex;
  gap: 6px;
  align-items: center;
}

.editor-pane-writing {
  flex: 1;
  padding: 24px 32px;
  overflow-y: auto;
  position: relative;
}

.editor-heading {
  font-family: 'Cardo', serif;
  font-size: 1.5rem;
  font-weight: 400;
  margin: 0 0 16px;
}

.editor-text {
  font-family: 'Cardo', serif;
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
  color: var(--ink);
  text-align: justify;
}

/* Left Paragraph-level Change indicator Gutter/Rail */
.editor-paragraph-wrap {
  position: relative;
  padding-left: 12px;
  margin-bottom: 12px;
}

.editor-paragraph-wrap.revised {
  border-left: 2px solid var(--revision-green);
}

.editor-selection {
  background: var(--violet-glow);
  position: relative;
}

.editor-cursor {
  display: inline-block;
  width: 1.5px;
  height: 14px;
  background: var(--violet);
  margin-left: 1px;
  vertical-align: middle;
  animation: cursor-blink 1s infinite steps(2, start);
}

@keyframes cursor-blink {
  to { visibility: hidden; }
}

/* Right Sidebar: AI Copilot */
.copilot-sidebar {
  width: 230px;
  border-left: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.005);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-shrink: 0;
  user-select: none;
}

.copilot-card {
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.copilot-card.active {
  border-color: var(--violet);
  box-shadow: 0 4px 12px var(--violet-dim);
}

.copilot-card-muted {
  border-style: dashed;
  opacity: 0.85;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
}

.card-title {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.05em;
}

.card-title-compact {
  font-size: 0.6rem;
  margin-bottom: 4px;
}

.copilot-audit-text {
  font-size: 0.62rem;
  color: var(--muted);
  line-height: 1.45;
}

.card-status {
  font-size: 0.58rem;
  background: var(--violet-dim);
  color: var(--violet);
  padding: 1px 4px;
  border-radius: 3px;
  font-weight: 700;
  text-transform: uppercase;
}

/* Staged proposals with workspace-diff-segment styles */
.diff-block {
  font-size: 0.65rem;
  line-height: 1.4;
  font-family: 'Cardo', serif;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.diff-del {
  color: var(--revision-red);
  background-color: var(--revision-red-bg);
  text-decoration: line-through;
  padding: 2px 4px;
  border-radius: 2px;
}

.diff-add {
  color: var(--revision-green);
  background-color: var(--revision-green-bg);
  padding: 2px 4px;
  border-radius: 2px;
  font-weight: 500;
}

.diff-actions {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.diff-btn {
  flex: 1;
  font-family: 'Outfit', sans-serif;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 5px;
  border-radius: 4px;
  border: 1px solid var(--line-strong);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.15s ease;
}

.btn-accept {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.btn-accept:hover {
  opacity: 0.9;
}

.btn-reject {
  background: transparent;
  color: var(--muted);
}

.btn-reject:hover {
  background: var(--line);
  color: var(--ink);
}

.copilot-meta-card {
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 10px;
  font-size: 0.68rem;
  color: var(--muted);
  line-height: 1.4;
}

.copilot-meta-card b {
  display: block;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--soft);
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

/* Status Strip */
.status-strip {
  max-width: var(--max-width);
  margin: 40px auto 40px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.status-cell {
  background: rgba(253, 253, 250, 0.4);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

html[data-theme="dark"] .status-cell {
  background: rgba(22, 20, 24, 0.4);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .status-cell {
    background: rgba(22, 20, 24, 0.4);
  }
}

.status-cell:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.status-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--soft);
  letter-spacing: 0.12em;
  display: block;
  margin-bottom: 6px;
}

.status-cell h4 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 10px;
  color: var(--ink);
}

.status-cell p {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

/* General Layout Sections */
.section {
  max-width: var(--max-width);
  margin: 80px auto;
  padding: 0 24px;
}

.section.split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 64px;
  align-items: flex-start;
}

.section-pre {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--violet);
  letter-spacing: 0.15em;
  display: block;
  margin-bottom: 12px;
}

.section h2 {
  font-family: 'Cardo', serif;
  font-size: 2.2rem;
  font-weight: 400;
  line-height: 1.3;
  margin: 0 0 20px;
}

.section p {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.625;
  margin: 0 0 24px;
}

/* Timeline Layout */
.experience-timeline {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.timeline-node {
  position: relative;
  padding-left: 20px;
  border-left: 1px solid var(--line);
}

.timeline-node::before {
  content: "";
  position: absolute;
  left: -4.5px;
  top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--violet);
}

.timeline-node h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--ink);
}

.timeline-node p {
  font-size: 0.85rem;
  margin: 0;
  line-height: 1.5;
}

/* Evidence Grid */
.evidence-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 32px;
}

.evidence-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.evidence-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
}

html[data-theme="dark"] .evidence-card:hover {
  box-shadow: none;
}

.card-icon-accent {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--violet);
  margin-bottom: 16px;
}

.evidence-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--ink);
}

.evidence-card p {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.55;
}

/* Beta Pre-Release Section */
.download-section {
  text-align: center;
  max-width: 600px;
  margin: 100px auto 100px;
  padding: 0 24px;
}

.download-section h2 {
  font-family: 'Cardo', serif;
  font-size: 2.2rem;
  font-weight: 400;
  margin: 0 0 16px;
}

.download-section p {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 32px;
}

/* Sticky Footer */
footer {
  border-top: 1px solid var(--line);
  padding: 40px 24px;
  background: rgba(25, 28, 26, 0.01);
  font-family: 'Outfit', sans-serif;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.footer-container p {
  font-size: 0.78rem;
  color: var(--soft);
  margin: 0;
}

.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.footer-links a:hover {
  color: var(--violet);
}

/* Legal / Support Subpages Styles */
main.legal-doc {
  max-width: 720px;
  margin: 60px auto 100px;
  padding: 0 24px;
}

main.legal-doc h1 {
  font-family: 'Cardo', serif;
  font-size: 3rem;
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

main.legal-doc .meta-info {
  font-size: 0.8rem;
  color: var(--soft);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px;
}

main.legal-doc h2 {
  font-family: 'Cardo', serif;
  font-size: 1.6rem;
  font-weight: 400;
  margin-top: 40px;
  margin-bottom: 16px;
  color: var(--ink);
  border-left: 2px solid var(--violet);
  padding-left: 14px;
}

main.legal-doc p {
  margin-bottom: 20px;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ink);
}

main.legal-doc ul, main.legal-doc ol {
  margin-bottom: 20px;
  padding-left: 20px;
}

main.legal-doc li {
  margin-bottom: 10px;
  font-size: 1.05rem;
  line-height: 1.6;
}

main.legal-doc .highlight-box {
  background: var(--violet-glow);
  border-left: 2px solid var(--violet);
  padding: 20px;
  margin: 32px 0;
  border-radius: 4px;
}

main.legal-doc .highlight-box p {
  font-size: 1.05rem;
  line-height: 1.6;
}

main.legal-doc .highlight-box p:last-child {
  margin-bottom: 0;
}

.back-link {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--violet);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: opacity 0.2s ease;
}

.back-link:hover {
  opacity: 0.8;
}

/* Responsive Rules */
@media (max-width: 991px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 40px;
    padding-bottom: 40px;
    gap: 32px;
    min-height: auto;
  }
  .cockpit {
    aspect-ratio: auto;
    height: 380px;
  }
  .status-strip {
    grid-template-columns: repeat(2, 1fr);
  }
  .section.split {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .evidence-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  h1 {
    font-size: 2.8rem;
  }
  .binder-sidebar, .copilot-sidebar {
    display: none !important; /* Hide sidebars on mobile cockpit preview for clarity */
  }
  .status-strip {
    grid-template-columns: 1fr;
  }
  main.legal-doc h1 {
    font-size: 2.3rem;
  }
  .header-container {
    padding: 10px 16px;
  }
  nav {
    display: none; /* Hide primary nav links on mobile header, keeping brand & switchers */
  }
}
