/* ═══════════════════════════════════════════
   ARKTIS COMPLIANCE — EDITORIAL DESIGN SYSTEM
   High-Trust, Warm Editorial Aesthetic
   ═══════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ── Design Tokens ── */
:root {
  /* Warm Editorial Palette */
  --bg-primary: #FDFBF7; /* Light Creme / Yellowish */
  --bg-secondary: #F4F0E6; /* Sand */
  --bg-tertiary: #E8E2D2;
  
  --text-primary: #0A0A0A; /* Stark Black */
  --text-secondary: #4A4A42; /* Deep Warm Grey */
  --text-tertiary: #7D7D73;

  --border-color: #D6D2C4;
  --border-dark: #0A0A0A;

  --accent-primary: #1A3D6E; /* Deep Navy */
  --accent-gold: #B8953E; /* Refined Brass */

  --red-600: #B91C1C;
  --red-100: #FEE2E2;
  --amber-600: #B45309;
  --amber-100: #FEF3C7;
  --emerald-600: #047857;
  --emerald-100: #D1FAE5;

  /* Typography */
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Inter', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Type Scale */
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  2rem;
  --text-4xl:  3rem;
  --text-5xl:  4rem;
  --text-6xl:  5rem;

  /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* UI Elements */
  --radius-sm: 4px;
  --radius-md: 8px;
  --shadow-subtle: 0 4px 20px rgba(10, 10, 10, 0.04);
  
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-heavy: cubic-bezier(0.65, 0, 0.35, 1);
  --duration: 300ms;

  /* Layout */
  --max-width: 1200px;
  --nav-height: 80px;
}

/* ── Reset & Base ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { font-family: var(--font-sans); color: var(--text-primary); background-color: var(--bg-primary);
  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)' opacity='0.03'/%3E%3C/svg%3E"); line-height: 1.7; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-serif); font-weight: 600; color: var(--text-primary); letter-spacing: -0.02em; line-height: 1.05; }
a { text-decoration: none; color: inherit; transition: color 0.2s; }
button { cursor: pointer; border: none; background: none; font-family: inherit; font-size: inherit; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }
input, select, textarea { font-family: inherit; font-size: inherit; }

/* Accessibility */
*:focus-visible { outline: 2px solid var(--accent-gold); outline-offset: 2px; }

/* Layout Utilities */
.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-8); }

/* ── Typography Classes ── */
.mono { font-family: var(--font-mono); }
.serif { font-family: var(--font-serif); }
.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-muted { color: var(--text-secondary); }
.tracking-tight { letter-spacing: -0.02em; }
.tracking-widest { letter-spacing: 0.1em; text-transform: uppercase; }

/* ═══════════════════════════════════════════
   GLOBAL COMPONENTS
   ═══════════════════════════════════════════ */

/* Navigation */
.nav { background: transparent; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  position: fixed; top: 0; left: 0; right: 0; height: var(--nav-height);
   
  border-bottom: 1px solid var(--border-color); z-index: 100;
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-8); }
.nav__logo { font-family: var(--font-serif); font-size: var(--text-2xl); font-weight: 700; color: var(--text-primary); letter-spacing: -0.02em; }
.nav__links { display: flex; gap: var(--space-8); align-items: center; }
.nav__link { font-size: var(--text-sm); font-weight: 500; color: var(--text-secondary); transition: color 0.2s; }
.nav__link:hover { color: var(--text-primary); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  padding: var(--space-3) var(--space-6); font-size: var(--text-sm); font-weight: 600;
  border-radius: var(--radius-sm); transition: all 0.4s var(--ease); text-align: center;
}
.btn-primary { background: var(--text-primary); color: var(--bg-primary); border: 1px solid var(--text-primary); }
.btn-primary:hover { background: var(--accent-primary); color: var(--bg-primary); border-color: var(--accent-primary); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(26, 61, 110, 0.2); }
.btn-outline { background: transparent; border: 1px solid var(--text-primary); color: var(--text-primary); }
.btn-outline:hover { background: var(--bg-secondary); transform: translateY(-1px); }
.btn-accent { background: var(--accent-gold); color: #FFF; }
.btn-accent:hover { background: #A38031; }
.btn-text { padding: var(--space-2) 0; color: var(--text-secondary); border-bottom: 1px solid transparent; border-radius: 0; }
.btn-text:hover { color: var(--text-primary); border-bottom-color: var(--text-primary); }

/* ═══════════════════════════════════════════
   LANDING PAGE (index.html)
   ═══════════════════════════════════════════ */

/* Hero Section */
.hero { padding: var(--space-24) 0 var(--space-24); border-bottom: 1px solid var(--border-color); background: var(--bg-primary); }
.hero__grid { display: grid; grid-template-columns: 1fr; gap: var(--space-16); text-align: center; align-items: center; justify-content: center; }
.hero__badge { display: inline-flex; font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text-secondary); border: 1px solid var(--border-color); border-radius: var(--radius-sm); padding: var(--space-1) var(--space-3); font-weight: 600; margin-bottom: var(--space-8); text-transform: uppercase; letter-spacing: 0.1em; margin-left: auto; margin-right: auto; }
.hero__title { font-size: var(--text-6xl); line-height: 1.1; letter-spacing: -0.03em; margin-bottom: var(--space-6); color: var(--text-primary); max-width: 900px; margin-left: auto; margin-right: auto; }
.hero__subtitle { font-size: var(--text-xl); font-family: var(--font-serif); font-style: italic; color: var(--text-secondary); max-width: 700px; line-height: 1.6; margin-bottom: var(--space-10); margin-left: auto; margin-right: auto; }
.hero__actions { display: flex; gap: var(--space-4); justify-content: center; }

/* Stats Bar */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 2px solid var(--border-dark); border-bottom: 2px solid var(--border-dark); background: var(--bg-primary); }
.stat-item { padding: var(--space-10) var(--space-8); border-right: 1px solid var(--border-color); text-align: center; display: flex; flex-direction: column; justify-content: center; }
.stat-item:last-child { border-right: none; }
.stat-item__num { font-family: var(--font-serif); font-size: var(--text-5xl); font-weight: 500; color: var(--text-primary); margin-bottom: var(--space-2); }
.stat-item__label { font-size: var(--text-sm); font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.1em; }

/* Standard Section */
.section { padding: var(--space-32) 0; border-bottom: 1px solid var(--border-color); background: var(--bg-primary); }
.section--alt { background: var(--bg-secondary); }
.section--dark { background: var(--text-primary); color: var(--bg-primary); }
.section__header { margin-bottom: var(--space-16); max-width: 800px; text-align: center; margin-left: auto; margin-right: auto; }
.section__eyebrow { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--accent-gold); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: var(--space-4); display: block; }
.section__title { font-size: var(--text-5xl); letter-spacing: -0.02em; margin-bottom: var(--space-6); line-height: 1.1; }
.section__subtitle { font-size: var(--text-xl); font-family: var(--font-serif); font-style: italic; color: var(--text-secondary); line-height: 1.6; }
.section--dark h2, .section--dark h3 { color: var(--bg-primary); }
.section--dark .section__subtitle { color: #A3A3A3; }

/* Features Grid */
.grid-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-12); }
.feature-card { padding: var(--space-8); border: 1px solid var(--border-color); background: var(--bg-primary); border-radius: var(--radius-md); box-shadow: var(--shadow-subtle); transition: transform 0.3s var(--ease); }
.feature-card:hover { transform: translateY(-4px); border-color: var(--text-secondary); }
.feature-card__title { font-size: var(--text-2xl); margin-bottom: var(--space-4); letter-spacing: -0.01em; }
.feature-card__text { font-size: var(--text-base); color: var(--text-secondary); line-height: 1.7; margin-bottom: var(--space-8); }

/* ═══════════════════════════════════════════
   CALCULATOR (calculator.html)
   ═══════════════════════════════════════════ */

.calc-layout { display: flex; min-height: 100vh; padding-top: var(--nav-height); background: var(--bg-secondary); }

/* Sidebar Steps */
.calc-sidebar { width: 320px; flex-shrink: 0; background: var(--bg-primary); border-right: 1px solid var(--border-color); padding: var(--space-10) var(--space-8); position: sticky; top: var(--nav-height); height: calc(100vh - var(--nav-height)); overflow-y: auto; }
.calc-sidebar h2 { font-family: var(--font-serif); font-size: var(--text-2xl); margin-bottom: var(--space-2); }
.step-list { display: flex; flex-direction: column; gap: var(--space-8); margin-top: var(--space-10); }
.step-item { display: flex; gap: var(--space-4); opacity: 0.5; transition: opacity 0.3s; }
.step-item.active { opacity: 1; }
.step-item.completed { opacity: 0.8; }
.step-item__num { font-family: var(--font-serif); font-size: var(--text-lg); font-weight: 600; font-style: italic; color: var(--accent-gold); }
.step-item__text { font-size: var(--text-base); font-weight: 600; color: var(--text-primary); }
.step-item__desc { font-size: var(--text-sm); color: var(--text-secondary); margin-top: 4px; font-family: var(--font-serif); font-style: italic; }

/* Main Content */
.calc-main { flex: 1; padding: var(--space-12) var(--space-16); max-width: 900px; }
.calc-step { display: none; animation: fadeIn 0.4s var(--ease); }
.calc-step.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }

.calc-header { margin-bottom: var(--space-12); padding-bottom: var(--space-6); border-bottom: 2px solid var(--text-primary); }
.calc-title { font-size: var(--text-4xl); letter-spacing: -0.02em; margin-bottom: var(--space-4); }
.calc-desc { font-size: var(--text-lg); font-family: var(--font-serif); font-style: italic; color: var(--text-secondary); }

/* Form Elements */
.form-group { margin-bottom: var(--space-10); }
.form-label { display: block; font-size: var(--text-base); font-weight: 600; margin-bottom: var(--space-3); color: var(--text-primary); }

.input, .select { width: 100%; padding: var(--space-4); border: 1px solid var(--border-color); background: var(--bg-primary); font-size: var(--text-base); transition: border-color 0.2s; border-radius: var(--radius-sm); }
.input:focus, .select:focus { outline: none; border-color: var(--accent-gold); box-shadow: 0 0 0 3px rgba(184, 149, 62, 0.2); transition: all 0.3s var(--ease); }

/* Radio Tiles (Grid) */
.radio-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-4); }
.radio-tile { position: relative; border: 1px solid var(--border-color); padding: var(--space-6); background: var(--bg-primary); border-radius: var(--radius-md); cursor: pointer; transition: all 0.4s var(--ease); box-shadow: var(--shadow-subtle); }
.radio-tile input { position: absolute; opacity: 0; }
.radio-tile:hover { border-color: var(--text-secondary); }
.radio-tile:has(input:checked) { border-color: var(--accent-gold); background: var(--bg-secondary); box-shadow: 0 0 0 1px var(--accent-gold); }
.radio-title { font-size: var(--text-base); font-weight: 600; margin-bottom: var(--space-2); display: block; color: var(--text-primary); }
.radio-desc { font-size: var(--text-sm); color: var(--text-secondary); line-height: 1.6; }

/* Radio Pills (Inline) */
.radio-pills { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.radio-pill { position: relative; border: 1px solid var(--border-color); padding: var(--space-3) var(--space-5); background: var(--bg-primary); border-radius: 40px; cursor: pointer; font-size: var(--text-sm); font-weight: 500; transition: all 0.4s var(--ease); }
.radio-pill input { position: absolute; opacity: 0; }
.radio-pill:hover { border-color: var(--text-secondary); }
.radio-pill:has(input:checked) { background: var(--accent-gold); color: var(--bg-primary); border-color: var(--accent-gold); }

/* Modification Table (Step 2) */
.mod-table { border: 1px solid var(--border-color); background: var(--bg-primary); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-subtle); }
.mod-row { display: grid; grid-template-columns: 50px 1fr 220px; border-bottom: 1px solid var(--border-color); align-items: center; }
.mod-row:last-child { border-bottom: none; }
.mod-row.selected { background: var(--bg-secondary); }
.mod-check { padding: var(--space-5); display: flex; align-items: flex-start; justify-content: center; }
.mod-check input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent-gold); cursor: pointer; }
.mod-info { padding: var(--space-5) var(--space-5) var(--space-5) 0; }
.mod-title { font-family: var(--font-serif); font-size: var(--text-xl); font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
.mod-desc { font-size: var(--text-sm); color: var(--text-secondary); line-height: 1.6; }
.mod-severity { padding: var(--space-5); display: none; }
.mod-row.selected .mod-severity { display: block; }
.sev-select { width: 100%; padding: var(--space-3); font-size: var(--text-sm); border: 1px solid var(--border-color); background: var(--bg-primary); font-weight: 500; border-radius: var(--radius-sm); }

/* Impact Questions (Step 3) */
.q-list { display: flex; flex-direction: column; gap: var(--space-8); }
.q-item { border-bottom: 1px solid var(--border-color); padding-bottom: var(--space-8); }
.q-item:last-child { border-bottom: none; }
.q-text { font-family: var(--font-serif); font-size: var(--text-xl); font-weight: 500; color: var(--text-primary); margin-bottom: var(--space-4); line-height: 1.5; }
.q-ref { font-family: var(--font-mono); font-size: 12px; color: var(--text-tertiary); margin-top: var(--space-4); }

/* Results Dashboard (Step 4) */
.results-header { padding: var(--space-12) var(--space-10); background: #111; color: var(--bg-primary); border: 8px solid var(--bg-secondary); outline: 1px solid var(--border-color); margin-bottom: var(--space-12); position: relative; }
.results-header::before { content: ""; position: absolute; top: 10px; left: 10px; right: 10px; bottom: 10px; border: 1px solid rgba(184, 149, 62, 0.5); /* Gold border to detach from black nav */ pointer-events: none; }
.results-header-inner { display: flex; justify-content: space-between; align-items: flex-end; }
.verdict-label { font-family: var(--font-mono); font-size: var(--text-xs); color: #A3A3A3; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: var(--space-3); }
.verdict-title { font-size: var(--text-5xl); letter-spacing: -0.02em; margin-bottom: var(--space-4); line-height: 1.1; }
.verdict-title.v-substantial { color: #FCA5A5; } /* Soft Red */
.verdict-title.v-likely { color: #FCD34D; } /* Soft Amber */
.verdict-title.v-not { color: #A7F3D0; } /* Soft Emerald */
.verdict-desc { font-family: var(--font-serif); font-size: var(--text-xl); font-style: italic; color: #E5E5E5; max-width: 600px; line-height: 1.6; }
.score-box { text-align: right; }
.score-num { font-family: var(--font-serif); font-size: var(--text-6xl); font-weight: 500; line-height: 1; margin-bottom: var(--space-2); }
.score-max { font-family: var(--font-mono); font-size: var(--text-sm); color: #A3A3A3; }

/* Report Sections */
.report-grid { display: grid; grid-template-columns: 2fr 1fr; gap: var(--space-8); }
.report-panel { border: 1px solid var(--border-color); background: var(--bg-primary); border-radius: var(--radius-md); box-shadow: var(--shadow-subtle); overflow: hidden; }
.panel-header { padding: var(--space-5) var(--space-6); border-bottom: 1px solid var(--border-color); font-size: var(--text-lg); font-family: var(--font-serif); font-weight: 600; background: var(--bg-secondary); }
.panel-body { padding: var(--space-6); }

/* Breakdown List */
.breakdown-item { display: flex; justify-content: space-between; align-items: center; padding: var(--space-3) 0; border-bottom: 1px solid var(--border-color); }
.breakdown-item:last-child { border-bottom: none; }
.breakdown-name { font-size: var(--text-sm); font-weight: 500; }
.breakdown-val { font-family: var(--font-mono); font-size: var(--text-sm); font-weight: 600; }

/* Action List */
.action-list { display: flex; flex-direction: column; gap: var(--space-4); }
.act-item { display: flex; gap: var(--space-4); padding: var(--space-5); background: var(--bg-secondary); border-left: 3px solid var(--border-color); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.act-item.act-critical { border-left-color: var(--red-600); background: var(--red-100); }
.act-item.act-warning { border-left-color: var(--amber-600); background: var(--amber-100); }
.act-icon { flex-shrink: 0; width: 20px; height: 20px; margin-top: 2px; }
.act-critical .act-icon { color: var(--red-600); }
.act-warning .act-icon { color: var(--amber-600); }
.act-text { font-size: var(--text-base); color: var(--text-primary); line-height: 1.6; }
.act-text strong { font-weight: 700; }

/* Bottom Nav */
.calc-footer { display: flex; justify-content: space-between; padding-top: var(--space-10); margin-top: var(--space-10); border-top: 1px solid var(--border-color); }

/* Responsive */
@media (max-width: 1024px) {
  .hero__title { font-size: var(--text-5xl); }
  .grid-features { grid-template-columns: 1fr; }
  .calc-layout { flex-direction: column; }
  .calc-sidebar { width: 100%; height: auto; position: static; border-right: none; border-bottom: 1px solid var(--border-color); padding: var(--space-8); }
  .step-list { flex-direction: row; flex-wrap: wrap; gap: var(--space-4); margin-top: var(--space-6); }
  .step-item__desc { display: none; }
  .report-grid { grid-template-columns: 1fr; }
  .results-header-inner { flex-direction: column; align-items: flex-start; gap: var(--space-6); }
  .score-box { text-align: left; }
}

@media (max-width: 768px) {
  :root { --nav-height: 64px; }
  .hero__title { font-size: var(--text-4xl); }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat-item { border-bottom: 1px solid var(--border-color); }
  .stat-item:nth-child(2n) { border-right: none; }
  .nav__links { display: none; }
  .calc-main { padding: var(--space-8) var(--space-4); }
  .mod-row { grid-template-columns: 50px 1fr; }
  .mod-severity { grid-column: 2; padding: 0 0 var(--space-5) 0; }
}

/* ── EUR-Lex Integrations ── */
.act-body .oj-doc-ti {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: var(--space-6);
  color: var(--text-primary);
  text-align: left !important;
}
.act-body .eli-title, .act-body .oj-ti-art, .act-body .oj-ti-section-1, .act-body .oj-ti-grseq-1 {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: var(--space-8);
  margin-bottom: var(--space-4);
  text-align: left !important;
}
.act-body .eli-title { font-size: 1.5rem; }
.act-body .oj-ti-art { font-size: 1.25rem; }
.act-body .oj-ti-section-1 { font-size: 1.75rem; }
.act-body .oj-ti-grseq-1 { font-size: 2rem; border-bottom: 1px solid var(--border-color); padding-bottom: var(--space-2); }

.act-body p, .act-body .oj-normal, .act-body .eli-container {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: var(--space-4);
  text-align: left !important;
}

.act-body .oj-bold {
  font-weight: 600;
  color: var(--text-primary);
}

.act-body .oj-italic {
  font-style: italic;
}

.act-body table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--space-4);
}
.act-body td, .act-body th {
  border: none;
  padding: var(--space-2) var(--space-3) var(--space-2) 0;
  vertical-align: top;
}

/* Fix sidebar links from EUR-Lex TOC */
.sidebar-nav .nav { background: transparent; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  position: static !important;
  height: auto !important;
  background: transparent !important;
  backdrop-filter: none !important;
  border: none !important;
}

.sidebar-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sidebar-nav ul.collapse {
  display: block; /* ensure they are visible */
  padding-left: 1rem;
}
.sidebar-nav li {
  margin-bottom: 0.5rem;
}
.sidebar-nav a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.9rem;
}
.sidebar-nav a:hover {
  color: var(--accent-primary);
}
.toc-eli-label {
  font-weight: 500;
}

/* ── Premium Timeline Component ── */
.timeline-section {
  background: var(--bg-primary);
  border-top: 1px solid var(--border-color);
  padding: var(--space-32) 0;
}
.timeline-container {
  display: flex; flex-direction: column;
  max-width: 800px; margin: 0 auto;
}
.timeline-row {
  display: grid; grid-template-columns: 140px 1fr; gap: 0;
  position: relative;
  transition: opacity 0.3s var(--ease);
}
.timeline-row:hover .timeline-content {
  transform: translateX(6px);
}
.timeline-label {
  font-family: var(--font-sans); font-weight: 700; color: var(--text-primary);
  text-align: right; padding-top: 6px; padding-right: var(--space-8);
  font-size: 1.1rem;
}
.timeline-passed .timeline-label {
  color: var(--text-tertiary);
}
.timeline-label-current { color: var(--accent-gold); font-size: 1.25rem; }
.timeline-label-future { color: var(--text-secondary); }
.timeline-sub-label { 
  font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; 
  letter-spacing: 0.1em; color: var(--text-secondary); display: block; margin-top: 4px;
}
.timeline-label-current .timeline-sub-label { color: var(--accent-gold); font-weight: 700; }

.timeline-content {
  padding-left: var(--space-10); padding-bottom: var(--space-12); position: relative;
  border-left: 2px solid var(--border-color);
  transition: transform 0.4s var(--ease);
}
.timeline-row:last-child .timeline-content { border-left-color: transparent; padding-bottom: 0; }

.timeline-line-passed { border-left-color: rgba(184, 149, 62, 0.2); }
.timeline-line-current { border-left-color: var(--accent-gold); }
.timeline-line-future { border-left: 2px dashed var(--border-color); }

.timeline-dot {
  position: absolute; left: -7px; top: 10px; width: 12px; height: 12px;
  border-radius: 50%;
  transition: all 0.3s var(--ease);
}
.timeline-dot-passed { background: rgba(184, 149, 62, 0.3); }
.timeline-dot-current {
  background: var(--accent-gold);
  box-shadow: 0 0 0 6px rgba(184, 149, 62, 0.2);
  animation: pulse-gold 2s infinite cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes pulse-gold {
  0% { box-shadow: 0 0 0 0 rgba(184, 149, 62, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(184, 149, 62, 0); }
  100% { box-shadow: 0 0 0 0 rgba(184, 149, 62, 0); }
}
.timeline-dot-future {
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  left: -8px; width: 14px; height: 14px;
}
.timeline-row:hover .timeline-dot-future {
  border-color: var(--text-secondary);
}

.timeline-title {
  font-family: var(--font-serif); font-size: 1.5rem; margin-bottom: var(--space-3);
  color: var(--text-primary); transition: color 0.3s;
}
.timeline-row:hover .timeline-title { color: var(--accent-gold); }
.timeline-desc {
  font-size: 1rem; color: var(--text-secondary); line-height: 1.7; max-width: 550px;
}
.timeline-passed .timeline-title { color: var(--text-secondary); }
.timeline-passed .timeline-desc { color: var(--text-tertiary); }
.timeline-passed { opacity: 0.8; }
.timeline-struck { text-decoration: none; } /* removed ugly strikethrough */

/* Mobile Timeline Adjustments */
@media (max-width: 768px) {
  .timeline-row { grid-template-columns: 80px 1fr; }
  .timeline-label { font-size: 0.95rem; padding-right: var(--space-4); }
  .timeline-label-current { font-size: 1rem; }
  .timeline-content { padding-left: var(--space-6); }
  .timeline-title { font-size: 1.25rem; }
}

/* ── Resources Component ── */
.resource-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  padding: var(--space-6);
}
.resource-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  margin-bottom: var(--space-3);
}
.resource-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-6);
}
.resource-btn {
  width: 100%;
  display: block;
}

/* ── Modal Close Button ── */
.modal-close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-primary);
}

/* ── Methodology Component ── */
.method-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-8);
}
.method-card {
  border-top: 1px solid var(--text-secondary);
  padding-top: var(--space-6);
}
.method-phase {
  margin-bottom: var(--space-4);
  color: var(--accent-gold);
}
.method-title {
  margin-bottom: var(--space-2);
  color: var(--bg-primary);
}
.method-desc {
  color: var(--text-tertiary);
}

/* ── UI Utilities ── */
.nav__link--active {
  color: var(--text-primary) !important;
  font-weight: 600;
}
.layout-top-padded {
  margin-top: 80px;
}
.sidebar-header-margin {
  margin-bottom: var(--space-8);
}
.sidebar-header-title {
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

/* ── Fine Calculator Components ── */
.fine-calc-btn {
  margin-top: var(--space-8);
  width: 100%;
  font-size: 1.1rem;
  padding: var(--space-4);
}
.fine-result-container {
  margin-top: var(--space-8);
  border-top: 1px solid var(--border-color);
  padding-top: var(--space-8);
}
.fine-result-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  margin-bottom: var(--space-4);
}
.fine-result-amount {
  font-family: var(--font-sans);
  font-size: 4rem;
  font-weight: 800;
  color: #D32F2F;
  line-height: 1;
  margin-bottom: var(--space-2);
}
.fine-result-logic {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-8);
}
.fine-result-cta {
  width: 100%;
  text-align: center;
  display: block;
}

/* ── Article 11 Layout ── */
.article-layout {
  max-width: 1000px;
  margin: 120px auto 80px;
  padding: 0 var(--space-6);
}

/* ── Article 11 Breakdown Components ── */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-6);
}
.article-card {
  position: relative;
  overflow: hidden;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  padding: var(--space-6);
}
.article-step-num {
  font-family: var(--font-mono);
  font-size: 3rem;
  opacity: 0.15;
  position: absolute;
  top: -10px;
  right: -10px;
  line-height: 1;
  color: var(--accent-gold);
  font-family: var(--font-serif);
  font-size: 2rem;
  margin-bottom: var(--space-2);
}
.article-step-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: var(--space-3);
}
.article-step-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}
.article-cta-box {
  margin-top: var(--space-12);
  padding: var(--space-8);
  background: var(--text-primary);
  color: #fff;
  text-align: center;
}
.article-cta-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  margin-bottom: var(--space-4);
}
.article-cta-desc {
  font-size: 1.1rem;
  color: #ccc;
  margin-bottom: var(--space-6);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.article-cta-btn {
  border-color: #fff;
  color: #fff;
}

/* ── Regulation Explorer Components ── */
.filter-bar-sticky {
  margin-top: var(--nav-height);
  position: sticky;
  background: var(--bg-primary); /* solid to prevent text bleed */
  top: var(--nav-height);
  
  
  border-bottom: 1px solid var(--border-color);
  z-index: 90;
  padding: var(--space-4) var(--space-8);
  display: flex;
  gap: var(--space-4);
  align-items: center;
}
.filter-bar-title {
  font-family: var(--font-serif);
  font-weight: 600;
}
.filter-bar-cta {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.dev-translation-card {
  background: var(--bg-secondary);
  border-left: 4px solid var(--accent-gold);
  padding: var(--space-4);
  margin: var(--space-4) 0;
  font-family: var(--font-sans);
}
.dev-translation-title {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  margin-bottom: 4px;
  color: var(--text-primary);
}
.dev-translation-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin: 0;
}

/* ── Regulation Reader UI ── */
.regulation-reader {
  max-width: 850px;
  margin: 0 auto;
  font-family: var(--font-sans);
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-primary);
  padding: var(--space-8) var(--space-6);
}

.regulation-reader .oj-ti-art {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 700;
  margin-top: var(--space-8);
  margin-bottom: var(--space-4);
  color: var(--text-primary);
}

.regulation-reader .oj-ti-section-1 {
  font-family: var(--font-serif);
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--accent-gold);
  margin-top: var(--space-12);
  margin-bottom: var(--space-6);
  border-bottom: 2px solid var(--border-color);
  padding-bottom: var(--space-4);
}

.part-tabs-container {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-8);
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-secondary);
  position: sticky;
  top: calc(var(--nav-height) + 65px); /* sits right below the Explore filter */
  z-index: 89;
  overflow-x: auto;
}
.part-tab {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.part-tab:hover {
  border-color: var(--text-primary);
}
.part-tab.active {
  background: var(--text-primary);
  color: #fff;
  border-color: var(--text-primary);
}

/* ═══════════════════════════════════════════
   MILLION-DOLLAR ENTERPRISE POLISH
   ═══════════════════════════════════════════ */

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
  border-left: 1px solid var(--border-color);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 10px;
  border: 2px solid var(--bg-primary);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

/* Scroll Animations */
.reveal-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease-heavy), transform 0.8s var(--ease-heavy);
  will-change: opacity, transform;
}
.reveal-up.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal-up {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* Dynamic Glassmorphism Nav */
.nav { background: transparent; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: height 0.4s var(--ease), background 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.nav--scrolled {
  height: 64px;
  background: var(--bg-primary); /* Slightly darker creme with opacity */
  
  -webkit-
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
}

/* Tactile Card Depth (Embossing) */
.feature-card, .resource-card, .article-card, .mod-table {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8), var(--shadow-subtle);
  transition: transform 0.4s var(--ease-heavy), box-shadow 0.4s var(--ease-heavy), border-color 0.4s var(--ease);
}
.feature-card:hover, .resource-card:hover, .article-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: inset 0 1px 0 rgba(255,255,255,1), 0 12px 32px rgba(10, 10, 10, 0.08);
  border-color: var(--accent-gold);
}

/* Gold Separator Lines */
.section__title {
  position: relative;
  padding-bottom: var(--space-4);
  margin-bottom: var(--space-6) !important;
}
.section__title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 1px;
  background: var(--accent-gold);
}


/* ═══════════════════════════════════════════
   PRINT STYLES (PDF EXPORT)
   ═══════════════════════════════════════════ */
@media print {
  body {
    background: #FFF;
    color: #000;
  }
  .nav, .calc-sidebar, .calc-footer, .hero__actions, .btn {
    display: none !important;
  }
  .calc-main, .container {
    padding: 0;
    margin: 0;
    max-width: none;
  }
  .results-header {
    background: #FFF !important;
    color: #000 !important;
    border: 2px solid #000 !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  .results-header::before {
    display: none;
  }
  .verdict-title.v-substantial { color: #B91C1C !important; }
  .verdict-title.v-likely { color: #B45309 !important; }
  .verdict-title.v-not { color: #047857 !important; }
  .verdict-desc { color: #444 !important; }
  
  .report-panel {
    border: 1px solid #000;
    box-shadow: none;
    break-inside: avoid;
  }
  .panel-header {
    background: #EEE !important;
    color: #000;
    border-bottom: 1px solid #000;
  }
}

/* ═══════════════════════════════════════════
   DARK MODE
   ═══════════════════════════════════════════ */
body.dark-theme {
  --bg-primary: #0A0A0A;
  --bg-secondary: #141414;
  --bg-tertiary: #1F1F1F;
  --text-primary: #FDFBF7;
  --text-secondary: #A3A3A3;
  --text-tertiary: #7D7D73;
  --border-color: #333333;
  --border-dark: #FDFBF7;
}
body.dark-theme .nav--scrolled {
  background: rgba(10, 10, 10, 0.85);
}
body.dark-theme .results-header {
  border-color: var(--accent-gold) !important;
}

/* ═══════════════════════════════════════════
   RACI MATRIX STYLES
   ═══════════════════════════════════════════ */
.raci-table th { text-align: center; }
.raci-cell { text-align: center; position: relative; cursor: pointer; transition: background 0.2s; }


.raci-badge {
  transition: all 0.3s var(--ease);

  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%; font-weight: 700; font-size: 1rem;
}
.badge-r { background: rgba(185, 28, 28, 0.1); color: #B91C1C; border: 1px solid #B91C1C; }
.badge-a { background: rgba(4, 120, 87, 0.1); color: #047857; border: 1px solid #047857; }
.badge-c { background: rgba(184, 149, 62, 0.1); color: #B45309; border: 1px solid #B45309; }
.badge-i { background: rgba(100, 116, 139, 0.1); color: #475569; border: 1px solid #475569; }

body.dark-theme .badge-i { color: #94A3B8; border-color: #94A3B8; }
body.dark-theme .badge-c { color: var(--accent-gold); border-color: var(--accent-gold); }

.raci-tooltip {
  visibility: hidden; opacity: 0; display: none;
  position: absolute; bottom: 100%; margin-bottom: 15px; left: 50%; transform: translateX(-50%) translateY(10px);
  width: 280px; background: rgba(10, 10, 10, 0.95); backdrop-filter: blur(10px); color: rgba(253, 251, 247, 0.95); text-align: left;
  padding: var(--space-4); border-radius: var(--radius-md); font-size: 0.85rem; font-weight: 400; line-height: 1.6;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.05); z-index: 100;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); pointer-events: none;
}
body.dark-theme .raci-tooltip {
  visibility: hidden; opacity: 0; display: none;
  position: absolute; bottom: 100%; margin-bottom: 15px; left: 50%; transform: translateX(-50%) translateY(10px);
  width: 280px; background: rgba(10, 10, 10, 0.95); backdrop-filter: blur(10px); color: rgba(253, 251, 247, 0.95); text-align: left;
  padding: var(--space-4); border-radius: var(--radius-md); font-size: 0.85rem; font-weight: 400; line-height: 1.6;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.05); z-index: 100;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); pointer-events: none;
}

.raci-tooltip::after {
  content: ""; position: absolute; top: 100%; left: 50%; margin-left: -7px;
  border-width: 7px; border-style: solid; border-color: rgba(10, 10, 10, 0.95) transparent transparent transparent;
}
body.dark-theme .raci-tooltip::after {
  content: ""; position: absolute; top: 100%; left: 50%; margin-left: -7px;
  border-width: 7px; border-style: solid; border-color: rgba(10, 10, 10, 0.95) transparent transparent transparent;
}

.raci-cell:hover .raci-tooltip {
  visibility: hidden; opacity: 0; display: none;
  position: absolute; bottom: 100%; margin-bottom: 15px; left: 50%; transform: translateX(-50%) translateY(10px);
  width: 280px; background: rgba(10, 10, 10, 0.95); backdrop-filter: blur(10px); color: rgba(253, 251, 247, 0.95); text-align: left;
  padding: var(--space-4); border-radius: var(--radius-md); font-size: 0.85rem; font-weight: 400; line-height: 1.6;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.05); z-index: 100;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); pointer-events: none;
}

/* ═══════════════════════════════════════════
   DROPDOWN NAVIGATION
   ═══════════════════════════════════════════ */
.nav-dropdown {
  position: relative;
  display: inline-block;
}

.nav-dropdown-btn {
  background: none; border: none; font-family: inherit; font-size: inherit; color: inherit; cursor: pointer;
  display: flex; align-items: center; gap: 4px; padding: 0; margin: 0;
}

.nav-dropdown-content {
  visibility: hidden; opacity: 0; display: none;
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%) translateY(10px);
  background: var(--bg-primary); min-width: 200px;
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  padding: var(--space-2) 0;
  z-index: 100;
  transition: all 0.2s var(--ease);
}

.nav-dropdown:hover .nav-dropdown-content {
  visibility: visible; opacity: 1; transform: translateX(-50%) translateY(0); display: block;
}

.nav-dropdown-content a {
  display: block; padding: var(--space-3) var(--space-4);
  color: var(--text-primary); text-decoration: none; font-size: var(--text-sm); font-weight: 500;
  transition: background 0.2s, color 0.2s;
}

.nav-dropdown-content a:hover {
  background: rgba(184, 149, 62, 0.1); color: var(--accent-gold);
}

/* ═══════════════════════════════════════════
   RESPONSIVE NAVIGATION
   ═══════════════════════════════════════════ */
.mobile-menu-btn { display: none; background: none; border: none; color: var(--text-primary); cursor: pointer; padding: var(--space-2); }

@media (max-width: 1024px) {
  .mobile-menu-btn { display: block; }
  
  .nav__links {
    position: absolute; top: var(--nav-height); left: 0; right: 0;
    background: var(--bg-primary); border-bottom: 1px solid var(--border-color);
    flex-direction: column; align-items: flex-start; padding: var(--space-6) var(--space-8);
    gap: var(--space-6);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    transform: translateY(-10px); opacity: 0; visibility: hidden;
    transition: all 0.3s var(--ease);
  }
  
  .nav__links.active {
    transform: translateY(0); opacity: 1; visibility: visible;
  }

  .nav-dropdown-content {
    position: static; transform: none; box-shadow: none; border: none; border-left: 2px solid var(--accent-gold);
    padding-left: var(--space-4); margin-top: var(--space-4); display: none; visibility: visible; opacity: 1;
  }
  
  .nav-dropdown.active .nav-dropdown-content { display: block; }
}

/* ═══════════════════════════════════════════
   GLOBAL FOOTER
   ═══════════════════════════════════════════ */
.footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--border-color);
  padding: var(--space-20) 0 var(--space-8);
  position: relative; z-index: 10;
}
.footer__inner {
  max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-8);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--space-12);
}
.footer__brand h2 {
  font-family: var(--font-serif); font-size: var(--text-3xl); margin-bottom: var(--space-2);
}
.footer__brand p {
  color: var(--text-secondary); font-size: var(--text-sm); max-width: 300px;
}
.footer__links {
  display: flex; gap: var(--space-16);
}
.footer__col h4 {
  font-size: var(--text-sm); text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-primary); margin-bottom: var(--space-6);
}
.footer__col a, .footer__col p {
  display: block; font-size: var(--text-sm); color: var(--text-secondary);
  margin-bottom: var(--space-3); text-decoration: none;
}
.footer__col a:hover { color: var(--accent-gold); }
.footer__bottom {
  max-width: var(--max-width); margin: var(--space-16) auto 0; padding: var(--space-6) var(--space-8) 0;
  border-top: 1px solid var(--border-color); text-align: center;
  font-size: var(--text-xs); color: var(--text-tertiary);
}

@media (max-width: 768px) {
  .footer__inner { flex-direction: column; }
  .footer__links { flex-direction: column; gap: var(--space-8); }
}

/* ── FAQ Section ── */
.faq-section {
  padding: var(--space-24) var(--space-8);
  max-width: 800px;
  margin: 0 auto;
}
.faq-header {
  text-align: center;
  margin-bottom: var(--space-12);
}
.faq-header h2 {
  font-family: var(--font-serif);
  font-size: var(--text-3xl);
  margin-bottom: var(--space-4);
}
.faq-item {
  border-bottom: 1px solid var(--border-color);
  padding: var(--space-6) 0;
}
.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: none;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--text-lg);
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  padding: 0;
}
.faq-question:hover { color: var(--accent-gold); }
.faq-icon {
  font-size: var(--text-2xl);
  font-weight: 300;
  color: var(--accent-gold);
  transition: transform 0.3s var(--ease);
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--ease), margin-top 0.4s var(--ease);
  color: var(--text-secondary);
  line-height: 1.6;
}
.faq-item.active .faq-answer {
  max-height: 500px;
  margin-top: var(--space-4);
}
.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

/* ── Live Availability Calendar ── */
.availability-section {
  padding: var(--space-24) var(--space-8);
  max-width: 1200px;
  margin: 0 auto;
  border-top: 1px solid var(--border-color);
}
.availability-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: var(--space-12);
}
.availability-header h2 {
  font-family: var(--font-serif);
  font-size: var(--text-3xl);
  margin-bottom: var(--space-4);
}
.urgency-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: rgba(184, 149, 62, 0.1);
  border: 1px solid var(--accent-gold);
  color: var(--accent-gold);
  padding: var(--space-2) var(--space-4);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.pulse-dot-urgent {
  width: 8px; height: 8px; background: var(--accent-gold); border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-gold);
  animation: pulseUrgent 2s infinite;
}
@keyframes pulseUrgent {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(184, 149, 62, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(184, 149, 62, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(184, 149, 62, 0); }
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}
.day-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: var(--space-6) var(--space-4);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}
.day-card:hover {
  transform: translateY(-5px);
  border-color: var(--text-secondary);
}
.day-date {
  font-family: var(--font-sans);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-4);
  font-size: var(--text-lg);
}
.day-status {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: var(--space-2);
  border-radius: 2px;
}
.status-full { background: #2A2A2A; color: #888; border: 1px solid #444; }
.status-limited { background: rgba(184, 149, 62, 0.1); color: var(--accent-gold); border: 1px solid var(--accent-gold); }
.status-open { background: rgba(46, 204, 113, 0.1); color: #2ecc71; border: 1px solid #2ecc71; }

.calendar-footer {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: var(--space-8);
}


/* ── Custom Toast Notifications ── */
.toast-container {
  position: fixed;
  bottom: var(--space-8);
  right: var(--space-8);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  pointer-events: none;
}

.toast {
  background: var(--bg-primary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: var(--space-4) var(--space-6);
  box-shadow: var(--shadow-subtle);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.4s var(--ease-heavy);
  pointer-events: auto;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast.toast-error {
  border-left: 4px solid var(--red-600);
}
.toast.toast-error .toast-icon {
  color: var(--red-600);
}

.toast.toast-success {
  border-left: 4px solid var(--emerald-600);
}
.toast.toast-success .toast-icon {
  color: var(--emerald-600);
}


/* Universal Card Alignment Fix */
.feature-card, .pricing-card, .blog-card, .role-card, .raci-card {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
}

.feature-card > *:last-child, 
.pricing-card > *:last-child, 
.blog-card > *:last-child, 
.role-card > *:last-child, 
.raci-card > *:last-child,
.feature-card .btn,
.feature-card a:last-of-type,
.feature-card span:last-of-type {
  margin-top: auto !important;
}

.raci-cell:hover .raci-badge { transform: scale(1.15); box-shadow: 0 8px 16px rgba(0,0,0,0.1); }
/* Transferred from inventory.html */

    .inventory-layout {
      display: grid;
      grid-template-columns: 1fr;
      gap: var(--space-8);
      margin-top: calc(var(--nav-height) + var(--space-8));
      padding-bottom: var(--space-24);
    }
    @media (min-width: 1024px) {
      .inventory-layout { grid-template-columns: 350px 1fr; }
    }
    .inv-form-panel {
      background: var(--bg-primary);
      border: 1px solid var(--border-color);
      padding: var(--space-6);
      position: sticky;
      top: calc(var(--nav-height) + var(--space-8));
      max-height: calc(100vh - var(--nav-height) - var(--space-16));
      overflow-y: auto;
    }
    .inv-form-group { margin-bottom: var(--space-4); }
    .inv-label { display: block; font-size: var(--text-sm); font-weight: 600; margin-bottom: var(--space-2); }
    .inv-input, .inv-select {
      width: 100%; padding: var(--space-3); font-family: var(--font-sans);
      background: var(--bg-secondary); border: 1px solid var(--border-color); color: var(--text-primary);
    }
    .inv-table-wrapper { overflow-x: auto; }
    .inv-table { width: 100%; border-collapse: collapse; margin-top: var(--space-6); }
    .inv-table th, .inv-table td {
      padding: var(--space-6) var(--space-4); vertical-align: middle; text-align: left; border-bottom: 1px solid var(--border-color); font-size: var(--text-sm);
    }
    .inv-table th { font-weight: 600; background: var(--bg-secondary); color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.75rem; padding: var(--space-4); }
    .badge { padding: 4px 8px; border-radius: 40px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
    .badge-high { background: #B91C1C; color: #FFF; }
    .badge-limited { background: #B45309; color: #FFF; }
    .badge-minimal { background: #047857; color: #FFF; }
  
/* Global Modal Styles */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 9999;
  background: rgba(10, 10, 10, 0.85); backdrop-filter: blur(12px);
  align-items: center; justify-content: center;
}
.modal-content {
  background: var(--bg-primary); padding: var(--space-8); max-width: 500px; width: 100%;
  border-radius: var(--radius-lg); border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 30px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.05);
}

/* Saathi Bot UI */
.saathi-fab {
  position: fixed; bottom: var(--space-6); right: var(--space-6); z-index: 9999;
  width: 60px; height: 60px; border-radius: 50%; background: var(--accent-gold);
  color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 20px rgba(184, 149, 62, 0.3); cursor: pointer; transition: transform 0.3s var(--ease);
}
.saathi-fab:hover { transform: scale(1.1); }
.saathi-window {
  position: fixed; bottom: calc(var(--space-6) + 80px); right: var(--space-6); z-index: 9999;
  width: 350px; height: 500px; max-height: 80vh; max-width: calc(100vw - var(--space-12));
  background: rgba(10, 10, 10, 0.95); backdrop-filter: blur(12px); border: 1px solid rgba(184, 149, 62, 0.5); /* Gold border to detach from black nav */
  border-radius: var(--radius-lg); box-shadow: 0 30px 60px rgba(0,0,0,0.5);
  display: none; flex-direction: column; overflow: hidden; transform-origin: bottom right;
}
.saathi-window.active { display: flex; animation: saathiPop 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
@keyframes saathiPop { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }
.saathi-header {
  padding: var(--space-4); border-bottom: 1px solid rgba(184, 149, 62, 0.3);
  display: flex; justify-content: space-between; align-items: center;
}
.saathi-header h3 { font-family: var(--font-serif); font-size: 1.1rem; color: #fff; margin: 0; }
.saathi-close { background: none; border: none; color: #fff; cursor: pointer; font-size: 1.2rem; }
.saathi-body {
  flex: 1; overflow-y: auto; padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-4);
}
.saathi-msg { max-width: 85%; padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); font-size: 0.9rem; line-height: 1.5; }
.saathi-msg-bot { background: rgba(255,255,255,0.05); color: #fff; align-self: flex-start; border-bottom-left-radius: 0; }
.saathi-msg-user { background: var(--accent-gold); color: #fff; align-self: flex-end; border-bottom-right-radius: 0; }
.saathi-input-area {
  padding: var(--space-4); border-top: 1px solid rgba(255,255,255,0.1); display: flex; gap: var(--space-2);
}
.saathi-input {
  flex: 1; background: rgba(255,255,255,0.05); border: 1px solid rgba(184, 149, 62, 0.5); /* Gold border to detach from black nav */ color: #fff;
  padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); font-size: 0.9rem;
}
.saathi-input:focus { outline: none; border-color: var(--accent-gold); }
.saathi-send {
  background: var(--accent-gold); border: none; color: #fff; padding: 0 var(--space-4); border-radius: var(--radius-sm); cursor: pointer; font-weight: 600;
}

/* Responsive Form & CTA Layouts */
@media (max-width: 600px) {
  form[name="audit-initiation"] {
    flex-direction: column !important;
  }
  form[name="audit-initiation"] button {
    width: 100% !important;
  }
}

