:root {
  color-scheme: light;
  --cream: #f6efe2;
  --paper: #fbf6ec;
  --ink: #5b4a42;
  --ink-soft: #8a7a70;
  --sage: #7fb89e;
  --sage-deep: #5e9b82;
  --amber: #e3b985;
  --amber-deep: #cf9f64;
  --line: #e5d8c2;
  --white: #ffffff;
  --shadow: 0 24px 70px -42px rgba(91, 74, 66, 0.62);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--cream);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(
      circle at 8% 8%,
      rgba(245, 230, 179, 0.55),
      transparent 24rem
    ),
    radial-gradient(
      circle at 92% 22%,
      rgba(127, 184, 158, 0.2),
      transparent 26rem
    ),
    linear-gradient(145deg, var(--paper), var(--cream));
  font-family: Quicksand, 'Trebuchet MS', ui-rounded, system-ui, sans-serif;
  line-height: 1.65;
}

a {
  color: var(--sage-deep);
  text-underline-offset: 0.2em;
}

a:hover {
  color: #4e8871;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(207, 159, 100, 0.65);
  outline-offset: 3px;
}

.shell {
  width: min(100% - 32px, 1040px);
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0;
}

.brand {
  color: var(--sage-deep);
  font-family: 'Trebuchet MS', ui-rounded, system-ui, sans-serif;
  font-size: clamp(1.65rem, 4vw, 2.25rem);
  font-weight: 900;
  letter-spacing: 0.01em;
  line-height: 1;
  text-decoration: none;
}

.brand-mark {
  color: var(--amber-deep);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 18px;
  font-size: 0.92rem;
  font-weight: 700;
}

.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
}

.main {
  padding: clamp(28px, 7vw, 72px) 0 64px;
}

.hero,
.card {
  border: 1px solid rgba(229, 216, 194, 0.9);
  border-radius: 28px;
  background: rgba(251, 246, 236, 0.88);
  box-shadow: var(--shadow);
}

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(32px, 7vw, 72px);
}

.hero::after {
  position: absolute;
  right: -80px;
  bottom: -100px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(127, 184, 158, 0.13);
  content: '';
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--sage-deep);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2 {
  color: var(--ink);
  font-family: 'Trebuchet MS', ui-rounded, system-ui, sans-serif;
  line-height: 1.15;
}

h1 {
  max-width: 16ch;
  margin: 0;
  font-size: clamp(2.2rem, 7vw, 4.6rem);
  letter-spacing: -0.035em;
}

h2 {
  margin: 1.8em 0 0.55em;
  font-size: clamp(1.25rem, 3vw, 1.6rem);
}

.lead {
  max-width: 64ch;
  margin: 20px 0 0;
  color: var(--ink-soft);
  font-size: clamp(1rem, 2vw, 1.15rem);
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.link-card {
  min-height: 150px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--white);
  color: var(--ink);
  text-decoration: none;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.link-card:hover {
  border-color: var(--sage);
  color: var(--ink);
  transform: translateY(-3px);
  box-shadow: 0 18px 35px -28px rgba(91, 74, 66, 0.85);
}

.link-card strong,
.link-card span {
  display: block;
}

.link-card span {
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.document,
.auth-card {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: clamp(26px, 6vw, 58px);
}

.document h1,
.auth-card h1 {
  max-width: none;
  font-size: clamp(2rem, 6vw, 3.4rem);
}

.document p,
.document li {
  max-width: 68ch;
}

.muted {
  color: var(--ink-soft);
}

.steps {
  padding-left: 1.35rem;
}

.table-scroll {
  max-width: 100%;
  overflow-x: auto;
}

.document table {
  width: 100%;
  margin: 20px 0;
  border-collapse: collapse;
  font-size: 0.94rem;
}

.document th,
.document td {
  padding: 12px 14px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.document th {
  background: rgba(127, 184, 158, 0.12);
  font-weight: 900;
}

.auth-page .main {
  display: grid;
  min-height: calc(100vh - 160px);
  place-items: center;
}

.auth-card {
  text-align: center;
}

.auth-card .lead {
  margin-right: auto;
  margin-left: auto;
}

.form {
  display: grid;
  gap: 14px;
  max-width: 480px;
  margin: 28px auto 0;
  text-align: left;
}

.field-label {
  font-size: 0.9rem;
  font-weight: 800;
}

.input {
  width: 100%;
  min-height: 54px;
  padding: 12px 16px;
  border: 2px solid var(--line);
  border-radius: 15px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
}

.input:focus {
  border-color: var(--sage);
}

.button {
  display: inline-flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border: 0;
  border-radius: 999px;
  background: var(--sage-deep);
  color: var(--white);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  text-decoration: none;
  transition:
    transform 120ms ease,
    opacity 120ms ease;
}

.button:hover {
  color: var(--white);
  transform: translateY(-1px);
}

.button:active {
  transform: scale(0.97);
}

.button:disabled {
  cursor: wait;
  opacity: 0.58;
}

.status {
  max-width: 520px;
  min-height: 30px;
  margin: 24px auto 0;
  padding: 13px 16px;
  border-radius: 14px;
  background: rgba(127, 184, 158, 0.15);
  color: var(--ink);
}

.status[data-kind='error'] {
  background: rgba(227, 185, 133, 0.3);
  color: #76522f;
}

.status:empty {
  display: none;
}

.auth-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  padding: 26px 0 34px;
  border-top: 1px solid rgba(229, 216, 194, 0.85);
  color: var(--ink-soft);
  font-size: 0.86rem;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 720px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    justify-content: flex-start;
  }

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

  .main {
    padding-top: 18px;
  }
}

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