:root{
  --bg:#0b1220;
  --card:#111b31;
  --border:rgba(148,163,184,.18);
  --text:#e5e7eb;
  --muted:#94a3b8;
  --accent:#60a5fa;
  --accent2:#3b82f6;
  --good:#22c55e;
  --danger:#ef4444;
  --shadow: 0 20px 60px rgba(0,0,0,.35);
  --radius: 22px;
}

*{ box-sizing:border-box; }
html,body{ margin:0; padding:0; }
body{
  min-height:100vh;
  color:var(--text);
  background:
    radial-gradient(circle at top left, rgba(59,130,246,.18), transparent 36%),
    radial-gradient(circle at top right, rgba(34,197,94,.10), transparent 30%),
    linear-gradient(180deg, var(--bg), #070b14 100%);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.page-shell{
  width:min(1240px, calc(100vw - 24px));
  margin:0 auto;
  padding:24px 0 48px;
}

.hero{
  display:grid;
  grid-template-columns: 1.7fr .9fr;
  gap:18px;
  align-items:stretch;
  margin-bottom:18px;
}

.hero-copy, .hero-card, .info-notice, .card, .coming-soon{
  background: linear-gradient(180deg, rgba(17,27,49,.98), rgba(15,23,42,.98));
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow: var(--shadow);
}

.hero-copy{ padding:28px; }
.hero-card{ padding:22px; }
.hero-sidebar{
  display:flex;
  flex-direction:column;
  gap:18px;
}
.info-notice{
  padding:18px 22px;
}
.info-notice p{
  margin:0 0 10px;
  color:var(--muted);
  font-size:.95rem;
  line-height:1.6;
}
.info-notice p:last-child{
  margin-bottom:0;
}

.eyebrow{
  display:inline-flex;
  gap:8px;
  align-items:center;
  font-size:12px;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:#c7d2fe;
  margin-bottom:12px;
}
h1{
  margin:0;
  font-size: clamp(2rem, 4.5vw, 3.8rem);
  line-height:1.05;
  letter-spacing:-.04em;
}
.lead{
  margin:16px 0 0;
  color:var(--muted);
  max-width: 70ch;
  font-size:1.03rem;
  line-height:1.65;
}
.hero-card-title, h2{
  margin:0 0 14px;
  font-size:1.1rem;
  letter-spacing:-.02em;
}
.hero-card ul{
  margin:0;
  padding-left:18px;
  color:var(--muted);
  line-height:1.7;
}
.danger-inline{ color:#ff6b6b; font-weight:800; }

.tabs{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin: 6px 0 18px;
}
.tab-btn{
  appearance:none;
  border:1px solid var(--border);
  background: rgba(15,23,42,.88);
  color:var(--muted);
  padding:12px 16px;
  border-radius:999px;
  cursor:pointer;
  transition: .18s ease;
  font-weight:700;
}
.tab-btn:hover{ transform: translateY(-1px); color:var(--text); }
.tab-btn.active{
  color:white;
  border-color: rgba(96,165,250,.55);
  background: linear-gradient(180deg, rgba(37,99,235,.95), rgba(29,78,216,.95));
  box-shadow: 0 12px 28px rgba(37,99,235,.25);
}

.tab-panel{ display:none; }
.tab-panel.active{ display:block; }

.warning-banner{
  border:1px solid rgba(239,68,68,.35);
  background: linear-gradient(180deg, rgba(127,29,29,.55), rgba(69,10,10,.48));
  color:#fee2e2;
  border-radius:18px;
  padding:16px 18px;
  line-height:1.7;
  margin-bottom:18px;
}
.calculator-grid{
  display:grid;
  grid-template-columns: .95fr 1.15fr;
  gap:18px;
  align-items:start;
  margin-bottom:18px;
}
.card{ padding:22px; }
.fields{ display:grid; gap:14px; }
label{ display:block; }
label span{
  display:block;
  margin-bottom:8px;
  color:#cbd5e1;
  font-weight:600;
  font-size:.95rem;
}
input, select{
  width:100%;
  border-radius:14px;
  border:1px solid rgba(148,163,184,.18);
  background: rgba(2,6,23,.55);
  color: var(--text);
  padding:13px 14px;
  font-size:1rem;
  outline:none;
  transition: .18s ease;
}
input:focus, select:focus{
  border-color: rgba(96,165,250,.8);
  box-shadow: 0 0 0 4px rgba(59,130,246,.15);
}
.input-with-select{
  display:grid;
  grid-template-columns: 1fr 110px;
  gap:10px;
}
.actions{
  display:flex;
  gap:12px;
  margin-top:18px;
}
.primary-btn, .ghost-btn{
  border:none;
  border-radius:14px;
  padding:13px 16px;
  font-weight:800;
  font-size:1rem;
  cursor:pointer;
}
.primary-btn{
  color:white;
  background: linear-gradient(180deg, var(--accent), var(--accent2));
  box-shadow: 0 14px 30px rgba(59,130,246,.24);
}
.ghost-btn{
  color: var(--text);
  background: rgba(148,163,184,.10);
  border:1px solid var(--border);
}
.primary-btn:hover, .ghost-btn:hover{ transform: translateY(-1px); }

.result-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap:12px;
}
.result-card{
  padding:16px;
  border-radius:18px;
  border:1px solid rgba(148,163,184,.15);
  background: rgba(2,6,23,.40);
}
.result-card span{
  display:block;
  color:var(--muted);
  font-size:.9rem;
  margin-bottom:10px;
}
.result-card strong{
  font-size:1.3rem;
  letter-spacing:-.02em;
}
.result-card.emphasis{
  background: linear-gradient(180deg, rgba(59,130,246,.18), rgba(2,6,23,.40));
  border-color: rgba(96,165,250,.30);
}
.status-box{
  margin-top:14px;
  padding:14px 16px;
  border-radius:16px;
  border:1px solid rgba(148,163,184,.15);
  background: rgba(2,6,23,.35);
  color: #cbd5e1;
  line-height:1.55;
}
.section-head{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:end;
  margin-bottom:12px;
}
.small-note{
  color:var(--muted);
  font-size:.92rem;
}
.table-wrap{
  overflow:auto;
  border-radius:18px;
  border:1px solid rgba(148,163,184,.15);
}
table{
  width:100%;
  border-collapse:collapse;
  min-width: 920px;
  background: rgba(2,6,23,.25);
}
thead th{
  position:sticky;
  top:0;
  z-index:1;
  background: rgba(15,23,42,.96);
  color:#cbd5e1;
  text-align:left;
  font-size:.92rem;
  padding:14px 12px;
  border-bottom:1px solid rgba(148,163,184,.14);
}
tbody td{
  padding:13px 12px;
  border-bottom:1px solid rgba(148,163,184,.08);
  color:#e2e8f0;
}
tbody tr:hover{ background: rgba(96,165,250,.05); }
tr.critical-row{
  background: linear-gradient(90deg, rgba(127,29,29,.35), rgba(15,23,42,.05));
}
tr.critical-row td:first-child{
  font-weight:900;
  color:#fecaca;
}
tr.dead-row{ opacity:.45; }

.seo-copy p, .faq p, .helper-copy{
  color:var(--muted);
  line-height:1.75;
}
.helper-list{
  margin:0 0 14px;
  padding-left:20px;
  color:var(--muted);
  line-height:1.75;
}
.helper-list li{ margin-bottom:6px; }
.warning-emphasis{
  color:#fecaca;
  border-left:3px solid var(--danger);
  padding-left:14px;
  margin-top:4px;
}
.leverage-note{
  display:inline-block;
  margin-left:6px;
  padding:2px 8px;
  border-radius:6px;
  font-size:.78rem;
  font-style:normal;
  font-weight:800;
  letter-spacing:.02em;
  text-transform:uppercase;
  color:#fecaca;
  background:rgba(127,29,29,.45);
  border:1px solid rgba(239,68,68,.4);
  vertical-align:middle;
}
.about-page .panel.card + .panel.card{
  margin-top:18px;
}
.contact-link{
  color:var(--accent);
  font-weight:700;
  text-decoration:none;
  transition:.18s ease;
}
.contact-link:hover{
  color:#93c5fd;
  text-decoration:underline;
}
.site-footer{
  margin-top:24px;
  padding:22px;
  background: linear-gradient(180deg, rgba(17,27,49,.98), rgba(15,23,42,.98));
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow: var(--shadow);
  text-align:center;
}
.footer-nav{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:10px 18px;
  margin-bottom:12px;
}
.footer-link{
  color:var(--muted);
  font-weight:700;
  text-decoration:none;
  transition:.18s ease;
}
.footer-link:hover{
  color:var(--accent);
}
.footer-note{
  margin:0;
  color:var(--muted);
  font-size:.92rem;
}
.legal-page h1,
.legal-page h2{
  letter-spacing:-.02em;
}
.legal-page h1{
  margin:0 0 14px;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height:1.15;
}
.legal-page h2{
  margin:22px 0 12px;
  font-size:1.05rem;
  color:#e2e8f0;
}
.legal-page h2:first-of-type{
  margin-top:18px;
}
.legal-meta{
  margin-bottom:10px;
  font-size:.95rem;
}
.faq details{
  border-top:1px solid rgba(148,163,184,.12);
  padding:12px 0;
}
.faq details:first-of-type{
  border-top:none;
  padding-top:0;
}
.faq summary{
  cursor:pointer;
  font-weight:700;
  color:#e2e8f0;
}
.coming-soon{
  padding:28px;
  min-height:180px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:flex-start;
}
.coming-soon p{ color: var(--muted); }

.positive-value{ color: var(--good); }
.negative-value{ color: var(--danger); }

.position-grid, .dca-grid{
  grid-template-columns: .95fr 1.15fr;
}

@media (max-width: 980px){
  .hero, .calculator-grid{ grid-template-columns: 1fr; }
  .result-grid{ grid-template-columns: 1fr; }
}
@media (max-width: 640px){
  .page-shell{ width:min(100vw - 16px, 1240px); padding-top:8px; }
  .hero-copy, .hero-card, .card, .coming-soon{ padding:18px; border-radius:18px; }
  .actions{ flex-direction:column; }
  .input-with-select{ grid-template-columns: 1fr 92px; }
  h1{ font-size:2rem; }
}

.hero-market-text {
    margin-top: 12px;
    font-size: 0.95rem;
    opacity: 0.8;
}

.guide-link {
    display: inline-block;
    margin-top: 12px;
    padding: 10px 16px;
    border-radius: 12px;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #60a5fa;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.guide-link:hover {
    background: rgba(59, 130, 246, 0.25);
    color: #93c5fd;
}
.guide-link,
.guide-link:visited {
    color: #60a5fa !important;
    text-decoration: none !important;
}

.guide-link:hover,
.guide-link:focus {
    color: #93c5fd !important;
}