:root {
  --paper: #f3e6cf;
  --paper-deep: #e5d4b6;
  --paper-light: #fbefd9;
  --ink: #202925;
  --forest: #173c34;
  --red: #991b1b;
  --blue: #446b78;
  --green: #54705f;
  --orange: #c66a3d;
  --yellow: #c6a545;
  --paper-line: rgba(68, 107, 120, .13);
  --paper-border: #a69c89;
  --mono: "IBM Plex Mono", "Courier New", monospace;
  --serif: "Source Serif 4", Georgia, serif;
}

.paper-public {
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    linear-gradient(90deg, transparent 0 82px, rgba(153, 27, 27, .2) 82px 83px, transparent 83px),
    repeating-linear-gradient(to bottom, transparent 0 31px, var(--paper-line) 31px 32px);
  background-attachment: fixed;
  font-family: Inter, sans-serif;
}

.paper-public :focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}

.paper-public .skip-link {
  color: #fffaf0;
  background: var(--ink);
}

.paper-public .topbar {
  position: relative;
  min-height: 78px;
  padding-inline: clamp(24px, 4vw, 68px);
  color: var(--ink);
  background-color: rgba(243, 230, 207, .96);
  background-image: repeating-linear-gradient(to bottom, transparent 0 31px, rgba(68, 107, 120, .09) 31px 32px);
  border-bottom: 1px solid var(--ink);
  box-shadow: none;
}

.paper-public .topbar .brand {
  gap: 12px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 600;
}

.paper-public .topbar .brand:hover {
  color: var(--ink);
}

.paper-public .public-brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #fffaf0;
  background: var(--forest);
  border: 1px solid var(--ink);
  box-shadow: 3px 3px 0 var(--yellow);
}

.paper-public .public-brand-mark svg {
  width: 27px;
  height: 27px;
  fill: currentColor;
}

.paper-public .public-brand-mark circle {
  fill: var(--orange);
}

.paper-public .topnav {
  gap: 23px;
  font-family: var(--mono);
  font-size: .73rem;
  font-weight: 600;
}

.paper-public .paper-nav-link {
  color: var(--ink);
  border-bottom: 1px solid transparent;
}

.paper-public .paper-nav-link:hover {
  color: var(--red);
  border-color: currentColor;
  text-decoration: none;
}

.paper-public .paper-nav-login {
  padding: 9px 14px;
  color: #fffaf0;
  background: var(--forest);
  border: 1px solid var(--ink);
  box-shadow: 3px 3px 0 var(--yellow);
}

.paper-public .paper-nav-login:hover {
  color: #fffaf0;
  background: var(--ink);
  text-decoration: none;
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 var(--yellow);
}

.paper-public .anon-wrap {
  display: flex;
  flex: 1;
  width: 100%;
}

.paper-public #main.container {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.access-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(480px, .9fr) minmax(620px, 1.1fr);
  min-height: calc(100vh - 78px);
}

.access-layout::before {
  content: "";
  position: absolute;
  z-index: 5;
  top: 42px;
  bottom: 42px;
  left: calc(45% - 4px);
  width: 8px;
  background: var(--red);
  border: 1px solid var(--ink);
  pointer-events: none;
}

.access-story {
  position: relative;
  padding: clamp(62px, 6vw, 100px) clamp(48px, 5vw, 88px) 80px;
  background-color: rgba(243, 230, 207, .79);
  background-image:
    linear-gradient(90deg, transparent 0 82px, rgba(153, 27, 27, .16) 82px 83px, transparent 83px),
    repeating-linear-gradient(to bottom, transparent 0 31px, var(--paper-line) 31px 32px);
  border-right: 1px solid var(--ink);
}

.story-folio {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 57px;
  padding-bottom: 11px;
  color: #5f625b;
  border-bottom: 1px solid var(--ink);
  font-family: var(--mono);
  font-size: .57rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.story-folio b {
  color: var(--red);
  font-weight: 600;
}

.paper-kicker {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0;
  color: var(--forest);
  font-family: var(--mono);
  font-size: .67rem;
  font-weight: 600;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.paper-kicker i {
  width: 29px;
  height: 8px;
  background: var(--red);
}

.access-story h1 {
  max-width: 650px;
  margin: 25px 0 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(3.1rem, 4.7vw, 5.35rem);
  font-weight: 600;
  letter-spacing: -.045em;
  line-height: .99;
}

.story-lead {
  max-width: 600px;
  margin: 26px 0 0;
  color: #55574f;
  font-size: 1rem;
  line-height: 1.75;
}

.access-map {
  max-width: 650px;
  margin: 49px 0 0;
  padding: 0 17px 16px;
  background-color: rgba(251, 239, 217, .94);
  background-image: repeating-linear-gradient(to bottom, transparent 0 27px, rgba(68, 107, 120, .11) 27px 28px);
  border: 1px solid var(--ink);
  box-shadow: 8px 8px 0 var(--blue);
}

.access-map figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 55px;
  padding: 10px 3px;
  border-bottom: 1px solid var(--ink);
  font-family: var(--mono);
  text-transform: uppercase;
}

.access-map figcaption span {
  font-size: .56rem;
  font-weight: 600;
  letter-spacing: .08em;
}

.access-map figcaption small {
  color: #6c6b63;
  font-size: .46rem;
  letter-spacing: .05em;
}

.access-map svg {
  width: 100%;
  height: auto;
  margin-top: 8px;
  overflow: visible;
}

.request-wire {
  fill: none;
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
}

.request-wire-blue {
  stroke: var(--blue);
}

.request-wire-green {
  stroke: var(--green);
}

.request-paper {
  fill: #fbefd9;
  stroke: var(--ink);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.request-red,
.request-blue,
.request-green,
.request-yellow {
  stroke: var(--ink);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.request-red {
  fill: var(--red);
}

.request-blue {
  fill: var(--blue);
}

.request-green {
  fill: var(--green);
}

.request-yellow {
  fill: var(--yellow);
}

.request-role,
.request-name,
.request-meta,
.request-note text {
  font-family: var(--mono);
}

.request-role {
  fill: var(--ink);
  font-size: 7px;
  font-weight: 600;
  letter-spacing: .7px;
}

.request-light {
  fill: #fffaf0;
}

.request-name {
  fill: var(--ink);
  font-size: 9px;
  font-weight: 600;
}

.request-meta {
  fill: #62645d;
  font-size: 7px;
}

.request-note rect {
  fill: var(--paper-light);
  stroke: var(--ink);
  stroke-width: .8;
}

.request-note text {
  fill: var(--blue);
  font-size: 6.5px;
  font-weight: 600;
  letter-spacing: .4px;
  text-anchor: middle;
  text-transform: uppercase;
}

.access-notes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 650px;
  margin-top: 46px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.access-notes > div {
  display: grid;
  grid-template-columns: 25px 1fr;
  gap: 11px;
  min-width: 0;
  padding: 19px 15px 20px;
  border-right: 1px solid var(--paper-border);
}

.access-notes > div:first-child {
  padding-left: 0;
}

.access-notes > div:last-child {
  padding-right: 0;
  border-right: 0;
}

.access-notes span {
  color: var(--red);
  font-family: var(--mono);
  font-size: .56rem;
  font-weight: 600;
}

.access-notes p,
.access-notes b,
.access-notes small {
  display: block;
  margin: 0;
}

.access-notes b {
  font-family: var(--serif);
  font-size: 1rem;
}

.access-notes small {
  margin-top: 5px;
  color: #65665f;
  font-size: .69rem;
  line-height: 1.5;
}

.application-sheet {
  position: relative;
  align-self: start;
  margin: clamp(40px, 5vw, 78px) clamp(42px, 5vw, 86px) 78px;
  background-color: rgba(251, 239, 217, .98);
  background-image:
    linear-gradient(90deg, transparent 0 52px, rgba(153, 27, 27, .13) 52px 53px, transparent 53px),
    repeating-linear-gradient(to bottom, transparent 0 30px, rgba(68, 107, 120, .12) 30px 31px);
  border: 1.5px solid var(--ink);
  box-shadow: 11px 11px 0 var(--yellow);
}

.application-sheet::before {
  content: "PRIVATE WORKSPACE / INTAKE";
  position: absolute;
  top: -14px;
  right: 30px;
  padding: 5px 10px;
  color: #fffaf0;
  background: var(--red);
  border: 1px solid var(--ink);
  font-family: var(--mono);
  font-size: .48rem;
  letter-spacing: .09em;
  transform: rotate(1deg);
}

.sheet-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 78px;
  padding: 20px 28px 16px 64px;
  border-bottom: 1px solid var(--ink);
  font-family: var(--mono);
  text-transform: uppercase;
}

.sheet-heading > div {
  display: grid;
  line-height: 1.15;
}

.sheet-heading span {
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .09em;
}

.sheet-heading small {
  margin-top: 6px;
  color: #686961;
  font-size: .49rem;
  letter-spacing: .05em;
}

.sheet-heading b {
  color: var(--red);
  font-size: .55rem;
  letter-spacing: .08em;
}

.sheet-body {
  padding: 38px 44px 35px 64px;
}

.form-intro {
  margin-bottom: 35px;
  padding-bottom: 27px;
  border-bottom: 1px solid var(--ink);
}

.form-intro p {
  margin: 0 0 11px;
  color: var(--blue);
  font-family: var(--mono);
  font-size: .61rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.form-intro h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(2.25rem, 3vw, 3.4rem);
  font-weight: 600;
  letter-spacing: -.035em;
  line-height: 1.05;
}

.form-intro > span {
  display: block;
  max-width: 620px;
  margin-top: 15px;
  color: #62635c;
  font-size: .84rem;
  line-height: 1.65;
}

.paper-public .form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 18px;
}

.paper-public .form-row {
  margin-bottom: 22px;
}

.paper-public .form-row label {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: .61rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.paper-public .form-row label small {
  color: #77766d;
  font-size: .48rem;
  font-weight: 500;
  letter-spacing: .06em;
}

.paper-public .form-row label .required-note {
  color: var(--red);
}

.paper-public input[type="text"],
.paper-public input[type="email"],
.paper-public input[type="tel"],
.paper-public textarea {
  min-height: 48px;
  padding: 11px 13px;
  color: var(--ink);
  background: rgba(255, 250, 240, .64);
  border: 1px solid #77766d;
  border-radius: 0;
  box-shadow: 2px 2px 0 rgba(32, 41, 37, .12);
  font-family: Inter, sans-serif;
  font-size: .88rem;
}

.paper-public textarea {
  min-height: 92px;
  resize: vertical;
}

.paper-public input::placeholder,
.paper-public textarea::placeholder {
  color: #8a887e;
  opacity: 1;
}

.paper-public input:focus,
.paper-public textarea:focus {
  background: #fffaf0;
  border-color: var(--blue);
  box-shadow: 3px 3px 0 rgba(68, 107, 120, .35);
  outline: 2px solid transparent;
}

.paper-public .errorlist {
  margin-top: 7px;
  color: var(--red);
  font-family: var(--mono);
  font-size: .58rem;
  font-weight: 600;
}

.paper-public .form-alert {
  margin: 0 0 23px;
  padding: 12px 14px;
  background: #ead3cc;
  border: 1px solid var(--red);
}

.form-submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 10px;
  padding-top: 25px;
  border-top: 1px solid var(--ink);
}

.form-submit p {
  max-width: 260px;
  margin: 0;
  color: #66675f;
  font-size: .69rem;
  line-height: 1.55;
}

.form-submit p span {
  display: block;
  margin-bottom: 3px;
  color: var(--red);
  font-family: var(--mono);
  font-size: .53rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.paper-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 50px;
  padding: 0 19px;
  color: #fffaf0;
  background: var(--red);
  border: 1px solid #651010;
  box-shadow: 4px 4px 0 var(--yellow);
  font-family: var(--mono);
  font-size: .69rem;
  font-weight: 600;
  cursor: pointer;
}

.paper-submit svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.paper-submit:hover {
  background: #7c1616;
  transform: translate(-1px, -1px);
  box-shadow: 6px 6px 0 var(--yellow);
}

.paper-submit:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--yellow);
}

.form-login {
  margin: 29px 0 0;
  color: #6a6b64;
  font-family: var(--mono);
  font-size: .59rem;
  text-align: right;
}

.form-login a {
  color: var(--forest);
  font-weight: 600;
  border-bottom: 1px solid currentColor;
}

.form-login a:hover {
  color: var(--red);
  text-decoration: none;
}

.paper-public .messages {
  position: relative;
  z-index: 10;
  max-width: none;
  padding: 16px clamp(24px, 4vw, 68px) 0;
  background: var(--paper);
}

.paper-public .message {
  margin: 0;
  background: var(--paper-light);
  border: 1px solid var(--ink);
  border-left: 7px solid var(--green);
  box-shadow: 4px 4px 0 var(--yellow);
  font-family: var(--mono);
  font-size: .68rem;
}

/* Confirmation sheet */
.request-confirmation {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 78px);
  padding: 70px 24px;
}

.confirmation-sheet {
  position: relative;
  width: min(680px, 100%);
  padding: 60px clamp(30px, 7vw, 78px) 58px;
  background-color: rgba(251, 239, 217, .98);
  background-image:
    linear-gradient(90deg, transparent 0 48px, rgba(153, 27, 27, .15) 48px 49px, transparent 49px),
    repeating-linear-gradient(to bottom, transparent 0 30px, rgba(68, 107, 120, .12) 30px 31px);
  border: 1.5px solid var(--ink);
  box-shadow: 11px 11px 0 var(--blue);
  text-align: left;
}

.confirmation-sheet::before {
  content: "REQUEST / RECEIVED";
  position: absolute;
  top: -14px;
  left: 30px;
  padding: 5px 10px;
  color: #fffaf0;
  background: var(--green);
  border: 1px solid var(--ink);
  font-family: var(--mono);
  font-size: .5rem;
  letter-spacing: .09em;
}

.confirmation-mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  color: #fffaf0;
  background: var(--red);
  border: 1px solid var(--ink);
  box-shadow: 4px 4px 0 var(--yellow);
}

.confirmation-mark svg {
  width: 28px;
  height: 28px;
}

.confirmation-sheet .paper-kicker {
  margin-top: 34px;
}

.confirmation-sheet h1 {
  margin: 19px 0 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 600;
  letter-spacing: -.04em;
  line-height: 1;
}

.confirmation-sheet > p:not(.paper-kicker) {
  margin: 23px 0 0;
  color: #5d5f58;
  line-height: 1.75;
}

.confirmation-next {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 18px;
  margin-top: 31px;
  padding: 19px 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.confirmation-next > span {
  color: var(--red);
  font-family: var(--mono);
  font-size: .56rem;
  font-weight: 600;
}

.confirmation-next b,
.confirmation-next small {
  display: block;
}

.confirmation-next b {
  font-family: var(--serif);
  font-size: 1.12rem;
}

.confirmation-next small {
  margin-top: 4px;
  color: #686a63;
  line-height: 1.55;
}

.confirmation-home {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 31px;
  padding-bottom: 4px;
  color: var(--forest);
  border-bottom: 1px solid currentColor;
  font-family: var(--mono);
  font-size: .68rem;
  font-weight: 600;
}

.confirmation-home:hover {
  color: var(--red);
  text-decoration: none;
}

@media (max-width: 1250px) {
  .access-layout {
    grid-template-columns: minmax(420px, .82fr) minmax(570px, 1.18fr);
  }

  .access-layout::before {
    left: calc(41% - 4px);
  }

  .access-story {
    padding-inline: 48px;
  }

  .application-sheet {
    margin-inline: 42px;
  }

  .sheet-body {
    padding-right: 34px;
  }
}

@media (max-width: 1020px) {
  .access-layout {
    grid-template-columns: 1fr;
  }

  .access-layout::before {
    display: none;
  }

  .access-story {
    order: 2;
    padding: 70px max(28px, 7vw) 76px;
    border-right: 0;
    border-top: 1px solid var(--ink);
    border-bottom: 0;
  }

  .access-story h1,
  .story-lead,
  .access-map,
  .access-notes {
    max-width: 760px;
  }

  .access-story h1 {
    font-size: clamp(3.8rem, 8.5vw, 5.6rem);
  }

  .application-sheet {
    order: 1;
    width: min(760px, calc(100% - 56px));
    margin: 72px auto 84px;
  }
}

@media (max-width: 700px) {
  .paper-public {
    background-image:
      linear-gradient(90deg, transparent 0 15px, rgba(153, 27, 27, .18) 15px 16px, transparent 16px),
      repeating-linear-gradient(to bottom, transparent 0 31px, var(--paper-line) 31px 32px);
  }

  .paper-public .topbar {
    min-height: 70px;
    padding-inline: 20px;
  }

  .paper-public .public-brand-mark {
    width: 34px;
    height: 34px;
  }

  .paper-public .paper-nav-link {
    display: none;
  }

  .access-story {
    padding: 54px 24px 62px;
    background-image:
      linear-gradient(90deg, transparent 0 15px, rgba(153, 27, 27, .16) 15px 16px, transparent 16px),
      repeating-linear-gradient(to bottom, transparent 0 31px, var(--paper-line) 31px 32px);
  }

  .story-folio {
    margin-bottom: 44px;
  }

  .access-story h1 {
    font-size: clamp(3rem, 13.5vw, 4.3rem);
  }

  .access-map {
    margin-top: 40px;
    padding-inline: 10px;
    box-shadow: 6px 6px 0 var(--blue);
  }

  .access-map figcaption small {
    display: none;
  }

  .access-notes {
    grid-template-columns: 1fr;
  }

  .access-notes > div,
  .access-notes > div:first-child,
  .access-notes > div:last-child {
    padding: 16px 0;
    border-right: 0;
    border-bottom: 1px solid var(--paper-border);
  }

  .access-notes > div:last-child {
    border-bottom: 0;
  }

  .application-sheet {
    width: calc(100% - 32px);
    margin-block: 54px 68px;
    background-image:
      linear-gradient(90deg, transparent 0 25px, rgba(153, 27, 27, .13) 25px 26px, transparent 26px),
      repeating-linear-gradient(to bottom, transparent 0 30px, rgba(68, 107, 120, .12) 30px 31px);
    box-shadow: 7px 7px 0 var(--yellow);
  }

  .application-sheet::before {
    right: 15px;
  }

  .sheet-heading {
    padding: 19px 17px 15px 38px;
  }

  .sheet-heading b {
    display: none;
  }

  .sheet-body {
    padding: 31px 20px 30px 38px;
  }

  .paper-public .form-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .form-submit {
    align-items: stretch;
    flex-direction: column;
  }

  .form-submit p {
    max-width: none;
  }

  .paper-submit {
    width: 100%;
  }

  .form-login {
    text-align: left;
  }

  .request-confirmation {
    min-height: calc(100vh - 70px);
    padding: 54px 16px 64px;
  }

  .confirmation-sheet {
    padding: 48px 28px 45px 42px;
    background-image:
      linear-gradient(90deg, transparent 0 25px, rgba(153, 27, 27, .14) 25px 26px, transparent 26px),
      repeating-linear-gradient(to bottom, transparent 0 30px, rgba(68, 107, 120, .12) 30px 31px);
    box-shadow: 7px 7px 0 var(--blue);
  }
}

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

/* Standalone PROS access and sign-in pages ------------------------------- */
html {
  scrollbar-color: var(--red) var(--paper-deep);
  scrollbar-width: thin;
}

html::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

html::-webkit-scrollbar-track {
  background: var(--paper-deep);
  border-left: 1px solid var(--ink);
}

html::-webkit-scrollbar-thumb {
  background: var(--red);
  border: 3px solid var(--paper-deep);
  border-radius: 0;
}

html::-webkit-scrollbar-thumb:hover {
  background: var(--forest);
}

.paper-public * {
  box-shadow: none !important;
  scrollbar-color: var(--red) var(--paper-deep);
  scrollbar-width: thin;
}

.paper-public *::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.paper-public *::-webkit-scrollbar-track {
  background: var(--paper-deep);
  border-left: 1px solid var(--ink);
}

.paper-public *::-webkit-scrollbar-thumb {
  background: var(--red);
  border: 2px solid var(--paper-deep);
  border-radius: 0;
}

.access-only,
.auth-only {
  height: 100svh;
  min-height: 580px;
  overflow: hidden;
}

.access-only .topbar,
.auth-only .topbar {
  display: none;
}

.access-only .anon-wrap,
.auth-only .anon-wrap,
.access-only #main.container,
.auth-only #main.container {
  width: 100%;
  height: 100%;
  min-height: 0;
}

.page-back {
  position: fixed;
  z-index: 20;
  top: 22px;
  left: 24px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 14px;
  color: var(--ink);
  background: rgba(251, 239, 217, .94);
  border: 1px solid var(--ink);
  font-family: var(--mono);
  font-size: .65rem;
  font-weight: 600;
  text-transform: uppercase;
}

.page-back:hover {
  color: #fffaf0;
  background: var(--forest);
  text-decoration: none;
}

.standalone-form-shell,
.auth-page {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 100svh;
  padding: 14px 24px;
}

.access-only .application-sheet {
  align-self: auto;
  width: min(900px, calc(100vw - 48px));
  max-height: calc(100svh - 28px);
  margin: 0;
  overflow: auto;
}

.access-only .application-sheet::before {
  top: -1px;
  right: 24px;
  transform: none;
}

.access-only .sheet-heading {
  min-height: 56px;
  padding: 12px 24px 10px 46px;
}

.access-only .sheet-body {
  padding: 17px 30px 18px 46px;
}

.access-only .form-intro {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px 24px;
  align-items: end;
  margin-bottom: 13px;
  padding-bottom: 12px;
}

.access-only .form-intro p {
  grid-column: 1 / -1;
  margin-bottom: 3px;
}

.access-only .form-intro h1 {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.85rem, 3vw, 2.7rem);
  font-weight: 600;
  letter-spacing: -.035em;
  line-height: 1;
}

.access-only .form-intro > span {
  max-width: 330px;
  margin: 0 0 2px;
  font-size: .73rem;
  line-height: 1.45;
  text-align: right;
}

.access-only .form-grid {
  grid-template-columns: 1fr 1fr;
  gap: 0 14px;
}

.access-only .form-row {
  margin-bottom: 9px;
}

.access-only .form-row label {
  margin-bottom: 4px;
  font-size: .54rem;
}

.access-only input[type="text"],
.access-only input[type="email"],
.access-only input[type="tel"],
.access-only textarea {
  min-height: 38px;
  padding: 7px 10px;
  font-size: .79rem;
}

.access-only textarea {
  min-height: 54px;
  max-height: 68px;
}

.access-only .form-submit {
  justify-content: flex-end;
  margin-top: 2px;
  padding-top: 11px;
}

.access-only .paper-submit {
  min-height: 42px;
  padding-inline: 20px;
}

.access-only:has(.errorlist) {
  overflow: auto;
}

.auth-sheet {
  position: relative;
  width: min(470px, calc(100vw - 48px));
  padding: 28px 42px 32px;
  background-color: rgba(251, 239, 217, .98);
  background-image:
    linear-gradient(90deg, transparent 0 34px, rgba(153, 27, 27, .14) 34px 35px, transparent 35px),
    repeating-linear-gradient(to bottom, transparent 0 30px, rgba(68, 107, 120, .12) 30px 31px);
  border: 1.5px solid var(--ink);
}

.auth-folio {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: -2px 0 27px;
  padding-bottom: 9px;
  color: #66675f;
  border-bottom: 1px solid var(--ink);
  font-family: var(--mono);
  font-size: .53rem;
  letter-spacing: .09em;
}

.auth-folio b {
  color: var(--red);
}

.auth-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 25px;
  color: #fffaf0;
  background: var(--forest);
  border: 1px solid var(--ink);
}

.auth-mark svg {
  width: 31px;
  height: 31px;
  fill: currentColor;
}

.auth-mark circle {
  fill: var(--orange);
}

.auth-sheet h1 {
  margin: 19px 0 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(2.8rem, 6vw, 4.15rem);
  font-weight: 600;
  letter-spacing: -.045em;
  line-height: .98;
}

.auth-lead {
  margin: 17px 0 27px;
  color: #5d6059;
  font-size: .83rem;
  line-height: 1.65;
}

.auth-only .form-row {
  margin-bottom: 16px;
}

.auth-only .form-row label {
  margin-bottom: 6px;
  font-size: .57rem;
}

.auth-only input[type="text"],
.auth-only input[type="password"] {
  min-height: 46px;
  padding: 9px 11px;
  color: var(--ink);
  background: rgba(255, 250, 240, .7);
  border: 1px solid #77766d;
  border-radius: 0;
  font-family: Inter, sans-serif;
}

.auth-only input:focus {
  background: #fffaf0;
  border-color: var(--blue);
  outline: 2px solid transparent;
}

.auth-submit {
  width: 100%;
  min-height: 48px;
  margin-top: 5px;
}

.auth-links {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 24px;
  padding-top: 17px;
  border-top: 1px solid var(--ink);
  font-family: var(--mono);
  font-size: .58rem;
}

.auth-links a {
  color: var(--forest);
  border-bottom: 1px solid currentColor;
}

.auth-links a:hover {
  color: var(--red);
  text-decoration: none;
}

@media (max-width: 620px) {
  .access-only,
  .auth-only {
    min-height: 620px;
  }

  .page-back {
    top: 12px;
    left: 14px;
    min-height: 36px;
    padding-inline: 11px;
  }

  .standalone-form-shell,
  .auth-page {
    padding: 10px 14px;
  }

  .access-only .application-sheet {
    width: calc(100vw - 28px);
    max-height: calc(100svh - 20px);
  }

  .access-only .application-sheet::before {
    right: 12px;
  }

  .access-only .sheet-heading {
    min-height: 49px;
    padding: 9px 14px 8px 28px;
  }

  .access-only .sheet-body {
    padding: 14px 14px 14px 28px;
  }

  .access-only .form-intro {
    display: block;
    margin-bottom: 10px;
    padding-bottom: 10px;
  }

  .access-only .form-intro > span {
    display: block;
    max-width: none;
    margin-top: 7px;
    font-size: .66rem;
    text-align: left;
  }

  .access-only .form-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0 9px;
  }

  .access-only .form-row label {
    gap: 6px;
    font-size: .48rem;
  }

  .access-only .form-row label small {
    font-size: .4rem;
  }

  .access-only input[type="text"],
  .access-only input[type="email"],
  .access-only input[type="tel"],
  .access-only textarea {
    padding-inline: 8px;
    font-size: .72rem;
  }

  .auth-sheet {
    width: calc(100vw - 28px);
    padding: 25px 27px 28px 38px;
  }

  .auth-links {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
}

/* Compact forms, paper-marked validation, and floating notices ----------- */
.access-only,
.auth-only {
  background-image:
    linear-gradient(90deg, transparent 0 82px, rgba(153, 27, 27, .2) 82px 83px, transparent 83px),
    repeating-linear-gradient(to bottom, transparent 0 31px, var(--paper-line) 31px 32px);
}

.page-back {
  top: 18px;
  left: 10px;
  gap: 5px;
  min-height: 36px;
  padding-inline: 7px;
  font-size: .56rem;
}

.access-only .application-sheet {
  width: min(860px, calc(100vw - 48px));
  max-height: none;
  overflow: visible;
}

.access-only:has(.errorlist),
.access-only:has(.teacher-comment) {
  overflow: hidden;
}

.field-error {
  position: relative;
  z-index: 2;
}

.field-error input,
.field-error textarea {
  background: rgba(255, 250, 240, .92) !important;
  border-color: rgba(153, 27, 27, .46) !important;
}

.teacher-loop {
  position: absolute;
  z-index: 3;
  top: 14px;
  right: -7px;
  left: -7px;
  height: 45px;
  border: 2.2px solid #c92525;
  border-radius: 51% 46% 53% 47% / 48% 54% 45% 52%;
  pointer-events: none;
  transform: rotate(-1.1deg);
}

.teacher-loop::after {
  content: "";
  position: absolute;
  inset: -4px 3px 1px -2px;
  border: 1.4px solid #d9342b;
  border-left-color: transparent;
  border-radius: 47% 53% 49% 51% / 55% 45% 52% 48%;
  transform: rotate(2.1deg);
}

.teacher-comment {
  position: relative;
  z-index: 4;
  margin: 6px 4px 0;
  color: #c11f1f;
  font-family: "Segoe Print", "Bradley Hand", "Comic Sans MS", cursive;
  font-size: .75rem;
  font-weight: 600;
  line-height: 1.25;
  transform: rotate(-.7deg);
}

.teacher-comment span {
  display: inline-block;
  margin-right: 2px;
  font-size: 1rem;
  line-height: .7;
  transform: rotate(8deg);
}

.auth-folio {
  margin-bottom: 18px;
}

.auth-sheet h1 {
  margin-top: 14px;
}

.auth-lead {
  margin: 12px 0 20px;
}

.auth-only .form-row {
  margin-bottom: 14px;
}

.auth-only .teacher-loop {
  top: 16px;
  height: 52px;
}

.auth-links {
  margin-top: 18px;
  padding-top: 14px;
}

/* Django messages float above the page so they never resize the content. */
.paper-public .messages {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 50%;
  width: min(610px, calc(100vw - 28px));
  max-width: none;
  margin: 0;
  padding: 0;
  background: transparent;
  pointer-events: none;
  transform-origin: 50% 0;
  animation: notice-island 6.8s cubic-bezier(.22, .9, .24, 1) both;
}

.paper-public .message,
.paper-public .message-success,
.paper-public .message-info,
.paper-public .message-warning,
.paper-public .message-error,
.paper-public .message-danger {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin: 0;
  padding: 10px 18px;
  color: #fffaf0;
  background: #152b26;
  border: 1px solid rgba(255, 250, 240, .75);
  border-left-width: 1px;
  border-radius: 24px;
  font-family: var(--mono);
  font-size: .66rem;
  line-height: 1.45;
  text-align: left;
}

.paper-public .message::before {
  content: "✓";
  display: grid;
  flex: 0 0 23px;
  place-items: center;
  width: 23px;
  height: 23px;
  color: #152b26;
  background: #d5bd61;
  border-radius: 50%;
  font-size: .68rem;
  font-weight: 700;
}

.paper-public .message-error::before,
.paper-public .message-danger::before {
  content: "!";
  color: #fffaf0;
  background: #b52323;
}

@keyframes notice-island {
  0% {
    opacity: 0;
    transform: translate(-50%, -150%) scale(.42, .25);
  }
  9% {
    opacity: 1;
  }
  17% {
    transform: translate(-50%, 0) scale(1.035, 1.08);
  }
  23%, 82% {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -135%) scale(.68, .45);
  }
}

@media (max-width: 620px) {
  .page-back {
    top: 10px;
    left: 8px;
    gap: 4px;
    min-height: 34px;
    padding-inline: 6px;
    font-size: .52rem;
  }

  .access-only .application-sheet {
    max-height: none;
  }

  .auth-sheet {
    padding-block: 21px 24px;
  }

  .teacher-comment {
    font-size: .66rem;
  }

  .paper-public .messages {
    top: 8px;
    width: calc(100vw - 16px);
  }

  .paper-public .message {
    padding-inline: 13px;
    font-size: .61rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .paper-public .messages {
    animation: none;
    opacity: 1;
    transform: translateX(-50%);
  }
}

/* Standalone confirmation and account switches -------------------------- */
.confirmation-only {
  height: 100svh;
  min-height: 0;
  overflow: hidden;
  background-image:
    linear-gradient(90deg, transparent 0 82px, rgba(153, 27, 27, .2) 82px 83px, transparent 83px),
    repeating-linear-gradient(to bottom, transparent 0 31px, var(--paper-line) 31px 32px);
}

.confirmation-only .topbar {
  display: none;
}

.confirmation-only .anon-wrap,
.confirmation-only #main.container {
  width: 100%;
  height: 100%;
  min-height: 0;
}

.confirmation-only .request-confirmation {
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 14px 24px;
}

.confirmation-only .confirmation-sheet {
  width: min(680px, calc(100vw - 48px));
  padding: 34px clamp(38px, 6vw, 64px) 32px;
}

.confirmation-only .confirmation-mark {
  width: 46px;
  height: 46px;
}

.confirmation-only .confirmation-sheet .paper-kicker {
  margin-top: 22px;
}

.confirmation-only .confirmation-sheet h1 {
  margin-top: 13px;
  font-size: clamp(2.8rem, 5.5vw, 4rem);
}

.confirmation-only .confirmation-sheet > p:not(.paper-kicker) {
  margin-top: 14px;
  font-size: .88rem;
  line-height: 1.55;
}

.confirmation-only .confirmation-next {
  margin-top: 18px;
  padding: 13px 0;
}

.access-only .form-submit {
  justify-content: space-between;
}

.access-account-switch {
  color: #62655e !important;
  font-family: var(--mono);
  font-size: .58rem !important;
  line-height: 1.5 !important;
  text-align: left;
}

.access-account-switch a {
  margin-left: 4px;
  color: var(--forest);
  font-weight: 600;
  border-bottom: 1px solid currentColor;
}

.access-account-switch a:hover {
  color: var(--red);
  text-decoration: none;
}

@media (max-width: 620px) {
  .confirmation-only {
    background-image:
      linear-gradient(90deg, transparent 0 82px, rgba(153, 27, 27, .2) 82px 83px, transparent 83px),
      repeating-linear-gradient(to bottom, transparent 0 31px, var(--paper-line) 31px 32px);
  }

  .confirmation-only .request-confirmation {
    padding: 12px 14px;
  }

  .confirmation-only .confirmation-sheet {
    width: calc(100vw - 28px);
    padding: 31px 20px 27px 34px;
    background-image:
      linear-gradient(90deg, transparent 0 25px, rgba(153, 27, 27, .14) 25px 26px, transparent 26px),
      repeating-linear-gradient(to bottom, transparent 0 30px, rgba(68, 107, 120, .12) 30px 31px);
  }

  .confirmation-only .confirmation-sheet h1 {
    font-size: clamp(2.55rem, 12vw, 3.3rem);
  }

  .confirmation-only .confirmation-next {
    grid-template-columns: 42px 1fr;
    gap: 12px;
  }

  .access-only .form-submit {
    gap: 9px;
  }
}

@media (max-height: 600px) {
  .confirmation-only .confirmation-sheet {
    padding-top: 25px;
    padding-bottom: 22px;
  }

  .confirmation-only .confirmation-mark {
    width: 40px;
    height: 40px;
  }

  .confirmation-only .confirmation-sheet .paper-kicker {
    margin-top: 14px;
  }

  .confirmation-only .confirmation-sheet h1 {
    margin-top: 8px;
    font-size: 2.7rem;
  }

  .confirmation-only .confirmation-sheet > p:not(.paper-kicker) {
    margin-top: 9px;
    font-size: .78rem;
    line-height: 1.45;
  }

  .confirmation-only .confirmation-next {
    margin-top: 11px;
    padding: 9px 0;
  }
}

/* Single-column registration sheet -------------------------------------- */
.access-only {
  min-height: 0;
}

.access-only .standalone-form-shell {
  min-height: 100svh;
  padding-block: 8px;
}

.access-only .application-sheet {
  width: min(560px, calc(100vw - 48px));
  max-height: none;
  overflow: visible;
}

.access-only .sheet-heading {
  min-height: 50px;
  padding: 9px 20px 8px 42px;
}

.access-only .sheet-body {
  padding: 12px 24px 13px 42px;
}

.access-only .form-intro {
  display: block;
  margin-bottom: 9px;
  padding-bottom: 9px;
}

.access-only .form-intro p {
  margin-bottom: 3px;
}

.access-only .form-intro h1 {
  max-width: 430px;
  font-size: clamp(1.8rem, 3vw, 2.35rem);
  line-height: .98;
}

.access-only .form-grid {
  display: block;
}

.access-only .form-row {
  margin-bottom: 7px;
}

.access-only .form-row label {
  margin-bottom: 3px;
  font-size: .51rem;
}

.access-only input[type="text"],
.access-only input[type="email"],
.access-only input[type="tel"] {
  min-height: 36px;
  padding: 6px 10px;
  font-size: .76rem;
}

.access-only .teacher-loop {
  top: 11px;
  height: 42px;
}

.access-only .teacher-comment {
  margin-top: 4px;
  font-size: .67rem;
}

.access-only .form-submit {
  margin-top: 1px;
  padding-top: 9px;
}

.access-only .paper-submit {
  min-height: 40px;
}

@media (max-width: 620px) {
  .access-only {
    min-height: 0;
  }

  .access-only .standalone-form-shell {
    padding: 7px 24px;
  }

  .access-only .application-sheet {
    width: calc(100vw - 48px);
  }

  .access-only .sheet-heading {
    min-height: 46px;
    padding: 8px 11px 7px 27px;
  }

  .access-only .sheet-heading::before {
    right: 9px;
  }

  .access-only .sheet-heading b {
    font-size: .46rem;
  }

  .access-only .sheet-body {
    padding: 10px 13px 11px 27px;
  }

  .access-only .form-intro {
    margin-bottom: 8px;
    padding-bottom: 8px;
  }

  .access-only .form-intro h1 {
    max-width: 270px;
    font-size: clamp(1.72rem, 8vw, 2rem);
  }

  .access-only .form-row {
    margin-bottom: 6px;
  }

  .access-only input[type="text"],
  .access-only input[type="email"],
  .access-only input[type="tel"] {
    min-height: 35px;
    padding-block: 5px;
  }

  .access-only .form-submit {
    align-items: stretch;
    flex-direction: column;
    gap: 6px;
    padding-top: 8px;
  }

  .access-only .access-account-switch {
    max-width: none;
  }

  .access-only .paper-submit {
    width: 100%;
  }
}

@media (max-height: 620px) {
  .access-only .sheet-heading {
    min-height: 43px;
  }

  .access-only .sheet-body {
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .access-only .form-intro {
    margin-bottom: 6px;
    padding-bottom: 6px;
  }

  .access-only .form-intro h1 {
    font-size: 1.7rem;
  }

  .access-only .form-row {
    margin-bottom: 5px;
  }

  .access-only input[type="text"],
  .access-only input[type="email"],
  .access-only input[type="tel"] {
    min-height: 33px;
  }

  .access-only .form-submit {
    padding-top: 6px;
  }
}

/* ==========================================================================
   Split login (single-tenant): brand panel + diagram on the left, form right
   ========================================================================== */
.auth-split-page .auth-split {
  display: grid;
  grid-template-columns: minmax(520px, 1.08fr) minmax(430px, .92fr);
  width: 100%;
  height: 100svh;
}

.auth-side {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(16px, 2.4vh, 26px);
  padding: clamp(28px, 4vw, 56px);
  overflow: hidden;
  color: #f3e6cf;
  background:
    radial-gradient(1100px 560px at 88% -12%, rgba(233, 180, 76, .16), transparent 62%),
    var(--forest);
  border-right: 1.5px solid var(--ink);
}

.auth-side-brand { display: flex; align-items: center; gap: 14px; }
.auth-side-mark {
  display: grid; place-items: center;
  width: 46px; height: 46px;
  color: var(--forest);
  background: #f3e6cf;
  border: 1px solid var(--ink);
}
.auth-side-logo {
  width: 54px; height: 54px;
  object-fit: contain;
  background: #f3e6cf;
  border-radius: 10px;
  padding: 4px;
}
.auth-side-brand-text { display: flex; flex-direction: column; line-height: 1.3; }
.auth-side-brand-text strong { font-family: var(--mono); font-size: 1.02rem; letter-spacing: .16em; }
.auth-side-brand-text small { font-size: .66rem; letter-spacing: .04em; opacity: .78; }

.auth-side-title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.55rem, 2.6vw, 2.3rem);
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.12;
}

.auth-side-foot {
  margin: 0;
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .7;
}

/* --- the relationship diagram, recolored for the dark panel -------------- */
.auth-map { width: 100%; max-width: 660px; height: auto; }

.auth-map .branch-line { fill: none; stroke: rgba(243, 230, 207, .48); stroke-width: 1.6; }
.auth-map .branch-feedback { stroke-dasharray: 5 6; opacity: .65; }
.auth-map .branch-pulse {
  fill: none;
  stroke: var(--yellow, #e9b44c);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-dasharray: 16 420;
  animation: auth-map-pulse 5.4s linear infinite;
  animation-delay: var(--delay, 0s);
}
@keyframes auth-map-pulse {
  from { stroke-dashoffset: 436; }
  to { stroke-dashoffset: 0; }
}

.auth-map .branch-labels text {
  fill: rgba(243, 230, 207, .6);
  font-family: var(--mono);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: .09em;
}

.auth-map .branch-card { fill: rgba(251, 239, 217, .97); stroke: rgba(13, 26, 23, .6); stroke-width: 1.2; }
.auth-map .branch-overline {
  fill: #6d6a5c;
  font-family: var(--mono);
  font-size: 7.6px;
  font-weight: 600;
  letter-spacing: .1em;
}
.auth-map .branch-title { fill: var(--ink); font-family: var(--serif); font-size: 15.5px; font-weight: 600; }
.auth-map .branch-title-small { font-size: 13.5px; }
.auth-map .branch-title-leaf { font-size: 14px; }
.auth-map .branch-meta { fill: var(--red); font-family: var(--mono); font-size: 8px; font-weight: 700; letter-spacing: .12em; }
.auth-map .branch-accent.accent-red { fill: var(--red); }
.auth-map .branch-dot.dot-red { fill: var(--red); }
.auth-map .branch-dot.dot-orange { fill: var(--orange, #c96f2f); }
.auth-map .branch-index { stroke: none; }
.auth-map .branch-index.index-blue { fill: #446b78; }
.auth-map .branch-index.index-yellow { fill: var(--yellow, #e9b44c); }
.auth-map .branch-index.index-orange { fill: var(--orange, #c96f2f); }
.auth-map .branch-index-text {
  fill: #fffaf0;
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 700;
  text-anchor: middle;
}
.auth-map .branch-index-text.index-dark { fill: #2b2b23; }

/* --- form column --------------------------------------------------------- */
.auth-main {
  display: grid;
  place-items: center;
  padding: 20px;
  overflow-y: auto;
  max-height: 100svh;
}

@media (max-width: 980px) {
  .auth-split-page .auth-split { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .auth-split-page.auth-only { overflow: auto; }
}
