:root {
  --bg: #f7f5f0;
  --paper: #fff;
  --ink: #151610;
  --muted: #65675f;
  --line: #dedbd1;
  --gold: #8a711d;
  --gold2: #b8931f;
  --green: #1f6f4a;
  --blue: #285ea8;
  --code: #10120e;
  --topbar: 72px;
  --shadow: 0 18px 50px rgba(23, 24, 17, 0.08);
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
a {
  color: inherit;
}
.site-topbar {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--topbar);
  z-index: 1000;
  border-bottom: 1px solid rgba(21, 22, 16, 0.1);
  background: rgba(250, 249, 245, 0.95);
  backdrop-filter: blur(18px);
  display: flex;
  align-items: center;
}
.topbar-inner {
  width: min(1440px, calc(100% - 40px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  min-width: max-content;
}
.brand-mark {
  width: 34px;
  height: 34px;
  object-fit: contain;
  border-radius: 9px;
}
.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.brand-copy strong {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.brand-copy span {
  font-size: 10px;
  color: var(--gold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 5px;
}
.top-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}
.top-nav a {
  font-size: 12px;
  color: #55584f;
  text-decoration: none;
  padding: 10px 11px;
  border-radius: 8px;
}
.top-nav a:hover,
.top-nav a[aria-current="page"] {
  background: #ece9e0;
  color: var(--ink);
}
.top-action {
  background: var(--ink) !important;
  color: white !important;
}
.menu-button {
  display: none;
  margin-left: auto;
  border: 1px solid var(--line);
  background: white;
  border-radius: 9px;
  padding: 9px 12px;
  font-weight: 700;
}
.mobile-nav {
  display: none;
  position: fixed;
  top: var(--topbar);
  left: 0;
  right: 0;
  z-index: 999;
  background: #fbfaf6;
  border-bottom: 1px solid var(--line);
  padding: 12px 20px;
  box-shadow: var(--shadow);
}
.mobile-nav.open {
  display: grid;
}
.mobile-nav a {
  text-decoration: none;
  padding: 12px 4px;
  border-bottom: 1px solid #ece9e0;
  font-size: 13px;
}
.page {
  padding-top: var(--topbar);
  min-height: 100vh;
}
.wrap {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}
.hero {
  padding: 70px 0 52px;
}
.eyebrow,
.kicker {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 800;
}
h1,
h2,
h3 {
  color: var(--ink);
  letter-spacing: -0.035em;
}
h1 {
  font-size: clamp(38px, 6vw, 70px);
  line-height: 1.02;
  margin: 14px 0 20px;
  font-weight: 600;
}
h2 {
  font-size: clamp(27px, 3vw, 38px);
  margin: 0 0 14px;
}
h3 {
  font-size: 18px;
  margin: 0 0 10px;
}
p,
li,
td,
th {
  font-size: 14px;
  line-height: 1.7;
}
p,
li {
  color: var(--muted);
}
.lead {
  font-size: 18px;
  line-height: 1.7;
  max-width: 850px;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 9px;
  padding: 0 15px;
  text-decoration: none;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: white;
  font-size: 12px;
  font-weight: 750;
}
.button.secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.section {
  padding: 44px 0;
  border-top: 1px solid var(--line);
}
.grid {
  display: grid;
  gap: 14px;
}
.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 8px 28px rgba(23, 24, 17, 0.03);
}
.metric {
  font-size: 28px;
  letter-spacing: -0.04em;
  font-weight: 700;
}
.notice {
  padding: 16px 18px;
  border: 1px solid #d9cfaa;
  border-left: 4px solid var(--gold2);
  background: #f4efdf;
  border-radius: 10px;
}
.code {
  background: var(--code);
  color: #eef1e7;
  border-radius: 13px;
  padding: 18px;
  overflow: auto;
  font:
    12px/1.65 ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
  white-space: pre;
}
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: white;
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}
th,
td {
  text-align: left;
  padding: 13px 14px;
  border-bottom: 1px solid #ebe8df;
  vertical-align: top;
}
th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #55584f;
  background: #faf9f5;
}
.method {
  font:
    800 10px/1 ui-monospace,
    monospace;
  display: inline-flex;
  padding: 7px 8px;
  border-radius: 7px;
  background: #ece9e0;
}
.method.get {
  background: #e7f2eb;
  color: #1c6544;
}
.method.post {
  background: #eee8d8;
  color: #735d17;
}
.path {
  font:
    13px/1.5 ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
  overflow-wrap: anywhere;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  background: white;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7d8078;
}
.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 900;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: 0.2s ease;
  cursor: pointer;
  font-weight: 800;
}
.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}
.site-footer {
  margin-top: 70px;
  border-top: 1px solid var(--line);
  background: #efede6;
}
.footer-grid {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 42px 0 24px;
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 28px;
}
.footer-grid h4 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin: 0 0 14px;
}
.footer-grid a {
  display: block;
  text-decoration: none;
  color: #5c5e56;
  font-size: 12px;
  margin: 10px 0;
}
.footer-brand {
  max-width: 360px;
}
.footer-brand p {
  font-size: 12px;
}
.footer-bottom {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  border-top: 1px solid #dad6ca;
  padding: 20px 0 28px;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  flex-wrap: wrap;
  color: #6a6b64;
  font-size: 11px;
}
.footer-socials {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.footer-socials a {
  color: #5c5e56;
  text-decoration: none;
}
.footer-socials a:hover {
  color: #2b2a25;
}
@media (max-width: 900px) {
  .top-nav {
    display: none;
  }
  .menu-button {
    display: inline-flex;
  }
  .grid.three,
  .grid.four {
    grid-template-columns: 1fr 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand {
    grid-column: 1/-1;
  }
}
@media (max-width: 620px) {
  :root {
    --topbar: 64px;
  }
  .topbar-inner,
  .wrap,
  .footer-grid,
  .footer-bottom {
    width: calc(100% - 28px);
  }
  .brand-mark {
    width: 31px;
    height: 31px;
  }
  .hero {
    padding: 48px 0 38px;
  }
  .grid.two,
  .grid.three,
  .grid.four {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .back-to-top {
    right: 14px;
    bottom: 14px;
  }
}

.partner-hero {
  padding: 72px 0 52px;
}
.principle {
  border-top: 3px solid var(--gold2);
}
.step {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 14px;
}
.step-num {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
}
.level-card {
  position: relative;
  overflow: hidden;
}
.level-card:after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--gold2);
}
.boundary-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.boundary {
  background: white;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 17px;
}
.boundary strong {
  display: block;
  margin-bottom: 5px;
}
@media (max-width: 700px) {
  .boundary-list {
    grid-template-columns: 1fr;
  }
}

/* Sprint 19-20 partner application and portal */
.portal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 20px 0;
}
.portal-panel {
  min-width: 0;
}
.portal-panel h2 {
  margin-top: 8px;
}
.portal-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}
.portal-form label {
  display: grid;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
  color: #4f514a;
}
.portal-form input,
.portal-form textarea,
.portal-form select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  padding: 11px 12px;
  font: inherit;
}
.portal-form textarea {
  min-height: 110px;
  resize: vertical;
}
.portal-form input:focus,
.portal-form textarea:focus,
.portal-form select:focus {
  outline: 2px solid rgba(184, 147, 31, 0.3);
  outline-offset: 2px;
  border-color: #b8931f;
}
.portal-form .button {
  width: max-content;
  max-width: 100%;
  cursor: pointer;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.check {
  grid-template-columns: auto minmax(0, 1fr) !important;
  align-items: start;
  font-weight: 500 !important;
}
.check input {
  width: auto;
  margin-top: 4px;
}
.form-status {
  min-height: 1.2em;
  margin: 0;
  font-size: 12px;
}
.form-status[data-kind="error"] {
  color: #9b2c24;
}
.form-status[data-kind="success"] {
  color: #1f6f4a;
}
.partner-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: stretch;
  margin: 0 0 20px;
}
.partner-summary article {
  min-width: 0;
}
.partner-summary small,
.partner-summary strong {
  display: block;
}
.partner-summary small {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.partner-summary strong {
  margin-top: 7px;
  overflow-wrap: anywhere;
}
.partner-summary .button {
  align-self: stretch;
  cursor: pointer;
}
.referral-list {
  display: grid;
  gap: 0;
}
.referral-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.referral-list small {
  grid-column: 1/-1;
  color: var(--muted);
}
@media (max-width: 760px) {
  .portal-grid,
  .form-row,
  .partner-summary {
    grid-template-columns: 1fr;
  }
  .portal-form .button,
  .partner-summary .button {
    width: 100%;
  }
}
