/* Robux calculators (/robux-to-usd/, /usd-to-robux/, /robux-tax-calculator/, /es/ and /pt/
   robux-to-usd). One file, system fonts, light by default, dark from <html data-theme="dark">.
   The same tokens, header and footer as the GTA 6 countdown and the FiveM pages; the answer
   boxes are the only place with the Roblox green. */

:root {
    color-scheme: light;
    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    --accent: #0a7a3d; --accent-ink: #ffffff; --bg: #f2f4f7; --card: #ffffff; --field: #f7f8fa;
    --text: #1b1f24; --text-2: #3d434c; --muted: #57606a; --border: #dde1e6; --border-2: #b9c0c8;
    --tld: #c62a3c; --focus: #2563eb; --radius: 12px; --shadow: 0 1px 3px rgba(16, 24, 40, .1);
    --ans: #eef8f1; --ans-border: #b8e0c6; --ans-ink: #07602f; --err: #b42318;
    --wrap: 1040px;
}
:root[data-theme="dark"] {
    color-scheme: dark;
    --accent: #3ccf7c; --accent-ink: #06210f; --bg: #0f1113; --card: #181a1e; --field: #121417;
    --text: #eceef1; --text-2: #c3c7cf; --muted: #a3a8b2; --border: #2c3036; --border-2: #4a5059;
    --tld: #ff5c6c; --focus: #8ab4ff; --shadow: 0 0 0 1px #24272c;
    --ans: #11261a; --ans-border: #24553a; --ans-ink: #7ee2a8; --err: #ff8a80;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3, p, dl, dd, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; top: -200px; inset-inline-start: 8px; z-index: 100; padding: 10px 14px; border-radius: 8px; background: var(--card); color: var(--text); }
.skip-link:focus { top: 8px; }
.ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- header ---------- */
.site-head { position: relative; z-index: 40; background: var(--card); border-bottom: 1px solid var(--border); }
.head-row { display: flex; align-items: center; gap: 20px; max-width: var(--wrap); height: 56px; margin: 0 auto; padding: 0 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-size: 17px; font-weight: 700; letter-spacing: -.01em; text-decoration: none; white-space: nowrap; }
.brand-mark { display: block; width: 28px; height: 28px; }
.tld { color: var(--tld); }
.head-nav { display: flex; gap: 20px; margin-inline-start: auto; }
.head-nav a { padding-block: 17px; border-bottom: 2px solid transparent; color: var(--text-2); font-size: 14px; text-decoration: none; white-space: nowrap; }
.head-nav a:hover { color: var(--text); }
.head-nav a[aria-current="page"] { color: var(--text); font-weight: 600; border-bottom-color: var(--accent); }
.head-tools { display: flex; align-items: center; gap: 8px; }
.icon-btn { display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; padding: 0; border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--text-2); cursor: pointer; }
.icon-btn:hover { color: var(--text); border-color: var(--border-2); }
.theme-toggle .ico-sun, :root[data-theme="dark"] .theme-toggle .ico-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .ico-sun { display: block; }
.lang { position: relative; }
.lang summary { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding-inline: 10px; border: 1px solid var(--border); border-radius: 8px; color: var(--text-2); font-size: 12.5px; font-weight: 600; list-style: none; cursor: pointer; }
.lang summary::-webkit-details-marker { display: none; }
.lang ul { position: absolute; z-index: 50; inset-inline-end: 0; top: calc(100% + 6px); min-width: 180px; padding: 6px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); box-shadow: 0 18px 48px -12px rgba(16, 24, 40, .28); }
.lang a { display: block; padding: 8px 10px; border-radius: 6px; font-size: 13.5px; text-decoration: none; }
.lang a:hover { background: var(--field); }
.lang a[aria-current="true"] { font-weight: 650; }

/* ---------- page ---------- */
.main { max-width: var(--wrap); margin: 0 auto; padding: 0 16px 40px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 6px; color: var(--muted); font-size: 13px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); text-decoration: underline; }
h1 { font-size: 1.9rem; font-weight: 750; line-height: 1.15; letter-spacing: -.02em; }
.lede { max-width: 70ch; margin-top: 8px; color: var(--text-2); font-size: 16px; line-height: 1.6; }
.card { padding: 22px 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }

/* the three calculators link each other (English pages) or switch in place (es, pt) */
.calc-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.calc-tabs a, .calc-tabs button { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); color: var(--text-2); font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; }
.calc-tabs a:hover, .calc-tabs button:hover { border-color: var(--border-2); color: var(--text); }
.calc-tabs a[aria-current="page"], .calc-tabs button[aria-selected="true"] { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.js .tab-panel:not(.on) { display: none; }

/* ---------- calculator ---------- */
.calc { margin-top: 16px; }
.calc h2 { font-size: 1.15rem; font-weight: 700; }
.fields { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; }
.field { display: grid; gap: 6px; min-width: 0; flex: 0 1 320px; }
.field label { font-size: 13.5px; font-weight: 650; color: var(--text-2); }
.field input, .field select { width: 100%; height: 48px; padding: 0 14px; border: 1px solid var(--border-2); border-radius: 10px; background: var(--field); font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.field select { font-size: 15px; font-weight: 500; }
.field input:focus { border-color: var(--focus); }
.field input[aria-invalid="true"] { border-color: var(--err); }
.field .help { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.calc-err { min-height: 18px; color: var(--err); font-size: 13px; line-height: 18px; }
.check { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; margin-top: 2px; font-size: 14px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); }
.calc-out { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.calc-out.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.calc-out.one { grid-template-columns: minmax(0, 1fr); }
.ans { min-width: 0; padding: 14px 16px; border: 1px solid var(--ans-border); border-radius: 10px; background: var(--ans); }
.ans-k { color: var(--text-2); font-size: 13.5px; font-weight: 600; }
.ans-v { margin-top: 2px; color: var(--ans-ink); font-size: 30px; font-weight: 750; line-height: 1.15; letter-spacing: -.01em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ans-v small { font-size: 17px; font-weight: 650; }
.ans-s { margin-top: 4px; color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.ans-v .ans-l { color: var(--text-2); font-size: 16px; font-weight: 650; white-space: nowrap; }
.calc-note { margin-top: 12px; color: var(--muted); font-size: 13.5px; line-height: 1.5; }

/* ---------- ads: space reserved up front, labelled ---------- */
.ad { min-width: 0; margin: 32px auto 0; text-align: center; }
.ad-label { margin-bottom: 6px; color: var(--muted); font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.ad-infeed { min-height: 270px; }
.ad-infeed ins { min-height: 250px; }
.ad-bottom { max-width: 728px; min-height: 110px; }
.ad-bottom ins { min-height: 90px; }
.ad:has(ins[data-ad-status="unfilled"]) .ad-label { visibility: hidden; }

/* ---------- tables and text ---------- */
.sec { margin-top: 32px; }
.sec h2 { font-size: 1.35rem; font-weight: 700; line-height: 1.25; letter-spacing: -.01em; }
.sec > p { max-width: 72ch; margin-top: 8px; color: var(--text-2); line-height: 1.6; }
.sec > p a, .facts a, .faq a { color: var(--text); text-underline-offset: 3px; }
.table-wrap { margin-top: 12px; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.tbl th, .tbl td { padding: 10px 14px; border-bottom: 1px solid var(--border); text-align: end; white-space: nowrap; }
.tbl th:first-child, .tbl td:first-child { text-align: start; font-weight: 650; }
.tbl thead th { color: var(--muted); font-size: 12.5px; font-weight: 650; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.facts { display: grid; margin-top: 12px; border-top: 1px solid var(--border); }
.facts > div { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.facts dt { color: var(--muted); font-size: 14px; font-weight: 600; }
.facts dd { font-size: 15px; line-height: 1.55; }
.src { margin-top: 10px; color: var(--muted); font-size: 13px; }
.src a { color: var(--text-2); text-underline-offset: 3px; }
.main > .spacenode-promo-card { margin: 32px 0 0; }
.faq details { border-bottom: 1px solid var(--border); }
.faq details:first-of-type { margin-top: 12px; border-top: 1px solid var(--border); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; list-style: none; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; color: var(--muted); font-size: 20px; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary h3 { font-size: 16px; font-weight: 600; line-height: 1.4; }
.faq details p { max-width: 70ch; padding-bottom: 14px; color: var(--text-2); line-height: 1.65; }

/* "More live counters", rendered by the server into the page */
.creator-spotlight { margin-top: 32px; }
.creator-spotlight h2 { font-size: 1.35rem; font-weight: 700; line-height: 1.25; letter-spacing: -.01em; }
.creator-spotlight h3 { margin: 20px 0 0; font-size: 15px; font-weight: 650; }
.creator-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.creator-links a { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); color: var(--text); font-size: 13.5px; text-decoration: none; }
.creator-links a:hover { border-color: var(--border-2); }
.creator-spotlight, .faq, .site-footer { content-visibility: auto; contain-intrinsic-size: auto 500px; }

/* ---------- footer ---------- */
.site-footer { margin-top: 40px; padding: 24px 16px 32px; border-top: 1px solid var(--border); background: var(--card); }
.site-footer nav { max-width: var(--wrap); margin: 0 auto; }
.site-footer span { display: block; margin-bottom: 8px; font-size: 13.5px; font-weight: 650; }
.site-footer ul { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.site-footer a { display: inline-block; padding-block: 10px; color: var(--text-2); font-size: 13.5px; text-decoration: none; }
.site-footer a:hover { color: var(--text); text-decoration: underline; }
.site-footer p { max-width: var(--wrap); margin: 12px auto 0; color: var(--muted); font-size: 12.5px; }

@media (max-width: 719.98px) {
    .head-row { height: 52px; gap: 10px; }
    .head-nav { display: none; }
    .head-tools { margin-inline-start: auto; }
    h1 { font-size: 1.55rem; }
    .lede { font-size: 15px; }
    .card { padding: 16px; }
    .calc-tabs { gap: 6px; margin-top: 12px; }
    .calc-tabs a, .calc-tabs button { min-height: 40px; padding: 0 10px; font-size: 13px; }
    .calc-out, .calc-out.three { grid-template-columns: minmax(0, 1fr); gap: 8px; }
    .calc-out.pair, .calc-out.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .calc-out.three .ans:last-child { grid-column: 1 / -1; }
    .fields { gap: 10px 12px; }
    .field { flex: 1 1 100%; }
    .field input, .field select { height: 44px; }
    .ans { padding: 10px 12px; }
    .ans-v { font-size: 24px; }
    .calc-out.pair .ans-v { font-size: 22px; }
    .facts > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
    .tbl th, .tbl td { padding: 9px 10px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
    .ans { border: 1px solid CanvasText; }
}
