@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=DM+Sans:wght@400;500;600;700&display=swap");

:root {
  color-scheme: light;
  --rcf-navy: #011a3a;
  --rcf-navy-soft: #0f2747;
  --rcf-gold: #b98249;
  --rcf-gold-hover: #a6743f;
  --rcf-gold-light: #f4ebe1;
  --rcf-cream: #f8f7f5;
  --rcf-white: #ffffff;
  --rcf-text: #011a3a;
  --rcf-muted: #5c6678;
  --rcf-border: #ddd6cb;
  --rcf-error: #b42318;
  --font-serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-sans: "DM Sans", Arial, Helvetica, sans-serif;
  --radius-sm: 2px;
  --radius-md: 8px;
  --shadow-panel: 0 18px 40px rgba(1, 26, 58, 0.08);
}

* { box-sizing: border-box; }

html, body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--rcf-text);
  background:
    radial-gradient(circle at top right, rgba(185, 130, 73, 0.08), transparent 28%),
    linear-gradient(180deg, #fcfbf9 0%, var(--rcf-cream) 100%);
}

.masthead {
  min-height: 78px;
  padding: 14px max(20px, calc((100vw - 760px) / 2));
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--rcf-navy);
  color: var(--rcf-white);
  border-bottom: 1px solid rgba(185, 130, 73, 0.35);
}

.masthead-copy strong,
.masthead-copy span {
  display: block;
}

.masthead-copy strong {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.masthead-copy span {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-logo {
  width: auto;
  height: 46px;
  display: block;
}

main {
  width: min(760px, 100%);
  min-width: 0;
  margin: 0 auto;
  padding: 28px 20px 52px;
}

.form-panel,
.result-panel,
.error-panel {
  background: var(--rcf-white);
  border: 1px solid var(--rcf-border);
  border-radius: var(--radius-md);
  padding: clamp(22px, 5vw, 38px);
  box-shadow: var(--shadow-panel);
}

.heading {
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--rcf-gold);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 12px;
  color: var(--rcf-navy);
  font-family: var(--font-serif);
  font-size: clamp(34px, 7vw, 48px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.lead {
  margin: 0 0 18px;
  color: var(--rcf-muted);
  font-size: 15px;
  line-height: 1.55;
}

label,
legend {
  font-weight: 600;
  font-size: 14px;
  color: var(--rcf-navy);
}

input,
select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 48px;
  margin: 7px 0 18px;
  border: 1px solid var(--rcf-border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  background: var(--rcf-white);
  color: var(--rcf-text);
  font: inherit;
}

input:focus,
select:focus {
  outline: 3px solid rgba(185, 130, 73, 0.28);
  border-color: var(--rcf-gold);
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}

.two-column > *,
.choice-grid > *,
.frequency > * {
  min-width: 0;
}

fieldset {
  min-width: 0;
  margin: 8px 0 24px;
  padding: 18px;
  border: 1px solid var(--rcf-border);
  border-radius: var(--radius-md);
  background: rgba(248, 247, 245, 0.65);
}

legend {
  padding: 0 7px;
  color: var(--rcf-navy);
  font-family: var(--font-serif);
  font-size: 18px;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 5px 0 18px;
}

.frequency {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}

.choice {
  position: relative;
  display: block;
}

.choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.choice span {
  min-height: 48px;
  display: grid;
  place-items: center;
  padding: 9px;
  border: 1px solid var(--rcf-border);
  border-radius: var(--radius-sm);
  text-align: center;
  font-weight: 600;
  background: var(--rcf-white);
}

.choice input:checked + span {
  border-color: var(--rcf-navy);
  background: var(--rcf-gold-light);
  color: var(--rcf-navy);
  box-shadow: inset 0 0 0 1px var(--rcf-navy);
}

.choice input:focus-visible + span {
  outline: 3px solid rgba(185, 130, 73, 0.35);
}

.currency {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  margin-top: 7px;
}

.currency span {
  height: 48px;
  display: grid;
  place-items: center;
  background: var(--rcf-gold-light);
  border: 1px solid var(--rcf-border);
  border-right: 0;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  font-weight: 700;
  color: var(--rcf-navy);
}

.currency input {
  margin: 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

button,
.primary-link {
  width: 100%;
  min-height: 50px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: var(--radius-md);
  padding: 12px 18px;
  background: var(--rcf-gold);
  color: var(--rcf-navy);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

button:hover,
.primary-link:hover {
  background: var(--rcf-gold-hover);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.secondary-link {
  width: 100%;
  min-height: 50px;
  display: grid;
  place-items: center;
  margin-top: 12px;
  border: 1px solid var(--rcf-border);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  background: var(--rcf-white);
  color: var(--rcf-navy);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.secondary-link:hover {
  background: var(--rcf-gold-light);
  border-color: var(--rcf-gold);
}

.action-row {
  margin-top: 18px;
}

.privacy,
.notice {
  margin: 14px 0 0;
  color: var(--rcf-muted);
  font-size: 13px;
  line-height: 1.45;
}

.quote {
  margin: 0 0 18px;
  padding: 14px 16px;
  border-left: 3px solid var(--rcf-gold);
  background: var(--rcf-gold-light);
  color: var(--rcf-navy-soft);
  font-family: var(--font-serif);
  font-size: 20px;
  line-height: 1.35;
}

.error {
  margin: -12px 0 16px;
  color: var(--rcf-error);
  font-size: 13px;
}

.result-layout {
  padding-top: 24px;
}

.result-panel,
.error-panel {
  max-width: 620px;
  margin: 0 auto;
}

dl {
  margin: 24px 0;
  border-top: 1px solid var(--rcf-border);
}

dl div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 13px 0;
  border-bottom: 1px solid var(--rcf-border);
}

dt {
  color: var(--rcf-muted);
}

dd {
  margin: 0;
  font-weight: 700;
  text-align: right;
  color: var(--rcf-navy);
}

.site-footer {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 0 20px 28px;
  color: var(--rcf-muted);
  font-size: 12px;
  text-align: center;
}

.site-footer em {
  display: block;
  margin-top: 4px;
  color: var(--rcf-gold);
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hidden {
  display: none;
}

@media (max-width: 620px) {
  .two-column,
  .frequency {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .choice-grid {
    grid-template-columns: 1fr 1fr;
  }

  main {
    padding: 20px 14px 40px;
  }

  .form-panel,
  .result-panel,
  .error-panel {
    padding: 22px 18px;
  }

  .masthead-copy strong {
    font-size: 20px;
  }
}
