@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Newsreader:wght@400;600;700&display=swap");

:root {
  --bg: #f2efe8;
  --ink: #0f1a1c;
  --muted: #5d6b6f;
  --card: #ffffff;
  --accent: #c4502b;
  --accent-2: #1d6d86;
  --accent-3: #0f6b3b;
  --line-1: #c4502b;
  --line-2: #1d6d86;
  --line-3: #0f6b3b;
  --line-4: #7b3f00;
  --shadow: 0 18px 40px rgba(15, 26, 28, 0.15);
  --shadow-soft: 0 10px 20px rgba(15, 26, 28, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: "Space Grotesk", "Noto Sans", sans-serif;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(20px);
  opacity: 0.5;
}

.orb-1 {
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, #ffd2b1, #f6a77a 60%, transparent 70%);
  top: -80px;
  left: -80px;
}

.orb-2 {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, #b7e1f0, #7bbad2 60%, transparent 70%);
  bottom: -140px;
  right: -120px;
}

.grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(15, 26, 28, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 26, 28, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.18;
}

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

.auth-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 26, 28, 0.35);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 20;
}

.auth-card {
  background: #fff;
  padding: 24px;
  border-radius: 16px;
  width: 320px;
  box-shadow: var(--shadow);
  text-align: center;
}

.auth-card.wide {
  width: min(860px, 92vw);
  text-align: left;
}

.auth-card input {
  width: 100%;
  padding: 10px 12px;
  margin-top: 12px;
  border-radius: 10px;
  border: 1px solid rgba(15, 26, 28, 0.2);
}

.auth-card button {
  width: 100%;
  margin-top: 10px;
  padding: 10px;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

.btn-secondary {
  background: #fff;
  color: var(--ink);
  border: 1px solid rgba(15, 26, 28, 0.2);
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
}

.form-row {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.etf-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.etf-card {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 12px;
  border: 1px solid rgba(15, 26, 28, 0.1);
}

.etf-card h3 {
  margin: 0 0 10px 0;
  font-size: 14px;
  color: #1a1a1a;
}

.etf-card .form-row {
  margin-top: 6px;
}

.form-row input,
.form-row select {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(15, 26, 28, 0.2);
  font-size: 14px;
}

.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 16px;
}

.form-actions button {
  width: auto;
  min-width: 120px;
}

.auth-error {
  margin-top: 10px;
  font-size: 12px;
  color: #b00020;
}

.hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 8px;
}

h1 {
  font-size: 40px;
  margin: 0 0 8px;
  font-family: "Newsreader", "STSong", serif;
}

.subtitle {
  margin: 0;
  color: var(--muted);
}

.hero-copy {
  max-width: 700px;
}

.status-bar {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(15, 26, 28, 0.12);
  box-shadow: var(--shadow-soft);
  margin-top: 14px;
  font-size: 12px;
}

.status-bar strong {
  font-weight: 600;
}

.status-bar .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-2);
  display: inline-block;
}

.controls {
  display: grid;
  gap: 10px;
  align-items: center;
  background: rgba(255, 255, 255, 0.85);
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(15, 26, 28, 0.12);
  box-shadow: var(--shadow-soft);
}

label {
  font-size: 12px;
  color: var(--muted);
}

select {
  font-size: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(15, 26, 28, 0.2);
  background: #fff;
}

.hint {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.card {
  background: var(--card);
  border-radius: 20px;
  padding: 22px;
  box-shadow: var(--shadow);
  margin-bottom: 22px;
  border: 1px solid rgba(15, 26, 28, 0.08);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.legend i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.chart-wrap {
  margin-top: 12px;
  border: 1px solid rgba(15, 26, 28, 0.08);
  border-radius: 12px;
  padding: 8px;
  background: linear-gradient(180deg, #ffffff, #f7f1e8);
}

.axis-label {
  font-size: 10px;
  fill: #657278;
}

.gridline {
  stroke: rgba(15, 26, 28, 0.08);
  stroke-width: 1;
}

.chart-note {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 12px;
}

.metric {
  background: linear-gradient(140deg, #fef9f2, #f3e7d9);
  border-radius: 14px;
  padding: 14px;
  border: 1px solid rgba(15, 26, 28, 0.08);
}

.metric span {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

.metric strong {
  font-size: 22px;
}

.small {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}

.plan {
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.6;
}

.holdings {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.holding {
  border-radius: 14px;
  padding: 12px;
  background: linear-gradient(140deg, #f7f4ee, #efe5d8);
  border: 1px solid rgba(15, 26, 28, 0.08);
}

.holding span {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

.holding strong {
  font-size: 16px;
}

.holding em {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
  font-style: normal;
}

.table-wrap {
  max-height: 360px;
  overflow: auto;
  border-radius: 12px;
  border: 1px solid rgba(15, 26, 28, 0.08);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th, td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(15, 26, 28, 0.08);
  text-align: left;
}

th {
  position: sticky;
  top: 0;
  background: #efe2cf;
  z-index: 1;
}

@media (max-width: 920px) {
  .hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }
}
