:root {
  color-scheme: light;
  --bg: #f8fbfa;
  --surface: #ffffff;
  --surface-strong: #ecf8f4;
  --surface-soft: #fff6ed;
  --text: #142321;
  --muted: #60726f;
  --line: #d9e8e4;
  --brand: #138a7e;
  --brand-dark: #0c5d57;
  --brand-soft: #dff4ee;
  --accent: #df745c;
  --accent-soft: #ffe2d5;
  --focus: rgba(19, 138, 126, 0.26);
  --shadow: 0 22px 54px rgba(19, 52, 50, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(223, 116, 92, 0.13), transparent 310px),
    linear-gradient(180deg, rgba(226, 246, 240, 0.92), rgba(248, 251, 250, 0) 460px),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: var(--brand-dark);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: 12px;
  z-index: 10;
  transform: translateY(-140%);
  border-radius: 8px;
  background: var(--text);
  color: #fff;
  padding: 8px 12px;
}

.skip-link:focus {
  transform: translateY(0);
}

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

.site-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid rgba(217, 232, 228, 0.78);
}

.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
  color: var(--text);
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), #1d6f9f);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(19, 138, 126, 0.22);
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 0.78rem;
}

.main-nav,
.site-footer nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.menu-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  justify-self: end;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--brand-dark);
  font: inherit;
  font-weight: 800;
  padding: 8px 11px;
  cursor: pointer;
}

.menu-toggle svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.header-actions {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: flex-end;
}

.main-nav a,
.nav-dropdown-toggle {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  height: 28px;
  border: 0;
  background: transparent;
  color: var(--brand-dark);
  font: inherit;
  font-size: 0.95rem;
  line-height: 28px;
  padding: 0;
  cursor: pointer;
}

.main-nav svg,
.nav-dropdown-toggle svg,
.calculator-head h2 svg,
.results h2 svg,
.compound-form h2 svg,
.compound-results h2 svg,
.compound-chart-card h2 svg,
dt svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.main-nav svg *,
.nav-dropdown-toggle svg *,
.calculator-head h2 svg *,
.results h2 svg *,
.compound-form h2 svg *,
.compound-results h2 svg *,
.compound-chart-card h2 svg *,
dt svg * {
  fill: none;
}

.main-nav svg {
  color: var(--brand);
}

.nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-dropdown-toggle {
  font-weight: 500;
}

.nav-dropdown-toggle .chevron {
  width: 15px;
  height: 15px;
  color: var(--muted);
  transition: transform 160ms ease;
}

.nav-dropdown[data-open="true"] .chevron {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 20;
  display: grid;
  gap: 4px;
  width: max-content;
  min-width: 260px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  padding: 8px;
  transform: translateY(-4px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.nav-dropdown[data-open="true"] .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.nav-dropdown-menu a {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: center;
  height: auto;
  min-height: 42px;
  border-radius: 7px;
  color: var(--text);
  font-weight: 800;
  line-height: 1.2;
  padding: 9px 10px;
}

.nav-dropdown-menu a:hover {
  background: var(--surface-strong);
  text-decoration: none;
}

.nav-dropdown-menu svg {
  color: var(--brand);
}

.language-picker {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 0.9rem;
  height: 28px;
  line-height: 28px;
}

.language-picker > span {
  display: inline-block;
  transform: translateY(3px);
}

.language-picker select {
  height: 28px;
  min-height: 28px;
  width: auto;
  border-radius: 999px;
  padding: 2px 28px 2px 9px;
  line-height: 22px;
}

select,
input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  font: inherit;
  padding: 10px 12px;
}

input:focus,
select:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 40px;
  align-items: center;
  min-height: 520px;
  padding: 56px 0 34px;
}

.hero-copy,
.tool-hero {
  max-width: 760px;
}

.tool-hero {
  max-width: 940px;
  padding: 22px 0 24px;
}

.tool-hero h1 {
  font-size: 3rem;
  line-height: 1.04;
  max-width: none;
  text-wrap: balance;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 0.82rem;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0 0 18px;
  font-size: 4.75rem;
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin: 0 0 18px;
  font-size: 1.75rem;
  line-height: 1.2;
  letter-spacing: 0;
}

h3 {
  margin: 0 0 8px;
  font-size: 1.2rem;
  line-height: 1.25;
  letter-spacing: 0;
}

.hero p,
.tool-hero p,
.content-section p {
  color: var(--muted);
  font-size: 1.05rem;
}

.hero-panel {
  min-height: 360px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(19, 138, 126, 0.94), rgba(29, 111, 159, 0.86)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220' viewBox='0 0 220 220'%3E%3Cg fill='none' stroke='rgba(255,255,255,.22)' stroke-width='2'%3E%3Cpath d='M20 40h180M20 90h180M20 140h180M20 190h180M40 20v180M90 20v180M140 20v180M190 20v180'/%3E%3C/g%3E%3C/svg%3E");
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.mini-calc {
  width: min(280px, 80%);
  display: grid;
  gap: 10px;
  padding: 24px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.14);
}

.mini-calc span,
.mini-calc strong {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.mini-calc strong {
  border: 0;
  color: var(--brand-dark);
  font-size: 2rem;
}

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  border: 1px solid var(--brand);
  border-radius: 10px;
  background: #fff;
  color: var(--brand-dark);
  font: inherit;
  font-weight: 800;
  padding: 10px 16px;
  cursor: pointer;
  white-space: nowrap;
}

.button svg,
.icon-button svg,
.copy-value-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.button:hover {
  text-decoration: none;
  background: var(--surface-strong);
}

.button.primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  box-shadow: 0 12px 26px rgba(19, 138, 126, 0.22);
}

.button.primary:hover {
  background: var(--brand-dark);
}

.button.ghost {
  border-color: var(--line);
  color: var(--text);
}

.button.compact {
  min-height: 38px;
  border-radius: 8px;
  font-size: 0.92rem;
  padding: 8px 12px;
}

.content-section {
  padding: 48px 0;
}

.breadcrumbs {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.92rem;
  padding: 20px 0 0;
}

.ad-slot {
  display: grid;
  place-items: center;
  width: 100%;
  margin: 22px 0;
  border: 1px dashed #c8dad5;
  border-radius: 8px;
  background:
    repeating-linear-gradient(135deg, rgba(19, 138, 126, 0.04) 0 10px, rgba(29, 111, 159, 0.045) 10px 20px),
    rgba(255, 255, 255, 0.66);
  color: #75827d;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0;
}

.ad-slot-horizontal {
  min-height: 96px;
}

.ad-slot-vertical {
  min-height: 280px;
}

.post-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: flex-start;
}

.post-layout .content-section {
  padding: 34px 0;
}

.post-sidebar {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 18px;
  padding-top: 0;
}

.post-sidebar .ad-slot {
  margin-top: 34px;
}

.narrow {
  max-width: 780px;
}

.not-found {
  min-height: 520px;
}

.not-found-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.calculator-card,
.tool-layout,
.results,
.calculator,
.content-section article,
.faq details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.calculator-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.calculator-card {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 18px;
  align-items: start;
  padding: 24px;
}

.calculator-card p {
  margin-bottom: 0;
}

.calculator-card .button {
  justify-self: start;
}

.tool-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 0;
  overflow: hidden;
  box-shadow: var(--shadow);
  border-color: rgba(199, 220, 215, 0.92);
}

.calculator {
  border: 0;
  border-radius: 0;
  padding: 26px;
}

.calculator {
  display: grid;
  grid-template-rows: 48px auto;
  align-content: start;
}

.results {
  display: grid;
  grid-template-rows: 48px 21px auto;
  align-content: start;
}

.calculator-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
  margin: 0;
}

.calculator-head h2 {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  height: 36px;
  line-height: 36px;
  margin: 0;
}

.purchase-list {
  display: grid;
  gap: 10px;
}

.purchase-row {
  display: grid;
  grid-template-columns: 48px minmax(110px, 1fr) minmax(130px, 1fr) minmax(130px, 1fr) 42px;
  gap: 10px;
  align-items: center;
}

.purchase-row-header {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  padding: 0 2px;
}

.purchase-index {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(180deg, var(--brand-soft), #ffffff);
  color: var(--brand-dark);
  font-weight: 900;
}

.purchase-row label {
  min-width: 0;
}

.purchase-row label span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.purchase-row output {
  display: flex;
  align-items: center;
  min-width: 0;
  height: 48px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, var(--surface-soft), #ffffff);
  color: var(--text);
  font-weight: 800;
  line-height: 1.1;
  padding: 10px 12px;
  white-space: nowrap;
}

.purchase-row output.is-long {
  font-size: 0.82rem;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.icon-button:hover {
  border-color: var(--accent);
  color: #9f3f2c;
  background: #fff4ef;
}

.icon-button.danger {
  border-color: #f3c2b8;
  color: #c2412d;
  background: #fff7f4;
}

.icon-button.danger:hover {
  border-color: #e66b58;
  color: #9f2f1f;
  background: #ffe8e1;
}

.icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

fieldset {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 0 0 24px;
  padding: 0;
  border: 0;
}

legend {
  grid-column: 1 / -1;
  margin-bottom: 2px;
  font-weight: 800;
}

label span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.currency-field {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  height: 36px;
  max-width: 220px;
  min-width: 150px;
  line-height: 36px;
}

.currency-field span {
  margin: 0;
  white-space: nowrap;
}

.currency-field select {
  min-width: 96px;
  height: 30px;
  min-height: 30px;
  padding: 4px 10px;
  line-height: 22px;
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.results {
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
  border-radius: 0;
  background:
    linear-gradient(180deg, var(--surface-strong), #ffffff 78%);
  padding: 26px;
}

.results-head {
  display: flex;
  align-items: start;
}

.results h2 {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  height: 36px;
  line-height: 36px;
  margin: 0;
}

.results-spacer {
  min-height: 21px;
}

.result-hint {
  display: none;
  min-height: 0;
  margin: 0;
  color: var(--muted);
}

dl {
  display: grid;
  gap: 10px;
  margin: 10px 0 0;
}

dl div {
  display: grid;
  grid-template-columns: minmax(142px, 0.92fr) minmax(178px, 1.08fr);
  gap: 10px;
  align-items: center;
  min-height: 47.6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  padding: 0 0 0 12px;
}

dt {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  color: var(--muted);
  font-weight: 700;
}

dt svg {
  color: var(--brand);
}

dd {
  justify-self: end;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
  min-width: 0;
  margin: 0;
  border-left: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface-soft), #ffffff);
  font-weight: 900;
  font-size: 1.2rem;
  padding: 0 12px;
  text-align: right;
  white-space: nowrap;
}

dd.is-long {
  font-size: 0.95rem !important;
  letter-spacing: 0;
}

dd span[data-result] {
  display: inline-block;
}

.copyable-result dd {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  gap: 8px;
  align-items: center;
}

.copyable-result dd span[data-result] {
  justify-self: end;
}

.copy-value-button {
  position: relative;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--brand-dark);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 0;
  cursor: pointer;
}

.copy-value-button span {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 2;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--text);
  color: #fff;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  padding: 4px 7px;
  transform: translateY(-3px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.copy-value-button:hover span,
.copy-value-button:focus-visible span,
.copy-value-button[data-copied="true"] span {
  opacity: 1;
  transform: translateY(0);
}

.copy-value-button:hover,
.copy-value-button[data-copied="true"] {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.compound-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.52fr);
  gap: 18px;
  align-items: stretch;
}

.compound-form,
.compound-results,
.compound-chart-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.compound-form,
.compound-results {
  padding: 24px;
}

.compound-form {
  display: grid;
  gap: 22px;
}

.compound-form-head,
.compound-chart-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}

.compound-form h2,
.compound-results h2,
.compound-chart-card h2 {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin: 0;
  overflow: hidden;
}

.compound-form h2 svg,
.compound-results h2 svg,
.compound-chart-card h2 svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.compound-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.compound-fields > label:first-child {
  grid-column: 1 / -1;
}

.segmented-field {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
}

.segmented-field legend {
  display: block;
  height: 28px;
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 22px;
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  height: 44px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(236, 248, 244, 0.62);
  padding: 4px;
}

.segmented-control label {
  position: relative;
  display: grid;
  min-width: 0;
}

.segmented-control input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.segmented-control span {
  display: grid;
  place-items: center;
  min-height: 34px;
  height: 34px;
  margin: 0;
  border-radius: 7px;
  background: #fff;
  border: 1px solid rgba(217, 232, 228, 0.92);
  color: var(--brand-dark);
  font-weight: 900;
  box-shadow: 0 1px 0 rgba(20, 35, 33, 0.04);
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.segmented-control input:checked + span {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 18px rgba(19, 138, 126, 0.18);
}

.segmented-control input:not(:checked):hover + span {
  border-color: rgba(19, 138, 126, 0.45);
  background: var(--surface-strong);
}

.segmented-control input:focus-visible + span {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.compound-results {
  background: linear-gradient(180deg, var(--surface-strong), #ffffff 74%);
}

.compound-results dl {
  margin-top: 20px;
}

.compound-results dl div {
  grid-template-columns: 1fr;
  gap: 4px;
  padding: 12px;
}

.compound-results dd {
  justify-content: flex-start;
  border-left: 0;
  border-radius: 8px;
  font-size: 1.55rem;
  padding: 10px 12px;
}

.compound-chart-card {
  grid-column: 1 / -1;
  padding: 22px;
  overflow: hidden;
}

.chart-legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.chart-legend span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.chart-legend span::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--brand);
}

.chart-legend .legend-invested::before {
  background: var(--accent);
}

.compound-chart-card canvas {
  display: block;
  width: 100%;
  height: 320px;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(236, 248, 244, 0.62), rgba(255, 255, 255, 0.96)),
    #fff;
}

.two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.content-section article {
  padding: 22px;
}

.faq {
  display: grid;
  gap: 12px;
}

.faq details {
  padding: 18px 20px;
}

.faq summary {
  cursor: pointer;
  font-weight: 800;
}

.site-footer {
  display: grid;
  gap: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 32px 0 44px;
  margin-top: 36px;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 860px) {
  .site-header {
    grid-template-columns: 1fr auto;
    gap: 10px 12px;
    padding: 8px 0;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .header-actions {
    grid-column: 1 / -1;
    display: none;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0 2px;
  }

  .header-actions[data-open="true"] {
    display: grid;
    gap: 12px;
  }

  .main-nav {
    display: grid;
    gap: 8px;
  }

  .nav-dropdown {
    display: grid;
  }

  .nav-dropdown-toggle {
    justify-content: space-between;
    width: 100%;
    height: 34px;
  }

  .nav-dropdown-menu {
    position: static;
    width: 100%;
    min-width: 0;
    box-shadow: none;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    margin-top: 6px;
  }

  .hero,
  .tool-layout,
  .compound-layout,
  .calculator-grid,
  .two-column,
  .post-layout {
    grid-template-columns: 1fr;
  }

  .post-sidebar {
    position: static;
    grid-template-columns: 1fr;
    padding-top: 0;
  }

  .hero {
    min-height: auto;
    padding-top: 32px;
  }

  .hero-panel {
    min-height: 260px;
  }

  .results {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .ad-slot-horizontal {
    min-height: 82px;
  }

  .ad-slot-vertical {
    min-height: 96px;
  }

  h1 {
    font-size: 3.25rem;
  }

  .tool-hero h1 {
    font-size: 2.45rem;
  }

  .purchase-row {
    grid-template-columns: 42px minmax(90px, 1fr) minmax(112px, 1fr) minmax(110px, 1fr) 42px;
  }
}

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

  .brand small {
    display: none;
  }

  .main-nav {
    gap: 12px;
  }

  .language-picker {
    justify-content: space-between;
  }

  .main-nav a {
    gap: 5px;
  }

  fieldset {
    grid-template-columns: 1fr;
  }

  .calculator {
    padding: 18px;
  }

  .calculator-head {
    display: grid;
    align-items: stretch;
  }

  .compound-form,
  .compound-results,
  .compound-chart-card {
    padding: 18px;
  }

  .compound-form-head,
  .compound-chart-head {
    display: grid;
    align-items: stretch;
  }

  .compound-fields {
    grid-template-columns: 1fr;
  }

  .compound-chart-card canvas {
    height: 280px;
  }

  .currency-field {
    max-width: none;
  }

  .purchase-row-header {
    display: none;
  }

  .purchase-row {
    grid-template-columns: 42px 1fr 42px;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
  }

  .purchase-index {
    grid-row: span 3;
  }

  .purchase-row label,
  .purchase-row output {
    grid-column: 2;
  }

  .purchase-row label span {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    white-space: normal;
  }

  .purchase-row .icon-button {
    grid-column: 3;
    grid-row: 1;
  }

  h1 {
    font-size: 2.25rem;
  }

  .tool-hero h1 {
    font-size: 2rem;
  }

  .actions .button {
    width: 100%;
  }

  .calculator-card .button {
    width: auto;
  }

  .ad-slot {
    margin: 16px 0;
  }

  dl div {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
  }

  dd {
    justify-self: start;
    text-align: left;
  }
}
