:root {
  color-scheme: light;
  font-family: var(--font-ui, "Public Sans", Arial, Helvetica, sans-serif);
  background: var(--bct-deep-green, #1c2b24);
  color: var(--bct-deep-green, #1c2b24);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-width: 20rem;
  min-height: 100%;
}

html {
  background: var(--bct-deep-green, #1c2b24);
}

body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  background: var(--bct-deep-green, #1c2b24);
}

button,
input {
  font: inherit;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 1rem;
  padding: 0.75rem 1rem;
  color: var(--bct-deep-green, #1c2b24);
  background: var(--bct-warm-ivory, #e6e0d5);
  border: 2px solid var(--bct-deep-green, #1c2b24);
  text-decoration: none;
  transform: translateY(-125%);
}

.skip-link-entry {
  left: 13rem;
}

.skip-link:focus {
  transform: translateY(0.5rem);
}

.access-page {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: clamp(7rem, 8vw, 9rem) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  background: var(--bct-warm-ivory, #e6e0d5);
}

.access-masthead {
  position: relative;
  z-index: 3;
  grid-column: 1;
  grid-row: 1 / 3;
  padding: clamp(1.5rem, 2.5vw, 2.5rem) 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--bct-warm-ivory, #e6e0d5);
  background: var(--bct-deep-green, #1c2b24);
  border-right: 1px solid rgb(184 154 90 / 46%);
}

.institution-mark {
  width: 100%;
  display: grid;
  justify-items: center;
  gap: 0.9rem;
  color: inherit;
  text-align: center;
  text-decoration: none;
}

.institution-mark img {
  width: 2.65rem;
  height: auto;
}

.institution-name {
  display: grid;
  text-transform: uppercase;
}

.institution-name strong {
  font-family: var(--font-display, "Newsreader", Georgia, serif);
  font-size: 1rem;
  font-weight: 620;
  line-height: 0.95;
  letter-spacing: 0.19em;
}

.institution-name small {
  margin-top: 0.38rem;
  font-size: 0.53rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.21em;
}

.masthead-status {
  margin: auto 0 0;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: rgb(230 224 213 / 76%);
  font-family: var(--font-mono, "IBM Plex Mono", monospace);
  font-size: 0.61rem;
  line-height: 1.35;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.status-indicator,
.register-mark {
  width: 0.48rem;
  height: 0.48rem;
  display: inline-block;
  flex: 0 0 auto;
  background: var(--bct-civic-gold, #b89a5a);
  border-radius: 50%;
}

.access-main {
  position: relative;
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  min-height: max(48rem, calc(100vh - 4.5rem));
  min-height: max(48rem, calc(100svh - 4.5rem));
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(24rem, 30rem);
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
  background: var(--bct-warm-ivory, #e6e0d5);
}

.public-status {
  grid-column: 1 / 3;
  grid-row: 1 / 3;
  min-width: 0;
  padding: clamp(2.5rem, 4.2vw, 5rem);
  display: grid;
  grid-template-rows: auto 1fr auto auto;
}

.public-meta {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgb(28 43 36 / 28%);
}

.section-index,
.folio-location {
  margin: 0;
  color: var(--bct-gold-deep, #66512d);
  font-family: var(--font-mono, "IBM Plex Mono", monospace);
  font-size: 0.66rem;
  line-height: 1.3;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.section-index {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
}

.section-index span:first-child {
  min-width: 2.6rem;
  padding-right: 0.85rem;
  border-right: 1px solid currentcolor;
}

.folio-location {
  color: rgb(28 43 36 / 70%);
}

.public-copy {
  align-self: center;
  max-width: 72rem;
  padding: clamp(3rem, 7vh, 6rem) 0 clamp(6rem, 12vh, 9rem);
}

.eyebrow,
.entry-kicker,
.institution-line {
  margin: 0;
  color: var(--bct-gold-deep, #66512d);
  font-size: 0.69rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

h1 {
  max-width: 13ch;
  margin: clamp(0.85rem, 1.8vh, 1.5rem) 0 clamp(1.4rem, 2.8vh, 2.5rem);
  font-family: var(--font-display, "Newsreader", Georgia, serif);
  font-size: clamp(4.5rem, 7.5vw, 9rem);
  font-weight: 430;
  line-height: 0.84;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.lead {
  max-width: 43rem;
  margin: 0;
  color: var(--bct-graphite, #4a4c47);
  font-size: clamp(1.05rem, 1.25vw, 1.28rem);
  line-height: 1.62;
  text-wrap: pretty;
}

.continuity {
  max-width: 39rem;
  margin: clamp(1.25rem, 2.5vh, 2.1rem) 0 0;
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  gap: 0.95rem;
  color: var(--bct-deep-green, #1c2b24);
  font-size: 0.91rem;
  line-height: 1.62;
  text-wrap: pretty;
}

.continuity::before {
  content: "";
  width: 100%;
  height: 1px;
  margin-top: 0.72em;
  background: var(--bct-civic-gold, #b89a5a);
}

.status-register {
  width: calc(100% - clamp(29rem, 36vw, 36rem));
  min-width: 34rem;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid rgb(28 43 36 / 34%);
  border-bottom: 1px solid rgb(28 43 36 / 34%);
}

.status-register div {
  min-width: 0;
  padding: 1rem 1.15rem 1rem 0;
}

.status-register div + div {
  padding-left: 1.15rem;
  border-left: 1px solid rgb(28 43 36 / 24%);
}

.status-register dt {
  margin-bottom: 0.42rem;
  color: rgb(28 43 36 / 70%);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.status-register dd {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.58rem;
  font-family: var(--font-display, "Newsreader", Georgia, serif);
  font-size: 1.08rem;
  font-weight: 520;
  line-height: 1.2;
}

.register-mark {
  width: 0.43rem;
  height: 0.43rem;
  background: var(--bct-success, #355f49);
}

.institution-line {
  width: calc(100% - clamp(29rem, 36vw, 36rem));
  min-width: 34rem;
  margin-top: 1.65rem;
}

.entry {
  position: relative;
  z-index: 2;
  grid-column: 2;
  grid-row: 2;
  align-self: end;
  justify-self: end;
  width: calc(100% - clamp(2rem, 3.5vw, 4.5rem));
  max-width: 28rem;
  margin: 0 clamp(2rem, 3.5vw, 4.5rem) clamp(2.25rem, 4.5vw, 5rem) 0;
  padding: 1.6rem 1.75rem 1.35rem;
  color: var(--bct-warm-ivory, #e6e0d5);
  background: var(--bct-green-raised, #24352d);
  border: 1px solid rgb(184 154 90 / 58%);
  border-top-width: 3px;
}

.entry-index {
  margin-bottom: 1.5rem;
  color: var(--bct-civic-gold, #b89a5a);
}

.entry-content {
  width: 100%;
}

.entry-kicker {
  color: var(--bct-civic-gold, #b89a5a);
}

.entry h2 {
  margin: 0.55rem 0 0.75rem;
  font-family: var(--font-display, "Newsreader", Georgia, serif);
  font-size: clamp(2.35rem, 3vw, 3rem);
  font-weight: 430;
  line-height: 0.92;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.entry-intro {
  max-width: 31rem;
  margin: 0 0 1.45rem;
  color: rgb(230 224 213 / 78%);
  font-size: 0.84rem;
  line-height: 1.58;
  text-wrap: pretty;
}

.session-notice {
  margin: -0.15rem 0 1.35rem;
  padding: 0.72rem 0 0.72rem 0.85rem;
  display: grid;
  gap: 0.18rem;
  color: rgb(230 224 213 / 78%);
  border-left: 2px solid var(--bct-civic-gold, #b89a5a);
  font-size: 0.76rem;
  line-height: 1.42;
}

.session-notice strong {
  color: var(--bct-warm-ivory, #e6e0d5);
}

form {
  display: grid;
  gap: 0.6rem;
}

label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.password-control {
  position: relative;
}

input {
  width: 100%;
  min-height: 3.45rem;
  padding: 0.82rem 4.65rem 0.82rem 0.95rem;
  border: 1px solid rgb(230 224 213 / 52%);
  border-radius: var(--radius-sm, 2px);
  background: var(--bct-ivory-raised, #eee9df);
  color: var(--bct-deep-green, #1c2b24);
  font-size: 1rem;
  line-height: 1.2;
}

input::placeholder {
  color: rgb(74 76 71 / 82%);
}

/* Stable username context for password managers; the gate has no user-specific identity. */
.site-access-username {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

input:hover:not(:read-only) {
  border-color: var(--bct-warm-ivory, #e6e0d5);
}

.password-toggle {
  position: absolute;
  top: 0.32rem;
  right: 0.32rem;
  min-width: 4rem;
  min-height: 2.8rem;
  padding: 0.5rem 0.7rem;
  border: 0;
  border-left: 1px solid rgb(28 43 36 / 18%);
  border-radius: 0;
  background: transparent;
  color: var(--bct-deep-green, #1c2b24);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.password-toggle:hover:not(:disabled) {
  background: rgb(28 43 36 / 7%);
}

.hint,
.fallback,
.result {
  margin: 0;
  color: rgb(230 224 213 / 68%);
  font-size: 0.72rem;
  line-height: 1.45;
}

.hint {
  margin-bottom: 0.35rem;
}

.access-submit {
  position: relative;
  min-height: 3.45rem;
  padding: 0.82rem 1rem;
  border: 1px solid var(--bct-civic-gold, #b89a5a);
  border-radius: var(--radius-sm, 2px);
  background: var(--bct-civic-gold, #b89a5a);
  color: var(--bct-deep-green, #1c2b24);
  font-size: 0.73rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.06em;
  cursor: pointer;
}

.access-submit:hover:not(:disabled) {
  background: #c5aa6d;
}

.access-submit:disabled {
  cursor: wait;
  opacity: 0.72;
}

form[data-state="loading"] .access-submit {
  padding-right: 3.25rem;
}

form[data-state="loading"] .access-submit::after {
  content: "";
  position: absolute;
  top: calc(50% - 0.45rem);
  right: 1.2rem;
  width: 0.72rem;
  height: 0.72rem;
  border: 2px solid rgb(28 43 36 / 28%);
  border-top-color: var(--bct-deep-green, #1c2b24);
  border-radius: 50%;
  animation: access-spin 700ms linear infinite;
}

form[data-state="success"] .access-submit {
  border-color: #8cae97;
  background: #a9c6b2;
}

form[data-state="error"] #site-access-password {
  border-color: #e2a39a;
  box-shadow: 0 0 0 1px #e2a39a;
}

.feedback-slot {
  min-height: 4rem;
  padding-top: 0.15rem;
}

.result[data-kind="error"] {
  color: #f2b5ac;
}

.result[data-kind="success"] {
  color: #b9dfc7;
}

input:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--bct-gold-deep, #66512d);
  outline-offset: 3px;
}

.access-masthead a:focus-visible,
.entry input:focus-visible,
.entry button:focus-visible {
  outline-color: #dfc889;
}

.access-footer {
  grid-column: 2;
  grid-row: 2;
  min-height: 4.5rem;
  padding: 1rem clamp(2rem, 4.2vw, 5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  color: rgb(28 43 36 / 70%);
  background: var(--bct-warm-ivory, #e6e0d5);
  border-top: 1px solid rgb(28 43 36 / 28%);
}

.access-footer > p {
  margin: 0;
  font-family: var(--font-mono, "IBM Plex Mono", monospace);
  font-size: 0.62rem;
  line-height: 1.4;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.access-footer > p span {
  margin: 0 0.5rem;
  color: var(--bct-gold-deep, #66512d);
}

.legal {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.65rem 1.35rem;
}

.legal a {
  min-height: 2rem;
  display: inline-flex;
  align-items: center;
  color: var(--bct-deep-green, #1c2b24);
  font-size: 0.69rem;
  letter-spacing: 0.04em;
  text-underline-offset: 0.25rem;
  text-decoration-thickness: 1px;
}

.legal a:hover {
  color: var(--bct-gold-deep, #66512d);
}

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

@media (max-width: 70rem) {
  .access-page {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }

  .access-masthead {
    grid-column: 1;
    grid-row: 1;
    min-height: 5.5rem;
    padding: 1.15rem clamp(1.5rem, 4vw, 3rem);
    flex-direction: row;
    justify-content: space-between;
    gap: 2rem;
    border-right: 0;
    border-bottom: 1px solid rgb(184 154 90 / 46%);
  }

  .institution-mark {
    width: fit-content;
    display: inline-flex;
    justify-items: initial;
    align-items: center;
    gap: 0.85rem;
    text-align: left;
  }

  .institution-mark img {
    width: 2.1rem;
  }

  .masthead-status {
    margin: 0;
    writing-mode: horizontal-tb;
    transform: none;
  }

  .access-main {
    grid-column: 1;
    grid-row: 2;
    min-height: 0;
    display: block;
    overflow: visible;
  }

  .public-status {
    min-height: 0;
    padding: clamp(3rem, 7vw, 5rem) clamp(1.5rem, 5vw, 4rem);
    display: block;
  }

  .public-copy {
    max-width: 60rem;
    padding: clamp(4rem, 9vw, 7rem) 0 clamp(4.5rem, 10vw, 7rem);
  }

  h1 {
    font-size: clamp(4.5rem, 10vw, 6.5rem);
  }

  .status-register,
  .institution-line {
    width: 100%;
    min-width: 0;
  }

  .entry {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: clamp(3rem, 7vw, 5rem) clamp(1.5rem, 5vw, 4rem);
    border-right: 0;
    border-left: 0;
    border-bottom: 0;
  }

  .entry-content {
    max-width: 38rem;
  }

  .entry h2 {
    font-size: clamp(3rem, 7vw, 4.35rem);
  }

  .access-footer {
    grid-column: 1;
    grid-row: 3;
    padding-right: clamp(1.5rem, 5vw, 4rem);
    padding-left: clamp(1.5rem, 5vw, 4rem);
  }
}

@media (max-width: 42rem) {
  .skip-link-entry {
    top: 3.5rem;
    left: 1rem;
  }

  .access-masthead {
    min-height: 5rem;
    padding: 1rem 1.15rem;
    align-items: flex-start;
  }

  .institution-mark {
    gap: 0.65rem;
  }

  .institution-mark img {
    width: 1.8rem;
  }

  .institution-name strong {
    font-size: 0.9rem;
  }

  .institution-name small {
    font-size: 0.49rem;
  }

  .masthead-status {
    max-width: 9.5rem;
    justify-content: flex-end;
    text-align: right;
    font-size: 0.57rem;
    line-height: 1.45;
  }

  .status-indicator {
    width: 0.42rem;
    height: 0.42rem;
  }

  .public-status {
    padding: 2.4rem 1.2rem 3.5rem;
  }

  .public-meta {
    gap: 1rem;
    padding-bottom: 1rem;
  }

  .section-index,
  .folio-location {
    font-size: 0.59rem;
  }

  .section-index {
    gap: 0.65rem;
  }

  .section-index span:first-child {
    min-width: 2rem;
    padding-right: 0.65rem;
  }

  .public-copy {
    padding: 3.6rem 0 4.25rem;
  }

  h1 {
    max-width: 11ch;
    margin-top: 0.9rem;
    font-size: clamp(3.45rem, 15.8vw, 4.65rem);
    line-height: 0.88;
  }

  .lead {
    font-size: 1rem;
    line-height: 1.58;
  }

  .continuity {
    grid-template-columns: 1.75rem minmax(0, 1fr);
    gap: 0.75rem;
    font-size: 0.87rem;
  }

  .status-register {
    display: block;
  }

  .status-register div {
    padding: 0.9rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
  }

  .status-register div + div {
    padding-left: 0;
    border-top: 1px solid rgb(28 43 36 / 22%);
    border-left: 0;
  }

  .status-register dt {
    margin: 0;
  }

  .status-register dd {
    justify-content: flex-end;
    text-align: right;
    font-size: 1rem;
  }

  .institution-line {
    margin-top: 1.6rem;
  }

  .entry {
    padding: 2.7rem 1.2rem 3rem;
  }

  .entry-index {
    margin-bottom: 2.35rem;
  }

  .entry h2 {
    font-size: clamp(2.8rem, 13vw, 3.55rem);
  }

  .entry-intro {
    margin-bottom: 1.65rem;
    font-size: 0.85rem;
  }

  input,
  .access-submit {
    min-height: 3.65rem;
  }

  .password-toggle {
    min-height: 2.95rem;
  }

  .access-footer {
    padding: 1.25rem 1.2rem 1.5rem;
    display: grid;
    justify-content: stretch;
  }

  .legal {
    justify-content: flex-start;
    gap: 0.75rem 1.2rem;
  }

  .legal a {
    min-height: 2.5rem;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .access-masthead,
  .public-meta,
  .public-copy,
  .status-register,
  .entry,
  .access-footer {
    animation: access-arrive 500ms var(--ease-entrance, cubic-bezier(0.2, 0.7, 0.3, 1)) both;
  }

  .public-copy {
    animation-delay: 65ms;
  }

  .status-register,
  .entry {
    animation-delay: 120ms;
  }

  .access-footer {
    animation-delay: 170ms;
  }

  @keyframes access-arrive {
    from {
      opacity: 0;
      transform: translateY(0.35rem);
    }
  }
}

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