:root {
  color-scheme: light;
  font-family: "DM Sans", sans-serif;
  color: #281a3b;
  background: #f7f3fb;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --purple: #7042bd;
  --purple-dark: #4c288d;
  --ink: #281a3b;
  --muted: #81788c;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(ellipse at 82% 17%, rgba(201, 176, 240, 0.37), transparent 34rem),
    radial-gradient(ellipse at 5% 82%, rgba(226, 207, 250, 0.38), transparent 28rem),
    #f7f3fb;
}

button,
input {
  font: inherit;
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 3px solid #aa83e5;
  outline-offset: 3px;
}

.page-shell {
  display: flex;
  flex-direction: column;
  width: min(100% - 64px, 1184px);
  min-height: 100vh;
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 88px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: "Space Grotesk", sans-serif;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.8px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border-radius: 10px;
  background: var(--purple);
  color: white;
  font-size: 17px;
}

.brand-dot {
  color: var(--purple);
}

.topbar-note {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #6f657d;
  font-size: 13px;
  font-weight: 600;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #8dce9b;
  box-shadow: 0 0 0 4px rgba(141, 206, 155, 0.17);
}

main {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 46px 0 64px;
}

.intro {
  width: min(100%, 620px);
  margin-bottom: 32px;
  text-align: center;
}

.eyebrow,
.result-kicker {
  margin: 0 0 16px;
  color: var(--purple);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.65px;
}

.eyebrow span {
  margin-right: 5px;
  font-size: 15px;
}

h1,
h2 {
  font-family: "Space Grotesk", sans-serif;
}

h1 {
  margin: 0;
  font-size: clamp(38px, 5.3vw, 58px);
  font-weight: 600;
  letter-spacing: -2.7px;
  line-height: 1.08;
}

h1 span {
  color: var(--purple);
}

.intro-copy {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.card {
  width: min(100%, 620px);
  min-height: 186px;
  padding: 32px;
  border: 1px solid rgba(95, 67, 133, 0.08);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 55px rgba(62, 40, 91, 0.09), 0 2px 8px rgba(62, 40, 91, 0.03);
}

label {
  display: block;
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.address-inputs {
  display: grid;
  grid-template-columns: minmax(110px, 0.7fr) minmax(0, 1.3fr);
  gap: 12px;
}

input {
  width: 100%;
  min-width: 0;
  height: 54px;
  padding: 0 16px;
  border: 1px solid #e4dfea;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input::placeholder {
  color: #afa7b7;
  font-weight: 400;
}

input:focus {
  border-color: #9c78d1;
  box-shadow: 0 0 0 3px rgba(112, 66, 189, 0.11);
  outline: 0;
}

.primary-button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 54px;
  padding: 0 17px;
  border: 0;
  border-radius: 10px;
  background: var(--purple);
  color: white;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  transition: background 160ms ease, transform 160ms ease;
}

.primary-button:hover:not(:disabled) {
  transform: translateY(-1px);
  background: var(--purple-dark);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.button-arrow {
  font-size: 17px;
  line-height: 1;
}

.form-submit {
  width: 100%;
  margin-top: 16px;
}

.field-hint,
.form-error {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.form-error {
  color: #b42345;
  font-size: 13px;
}

.confirmation,
.success {
  text-align: center;
}

.result-icon,
.success-icon {
  display: grid;
  width: 48px;
  height: 48px;
  margin: 0 auto 17px;
  place-items: center;
  border-radius: 15px;
  background: #f0e9fb;
  color: var(--purple);
  font-size: 29px;
}

.confirmation .result-kicker,
.success .result-kicker {
  margin-bottom: 8px;
  font-size: 10px;
}

h2 {
  margin: 0;
  font-size: 25px;
  letter-spacing: -0.8px;
}

.result-postcode {
  margin: 8px 0 22px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.area-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0 0 24px;
  text-align: left;
}

.area-details div {
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid #eee8f4;
  border-radius: 11px;
  background: #fcfbfd;
}

.area-details dt {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.7px;
}

.area-details dd {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.confirmation-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 13px;
}

.confirmation-actions .primary-button {
  width: 100%;
}

.text-button {
  min-height: 40px;
  padding: 6px 10px;
  border: 0;
  background: transparent;
  color: var(--purple-dark);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: #c9b5e5;
  text-underline-offset: 3px;
}

.text-button:hover {
  color: var(--purple);
  text-decoration-color: currentColor;
}

.success-icon {
  border-radius: 50%;
  background: #e8f6ec;
  color: #278044;
  font-size: 22px;
  font-weight: 700;
}

.success-copy {
  margin: 12px 0 17px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.success-copy strong {
  color: var(--ink);
}

.privacy-note {
  margin: 20px 0 0;
  color: #81788c;
  font-size: 12px;
  text-align: center;
}

.privacy-note span {
  margin-right: 5px;
  color: var(--purple);
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  border-top: 1px solid rgba(110, 89, 138, 0.13);
  color: #948b9e;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.1px;
}

.footer a {
  color: #76658b;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
}

[hidden] {
  display: none !important;
}

@media (max-width: 600px) {
  .page-shell {
    width: min(100% - 36px, 440px);
  }

  .topbar {
    min-height: 70px;
  }

  .brand {
    font-size: 17px;
  }

  .topbar-note {
    gap: 7px;
    font-size: 11px;
  }

  main {
    justify-content: flex-start;
    padding: clamp(48px, 13vh, 105px) 0 48px;
  }

  .intro {
    margin-bottom: 26px;
  }

  h1 {
    font-size: clamp(37px, 10.2vw, 48px);
    letter-spacing: -2px;
  }

  .intro-copy {
    max-width: 340px;
    margin: 15px auto 0;
    font-size: 14px;
  }

  .card {
    padding: 24px 20px;
    border-radius: 17px;
  }

  .address-inputs {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .primary-button {
    width: 100%;
  }

  .field-hint {
    line-height: 1.5;
  }

  .area-details {
    gap: 8px;
  }

  .area-details div {
    padding: 12px;
  }

  .area-details dd {
    font-size: 14px;
  }

  .privacy-note {
    font-size: 11px;
    line-height: 1.5;
  }

  .footer {
    gap: 14px;
    font-size: 8px;
    letter-spacing: 0.7px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
