/* Elsham Digital fee savings calculator
   Colours and type matched to elshamdigital.co.uk (Nov 2026):
   ink #000, paper #FFFFFF, mist #F4F4F4; Anton display, Poppins body. */

@font-face {
  font-family: "Anton";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/anton-400.woff2") format("woff2");
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/poppins-400.woff2") format("woff2");
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/poppins-500.woff2") format("woff2");
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/poppins-600.woff2") format("woff2");
}

:root {
  --ink: #000000;
  --paper: #ffffff;
  --mist: #f4f4f4;
  --muted: rgba(0, 0, 0, 0.72);
  --line: rgba(0, 0, 0, 0.12);
  --error: #b42318;
  --focus: #2563eb;
  --space: 24px;
  --max: 760px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  min-width: 0;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--ink);
}

a:hover {
  color: rgba(0, 0, 0, 0.7);
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  z-index: 10;
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px var(--space);
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-link img {
  width: min(220px, 70vw);
  height: auto;
}

.header-phone {
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
}

/* Banner */
.example-banner {
  background: var(--ink);
  color: var(--paper);
  text-align: center;
  padding: 12px var(--space);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
}

.example-banner strong {
  font-weight: 600;
}

/* Hero + form column */
.main {
  padding: 48px 0 72px;
}

.main .wrap {
  max-width: var(--max);
}

.eyebrow {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.rule {
  width: 120px;
  height: 2px;
  background: var(--ink);
}

.eyebrow p {
  margin: 0;
  font-size: 15px;
}

h1,
h2 {
  font-family: "Anton", Impact, sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 0.95;
  text-wrap: balance;
  margin: 0 0 16px;
}

h1 {
  font-size: clamp(40px, 9vw, 64px);
}

h2 {
  font-size: clamp(28px, 6vw, 40px);
}

.promise {
  margin: 0 0 28px;
  font-size: clamp(18px, 2.4vw, 22px);
  font-weight: 500;
  max-width: 40rem;
}

.privacy-note {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 15px;
}

/* Form */
.calc-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: var(--mist);
  padding: 24px 20px;
  margin: 0 0 28px;
}

@media (min-width: 640px) {
  .calc-form {
    padding: 32px;
  }
}

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

legend {
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 8px;
  padding: 0;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-weight: 500;
  font-size: 15px;
}

.hint {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

input[type="number"],
input[type="text"],
select {
  font-family: "Poppins", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.4;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 0;
  padding: 12px 14px;
  min-height: 48px;
  width: 100%;
}

input[type="number"]:disabled {
  background: #e8e8e8;
  color: rgba(0, 0, 0, 0.5);
}

.field.error input {
  border-color: var(--error);
}

.error-msg {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--error);
}

.error-msg:empty {
  display: none;
}

.form-error {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--error);
}

.form-error:empty {
  display: none;
}

.mode-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mode-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 15px;
  min-height: 44px;
  padding: 8px 0;
  cursor: pointer;
}

.mode-option input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--ink);
}

.breakdown {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 4px;
}

.breakdown[hidden],
.total-only[hidden] {
  display: none;
}

button[type="submit"] {
  appearance: none;
  background: var(--ink);
  color: var(--paper);
  border: 0;
  border-radius: 0;
  font-family: "Poppins", system-ui, sans-serif;
  font-weight: 600;
  font-size: 16px;
  padding: 16px 28px;
  min-height: 52px;
  cursor: pointer;
  align-self: flex-start;
}

button[type="submit"]:hover {
  background: #262626;
}

button[type="submit"]:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

/* Results */
.results {
  display: flex;
  flex-direction: column;
  gap: 16px;
  border: 2px solid var(--ink);
  padding: 24px 20px;
  margin: 0 0 36px;
}

@media (min-width: 640px) {
  .results {
    padding: 32px;
  }
}

.results[hidden] {
  display: none;
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 640px) {
  .grid {
    grid-template-columns: 1fr 1fr;
  }
}

.stat {
  background: var(--mist);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat dt {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

.stat dd {
  margin: 0;
  font-family: "Anton", Impact, sans-serif;
  font-size: clamp(28px, 5vw, 36px);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

/* Effective rate + scenario table */
.effective-rate {
  margin: 0;
  padding: 14px 16px;
  background: var(--mist);
  font-weight: 600;
}

.effective-rate:empty {
  display: none;
}

.scenarios {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.scenario-label {
  margin: 8px 0 0;
  font-family: "Poppins", system-ui, sans-serif;
  font-size: 15px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.scenario-caption {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-scroll:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.scenario-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.scenario-table th,
.scenario-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  vertical-align: top;
}

.scenario-table th:first-child {
  text-align: left;
}

.scenario-table thead th {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 2px solid var(--ink);
  vertical-align: bottom;
}

.scenario-table tbody th {
  font-weight: 600;
}

.from-rate {
  margin: 0;
  font-size: 14px;
}

.from-rate[hidden] {
  display: none;
}

.results-note {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

/* What is in my statement? */
.decoder {
  margin: 0 0 48px;
}

.decoder-intro {
  margin: 0 0 12px;
  font-size: 17px;
  font-weight: 500;
}

.decoder .privacy-note {
  margin-bottom: 20px;
}

.decoder-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: var(--mist);
  padding: 24px 20px;
  margin: 0 0 20px;
}

@media (min-width: 640px) {
  .decoder-panel {
    padding: 32px;
  }
}

select {
  appearance: none;
  cursor: pointer;
  padding-right: 44px;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%),
    linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.calc-form:focus {
  outline: none;
}

.decoder-answer:empty {
  display: none;
}

.decoder-answer,
.decoder-matches li {
  background: var(--paper);
  border: 2px solid var(--ink);
  padding: 14px 16px;
}

.decoder-name {
  margin: 0 0 4px;
  font-weight: 600;
}

.decoder-explanation {
  margin: 0;
}

.decoder-help {
  margin: 8px 0 0;
  font-size: 14px;
}

.decoder-watch-out {
  margin: 8px 0 0;
  font-size: 14px;
  font-weight: 500;
}

.decoder-status {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
}

.decoder-status:empty {
  display: none;
}

.decoder-matches {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.decoder-matches[hidden] {
  display: none;
}

.decoder-note {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--muted);
}

.decoder-link {
  margin: 16px 0 0;
  font-weight: 500;
}

/* CTA + FAQ + footer */
.cta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0 0 48px;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  font-size: 16px;
  padding: 16px 28px;
  min-height: 52px;
  align-self: flex-start;
}

.cta-btn:hover {
  color: var(--paper);
  background: #262626;
}

.cta .aside {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.faq {
  margin: 0 0 48px;
}

.faq details {
  border-top: 1px solid var(--line);
}

.faq details:last-child {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  font-weight: 600;
  min-height: 44px;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq-plus {
  flex-shrink: 0;
  font-weight: 400;
  font-size: 22px;
  line-height: 1;
  transition: transform 0.2s;
}

details[open] .faq-plus {
  transform: rotate(45deg);
}

.faq details p {
  margin: 0 0 16px;
  color: var(--muted);
}

.site-footer {
  background: var(--ink);
  color: var(--paper);
  padding: 36px 0 48px;
  font-size: 14px;
}

.site-footer .wrap {
  max-width: var(--max);
}

.site-footer a {
  color: var(--paper);
}

.site-footer a:hover {
  color: rgba(255, 255, 255, 0.75);
}

.disclaimer {
  margin: 0 0 16px;
}

.legal {
  margin: 0;
  color: rgba(255, 255, 255, 0.75);
}
