/* ============================================================
   MORPHEME — Global Stylesheet
   Dark theme, JetBrains Mono, gold accents (#c0a060)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

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

:root {
  --bg:           #0a0a0a;
  --bg-card:      #111111;
  --bg-card-hover:#161616;
  --bg-input:     #0e0e0e;
  --border:       #1e1e1e;
  --border-focus: #c0a060;
  --text:         #d0d0d0;
  --text-dim:     #777777;
  --text-faint:   #444444;
  --gold:         #c0a060;
  --gold-dim:     rgba(192,160,96,0.12);
  --red:          #c04040;
  --red-dim:      rgba(192,64,64,0.12);
  --green-land:   #2d5a27;
  --blue-sea:     #1a4a7a;
  --amber-air:    #7a4a1a;
  --radius:       6px;
  --font:         'JetBrains Mono', monospace;
}

html { font-size: 15px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--gold); text-decoration: none; transition: opacity .2s; }
a:hover { opacity: 0.8; }

::selection { background: var(--gold); color: var(--bg); }

/* ---------- NAV BAR ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  background: rgba(10,10,10,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav > .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
}

.nav-logo,
.nav-brand {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 5px;
  color: var(--gold);
  text-transform: uppercase;
  text-shadow: 0 0 18px rgba(192,160,96,0.25);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px;
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  font-size: 0.65rem;
  letter-spacing: 2px;
  color: var(--text-dim);
  text-transform: uppercase;
  transition: color .2s;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--gold);
  opacity: 1;
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gold);
  border-radius: 1px;
}

/* ---------- LAYOUT ---------- */

.page-container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.page-title {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--gold);
  text-align: center;
  margin-bottom: 4px;
  text-shadow: 0 0 22px rgba(192,160,96,0.2);
}

.page-subtitle {
  text-align: center;
  font-size: 0.6rem;
  color: var(--text-faint);
  letter-spacing: 2px;
  margin-bottom: 40px;
}

/* ---------- FORM ELEMENTS ---------- */

label {
  display: block;
  font-size: 0.6rem;
  letter-spacing: 2px;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 6px;
}

input[type="text"],
input[type="email"],
textarea,
select {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.78rem;
  padding: 10px 14px;
  border-radius: var(--radius);
  outline: none;
  transition: border-color .25s;
}

input[type="text"]:focus,
textarea:focus,
select:focus {
  border-color: var(--gold);
}

textarea { resize: vertical; min-height: 80px; }

select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23777' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--bg-input);
  cursor: pointer;
  position: relative;
  vertical-align: middle;
  transition: all .2s;
}

input[type="checkbox"]:checked {
  background: var(--gold);
  border-color: var(--gold);
}

input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: solid var(--bg);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* ---------- BUTTONS ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-family: var(--font);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 2px;
  padding: 10px 24px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all .25s;
  text-transform: uppercase;
}

.btn:hover {
  background: var(--gold);
  color: var(--bg);
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--gold);
  color: var(--bg);
}

.btn-primary:hover {
  background: #d4b06a;
  border-color: #d4b06a;
}

/* ---------- BADGES ---------- */

.badge {
  display: inline-block;
  font-size: 0.5rem;
  font-weight: 600;
  letter-spacing: 1px;
  padding: 2px 8px;
  border-radius: 3px;
  text-transform: uppercase;
  vertical-align: middle;
}

.badge-negated {
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid rgba(192,64,64,0.3);
}

.badge-domain {
  background: var(--gold-dim);
  color: var(--gold);
  border: 1px solid rgba(192,160,96,0.2);
}

/* ---------- CARDS ---------- */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color .25s, background .25s;
}

.card:hover {
  border-color: #2a2a2a;
  background: var(--bg-card-hover);
}

/* ---------- TABS ---------- */

.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}

.tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-dim);
  font-family: var(--font);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 2px;
  padding: 12px 22px;
  cursor: pointer;
  transition: all .2s;
  text-transform: uppercase;
}

.tab-btn:hover { color: var(--text); }

.tab-btn.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* ---------- CHIPS ---------- */

.chip {
  display: inline-block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-family: var(--font);
  font-size: 0.6rem;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: all .2s;
  letter-spacing: 0.5px;
}

.chip:hover,
.chip.active {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--gold-dim);
}

/* ---------- TABLE ---------- */

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.7rem;
}

.data-table th {
  text-align: left;
  font-size: 0.58rem;
  letter-spacing: 2px;
  color: var(--text-dim);
  text-transform: uppercase;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-weight: 500;
}

.data-table td {
  padding: 12px;
  border-bottom: 1px solid #141414;
  color: var(--text-dim);
  vertical-align: top;
}

.data-table tr:hover td {
  background: rgba(192,160,96,0.02);
}

.data-table td:first-child {
  color: var(--text);
  font-weight: 600;
}

/* ---------- UTILITY ---------- */

.text-gold   { color: var(--gold); }
.text-red    { color: var(--red); }
.text-dim    { color: var(--text-dim); }
.text-faint  { color: var(--text-faint); }
.text-center { text-align: center; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }

/* ---------- ANIMATIONS ---------- */

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

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.5; }
}

.fade-in { animation: fadeIn .4s ease-out; }

/* ---------- SCROLLBAR ---------- */

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #222; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #333; }

/* ---------- RESPONSIVE ---------- */

@media (max-width: 768px) {
  .nav { padding: 12px 16px; }
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    flex-direction: column;
    gap: 12px;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(10,10,10,0.97);
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
  }
  .nav-links.open { display: flex; }
  .nav-links a { font-size: 0.6rem; }
  .page-container { padding: 24px 16px 60px; }
  .page-title { font-size: 1.05rem; }
}
