:root {
  --ink: #0b0f1a;
  --ink-2: #111725;
  --panel: #151d2e;
  --panel-2: #1b2438;
  --line: rgba(201, 162, 39, 0.16);
  --line-soft: rgba(255, 255, 255, 0.07);
  --gold: #c9a227;
  --gold-soft: #e6cf7a;
  --gold-dim: rgba(201, 162, 39, 0.12);
  --text: #eef1f7;
  --muted: #9aa4bd;
  --muted-2: #6b7793;
  --good: #4ade80;
  --mid: #7dd3fc;
  --warn: #fbbf24;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.7);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(201, 162, 39, 0.08), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(125, 211, 252, 0.05), transparent 55%),
    var(--ink);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
  min-height: 100vh;
}

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

/* ---------- Top bar / brand ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem clamp(1rem, 4vw, 2.5rem);
  background: rgba(11, 15, 26, 0.72);
  backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--line-soft);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand .mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--gold), #8a6f16);
  color: #12151f;
  font-weight: 800;
  font-size: 0.95rem;
  box-shadow: 0 6px 18px -6px rgba(201, 162, 39, 0.6);
}

.brand-name {
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: 0.06em;
}
.brand-name b { color: var(--gold-soft); }
.brand-sep { color: var(--muted-2); margin: 0 0.15rem; font-weight: 300; }
.brand-powered {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.brand-powered b { color: var(--text); font-weight: 700; }

/* ---------- Nav ---------- */
.nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.nav a {
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  transition: color 0.2s, background 0.2s;
}
.nav a:hover { color: var(--text); background: var(--line-soft); }
.nav a.active { color: #12151f; background: linear-gradient(145deg, var(--gold-soft), var(--gold)); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line-soft);
  color: var(--text);
  width: 42px;
  height: 42px;
  border-radius: 10px;
  font-size: 1.1rem;
  cursor: pointer;
}

/* ---------- Layout ---------- */
.wrap { max-width: 1200px; margin: 0 auto; padding: clamp(1.5rem, 4vw, 3rem) clamp(1rem, 4vw, 2.5rem) 4rem; }
.section-eyebrow {
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin: 0 0 0.6rem;
}
.section-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.1;
  margin: 0 0 0.8rem;
  letter-spacing: -0.01em;
}
.section-lead { color: var(--muted); max-width: 60ch; margin: 0 0 2rem; font-size: 1.02rem; }

/* ---------- Cards ---------- */
.card {
  background: linear-gradient(180deg, var(--panel), var(--ink-2));
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.card.gold-edge { border-color: var(--line); }

.grid { display: grid; gap: 1.1rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.stat { display: flex; flex-direction: column; gap: 0.3rem; }
.stat .k { color: var(--muted); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; }
.stat .v { font-family: var(--serif); font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 600; line-height: 1; }
.stat .v small { font-size: 0.9rem; color: var(--muted); font-family: var(--font); }
.stat .sub { color: var(--muted-2); font-size: 0.8rem; }
.up { color: var(--good); } .down { color: #f87171; } .flat { color: var(--mid); }

/* ---------- Buttons / inputs ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.4rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
}
.btn-gold { background: linear-gradient(145deg, var(--gold-soft), var(--gold)); color: #12151f; box-shadow: 0 12px 30px -12px rgba(201, 162, 39, 0.7); }
.btn-gold:hover { transform: translateY(-2px); }
.btn-ghost { background: transparent; border-color: var(--line-soft); color: var(--text); }
.btn-ghost:hover { background: var(--line-soft); }

label.field { display: block; }
label.field > span { display: block; font-size: 0.78rem; color: var(--muted); margin-bottom: 0.35rem; letter-spacing: 0.04em; }
input, select {
  width: 100%;
  background: var(--ink);
  border: 1px solid var(--line-soft);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 0.8rem 0.95rem;
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border 0.2s, box-shadow 0.2s;
}
input:focus, select:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-dim); }
select option { background: var(--ink-2); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line-soft); }
table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
thead th {
  position: sticky; top: 0;
  background: var(--panel-2);
  text-align: left;
  padding: 0.9rem 1rem;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line-soft);
  white-space: nowrap;
}
tbody td { padding: 0.85rem 1rem; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
tbody tr { transition: background 0.15s; }
tbody tr:hover { background: rgba(201, 162, 39, 0.05); }
.num { text-align: right; font-variant-numeric: tabular-nums; }

.pill { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.2rem 0.6rem; border-radius: 999px; font-size: 0.72rem; font-weight: 700; }
.pill-studio { background: rgba(74, 222, 128, 0.14); color: var(--good); }
.pill-1br { background: rgba(125, 211, 252, 0.14); color: var(--mid); }
.pill-study { background: rgba(167, 139, 250, 0.16); color: #c4b5fd; }
.pill-2br { background: rgba(251, 191, 36, 0.16); color: var(--warn); }
.mask { font-family: var(--serif); letter-spacing: 0.05em; color: var(--gold-soft); }

.icon-btn { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 0.95rem; transition: color 0.15s; }
.icon-btn:hover { color: var(--gold); }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--line-soft);
  padding: 2rem clamp(1rem, 4vw, 2.5rem);
  color: var(--muted-2);
  font-size: 0.82rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: space-between;
  align-items: center;
}
.footer b { color: var(--muted); }

.notice {
  display: flex; gap: 0.6rem; align-items: flex-start;
  background: var(--gold-dim); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 0.8rem 1rem;
  color: var(--gold-soft); font-size: 0.82rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .nav { position: fixed; inset: 62px 0 auto 0; flex-direction: column; align-items: stretch;
    background: rgba(11,15,26,0.97); backdrop-filter: blur(20px); padding: 0.8rem;
    border-bottom: 1px solid var(--line-soft); transform: translateY(-140%); transition: transform 0.28s ease; }
  .nav.open { transform: translateY(0); }
  .nav a { padding: 0.85rem 1rem; }
  .nav-toggle { display: grid; place-items: center; }
  .brand-powered { display: none; }
}
@media (max-width: 560px) {
  .grid-2, .grid-4, .grid-3 { grid-template-columns: 1fr; }
}
