:root {
  --bg:           #0d1117;
  --surface:      #161b22;
  --card:         #1f2937;
  --border:       #2d333b;
  --border-soft:  rgba(45, 51, 59, 0.5);
  --accent:       #3b82f6;
  --accent-hover: #2563eb;
  --accent-dim:   rgba(59, 130, 246, 0.1);
  --accent-glow:  rgba(59, 130, 246, 0.06);
  --text:         #e6edf3;
  --text-body:    #cdd5df;
  --text-muted:   #8b949e;
  --text-subtle:  #545d68;

  --mono: ui-monospace, 'Courier New', monospace;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  --radius:    8px;
  --radius-lg: 14px;
  --shadow:    0 1px 3px rgba(0, 0, 0, 0.6), 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);

  --max-w: 1040px;
  --section-gap: 3.5rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-body);
  background: var(--bg);
  min-height: 100vh;
}

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

h1, h2, h3 {
  font-family: var(--sans);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
}

h1 { font-size: clamp(1.75rem, 4.5vw, 2.75rem); letter-spacing: -0.025em; }
h2 { font-size: clamp(1.3rem, 3vw, 1.85rem); letter-spacing: -0.015em; margin-bottom: 1rem; }
h3 { font-size: 1.0625rem; font-weight: 600; }

p {
  margin-bottom: 1rem;
  color: var(--text-body);
}
p:last-child { margin-bottom: 0; }

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

strong { color: var(--text); font-weight: 600; }
em { font-style: italic; }

ul { list-style: none; }

.container {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: 1rem;
}
@media (min-width: 640px)  { .container { padding-inline: 1.5rem; } }
@media (min-width: 1080px) { .container { padding-inline: 2rem;   } }


.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 17, 23, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}
.logo-text {
  font-size: 1.0625rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}
.logo-text span { color: var(--accent); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}
.burger-bar {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-muted);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
.nav-toggle[aria-expanded="true"] .burger-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .burger-bar:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .burger-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 0.125rem;
}
.nav-list a {
  display: block;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: var(--radius);
  transition: color 0.15s, background 0.15s;
}
.nav-list a:hover {
  color: var(--text);
  background: var(--card);
  text-decoration: none;
}

@media (max-width: 600px) {
  .nav-toggle { display: flex; }

  #nav-menu {
    display: none;
    position: absolute;
    top: 58px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    z-index: 99;
    padding: 0.5rem 1rem 0.75rem;
  }
  #nav-menu.is-open { display: block; }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .nav-list a {
    padding: 0.75rem 0.75rem;
    font-size: 1rem;
    border-radius: var(--radius);
  }
}


.hero {
  padding-block: 4rem 3rem;
  background: none;
  text-align: center;
}

.hero h1 { margin-bottom: 0.75rem; }

.lede {
  font-size: 1.0625rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  max-width: 64ch;
  margin-inline: auto;
}

@media (max-width: 640px) {
  .hero { padding-block: 2.5rem 2rem; }
}


.calculator {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 680px;
  margin-inline: auto;
  margin-bottom: 2rem;
  text-align: left;
}

.calc-labels-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.calc-inputs-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
}

.calc-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
}

.calc-input-wrap,
.calc-output-wrap {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 1.25rem;
  height: 58px;
}
.calc-input-wrap { transition: border-color 0.15s; }
.calc-input-wrap:focus-within { border-color: var(--accent); }

.calc-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 3px;
}
.calc-icon.flag-icon {
  width: auto;
  height: 16px;
  border-radius: 2px;
}

.calc-input-wrap input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  font-family: var(--sans);
  font-weight: 600;
  outline: none;
  min-width: 0;
  width: 100%;
  -moz-appearance: textfield;
}
.calc-input-wrap input::-webkit-outer-spin-button,
.calc-input-wrap input::-webkit-inner-spin-button { -webkit-appearance: none; }
.calc-input-wrap input::placeholder { color: var(--text-subtle); }

output#output-result {
  flex: 1;
  font-size: 1.5rem;
  font-family: var(--sans);
  font-weight: 700;
  color: var(--accent);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calc-sep {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  user-select: none;
}
.calc-sep:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-dim);
}

.calc-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.125rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-soft);
}

.devex-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
}
.devex-toggle input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-track {
  position: relative;
  width: 36px;
  height: 20px;
  background: var(--border);
  border-radius: 10px;
  flex-shrink: 0;
  transition: background 0.2s;
}
.toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  background: var(--text-subtle);
  border-radius: 50%;
  transition: transform 0.2s, background 0.2s;
}
.devex-toggle input:checked + .toggle-track { background: var(--accent); }
.devex-toggle input:checked + .toggle-track .toggle-thumb {
  transform: translateX(16px);
  background: #fff;
}

.toggle-text {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.rate-tag {
  font-size: 0.8125rem;
  color: var(--text-subtle);
}

@media (max-width: 500px) {
  .calc-labels-row { grid-template-columns: 1fr; }
  .calc-labels-row span:last-child { display: none; }
  .calc-inputs-row { grid-template-columns: 1fr; }
  .calc-sep { justify-self: center; width: 36px; height: 36px; }
}


.quick-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  max-width: 500px;
  margin-inline: auto;
}

.quick-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.875rem 0.875rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
}

.quick-robux {
  font-family: var(--sans);
  font-size: 0.875rem;
  color: var(--text-muted);
}
.quick-eq {
  font-size: 0.6875rem;
  color: var(--text-subtle);
  line-height: 1.2;
}
.quick-cad {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
}

@media (max-width: 420px) {
  .quick-strip { grid-template-columns: 1fr; }
}


.section-rates,
.section-devex,
.section-buy,
.section-giftcards,
.section-faq {
  padding-block: var(--section-gap);
  border-top: 1px solid var(--border);
}

.section-devex {
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.03) 0%, transparent 50%);
}

@media (max-width: 640px) {
  :root { --section-gap: 2.5rem; }
}


.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-block: 1.5rem 0.75rem;
}

.rate-table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}

.rate-table caption {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

.rate-table th {
  background: var(--card);
  padding: 0.6875rem 1.25rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.rate-table td {
  padding: 0.75rem 1.25rem;
  font-family: var(--sans);
  font-size: 0.9375rem;
  color: var(--text-body);
  border-bottom: 1px solid var(--border-soft);
}
.rate-table tbody tr:last-child td { border-bottom: none; }

.rate-table td:first-child {
  font-weight: 600;
  color: var(--text-muted);
}
.rate-table td:nth-child(2) { color: var(--text); }
.rate-table td:nth-child(3) { color: var(--accent); }

.rate-table tr.row-highlight td {
  background: rgba(34, 197, 94, 0.04);
}

.table-note {
  font-size: 0.8125rem;
  color: var(--text-subtle);
  font-style: italic;
  margin-top: 0.5rem;
}


.section-devex h3 {
  color: var(--text);
  font-size: 1.0625rem;
  margin-top: 1.875rem;
  margin-bottom: 0.5rem;
}

.section-devex h3:first-of-type { margin-top: 1.25rem; }

.devex-example {
  list-style: none;
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem 1.25rem;
  margin-block: 1rem;
  font-family: var(--sans);
  font-size: 0.9375rem;
}

.devex-example li {
  padding: 0.3125rem 0;
  color: var(--text-body);
  border-bottom: 1px solid var(--border-soft);
  line-height: 1.6;
}
.devex-example li:last-child {
  border-bottom: none;
  padding-top: 0.625rem;
  color: var(--accent);
  font-weight: 600;
}


.buy-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.875rem;
  margin-block: 1.5rem;
}

@media (min-width: 580px) {
  .buy-grid { grid-template-columns: repeat(4, 1fr); }
}

.buy-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.125rem 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  transition: border-color 0.15s;
}
.buy-card:hover { border-color: var(--accent); }

.buy-cad {
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text);
}
.buy-label {
  font-size: 0.6875rem;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.buy-robux {
  font-family: var(--sans);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--accent);
}


.giftcard-row {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 3rem;
  align-items: center;
}

@media (max-width: 820px) {
  .giftcard-row {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
}

.gift-card-img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 420px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  object-fit: cover;
  box-shadow: var(--shadow-lg);
}

.giftcard-content h2 {
  margin-bottom: 0.875rem;
}

.retailer-list {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}
.retailer-list li {
  padding-block: 0.2rem;
  color: var(--text-body);
}


.faq-list {
  margin-top: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.faq-item {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.faq-item:last-child { border-bottom: none; }

.faq-q {
  padding: 1.125rem 1.5rem 0.25rem;
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 0;
  line-height: 1.4;
}

.faq-a {
  padding: 0.375rem 1.5rem 1.125rem;
}
.faq-a p {
  font-size: 0.9375rem;
  margin-bottom: 0.625rem;
}
.faq-a p:last-child { margin-bottom: 0; }


.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding-block: 2.5rem 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-logo {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.footer-logo:hover {
  color: var(--accent);
}

.footer-tagline {
  font-size: 0.8125rem;
  color: var(--text-subtle);
  line-height: 1.6;
  margin: 0;
}

.footer-col-heading {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin: 0 0 0.75rem;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-col ul a {
  font-size: 0.875rem;
  color: var(--text-subtle);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-col ul a:hover {
  color: var(--text);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  padding-top: 1.25rem;
  font-size: 0.75rem;
  color: var(--text-subtle);
}

.footer-sep {
  color: var(--text-subtle);
  padding-inline: 0.25rem;
  user-select: none;
}

@media (max-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
}


.about-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-block: 1.75rem;
}

@media (max-width: 640px) {
  .about-cards { grid-template-columns: 1fr; }
}

.about-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 1.25rem 1.125rem;
}

.about-card h3 {
  font-size: 0.9375rem;
  color: var(--text);
  margin-bottom: 0.375rem;
}

.about-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0;
  line-height: 1.65;
}


.contact-topics {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-block: 1.5rem;
}

.topic-item {
  padding: 1.125rem 1.375rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.topic-item:last-child { border-bottom: none; }

.topic-item h3 {
  font-size: 0.9375rem;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.topic-item p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

.cannot-list {
  list-style: disc;
  padding-left: 1.375rem;
  margin-top: 0.5rem;
}

.cannot-list li {
  font-size: 0.875rem;
  color: var(--text-muted);
  padding-block: 0.15rem;
}


.page-hero {
  padding-block: 3.5rem 2.5rem;
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.page-hero h1 { margin-bottom: 0.5rem; }

.page-hero .lede {
  font-size: 0.9375rem;
  margin-bottom: 0;
}

.page-content {
  padding-block: 3rem;
}

.prose {
  max-width: 720px;
}

.prose h2 {
  margin-top: 2.25rem;
  margin-bottom: 0.75rem;
  padding-top: 2.25rem;
  border-top: 1px solid var(--border);
}

.prose h2:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.prose-list {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.prose-list li {
  padding-block: 0.2rem;
  color: var(--text-body);
}
