@font-face {
  font-family: "Kippax Modern Condensed";
  src: url("https://fonts.mancity.com/fonts/Kippax/KippaxModern-CndBd.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 700;
}

@font-face {
  font-family: "Kippax Modern";
  src: url("https://fonts.mancity.com/fonts/Kippax/KippaxModern-Rg.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 400;
}

@font-face {
  font-family: "Kippax Modern";
  src: url("https://fonts.mancity.com/fonts/Kippax/KippaxModern-Bd.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 700;
}

:root {
  --ink: #071f41;
  --muted: #526678;
  --line: #c9d7e4;
  --surface: #ffffff;
  --field: #f5f9fc;
  --city-blue: #6cabdd;
  --city-blue-light: #d7edfb;
  --navy: #001838;
  --accent: #001838;
  --accent-dark: #0b2d55;
  --warning-bg: #fff6dd;
  --fail: #a32920;
  --fail-bg: #fff0ee;
  --shadow: 0 20px 56px rgba(0, 24, 56, 0.16);
  --heading-font: "Kippax Modern Condensed", "Arial Narrow", Arial, Helvetica, sans-serif;
  --body-font: "Kippax Modern", Arial, Helvetica, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: #f1f3f5;
  font-family: var(--body-font);
  line-height: 1.5;
}

button,
input,
select {
  font: inherit;
}

a {
  color: inherit;
}

.app-shell {
  width: min(1160px, calc(100% - 32px));
  min-height: calc(100vh - 92px);
  margin: 22px auto;
  display: grid;
  grid-template-columns: minmax(310px, 0.94fr) minmax(380px, 1.06fr);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.intro-panel {
  position: relative;
  padding: clamp(28px, 5vw, 56px);
  color: var(--navy);
  background: #6caddf;
  overflow: hidden;
}

.intro-logo {
  display: block;
  width: clamp(86px, 12vw, 118px);
  height: auto;
  margin: 0 0 46px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--navy);
  font-family: var(--heading-font);
  font-size: 1.34rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

strong {
  font-weight: 700;
}

h1 {
  max-width: 520px;
  margin-bottom: 18px;
  color: var(--navy);
  font-family: var(--heading-font);
  font-size: clamp(2.35rem, 5vw, 4.35rem);
  font-weight: 700;
  line-height: 0.98;
  text-transform: uppercase;
}

h2 {
  margin-bottom: 18px;
  color: var(--navy);
  font-family: var(--heading-font);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  text-transform: none;
}

.intro-panel > p:not(.eyebrow) {
  max-width: 520px;
  color: rgba(0, 24, 56, 0.82);
  font-size: 1.04rem;
  font-weight: 400;
}

.scheme-facts {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 16px;
  margin: 36px 0 0;
}

.scheme-facts div {
  padding-top: 16px;
  border-top: 1px solid rgba(0, 24, 56, 0.22);
}

.scheme-facts dt {
  color: var(--navy);
  font-family: var(--heading-font);
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.scheme-facts dd {
  margin: 4px 0 0;
  color: var(--navy);
  font-weight: 400;
}

.flow-panel {
  padding: clamp(24px, 4vw, 48px);
  background:
    linear-gradient(180deg, #ffffff 0, #ffffff 68%, #f7fbfd 100%);
}

body.is-embedded {
  min-height: 0;
  background: transparent;
}

body.is-embedded .app-shell {
  width: 100%;
  min-height: 0;
  margin: 0;
  display: block;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

body.is-embedded .intro-panel {
  display: none;
}

body.is-embedded .flow-panel {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0;
  background: transparent;
}

.legal-footer {
  width: min(1160px, calc(100% - 32px));
  margin: -6px auto 22px;
  color: rgba(7, 31, 65, 0.68);
  font-size: 0.74rem;
}

.legal-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
}

.legal-footer a {
  color: inherit;
  text-decoration: none;
}

.legal-footer a:hover {
  color: var(--navy);
}

body.is-embedded .legal-footer {
  width: 100%;
  max-width: 760px;
  margin: 22px auto 0;
}

.screen {
  display: none;
}

.screen.is-visible {
  display: block;
}

.details-form {
  display: grid;
  gap: 16px;
}

.details-form > .primary-button {
  margin-top: 20px;
}

.screen-kicker {
  margin-bottom: 6px;
  color: #3bd6ff;
  font-family: var(--heading-font);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

label,
.stripe-label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 400;
}

.stripe-label > span:first-child {
  color: var(--navy);
  font-size: 1rem;
}

.field-help {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.field-help a {
  color: var(--navy);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-copy {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.legal-copy a {
  color: var(--navy);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

input,
select,
.card-element {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  color: var(--ink);
  padding: 13px 14px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input:focus,
select:focus,
.card-element.StripeElement--focus {
  border-color: var(--city-blue);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(108, 171, 221, 0.26);
}

input[readonly] {
  background: #edf4f9;
  color: var(--navy);
  cursor: default;
}

.details-form.has-identity-summary input[name="addressLine1"],
.details-form.has-identity-summary input[name="city"],
.details-form.has-identity-summary input[name="postcode"] {
  background: #ffffff;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 170px;
  gap: 14px;
}

.primary-button,
.secondary-button {
  min-height: 50px;
  display: inline-grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 20px;
  font-family: var(--body-font);
  font-weight: 400;
  cursor: pointer;
  text-transform: none;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}

.link-button {
  text-decoration: none;
}

.primary-button {
  color: #ffffff;
  background: var(--navy);
}

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

.secondary-button {
  color: var(--navy);
  background: #ffffff;
  border-color: var(--line);
}

.secondary-button:hover {
  border-color: var(--city-blue);
  background: var(--city-blue-light);
}

.text-button {
  min-height: auto;
  display: inline;
  border: 0;
  padding: 0;
  color: var(--navy);
  background: transparent;
  font-family: var(--body-font);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.text-button:hover {
  color: var(--accent-dark);
}

.primary-button:disabled,
.secondary-button:disabled,
.text-button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.primary-button:not(:disabled):active,
.secondary-button:not(:disabled):active {
  transform: translateY(1px);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.summary-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(0, 24, 56, 0.08);
}

.summary-name {
  margin-bottom: 4px;
  color: var(--navy);
  font-weight: 400;
}

.details-form .summary-block {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}

.details-form .summary-name {
  min-width: 0;
  margin-bottom: 0;
}

.summary-sign-out {
  flex: 0 0 auto;
  margin-top: 0;
  font-size: 0.78rem;
  font-weight: 400;
  white-space: nowrap;
}

.summary-block p {
  margin-bottom: 0;
}

.validation-summary {
  padding: 14px 16px;
  border-color: #d8e5f1;
  background: #f5f9fc;
  box-shadow: none;
}

.validation-summary .summary-name {
  color: var(--muted);
  font-size: 0.88rem;
}

.validation-summary p {
  color: var(--muted);
  font-size: 0.88rem;
}

.validation-summary .summary-sign-out {
  color: var(--navy);
}

.household-copy {
  max-width: 620px;
  color: var(--ink);
}

.household-small-copy {
  font-size: 0.92rem;
}

.household-form {
  margin-top: 26px;
}

.dependant-entry {
  display: grid;
  gap: 16px;
}

.dependant-entry input,
.dependant-entry select {
  background: #ffffff;
}

.dependant-entry[hidden] {
  display: none;
}

.dependant-age-field {
  width: min(150px, 100%);
}

.dependant-list {
  display: grid;
  gap: 10px;
  margin: 0 0 22px;
}

.dependant-list:empty {
  display: none;
}

.dependant-summary-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(110px, auto) auto;
  gap: 14px;
  align-items: baseline;
  color: var(--navy);
  font-size: 0.92rem;
}

.remove-dependant-link {
  justify-self: start;
  font-size: 0.82rem;
  font-weight: 400;
}

.dependant-count {
  align-self: center;
  color: var(--muted);
  font-size: 0.9rem;
}

#stripeArea {
  margin-top: 42px;
}

#stripeArea .stripe-label > span:first-child {
  color: var(--navy);
  font-size: 1.12rem;
}

.validation-actions {
  margin-top: 34px;
}

.household-add-row {
  align-items: center;
}

.household-actions {
  margin-top: 34px;
}

.fail-actions {
  margin-top: 34px;
}

.success-actions {
  margin-top: 34px;
}

.card-element {
  margin-top: 7px;
  background: #ffffff;
}

.fine-print {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.message {
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 0.94rem;
  font-weight: 400;
}

.message-error {
  border: 1px solid #e4b6ad;
  color: var(--fail);
  background: var(--fail-bg);
}

.message-info {
  border: 1px solid #ebcf71;
  color: var(--navy);
  background: var(--warning-bg);
}

.debug-controls {
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: min(420px, calc(100vw - 24px));
  padding: 8px;
  border: 1px solid rgba(0, 24, 56, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 24px rgba(0, 24, 56, 0.14);
}

.debug-controls[hidden] {
  display: none;
}

.debug-controls span,
.debug-controls button {
  min-height: 30px;
  border-radius: 6px;
  font-size: 0.78rem;
}

.debug-controls span {
  display: inline-grid;
  place-items: center;
  padding: 0 6px;
  color: var(--muted);
}

.debug-controls button {
  border: 1px solid var(--line);
  padding: 0 9px;
  color: var(--navy);
  background: #ffffff;
  cursor: pointer;
}

.debug-controls button.is-active {
  border-color: var(--navy);
  color: #ffffff;
  background: var(--navy);
}

@media (max-width: 840px) {
  .app-shell {
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .intro-panel {
    min-height: 330px;
  }

}

@media (max-width: 560px) {
  .app-shell {
    width: min(100% - 18px, 1120px);
    margin: 9px auto;
  }

  .flow-panel,
  .intro-panel {
    padding: 20px;
  }

  body.is-embedded .flow-panel {
    max-width: none;
    padding: 0;
  }

  h1 {
    font-size: 2.32rem;
  }

  .intro-panel > p:not(.eyebrow) {
    font-size: 0.98rem;
  }

  .scheme-facts {
    gap: 12px;
    margin-top: 26px;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .dependant-summary-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .button-row {
    display: grid;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }
}
