/* Monthly cost calculator. Uses the theme's colour tokens from style.css. */
.cgl-calc-mount, #cgl-calculator { margin: 2.5rem 0; }
.cglc { background: var(--surface, #fbfcfb); border: 1px solid var(--line, rgba(16,48,44,.16)); border-radius: var(--radius, 6px); padding: clamp(1.1rem, 3vw, 2.25rem); box-shadow: var(--shadow, none); color: var(--ink, #10302c); font-family: var(--sans, system-ui, sans-serif); }
.cglc .screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.cglc-head { margin-bottom: 1.5rem; }
.cglc-eyebrow { margin: 0 0 .35rem; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--marsh, #36695b); font-weight: 600; }
.cglc .cglc-title { margin: 0 0 .4rem; font-family: var(--serif, Georgia, serif); font-size: clamp(1.7rem, 4vw, 2.4rem); line-height: 1.1; font-weight: 600; }
.cglc-intro { margin: 0; color: var(--muted, #4a625d); }
.cglc-grid { display: grid; gap: clamp(1.25rem, 3vw, 2.5rem); grid-template-columns: minmax(0, 1fr); }
.cgl-calc-mount, #cgl-calculator { container-type: inline-size; }
@container (min-width: 760px) { .cglc-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; } .cglc-results { position: sticky; top: 6rem; } }
.cglc-set { border: 0; margin: 0 0 1.25rem; padding: 0; min-width: 0; }
.cglc-set legend { font-weight: 600; font-size: 1.05rem; padding: 0 0 .5rem; margin-bottom: .25rem; border-bottom: 1px solid var(--line, rgba(16,48,44,.16)); width: 100%; }
.cglc-field { padding: .7rem 0; }
.cglc-field + .cglc-field { border-top: 1px dashed rgba(16, 48, 44, .1); }
.cglc-field__top { display: flex; justify-content: space-between; gap: .75rem; align-items: baseline; }
.cglc-field label { display: block; font-size: .95rem; font-weight: 500; margin-bottom: .45rem; }
.cglc-note { font-weight: 600; color: var(--marsh, #36695b); white-space: nowrap; }
.cglc-field__row { display: grid; grid-template-columns: minmax(0, 1fr) 9.5rem; gap: .9rem; align-items: center; }
.cglc-box { display: flex; align-items: center; background: #fff; border: 1px solid rgba(16, 48, 44, .3); border-radius: var(--radius, 6px); padding: 0 .6rem; min-height: 46px; }
.cglc-box:focus-within { outline: 3px solid var(--sand, #d8b676); outline-offset: 1px; border-color: var(--sea, #1d4842); }
.cglc-box input { border: 0; background: transparent; width: 100%; min-width: 0; font: inherit; font-size: 1rem; font-variant-numeric: tabular-nums; padding: .55rem .25rem; color: inherit; text-align: right; box-shadow: none; }
.cglc-box input:focus { outline: none; }
.cglc-unit { color: var(--muted, #4a625d); font-weight: 600; }
.cglc-unit--after { padding-left: .2rem; font-size: .9rem; }
.cglc-select { width: 100%; min-height: 46px; font: inherit; border: 1px solid rgba(16, 48, 44, .3); border-radius: var(--radius, 6px); padding: .5rem .7rem; background: #fff; color: inherit; }
.cglc-select:focus-visible { outline: 3px solid var(--sand, #d8b676); outline-offset: 1px; }

/* Range slider */
.cglc input[type="range"] { --fill: 50%; -webkit-appearance: none; appearance: none; width: 100%; height: 44px; background: transparent; margin: 0; cursor: pointer; }
.cglc input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 99px; background: linear-gradient(to right, var(--sea, #1d4842) var(--fill), rgba(16, 48, 44, .15) var(--fill)); }
.cglc input[type="range"]::-moz-range-track { height: 6px; border-radius: 99px; background: rgba(16, 48, 44, .15); }
.cglc input[type="range"]::-moz-range-progress { height: 6px; border-radius: 99px; background: var(--sea, #1d4842); }
.cglc input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -10px; border-radius: 50%; background: var(--sand, #d8b676); border: 3px solid #fff; box-shadow: 0 1px 4px rgba(16, 48, 44, .45); }
.cglc input[type="range"]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--sand, #d8b676); border: 3px solid #fff; box-shadow: 0 1px 4px rgba(16, 48, 44, .45); }
.cglc input[type="range"]:focus-visible { outline: 3px solid var(--sand, #d8b676); outline-offset: 2px; border-radius: 4px; }

/* Results */
.cglc-results { background: var(--sea, #1d4842); color: var(--on-dark, #f3f6f4); border-radius: var(--radius, 6px); padding: clamp(1.1rem, 3vw, 1.75rem); }
.cglc-total { text-align: center; padding-bottom: 1rem; border-bottom: 1px solid rgba(243, 246, 244, .18); }
.cglc-total__label { margin: 0; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; color: var(--on-dark-muted, #c5d3ce); }
.cglc-total__value { margin: .2rem 0 0; font-family: var(--serif, Georgia, serif); font-size: clamp(2.6rem, 8vw, 3.6rem); line-height: 1; font-weight: 600; color: var(--sand, #d8b676); font-variant-numeric: tabular-nums; }
.cglc-total__value span { display: block; font-family: var(--sans, sans-serif); font-size: .95rem; color: var(--on-dark-muted, #c5d3ce); font-weight: 400; margin-top: .3rem; }
.cglc-chart { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: 1.1rem; align-items: center; padding: 1.1rem 0; border-bottom: 1px solid rgba(243, 246, 244, .18); }
.cglc-donut { width: 100%; height: auto; transform: rotate(0deg); }
.cglc-donut > circle { stroke: rgba(243, 246, 244, .12); }
.cglc-legend { list-style: none; margin: 0; padding: 0; font-size: .9rem; }
.cglc-legend li { display: grid; grid-template-columns: .8rem minmax(0, 1fr) auto; gap: .55rem; align-items: center; padding: .22rem 0; }
.cglc-legend__val { font-variant-numeric: tabular-nums; font-weight: 600; text-align: right; }
.cglc-legend__pc { font-weight: 400; color: var(--on-dark-muted, #c5d3ce); }
.cglc-swatch { width: .8rem; height: .8rem; border-radius: 3px; display: inline-block; border: 1px solid rgba(255, 255, 255, .5); }
.cglc-swatch[data-c="fin"] { background: #f3f6f4; }
.cglc-swatch[data-c="pitch"] { background: #d8b676; }
.cglc-swatch[data-c="energy"] { background: #8fc1b1; }
.cglc-swatch[data-c="maint"] { background: #5f8f82; }
.cglc-swatch[data-c="ins"] { background: #c98a3e; }
.cglc-figs { margin: 1rem 0; display: grid; gap: .1rem; }
.cglc-figs div { display: flex; justify-content: space-between; gap: 1rem; padding: .35rem 0; border-bottom: 1px dashed rgba(243, 246, 244, .14); }
.cglc-figs dt { color: var(--on-dark-muted, #c5d3ce); font-size: .93rem; }
.cglc-figs dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.cglc-msg { background: rgba(216, 182, 118, .16); border-left: 3px solid var(--sand, #d8b676); padding: .6rem .8rem; font-size: .92rem; margin: 0 0 1rem; }
.cglc-enquire { width: 100%; justify-content: center; text-align: center; }
.cglc-small { margin: .6rem 0 0; font-size: .82rem; color: var(--on-dark-muted, #c5d3ce); text-align: center; }

/* Compliance */
.cglc-legal { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line, rgba(16,48,44,.16)); font-size: .86rem; color: var(--muted, #4a625d); line-height: 1.55; }
.cglc-legal p { margin: .5rem 0 0; }
.cglc-provider, .cgl-bh { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; color: var(--ink, #10302c); font-weight: 600; font-size: .9rem; }
.cglc-provider img, .cgl-bh img { height: 40px; width: auto; display: block; }

/* Finance page: Black Horse panel and firms list */
.cgl-bh-panel { background: var(--surface, #fbfcfb); border: 1px solid var(--line, rgba(16,48,44,.16)); border-radius: var(--radius, 6px); padding: 1.25rem 1.4rem; margin: 2rem 0; }
.cgl-bh-panel p { font-size: .92rem; }
.cgl-firms { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: .6rem; }
.cgl-firms li { background: var(--surface, #fbfcfb); border: 1px solid var(--line, rgba(16,48,44,.16)); border-radius: var(--radius, 6px); padding: .8rem 1rem; }
.cgl-firms strong { display: block; }

/* On the Finance page, let the calculator use more of the screen than the text column. */
@media (min-width: 1000px) {
  .prose .cgl-calc-mount { width: min(1120px, calc(100vw - 2 * var(--gutter, 2rem) - 20px)); margin-left: calc(50% - min(560px, calc(50vw - var(--gutter, 2rem) - 10px))); max-width: none; }
}
@container (max-width: 430px) {
  .cglc-chart { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .cglc-donut { width: 9rem; }
  .cglc-legend { width: 100%; }
}
@media (max-width: 560px) {
  .cglc { padding: 1rem; margin-left: 0; margin-right: 0; }
  .cglc-field__row { grid-template-columns: minmax(0, 1fr) 7.6rem; gap: .6rem; }
  .cglc-legend { font-size: .9rem; }
}
@media (prefers-reduced-motion: reduce) { .cglc * { scroll-behavior: auto !important; } }

/* Part exchange guide price link under the part exchange field */
.cglc-link { margin: .15rem 0 0; font-size: .9rem; }
.cglc-link a { display: inline-flex; align-items: center; min-height: 44px; color: var(--marsh, #2f6b5e); font-weight: 600; }
/* Legend rows: label and value never paint over each other (QA 24 Oct, wide screens); the value drops to its own line if space runs out. */
.cglc-legend li { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .55rem; }
.cglc-legend li > :first-child { flex: none; }
.cglc-legend__label { flex: 1 1 auto; }
.cglc-legend__val { margin-left: auto; white-space: nowrap; }
.cglc input[type="range"] { font-size: 16px; }

/* Park fees list under Running costs: label on the left, amount on the right, at every width. */
.cglc-parkfees { margin-top: .6rem; }
.cglc-parkfees__title { margin: 0 0 .4rem; font-weight: 600; font-size: .95rem; }
.cglc-parkfees__list { list-style: none; margin: 0; padding: 0; font-size: .92rem; }
.cglc-parkfees__list li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .15rem 1rem; padding: .4rem 0; border-bottom: 1px dashed rgba(16, 48, 44, .14); margin: 0; }
.cglc-parkfees__list li > span:first-child { flex: 1 1 10rem; min-width: 0; }
.cglc-parkfees__list li > span:last-child:not(:first-child) { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cglc-parkfees__list li.cglc-parkfees__season { display: block; color: var(--muted, #4a625d); font-size: .86rem; border-bottom: 0; }
