:root {
  --bg: #fafbfc;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --gold: #b8860b;
  --gold-dark: #8a6509;
  --accent: #0f172a;
  --success: #15803d;
  --danger: #b91c1c;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.06);
  --radius: 14px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --fs-h1: clamp(2rem, 4vw, 2.75rem);
  --fs-h2: clamp(1.35rem, 2.5vw, 1.75rem);
  --container: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--gold);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 100;
}
.skip-link:focus {
  left: 1rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}

/* Dashboard-style header: logo | centered nav | region + CTA */
.header-inner--dash {
  display: grid;
  position: relative;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.75rem 1rem;
}

.header-inner--dash .brand {
  grid-column: 1;
  grid-row: 1;
}

.header-inner--dash .nav-toggle {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
}

@media (max-width: 959px) {
  .header-inner--dash .site-nav--dash:not(.is-open) {
    display: none !important;
  }
  .header-inner--dash .site-nav--dash.is-open {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    right: 1rem;
    top: 64px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem;
    min-width: min(92vw, 320px);
    box-shadow: var(--shadow);
    z-index: 60;
  }
  .header-inner--dash .site-nav--dash.is-open .nav-list--dash {
    flex-direction: column;
    align-items: stretch;
  }
  .header-inner--dash .nav-toggle {
    display: inline-block !important;
  }
  .header-inner--dash .site-nav--dash.is-open .region-dropdown__trigger {
    width: 100%;
    min-width: 0;
  }
  .header-inner--dash .site-nav--dash.is-open .region-dropdown__menu {
    right: 0;
    left: 0;
    width: 100%;
  }
}

.header-inner--dash .site-nav--dash {
  grid-column: 1 / -1;
  grid-row: 2;
  width: 100%;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.nav-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.site-nav--dash {
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.nav-list--dash {
  justify-content: center;
  flex: 1 1 auto;
}

.header-region {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.15rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.header-region__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--muted);
  border: 1px solid transparent;
}

.header-region__btn:hover {
  color: var(--text);
  background: var(--bg);
}

.header-region__btn.is-on {
  background: linear-gradient(135deg, #fef9e7, #f5e6b8);
  color: #5c4510;
  border-color: #e8d9a8;
}

.header-region__emoji {
  font-size: 1rem;
  line-height: 1;
}

.nav-cta--dash {
  margin-left: 0 !important;
  white-space: nowrap;
}

/* Region + currency selector (dropdown) */
.region-dropdown {
  position: relative;
  z-index: 80;
}

.region-dropdown__trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.65rem 0.45rem 0.5rem;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  min-width: 168px;
  text-align: left;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.region-dropdown__trigger:hover {
  border-color: #e8d9a8;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.region-dropdown__globe {
  display: inline-flex;
  flex-shrink: 0;
}

.region-dropdown__code {
  font-weight: 800;
  opacity: 0.85;
  min-width: 1.5rem;
}

.region-dropdown__name {
  flex: 1;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.region-dropdown__chev {
  display: inline-flex;
  flex-shrink: 0;
  color: var(--muted);
  transition: transform 0.2s ease;
  margin-left: 0.15rem;
}

.region-dropdown.is-open .region-dropdown__chev {
  transform: rotate(180deg);
}

.region-dropdown__menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 100%;
  width: max(100%, 240px);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 0.35rem;
  max-height: 70vh;
  overflow-y: auto;
}

.region-dropdown__option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  transition: background 0.12s ease;
}

.region-dropdown__option:hover,
.region-dropdown__option:focus-visible {
  background: var(--bg);
  outline: none;
}

.region-dropdown__option.is-active {
  background: linear-gradient(135deg, #fef9e7, #f8efd0);
}

.region-dropdown__opt-code {
  font-size: 0.85rem;
  font-weight: 800;
  min-width: 2rem;
  color: var(--muted);
}

.region-dropdown__opt-meta {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  line-height: 1.25;
}

.region-dropdown__opt-meta strong {
  font-size: 0.9rem;
  font-weight: 800;
}

.region-dropdown__opt-cur {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 600;
}

.brand-name__accent {
  color: var(--gold);
}

.brand--dash .brand-name {
  font-weight: 800;
}

.brand-mark--chart {
  background: transparent;
  box-shadow: none;
  border-radius: 8px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-admin-ico {
  display: inline-flex;
  vertical-align: -0.12em;
  margin-right: 0.35rem;
}

.nav-admin-ico svg {
  display: block;
  opacity: 0.88;
}

@media (min-width: 960px) {
  .header-inner--dash {
    grid-template-columns: minmax(0, auto) 1fr;
    grid-template-areas: "brand nav";
    align-items: center;
  }

  .header-inner--dash .brand {
    grid-area: brand;
    grid-row: 1;
  }

  .header-inner--dash .nav-toggle {
    display: none !important;
  }

  .header-inner--dash .site-nav--dash {
    grid-area: nav;
    grid-row: 1;
    grid-column: auto;
    width: 100%;
    max-width: none;
    display: flex !important;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
  }

  .header-inner--dash .nav-list--dash {
    flex-wrap: nowrap;
    gap: 0.25rem 1.25rem;
    justify-content: center;
    flex: 1;
  }

  .header-inner--dash .nav-actions {
    justify-content: flex-end;
    flex-shrink: 0;
  }
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #d4af37, #8a6509);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.brand-mark.sm {
  width: 24px;
  height: 24px;
  border-radius: 8px;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.45rem 0.55rem;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
}

.nav-list a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
}
.nav-list a:hover,
.nav-list a:focus-visible {
  color: var(--text);
  border-bottom-color: var(--gold);
}

.nav-cta {
  margin-left: 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.btn:active {
  transform: translateY(1px);
}
.btn-primary {
  background: linear-gradient(135deg, #d4af37, #b8860b);
  color: #0f172a;
  box-shadow: 0 6px 16px rgba(184, 134, 11, 0.25);
}
.btn-primary:hover {
  box-shadow: 0 8px 20px rgba(184, 134, 11, 0.35);
}
.btn-ghost {
  border-color: var(--border);
  background: #fff;
  color: var(--text);
}

.main {
  padding-bottom: 3rem;
}

/* Hero */
.hero {
  padding: 2.75rem 0 2rem;
  background: radial-gradient(1200px circle at 10% -20%, rgba(212, 175, 55, 0.14), transparent 50%),
    radial-gradient(900px circle at 90% 0%, rgba(15, 23, 42, 0.08), transparent 45%);
  border-bottom: 1px solid var(--border);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: center;
}

.hero h1 {
  font-size: var(--fs-h1);
  line-height: 1.12;
  margin: 0 0 0.75rem;
  letter-spacing: -0.03em;
}

.lead {
  font-size: 1.1rem;
  color: var(--muted);
  margin: 0 0 1.25rem;
  max-width: 52ch;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.hero-stat {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.hero-stat:last-child {
  margin-bottom: 0;
}
.stat-label {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
}
.stat-value {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* Sections */
section.section {
  padding: 2.75rem 0;
}
.section-head {
  max-width: 720px;
  margin-bottom: 1.5rem;
}
.section-head h2 {
  font-size: var(--fs-h2);
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}
.section-head p {
  margin: 0;
  color: var(--muted);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.card h3 {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
}

.table-wrap {
  overflow-x: auto;
  border-radius: calc(var(--radius) - 4px);
  border: 1px solid var(--border);
}
table.price-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  min-width: 480px;
}
.price-table th,
.price-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.price-table th {
  background: #f8fafc;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.price-table tr:last-child td {
  border-bottom: 0;
}
.muted {
  color: var(--muted);
}
.big {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
}
.small {
  font-size: 0.85rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid var(--border);
  background: #fff;
}
.badge.up {
  color: var(--success);
  border-color: rgba(21, 128, 61, 0.25);
  background: rgba(21, 128, 61, 0.06);
}
.badge.down {
  color: var(--danger);
  border-color: rgba(185, 28, 28, 0.25);
  background: rgba(185, 28, 28, 0.06);
}

/* Calculators */
.calc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 1.25rem;
  align-items: start;
}
.calc-form label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
  color: var(--muted);
}
.calc-form .field {
  margin-bottom: 1rem;
}
.calc-form input,
.calc-form select {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  font: inherit;
  background: #fff;
}
.calc-results .big {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 0.25rem;
}
.subgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}
.kv {
  padding: 0.75rem;
  border-radius: 10px;
  border: 1px dashed var(--border);
  background: #fcfcfd;
}
.kv dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin: 0 0 0.25rem;
}
.kv dd {
  margin: 0;
  font-weight: 700;
}

/* FAQ */
.faq details {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  background: #fff;
  margin-bottom: 0.65rem;
}
.faq summary {
  cursor: pointer;
  font-weight: 700;
}
.faq p {
  margin: 0.65rem 0 0;
  color: var(--muted);
}

/* Charts */
.chart-card {
  min-height: 320px;
}
.chart-note {
  margin-top: 0.75rem;
}

/* Insights */
.insights ul {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: #fff;
  padding: 2.5rem 0 1.5rem;
  margin-top: 2rem;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.2fr repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}
.footer-heading {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 0.75rem;
  color: var(--muted);
}
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-links li {
  margin-bottom: 0.45rem;
}
.footer-links a {
  color: var(--text);
  text-decoration: none;
}
.footer-links a:hover {
  color: var(--gold-dark);
  text-decoration: underline;
}
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}
.inline-links {
  list-style: none;
  display: flex;
  gap: 1rem;
  margin: 0;
  padding: 0;
}
.inline-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
}
.inline-links a:hover {
  color: var(--text);
}

/* Responsive */
@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .grid-3 {
    grid-template-columns: 1fr;
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .calc-layout {
    grid-template-columns: 1fr;
  }
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: inline-block;
  }
  .site-nav {
    position: absolute;
    right: 1rem;
    top: 64px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem;
    flex-direction: column;
    align-items: stretch;
    min-width: min(92vw, 320px);
    box-shadow: var(--shadow);
    display: none;
  }
  .site-nav.is-open {
    display: flex;
  }
  .nav-list {
    flex-direction: column;
  }
  .nav-cta {
    margin-left: 0;
  }
  .footer-top {
    grid-template-columns: 1fr;
  }
  .subgrid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .btn {
    transition: none;
  }
}
