:root {
  --bg: #0e1014;
  --bg-2: #151821;
  --panel: #1a1e29;
  --panel-2: #20252f;
  --line: #2a303b;
  --text: #e8ecf3;
  --muted: #9aa3b2;
  --accent: #7c5cff;
  --accent-2: #2dd4bf;
  --warn: #f59e0b;
  --danger: #ef4444;
  --good: #10b981;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0,0,0,0.25);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: radial-gradient(1200px 600px at 10% -10%, #1b2230 0%, var(--bg) 60%) fixed;
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
}

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(20,24,32,0.7);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 10px;
  color: #0b0d12;
}
.brand-name { font-weight: 700; letter-spacing: 0.2px; }
.brand-sub { font-size: 12px; color: var(--muted); }

.topnav { display: flex; gap: 18px; flex-wrap: wrap; }
.topnav a { color: var(--text); font-size: 14px; opacity: 0.85; }
.topnav a:hover { opacity: 1; text-decoration: none; color: var(--accent-2); }

main { max-width: 1200px; margin: 0 auto; padding: 32px 24px 64px; }

section { margin-bottom: 48px; }

.hero {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 24px;
  padding: 28px;
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hero h1 { font-size: 32px; line-height: 1.2; margin: 0 0 12px; }
.hero p { color: var(--muted); margin: 0 0 18px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.hero-meta { display: flex; gap: 18px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }

.hero-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hero-card-row { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.hero-card-row strong { margin-left: auto; }
.hero-card-total { margin-top: 6px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 14px; }
.hero-card-swap { color: var(--accent-2); font-size: 15px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot.a { background: #e50914; }
.dot.b { background: #7c5cff; }
.dot.c { background: #113ccf; }
.dot.d { background: #00a8e1; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  background: var(--panel-2);
  color: var(--text);
  transition: transform 0.05s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { background: #2a3140; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); color: #0b0d12; border-color: transparent; }
.btn.primary:hover { background: #8f75ff; }
.btn.ghost { background: transparent; border-color: var(--line); }
.btn.ghost:hover { background: var(--panel); }
.btn.small { padding: 7px 12px; font-size: 13px; }
.btn.full { width: 100%; }

.app {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.app-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  grid-template-rows: auto auto;
  gap: 20px;
}
.app-grid .controls { grid-column: 1; grid-row: 1; }
.app-grid .settings { grid-column: 2; grid-row: 1; }
.app-grid .calendar { grid-column: 1 / -1; grid-row: 2; }

.panel h2 { margin: 0 0 6px; font-size: 20px; }
.muted { color: var(--muted); font-size: 14px; margin: 0 0 16px; }

.presets { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.presets-label { font-size: 13px; color: var(--muted); }
.chip {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
}
.chip:hover { background: #2a3140; }

.add-form { display: grid; gap: 8px; margin-bottom: 12px; }
.add-form label { font-size: 13px; color: var(--muted); }
.add-form input, .add-form select, .settings input, .settings select {
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  width: 100%;
}

.list-tools { display: flex; gap: 8px; margin-bottom: 14px; }

.show-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.show-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.show-item .si { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.show-item .name { font-weight: 600; }
.show-item .meta { color: var(--muted); font-size: 13px; margin-left: auto; }
.show-item .remove {
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 16px;
  padding: 4px 8px;
  border-radius: 6px;
}
.show-item .remove:hover { color: var(--danger); background: rgba(239,68,68,0.1); }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.field small { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }

.summary {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  margin-top: 10px;
  display: grid;
  gap: 8px;
}
.summary-row { display: flex; justify-content: space-between; font-size: 14px; }
.summary-row.highlight { color: var(--accent-2); font-weight: 700; padding-top: 6px; border-top: 1px dashed var(--line); }

.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.status { font-size: 13px; color: var(--accent-2); min-height: 18px; margin-top: 8px; }

.calendar-output {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
}
.month-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.month-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
}
.month-card h4 { margin: 0 0 8px; font-size: 15px; }
.month-card ul { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 4px; }
.month-card li { font-size: 13px; }
.month-card .keep { color: var(--accent-2); }
.month-card .pause { color: var(--muted); text-decoration: line-through; }
.month-card .swap { color: var(--warn); }
.month-card .cost { font-size: 13px; margin-top: 6px; }
.month-card .over { color: var(--danger); font-weight: 600; }

.empty-state {
  text-align: center;
  padding: 32px 12px;
  color: var(--muted);
}

.scenarios h2, .notes h2 { margin: 0 0 6px; font-size: 24px; }
.scenario-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.scenario {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.scenario h3 { margin: 0 0 10px; font-size: 17px; }
.scenario ul { margin: 0 0 10px; padding-left: 18px; }
.scenario li { font-size: 14px; margin-bottom: 4px; }
.scenario p { font-size: 14px; color: var(--muted); margin: 0 0 8px; }
.scenario p strong { color: var(--text); }

.notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.note {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}
.note h3 { margin: 0 0 8px; font-size: 16px; }
.note p { font-size: 14px; color: var(--muted); margin: 0; }

.assumptions {
  margin-top: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.assumptions h3 { margin: 0 0 10px; font-size: 17px; }
.assumptions ul { margin: 0; padding-left: 18px; }
.assumptions li { font-size: 14px; color: var(--muted); margin-bottom: 6px; }

.content-block {
  margin-top: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.content-block h3 { margin: 0 0 10px; font-size: 17px; }
.content-block p { font-size: 14px; color: var(--muted); margin: 0 0 10px; }

footer {
  border-top: 1px solid var(--line);
  background: var(--panel);
  padding: 28px 24px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-inner p { color: var(--muted); font-size: 13px; margin: 4px 0 0; }
.footer-inner nav { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-inner nav a { color: var(--text); font-size: 14px; opacity: 0.85; }
.footer-inner nav a:hover { opacity: 1; color: var(--accent-2); }
.footer-bottom {
  max-width: 1200px;
  margin: 16px auto 0;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .app-grid { grid-template-columns: 1fr; grid-template-rows: auto auto auto; }
  .app-grid .controls, .app-grid .settings, .app-grid .calendar { grid-column: 1; }
  .app-grid .settings { grid-row: 2; }
  .app-grid .calendar { grid-row: 3; }
  .topnav { gap: 12px; }
  .topbar { padding: 14px 18px; }
  main { padding: 24px 16px 48px; }
  section { margin-bottom: 36px; }
  .hero h1 { font-size: 26px; }
}

@media print {
  body { background: #fff; color: #000; }
  .topbar, .hero-actions, .controls, .settings, .actions, .list-tools, footer, .scenarios, .notes, .assumptions, .content-block { display: none; }
  .app { box-shadow: none; border: none; padding: 0; }
  .calendar-output { border: none; padding: 0; }
  .month-card { break-inside: avoid; border: 1px solid #ccc; }
  .month-card .keep { color: #000; }
  .month-card .pause { color: #666; }
  .month-card .swap { color: #000; text-decoration: underline; }
}


/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
