:root {
  color-scheme: light;
  --ink: #18312d;
  --muted: #62706c;
  --forest: #173f38;
  --forest-light: #245b50;
  --cream: #f5f1e8;
  --paper: #fffdf8;
  --clay: #c66a43;
  --line: #d9d5ca;
  --soft-green: #e6eee9;
  --shadow: 0 24px 70px rgba(24, 49, 45, 0.11);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 2%, rgba(198, 106, 67, 0.11), transparent 30rem),
    var(--cream);
}

a { color: inherit; }

button,
input { font: inherit; }

button { cursor: pointer; }

.hidden { display: none !important; }

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 20;
  padding: 0.65rem 0.9rem;
  background: var(--paper);
  border: 1px solid var(--forest);
  border-radius: 0.4rem;
  transform: translateY(-180%);
}

.skip-link:focus { transform: none; }

.site-shell {
  width: min(1180px, calc(100% - 2.5rem));
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.site-header {
  min-height: 104px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(24, 49, 45, 0.2);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
}

.brand-mark {
  width: 3.15rem;
  height: 3.15rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--paper);
  background: var(--forest);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  letter-spacing: -0.04em;
}

.brand strong,
.brand small { display: block; }

.brand strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
  font-weight: 500;
}

.brand small {
  margin-top: 0.14rem;
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.text-button {
  padding: 0.55rem 0;
  color: var(--forest);
  background: transparent;
  border: 0;
  border-bottom: 1px solid currentColor;
  font-weight: 700;
}

main { flex: 1; }

.center-card {
  min-height: 64vh;
  display: grid;
  place-content: center;
  justify-items: center;
  color: var(--muted);
}

.spinner {
  width: 2rem;
  height: 2rem;
  border: 2px solid var(--line);
  border-top-color: var(--clay);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.login-layout {
  min-height: 68vh;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: clamp(3rem, 8vw, 8rem);
  align-items: center;
  padding: 5rem 4vw;
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--clay);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.login-copy h1,
.welcome-panel h1 {
  max-width: 11ch;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.1rem, 7vw, 6.6rem);
  font-weight: 400;
  letter-spacing: -0.065em;
  line-height: 0.92;
}

.lede {
  max-width: 36rem;
  margin: 2rem 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  line-height: 1.65;
}

.privacy-note {
  max-width: 36rem;
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  line-height: 1.55;
}

.privacy-note span { color: var(--clay); }
.privacy-note p { margin: 0; }

.login-card {
  padding: clamp(1.7rem, 4vw, 3rem);
  border: 1px solid rgba(24, 49, 45, 0.14);
  border-radius: 1.3rem;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.login-card label {
  display: block;
  margin-bottom: 0.65rem;
  font-weight: 750;
}

.login-card input {
  width: 100%;
  min-height: 3.35rem;
  padding: 0.8rem 0.9rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid #aeb8b3;
  border-radius: 0.55rem;
  outline: 0;
}

.login-card input:focus {
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(23, 63, 56, 0.13);
}

.primary-button {
  width: 100%;
  min-height: 3.35rem;
  margin-top: 1rem;
  padding: 0.8rem 1rem;
  color: var(--paper);
  background: var(--forest);
  border: 0;
  border-radius: 0.55rem;
  font-weight: 750;
  transition: background 140ms ease, transform 140ms ease;
}

.primary-button:hover { background: var(--forest-light); }
.primary-button:active { transform: translateY(1px); }
.primary-button:disabled { cursor: wait; opacity: 0.65; }

.form-status {
  min-height: 2.7rem;
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.portal { padding: 3.5rem 0 7rem; }

.welcome-panel {
  min-height: 20rem;
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: flex-end;
  padding: 3rem clamp(1.5rem, 6vw, 5.5rem);
  color: var(--paper);
  background:
    linear-gradient(130deg, rgba(255, 255, 255, 0.02), transparent 55%),
    var(--forest);
  border-radius: 1.4rem;
  box-shadow: var(--shadow);
}

.welcome-panel h1 {
  max-width: none;
  font-size: clamp(3rem, 6vw, 5.5rem);
}

.welcome-panel > div > p:last-child {
  max-width: 38rem;
  margin: 1.3rem 0 0;
  color: rgba(255, 253, 248, 0.75);
  font-size: 1.08rem;
  line-height: 1.55;
}

.preview-badge {
  flex: 0 0 auto;
  padding: 0.55rem 0.8rem;
  border: 1px solid rgba(255, 253, 248, 0.42);
  border-radius: 999px;
  color: rgba(255, 253, 248, 0.85);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-nav {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  gap: 1.7rem;
  overflow-x: auto;
  margin: 2rem 0 0;
  padding: 1rem 0;
  background: rgba(245, 241, 232, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.section-nav a {
  flex: 0 0 auto;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 750;
}

.section-nav a:hover,
.section-nav a:focus { color: var(--forest); }

.resource-section {
  scroll-margin-top: 4.5rem;
  padding: 5rem 0;
  border-bottom: 1px solid var(--line);
}

.section-heading {
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr);
  gap: 1.4rem;
  margin-bottom: 2.2rem;
}

.section-number {
  margin: 0;
  color: var(--clay);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.2rem;
}

.section-heading h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 400;
  letter-spacing: -0.04em;
}

.section-heading div p {
  max-width: 40rem;
  margin: 0.55rem 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-left: 5.4rem;
}

.resource-card {
  position: relative;
  min-height: 15rem;
  display: flex;
  flex-direction: column;
  padding: clamp(1.35rem, 3vw, 2rem);
  overflow: hidden;
  background: var(--paper);
  border: 1px solid rgba(24, 49, 45, 0.13);
  border-radius: 0.85rem;
}

.resource-card h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
  font-weight: 500;
  letter-spacing: -0.025em;
}

.resource-summary {
  margin: 0.8rem 0;
  color: var(--muted);
  line-height: 1.55;
}

.resource-body {
  color: #334943;
  font-size: 0.92rem;
  line-height: 1.55;
}

.resource-body p { margin: 0.5rem 0; }

.steps {
  margin: 0.7rem 0;
  padding-left: 1.25rem;
}

.steps li { margin: 0.42rem 0; padding-left: 0.25rem; }

.resource-action {
  width: fit-content;
  margin-top: auto;
  padding-top: 1rem;
  color: var(--forest);
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25rem;
}

.verification {
  margin: 1rem 0 0;
  color: #85918c;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.resource-notice {
  min-height: 12rem;
  background: var(--soft-green);
}

.resource-document::after {
  content: "DOC";
  position: absolute;
  top: 1.35rem;
  right: 1.35rem;
  color: var(--clay);
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.resource-document h3 { padding-right: 3rem; }

.empty-state {
  grid-column: 1 / -1;
  margin: 0;
  padding: 2rem;
  color: var(--muted);
  border: 1px dashed #aeb8b3;
  border-radius: 0.8rem;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding: 2rem 0 3rem;
  color: var(--muted);
  border-top: 1px solid rgba(24, 49, 45, 0.2);
  font-size: 0.8rem;
}

footer p { margin: 0; }

@media (max-width: 760px) {
  .site-shell { width: min(100% - 1.4rem, 1180px); }
  .site-header { min-height: 84px; }
  .brand strong { font-size: 1rem; }
  .brand-mark { width: 2.7rem; height: 2.7rem; }
  .login-layout {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 2.2rem;
    padding: 3.5rem 0 5rem;
  }
  .login-copy h1 { font-size: clamp(3.3rem, 17vw, 5.2rem); }
  .portal { padding-top: 1rem; }
  .welcome-panel {
    min-height: 24rem;
    align-items: flex-start;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem 1.35rem;
  }
  .welcome-panel h1 { font-size: clamp(3rem, 15vw, 4.7rem); }
  .section-nav { margin-top: 1rem; }
  .resource-section { padding: 3.5rem 0; }
  .section-heading { grid-template-columns: 2.5rem minmax(0, 1fr); gap: 0.5rem; }
  .resource-grid { grid-template-columns: 1fr; margin-left: 0; }
  .resource-card { min-height: 13rem; }
  footer { flex-direction: column; gap: 0.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
