/*
 * GovMath site layer: the parts every calculator, guide and content page
 * needs that the supplied design package does not draw itself. Loaded after
 * the package's own stylesheets. Brand colours come from govmath-claret.css
 * and govmath-theme.css; charts use the separate chart palette below.
 */

:root {
  /* Guide chart colours: blue, orange, aqua, violet, yellow (kept apart
     from the claret brand colour). */
  --g-c1: #2a78d6;
  --g-c2: #eb6834;
  --g-c3: #1baf7a;
  --g-c4: #4a3aa7;
  --g-c5: #eda100;
  --g-track: #eef1f4;
}

/* ── Form groups and labels ─────────────────────────────── */
.gm-group {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
.gm-group + .gm-group {
  margin-top: 4px;
}
.gm-labelwrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.gm-labelwrap label,
.gm-label {
  font-weight: 700;
}
.gm-aside {
  font-size: 13px;
  color: var(--muted);
}
.gm-optional {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 7px;
  border-radius: 5px;
  background: #faf3f7;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  vertical-align: middle;
}
.field > .hint {
  margin: 8px 0 0;
}
.field > .labelrow + .hint {
  margin: -4px 0 10px;
}
.field .number input {
  font-size: 16px;
}

/* Choices: the design's underlined tabs, left aligned inside a form. */
.ax-calctabs.gm-choice {
  justify-content: flex-start;
  flex-wrap: wrap;
  width: auto;
  margin: 0;
}
.ax-calctabs.gm-choice button {
  font-size: 15px;
  padding: 10px 16px;
}
@media (max-width: 650px) {
  .ax-calctabs.gm-choice button {
    flex: 1 1 auto;
  }
}

/* Quick picks: chips selected like the design's current rate row. */
.chips button[aria-pressed="true"] {
  background: #510b38;
  border-color: #510b38;
  color: #fff;
}
.field .chips {
  margin: 12px 0 0;
}

/* More options: keep the money boxes and sliders in their normal shape. */
.moreoptions summary {
  cursor: pointer;
}
.moreoptions summary .gm-changed {
  font-style: normal;
  font-weight: 400;
  color: var(--focus);
}
.moreoptions .number input,
.moreoptions .ax-select > select {
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.moreoptions input[type="range"] {
  padding: 0;
  margin: 13px 0 14px;
  border: 0;
  border-radius: 8px;
}
.moreoptions .labelrow label,
.moreoptions .gm-switchrow label {
  display: inline;
  margin: 0;
}
.moreoptions .ax-select-field > label {
  display: block;
}
.moreoptions > div > .textbutton {
  margin-top: 4px;
}

/* Switch */
.gm-switchrow {
  display: flex;
  align-items: center;
  gap: 12px;
}
.gm-switchrow label {
  font-weight: 700;
  cursor: pointer;
}
.gm-switch {
  position: relative;
  flex: 0 0 auto;
  width: 44px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: #d8dce0;
  cursor: pointer;
  transition: background 0.15s;
}
.gm-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px #0003;
  transition: transform 0.15s;
}
.gm-switch[aria-checked="true"] {
  background: #510b38;
}
.gm-switch[aria-checked="true"]::after {
  transform: translateX(20px);
}
.gm-switch:focus-visible {
  outline: 2px solid #73164c;
  outline-offset: 2px;
}

/* Text and date inputs in the design's box style. */
.gm-input {
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid #ccc;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
}
.gm-input:focus {
  outline: none;
  border-color: #510b38;
  box-shadow: 0 0 0 1px #510b38;
}
.moreoptions .gm-input {
  margin: 0;
}

/* ── Results panel ──────────────────────────────────────── */
.ax-chartpanel .loan-summary:last-child {
  margin-bottom: 0;
}
.gm-share-link {
  cursor: pointer;
}
.gm-answer {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  padding: 24px;
  text-align: center;
  margin: 22px 0;
}

/* Facts: tones and notes. */
.facts {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.facts b {
  display: block;
  overflow-wrap: anywhere;
}
.facts > div[data-tone="good"] {
  border-top-color: #73164c;
}
.facts > div[data-tone="warn"] {
  border-top-color: #e0b27a;
}
.facts > div[data-tone="bad"] {
  border-top-color: #b42318;
}
.gm-factnote {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}
@media (max-width: 650px) {
  .facts {
    grid-template-columns: 1fr 1fr;
  }
}

/* Result cards: tables and charts take the full row. */
.resultgrid > .resultcard {
  min-width: 0;
}
.resultgrid > .resultcard:has(table, .gm-chart, .tablewrap, .gm-compare, .gm-barchart, svg[role="img"]) {
  grid-column: 1 / -1;
}
.resultcard > .sectionheading {
  align-items: flex-start;
  margin-bottom: 10px;
}
.resultcard > .sectionheading h3 {
  margin-bottom: 6px;
}
.resultcard > .sectionheading p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}
.resultcard > :last-child {
  margin-bottom: 0;
}
.resultcard .tablewrap,
.resultcard .schedule {
  margin-top: 16px;
}
.resultcard .gm-insight {
  margin-top: 16px;
}

/* Split bar list: share after the amount. */
.allocation b {
  white-space: nowrap;
}
.gm-share {
  margin-left: 8px;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}
.allocation > div + div {
  border-top: 1px solid var(--border);
}

/* Compare rows */
.gm-compare {
  margin: 14px 0 0;
}
.gm-rate-head {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  font-weight: 700;
  padding-top: 0;
}
.gm-rate-head strong {
  font-weight: 700;
}
.rate-row small[data-tone="up"] {
  color: #b42318;
}
.rate-row small[data-tone="down"] {
  color: #0f7a52;
}

/* Insight boxes (as the design's guide callouts). */
.gm-insight {
  background: #faf3f7;
  border-left: 3px solid #510b38;
  border-radius: 0 8px 8px 0;
  padding: 18px 20px;
  margin: 22px 0;
}
.gm-insight[data-tone="good"] {
  border-left-color: #73164c;
}
.gm-insight[data-tone="warn"] {
  border-left-color: #c79a4b;
  background: #fbf6ee;
}
.gm-insight h3 {
  font-size: 17px;
  margin: 0 0 8px;
}
.gm-insight p,
.gm-insight li {
  font-size: 15px;
  line-height: 1.7;
  color: #4d5663;
}
.gm-insight > div > :last-child {
  margin-bottom: 0;
}
.gm-insight-action {
  margin-top: 12px;
}

/* Tables */
.schedule {
  margin: 10px 0;
}
.schedule > summary {
  cursor: pointer;
}
.tablewrap {
  overflow-x: auto;
}
.tablewrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.tablewrap th,
.tablewrap td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
  text-align: right;
  white-space: nowrap;
}
.tablewrap th:first-child,
.tablewrap td:first-child {
  text-align: left;
  white-space: normal;
}
.tablewrap th {
  background: #faf3f7;
  color: #510b38;
  font-size: 13px;
}
.gm-statement {
  border: 1px solid var(--border);
  border-radius: 8px;
}
.gm-statement tr[data-kind="deduction"] td:not(:first-child) {
  color: #8a3b2e;
}
.gm-statement tr[data-kind="total"] td {
  background: #faf3f7;
  color: #510b38;
  font-weight: 700;
  border-bottom: 0;
}
.gm-rowhint {
  display: block;
  margin-top: 4px;
  color: var(--muted, #6e6e6e);
  font-size: 14px;
  font-weight: 400;
}
.gm-swatch {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 8px;
  border-radius: 50%;
  vertical-align: middle;
}

/* What we assumed */
.gm-details .ax-assumptions {
  margin: 22px 0;
}
.ax-assumptions > summary {
  cursor: pointer;
  font-weight: 700;
  color: #510b38;
}
.gm-assumed {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 0 24px;
  margin: 14px 0 6px;
}
.gm-assumed > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.gm-assumed dt {
  color: var(--muted);
}
.gm-assumed dd {
  margin: 0;
  font-weight: 700;
  text-align: right;
}
.ax-assumptions > p {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--muted);
}

/* ── Area chart (as the design's balance chart) ─────────── */
.gm-chart {
  margin: 16px 0 0;
}
.gm-chart .chartlegend {
  margin: 0 0 14px;
}
.gm-chart .chartlegend span i {
  height: 3px;
  width: 14px;
}
.gm-chart .chartlegend i[data-dashed] {
  background: repeating-linear-gradient(90deg, currentColor 0 4px, transparent 4px 7px) !important;
  color: #909aab;
}
.gm-readout {
  background: #faf3f7;
  border-radius: 6px;
  padding: 12px 14px;
  font-size: 14px;
  margin: 0 0 14px;
  min-height: 46px;
}
.gm-plot {
  position: relative;
  height: 240px;
  margin-left: 52px;
  cursor: crosshair;
  touch-action: pan-y;
}
.gm-plot:focus-visible {
  outline: 2px solid #73164c;
  outline-offset: 4px;
}
.gm-plot svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.gm-gridline {
  position: absolute;
  left: 0;
  right: 0;
  border-top: 1px solid #efe6ec;
}
.gm-gridline em {
  position: absolute;
  right: calc(100% + 8px);
  top: -9px;
  font-style: normal;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.gm-cursor {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 0;
  border-left: 1px dashed #b9a6b2;
  pointer-events: none;
}
.gm-cursor i {
  position: absolute;
  left: -6px;
  width: 11px;
  height: 11px;
  margin-top: -6px;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #0002;
}
.gm-xaxis {
  position: relative;
  height: 22px;
  margin: 8px 0 0 52px;
  font-size: 12px;
  color: var(--muted);
}
.gm-xaxis span {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  white-space: nowrap;
}
.gm-xaxis span:first-child {
  transform: none;
}
.gm-xaxis span:last-child {
  transform: translateX(-100%);
}
.gm-charthint {
  font-size: 13px;
  color: var(--muted);
  margin: 10px 0 0;
}
@media (max-width: 650px) {
  .gm-plot {
    height: 200px;
    margin-left: 44px;
  }
  .gm-xaxis {
    margin-left: 44px;
  }
  .gm-gridline em {
    font-size: 11px;
  }
}

/* ── Guide blocks the package does not include ──────────── */
.g-sectionKicker {
  font-weight: 700;
}
.g-figure {
  margin: 22px 0;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}
.g-figLabel {
  margin-bottom: 16px;
  color: #2b2028;
  font-size: 15px;
  font-weight: 700;
}
.g-figCaption {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px !important;
  line-height: 1.55 !important;
}
.g-bandBar {
  display: flex;
  gap: 2px;
  height: 46px;
}
.g-band {
  display: grid;
  place-items: center;
  min-width: 0;
  overflow: hidden;
  border-radius: 4px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}
.g-band[data-light] {
  color: #2b2028;
}
.g-ticks {
  position: relative;
  height: 20px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.g-ticks span {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  white-space: nowrap;
}
.g-ticks span:first-child {
  transform: none;
}
.g-ticks span:last-child {
  transform: translateX(-100%);
}
.g-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 12px;
  font-size: 14px;
}
.g-legend span {
  display: inline-flex;
  align-items: center;
}
.g-barName {
  color: #2b2028;
  font-weight: 700;
}
.g-chart {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.g-chart text {
  fill: var(--muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
}
.g-chart .g-chartLabel {
  fill: #2b2028;
  font-size: 13px;
}
.g-chart .g-grid {
  stroke: #efe6ec;
  stroke-width: 1;
}
.g-chart .g-line {
  fill: none;
  stroke-width: 2.5;
  stroke-linejoin: round;
}
.g-chart .g-area {
  opacity: 0.12;
}
.g-chart .g-hit {
  fill: transparent;
}
.g-chart .g-hit:hover {
  fill: rgba(81, 11, 56, 0.06);
}
.g-stepLabel {
  color: #2b2028;
}
.g-numCell {
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}
.g-table {
  width: 100%;
  border-collapse: collapse;
}
.g-table th,
.g-table td {
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
.g-table thead th {
  background: #faf7f9;
  font-size: 13px;
}
.g-table tr:last-child td {
  border-bottom: 0;
}
.g-stats {
  margin: 20px 0;
}
.g-timeline {
  display: grid;
  gap: 10px;
  margin: 20px 0;
}
.g-compareCol ul {
  margin: 10px 0 0;
}
.g-compareCol li {
  font-size: 14px !important;
}
.g-callout > :last-child {
  margin-bottom: 0;
}
.g-section .g-callout p {
  margin: 0;
}

/* ── Content pages ──────────────────────────────────────── */
.gm-prose {
  max-width: 820px;
}
.gm-prose h2 {
  font-size: 26px;
  margin: 34px 0 14px;
}
.gm-prose h3 {
  font-size: 19px;
  margin: 24px 0 10px;
}
.gm-prose p,
.gm-prose li {
  font-size: 16px;
  line-height: 1.8;
  color: #4d5663;
}
.gm-prose ul,
.gm-prose ol {
  padding-left: 22px;
}
.gm-prose a {
  color: var(--brand);
  text-decoration: underline;
}
.gm-prose blockquote {
  margin: 20px 0;
  padding: 18px 20px;
  background: #faf3f7;
  border-left: 3px solid var(--brand);
}
.gm-prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin: 20px 0;
}
.gm-prose th,
.gm-prose td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.gm-prose th {
  background: #faf3f7;
  color: #510b38;
}
/* Wide tables scroll sideways inside the column on small screens. */
@media (max-width: 900px) {
  .gm-prose table {
    display: block;
    overflow-x: auto;
  }
}
.gm-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 25px;
}
.gm-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 23px;
  background: #fff;
}
a.gm-card:hover {
  background: #faf3f7;
}
.gm-card strong {
  font-size: 18px;
  color: #510b38;
}
.gm-card p {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}
.gm-card small {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
}
.gm-card .gm-go {
  margin-top: auto;
  color: var(--wine);
  font-size: 13px;
  font-weight: 700;
}
.gm-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-size: 13px;
  color: var(--muted);
  margin: 14px 0 0;
}
@media (max-width: 900px) {
  .gm-cards {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 650px) {
  .gm-cards {
    grid-template-columns: 1fr;
  }
  .gm-prose h2 {
    font-size: 23px;
  }
}
.categoryhero > p:not(.eyebrow) {
  color: var(--muted);
  margin: 0;
}
.categoryhero .gm-meta {
  margin-top: 16px;
}
.categorytool h3 {
  font-size: 20px;
  line-height: 1.4;
  margin: 0 0 8px;
}
.section .fullcategory {
  margin-bottom: 0;
}
.gm-postlist {
  margin: 10px 0 50px;
}
.gm-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
  margin: 10px 0 60px;
}
.gm-prose.section {
  border-top: 0;
  padding-top: 10px;
}
.g-compare {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.gm-notfound {
  margin-top: 30px;
}
/* A lone last card fills the row rather than leaving a gap. */
.resultgrid > .resultcard:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}
.gm-compare .rate-row {
  grid-template-columns: minmax(0, 1fr) auto minmax(70px, auto);
  gap: 18px;
}

/* ── Clearer calculator form (trial: council tax bands) ─────────────
   Field labels are a step quieter than section controls, explanations sit
   behind an (i) button, and More options reads as a separate control. */
.gm-clear .formheading.gm-notitle {
  justify-content: flex-end;
  margin-bottom: 8px;
}
.gm-clear .gm-labelwrap {
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.gm-clear .labelrow label,
.gm-clear .gm-label,
.gm-clear .ax-select-field label,
.gm-clear .gm-switchrow label {
  font-size: 15px;
  font-weight: 600;
  color: #2b2028;
}
.gm-clear .field,
.gm-clear .ax-select-field {
  margin: 0 0 26px;
}
.gm-clear .ax-select-field .gm-labelwrap {
  margin-bottom: 9px;
}
.gm-clear .moreoptions {
  margin: 4px 0 8px;
  padding: 0;
  border: 1px solid #e6d8e1;
  border-radius: 10px;
  background: #fff;
}
.gm-clear .moreoptions > summary {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  padding: 14px 18px;
  color: #510b38;
  font-size: 15px;
  font-weight: 700;
}
.gm-clear .moreoptions > summary::-webkit-details-marker {
  display: none;
}
.gm-clear .moreoptions > summary::before {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #faf3f7;
  color: #510b38;
  font-size: 16px;
  line-height: 1;
}
.gm-clear .moreoptions[open] > summary::before {
  content: "−";
}
.gm-clear .moreoptions > summary > span {
  flex-basis: 100%;
  margin: 0 0 0 32px;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}
.gm-clear .moreoptions[open] > summary {
  border-bottom: 1px solid #e6d8e1;
}
.gm-clear .moreoptions > div {
  padding: 20px 18px 6px;
}

/* (i) explanations */
.gm-info {
  position: relative;
  display: inline-flex;
}
.gm-info-button {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 1px solid #909aab;
  border-radius: 50%;
  background: #fff;
  color: #626262;
  font: italic 700 11px/1 Georgia, serif;
  cursor: pointer;
}
.gm-info-button:hover,
.gm-info-button[aria-expanded="true"] {
  border-color: #510b38;
  background: #510b38;
  color: #fff;
}
.gm-info-bubble {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  left: -12px;
  width: min(280px, 75vw);
  padding: 12px 14px;
  border: 1px solid #e6d8e1;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(81, 11, 56, 0.12);
  color: #2b2028;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.55;
  text-transform: none;
  letter-spacing: 0;
}
.gm-info-bubble[hidden] {
  display: none;
}

/* Radio buttons, one per line */
.gm-radiogroup {
  border: 0;
  padding: 0;
  min-width: 0;
}
.gm-radiogroup > legend {
  padding: 0;
  margin-bottom: 10px;
}
.gm-radios {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.gm-radio {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 16px 10px 12px;
  border: 1px solid #e6d8e1;
  border-radius: 8px;
  background: #fff;
  font-size: 15px;
  cursor: pointer;
}
.gm-radio:has(input:checked) {
  border-color: #510b38;
  box-shadow: 0 0 0 1px #510b38;
}
.gm-radio input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #510b38;
}

/* Bar chart: chart palette (blue picks out the selected item) */
.gm-barchart {
  margin: 0;
}
.gm-bar {
  display: grid;
  grid-template-columns: minmax(120px, 34%) 1fr 76px;
  align-items: center;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid #eee7ec;
  font-size: 14px;
}
.gm-bar-label small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.gm-bar-track {
  display: block;
  height: 14px;
  border-radius: 4px;
  background: #f1f2f4;
  overflow: hidden;
}
.gm-bar-track > span {
  display: block;
  height: 100%;
  border-radius: 0 4px 4px 0;
  background: #b9c3d1;
}
.gm-bar.current .gm-bar-track > span {
  background: #2a78d6;
}
.gm-bar.current .gm-bar-label,
.gm-bar.current .gm-bar-value {
  font-weight: 700;
  color: #2b2028;
}
.gm-bar-value {
  text-align: right;
  font-weight: 600;
}
@media (max-width: 650px) {
  .gm-bar {
    grid-template-columns: 1fr 70px;
    gap: 6px 10px;
  }
  .gm-bar-track {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}
/* Keep sliders and radios inside More options in their own shape (the package styles every input there as a text box). */
.gm-clear .moreoptions input[type="range"] {
  background: linear-gradient(to right, var(--wine) var(--fill, 30%), #d8dce0 var(--fill, 30%));
  border: 0;
  padding: 0;
}
.gm-clear .moreoptions .gm-radio input {
  width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  border: 0;
  flex: 0 0 auto;
}
.gm-clear .gm-radio span {
  font-weight: 400;
}
.gm-clear .gm-radio:has(input:checked) span {
  font-weight: 700;
  color: #510b38;
}
/* Inside More options every field is optional, so the tag is not repeated. */
.gm-clear .moreoptions .gm-optional {
  display: none;
}
.gm-clear .gm-switchrow {
  flex-wrap: wrap;
}
@media (max-width: 650px) {
  .gm-clear .labelrow {
    flex-wrap: wrap;
    gap: 10px;
  }
  .gm-clear .labelrow > .gm-labelwrap {
    flex: 1 1 100%;
  }
  .gm-clear .labelrow > .number {
    width: 100%;
  }
  .gm-clear .gm-radio {
    flex: 1 1 140px;
  }
}
.gm-clear .moreoptions label.gm-radio {
  display: inline-flex;
  margin: 0;
  font-size: 15px;
  font-weight: 400;
}

/* Guide bar charts: the fill is a block, and labels get room to breathe. */
.g-barFill {
  display: block;
}
.g-barRow {
  grid-template-columns: minmax(90px, 150px) 1fr 100px;
}
@media (max-width: 650px) {
  .g-barRow {
    grid-template-columns: 90px 1fr 80px;
  }
}

/* Topic pages: quick links to the fixed-amount pages (salary after tax, Stamp Duty by price). */
.gm-amountlinks {
  margin: 40px 0 0;
}
.gm-amountlinks h2 {
  margin: 0 0 14px;
}
.gm-amountlinks .toollist {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  column-gap: 24px;
}
/* Fixed-amount pages: the answer at a glance under the title. */
.gm-amount-summary {
  margin-top: 8px;
}
.gm-amount-summary .g-stats {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
@media (max-width: 560px) {
  .gm-amount-summary .g-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}

/* All calculators page: a heading for each country's group of topics. */
.gm-countryheading {
  margin: 48px 0 0;
  padding-top: 24px;
  border-top: 2px solid #8c1d40;
  font-size: 30px;
}
