:root {
  /* Colors */
  --c-void: #0a0a0a;
  --c-chalk: #f4f4f0;
  --c-orange: #ff5a00;
  --c-asphalt: #1e1e1e;
  --c-slate: #5e6668;
  --c-green: #38bdf8; /* keeping it cool / technical */

  /* Typography */
  --f-display: 'Oswald', sans-serif;
  --f-body: 'Chivo', sans-serif;

  /* Spacing (Base 4/8 scale) */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 1rem;
  --s-4: 1.5rem;
  --s-5: 2rem;
  --s-6: 3rem;
  --s-8: 4rem;
  --s-10: 6rem;
  --s-12: 8rem;

  /* Layout */
  --container: 1400px;
  --radius: 0;
  --border: 2px solid var(--c-void);
  --shadow: 4px 4px 0 var(--c-void);
}

@font-face {
  font-family: 'Oswald';
  src: url('../fonts/oswald-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'Oswald';
  src: url('../fonts/oswald-latin-700-normal.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: 'Chivo';
  src: url('../fonts/chivo-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'Chivo';
  src: url('../fonts/chivo-latin-700-normal.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--f-body);
  background-color: var(--c-chalk);
  color: var(--c-void);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--f-display);
  line-height: 1.1;
  text-transform: uppercase;
  margin-bottom: var(--s-3);
}

h1 { font-size: clamp(3rem, 8vw, 6rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 5vw, 4rem); letter-spacing: -0.01em; }
h3 { font-size: clamp(1.5rem, 3vw, 2.5rem); }
h4 { font-size: 1.25rem; }

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

a:hover {
  color: var(--c-orange);
  text-decoration-color: var(--c-orange);
}

img, svg {
  max-width: 100%;
  display: block;
}

/* Layout Utilities */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--s-4);
}

.grid {
  display: grid;
  gap: var(--s-4);
}

.flex {
  display: flex;
  gap: var(--s-4);
}

.flex-col {
  flex-direction: column;
}

.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }

/* Components */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--s-3) var(--s-5);
  background-color: var(--c-orange);
  color: var(--c-void);
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.25rem;
  text-transform: uppercase;
  text-decoration: none;
  border: var(--border);
  box-shadow: var(--shadow);
  transition: transform 0.1s, box-shadow 0.1s;
  cursor: pointer;
}

.btn:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--c-void);
  color: var(--c-void);
  text-decoration: none;
}

.btn:active {
  transform: translate(4px, 4px);
  box-shadow: none;
}

.btn-void {
  background-color: var(--c-void);
  color: var(--c-chalk);
  border-color: var(--c-chalk);
  box-shadow: 4px 4px 0 var(--c-chalk);
}

.btn-void:hover {
  color: var(--c-chalk);
  box-shadow: 2px 2px 0 var(--c-chalk);
}

.card {
  background: var(--c-chalk);
  border: var(--border);
  padding: var(--s-5);
  position: relative;
}

.card::after {
  content: '';
  position: absolute;
  top: 4px; left: 4px; right: -6px; bottom: -6px;
  background: var(--c-void);
  z-index: -1;
}

/* Header */
.site-header {
  border-bottom: var(--border);
  padding: var(--s-3) 0;
  background-color: var(--c-chalk);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: var(--s-4);
}

.nav-links a {
  text-decoration: none;
  font-family: var(--f-display);
  font-size: 1.25rem;
  text-transform: uppercase;
  font-weight: 700;
}

.nav-links a[aria-current="page"] {
  border-bottom: 4px solid var(--c-orange);
}

.nav-links a:hover {
  color: var(--c-orange);
}

.brand {
  font-family: var(--f-display);
  font-size: 2rem;
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1;
}

/* Footer */
.site-footer {
  border-top: var(--border);
  padding: var(--s-10) 0 var(--s-5);
  background-color: var(--c-void);
  color: var(--c-chalk);
}

.site-footer a {
  color: var(--c-chalk);
  text-decoration-color: var(--c-slate);
}

.site-footer a:hover {
  color: var(--c-orange);
  text-decoration-color: var(--c-orange);
}

.footer-grid {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--s-6);
  margin-bottom: var(--s-8);
}

.footer-col h4 {
  color: var(--c-slate);
  margin-bottom: var(--s-4);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: var(--s-2);
}

/* Sections */
.section {
  padding: var(--s-10) 0;
  border-bottom: var(--border);
}

.section-dark {
  background-color: var(--c-void);
  color: var(--c-chalk);
}

.section-orange {
  background-color: var(--c-orange);
  color: var(--c-void);
}

/* Utility classes */
.text-center { text-align: center; }
.mb-2 { margin-bottom: var(--s-2); }
.mb-4 { margin-bottom: var(--s-4); }
.mb-6 { margin-bottom: var(--s-6); }
.mt-4 { margin-top: var(--s-4); }
.mt-8 { margin-top: var(--s-8); }
.w-full { width: 100%; }
.max-w-prose { max-width: 65ch; margin-left: auto; margin-right: auto; }
.font-display { font-family: var(--f-display); }
.text-xl { font-size: 1.5rem; }
.text-2xl { font-size: 2rem; }

/* Noscript Fallback */
.noscript-warning {
  background: var(--c-orange);
  color: var(--c-void);
  padding: var(--s-3);
  text-align: center;
  font-family: var(--f-display);
  font-weight: 700;
  text-transform: uppercase;
  border-bottom: var(--border);
}

/* Tool layout */
.tool-container {
  border: var(--border);
  background: var(--c-chalk);
  padding: var(--s-5);
  margin: var(--s-6) 0;
  position: relative;
}
.tool-container::after {
  content: '';
  position: absolute;
  top: 8px; left: 8px; right: -10px; bottom: -10px;
  background: var(--c-void);
  z-index: -1;
}

.tool-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-6);
}

@media (max-width: 768px) {
  .tool-grid {
    grid-template-columns: 1fr;
  }
  .nav-links {
    display: none; /* simple mobile fallback */
  }
}

.input-group {
  margin-bottom: var(--s-3);
}

.input-group label {
  display: block;
  font-family: var(--f-display);
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: var(--s-1);
}

.input-group input, .input-group select {
  width: 100%;
  padding: var(--s-2);
  border: var(--border);
  font-family: var(--f-body);
  font-size: 1rem;
  background: #fff;
}

.tool-result {
  background: var(--c-void);
  color: var(--c-chalk);
  padding: var(--s-4);
  margin-top: var(--s-4);
  border: var(--border);
}

.tool-result h4 {
  color: var(--c-orange);
  margin-bottom: var(--s-2);
}

.result-val {
  font-family: var(--f-display);
  font-size: 3rem;
  line-height: 1;
}

/* Table */
table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--s-4) 0;
  border: var(--border);
}

th, td {
  padding: var(--s-3);
  border: var(--border);
  text-align: left;
}

th {
  font-family: var(--f-display);
  text-transform: uppercase;
  background: var(--c-void);
  color: var(--c-chalk);
}

tr:nth-child(even) {
  background: #ebebe5;
}
