/* ── FLASH PREVENTION ── */
.no-transition *, .no-transition *::before, .no-transition *::after {
  transition: none !important;
}

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

/* ── DESIGN TOKENS ── */
:root {
  --bg:      #F7F6F3;
  --surface: #FFFFFF;
  --dark:    #111110;
  --border:  #E5E3DF;
  --text:    #0F0F0E;
  --text2:   #6B6965;
  --text3:   #A8A5A0;
  --red:     #E24B4A;
  --amber:   #D97706;
  --green:   #059669;
  --nav-h:   60px;

  /* Legacy aliases — referenced by existing page JS */
  --muted:   #6B6965;
  --dim:     #A8A5A0;
}

/* ── BASE ── */
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', 'DM Sans', sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }

/* ── CURSOR ── */
.logo-cursor { color: #E24B4A; }
.logo-cursor-blink {
  color: #E24B4A;
  animation: blink-cursor 1s step-end infinite;
}
@keyframes blink-cursor {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ── EYEBROW ── */
.eyebrow {
  display: block;
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 16px;
}

/* ─────────────────────────────── NAV ─────────────────────────────── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 300;
  height: var(--nav-h);
}

.nav-light {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.nav-dark {
  background: var(--dark);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 32px;
}

/* Logo */
.nav-logo {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -1px;
  text-decoration: none;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.nav-light .nav-logo { color: var(--dark); }
.nav-dark  .nav-logo { color: #ffffff; }

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links a {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s;
  text-decoration: none;
}
.nav-light .nav-links a            { color: var(--text2); }
.nav-light .nav-links a:hover,
.nav-light .nav-links a[aria-current] { color: var(--text); }
.nav-dark  .nav-links a            { color: rgba(255,255,255,0.5); }
.nav-dark  .nav-links a:hover,
.nav-dark  .nav-links a[aria-current] { color: #ffffff; }

/* Right slot */
.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

/* Nav CTA button */
.btn-nav-cta {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.04em;
  padding: 8px 16px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  min-height: 36px;
  line-height: 1;
  flex-shrink: 0;
  transition: opacity 0.15s;
}
.btn-nav-cta:hover { opacity: 0.85; }
.nav-light .btn-nav-cta { background: var(--red);  color: #ffffff; }
.nav-dark  .btn-nav-cta { background: #ffffff;     color: var(--dark); }

/* User pill */
.user-pill {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border: 1px solid rgba(255,255,255,0.12);
  flex-shrink: 0;
}
.user-pill-tier {
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  background: rgba(255,255,255,0.08);
  padding: 2px 6px;
  flex-shrink: 0;
}
.user-pill-tier.pro { color: var(--red); background: rgba(226,75,74,0.12); }
.user-pill-email {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: rgba(255,255,255,0.65);
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Legacy nav aliases */
.nav-logo .logo-denied,
.nav-logo .logo-gt { color: inherit; font-family: 'Space Mono', monospace; font-weight: 700; font-size: 18px; letter-spacing: -1px; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-shrink: 0;
  margin-left: auto;
}
.hamburger span { display: block; width: 22px; height: 2px; }
.nav-light .hamburger span { background: var(--dark); }
.nav-dark  .hamburger span { background: #ffffff; }
/* fallback when nav variant unknown */
.site-nav:not(.nav-light):not(.nav-dark) .hamburger span { background: #ffffff; }

/* Mobile nav */
.nav-mobile {
  display: none;
  flex-direction: column;
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 299;
  padding: 24px;
  overflow-y: auto;
}
.nav-mobile.open { display: flex; }

/* Light mobile nav */
.nav-mobile.nav-light,
.nav-light + .nav-mobile,
.nav-light ~ .nav-mobile { background: var(--surface); }

/* Dark mobile nav — default & explicit */
.nav-mobile.nav-dark,
.nav-dark + .nav-mobile,
.nav-dark ~ .nav-mobile,
.nav-mobile:not(.nav-light) { background: var(--dark); }

.nav-mobile a {
  font-family: 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 500;
  padding: 14px 0;
  border-bottom: 1px solid;
  display: block;
  text-decoration: none;
}

/* Light mobile link colors */
.nav-light + .nav-mobile a,
.nav-light ~ .nav-mobile a,
.nav-mobile.nav-light a { color: var(--text); border-color: var(--border); }

/* Dark mobile link colors — default */
.nav-mobile a { color: rgba(255,255,255,0.8); border-color: rgba(255,255,255,0.08); }

.nav-mobile-cta { padding-top: 24px; }
.nav-mobile-row { display: flex; align-items: center; justify-content: space-between; margin-top: 20px; }
.nav-mobile-label { font-family: 'Inter', sans-serif; font-size: 16px; color: rgba(244,244,240,0.4); }

/* ─────────────────────────────── FOOTER ─────────────────────────────── */
.site-footer {
  background: var(--dark);
  padding: 64px 40px 36px;
  border-top: none;
}

.footer-inner { max-width: 1200px; margin: 0 auto; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 32px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.footer-logo-text {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -1px;
  color: #ffffff;
  display: block;
  margin-bottom: 12px;
  text-decoration: none;
}

/* Legacy — existing pages use <img class="footer-logo"> */
.footer-logo { height: 28px; width: auto; display: block; margin-bottom: 12px; }

.footer-tagline {
  font-size: 14px;
  color: rgba(255,255,255,0.35);
  line-height: 1.6;
  max-width: 220px;
}

.footer-col h4 {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.28);
  margin-bottom: 16px;
}

.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col ul a,
.footer-col a {
  font-size: 14px;
  color: rgba(255,255,255,0.45);
  transition: color 0.15s;
  text-decoration: none;
}
.footer-col ul a:hover,
.footer-col a:hover { color: rgba(255,255,255,0.8); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 0;
}
.footer-bottom span,
.footer-copy {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: rgba(255,255,255,0.22);
}
.footer-powered {
  font-size: 13px;
  color: rgba(255,255,255,0.18);
  font-style: italic;
  display: block;
  text-align: center;
  margin-top: 16px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 40px 0;
}

/* ─────────────────────────────── BUTTONS ─────────────────────────────── */
.btn {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.04em;
  padding: 12px 24px;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  transition: opacity 0.15s;
  white-space: nowrap;
  min-height: 44px;
}
.btn:hover:not(:disabled) { opacity: 0.85; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Named variants */
.btn-red     { background: var(--red);  color: #ffffff; }
.btn-dark    { background: var(--dark); color: #ffffff; }
.btn-white   { background: #ffffff;     color: var(--dark); }
.btn-outline { background: transparent; color: var(--text);  border: 1px solid var(--border); }
.btn-outline-dark { background: transparent; color: rgba(255,255,255,0.7); border: 1px solid rgba(255,255,255,0.2); }
.btn-danger  { background: transparent; color: var(--red);   border: 1px solid var(--red); }

/* Legacy alias used by about.html and archive.html */
.btn-solid { background: var(--text); color: var(--bg); }
.btn-solid:hover { opacity: 0.88; }

/* ─────────────────────────────── CHIPS ─────────────────────────────── */
.chip {
  display: inline-block;
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 9px;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  text-transform: uppercase;
}
.chip-critical { background: rgba(226,75,74,0.10);  color: #B91C1C; }
.chip-high     { background: rgba(217,119,6,0.12);  color: #92400E; }
.chip-medium   { background: rgba(59,130,246,0.10); color: #1D4ED8; }
.chip-info     { background: rgba(5,150,105,0.10);  color: #065F46; }

/* archive.html uses these names */
.chip-critical { background: #FCEBEB; color: #A32D2D; }
.chip-high     { background: #FAEEDA; color: #854F0B; }
.chip-medium   { background: #E6F1FB; color: #185FA5; }
.chip-info     { background: #E1F5EE; color: #0F6E56; }

/* ─────────────────────────────── FORMS ─────────────────────────────── */
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 6px;
}
.field input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  padding: 11px 14px;
  outline: none;
  transition: border-color 0.15s;
  min-height: 44px;
  border-radius: 0;
  -webkit-appearance: none;
}
.field input:focus { border-color: var(--text2); }
.field input::placeholder { color: var(--text3); }
.field input:read-only { background: var(--bg); color: var(--text2); }

/* Legacy generic inputs */
input[type="email"],
input[type="text"],
input[type="tel"],
textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: 'Space Mono', monospace;
  font-size: 14px;
  padding: 14px 18px;
  outline: none;
  -webkit-appearance: none;
  border-radius: 0;
  transition: border-color 0.15s;
}
input::placeholder, textarea::placeholder { color: var(--text3); }
input:focus, textarea:focus { border-color: var(--text2); }
textarea { resize: vertical; min-height: 100px; font-family: 'Inter', sans-serif; font-size: 15px; }

/* ─────────────────────────────── STATUS ─────────────────────────────── */
.status {
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  margin-top: 14px;
  display: none;
  line-height: 1.6;
}
.status.ok  { color: var(--green); display: block; }
.status.err { color: var(--red);   display: block; }

/* ─────────────────────────────── UTILITIES ─────────────────────────────── */
.wrap  { max-width: 1080px; margin: 0 auto; padding: 0 40px; }
.rule  { border: none; border-top: 1px solid var(--border); }

/* ─────────────────────────────── ISSUE CONTENT (archive/issue.html) ─────────────────────────────── */
.assess {
  border-left: 3px solid var(--red);
  background: #FEF2F2;
  padding: 16px 20px;
  margin: 16px 0;
}
.assess-lbl {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 8px;
}
.assess-txt {
  font-size: 15px;
  color: var(--text2);
  line-height: 1.8;
  white-space: pre-wrap;
}

/* ─────────────────────────────── RESPONSIVE ─────────────────────────────── */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
}

@media (max-width: 768px) {
  .nav-inner { padding: 0 20px; gap: 16px; }
  .nav-links  { display: none; }
  .nav-right .btn-nav-cta { display: none; }
  .nav-right .user-pill   { display: none !important; }
  .hamburger { display: flex; }

  .site-footer { padding: 48px 20px 28px; }
  .footer-grid { grid-template-columns: 1fr 1fr; padding-bottom: 32px; margin-bottom: 24px; }
  .footer-powered { padding: 0 20px; }
  .footer-bottom { flex-direction: column; text-align: center; gap: 6px; }

  .wrap { padding: 0 20px; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
}
