/* BRRRR Deal Analyzer — dark old-money theme */
:root {
  --bg: #13211A;
  --bg-deep: #0D1813;
  --ink: #F5F2E8;
  --ink-dim: #CFC8B4;
  --gold: #B49A5B;
  --gold-soft: #8A7440;
  --line: rgba(180, 154, 91, 0.28);
  --card: #182720;
  --good: #9DBE8C;
  --bad: #D08A7E;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.5;
  min-height: 100vh;
}

.page { max-width: 1180px; margin: 0 auto; padding: 40px 24px 56px; }

/* ---------- masthead ---------- */
.masthead { text-align: center; margin-bottom: 28px; }
.brand {
  font-family: var(--serif);
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  font-size: 13px;
  color: var(--gold);
  margin-bottom: 14px;
}
.masthead h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.4rem, 5.5vw, 3.6rem);
  line-height: 1.05;
  margin-bottom: 12px;
}
.lede {
  font-family: var(--serif);
  font-size: 1.22rem;
  font-style: italic;
  color: var(--ink-dim);
  max-width: 640px;
  margin: 0 auto;
}

/* ---------- verdict ---------- */
.verdict {
  border: 1px solid var(--gold);
  background: linear-gradient(180deg, rgba(180,154,91,0.14), rgba(180,154,91,0.05));
  border-radius: 10px;
  padding: 20px 26px;
  text-align: center;
  margin-bottom: 28px;
}
.verdict .v-title {
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--gold);
}
.verdict .v-sub {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-style: italic;
  color: var(--ink-dim);
  margin-top: 4px;
}
.verdict.warn .v-title { color: var(--bad); }
.verdict.mid .v-title { color: var(--ink); }

/* ---------- layout ---------- */
.layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 900px) { .layout { grid-template-columns: 1fr; } }

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 26px 24px;
}
.panel h2 {
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.05em;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

/* ---------- inputs ---------- */
fieldset { border: 0; margin-bottom: 20px; }
fieldset:last-of-type { margin-bottom: 8px; }
legend {
  font-family: var(--serif);
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 12px;
  padding: 0;
}
label {
  display: block;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 12px;
}
label .hint { text-transform: none; letter-spacing: 0; opacity: 0.7; }
.field {
  display: flex;
  align-items: center;
  background: var(--bg-deep);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 6px;
  transition: border-color 0.15s ease;
}
.field:focus-within { border-color: var(--gold); }
.field .prefix, .field .suffix {
  padding: 0 4px 0 14px;
  color: var(--gold);
  font-size: 1rem;
  font-family: var(--serif);
}
.field .suffix { padding: 0 14px 0 4px; }
.field input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--ink);
  font-size: 1.15rem;
  font-family: var(--serif);
  padding: 10px 12px;
}
.field input::-webkit-outer-spin-button,
.field input::-webkit-inner-spin-button { -webkit-appearance: none; }
.field input[type=number] { -moz-appearance: textfield; appearance: textfield; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }

.actions { margin: 18px 0 12px; }
.btn {
  font-family: var(--serif);
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  padding: 10px 22px;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--gold);
  transition: background 0.15s ease, color 0.15s ease;
}
.btn:hover { background: rgba(180,154,91,0.14); }
.fineprint { font-size: 0.78rem; color: var(--ink-dim); opacity: 0.75; }

/* ---------- steps ---------- */
.steps { list-style: none; margin-bottom: 26px; }
.step {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 18px 14px 20px;
  margin-bottom: 0;
  background: var(--bg-deep);
}
.step + .step { margin-top: 18px; }
.step + .step::before {
  content: "↓";
  position: absolute;
  top: -19px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--gold);
  font-size: 14px;
}
.step-name {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
}
.step-lines { font-family: var(--serif); font-size: 1.12rem; color: var(--ink-dim); }
.step-lines .row { display: flex; justify-content: space-between; gap: 12px; padding: 2px 0; }
.step-lines .row b { color: var(--ink); font-weight: 600; }
.step-lines .row b.pos { color: var(--good); }
.step-lines .row b.neg { color: var(--bad); }

/* ---------- metrics ---------- */
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 640px) { .metrics { grid-template-columns: repeat(2, 1fr); } }
.metric {
  background: var(--bg-deep);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 12px;
  text-align: center;
}
.metric dt {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 6px;
}
.metric dd {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
}
.metric.highlight { border-color: var(--gold); }
.metric.highlight dd { color: var(--gold); }
.metric dd.pos { color: var(--good); }
.metric dd.neg { color: var(--bad); }

/* ---------- footer ---------- */
.colophon {
  text-align: center;
  margin-top: 40px;
  font-family: var(--serif);
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  font-size: 12px;
  color: var(--gold-soft);
}
.colophon .dot { margin: 0 10px; font-size: 9px; vertical-align: 2px; }
