:root {
  color-scheme: light;
  --page: #f4f2ec;
  --ink: #111827;
  --text: #151515;
  --muted: #586272;
  --muted-dark: #d7dde7;
  --line: #e3ddd0;
  --panel: #fffdf8;
  --white: #ffffff;
  --navy: #111827;
  --navy-soft: #1f2937;
  --gold: #f8cf68;
  --gold-dark: #b97914;
  --green: #16a34a;
  --teal: #0f766e;
  --soft: #eee9dd;
  --shadow: 0 22px 60px rgba(17, 24, 39, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background: var(--page);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
}

.site-header,
.site-footer,
main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0;
  background: var(--navy);
  box-shadow: 0 0 0 100vmax var(--navy);
  clip-path: inset(0 -100vmax);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(248, 207, 104, 0.45);
  border-radius: 8px;
  background: #fffdf8;
  color: var(--gold-dark);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.top-nav::-webkit-scrollbar {
  display: none;
}

.top-nav a,
.site-footer a {
  text-decoration: none;
}

.top-nav a {
  flex: 0 0 auto;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 0 11px;
  color: var(--muted-dark);
  font-size: 14px;
  font-weight: 700;
}

.top-nav a:hover {
  border-color: rgba(248, 207, 104, 0.65);
  color: var(--gold);
}

.hero {
  position: relative;
  isolation: isolate;
  min-height: 430px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  gap: 28px;
  align-items: center;
  padding: 42px 0 52px;
  background: transparent;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 70% 18%, rgba(248, 207, 104, 0.13), transparent 28%),
    linear-gradient(135deg, var(--navy) 0%, #182235 58%, #102a2a 100%);
  box-shadow: 0 0 0 100vmax #151d2d;
  clip-path: inset(0 -100vmax);
}

.hero-content {
  max-width: 760px;
  padding: 0;
  color: #fff;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--gold);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.82rem;
}

h1,
h2,
p {
  margin: 0;
}

h1,
h2 {
  line-height: 1.05;
  letter-spacing: 0;
}

h1 {
  max-width: 780px;
  font-size: clamp(3rem, 6.4vw, 5rem);
  font-weight: 700;
}

h2 {
  color: var(--ink);
  font-size: clamp(1.45rem, 3vw, 2.25rem);
  font-weight: 700;
}

.lead {
  max-width: 680px;
  margin-top: 18px;
  color: var(--muted-dark);
  font-size: 1.18rem;
}

.rate-panel,
.tool-section,
.faq-section details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.rate-panel {
  position: relative;
  overflow: hidden;
  padding: 28px;
}

.rate-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 7px;
  background: linear-gradient(90deg, var(--gold), var(--green), var(--teal));
}

.panel-label,
.muted {
  color: var(--muted);
}

.panel-label {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border: 1px solid #e8dfcf;
  border-radius: 999px;
  background: #f8f3e8;
  padding: 0 11px;
  color: #485365;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

#rate-value {
  display: block;
  margin: 24px 0 10px;
  color: var(--navy);
  font-size: clamp(2.35rem, 5vw, 4.15rem);
  font-weight: 750;
  line-height: 1;
}

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

.hero-rate-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.hero-rate-grid div {
  min-width: 0;
  border: 1px solid #e8dfcf;
  border-radius: 8px;
  background: #fff;
  padding: 16px;
}

.hero-rate-grid span {
  display: block;
  color: #687386;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-rate-grid strong {
  display: block;
  margin-top: 8px;
  color: var(--navy);
  font-size: clamp(1.55rem, 3vw, 2.45rem);
  line-height: 1;
}

.rate-note {
  margin: 14px 0 8px;
  color: #4f5968;
  font-weight: 700;
}

.tool-section {
  position: relative;
  z-index: 1;
  margin: 28px 0 26px;
  padding: 26px;
}

.section-heading {
  margin-bottom: 22px;
}

.tool-section .eyebrow,
.content-section .eyebrow,
.faq-section .eyebrow,
.market-section .eyebrow {
  color: var(--gold-dark);
}

.converter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr);
  gap: 14px;
  align-items: end;
}

label span {
  display: block;
  margin-bottom: 8px;
  color: #687386;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

input {
  width: 100%;
  height: 56px;
  border: 1px solid #ddd4c4;
  border-radius: 8px;
  background: #fff;
  padding: 0 15px;
  color: var(--text);
  font-size: 1.22rem;
  font-weight: 750;
}

input:focus,
button:focus-visible,
summary:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(248, 207, 104, 0.36);
  outline-offset: 3px;
}

.icon-button,
.quick-grid button {
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
}

.icon-button {
  height: 56px;
  border: 1px solid var(--navy);
  background: var(--navy);
  color: #fff;
  font-size: 1.25rem;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.quick-grid button {
  min-height: 48px;
  border: 1px solid #e4d7bf;
  background: #fff;
  color: var(--navy);
}

.quick-grid button:hover {
  border-color: var(--gold-dark);
  background: #fff7e1;
}

.icon-button:hover {
  background: var(--navy-soft);
}

.status-message {
  margin-top: 18px;
  color: #4f5968;
}

.status-message.is-error {
  color: #b91c1c;
  font-weight: 700;
}

.info-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin: 0 0 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.info-band div {
  min-height: 118px;
  padding: 20px;
  background: var(--panel);
}

.info-band span {
  display: block;
  color: #687386;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.info-band strong {
  display: block;
  margin-top: 9px;
  color: var(--ink);
  font-size: 1.05rem;
}

.market-section {
  margin-bottom: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 22px;
  box-shadow: 0 18px 45px rgba(17, 24, 39, 0.1);
}

.market-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.refresh-button {
  min-height: 42px;
  border: 1px solid var(--navy);
  border-radius: 8px;
  background: var(--navy);
  color: #fff;
  padding: 0 14px;
  font-weight: 800;
  cursor: pointer;
}

.refresh-button:disabled {
  opacity: 0.7;
  cursor: wait;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.market-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.market-table th,
.market-table td {
  border-bottom: 1px solid #ece5d8;
  padding: 13px 10px;
  text-align: right;
  white-space: nowrap;
}

.market-table th:first-child,
.market-table td:first-child {
  text-align: left;
}

.market-table th {
  color: #6f7886;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.market-table td {
  color: var(--ink);
  font-weight: 700;
}

.market-table td strong,
.market-table td span {
  display: block;
}

.market-table td span {
  margin-top: 2px;
  color: #7b8492;
  font-size: 13px;
}

.content-section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 48px;
}

.content-section article {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 22px;
}

.content-section article:first-child {
  border-top: 5px solid var(--gold);
}

.content-section article:last-child {
  border-top: 5px solid var(--teal);
}

.content-section p,
.faq-section p {
  margin-top: 12px;
  color: #4f5968;
}

.faq-section {
  margin-bottom: 54px;
}

.faq-section h2 {
  margin-bottom: 18px;
}

.faq-section details {
  box-shadow: none;
  margin-bottom: 12px;
  padding: 16px 18px;
}

summary {
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  border-top: 1px solid var(--line);
  padding: 28px 0 36px;
  color: #4f5968;
}

.site-footer strong {
  color: var(--ink);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.site-footer a {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  border: 1px solid #ddd4c4;
  border-radius: 8px;
  background: #fffdf8;
  padding: 0 10px;
  color: var(--ink);
  font-weight: 700;
}

.site-footer a:hover {
  border-color: var(--gold-dark);
  color: var(--gold-dark);
}

.site-footer p {
  max-width: 360px;
  margin: 0;
}

@media (max-width: 880px) {
  .site-header,
  .site-footer,
  main {
    width: min(100% - 22px, 1180px);
  }

  .site-header {
    display: grid;
    align-items: start;
  }

  .top-nav {
    justify-content: flex-start;
  }

  .hero,
  .converter,
  .hero-rate-grid,
  .content-section,
  .info-band,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 0;
    padding: 34px 0 30px;
  }

  .hero-content {
    padding-top: 0;
  }

  .tool-section {
    margin: 22px 0 22px;
  }

  .converter {
    align-items: stretch;
  }

  .icon-button {
    width: 58px;
    justify-self: center;
  }

  .quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .market-toolbar {
    display: grid;
  }

  .site-footer {
    display: grid;
  }
}

@media (max-width: 560px) {
  h1 {
    font-size: 46px;
  }

  .lead {
    font-size: 16px;
  }

  .rate-panel,
  .tool-section,
  .market-section,
  .content-section article {
    padding: 16px;
  }

  #rate-value {
    font-size: 2.35rem;
  }
}
