@font-face {
  font-family: "Inria Sans";
  src: local("Inria Sans Bold"),
       local("InriaSans-Bold"),
       url("/fonts/InriaSans-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --page-bg: #f3eee4;
  --surface: #ffffff;
  --surface-soft: #fbfaf7;
  --text: #1f2933;
  --muted: #415066;
  --muted-light: #667085;
  --brand-blue: #001c3a;
  --brand-orange: #e84e0f;
  --border: #d8dee7;
  --border-soft: #e3dfd7;
  --success-bg: #dcfce7;
  --success-text: #14532d;
  --success-border: #86efac;
  --error-bg: #fee2e2;
  --error-text: #7f1d1d;
  --error-border: #fecaca;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--page-bg);
  color: var(--text);
}

header {
  min-height: 84px;
  background: var(--surface);
  display: flex;
  align-items: center;
  padding: 0 32px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
}

.logo-link {
  display: inline-flex;
  align-items: center;
}

.logo {
  height: 48px;
  width: auto;
  display: block;
}

.header-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 18px;
  font-weight: 700;
}

.header-nav a {
  color: var(--brand-blue);
  text-decoration: none;
}

.header-nav a:hover {
  text-decoration: underline;
}

.header-nav .nav-button {
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--brand-blue);
  color: #ffffff;
}

.header-nav .nav-button:hover {
  text-decoration: none;
  background: var(--brand-orange);
}

.login-status {
  font-size: 0.95rem;
  color: var(--brand-blue);
  margin-right: 1rem;
}

main {
  flex: 1;
}

main:not(.account-page) {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
}

.placeholder-page {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
}

.placeholder {
  max-width: 720px;
}

.placeholder h1 {
  margin: 0 0 16px;
  font-family: "Inria Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 700;
  color: var(--brand-orange);
}

.placeholder p {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.6;
}

.account-page {
  background: var(--page-bg);
  padding: 96px 24px;
}

.account-card {
  max-width: 1040px;
  margin: 0 auto;
  background: var(--surface);
  border-radius: 28px;
  padding: 48px;
  box-shadow: 0 24px 70px rgba(0, 28, 58, 0.12);
}

.account-card-narrow {
  max-width: 560px;
}

.account-intro {
  max-width: 720px;
  margin: 0 auto 40px;
  text-align: center;
}

.account-intro .eyebrow {
  margin: 0 0 8px;
  color: var(--brand-orange);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.82rem;
}

.account-intro h1 {
  margin: 0 0 16px;
  color: var(--brand-blue);
  font-family: "Inria Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.05;
}

.account-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.6;
}

.account-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-section {
  border: 1px solid var(--border-soft);
  border-radius: 22px;
  padding: 28px;
  background: var(--surface-soft);
}

fieldset.form-section {
  min-inline-size: 0;
}

.form-section h2,
.form-section legend {
  margin: 0 0 20px;
  padding: 0;
  color: var(--brand-blue);
  font-size: 1.2rem;
  font-weight: 800;
}

.form-section p {
  margin: 0 0 20px;
  color: var(--muted);
  line-height: 1.55;
}

.form-grid {
  display: grid;
  gap: 20px;
}

.form-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-grid-address {
  grid-template-columns: 2fr 1fr 1fr;
}

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

.form-field label,
.account-form > label {
  color: var(--brand-blue);
  font-weight: 700;
  font-size: 0.95rem;
}

.optional {
  color: #6b7280;
  font-weight: 500;
}

.account-form input[type="text"],
.account-form input[type="email"],
.account-form input[type="tel"],
.account-form input[type="password"],
.account-form textarea {
  width: 100%;
  border: 1px solid #cfd6df;
  border-radius: 14px;
  padding: 14px 16px;
  font: inherit;
  color: var(--brand-blue);
  background: #ffffff;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.account-form textarea {
  resize: vertical;
  min-height: 120px;
}

.account-form input:focus,
.account-form textarea:focus {
  outline: none;
  border-color: var(--brand-orange);
  box-shadow: 0 0 0 4px rgba(232, 78, 15, 0.15);
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.choice-card,
.radio-pill,
.privacy-check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}

.choice-card {
  min-height: 72px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #ffffff;
  color: var(--brand-blue);
  font-weight: 650;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.choice-card:hover {
  border-color: var(--brand-orange);
  box-shadow: 0 10px 30px rgba(0, 28, 58, 0.08);
  transform: translateY(-1px);
}

.choice-card input,
.radio-pill input,
.privacy-check input {
  margin-top: 3px;
  accent-color: var(--brand-orange);
}

.newsletter-section {
  background: var(--brand-blue);
  color: #ffffff;
  border-color: var(--brand-blue);
}

.newsletter-section legend,
.newsletter-section p {
  color: #ffffff;
}

.radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.radio-pill {
  align-items: center;
  padding: 12px 18px;
  border-radius: 999px;
  background: #ffffff;
  color: var(--brand-blue);
  font-weight: 750;
}

.privacy-row {
  padding: 8px 4px;
}

.privacy-check {
  color: var(--brand-blue);
  font-weight: 650;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
}

.form-actions button,
.button-primary {
  border: 0;
  border-radius: 999px;
  padding: 16px 28px;
  background: var(--brand-blue);
  color: #ffffff;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 14px 32px rgba(0, 28, 58, 0.22);
  transition: background-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.form-actions button:hover,
.button-primary:hover {
  background: var(--brand-orange);
  transform: translateY(-1px);
  box-shadow: 0 18px 38px rgba(232, 78, 15, 0.25);
}

.form-message {
  margin: 0 0 28px;
  padding: 16px 18px;
  border-radius: 16px;
  font-weight: 700;
}

.form-message-success {
  color: var(--success-text);
  background: var(--success-bg);
  border: 1px solid var(--success-border);
}

.form-message-error {
  color: var(--error-text);
  background: var(--error-bg);
  border: 1px solid var(--error-border);
}

.account-alt-link {
  margin-top: 24px;
  text-align: center;
  color: var(--muted);
}

.account-alt-link a {
  color: var(--brand-blue);
  font-weight: 800;
  text-decoration: none;
}

.account-alt-link a:hover {
  color: var(--brand-orange);
  text-decoration: underline;
}

footer {
  min-height: 72px;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  font-size: 0.95rem;
  color: var(--muted-light);
  text-align: center;
}

@media (max-width: 860px) {
  .account-page {
    padding: 56px 16px;
  }

  .account-card {
    padding: 28px;
    border-radius: 22px;
  }

  .form-grid-2,
  .form-grid-3,
  .form-grid-address,
  .choice-grid {
    grid-template-columns: 1fr;
  }

  .form-section {
    padding: 22px;
  }

  .form-actions {
    justify-content: stretch;
  }

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

@media (max-width: 640px) {
  header {
    min-height: 72px;
    padding: 14px 20px;
    gap: 12px;
  }

  .logo {
    height: 40px;
  }

  .header-nav {
    gap: 10px;
    font-size: 0.9rem;
  }

  .header-nav .nav-button {
    padding: 8px 10px;
  }

  .login-status {
    display: none;
  }
}

@media (max-width: 520px) {
  .account-card {
    padding: 22px;
  }

  .form-section {
    padding: 18px;
  }

  .account-intro {
    text-align: left;
  }
}