/* Upright public site. One file, no framework, no outside fonts: the system
   font stack, so nothing loads from anywhere else. Colors are Upright's own:
   the mark's slate and copper (the app's brand tokens) over the app's grays.
   Light and dark follow the visitor's system setting. Phone first. */

:root {
  color-scheme: light dark;
  --bg: #f9fafb;
  --surface: #ffffff;
  --text: #111827;
  --muted: #4b5563;
  --line: #e5e7eb;
  --field-line: #6b7280;
  --brand: #2b4c7e;
  --brand-ink: #ffffff;
  --brand-soft: #e8eef7;
  --accent: #d79a66;
  --error: #b91c1c;
  --error-bg: #fef2f2;
  --notice-bg: #fff7ed;
  --banner-bg: #2b4c7e;
  --banner-ink: #ffffff;
  --cta-bg: #2b4c7e;
  --cta-ink: #ffffff;
  --cta-button: #ffffff;
  --cta-button-ink: #2b4c7e;
  --radius: 0.875rem;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "Noto Sans", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111827;
    --surface: #1f2937;
    --text: #f3f4f6;
    --muted: #d1d5db;
    --line: #374151;
    --field-line: #9ca3af;
    --brand: #7fa3d7;
    --brand-ink: #111827;
    --brand-soft: #1e2a3d;
    --error: #fca5a5;
    --error-bg: #3b1212;
    --notice-bg: #3a2a17;
    --banner-bg: #1e3557;
    --banner-ink: #f3f4f6;
    --cta-bg: #1e3557;
    --cta-ink: #f3f4f6;
    --cta-button: #7fa3d7;
    --cta-button-ink: #111827;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--brand);
  text-decoration-thickness: 0.09em;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 0.14em;
}

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.25rem, 1.4rem + 4.2vw, 3.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(1.625rem, 1.3rem + 1.4vw, 2.25rem);
  font-weight: 800;
}

h3 {
  font-size: 1.3125rem;
  font-weight: 750;
}

p {
  margin: 0 0 1rem;
}

.wrap {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.narrow {
  max-width: 44rem;
}

.skip {
  position: absolute;
  left: -10000px;
  top: 0;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 10;
  background: var(--surface);
  padding: 0.75rem 1rem;
}

/* The alpha banner, on every page. */
.banner {
  background: var(--banner-bg);
  color: var(--banner-ink);
  border-bottom: 3px solid var(--accent);
  font-size: 1rem;
}

.banner p {
  margin: 0;
  padding: 0.625rem 0;
}

.banner a {
  color: var(--banner-ink);
  font-weight: 700;
  white-space: nowrap;
}

.banner a:focus-visible {
  outline-color: var(--banner-ink);
}

/* Header */
.top {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  font-size: 1.375rem;
  letter-spacing: -0.02em;
}

.brand span {
  color: var(--brand);
}

.top nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.top nav a {
  padding: 0.5rem 0.75rem;
  border-radius: 0.625rem;
  font-weight: 650;
  text-decoration: none;
  color: var(--text);
}

.top nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 3px;
}

.top nav a.nav-apply {
  background: var(--brand);
  color: var(--brand-ink);
  padding: 0.5rem 1rem;
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  border: 2px solid var(--brand);
  font: inherit;
  font-weight: 700;
  font-size: 1.125rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.button.primary {
  background: var(--brand);
  color: var(--brand-ink);
}

.button.secondary {
  background: transparent;
  color: var(--brand);
}

.button:disabled {
  opacity: 0.6;
  cursor: progress;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

/* Home: hero */
.hero {
  padding: 3rem 0 3.5rem;
}

.hero-grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 1rem;
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: 2rem;
  height: 3px;
  background: var(--accent);
  vertical-align: middle;
  margin-right: 0.75rem;
  border-radius: 2px;
}

.lede {
  font-size: clamp(1.1875rem, 1.05rem + 0.6vw, 1.375rem);
  color: var(--muted);
  max-width: 40rem;
}

.hero h1 {
  max-width: 16ch;
}

.hero-art {
  display: none;
}

/* Home: the four points */
.points {
  padding: 3rem 0;
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.point-grid {
  display: grid;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.point {
  background: var(--bg);
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.5rem 1.5rem 0.75rem;
}

.point p {
  font-weight: 600;
}

.point p.small {
  font-weight: 400;
}

.small {
  font-size: 1rem;
  color: var(--muted);
}

/* Home: what works today */
.today {
  padding: 3.5rem 0;
}

.today-grid {
  display: grid;
  gap: 1.5rem;
}

.more {
  font-weight: 700;
}

.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.625rem;
}

.checklist li {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem 0.75rem 3rem;
  font-weight: 600;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 1.125rem;
  top: 50%;
  width: 0.5rem;
  height: 0.95rem;
  margin-top: -0.6rem;
  border: solid var(--brand);
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}

/* Home: call to action */
.cta {
  padding: 0 0 4rem;
}

.cta-box {
  background: var(--cta-bg);
  color: var(--cta-ink);
  border-radius: 1.25rem;
  padding: 2.25rem 1.5rem;
}

.cta-box p {
  max-width: 40rem;
  font-size: 1.1875rem;
}

.cta-box .button.primary {
  background: var(--cta-button);
  color: var(--cta-button-ink);
  border-color: var(--cta-button);
  margin-top: 0.5rem;
}

.cta-box .button:focus-visible {
  outline-color: var(--cta-ink);
}

/* Inner pages */
/* Vertical padding only, so a .wrap keeps its side padding. */
.page-head {
  padding-top: 2.5rem;
  padding-bottom: 1rem;
}

.page-head.message {
  padding-top: 3.5rem;
  padding-bottom: 4.5rem;
}

.page-foot {
  padding-top: 1.5rem;
  padding-bottom: 3.5rem;
}

.road-grid {
  display: grid;
  gap: 1.25rem;
  padding-bottom: 1rem;
}

.road-col {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 5px solid var(--brand);
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem;
}

.road-col.next {
  border-top-color: var(--accent);
}

.road-col.later {
  border-top-color: var(--field-line);
}

.road-col h2 {
  margin-bottom: 0.25rem;
}

.road-note {
  color: var(--muted);
  font-size: 1rem;
}

.road-col .checklist li {
  background: var(--bg);
}

.road-col.next .checklist li::before,
.road-col.later .checklist li::before {
  border: 0;
  transform: none;
  width: 0.625rem;
  height: 0.625rem;
  margin-top: -0.3125rem;
  border-radius: 50%;
  background: var(--accent);
}

.road-col.later .checklist li::before {
  background: transparent;
  border: 2px solid var(--field-line);
}

.legal {
  padding-bottom: 3.5rem;
}

.legal h2 {
  font-size: 1.375rem;
  margin-top: 2.25rem;
}

.legal ul {
  padding-left: 1.25rem;
}

.legal li {
  margin-bottom: 0.375rem;
}

.updated {
  color: var(--muted);
  font-size: 1rem;
}

/* The apply form */
form {
  padding-bottom: 3.5rem;
}

.field {
  margin: 0 0 1.75rem;
  padding: 0;
  border: 0;
  min-width: 0;
}

.field > label:not(.option),
.field > legend {
  display: block;
  font-weight: 700;
  margin-bottom: 0.5rem;
  padding: 0;
}

.optional {
  font-weight: 400;
  color: var(--muted);
}

.hint {
  color: var(--muted);
  font-size: 1rem;
  margin: -0.25rem 0 0.5rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
  display: block;
  width: 100%;
  min-height: 3.25rem;
  padding: 0.75rem 1rem;
  font: inherit;
  font-size: 1.125rem;
  color: var(--text);
  background: var(--surface);
  border: 2px solid var(--field-line);
  border-radius: 0.75rem;
}

textarea {
  min-height: 8rem;
  resize: vertical;
}

input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 1px;
  border-color: var(--brand);
}

.options {
  display: grid;
  gap: 0.625rem;
}

.option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 3.25rem;
  padding: 0.625rem 1rem;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.option:has(input:checked) {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.option input {
  width: 1.375rem;
  height: 1.375rem;
  margin: 0;
  flex: none;
  accent-color: var(--brand);
}

.consent .option {
  border-color: var(--field-line);
}

.has-error input[type="text"],
.has-error input[type="email"],
.has-error input[type="tel"],
.has-error textarea,
.has-error .option {
  border-color: var(--error);
}

.error {
  color: var(--error);
  font-weight: 700;
  margin: 0 0 0.5rem;
}

.error-summary {
  background: var(--error-bg);
  border: 2px solid var(--error);
  border-left-width: 8px;
  border-radius: 0.75rem;
  padding: 1rem 1.25rem 0.25rem;
  margin: 0 0 2rem;
}

.error-summary ul {
  margin: 0 0 0.75rem;
  padding-left: 1.25rem;
}

.error-summary a {
  color: var(--error);
  font-weight: 600;
}

.notice {
  background: var(--notice-bg);
  border: 2px solid var(--accent);
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
}

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.submit-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin: 0.5rem 0 1rem;
}

.submit-row .button {
  width: 100%;
}

.status {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

@supports selector(:has(*)) {
  .trade-other {
    display: none;
  }

  form:has(#f-trade-opt-other:checked) .trade-other {
    display: block;
  }
}

/* Footer */
.foot {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 2.5rem 0 3rem;
  font-size: 1rem;
}

.foot-brand {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.foot-brand p {
  margin: 0 0 1.25rem;
  color: var(--muted);
}

.foot-brand strong {
  color: var(--text);
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-bottom: 1.25rem;
}

.foot-links a {
  font-weight: 650;
  padding: 0.25rem 0;
}

.foot-note {
  color: var(--muted);
  margin: 0;
}

/* Wider screens */
@media (min-width: 34rem) {
  .options {
    grid-template-columns: 1fr 1fr;
  }

  .submit-row .button {
    width: auto;
  }
}

@media (min-width: 48rem) {
  .hero {
    padding: 4.5rem 0 5rem;
  }

  .hero-grid {
    grid-template-columns: 1.6fr 1fr;
  }

  .hero-art {
    display: flex;
    justify-content: center;
  }

  .hero-art img {
    width: 15rem;
    height: 15rem;
    border-radius: 3.5rem;
    box-shadow: 0 30px 60px -30px rgba(17, 24, 39, 0.45);
  }

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

  .today-grid {
    grid-template-columns: 1fr 1.3fr;
    gap: 3rem;
  }

  .cta-box {
    padding: 3rem;
  }

  .foot .wrap {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0 2rem;
    align-items: start;
  }

  .foot-note {
    grid-column: 1 / -1;
  }
}

@media (min-width: 60rem) {
  .road-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
