/* ═════════════════════════════════════════════════════════════════════
   bestpercentagecalculator.net — main stylesheet
   Same design language as urlencodedecode.com / base64decode.tools:
   - Fraunces (serif) for display headlines
   - Geist (sans) for body
   - JetBrains Mono for code/labels/numeric tokens
   - Accent: orange (differentiates from blue/purple of sister sites)
   - Generous whitespace, large type hierarchy, calm palette
   ═════════════════════════════════════════════════════════════════════ */

:root {
  --paper: #faf7f2;            /* warm off-white background */
  --ink: #1a1a1a;              /* near-black for text */
  --ink-soft: #4a4a4a;         /* body text */
  --ink-muted: #6b6b6b;        /* secondary text */
  --line: #e5e0d8;             /* hairline borders */
  --line-soft: #efeae0;        /* even softer dividers */
  --card: #ffffff;             /* card surfaces */
  --accent: #e8722c;           /* warm orange — distinctive */
  --accent-deep: #c25a1a;
  --accent-soft: #fde6d4;
  --success: #16a34a;
  --warn: #d97706;
  --danger: #dc2626;
  --shadow: 0 1px 2px rgba(0,0,0,0.04), 0 8px 24px rgba(0,0,0,0.04);
}

[data-theme="dark"] {
  --paper: #14130f;
  --ink: #f5efe2;
  --ink-soft: #cbc6ba;
  --ink-muted: #9b968b;
  --line: #2c2a25;
  --line-soft: #1f1d19;
  --card: #1c1a16;
  --accent: #f59247;
  --accent-deep: #e8722c;
  --accent-soft: #3a2818;
  --shadow: 0 1px 2px rgba(0,0,0,0.4), 0 8px 24px rgba(0,0,0,0.4);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  transition: background 0.2s, color 0.2s;
}

h1, h2, h3, h4 { font-family: 'Fraunces', Georgia, serif; font-weight: 400; letter-spacing: -0.02em; line-height: 1.15; color: var(--ink); }
h1 { font-size: clamp(40px, 6vw, 64px); }
h2 { font-size: clamp(28px, 4vw, 40px); }
h3 { font-size: clamp(22px, 3vw, 28px); }
h4 { font-size: 18px; font-weight: 500; }
em { font-style: italic; color: var(--accent); }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-deep); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

code, pre, .mono {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 0.92em;
}
code {
  background: var(--accent-soft);
  color: var(--accent-deep);
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.9em;
}
pre {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 18px 22px;
  border-radius: 6px;
  overflow-x: auto;
  margin: 18px 0;
}
pre code { background: none; color: var(--ink); padding: 0; font-size: 13.5px; line-height: 1.6; }

/* ──────── Layout ──────── */
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 28px; }
.section { padding: 80px 0; }
.section-tight { padding: 48px 0; }
.section-header { max-width: 720px; margin: 0 auto 48px; text-align: center; }
.section-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 14px;
  justify-content: center;
}
.section-eyebrow::before, .section-eyebrow::after {
  content: ''; flex: 0 0 40px; height: 1px; background: var(--line);
}
.section-title { margin-bottom: 16px; }

/* ──────── Header ──────── */
header {
  position: sticky; top: 0; z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
nav {
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Fraunces', serif;
  font-size: 24px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.logo:hover { text-decoration: none; }
.logo-mark {
  width: 32px; height: 32px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
}
/* % symbol icon inside the circle */
.logo-mark::before, .logo-mark::after {
  content: '';
  position: absolute;
  background: var(--ink);
  border-radius: 50%;
}
.logo-mark::before {
  width: 5px; height: 5px;
  top: 6px; left: 7px;
}
.logo-mark::after {
  width: 5px; height: 5px;
  bottom: 6px; right: 7px;
}
.logo-slash {
  position: absolute;
  width: 2px; height: 22px;
  background: var(--ink);
  top: 3px; left: 13px;
  transform: rotate(20deg);
  border-radius: 1px;
}
.logo small {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-left: 4px;
}

.nav-links {
  display: flex; align-items: center; gap: 28px;
  list-style: none;
}
.nav-links a {
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 500;
  position: relative;
}
.nav-links a:hover { color: var(--ink); text-decoration: none; }
.nav-links .btn-primary { padding: 8px 18px; }

.theme-toggle {
  width: 38px; height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink);
  font-size: 16px;
  transition: all 0.2s;
}
.theme-toggle:hover { background: var(--line-soft); border-color: var(--ink); }

.currency-picker {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  padding: 8px 26px 8px 12px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' stroke='%23736f64' fill='none' stroke-width='1.5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: border-color 0.15s, background-color 0.15s;
}
.currency-picker:hover { border-color: var(--ink); }
.currency-picker:focus { outline: none; border-color: var(--accent); }
[data-theme="dark"] .currency-picker {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' stroke='%23a59f93' fill='none' stroke-width='1.5'/></svg>");
}
[data-theme="dark"] .currency-picker option {
  background: #1f1e1a;
  color: var(--ink);
}

.mobile-nav-toggle {
  display: none;
  width: 38px; height: 38px;
  border: none;
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  justify-content: center;
}
.mobile-nav-toggle span {
  width: 22px; height: 2px;
  background: var(--ink);
  transition: all 0.2s;
}

/* ──────── Hero ──────── */
.hero {
  padding: 80px 0 40px;
  max-width: 880px;
  margin: 0 auto;
  text-align: left;
}
.hero-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 18px;
}
.hero h1 {
  letter-spacing: -0.03em;
  margin-bottom: 22px;
}
.hero p {
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 680px;
  line-height: 1.6;
}

/* ──────── Buttons ──────── */
.btn {
  font-family: 'Geist', sans-serif;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: 100px;
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s;
  text-decoration: none;
}
.btn-primary {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
  color: white;
  text-decoration: none;
}
.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  border-color: var(--line);
}
.btn-ghost:hover {
  border-color: var(--ink);
  color: var(--ink);
  text-decoration: none;
}
.btn-dark {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.btn-dark:hover {
  background: var(--ink-soft);
  border-color: var(--ink-soft);
  color: var(--paper);
  text-decoration: none;
}

/* ──────── Calc trust badges ──────── */
.trust-row {
  display: flex; gap: 18px; flex-wrap: wrap;
  margin-top: 32px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.trust-row span {
  display: flex; align-items: center; gap: 6px;
}
.trust-row .check { color: var(--success); }

/* ──────── Calculator card (main UI) ──────── */
.calc-shell {
  margin-top: 32px;
}
.calc-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 32px;
  align-items: start;
}
.calc-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 40px;
  box-shadow: var(--shadow);
}
.calc-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line-soft);
}
.calc-title { font-family: 'Fraunces', serif; font-size: 24px; font-weight: 500; }
.calc-mode-tabs {
  display: flex; gap: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 4px;
}
.calc-tab {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 8px 16px;
  border: none;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  border-radius: 100px;
  font-weight: 700;
  transition: all 0.15s;
}
.calc-tab.active {
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
}

/* Calculator modes (4 different layouts on the homepage) */
.calc-mode { display: none; }
.calc-mode.active { display: block; }

.mode-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 14px;
}
.mode-sentence {
  font-family: 'Fraunces', serif;
  font-size: clamp(22px, 3.2vw, 32px);
  line-height: 1.4;
  font-weight: 400;
  color: var(--ink);
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px;
  margin-bottom: 28px;
}
.calc-input {
  font-family: 'JetBrains Mono', monospace;
  font-size: 22px;
  font-weight: 500;
  width: 120px;
  padding: 8px 12px;
  border: 2px solid var(--ink);
  border-radius: 6px;
  background: var(--card);
  color: var(--ink);
  text-align: center;
  -moz-appearance: textfield;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.calc-input::-webkit-outer-spin-button, .calc-input::-webkit-inner-spin-button {
  -webkit-appearance: none; margin: 0;
}
.calc-input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 3px rgba(232, 114, 44, 0.15);
}
.calc-input.is-result {
  border-color: var(--line);
  color: var(--accent);
  font-weight: 600;
}

.calc-actions {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 8px;
}

/* Result panel (right side, always dark for visual consistency) */
.result-panel {
  background: #1a1a1a;
  color: #faf7f2;
  border-radius: 8px;
  padding: 32px 28px;
  position: sticky;
  top: 88px;
}
.result-panel .panel-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #faf7f2;
  margin-bottom: 10px;
  font-weight: 700;
}
.result-value {
  font-family: 'Fraunces', serif;
  font-size: 60px;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1;
  color: #faf7f2;
}
.result-unit {
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  color: rgba(245, 239, 226, 0.85);
  margin-left: 8px;
  font-weight: 500;
}
.result-divider {
  height: 1px; background: rgba(245, 239, 226, 0.2);
  margin: 24px 0;
}
.result-formula {
  font-family: 'JetBrains Mono', monospace;
  font-size: 15px;
  color: #faf7f2;
  margin-bottom: 6px;
  line-height: 1.6;
  font-weight: 500;
}
.result-formula-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #faf7f2;
  margin-bottom: 8px;
  font-weight: 700;
}
.result-actions { display: flex; gap: 8px; margin-top: 24px; }
.btn-on-dark {
  background: transparent;
  color: #faf7f2;
  border: 1px solid rgba(245, 239, 226, 0.25);
}
.btn-on-dark:hover {
  background: rgba(245, 239, 226, 0.1);
  border-color: #faf7f2;
  color: #faf7f2;
}

/* Step-by-step ribbon below calculator */
.steps {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 20px 24px;
  margin-top: 24px;
}
.steps-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 12px;
}
.steps ol {
  list-style: none;
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  padding: 6px 0 6px 32px;
  position: relative;
  color: var(--ink-soft);
  font-size: 14.5px;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: 6px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.steps code {
  background: var(--card);
  padding: 1px 6px;
  font-size: 13px;
}

/* ──────── Tool cards grid ──────── */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  max-width: 1080px;
  margin: 0 auto;
}
.tool-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 28px 26px;
  text-decoration: none;
  color: inherit;
  transition: all 0.15s;
  display: block;
}
.tool-card:hover {
  border-color: var(--ink);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.tool-icon {
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft);
  color: var(--accent-deep);
  border-radius: 6px;
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 18px;
}
.tool-card h4 {
  font-family: 'Fraunces', serif;
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--ink);
}
.tool-card p {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.5;
}

/* ──────── Prose for long-form content ──────── */
.prose {
  max-width: 720px;
  margin: 0 auto;
  color: var(--ink-soft);
}
.prose h2 { color: var(--ink); margin: 48px 0 16px; }
.prose h3 { color: var(--ink); margin: 32px 0 12px; }
.prose p { margin-bottom: 16px; font-size: 16.5px; line-height: 1.7; }
.prose ul, .prose ol { margin: 14px 0 18px 24px; }
.prose li { margin-bottom: 6px; }
.prose table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 14.5px; }
.prose th { background: var(--paper); text-align: left; padding: 10px 14px; border-bottom: 2px solid var(--line); font-weight: 600; font-family: 'JetBrains Mono', monospace; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink); }
.prose td { padding: 10px 14px; border-bottom: 1px solid var(--line-soft); }
.prose hr { border: none; border-top: 1px solid var(--line); margin: 40px 0; }

/* ──────── FAQ accordion ──────── */
.faq-list { max-width: 820px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 26px 0;
  text-align: left;
  font-family: 'Fraunces', serif;
  font-size: 20px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  letter-spacing: -0.01em;
}
.faq-question code { word-break: break-word; }
.faq-icon { width: 22px; height: 22px; flex-shrink: 0; position: relative; transition: transform 0.3s; }
.faq-icon::before, .faq-icon::after {
  content: ''; position: absolute; background: var(--accent);
  top: 50%; left: 50%; transition: transform 0.3s;
}
.faq-icon::before { width: 12px; height: 2px; transform: translate(-50%, -50%); }
.faq-icon::after { width: 2px; height: 12px; transform: translate(-50%, -50%); }
.faq-item.open .faq-icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s, padding 0.3s;
}
.faq-item.open .faq-answer { max-height: 800px; padding: 0 0 26px; }
.faq-answer p { color: var(--ink-soft); font-size: 15.5px; line-height: 1.65; }

/* ──────── Author byline ──────── */
.author-box {
  display: flex; gap: 20px; align-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 24px 28px;
  max-width: 720px; margin: 32px auto;
}
.author-avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-family: 'Fraunces', serif;
  font-size: 24px;
  font-weight: 500;
  color: var(--accent-deep);
}
.author-info-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-muted);
  margin-bottom: 4px;
}
.author-info-name {
  font-family: 'Fraunces', serif;
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
}
.author-info-credentials {
  font-size: 13.5px;
  color: var(--ink-soft);
  margin-top: 2px;
}

/* ──────── Embed widget box ──────── */
.embed-box {
  background: var(--ink);
  color: var(--paper);
  border-radius: 6px;
  padding: 24px 26px;
  max-width: 720px;
  margin: 32px auto;
}
.embed-box-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(245, 239, 226, 0.6);
  margin-bottom: 12px;
}
.embed-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  background: rgba(245, 239, 226, 0.08);
  padding: 14px 16px;
  border-radius: 4px;
  word-break: break-all;
  color: var(--paper);
  margin-bottom: 12px;
  line-height: 1.5;
}

/* ──────── Breadcrumb ──────── */
.breadcrumb {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  margin-bottom: 18px;
  display: flex; gap: 8px; align-items: center;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--ink-muted); }
.breadcrumb a:hover { color: var(--accent); text-decoration: none; }
.breadcrumb span { color: var(--ink-muted); }

/* ──────── Footer ──────── */
footer {
  background: var(--paper);
  border-top: 1px solid var(--line);
  padding: 56px 0 32px;
  margin-top: 80px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px 32px;
}
.footer-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 12px;
  text-decoration: none;
}
.footer-logo small {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-left: 4px;
  text-transform: uppercase;
  font-weight: 700;
}
.footer-tagline {
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.6;
}
.footer-col h4 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink);
  margin-bottom: 14px;
  font-weight: 600;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: var(--ink-soft); font-size: 14px; }
.footer-col a:hover { color: var(--accent); text-decoration: none; }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 24px 28px 0;
  max-width: 1180px;
  margin: 0 auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  display: flex; justify-content: space-between; gap: 16px;
  flex-wrap: wrap;
}

/* ──────── Mobile drawer ──────── */
.mobile-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 280px;
  background: var(--paper);
  border-left: 1px solid var(--line);
  padding: 80px 28px 28px;
  transform: translateX(100%);
  transition: transform 0.3s;
  z-index: 99;
  overflow-y: auto;
}
.mobile-drawer.open { transform: translateX(0); box-shadow: var(--shadow); }
.mobile-drawer ul { list-style: none; }
.mobile-drawer li { margin-bottom: 18px; }
.mobile-drawer a {
  color: var(--ink);
  font-size: 18px;
  font-family: 'Fraunces', serif;
  font-weight: 500;
}

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: var(--paper);
  padding: 12px 24px; border-radius: 100px;
  font-size: 14px;
  z-index: 1000;
  opacity: 0; transition: opacity 0.2s;
  pointer-events: none;
}
.toast.show { opacity: 1; }

/* ──────── Currency notice (above money calculators) ──────── */
.currency-notice {
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 24px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
}
.currency-notice-icon {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 13px;
}
.currency-notice strong { color: var(--ink); }
[data-theme="dark"] .currency-notice {
  background: rgba(232, 114, 44, 0.12);
}

/* ──────── Adsterra banner ──────── */
.ad-banner {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 0;
}
.ad-banner-inner {
  display: flex;
  justify-content: center;
  align-items: center;
}
.ad-banner-inner.desktop { display: flex; }
.ad-banner-inner.mobile { display: none; }
@media (max-width: 767px) {
  .ad-banner-inner.desktop { display: none; }
  .ad-banner-inner.mobile { display: flex; }
}
/* Auto-hide the banner wrap when neither slot has loaded content */
.ad-banner:has(.ad-banner-inner.desktop:empty):has(.ad-banner-inner.mobile:empty) {
  display: none;
}

/* ──────── Mobile ──────── */
@media (max-width: 1024px) {
  .calc-grid { grid-template-columns: 1fr 280px; gap: 24px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
}
@media (max-width: 820px) {
  .calc-grid { grid-template-columns: 1fr; }
  .result-panel { position: static; }
  .calc-card { padding: 28px 22px; }
  .mode-sentence { font-size: 22px; gap: 8px; }
  .calc-input { font-size: 19px; width: 90px; }
  .result-value { font-size: 44px; }
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .mobile-nav-toggle { display: flex; }
  .logo { font-size: 20px; gap: 8px; }
  .logo-mark { width: 28px; height: 28px; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .section { padding: 56px 0; }
  .hero { padding: 56px 0 32px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
