/* Rate Calculator by ViaEpic: shared styles for the hub and every platform page.
   Source: Viaepic/rate-calculator-src/calc.css (copied to site/rate-calculator/ by build.js). */
:root {
  --bg: #0a0a0b;
  --surface: #141416;
  --surface-2: #1b1b1e;
  --border: rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.16);
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --accent: #ff6b4a;
  --accent-soft: rgba(255,107,74,0.15);
  --gradient: linear-gradient(135deg, #ff6b4a 0%, #ff9472 50%, #ffb199 100%);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}
.noise {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.glow {
  position: fixed; width: 600px; height: 600px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,107,74,0.12) 0%, transparent 70%);
  top: -200px; right: -150px; pointer-events: none; z-index: 0;
}
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }

/* Site nav */
nav.site {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  backdrop-filter: blur(12px); background: rgba(10,10,11,0.75);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1120px; margin: 0 auto; padding: 16px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.logo { font-weight: 700; font-size: 1.1rem; letter-spacing: -0.02em; color: var(--text); text-decoration: none; }
.logo span { color: var(--accent); }
.nav-links { display: flex; gap: 28px; list-style: none; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 0.9rem; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-cta {
  background: var(--text); color: var(--bg); padding: 10px 20px; border-radius: 999px; white-space: nowrap;
  text-decoration: none; font-size: 0.875rem; font-weight: 600; transition: transform 0.2s, opacity 0.2s;
}
.nav-cta:hover { transform: translateY(-1px); opacity: 0.92; }

/* Page header */
.page-header { padding: 116px 0 28px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 0.82rem; color: var(--muted); margin-bottom: 22px; list-style: none; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.crumbs li + li::before { content: "/"; margin-right: 8px; opacity: 0.5; }
.crumbs [aria-current] { color: var(--text); }
.section-label {
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 16px;
}
.page-header h1 {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(2.3rem, 6vw, 3.8rem);
  font-weight: 400; line-height: 1.08; letter-spacing: -0.03em; max-width: 860px;
}
.page-header h1 em { font-style: italic; background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.page-sub { margin-top: 18px; color: var(--muted); font-size: 1.08rem; max-width: 640px; }
.page-meta { margin-top: 14px; color: var(--muted); font-size: 0.85rem; max-width: 720px; }

/* Platform tabs */
.tabs {
  display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 22px; margin: 0; list-style: none;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  padding: 9px 16px; border-radius: 999px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--muted); text-decoration: none; font-size: 0.88rem; font-weight: 600;
  transition: border-color 0.2s, color 0.2s;
}
.tabs a:hover { color: var(--text); border-color: rgba(255,107,74,0.5); }
.tabs a.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.mono {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 22px; height: 22px; border-radius: 6px; background: var(--accent-soft); color: var(--accent);
  font-size: 0.66rem; font-weight: 700; letter-spacing: 0;
}
.tabs a.active .mono { background: rgba(10,10,11,0.12); color: var(--bg); }

/* Calculator */
.calc { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 28px; }
.panel h2 { font-size: 1.05rem; font-weight: 600; margin-bottom: 18px; }
.field { margin-bottom: 16px; }
.field label, .group-label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; }
.field .hint { font-size: 0.78rem; color: var(--muted); margin-top: 5px; }
.opt { font-weight: 500; color: var(--muted); }
input[type="text"], select {
  width: 100%; background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: 12px;
  padding: 12px 14px; font: inherit; font-size: 1rem; appearance: none;
}
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23a1a1aa' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px;
}
input[type="text"]:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: end; }
.checks { display: grid; gap: 8px; }
.field label.check, .check {
  display: flex; gap: 10px; align-items: flex-start; font-size: 0.9rem; font-weight: 600; margin-bottom: 0;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; cursor: pointer;
}
.check input { margin-top: 4px; accent-color: var(--accent); width: 16px; height: 16px; flex: none; }
.check small { display: block; color: var(--muted); font-size: 0.78rem; font-weight: 400; }
.divider { height: 1px; background: var(--border); margin: 20px 0; }

.results { position: sticky; top: 84px; }
.empty { color: var(--muted); font-size: 0.95rem; }
.empty h2 { color: var(--text); }
.headline-label { font-size: 0.8rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; }
.headline {
  font-size: clamp(1.7rem, 5vw, 2.4rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.headline span { color: var(--accent); }
.verdict { margin-top: 12px; font-size: 0.9rem; color: var(--muted); }
.verdict strong { color: var(--text); font-weight: 600; }
.bandbar { margin-top: 16px; }
.bandbar-track { position: relative; height: 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); }
.bandbar-fill { position: absolute; top: -1px; bottom: -1px; border-radius: 999px; background: var(--gradient); }
.bandbar-ends { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--muted); margin-top: 6px; font-variant-numeric: tabular-nums; }
table.card { width: 100%; border-collapse: collapse; margin-top: 18px; font-size: 0.92rem; }
table.card th, table.card td { text-align: left; padding: 10px 0; border-bottom: 1px solid var(--border); vertical-align: top; }
table.card th { font-size: 0.75rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
table.card td:last-child, table.card th:last-child { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 600; }
table.card td small { display: block; color: var(--muted); font-size: 0.76rem; font-weight: 400; }
table.card tr.ref td { color: var(--muted); }
.notes { margin-top: 14px; font-size: 0.82rem; color: var(--muted); display: grid; gap: 6px; }
.notes strong { color: var(--text); font-weight: 600; }
.actions { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 10px; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px; border: 0; cursor: pointer;
  background: var(--gradient); color: #0a0a0b; padding: 13px 24px; border-radius: 999px;
  text-decoration: none; font: inherit; font-weight: 600; font-size: 0.92rem; transition: transform 0.2s, box-shadow 0.2s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(255,107,74,0.25); }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  background: var(--surface-2); color: var(--text); border: 1px solid var(--border-strong);
  padding: 12px 22px; border-radius: 999px; text-decoration: none; font: inherit; font-weight: 600; font-size: 0.92rem;
}
.btn-ghost:hover { border-color: rgba(255,107,74,0.5); }

/* Ad slots: hidden until ads are switched on in calc.js */
.ad-slot { display: none; }
.ads-on .ad-slot { display: block; margin: 40px 0; text-align: center; min-height: 120px; }
.ad-slot .ad-label { font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }

/* Hub */
.platform-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-top: 8px; }
.platform-card {
  display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 26px;
  transition: border-color 0.3s, transform 0.3s;
}
.platform-card:hover { border-color: rgba(255,107,74,0.4); transform: translateY(-3px); }
.platform-card .top { display: flex; align-items: center; gap: 12px; }
.platform-card .mono { width: 40px; height: 40px; border-radius: 12px; font-size: 0.9rem; }
.platform-card h3 { font-size: 1.15rem; font-weight: 600; }
.platform-card p { color: var(--muted); font-size: 0.92rem; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 0.74rem; font-weight: 600; color: var(--muted); border: 1px solid var(--border); background: rgba(255,255,255,0.03); padding: 4px 10px; border-radius: 999px; }
.platform-card .data { font-size: 0.78rem; color: var(--muted); margin-top: auto; padding-top: 6px; }
.platform-card .go { font-size: 0.9rem; font-weight: 600; color: var(--accent); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 8px; }
.step-num { font-size: 0.75rem; font-weight: 700; color: var(--accent); margin-bottom: 10px; }
.step h3 { font-size: 1rem; font-weight: 600; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 0.9rem; }
.hub-section { padding: 56px 0 0; }
.hub-section > h2 {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(1.7rem, 3.6vw, 2.3rem); font-weight: 400; letter-spacing: -0.02em; line-height: 1.2; margin-bottom: 22px;
}

/* Content */
.content { max-width: 780px; padding: 72px 0 40px; }
.content section { margin-bottom: 56px; }
.content h2 {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(1.6rem, 3.4vw, 2.1rem); font-weight: 400; letter-spacing: -0.02em; line-height: 1.2; margin-bottom: 16px;
}
.content h3 { font-size: 1rem; font-weight: 600; margin: 24px 0 8px; }
.content p { color: var(--muted); font-size: 0.98rem; margin-bottom: 14px; }
.content p strong, .content li strong { color: var(--text); font-weight: 600; }
.content ul, .content ol { color: var(--muted); font-size: 0.98rem; padding-left: 20px; margin-bottom: 14px; }
.content li { margin-bottom: 8px; }
.content a { color: var(--text); text-decoration: underline; text-decoration-color: rgba(255,107,74,0.5); text-underline-offset: 3px; }
.content a:hover { text-decoration-color: var(--accent); }
.callout {
  background: var(--surface); border: 1px solid rgba(255,107,74,0.35); border-radius: 16px;
  padding: 18px 20px; margin: 0 0 20px; color: var(--muted); font-size: 0.95rem;
}
.callout strong { color: var(--text); }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); margin: 18px 0; }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 0.88rem; min-width: 560px; }
.table-wrap table.narrow { min-width: 0; }
.table-wrap th, .table-wrap td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.table-wrap tr:last-child td { border-bottom: 0; }
.table-wrap th { font-size: 0.74rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.table-wrap td { color: var(--muted); }
.table-wrap td:first-child { color: var(--text); font-weight: 600; }
.table-wrap td a { color: var(--text); }
details { border-bottom: 1px solid var(--border); padding: 16px 0; }
details summary { cursor: pointer; font-weight: 600; font-size: 1rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; color: var(--accent); font-weight: 700; }
details[open] summary::after { content: "\2212"; }
details p { margin: 10px 0 0; }

.cta-box {
  background: var(--surface); border: 1px solid var(--border); border-radius: 24px;
  padding: 56px; text-align: center; position: relative; overflow: hidden; margin-bottom: 80px;
}
.cta-box::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 0%, rgba(255,107,74,0.08) 0%, transparent 60%); }
.cta-box > * { position: relative; }
.cta-box h2 { font-family: "Instrument Serif", Georgia, serif; font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 400; }
.cta-box p { color: var(--muted); margin: 14px auto 28px; max-width: 520px; }

footer {
  border-top: 1px solid var(--border); padding: 40px 0;
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px;
}
footer p { color: var(--muted); font-size: 0.875rem; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--text); }
.footer-links { display: flex; flex-wrap: wrap; gap: 24px; font-size: 0.875rem; }

@media (max-width: 860px) {
  .calc { grid-template-columns: 1fr; }
  .results { position: static; }
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .container { padding: 0 16px; }
  .nav-inner { padding: 14px 16px; }
  .page-header { padding: 100px 0 22px; }
  .panel { padding: 22px 18px; }
  .cta-box { padding: 40px 22px; }
  .platform-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
