/* ============================================================
   SVH Capital — unified design system
   Shared by the Astro marketing site AND the Node-rendered
   matcher + admin pages. Single source of truth for brand.
   ============================================================ */
:root {
  --navy-deep: #05112a;
  --navy: #0b1f3f;
  --navy-2: #12294d;
  --slate: #1f2d45;
  --blue: #1257b8;
  --blue-bright: #2f7ee0;
  --blue-accent: #5aa2f0;
  --gold: #c8a15a;
  --gold-soft: #e4cf9e;
  --bg: #ffffff;
  --bg-soft: #f5f7fb;
  --bg-tint: #eef3fa;
  --ink: #14203a;
  --muted: #5a6b85;
  --line: #e7ecf4;
  --line-soft: #eef2f8;
  --white: #ffffff;
  --ok: #1c7d5a;
  --warn: #b7791f;
  --danger: #b4433a;

  --wrap: 1200px;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 6px 22px rgba(11, 31, 63, 0.06);
  --shadow-md: 0 14px 40px rgba(11, 31, 63, 0.1);
  --shadow-lg: 0 28px 64px rgba(11, 31, 63, 0.18);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--navy);
  line-height: 1.12;
  margin: 0 0 0.5em;
  font-weight: 500;
  letter-spacing: -0.01em;
}
p { margin: 0 0 1em; }
a { color: var(--blue); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--blue-bright); text-decoration: none; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font);
  color: var(--gold);
  margin: 0 0 16px;
}

.section { padding: 96px 0; }
.section--soft { background: var(--bg-soft); }
.section--navy { background: var(--navy-deep); color: #c3d1e8; }
.section--navy h1, .section--navy h2, .section--navy h3 { color: #fff; }

.section-head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.section-head h2 { font-size: 40px; }
.section-head p { color: var(--muted); font-size: 19px; margin: 0; }
.section--navy .section-head p { color: #9fb2d0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--navy);
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 14px 26px;
  font: 600 15px/1 var(--font);
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 6px 18px rgba(11, 31, 63, 0.18);
}
.btn:hover { background: var(--navy-2); color: #fff; transform: translateY(-2px); box-shadow: 0 12px 26px rgba(11, 31, 63, 0.26); }
.btn--gold { background: var(--gold); color: var(--navy-deep); box-shadow: 0 6px 18px rgba(200, 161, 90, 0.28); }
.btn--gold:hover { background: var(--gold-soft); color: var(--navy-deep); box-shadow: 0 12px 26px rgba(200, 161, 90, 0.36); }
.btn--outline { background: transparent; border: 1.5px solid var(--gold); color: var(--navy); box-shadow: none; }
.btn--outline:hover { background: rgba(200, 161, 90, 0.1); color: var(--navy); box-shadow: none; }
.btn--ghost { background: transparent; border: 1.5px solid rgba(255, 255, 255, 0.4); color: #fff; box-shadow: none; }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.7); color: #fff; box-shadow: none; }
.btn--sm { padding: 10px 16px; font-size: 14px; }
.btn--block { width: 100%; justify-content: center; }

/* ---------- Cards / grid ---------- */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card h3 { font-size: 23px; }
.card p { color: var(--muted); margin: 0; font-size: 16px; }

.icon-badge {
  width: 56px; height: 56px; border-radius: 14px;
  display: grid; place-items: center;
  background: linear-gradient(140deg, var(--navy) 0%, var(--blue) 100%);
  color: var(--gold-soft); margin-bottom: 22px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.icon-badge svg { width: 26px; height: 26px; }

/* ---------- Shared header ---------- */
.svh-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.svh-header .bar { display: flex; align-items: center; gap: 20px; height: 78px; }
.svh-logo { display: inline-flex; align-items: baseline; gap: 9px; color: var(--navy); }
.svh-logo:hover { color: var(--navy); }
.svh-logo .mark { font-family: var(--serif); font-weight: 600; font-size: 26px; letter-spacing: 0.02em; color: var(--navy); }
.svh-logo .word { font-family: var(--font); font-weight: 600; font-size: 13px; letter-spacing: 0.42em; color: var(--gold); text-transform: uppercase; position: relative; top: -2px; }
.svh-nav { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.svh-nav a { padding: 10px 14px; font: 500 15px/1 var(--font); color: var(--ink); }
.svh-nav a:hover { color: var(--blue); }
.svh-nav .btn { margin-left: 8px; }

/* ---------- Shared footer ---------- */
.svh-footer { background: var(--navy-deep); color: #a9bcd6; padding: 56px 0 30px; font-size: 14px; }
.svh-footer .flogo { display: inline-flex; align-items: baseline; gap: 8px; margin-bottom: 12px; }
.svh-footer .fmark { font-family: var(--serif); font-weight: 600; font-size: 24px; color: #fff; letter-spacing: 0.02em; }
.svh-footer .fword { font-weight: 600; font-size: 12px; letter-spacing: 0.4em; color: var(--gold); text-transform: uppercase; }
.svh-footer .frow { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; align-items: center; }
.svh-footer .fnav { display: flex; gap: 20px; flex-wrap: wrap; }
.svh-footer .fnav a { color: #a9bcd6; }
.svh-footer .fnav a:hover { color: #fff; }
.svh-footer .fdisc { margin-top: 22px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.1); color: #6f83a1; font-size: 12px; line-height: 1.7; }
.svh-footer .fcopy { margin-top: 16px; color: #6f83a1; }

/* ---------- App shell (matcher/admin content wrapper) ---------- */
.app-hero {
  position: relative;
  background:
    radial-gradient(900px 420px at 12% -30%, rgba(47,126,224,.28) 0%, transparent 60%),
    radial-gradient(700px 380px at 100% 0%, rgba(200,161,90,.14) 0%, transparent 55%),
    var(--navy-deep);
  color: #fff; padding: 72px 0 64px; overflow: hidden;
}
.app-hero h1 { color: #fff; font-size: 42px; margin: 0; max-width: 760px; }
.app-hero .sub { color: #b7c7e2; font-size: 19px; margin: 16px 0 0; max-width: 660px; font-family: var(--font); }

.app-main { padding: 64px 0 88px; min-height: 40vh; }
.panel {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 34px; box-shadow: var(--shadow-md);
}
.muted { color: var(--muted); }

/* ---------- Forms ---------- */
.field { display: block; margin-bottom: 18px; }
.field > label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 7px; color: var(--navy); }
.input, input[type=text], input[type=email], input[type=password], textarea, select {
  width: 100%; padding: 13px 15px; border: 1px solid var(--line); border-radius: 10px;
  font: inherit; background: #fff; color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
.input:focus, input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(18,87,184,.14);
}
textarea { min-height: 130px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hint { color: var(--muted); font-size: 13px; margin: 6px 0 0; }
.warn { color: var(--danger); font-weight: 600; margin: 10px 0 0; }

/* ---------- Centered gate (password) ---------- */
.gate { min-height: calc(100vh - 78px); display: grid; place-items: center; padding: 40px 20px;
  background:
    radial-gradient(900px 500px at 15% -10%, rgba(47,126,224,.16) 0%, transparent 60%),
    var(--bg-soft);
}
.gate .box { width: 100%; max-width: 440px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 40px; box-shadow: var(--shadow-lg); text-align: left; }
.gate .lock { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(140deg, var(--navy), var(--blue)); color: var(--gold-soft); margin-bottom: 20px; }
.gate h1 { font-size: 26px; margin: 0 0 6px; }
.gate p { color: var(--muted); font-size: 15px; margin: 0 0 22px; }

/* ---------- Match result cards ---------- */
.result-head { display: flex; align-items: end; justify-content: space-between; margin: 8px 0 18px; gap: 16px; flex-wrap: wrap; }
.result-head h2 { font-size: 26px; margin: 0; }
.result-note { font-size: 13px; color: var(--muted); }
.match {
  display: flex; justify-content: space-between; gap: 20px; align-items: flex-start;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 26px; margin: 14px 0; box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
}
.match:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.match .firm { font-family: var(--serif); font-size: 21px; font-weight: 600; color: var(--navy); }
.match .meta { color: var(--muted); font-size: 14px; margin-top: 3px; }
.match .why { color: var(--slate); font-size: 14px; margin: 8px 0 0; padding-left: 20px; position: relative; }
.match .why::before { content: ""; position: absolute; left: 0; top: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.score { min-width: 74px; text-align: center; border-radius: 12px; padding: 12px 10px; font-family: var(--serif); font-weight: 600; font-size: 26px; color: var(--navy); background: linear-gradient(140deg, #f4f8ff, #eaf1fc); border: 1px solid var(--line); }

/* parsed deal chips */
.parsed { margin: 18px 0; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.parsed-title { font-weight: 700; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); margin-bottom: 12px; }
.parsed-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 22px; }
.parsed-grid span { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .5px; }
.parsed-grid strong { font-size: 15px; font-weight: 600; color: var(--ink); }

/* ---------- Admin ---------- */
.admin-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--bg-tint); color: var(--navy); font-size: 13px; font-weight: 600; }
.pill.g { background: #e7f5ee; color: var(--ok); }
.pill.y { background: #fbf1de; color: var(--warn); }
.pill.r { background: #fbe9e7; color: var(--danger); }
.table-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #fff; }
table.data { border-collapse: collapse; width: 100%; font-size: 14px; }
table.data th, table.data td { padding: 12px 14px; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: top; }
table.data th { position: sticky; top: 78px; background: var(--bg-soft); font: 700 11px/1.2 var(--font); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
table.data tr:hover td { background: var(--bg-soft); }
table.data a { color: var(--blue); font-weight: 500; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 18px 0 20px; }
.bar-conf { display: inline-block; width: 120px; height: 8px; border-radius: 6px; background: var(--line); overflow: hidden; vertical-align: middle; }
.bar-conf > i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--blue-bright)); }

@media (max-width: 940px) {
  body { font-size: 16px; }
  .grid-3, .grid-2, .form-row, .parsed-grid { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .section-head { margin-bottom: 40px; }
  .section-head h2 { font-size: 30px; }
  .app-hero h1 { font-size: 30px; }
  .svh-nav { display: none; }
  .app-hero { padding: 52px 0 44px; }
}
