.ram-calc-page {
  padding-top: 8.5rem;
  padding-bottom: 2rem;
  min-height: 75vh;
}

.ram-calc-hero {
  text-align: center;
  margin-bottom: 1.75rem;
}

.ram-calc-hero h1 {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  margin-bottom: 0.4rem;
  font-size: clamp(1.6rem, 4vw, 2.1rem);
}

.ram-calc-hero p {
  color: #64748b;
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.5;
  font-size: 0.95rem;
}

/* —— SaaS app shell —— */
.ram-calc-app {
  max-width: 960px;
  margin: 0 auto 2.5rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 12px 40px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  transition: box-shadow 0.3s ease;
}

.ram-calc-app:focus-within {
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 16px 48px rgba(74, 163, 223, 0.12);
}

.ram-calc-app-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 420px;
}

.ram-calc-panel {
  padding: 1.5rem 1.6rem;
}

.ram-calc-panel--inputs {
  background: #f8fafc;
  border-right: 1px solid #e2e8f0;
}

.ram-calc-panel--output {
  background: linear-gradient(165deg, #0f172a 0%, #1e293b 55%, #0f2744 100%);
  color: #f1f5f9;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  position: relative;
}

.ram-calc-panel--output::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 70% 20%, rgba(74, 163, 223, 0.25), transparent 60%);
  pointer-events: none;
}

.ram-calc-panel-title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  margin: 0 0 1.25rem;
}

.ram-calc-panel--inputs .ram-calc-panel-title {
  color: #64748b;
}

/* Inputs */
.ram-calc-control {
  margin-bottom: 1.35rem;
}

.ram-calc-control:last-child {
  margin-bottom: 0;
}

.ram-calc-control-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin-bottom: 0.5rem;
}

.ram-calc-player-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.ram-calc-player-pills .form-select {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.ram-calc-player-btn {
  flex: 1 1 auto;
  min-width: calc(33% - 0.35rem);
  padding: 0.5rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #475569;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.ram-calc-player-btn:hover {
  border-color: #4aa3df;
  color: #1e40af;
}

.ram-calc-player-btn.is-active {
  background: #4aa3df;
  border-color: #4aa3df;
  color: #fff;
  box-shadow: 0 4px 12px rgba(74, 163, 223, 0.35);
}

.ram-calc-modpack-cards {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.ram-calc-modpack-card {
  display: block;
  cursor: pointer;
  margin: 0;
}

.ram-calc-modpack-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.ram-calc-modpack-card-inner {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.7rem 0.85rem;
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.ram-calc-modpack-card input:checked + .ram-calc-modpack-card-inner {
  border-color: #4aa3df;
  background: #f0f9ff;
  box-shadow: 0 0 0 3px rgba(74, 163, 223, 0.15);
}

.ram-calc-modpack-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.85rem;
  color: #64748b;
}

.ram-calc-modpack-card input:checked + .ram-calc-modpack-card-inner .ram-calc-modpack-icon {
  background: #4aa3df;
  color: #fff;
}

.ram-calc-modpack-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.3;
}

.ram-calc-modpack-desc {
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 0.1rem;
  line-height: 1.35;
}

.ram-calc-terrain-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}

.ram-calc-terrain-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
  margin: 0;
  line-height: 1.35;
}

.ram-calc-terrain-hint {
  font-size: 0.7rem;
  color: #94a3b8;
  font-weight: 500;
  display: block;
  margin-top: 0.12rem;
}

.ram-calc-switch {
  position: relative;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}

.ram-calc-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.ram-calc-switch-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #cbd5e1;
  border-radius: 26px;
  transition: background 0.25s ease;
}

.ram-calc-switch-slider::before {
  content: "";
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.25s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.ram-calc-switch input:checked + .ram-calc-switch-slider {
  background: #4aa3df;
}

.ram-calc-switch input:checked + .ram-calc-switch-slider::before {
  transform: translateX(22px);
}

/* Output panel */
.ram-calc-output-inner {
  position: relative;
  z-index: 1;
  text-align: center;
}

.ram-calc-output-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #94a3b8;
  margin-bottom: 0.35rem;
}

.ram-calc-big-ram {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.15rem;
  margin-bottom: 0.5rem;
  line-height: 1;
}

.ram-calc-big-ram-value {
  font-family: "Montserrat", sans-serif;
  font-size: clamp(3.5rem, 10vw, 4.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(180deg, #fff 0%, #93c5fd 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.ram-calc-big-ram-unit {
  font-size: 1.35rem;
  font-weight: 700;
  color: #64748b;
  align-self: flex-end;
  margin-bottom: 0.5rem;
}

.ram-calc-tier-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.ram-calc-tier-pill {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #64748b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
}

.ram-calc-tier-pill.is-active {
  background: #4aa3df;
  color: #fff;
  border-color: #4aa3df;
  box-shadow: 0 0 16px rgba(74, 163, 223, 0.45);
}

.ram-calc-factors {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
}

.ram-calc-factor {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  padding: 0.3rem 0.55rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}

.ram-calc-factor-label {
  color: #94a3b8;
}

.ram-calc-factor-gb {
  font-weight: 700;
  color: #7dd3fc;
}

.ram-calc-summary {
  font-size: 0.82rem;
  color: #94a3b8;
  line-height: 1.45;
  margin: 0 auto 0.85rem;
  max-width: 280px;
}

.ram-calc-terrain-note {
  font-size: 0.72rem;
  color: #64748b;
  margin: 0 0 0.75rem;
  line-height: 1.4;
}

.ram-calc-cta {
  display: block;
  width: 100%;
  text-align: center;
  background: linear-gradient(135deg, #4aa3df 0%, #2563eb 100%);
  color: #fff !important;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 0.8rem 1.25rem;
  border-radius: 12px;
  text-decoration: none;
  border: none;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ram-calc-cta:hover {
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.5);
}

/* Hosting comparison */
.ram-calc-host-compare {
  max-width: 960px;
  margin: 0 auto 2rem;
}

.ram-calc-host-compare-title {
  font-family: "Montserrat", sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: #0f172a;
  text-align: center;
  margin: 0 0 0.35rem;
}

.ram-calc-host-compare-sub {
  text-align: center;
  font-size: 0.9rem;
  color: #64748b;
  margin: 0 auto 1.25rem;
  max-width: 480px;
}

.ram-calc-host-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.ram-calc-host-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 1.25rem 1.3rem 1.35rem;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.ram-calc-host-card:hover {
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
}

.ram-calc-host-card--apex:hover {
  border-color: #fbbf24;
}

.ram-calc-host-card--vyper:hover {
  border-color: #4aa3df;
}

.ram-calc-host-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.ram-calc-host-name {
  font-family: "Montserrat", sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.ram-calc-host-chip {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  flex-shrink: 0;
}

.ram-calc-host-chip--vyper {
  background: #e0f2fe;
  color: #0369a1;
}

.ram-calc-host-lead {
  font-size: 0.88rem;
  color: #64748b;
  margin: 0 0 0.85rem;
  line-height: 1.45;
}

.ram-calc-host-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.15rem;
  flex: 1;
}

.ram-calc-host-list li {
  position: relative;
  padding-left: 1.15rem;
  font-size: 0.86rem;
  color: #334155;
  line-height: 1.45;
  margin-bottom: 0.45rem;
}

.ram-calc-host-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #94a3b8;
}

.ram-calc-host-card--apex .ram-calc-host-list li::before {
  background: #f59e0b;
}

.ram-calc-host-card--vyper .ram-calc-host-list li::before {
  background: #4aa3df;
}

.ram-calc-host-btn {
  display: block;
  width: 100%;
  text-align: center;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ram-calc-host-btn:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.ram-calc-host-btn--apex {
  color: #78350f !important;
  background: #fff;
  border: 2px solid #f59e0b;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.2);
}

.ram-calc-host-btn--apex:hover {
  color: #78350f !important;
  background: #fffbeb;
}

.ram-calc-host-btn--vyper {
  color: #fff !important;
  background: linear-gradient(135deg, #4aa3df 0%, #2563eb 100%);
  border: none;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
}

.ram-calc-host-btn--vyper:hover {
  color: #fff !important;
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.45);
}

.ram-calc-host-footnote {
  text-align: center;
  font-size: 0.85rem;
  color: #64748b;
  margin: 1rem 0 0;
}

.ram-calc-host-footnote a {
  color: #4aa3df;
  font-weight: 600;
  text-decoration: none;
}

.ram-calc-host-footnote a:hover {
  text-decoration: underline;
}

.ram-calc-tips {
  max-width: 820px;
  margin: 0 auto 2rem;
}

.ram-calc-tips-heading {
  font-family: "Montserrat", sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.4rem;
  text-align: center;
}

.ram-calc-tips-intro {
  text-align: center;
  font-size: 0.92rem;
  color: #64748b;
  margin: 0 auto 1.5rem;
  max-width: 520px;
  line-height: 1.5;
}

.ram-calc-tips h3 {
  font-family: "Montserrat", sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: #111827;
  margin: 1.25rem 0 0.5rem;
}

.ram-calc-tips p {
  color: #4b5563;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.ram-calc-section-divider {
  border: 0;
  border-top: 1px solid #e5e7eb;
  margin: 2.5rem auto;
  max-width: 960px;
}

.ram-calc-seo-appendix {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1rem 1.5rem;
  color: #4b5563;
  line-height: 1.65;
}

.ram-calc-seo-appendix h2 {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  color: #111827;
  margin-bottom: 1rem;
}

.ram-calc-seo-appendix h3 {
  font-family: "Montserrat", sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.5rem;
}

.ram-calc-seo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.ram-calc-seo-card {
  background: #f9fafb;
  border: 1px solid #f3f4f6;
  border-radius: 12px;
  padding: 1.1rem 1.15rem;
}

.ram-calc-seo-card p {
  font-size: 0.9rem;
  margin: 0;
}

.ram-calc-seo-faq {
  border-top: 1px solid #f3f4f6;
  padding-top: 1rem;
  margin-top: 1rem;
}

.ram-calc-seo-faq-item + .ram-calc-seo-faq-item {
  margin-top: 1.25rem;
}

.ram-calc-seo-faq-item h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.ram-calc-seo-faq-item p {
  font-size: 0.9rem;
  margin: 0;
}

.ram-calc-seo-callout {
  margin-top: 1.5rem;
  background: #eff6ff;
  border-left: 4px solid #3b82f6;
  border-radius: 0 12px 12px 0;
  padding: 1rem 1.1rem;
}

.ram-calc-seo-callout p {
  margin: 0;
  font-size: 0.9rem;
  color: #1e40af;
  font-weight: 500;
}

.ram-calc-seo-callout a {
  color: #1d4ed8;
  text-decoration: underline;
}

.ram-calc-internal-links {
  text-align: center;
  font-size: 0.9rem;
  color: #6b7280;
  padding: 1.5rem 1rem 2rem;
  margin: 0;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
}

.ram-calc-internal-links a {
  color: #4aa3df;
  font-weight: 600;
  text-decoration: none;
}

.ram-calc-internal-links a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .ram-calc-app-grid {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .ram-calc-panel--inputs {
    border-right: none;
    border-bottom: 1px solid #e2e8f0;
  }

  .ram-calc-panel--output {
    padding: 1.75rem 1.25rem;
  }

  .ram-calc-player-btn {
    min-width: calc(50% - 0.25rem);
  }

  .ram-calc-seo-grid {
    grid-template-columns: 1fr;
  }

  .ram-calc-terrain-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .ram-calc-host-grid {
    grid-template-columns: 1fr;
  }
}
