/* holipass — secure application truth ledger.
   One current state, one chronological rule, and only server-allowed next
   steps. Structure comes from hairlines; status colour is earned. */

* { box-sizing: border-box; }
body {
  margin: 0;
  min-width: 0;
  background: var(--bb-page);
  color: var(--bb-ink);
  font: var(--bb-w-regular) 14px/1.6 var(--bb-font);
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
button, input, textarea { font: inherit; }
.st-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.st-shell-head {
  width: min(100% - 40px, 960px);
  min-height: 74px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--bb-hairline);
}
.st-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--bb-primary);
  text-decoration: none;
  font: var(--bb-w-bold) 16px/1 var(--bb-font-logo);
  letter-spacing: 1.15px;
}
.st-brand img { width: 23px; height: 23px; object-fit: contain; }
.st-languages { display: inline-flex; align-items: center; gap: 4px; }
.st-languages button,
.st-locale-lock {
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid transparent;
  border-radius: var(--bb-r-chip);
  background: transparent;
  color: var(--bb-ink-soft);
  font: var(--bb-w-medium) 12px/1.35 var(--bb-font);
}
.st-languages button { cursor: pointer; }
.st-languages button[aria-pressed="true"] {
  border-color: var(--bb-hairline);
  background: var(--bb-tint-blue);
  color: var(--bb-primary);
}
.st-locale-lock { background: var(--bb-tint-blue); color: var(--bb-primary); }
.st-languages button:focus-visible,
.st-brand:focus-visible,
.st-recovery input:focus-visible,
.st-ledger a:focus-visible,
.st-ledger button:focus-visible,
.st-ledger input:focus-visible,
.st-ledger textarea:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--bb-primary) 28%, transparent);
  outline-offset: 2px;
}

.st-main {
  width: min(100% - 40px, 960px);
  margin: 0 auto;
  padding: 56px 0 76px;
  min-width: 0;
}
.st-gate,
.st-loading,
.st-message {
  width: min(100%, 620px);
  margin: 26px auto 0;
  padding: 38px 40px;
  border: 1px solid var(--bb-hairline);
  border-radius: var(--bb-r-feature);
  background: var(--bb-surface);
}
.st-gate h1,
.st-message h1 {
  margin: 0 0 12px;
  font: var(--bb-w-semibold) clamp(25px, 4vw, 34px)/1.14 var(--bb-font);
  letter-spacing: -.7px;
}
.st-gate p,
.st-message p { max-width: 58ch; margin: 0 0 24px; color: var(--bb-ink-mid); }
.st-message p { margin-bottom: 0; }
.st-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  min-height: 148px;
  color: var(--bb-ink-mid);
}
.st-loading p { margin: 0; }
.st-loading__mark {
  width: 16px;
  height: 16px;
  border: 2px solid var(--bb-hairline);
  border-top-color: var(--bb-primary);
  border-radius: 50%;
  animation: st-turn .8s linear infinite;
}
@keyframes st-turn { to { transform: rotate(360deg); } }

.st-ledger {
  overflow: hidden;
  border: 1px solid var(--bb-hairline);
  border-radius: var(--bb-r-card);
  background: var(--bb-surface);
}
.st-ledger__head {
  display: grid;
  grid-template-columns: minmax(210px, .72fr) minmax(0, 1.28fr);
  border-bottom: 1px solid var(--bb-hairline);
}
.st-identity,
.st-current { min-width: 0; margin: 0; padding: 34px 36px; }
.st-identity { display: grid; align-content: start; gap: 22px; border-right: 1px solid var(--bb-hairline); }
.st-identity div { min-width: 0; }
.st-identity dt,
.st-section h2 {
  margin: 0 0 7px;
  color: var(--bb-ink-soft);
  font: var(--bb-w-medium) 12px/1.4 var(--bb-font);
}
.st-identity dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--bb-ink);
  font: var(--bb-w-semibold) 15px/1.45 var(--bb-font);
  font-variant-numeric: tabular-nums;
}
.st-current { display: flex; flex-direction: column; justify-content: center; }
.st-current h1 {
  margin: 0 0 10px;
  font: var(--bb-w-semibold) clamp(27px, 4vw, 39px)/1.08 var(--bb-font);
  letter-spacing: -1px;
}
.st-current p { max-width: 56ch; margin: 0; color: var(--bb-ink-mid); }
.st-ledger[data-state="changes_requested"] .st-current h1,
.st-ledger[data-state="declined"] .st-current h1,
.st-ledger[data-state="cancelled"] .st-current h1 { color: var(--bb-urgency); }
.st-ledger[data-state="accepted_setup"] .st-current h1 { color: var(--bb-primary); }
.st-ledger[data-state="published"] .st-current h1 { color: var(--bb-trust-ink); }

.st-ledger__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.st-section {
  min-width: 0;
  padding: 30px 36px 33px;
  border-bottom: 1px solid var(--bb-hairline);
}
.st-section:nth-child(odd) { border-right: 1px solid var(--bb-hairline); }
.st-section--wide { grid-column: 1 / -1; border-right: 0 !important; }
.st-section h2 { margin-bottom: 16px; color: var(--bb-ink); font-weight: var(--bb-w-semibold); }
.st-timeline,
.st-plain-list,
.st-documents,
.st-actions { margin: 0; padding: 0; list-style: none; }
.st-timeline { position: relative; }
.st-timeline::before {
  content: "";
  position: absolute;
  top: 7px;
  bottom: 7px;
  left: 4px;
  width: 1px;
  background: var(--bb-hairline);
}
.st-timeline__row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  padding: 0 0 18px 23px;
}
.st-timeline__row:last-child { padding-bottom: 0; }
.st-timeline__row::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 0;
  width: 9px;
  height: 9px;
  border: 2px solid var(--bb-primary);
  border-radius: 50%;
  background: var(--bb-surface);
}
.st-timeline__event { min-width: 0; overflow-wrap: anywhere; }
.st-timeline__date { color: var(--bb-ink-soft); font-size: 12px; font-variant-numeric: tabular-nums; text-align: right; }
.st-plain-row,
.st-action { padding: 9px 0; border-top: 1px solid var(--bb-hairline); overflow-wrap: anywhere; }
.st-plain-row:first-child,
.st-action:first-child { padding-top: 0; border-top: 0; }
.st-action { display: flex; align-items: center; gap: 10px; }
.st-action::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--bb-primary); }
.st-action__button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--bb-primary);
  cursor: pointer;
  font-weight: var(--bb-w-semibold);
  text-align: left;
}
.st-action__button:disabled { color: var(--bb-ink-soft); cursor: not-allowed; }
.st-action__note { margin: 12px 0 0; color: var(--bb-ink-soft); font-size: 12.5px; }
.st-document {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--bb-hairline);
}
.st-document:first-child { padding-top: 0; border-top: 0; }
.st-document__name { min-width: 0; overflow-wrap: anywhere; }
.st-document__version { display: block; margin-top: 2px; color: var(--bb-ink-soft); font-size: 11.5px; }
.st-document__state { flex: none; color: var(--bb-ink-mid); font: var(--bb-w-medium) 12px/1.45 var(--bb-font); text-align: right; }
.st-document[data-state="verified"] .st-document__state { color: var(--bb-trust-ink); }
.st-document[data-state="rejected"] .st-document__state { color: var(--bb-urgency); }
.st-corrections { display: grid; grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr); gap: 26px 36px; }
.st-corrections__intro h2 { margin-bottom: 7px; }
.st-corrections__intro p,
.st-reason p,
.st-locale-change p,
.st-confirm p { margin: 0; color: var(--bb-ink-mid); }
.st-reason {
  padding: 15px 17px;
  border-left: 3px solid var(--bb-urgency);
  background: var(--bb-tint-rust);
}
.st-reason h3,
.st-replacement h3,
.st-locale-change h3,
.st-confirm h3 { margin: 0 0 6px; font: var(--bb-w-semibold) 14px/1.4 var(--bb-font); }
.st-reason #reason-custom { margin-top: 9px; white-space: pre-wrap; }
.st-correction-form,
.st-replacements { grid-column: 1 / -1; }
.st-correction-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px 20px; }
.st-correction { min-width: 0; }
.st-correction:has(textarea) { grid-column: 1 / -1; }
.st-correction__label { display: block; margin-bottom: 6px; font: var(--bb-w-semibold) 12px/1.4 var(--bb-font); }
.st-correction__control {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--bb-hairline);
  border-radius: var(--bb-r-field);
  background: var(--bb-surface);
  color: var(--bb-ink);
}
textarea.st-correction__control { min-height: 112px; resize: vertical; }
.st-correction__control[aria-invalid="true"] { border-color: var(--bb-urgency); }
.st-correction__error { min-height: 18px; margin: 4px 0 0; color: var(--bb-urgency); font-size: 12px; }
.st-correction__support { margin: 0; padding: 13px 15px; border: 1px solid var(--bb-hairline); color: var(--bb-ink-mid); }
.st-correction-form > .bb-btn { margin-top: 18px; }
.st-replacements { display: grid; gap: 12px; }
.st-replacement {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--bb-hairline);
  border-radius: var(--bb-r-field);
}
.st-replacement__current,
.st-replacement__help { margin: 0; color: var(--bb-ink-soft); font-size: 12px; }
.st-replacement__file { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.st-replacement__help { grid-column: 1 / -1; }
.st-locale-change,
.st-confirm { margin-top: 18px; padding: 18px; border: 1px solid var(--bb-hairline); border-radius: var(--bb-r-field); }
.st-locale-change__choices,
.st-confirm__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.st-confirm { border-color: color-mix(in srgb, var(--bb-urgency) 40%, var(--bb-hairline)); background: var(--bb-tint-rust); }
.st-mutation-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 49px;
  padding: 10px 36px;
  border-top: 1px solid var(--bb-hairline);
}
.st-mutation {
  margin: 0;
  color: var(--bb-ink-mid);
  font-size: 12.5px;
}
.st-venue { grid-column: 1 / -1; border-right: 0 !important; border-bottom: 0; background: var(--bb-tint-blue); }
.st-venue__copy { margin: 0; color: var(--bb-primary); font-weight: var(--bb-w-medium); }

.st-recovery {
  width: min(100%, 620px);
  margin: 28px auto 0;
  padding: 30px 34px 34px;
  border: 1px solid var(--bb-hairline);
  border-radius: var(--bb-r-card);
  background: var(--bb-surface);
}
.st-recovery h2 { margin: 0 0 8px; font: var(--bb-w-semibold) 20px/1.25 var(--bb-font); }
.st-recovery__intro p { margin: 0 0 23px; color: var(--bb-ink-mid); }
.st-recovery form { display: grid; gap: 11px; }
.st-recovery label { font: var(--bb-w-semibold) 12px/1.4 var(--bb-font); }
.st-recovery input {
  width: 100%;
  min-height: 46px;
  padding: 10px 13px;
  border: 1px solid var(--bb-hairline);
  border-radius: var(--bb-r-field);
  background: var(--bb-surface);
  color: var(--bb-ink);
}
.st-recovery input::placeholder { color: var(--bb-ink-soft); }
.st-turnstile { width: 100%; min-width: 0; min-height: 1px; max-width: 100%; overflow: hidden; }
.st-turnstile iframe { max-width: 100%; }
.st-recovery__note { min-height: 20px; margin: 0; color: var(--bb-ink-soft); font-size: 12.5px; }
.st-recovery .bb-btn { justify-self: start; }
.st-privacy {
  width: min(100%, 620px);
  margin: 28px auto 0;
  color: var(--bb-ink-soft);
  font-size: 12px;
  text-align: center;
}

@media (max-width: 700px) {
  .st-shell-head,
  .st-main { width: min(100% - 28px, 960px); }
  .st-main { padding: 34px 0 54px; }
  .st-ledger__head,
  .st-ledger__grid { grid-template-columns: 1fr; }
  .st-identity { grid-template-columns: repeat(2, minmax(0, 1fr)); border-right: 0; border-bottom: 1px solid var(--bb-hairline); }
  .st-section:nth-child(odd) { border-right: 0; }
  .st-section:last-child { border-bottom: 0; }
  .st-gate,
  .st-loading,
  .st-message { margin-top: 8px; padding: 30px 25px; }
  .st-recovery { padding: 26px 24px 28px; }
  .st-corrections { grid-template-columns: 1fr; }
  .st-correction-fields { grid-template-columns: 1fr; }
  .st-correction:has(textarea) { grid-column: auto; }
}

@media (max-width: 430px) {
  .st-shell-head { min-height: 68px; gap: 10px; }
  .st-brand span { font-size: 14px; }
  .st-languages { gap: 1px; }
  .st-languages button { min-height: 32px; padding: 6px 7px; font-size: 11px; }
  .st-identity,
  .st-current,
  .st-section { padding-left: 22px; padding-right: 22px; }
  .st-identity { grid-template-columns: 1fr; gap: 16px; }
  .st-current { padding-top: 27px; padding-bottom: 29px; }
  .st-timeline__row { grid-template-columns: 1fr; gap: 2px; }
  .st-timeline__date { text-align: left; }
  .st-document { flex-direction: column; gap: 4px; }
  .st-document__state { text-align: left; }
  .st-replacement { grid-template-columns: 1fr; align-items: start; }
  .st-replacement .bb-btn { justify-self: start; }
  .st-replacement__help { grid-column: auto; }
  .st-mutation-wrap { align-items: flex-start; flex-direction: column; padding-left: 22px; padding-right: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .st-loading__mark { animation: none; border-top-color: var(--bb-hairline); background: var(--bb-primary); }
}
