:root {
  --hk-paper: #fbf7ef;
  --hk-paper-deep: #f4ecdc;
  --hk-ink: #17261d;
  --hk-sherwood: #2e6f4e;
  --hk-thicket: #123b2a;
  --hk-ember: #e8542f;
  --hk-gold: #f2b233;
  --hk-creek: #7fb2c8;
  --hk-muted: #5a6b60;
  --hk-line: rgba(23, 38, 29, 0.22);
}

body.hk-parent-auth {
  background-color: var(--hk-paper);
  background-image: radial-gradient(rgba(23, 38, 29, 0.045) 0.7px, transparent 0.7px);
  background-size: 7px 7px;
  color: var(--hk-ink);
  font-family: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
}

.hk-parent-auth h1,
.hk-parent-auth h2,
.hk-parent-auth h3,
.hk-parent-auth .title-font {
  font-family: "Fredoka", "Figtree", sans-serif;
  font-weight: 400;
  letter-spacing: 0;
}

.auth-header {
  border-bottom: 3px solid var(--hk-ink);
  background: rgba(251, 247, 239, 0.96);
}

.auth-header-inner {
  display: flex;
  min-height: 88px;
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.auth-logo-link,
.auth-logo-link img {
  display: block;
  width: auto;
}

.auth-logo-link img { max-height: 50px; }

.auth-header nav,
.auth-footer nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.auth-header a,
.auth-footer a,
.auth-inline-link,
.auth-back-link {
  color: var(--hk-ink);
  font-weight: 400;
  text-decoration: none;
}

.auth-header a:hover,
.auth-footer a:hover,
.auth-inline-link:hover,
.auth-back-link:hover { text-decoration: underline; }

.auth-header .auth-header-box {
  border: 2px solid var(--hk-sherwood);
  padding: 10px 16px;
}

.auth-main {
  display: grid;
  place-items: center;
  flex: 1;
  width: 100%;
  padding: 56px 20px 64px;
}

.auth-frame {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(420px, 1.12fr);
  width: min(1120px, 100%);
  border: 3px solid var(--hk-ink);
  background: var(--hk-paper);
  box-shadow: 12px 12px 0 var(--hk-gold);
}

.auth-story {
  position: relative;
  overflow: hidden;
  min-height: 650px;
  padding: 58px 50px;
  background: var(--hk-thicket);
  color: var(--hk-paper);
}

.auth-story::after {
  content: "";
  position: absolute;
  right: -72px;
  bottom: -94px;
  width: 280px;
  height: 280px;
  border: 3px dashed rgba(242, 178, 51, 0.52);
  border-radius: 50%;
  box-shadow: 0 0 0 34px rgba(242, 178, 51, 0.08), 0 0 0 70px rgba(242, 178, 51, 0.05);
}

.auth-hand-note {
  margin: 0 0 12px;
  color: var(--hk-gold);
  font-family: "Caveat", cursive;
  font-size: 27px;
  font-weight: 600;
  line-height: 1;
}

.auth-story h1 {
  max-width: 480px;
  margin: 0;
  font-size: clamp(48px, 5vw, 72px);
  line-height: 0.98;
}

.auth-story-lede {
  max-width: 430px;
  margin: 24px 0 0;
  color: rgba(251, 247, 239, 0.86);
  font-size: 18px;
  line-height: 1.55;
}

.auth-steps {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0;
  margin: 42px 0 0;
  padding: 0;
  list-style: none;
}

.auth-steps li {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 14px;
  border-top: 1px solid rgba(251, 247, 239, 0.28);
  padding: 17px 0;
  font-size: 16px;
  line-height: 1.35;
}

.auth-steps li:last-child { border-bottom: 1px solid rgba(251, 247, 239, 0.28); }

.auth-steps span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 2px solid var(--hk-paper);
  border-radius: 50%;
  color: var(--hk-gold);
  font-family: "Fredoka", sans-serif;
  font-size: 18px;
}

.auth-form-panel {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: 54px 58px;
  background: var(--hk-paper);
}

.auth-form-panel h2 {
  margin: 0;
  font-size: 38px;
  line-height: 1.05;
}

.auth-form-intro {
  margin: 12px 0 0;
  color: var(--hk-muted);
  font-size: 16px;
  line-height: 1.5;
}

.auth-flashes { display: grid; gap: 8px; margin-top: 18px; }
.auth-alert { border: 2px solid var(--hk-ink); padding: 10px 12px; font-size: 15px; }
.auth-alert-error { background: #fff0eb; color: #9e2f17; }
.auth-alert-success { background: #edf8f0; color: var(--hk-sherwood); }

.auth-form { display: grid; gap: 18px; margin-top: 26px; }
.auth-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.auth-field { min-width: 0; }
.auth-field label { display: block; margin-bottom: 7px; color: var(--hk-ink); font-size: 15px; font-weight: 600; }
.auth-field input,
.auth-field select {
  display: block;
  width: 100%;
  min-height: 48px;
  border: 2px solid rgba(23, 38, 29, 0.56);
  border-radius: 0;
  background: #fffdf9;
  padding: 10px 12px;
  color: var(--hk-ink);
  font: inherit;
  outline: none;
  box-shadow: none;
}

.auth-field input:focus,
.auth-field select:focus {
  border-color: var(--hk-sherwood);
  box-shadow: 0 0 0 3px rgba(46, 111, 78, 0.18);
}

.auth-field-error { margin: 6px 0 0; color: #a4341c; font-size: 14px; }

.auth-submit {
  display: inline-flex;
  width: 100%;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--hk-ink);
  border-radius: 0;
  background: var(--hk-ember);
  color: #fff;
  cursor: pointer;
  font: 400 17px/1 "Figtree", sans-serif;
  box-shadow: 6px 6px 0 var(--hk-ink);
  transition: background-color 150ms ease, box-shadow 150ms ease;
}

.auth-submit:hover { background: #d94827; }
.auth-submit:focus-visible { outline: 3px solid var(--hk-creek); outline-offset: 4px; }
.auth-submit-gold { background: var(--hk-gold); color: var(--hk-ink); }
.auth-submit-gold:hover { background: #e7a522; }

.auth-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 18px;
  margin: 24px 0 0;
  color: var(--hk-muted);
  font-size: 15px;
}

.auth-referral {
  margin-top: 16px;
  border: 2px solid var(--hk-creek);
  background: rgba(127, 178, 200, 0.15);
  padding: 10px 12px;
  color: var(--hk-ink);
  font-size: 14px;
}

.auth-simple-card {
  width: min(620px, 100%);
  border: 3px solid var(--hk-ink);
  background: var(--hk-paper);
  padding: 48px;
  box-shadow: 10px 10px 0 var(--hk-gold);
}

.auth-simple-card .auth-hand-note { color: var(--hk-sherwood); }
.auth-simple-card h1 { margin: 0; font-size: 44px; line-height: 1.05; }
.auth-back-link { display: inline-block; margin-bottom: 26px; }

.auth-footer {
  display: flex;
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--hk-line);
  padding: 20px 0 28px;
  color: var(--hk-muted);
  font-size: 14px;
}

.auth-footer p { margin: 0; }

@media (max-width: 840px) {
  .auth-main { display: block; padding: 32px 20px 48px; }
  .auth-frame { grid-template-columns: 1fr; box-shadow: 8px 8px 0 var(--hk-gold); }
  .auth-form-panel { order: -1; padding: 38px 30px 42px; }
  .auth-story { min-height: auto; padding: 38px 30px 46px; }
  .auth-story h1 { font-size: 48px; }
  .auth-steps { margin-top: 30px; }
}

@media (max-width: 540px) {
  .auth-header-inner { min-height: 76px; width: min(100% - 28px, 1120px); }
  .auth-logo-link img { max-height: 50px; }
  .auth-header nav { gap: 12px; font-size: 14px; }
  .auth-header nav > a:first-child { display: none; }
  .auth-header .auth-header-box { padding: 8px 10px; }
  .auth-main { padding: 24px 14px 40px; }
  .auth-form-panel, .auth-story, .auth-simple-card { padding: 30px 22px 34px; }
  .auth-form-panel h2 { font-size: 32px; }
  .auth-form-row { grid-template-columns: 1fr; gap: 18px; }
  .auth-story h1, .auth-simple-card h1 { font-size: 40px; }
  .auth-footer { width: min(100% - 28px, 1120px); align-items: flex-start; }
  .auth-footer nav { gap: 14px; }
}
