/* IPS Buyer's Agents — fees and fee calculator page styles
   Palette and type are the site's, copied from public/ips-faq/faq.css so the
   three authored pages stay one design: navy #09193b, cyan #35daf9, Sora +
   Inter. These are the site's real tokens; anything close but not equal to
   them (#0d2d5b, #13d9e8) is a near miss and should be corrected to these. */

:root {
  --navy: #09193b;
  --navy-deep: #050f26;
  --navy-mid: #0c214c;
  --cyan: #35daf9;
  --cyan-dark: #0797b9;
  --ink: #0c214c;
  --body: #35405c;
  --muted: #6a7898;
  --line: #e2e8f2;
  --wash: #f5f8fc;
  --paper: #ffffff;
  --radius: 16px;
  --shadow-sm: 0 2px 10px rgba(12, 33, 76, 0.05);
  --shadow-md: 0 18px 44px rgba(9, 25, 59, 0.12);
  --shadow-lg: 0 24px 60px rgba(9, 25, 59, 0.26);
}

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

/* Headings inside the page only — never the site header or footer. */
main h1,
main h2,
main h3 {
  font-family: 'Sora', 'Inter', sans-serif;
}

.fee-wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.fee-eyebrow {
  margin: 0;
  color: var(--cyan-dark);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
}

/* ------------------------------------------------------------------ hero */

.fee-hero {
  background: var(--navy);
  color: #fff;
  overflow: hidden;
  padding: 56px 0 64px;
  position: relative;
}

.fee-hero::before {
  background: radial-gradient(circle, rgba(53, 218, 249, 0.16), rgba(53, 218, 249, 0) 70%);
  content: '';
  height: 620px;
  position: absolute;
  right: -200px;
  top: -270px;
  width: 620px;
}

.fee-hero > .fee-wrap {
  position: relative;
  z-index: 1;
}

.fee-hero .fee-eyebrow {
  color: var(--cyan);
}

.fee-hero h1 {
  font-size: clamp(30px, 5vw, 46px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin: 14px 0 0;
  max-width: 20em;
}

.fee-lead {
  color: #c6dbee;
  font-size: 17px;
  line-height: 1.7;
  margin: 20px 0 0;
  max-width: 44em;
}

.fee-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  margin: 26px 0 0;
  padding: 0;
}

.fee-chips li {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(53, 218, 249, 0.3);
  border-radius: 999px;
  color: #e7f4fb;
  font-size: 13.5px;
  font-weight: 600;
  padding: 9px 15px;
}

/* ------------------------------------------------------------------- CTAs */

.fee-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 0;
}

.fee-btn {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 999px;
  display: inline-flex;
  font-size: 14.5px;
  font-weight: 700;
  gap: 8px;
  line-height: 1;
  padding: 15px 24px;
  text-decoration: none;
  transition: background-color 160ms ease-out, border-color 160ms ease-out,
    color 160ms ease-out, transform 160ms ease-out;
}

.fee-btn-primary {
  background: var(--cyan);
  border-color: var(--cyan);
  color: var(--navy-mid);
}

.fee-btn-primary:hover {
  background: #fff;
  border-color: #fff;
}

.fee-btn-ghost {
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
}

.fee-btn-ghost:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

/* On a white section the ghost button needs ink, not white. */
.fee-section .fee-btn-ghost {
  border-color: rgba(12, 33, 76, 0.28);
  color: var(--ink);
}

.fee-section .fee-btn-ghost:hover {
  border-color: var(--cyan-dark);
  color: var(--cyan-dark);
}

.fee-btn:active {
  transform: scale(0.97);
}

/* A quieter pair, used mid-page so the CTA repeats without shouting. */
.fee-cta-strip {
  align-items: center;
  background: var(--wash);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  margin: 32px 0 0;
  padding: 20px 24px;
}

.fee-cta-strip p {
  color: var(--body);
  font-size: 15.5px;
  line-height: 1.6;
  margin: 0;
  max-width: 46em;
}

.fee-cta-strip .fee-cta-row {
  margin: 0;
}

.fee-cta-strip .fee-btn {
  padding: 13px 20px;
}

/* ------------------------------------------------------------- sections */

.fee-section {
  padding: 56px 0;
}

.fee-section-wash {
  background: var(--wash);
}

.fee-section h2 {
  font-size: clamp(24px, 3.4vw, 32px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.18;
  margin: 12px 0 0;
}

.fee-section h3 {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.3;
  margin: 28px 0 0;
}

.fee-section p {
  color: var(--body);
  font-size: 16.5px;
  line-height: 1.75;
  margin: 14px 0 0;
  max-width: 46em;
}

.fee-section ul,
.fee-section ol {
  color: var(--body);
  font-size: 16.5px;
  line-height: 1.75;
  margin: 14px 0 0;
  max-width: 46em;
  padding-left: 22px;
}

.fee-section li + li {
  margin-top: 8px;
}

.fee-section strong {
  color: var(--ink);
}

.fee-section a:not(.fee-btn) {
  color: var(--cyan-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.fee-section a:not(.fee-btn):hover {
  color: var(--ink);
}

.fee-note {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.65;
  margin: 18px 0 0;
  max-width: 54em;
}

/* ----------------------------------------------------------- calculator */

.fee-calc {
  background: var(--wash);
  border-top: 1px solid var(--line);
  padding: 48px 0 56px;
}

.fee-calc-grid {
  align-items: stretch;
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  margin-top: 22px;
}

.fee-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  padding: 26px;
}

.fee-panel-head {
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  padding-bottom: 18px;
}

.fee-panel-head h2 {
  font-size: 24px;
  margin: 4px 0 0;
}

.fee-gst {
  background: #e4f8fe;
  border-radius: 999px;
  color: var(--cyan-dark);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 7px 11px;
  text-transform: uppercase;
  white-space: nowrap;
}

.fee-field {
  border-bottom: 1px solid #c3d5e5;
  display: block;
  margin-top: 22px;
  max-width: 420px;
  padding: 6px 0 9px;
  transition: background-color 160ms ease-out, border-color 160ms ease-out;
}

.fee-field:focus-within {
  background: rgba(53, 218, 249, 0.07);
  border-bottom-color: var(--cyan);
}

.fee-field-label {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.fee-field-row {
  align-items: baseline;
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.fee-currency {
  color: var(--muted);
  font-size: 18px;
  font-weight: 700;
}

.fee-input {
  background: transparent;
  border: 0;
  color: var(--navy-mid);
  font-family: inherit;
  font-size: 22px;
  font-weight: 700;
  outline: 0;
  padding: 0;
  width: 100%;
}

.fee-input::-webkit-inner-spin-button,
.fee-input::-webkit-outer-spin-button {
  appearance: none;
  margin: 0;
}

.fee-fieldset {
  border: 0;
  margin: 28px 0 0;
  padding: 0;
}

.fee-fieldset legend {
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0;
  text-transform: uppercase;
}

.fee-help {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin: 10px 0 0;
  max-width: 40em;
}

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

.fee-choice {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  padding: 14px;
  text-align: left;
  transition: background-color 160ms ease-out, border-color 160ms ease-out,
    color 160ms ease-out, transform 160ms ease-out;
}

.fee-choice:hover {
  border-color: #8fe3f8;
}

.fee-choice:active {
  transform: scale(0.985);
}

.fee-choice[aria-pressed='true'] {
  background: #e4f8fe;
  border-color: var(--cyan);
  box-shadow: 0 2px 8px rgba(12, 33, 76, 0.08);
  color: var(--ink);
}

.fee-choice-title {
  display: block;
  font-size: 15px;
  font-weight: 700;
}

.fee-choice-detail {
  display: block;
  font-size: 13px;
  line-height: 1.45;
  margin-top: 4px;
}

.fee-bracket {
  background: #e4f8fe;
  border-left: 3px solid var(--cyan);
  border-radius: 0 12px 12px 0;
  margin-top: 26px;
  padding: 14px 16px;
}

.fee-bracket-value {
  color: var(--ink);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 5px 0 0;
}

.fee-bracket-rule {
  color: #41618a;
  font-size: 14px;
  line-height: 1.55;
  margin: 5px 0 0;
}

/* the result card */

.fee-result {
  background: var(--navy);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 26px;
  position: relative;
}

.fee-result::after {
  background: radial-gradient(circle at 90% 8%, rgba(53, 218, 249, 0.26), transparent 44%);
  content: '';
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.fee-result > * {
  position: relative;
  z-index: 1;
}

.fee-result .fee-eyebrow {
  color: #8fe3f8;
}

.fee-result-value {
  color: var(--cyan);
  font-family: 'Sora', 'Inter', sans-serif;
  font-size: clamp(38px, 5vw, 54px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  margin: 16px 0 0;
}

.fee-result-msg {
  color: #d3e4f0;
  font-size: 14.5px;
  line-height: 1.65;
  margin: 14px 0 0;
}

.fee-result-msg strong {
  color: #fff;
}

.fee-split {
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
}

.fee-split li {
  align-items: baseline;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  color: #c8dceb;
  display: flex;
  font-size: 14px;
  gap: 12px;
  justify-content: space-between;
  padding: 12px 0;
}

.fee-split b {
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
}

.fee-split-saving {
  color: var(--cyan) !important;
}

.fee-split-saving b {
  color: var(--cyan);
}

.fee-result-foot {
  color: #9fc0da;
  font-size: 12.5px;
  line-height: 1.6;
  margin: 16px 0 0;
}

.fee-result .fee-cta-row {
  margin-top: 22px;
}

/* ------------------------------------------------------------- the table */

.fee-schedule {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  margin-top: 20px;
  overflow: hidden;
}

.fee-schedule-head {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  padding: 18px 24px;
}

.fee-schedule-head h2 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 4px 0 0;
}

.fee-table-scroll {
  overflow-x: auto;
}

.fee-table {
  border-collapse: collapse;
  width: 100%;
}

.fee-table th {
  background: #f4fafe;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 12px 24px;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.fee-table td {
  border-top: 1px solid #e6eef6;
  color: var(--ink);
  font-size: 15.5px;
  padding: 14px 24px;
}

.fee-table th:last-child,
.fee-table td:last-child {
  text-align: right;
}

.fee-table td:last-child {
  font-weight: 700;
  white-space: nowrap;
}

.fee-table tr[aria-current='true'] td {
  background: #e4f8fe;
}

/* The comparison table carries four columns and needs to stay readable. */
.fee-compare {
  margin-top: 20px;
}

.fee-compare .fee-table {
  min-width: 620px;
}

.fee-compare .fee-table td:not(:first-child),
.fee-compare .fee-table th:not(:first-child) {
  text-align: right;
}

.fee-compare .fee-table td.fee-ips {
  color: var(--cyan-dark);
  font-weight: 700;
}

/* --------------------------------------------------------------- figures */

.fee-stats {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  list-style: none;
  margin: 24px 0 0;
  max-width: none;
  padding: 0;
}

.fee-stats li,
/* `.fee-section li + li` outranks a single-class rule, so the grids reset the
   stacked-list margin explicitly or every card but the first sits 8px low. */
.fee-stats li + li,
.fee-brokers li,
.fee-brokers li + li {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  margin: 0;
  padding: 18px;
}

.fee-stat-value {
  color: var(--ink);
  display: block;
  font-family: 'Sora', 'Inter', sans-serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.fee-stat-label {
  color: var(--muted);
  display: block;
  font-size: 13.5px;
  line-height: 1.5;
  margin-top: 7px;
}

/* ---------------------------------------------------------------- brokers */

.fee-brokers {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
  list-style: none;
  margin: 18px 0 0;
  max-width: none;
  padding: 0;
}

.fee-brokers li {
  padding: 18px 20px;
}

.fee-broker-name {
  color: var(--ink);
  display: block;
  font-family: 'Sora', 'Inter', sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.fee-broker-role {
  color: var(--cyan-dark);
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.3;
  margin-top: 5px;
  text-transform: uppercase;
}

.fee-brokers p {
  font-size: 15px;
  line-height: 1.65;
  margin-top: 11px;
}

/* A card may carry more than one way to reach the broker (a phone number and
   a website), so they sit side by side with a gap rather than touching. */
.fee-brokers a {
  display: inline-block;
  font-size: 14.5px;
  font-weight: 700;
  margin: 11px 16px 0 0;
  overflow-wrap: anywhere;
}

.fee-brokers a:last-child {
  margin-right: 0;
}

/* ------------------------------------------------------------- the maths */

.fee-maths {
  background: var(--navy-mid);
  border-radius: var(--radius);
  color: #dce9f5;
  margin-top: 22px;
  max-width: 46em;
  padding: 22px 24px;
}

.fee-maths h3 {
  color: #fff;
  font-size: 17px;
  margin: 0;
}

.fee-maths p {
  color: #cadcec;
  font-size: 15.5px;
  margin-top: 12px;
}

.fee-maths strong {
  color: var(--cyan);
}

.fee-maths ul {
  color: #cadcec;
  font-size: 15.5px;
  margin-top: 12px;
}

/* ---------------------------------------------------------------- questions */

.fee-q {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-top: 10px;
  overflow: hidden;
}

.fee-q summary {
  color: var(--ink);
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.45;
  list-style: none;
  padding: 16px 48px 16px 20px;
  position: relative;
}

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

.fee-q summary::after {
  color: var(--cyan-dark);
  content: '+';
  font-size: 21px;
  font-weight: 700;
  line-height: 1;
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.fee-q[open] summary::after {
  content: '\2212';
}

.fee-q summary:hover {
  color: var(--cyan-dark);
}

.fee-q-body {
  border-top: 1px solid var(--line);
  padding: 4px 20px 18px;
}

.fee-q-body p {
  font-size: 16px;
  margin-top: 14px;
}

/* ------------------------------------------------------------- final band */

.fee-final {
  background: var(--navy);
  color: #fff;
  padding: 60px 0;
}

.fee-final .fee-eyebrow {
  color: var(--cyan);
}

.fee-final h2 {
  font-family: 'Sora', 'Inter', sans-serif;
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.14;
  margin: 13px 0 0;
}

.fee-final p {
  color: #c6dbee;
  font-size: 16.5px;
  line-height: 1.7;
  margin: 16px 0 0;
  max-width: 44em;
}

/* -------------------------------------------------------------- the fine print */
/* Sits last, below the closing call to action: the conflict and ownership
   disclosures and the footnote the asterisks point at. Deliberately quiet
   type - it has to be there and be readable, not compete with the page. */

.fee-smallprint {
  background: var(--wash);
  border-top: 1px solid var(--line);
  padding: 34px 0 42px;
}

.fee-smallprint h2 {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin: 0;
  text-transform: uppercase;
}

.fee-smallprint p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  margin: 12px 0 0;
  max-width: 64em;
}

.fee-smallprint strong {
  color: #4a5d7a;
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 900px) {
  .fee-calc-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .fee-wrap {
    padding: 0 20px;
  }

  .fee-hero {
    padding: 40px 0 46px;
  }

  .fee-section {
    padding: 42px 0;
  }

  .fee-panel,
  .fee-result {
    border-radius: 16px;
    padding: 20px;
  }

  .fee-choices {
    grid-template-columns: 1fr;
  }

  .fee-btn {
    justify-content: center;
    width: 100%;
  }

  .fee-cta-strip {
    padding: 18px 20px;
  }

  .fee-table th,
  .fee-table td {
    padding-left: 20px;
    padding-right: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fee-btn,
  .fee-choice {
    transition: none;
  }

  .fee-btn:active,
  .fee-choice:active {
    transform: none;
  }
}
