/* M9 — shared styles for /calculators/* pages. Mirrors the
 * landing site's index.html palette + typography (Inter body,
 * JetBrains Mono for monospace labels, --plot-orange accent,
 * dark space-y background) so the calc pages feel like Plotnode,
 * not a generic SaaS dump.
 */

:root {
  --bg-deep: #0a0514;
  --bg-card: rgba(20, 12, 38, 0.72);
  --bg-card-hover: rgba(28, 18, 50, 0.88);
  --border-soft: rgba(124, 92, 192, 0.28);
  --border-strong: rgba(160, 124, 224, 0.45);
  --neon-pink: #ff6ec7;
  --neon-magenta: #d845b8;
  --neon-cyan: #5ef0ff;
  --neon-lavender: #c8a5ff;
  --text-soft: #e8defb;
  --text-dim: #9b8ec0;
  --text-faint: #6b5d92;
  --leaf-green: #3FB05E;
  --plot-orange: #D97757;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg-deep);
  color: var(--text-soft);
  font-family: "Inter", -apple-system, system-ui, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(255,110,199,0.10) 0%, transparent 50%),
    radial-gradient(ellipse 70% 50% at 80% 60%, rgba(94,240,255,0.08) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(125,255,175,0.07) 0%, transparent 50%),
    var(--bg-deep);
  z-index: -1;
}

a { color: var(--plot-orange); }
a:hover { color: var(--neon-pink); }

/* ─── NAV ─── */
.calc-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 5, 20, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(74, 38, 128, 0.4);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1180px;
  margin: 0 auto;
}
.calc-nav .logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: #fff;
  text-decoration: none;
  line-height: 1;
}
.calc-nav .logo:hover { color: #fff; }
.calc-nav .nav-links {
  display: flex;
  gap: 24px;
  align-items: center;
}
.calc-nav .nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s;
}
.calc-nav .nav-links a:hover { color: var(--neon-cyan); }
.calc-nav .nav-cta {
  padding: 8px 18px;
  background: linear-gradient(90deg, var(--neon-pink), var(--neon-magenta));
  color: var(--bg-deep) !important;
  border-radius: 999px;
  font-weight: 700 !important;
  font-size: 13px !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}
.calc-nav .nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(255,110,199,0.4);
}

@media (max-width: 720px) {
  .calc-nav .nav-links a:not(.nav-cta) { display: none; }
}

/* ─── PAGE LAYOUT ─── */
.calc-page {
  max-width: 880px;
  margin: 0 auto;
  padding: 48px 24px 96px;
}
.calc-page > header { margin-bottom: 32px; }
.calc-page h1 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 12px;
}
.calc-page .intro {
  font-size: 17px;
  color: var(--text-dim);
  max-width: 700px;
}

.calc-page section { padding: 0; margin-bottom: 40px; }
.calc-page section h2 {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}
.calc-page section h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-soft);
  margin-bottom: 12px;
}

.calc-page .explainer p {
  margin-bottom: 14px;
  color: var(--text-soft);
  font-size: 15.5px;
  line-height: 1.7;
}
.calc-page .explainer p:last-child { margin-bottom: 0; }
.calc-page .explainer strong { color: #fff; }
.calc-page .explainer em { color: var(--neon-lavender); font-style: normal; font-weight: 600; }

/* ─── FORM ─── */
.calc-form {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 28px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}
@media (min-width: 720px) {
  .calc-form { grid-template-columns: 1fr 1fr; }
}
.calc-form .inputs { display: flex; flex-direction: column; gap: 14px; }
.calc-form .inputs label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}
.calc-form .inputs input,
.calc-form .inputs select {
  margin-top: 6px;
  width: 100%;
  background: rgba(10, 5, 20, 0.6);
  border: 1px solid var(--border-soft);
  color: var(--text-soft);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 14px;
  padding: 9px 11px;
  border-radius: 8px;
  transition: border-color 0.15s, background 0.15s;
}
.calc-form .inputs input:focus,
.calc-form .inputs select:focus {
  outline: none;
  border-color: var(--plot-orange);
  background: rgba(20, 12, 38, 0.8);
}

/* ─── RESULT ─── */
.calc-form .result {
  background: rgba(10, 5, 20, 0.5);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 18px 20px;
  align-self: flex-start;
}
.calc-form .result h3 {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 12px;
}
.calc-form .result dl {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.calc-form .result .row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 14px;
}
.calc-form .result .row dt { color: var(--text-dim); }
.calc-form .result .row dd {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  color: #fff;
  font-weight: 600;
}
.calc-form .result .note {
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-faint);
  line-height: 1.5;
}

/* ─── AFFILIATES ─── */
.affiliates {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 24px 28px;
}
.affiliates .disclosure {
  font-size: 12px;
  color: var(--text-faint);
  margin-bottom: 16px;
}
.affiliates ul {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 720px) {
  .affiliates ul { grid-template-columns: 1fr 1fr; }
}
.affiliates li {
  background: rgba(10, 5, 20, 0.55);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 14px 16px;
  transition: border-color 0.15s, transform 0.15s;
}
.affiliates li:hover {
  border-color: var(--plot-orange);
  transform: translateY(-1px);
}
.affiliates li a {
  display: block;
  text-decoration: none;
  color: inherit;
}
.affiliates .vendor {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  margin-bottom: 4px;
}
.affiliates .label {
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 6px;
}
.affiliates .blurb {
  font-size: 13px;
  color: var(--text-dim);
}

/* ─── CTA ─── */
.cta {
  background: linear-gradient(135deg, rgba(217, 119, 87, 0.12), rgba(255, 110, 199, 0.10));
  border: 1px solid var(--plot-orange);
  border-radius: 14px;
  padding: 36px 28px;
  text-align: center;
}
.cta h2 {
  margin-bottom: 10px;
  color: #fff;
}
.cta p {
  color: var(--text-soft);
  margin-bottom: 20px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.cta .btn-primary {
  display: inline-block;
  padding: 12px 28px;
  background: linear-gradient(90deg, var(--neon-pink), var(--neon-magenta));
  color: var(--bg-deep);
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: transform 0.15s, box-shadow 0.15s;
}
.cta .btn-primary:hover {
  color: var(--bg-deep);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(255, 110, 199, 0.4);
}

/* ─── OTHER CALCS ─── */
.other-calcs ul {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
@media (min-width: 720px) {
  .other-calcs ul { grid-template-columns: 1fr 1fr; }
}
.other-calcs li a {
  display: block;
  padding: 10px 14px;
  background: rgba(20, 12, 38, 0.5);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  color: var(--text-soft);
  text-decoration: none;
  font-size: 14px;
  transition: border-color 0.15s, background 0.15s;
}
.other-calcs li a:hover {
  border-color: var(--plot-orange);
  background: var(--bg-card-hover);
  color: #fff;
}

/* ─── FOOTER ─── */
footer {
  border-top: 1px solid rgba(74, 38, 128, 0.4);
  padding: 24px;
  text-align: center;
  color: var(--text-faint);
  font-size: 13px;
}
footer a { color: var(--text-dim); text-decoration: underline; }
footer a:hover { color: var(--plot-orange); }

/* ─── INDEX (calculator list) ─── */
.calc-index ul {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 24px;
}
@media (min-width: 720px) {
  .calc-index ul { grid-template-columns: 1fr 1fr; }
}
.calc-index li a {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 18px 20px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.calc-index li a:hover {
  border-color: var(--plot-orange);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}
.calc-index li h2 {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}
.calc-index li p {
  font-size: 14px;
  color: var(--text-dim);
}


/* ─── HERO IMAGE (M9 polish — adds visual at top of every calc page) ─── */
.calc-hero {
  max-width: 880px;
  margin: 24px auto 0;
  padding: 0 24px;
}
.calc-hero img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--border-soft);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}
@media (max-width: 720px) {
  .calc-hero { margin-top: 16px; padding: 0 16px; }
}
/* Wider hero specifically on the index page */
.calc-index-page .calc-hero { max-width: 1100px; }

/* ─── INPUT TOOLTIPS (M9 polish — friendly explanation per field) ─── */
.calc-form .inputs label {
  position: relative;
}
.info-tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-left: 8px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(20, 12, 38, 0.6);
  color: var(--text-dim);
  font-size: 10px;
  font-weight: 700;
  font-family: inherit;
  cursor: help;
  vertical-align: middle;
  line-height: 1;
  padding: 0;
  transition: color 0.15s, border-color 0.15s;
}
.info-tip:hover, .info-tip:focus-visible {
  color: var(--neon-cyan);
  border-color: var(--neon-cyan);
  outline: none;
}
.info-tip::after {
  content: attr(data-tip);
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: min(280px, 92vw);
  padding: 10px 12px;
  background: var(--bg-card-hover);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  color: var(--text-soft);
  font-size: 12.5px;
  font-weight: 400;
  font-family: "Inter", -apple-system, system-ui, sans-serif;
  letter-spacing: 0;
  line-height: 1.55;
  text-align: left;
  text-transform: none;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s;
  z-index: 100;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
  white-space: normal;
}
.info-tip:hover::after, .info-tip:focus-visible::after {
  opacity: 1;
  visibility: visible;
}
