:root {
  --bg: #eaedf1;
  --surface: #ffffff;
  --ink: #1d2939;
  --ink-soft: #475467;
  --muted: #98a2b3;
  --line: #e4e7ec;
  --line-soft: #f0f2f5;
  --teal: #007a8a;
  --teal-dark: #005f6e;
  --teal-soft: #e6f4f6;
  --stat-green: #12b76a;
  --stat-blue: #2e90fa;
  --stat-red: #f04438;
  --stat-orange: #f79009;
  --stat-purple: #9e77ed;
  --stat-amber: #dc6803;
  --accent: #c44e2c;
  --accent-soft: #fef0e9;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
body { min-height: 100vh; }
/* Lock scroll while intro is visible (mobile fix) */
body.intro-active { overflow: hidden; height: 100vh; }
a { color: inherit; text-decoration: none; }
.serif { font-family: 'Instrument Serif', Georgia, serif; font-weight: 400; }
.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }

/* CINEMATIC BOOT INTRO - matches library background, deeper tone */
#intro {
  position: fixed; inset: 0;
  background: #e1e5ea;
  z-index: 9999;
  overflow: hidden;
  transition: opacity 0.8s ease;
  font-family: 'JetBrains Mono', monospace;
  color: #1d2939;
}
#intro.fading { opacity: 0; pointer-events: none; }

#intro::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 50% 50%, rgba(196,78,44,0.07) 0%, transparent 60%),
    radial-gradient(circle at 80% 20%, rgba(0,122,138,0.06) 0%, transparent 50%),
    linear-gradient(180deg, #e1e5ea 0%, #d4d9df 100%);
  pointer-events: none;
}

#intro::after {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(0,0,0,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.025) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

/* TOP BAR INSIDE INTRO */
.boot-topbar {
  position: absolute; top: 0; left: 0; right: 0;
  padding: 24px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(29,41,57,0.5);
  z-index: 2;
  border-bottom: 1px solid rgba(29,41,57,0.08);
}
.boot-topbar .left, .boot-topbar .right { display: flex; gap: 24px; align-items: center; }
.boot-topbar .accent { color: #c44e2c; font-weight: 600; }
.boot-topbar #boot-clock { color: #1d2939; font-weight: 500; letter-spacing: 0.15em; }

/* CENTRE STAGE */
.boot-stage {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  padding: 80px 48px 48px;
  z-index: 1;
}

.boot-left {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(29,41,57,0.5);
  line-height: 2;
}
.boot-left .label { color: rgba(29,41,57,0.4); display: block; margin-top: 16px; margin-bottom: 4px; font-size: 9px; }
.boot-left .value { color: #1d2939; font-weight: 500; letter-spacing: 0.12em; display: block; }
.boot-left .value.accent { color: #c44e2c; font-weight: 600; }

/* GLOBE CENTRE */
.boot-centre {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
}
#boot-globe {
  width: 320px; height: 320px;
  filter: drop-shadow(0 0 24px rgba(196,78,44,0.18));
}

.boot-brand {
  text-align: center;
}
.boot-brand-name {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 56px;
  line-height: 1;
  color: #1d2939;
  letter-spacing: -0.02em;
  font-weight: 400;
}
.boot-brand-name .dot { color: #c44e2c; }
.boot-brand-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.32em;
  color: rgba(29,41,57,0.5);
  text-transform: uppercase;
  margin-top: 12px;
}

/* RIGHT - STATUS LIST */
.boot-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}
.boot-status-head {
  font-size: 10px;
  letter-spacing: 0.2em;
  color: rgba(29,41,57,0.4);
  text-transform: uppercase;
  margin-bottom: 8px;
  width: 100%;
  text-align: right;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(29,41,57,0.1);
}
#status-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.status-line {
  display: grid;
  grid-template-columns: 14px 1fr auto;
  gap: 10px;
  align-items: center;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: rgba(29,41,57,0.4);
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.status-line.active {
  opacity: 1;
  transform: translateX(0);
  color: rgba(29,41,57,0.85);
}
.status-line .status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(29,41,57,0.2);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.status-line.active .status-dot {
  background: #12b76a;
  box-shadow: 0 0 8px rgba(18,183,106,0.6);
}
.status-line .status-txt { text-align: left; }
.status-line .status-ok {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: #12b76a;
  opacity: 0;
  transition: opacity 0.3s ease 0.1s;
}
.status-line.active .status-ok { opacity: 1; }
.status-line.done .status-dot { background: #c44e2c; box-shadow: 0 0 12px rgba(196,78,44,0.7); }
.status-line.done .status-ok { color: #c44e2c; }
.status-line.done { color: #1d2939; font-weight: 500; }

/* BOTTOM BAR - SYSTEM INFO + ENTER */
.boot-bottom {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 24px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(29,41,57,0.08);
  z-index: 2;
  background: rgba(225,229,234,0.85);
  backdrop-filter: blur(8px);
}
.boot-system-info {
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(29,41,57,0.5);
  line-height: 1.7;
}

.intro-enter {
  background: #007a8a;
  color: white;
  border: none;
  padding: 16px 36px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-transform: uppercase;
  opacity: 0.3;
  pointer-events: none;
}
.intro-enter.ready {
  opacity: 1;
  pointer-events: auto;
  animation: enterReady 1.6s ease-in-out infinite;
}
.intro-enter:hover {
  background: #005f6e;
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0,122,138,0.35);
}
.intro-enter:disabled { cursor: not-allowed; }
.intro-pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #12b76a;
}
.intro-enter.ready .intro-pulse {
  animation: dotpulse 1.6s infinite;
}
@keyframes dotpulse {
  0% { box-shadow: 0 0 0 0 rgba(18,183,106,0.7); }
  70% { box-shadow: 0 0 0 10px rgba(18,183,106,0); }
  100% { box-shadow: 0 0 0 0 rgba(18,183,106,0); }
}
@keyframes enterReady {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,122,138,0.4); }
  50% { box-shadow: 0 0 0 12px rgba(0,122,138,0); }
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .boot-stage { grid-template-columns: 1fr; gap: 32px; padding: 80px 24px 100px; }
  .boot-left, .boot-right { align-items: center; text-align: center; }
  .boot-right { align-items: stretch; }
  #boot-globe { width: 240px; height: 240px; }
  .boot-brand-name { font-size: 42px; }
  .boot-bottom { flex-direction: column; gap: 16px; padding: 16px; }
  .boot-system-info { text-align: center; font-size: 8px; }
}

.topbar {
  background: var(--teal); color: white;
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.topbar-inner {
  max-width: 1400px; margin: 0 auto;
  padding: 0 32px; height: 56px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  font-weight: 600; font-size: 15px;
  letter-spacing: 0.02em;
}
.brand-mark {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: white;
  display: flex; align-items: center; justify-content: center;
}
.brand-mark::before {
  content: ''; width: 10px; height: 10px;
  background: var(--accent);
  border-radius: 50%;
}
.brand .name { color: white; }
.brand .name .dot { color: var(--accent); }

.topbar-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.85;
  display: flex; align-items: center; gap: 16px;
}
.topbar-meta .pill {
  padding: 4px 12px;
  background: rgba(255,255,255,0.15);
  border-radius: 999px;
  font-weight: 500;
}

.menubar {
  background: white;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 56px; z-index: 49;
}
.menubar-inner {
  max-width: 1400px; margin: 0 auto;
  padding: 0 32px;
  display: flex; align-items: center;
  height: 48px;
  overflow-x: auto;
  scrollbar-width: none;
}
.menubar-inner::-webkit-scrollbar { display: none; }
.menu-link {
  padding: 0 18px; height: 48px;
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 500;
  color: var(--ink-soft);
  border-bottom: 2px solid transparent;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.menu-link:hover { color: var(--teal); background: var(--teal-soft); }
.menu-link.active { color: var(--teal); border-bottom-color: var(--teal); }
.menu-link svg { width: 14px; height: 14px; flex-shrink: 0; }
.menubar-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }

.page { max-width: 1400px; margin: 0 auto; padding: 32px; }

.page-header {
  display: flex; justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 32px;
  flex-wrap: wrap; gap: 16px;
}
.page-header h1 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 40px; line-height: 1; font-weight: 400;
  letter-spacing: -0.02em; margin-bottom: 6px;
}
.page-header h1 .accent { color: var(--accent); font-style: italic; }
.page-header .subtitle { font-size: 13px; color: var(--ink-soft); }
.page-header-meta {
  display: flex; gap: 12px; align-items: center;
  font-size: 12px; color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.04em;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}
.tile {
  grid-column: span 4;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  transition: all 0.2s ease;
}
.tile.span-3 { grid-column: span 3; }
.tile.span-4 { grid-column: span 4; }
.tile.span-6 { grid-column: span 6; }
.tile.span-8 { grid-column: span 8; }
.tile.span-12 { grid-column: span 12; }
.tile:hover {
  border-color: var(--teal);
  box-shadow: 0 4px 16px rgba(0,122,138,0.08);
}

.stats { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.stat { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 100px; }
.stat-icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white; flex-shrink: 0;
}
.stat-icon svg { width: 20px; height: 20px; stroke: white; fill: none; stroke-width: 2; }
.stat-icon.green { background: var(--stat-green); }
.stat-icon.blue { background: var(--stat-blue); }
.stat-icon.red { background: var(--stat-red); }
.stat-icon.orange { background: var(--stat-orange); }
.stat-icon.purple { background: var(--stat-purple); }
.stat-icon.teal { background: var(--teal); }
.stat-num {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 28px; line-height: 1; color: var(--ink);
}
.stat-label {
  font-size: 11px; color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.05em; margin-top: 2px;
}

.module-tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  transition: all 0.2s ease;
  display: flex; flex-direction: column;
  gap: 14px; height: 100%;
}
.module-tile:hover {
  border-color: var(--teal);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,122,138,0.08);
}
.module-tile .head { display: flex; align-items: center; gap: 12px; }
.module-tile .icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: white;
}
.module-tile .icon svg { width: 18px; height: 18px; stroke: white; fill: none; stroke-width: 2; }
.module-tile .icon.green { background: var(--stat-green); }
.module-tile .icon.blue { background: var(--stat-blue); }
.module-tile .icon.red { background: var(--stat-red); }
.module-tile .icon.orange { background: var(--stat-orange); }
.module-tile .icon.purple { background: var(--stat-purple); }
.module-tile .icon.teal { background: var(--teal); }
.module-tile .icon.amber { background: var(--stat-amber); }
.module-tile .icon.dark { background: var(--ink); }
.module-tile h3 { font-size: 16px; font-weight: 600; color: var(--ink); line-height: 1.2; }
.module-tile .menu-path {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--teal);
  background: var(--teal-soft);
  padding: 6px 10px;
  border-radius: 4px;
  letter-spacing: 0.02em;
  border-left: 2px solid var(--teal);
}
.module-tile .desc {
  font-size: 13px; color: var(--ink-soft);
  line-height: 1.55; flex: 1;
}
.module-tile ul { list-style: none; font-size: 12px; color: var(--ink-soft); }
.module-tile ul li {
  padding: 3px 0 3px 16px;
  position: relative; line-height: 1.5;
}
.module-tile ul li::before {
  content: '→';
  position: absolute; left: 0;
  color: var(--teal);
}
.module-tile .foot {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.module-tile .foot .badge { color: var(--teal); font-weight: 600; }
.module-tile .foot .badge.upcoming { color: var(--stat-orange); }

.section-head {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 32px 0 16px;
  border-bottom: 2px solid var(--teal);
  margin-bottom: 24px;
}
.section-head h2 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 32px; font-weight: 400;
  letter-spacing: -0.02em;
}
.section-head h2 .accent { color: var(--accent); font-style: italic; }
.section-head .count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; color: var(--muted);
  letter-spacing: 0.15em; text-transform: uppercase;
}

.section-intro {
  font-size: 15px; color: var(--ink-soft);
  line-height: 1.6; max-width: 720px;
  margin-bottom: 24px;
}

.hero {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 64px 48px;
  margin-bottom: 32px;
  position: relative; overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 400px; height: 400px;
  background: radial-gradient(circle, var(--teal-soft) 0%, transparent 70%);
  pointer-events: none;
}
.hero-content { position: relative; max-width: 800px; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  background: var(--teal-soft);
  color: var(--teal-dark);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 999px;
  margin-bottom: 24px;
  font-weight: 600;
}
.hero-eyebrow .dot {
  width: 6px; height: 6px;
  background: var(--stat-green);
  border-radius: 50%;
}
.hero h1 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: clamp(48px, 7vw, 80px);
  line-height: 1; letter-spacing: -0.03em;
  font-weight: 400;
  margin-bottom: 24px;
}
.hero h1 .accent { color: var(--accent); font-style: italic; }
.hero p.lead {
  font-size: 18px; color: var(--ink-soft);
  line-height: 1.55;
  margin-bottom: 32px;
  max-width: 600px;
}
.hero .ctas { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px;
  font-family: 'Inter', sans-serif;
  font-size: 14px; font-weight: 500;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}
.btn-primary {
  background: var(--teal); color: white;
  border-color: var(--teal);
}
.btn-primary:hover {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,122,138,0.25);
}
.btn-secondary {
  background: white; color: var(--ink);
  border-color: var(--line);
}
.btn-secondary:hover { border-color: var(--teal); color: var(--teal); }
.btn-accent {
  background: var(--accent); color: white;
  border-color: var(--accent);
}
.btn-accent:hover { background: #a83d1f; border-color: #a83d1f; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: white; border-color: rgba(255,255,255,0.3); }
.btn-ghost:hover { background: rgba(255,255,255,0.1); }

.fiscal-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  border-radius: 8px;
  padding: 28px;
  height: 100%;
}
.fiscal-card.pt { border-left-color: #2e7d32; }
.fiscal-card.es { border-left-color: #c62828; }
.fiscal-flag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 8px;
  font-weight: 600;
}
.fiscal-card.pt .fiscal-flag { color: #2e7d32; }
.fiscal-card.es .fiscal-flag { color: #c62828; }
.fiscal-card h3 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 28px;
  margin-bottom: 12px;
  font-weight: 400;
  letter-spacing: -0.01em;
}
.fiscal-card .lead {
  font-size: 14px; color: var(--ink-soft);
  line-height: 1.6; margin-bottom: 20px;
}
.fiscal-list { list-style: none; margin-bottom: 16px; }
.fiscal-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 12px;
  align-items: center;
}
.fiscal-list li:last-child { border-bottom: none; }
.fiscal-list .code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--teal-dark);
  font-weight: 600;
  background: var(--teal-soft);
  padding: 4px 8px;
  border-radius: 3px;
  text-align: left;
  letter-spacing: 0.02em;
  width: fit-content;
}
.fiscal-list .label { font-size: 13px; color: var(--ink-soft); line-height: 1.4; }
.fiscal-note {
  margin-top: 16px;
  padding: 14px 16px;
  background: var(--teal-soft);
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-soft);
}
.fiscal-note strong { color: var(--teal-dark); font-weight: 600; }

.video-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
}
.video-card:hover {
  border-color: var(--teal);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,122,138,0.1);
}
.video-thumb {
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--ink) 0%, var(--teal) 100%);
  position: relative;
  display: flex; align-items: center; justify-content: center;
}
.video-thumb .play {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  border: 2px solid rgba(255,255,255,0.6);
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(8px);
}
.video-thumb .play svg { fill: white; width: 16px; height: 16px; margin-left: 2px; }
.video-meta { padding: 16px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.video-meta h5 { font-size: 14px; font-weight: 600; line-height: 1.3; color: var(--ink); }
.video-meta .src {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; color: var(--muted);
  letter-spacing: 0.1em; text-transform: uppercase;
  margin-top: auto;
  display: flex; justify-content: space-between;
}

.resource-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  transition: all 0.2s;
  display: flex; flex-direction: column;
  gap: 14px; height: 100%;
}
.resource-card:hover {
  border-color: var(--teal);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,122,138,0.08);
}
.resource-card .head {
  display: flex; justify-content: space-between; align-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted);
}
.resource-card .badge {
  padding: 3px 8px;
  background: var(--teal-soft);
  color: var(--teal);
  border-radius: 4px;
  font-weight: 600;
}
.resource-card h4 { font-size: 16px; font-weight: 600; line-height: 1.3; color: var(--ink); }
.resource-card .desc {
  font-size: 13px; color: var(--ink-soft);
  line-height: 1.55; flex: 1;
}
.resource-card .commentary {
  font-size: 12px; color: var(--accent);
  border-left: 2px solid var(--accent);
  padding: 8px 0 8px 12px;
  font-style: italic; line-height: 1.5;
}
.resource-card .link {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.1em;
  color: var(--teal); font-weight: 600;
}

.xml-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  transition: all 0.2s;
  display: flex; flex-direction: column;
  gap: 12px; height: 100%;
}
.xml-card:hover {
  border-color: var(--teal);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,122,138,0.08);
}
.xml-card .head { display: flex; justify-content: space-between; align-items: center; }
.xml-card .tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  padding: 3px 8px;
  background: var(--teal-soft);
  color: var(--teal);
  border-radius: 3px;
  letter-spacing: 0.05em;
  font-weight: 600;
}
.xml-card .tag.req { background: rgba(46,144,250,0.1); color: var(--stat-blue); }
.xml-card .tag.res { background: rgba(158,119,237,0.1); color: var(--stat-purple); }
.xml-card .size {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; color: var(--muted);
}
.xml-card h4 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 20px; line-height: 1.15;
  color: var(--ink); font-weight: 400;
}
.xml-card .desc {
  font-size: 12px; color: var(--ink-soft);
  line-height: 1.5; flex: 1;
}
.xml-card .fields {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; color: var(--ink-soft);
  padding: 8px 10px;
  background: var(--bg);
  border-radius: 4px;
  border-left: 2px solid var(--teal);
  line-height: 1.5;
}
.xml-card .actions {
  display: flex; gap: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--line-soft);
}
.xml-btn {
  flex: 1;
  font-size: 11px;
  padding: 7px 10px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink-soft);
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 4px;
  transition: all 0.15s;
}
.xml-btn:hover { border-color: var(--teal); color: var(--teal); }
.xml-btn.primary { background: var(--teal); color: white; border-color: var(--teal); }
.xml-btn.primary:hover { background: var(--teal-dark); border-color: var(--teal-dark); }

.disclaimer {
  background: rgba(247,144,9,0.08);
  border: 1px solid rgba(247,144,9,0.25);
  border-left: 3px solid var(--stat-orange);
  border-radius: 6px;
  padding: 16px 20px;
  margin-bottom: 24px;
  font-size: 13px; line-height: 1.6;
  color: var(--ink-soft);
}
.disclaimer strong { color: var(--stat-amber); font-weight: 600; }

.form-card {
  background: var(--ink);
  color: white;
  border-radius: 12px;
  padding: 48px;
  margin-bottom: 32px;
}
.form-card .eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--accent-soft);
  text-transform: uppercase;
  margin-bottom: 16px;
  font-weight: 600;
}
.form-card h2 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1;
  margin-bottom: 16px;
  font-weight: 400;
  letter-spacing: -0.02em;
}
.form-card p {
  font-size: 16px;
  color: rgba(255,255,255,0.7);
  margin-bottom: 32px;
  max-width: 560px;
  line-height: 1.6;
}
.form-card form { display: flex; flex-direction: column; gap: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-input {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  padding: 14px 16px;
  font-size: 14px; color: white;
  font-family: inherit;
  outline: none;
  transition: all 0.15s;
  width: 100%;
}
.form-input:focus { border-color: var(--accent); background: rgba(255,255,255,0.08); }
.form-input::placeholder { color: rgba(255,255,255,0.4); }
.form-input option { color: var(--ink); background: white; }
.form-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
}
.form-counter {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: rgba(255,255,255,0.6);
}

.footer {
  background: var(--ink);
  color: white;
  padding: 64px 32px 32px;
  margin-top: 64px;
}
.footer-inner { max-width: 1400px; margin: 0 auto; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 2fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 32px;
}
.footer-brand .blurb {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  line-height: 1.6;
  margin-top: 16px;
}
.footer h4 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: 16px;
  font-weight: 500;
}
.footer ul { list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.footer ul a { color: rgba(255,255,255,0.7); transition: color 0.15s; }
.footer ul a:hover { color: var(--accent); }
.footer-legal {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  line-height: 1.7;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-legal strong { color: rgba(255,255,255,0.7); font-weight: 600; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
}

.footer-credits {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.credits-line {
  display: flex;
  gap: 16px;
  align-items: baseline;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  line-height: 1.6;
  color: rgba(255,255,255,0.5);
}
.credits-label {
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.12em;
  font-size: 10px;
  flex-shrink: 0;
  width: 80px;
  text-transform: uppercase;
}
.credits-line a {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  border-bottom: 1px dotted rgba(255,255,255,0.3);
  transition: all 0.2s;
}
.credits-line a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
@media (max-width: 768px) {
  .credits-line { flex-direction: column; gap: 2px; }
  .credits-label { width: auto; }
}

.modal-bg {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 32px;
}
.modal-bg.open { display: flex; }
.modal {
  background: white;
  border-radius: 12px;
  max-width: 1000px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal-head {
  padding: 20px 28px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-head h3 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 22px;
  font-weight: 400;
}
.modal-close {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  width: 32px;
  height: 32px;
  font-size: 18px;
  cursor: pointer;
  color: var(--ink-soft);
}
.modal-close:hover { background: var(--bg); }
.modal-body {
  flex: 1;
  overflow: auto;
  padding: 0;
  background: #1e293b;
}
.modal-body pre {
  padding: 24px;
  margin: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  line-height: 1.6;
  color: #e2e8f0;
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .tile, .tile.span-3, .tile.span-4, .tile.span-6, .tile.span-8 { grid-column: span 6; }
}

@media (max-width: 768px) {
  .page { padding: 16px; }
  .topbar-inner, .menubar-inner { padding: 0 16px; }
  .topbar-meta { display: none; }
  .hero { padding: 32px 24px; }
  .form-card { padding: 24px; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 8px; align-items: flex-start; }
  .tile, .tile.span-3, .tile.span-4, .tile.span-6, .tile.span-8 { grid-column: span 12; }
  .fiscal-list li { grid-template-columns: 1fr; gap: 4px; }
  .intro-brand { font-size: 36px; }
}

