:root {
  --bg-base: #0b0b0d;
  --bg-surface: #1c1c1f;
  --text-main: #c0c4cc;
  --text-muted: #8a8d93;
  --accent-red: #dc2626;
  --border-color: #333339;
  
  --font-heading: "Arial Narrow", "Helvetica Neue", sans-serif;
  --font-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 3vw;
  background-color: var(--bg-base);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  font-size: 16px;
  overflow-wrap: anywhere;
  hyphens: auto;
}

/* Outer Frame Constraint */
.page-frame {
  border: 1px solid var(--border-color);
  background-color: var(--bg-base);
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #ffffff;
  margin-top: 0;
  font-weight: normal;
}

h1 { font-size: 2.5rem; margin-bottom: 1rem; border-bottom: 2px solid var(--accent-red); padding-bottom: 0.5rem; display: inline-block;}
h2 { font-size: 1.8rem; margin-bottom: 1rem; border-left: 4px solid var(--accent-red); padding-left: 0.5rem;}
h3 { font-size: 1.4rem; color: var(--text-main); }
p { margin-top: 0; margin-bottom: 1.5rem; max-width: 72ch; }

a {
  color: var(--text-main);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--accent-red);
}

/* Header & Nav */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 2rem;
  margin-bottom: 3rem;
  border-bottom: 1px solid var(--border-color);
  position: static;
}

.brand {
  font-family: var(--font-heading);
  text-transform: uppercase;
  font-size: 1.2rem;
  letter-spacing: 0.15em;
  color: #ffffff;
}

.brand a {
  color: inherit;
}

.brand span {
  color: var(--accent-red);
}

.desktop-nav {
  display: flex;
  gap: 1.5rem;
}

.desktop-nav a {
  font-family: var(--font-heading);
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
}

.desktop-nav a:hover,
.desktop-nav a[aria-current="page"] {
  color: var(--accent-red);
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 1rem;
  position: absolute;
  top: 5rem;
  right: 2rem;
  z-index: 50;
  min-width: 200px;
}

.mobile-menu.active {
  display: flex;
}

.mobile-menu a {
  padding: 0.75rem 0;
  font-family: var(--font-heading);
  text-transform: uppercase;
  border-bottom: 1px solid var(--border-color);
}

.mobile-menu a:last-child {
  border-bottom: none;
}

/* Layout Utilities */
.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

/* Panels & Cards */
.panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  border-radius: 0;
}

.panel-header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.stat-strip {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 0;
  font-family: var(--font-heading);
  text-transform: uppercase;
  font-size: 0.9rem;
}

.stat-strip:last-child {
  border-bottom: none;
}

.stat-label { color: var(--text-muted); }
.stat-value { color: #ffffff; text-align: right; }

/* Buttons */
.btn {
  display: inline-block;
  background: var(--bg-base);
  color: var(--text-main);
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--accent-red);
  border-radius: 0;
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--accent-red);
  transition: all 0.15s ease-out;
  text-decoration: none;
  font-size: 0.9rem;
}

.btn:hover {
  transform: translate(4px, 4px);
  box-shadow: 0px 0px 0 var(--accent-red);
  color: #ffffff;
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  font-family: var(--font-heading);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

input[type="text"],
input[type="email"],
textarea,
select {
  width: 100%;
  background: var(--bg-base);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.75rem;
  border-radius: 0;
  font-family: var(--font-body);
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent-red);
}

.checkbox-group {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 0.5rem;
}

.checkbox-group input {
  width: auto;
}

/* Images & Media */
img {
  max-width: 100%;
  height: auto;
  border-radius: 0;
  display: block;
}

.img-framed {
  border: 1px solid var(--border-color);
  object-fit: cover;
}

/* Hero Component */
.hero-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  margin-bottom: 4rem;
}

.hero-content p {
  font-size: 1.1rem;
  color: var(--text-muted);
}

.hero-overlap {
  position: relative;
  height: 350px;
  width: 100%;
}

.hero-overlap img {
  position: absolute;
  width: 55%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  box-shadow: 8px 8px 0 rgba(0,0,0,0.5);
}

.hero-overlap img:nth-child(1) { top: 0; left: 0; z-index: 1; }
.hero-overlap img:nth-child(2) { top: 40px; left: 22%; z-index: 2; border-color: var(--accent-red); }
.hero-overlap img:nth-child(3) { top: 80px; left: 45%; z-index: 3; }

/* Tabs Component */
.tab-header {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
  overflow-x: auto;
}

.tab-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-heading);
  text-transform: uppercase;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  border-radius: 0;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
}

.tab-btn.active, .tab-btn:hover {
  color: #ffffff;
  border-bottom: 2px solid var(--accent-red);
}

.tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Accordion */
.accordion-item {
  border: 1px solid var(--border-color);
  margin-bottom: 0.5rem;
  background: var(--bg-surface);
}

.accordion-header {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 1rem;
  color: #ffffff;
  font-family: var(--font-heading);
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
}

.accordion-header::after {
  content: "+";
  color: var(--accent-red);
}

.accordion-header.active::after {
  content: "-";
}

.accordion-body {
  display: none;
  padding: 0 1rem 1rem 1rem;
  color: var(--text-muted);
}

/* Data Table */
.data-table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  margin-bottom: 2rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th, td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
}

th {
  background: var(--bg-surface);
  font-family: var(--font-heading);
  text-transform: uppercase;
  font-size: 0.85rem;
  color: #ffffff;
  white-space: nowrap;
}

td {
  font-size: 0.9rem;
}

tr:last-child td {
  border-bottom: none;
}

/* Export Tool Result Box */
.export-result-box {
  display: none;
  margin-top: 2rem;
  border: 1px solid var(--accent-red);
  padding: 1.5rem;
  background: var(--bg-surface);
}

.export-textarea {
  min-height: 200px;
  margin-bottom: 1rem;
  font-family: monospace;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Footer */
footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.85rem;
  color: var(--text-muted);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.footer-col h4 {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-bottom {
  grid-column: 1 / -1;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Responsive Breakpoints */
@media (max-width: 768px) {
  .hero-section {
    grid-template-columns: 1fr;
  }
  
  .hero-overlap {
    height: 250px;
    margin-top: 2rem;
  }
  
  .desktop-nav {
    display: none;
  }
  
  .mobile-toggle {
    display: block;
  }

  .two-col {
    grid-template-columns: 1fr;
  }
  
  body {
    padding: 1vw;
  }
  
  .page-frame {
    padding: 1rem;
  }
  
  h1 { font-size: 2rem; }
}

@media (max-width: 480px) {
  .hero-overlap {
    height: 180px;
  }
}

@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
