:root {
  --ivory: #f2eee3;
  --charcoal: #171714;
  --gold: #b58a3d;
  --gold-on-dark: #c99b48;
  --gold-on-light: #7d5b20;
  --wine: #4d1824;
  --rule: rgb(242 238 227 / 20%);
  --rule-dark: rgb(23 23 20 / 22%);
  --muted-on-dark: rgb(242 238 227 / 72%);
  --quiet-on-dark: rgb(242 238 227 / 60%);
  --muted-on-light: rgb(23 23 20 / 66%);
}

* {
  box-sizing: border-box;
}

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

html.has-mobile-sheet {
  overflow: hidden;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

body {
  margin: 0;
  color: var(--ivory);
  background: var(--charcoal);
  font-family: "Helvetica Neue", "Pretendard Variable", Pretendard, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
textarea,
input {
  font: inherit;
}

button,
a,
label {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
textarea:focus-visible,
label:has(input:focus-visible) {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 0;
  left: 1rem;
  z-index: 50;
  padding: 0.8rem 1rem;
  color: var(--charcoal);
  background: var(--ivory);
  transform: translateY(-110%);
}

.skip-link:focus {
  transform: none;
}

[hidden] {
  display: none !important;
}

.identity-gate {
  display: grid;
  min-height: 100svh;
  grid-template-columns: minmax(0, 1.2fr) minmax(24rem, 0.8fr);
  padding-top: 4.75rem;
}

.identity-gate__statement {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(2rem, 4vw, 4.5rem);
  border-right: 1px solid var(--rule);
}

.identity-mobile-brand {
  display: none;
}

.identity-gate__statement > p:first-child,
.identity-panel__intro > p {
  margin: 0;
  color: var(--gold);
  font-size: 0.55rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.identity-gate__statement h1 {
  margin: auto 0;
  font-size: clamp(5rem, 10.5vw, 11rem);
  font-weight: 500;
  line-height: 0.7;
  letter-spacing: -0.085em;
}

.identity-gate__lede {
  max-width: 31rem;
  margin: 0;
  color: rgb(242 238 227 / 58%);
  font-size: clamp(0.78rem, 1vw, 0.95rem);
  line-height: 1.7;
}

.identity-gate__control {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: clamp(1.5rem, 3vw, 3rem);
  color: var(--charcoal);
  background: var(--ivory);
}

.identity-status {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--rule-dark);
}

.identity-status span,
.identity-status strong,
.identity-feedback,
.identity-boundary dt,
.identity-boundary dd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.54rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.identity-status span {
  color: var(--gold);
}

.identity-status strong {
  font-weight: 400;
}

.identity-status > div {
  display: flex;
  gap: 0.8rem;
  align-items: center;
}

.identity-status button {
  padding: 0;
  color: rgb(23 23 20 / 52%);
  background: transparent;
  border: 0;
  border-bottom: 1px solid currentcolor;
  cursor: pointer;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.5rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.identity-panel {
  margin: auto 0;
  padding: 3rem 0;
}

.identity-panel__intro h2 {
  max-width: 34rem;
  margin: 1rem 0;
  font-size: clamp(1.8rem, 3vw, 3.4rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.055em;
}

.identity-panel__intro span {
  display: block;
  max-width: 30rem;
  color: rgb(23 23 20 / 55%);
  font-size: 0.72rem;
  line-height: 1.6;
}

.identity-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--rule-dark);
}

.identity-tabs button {
  padding: 0.8rem 0;
  color: rgb(23 23 20 / 38%);
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-align: left;
  text-transform: uppercase;
}

.identity-tabs button.is-active {
  color: var(--charcoal);
  border-color: var(--gold);
}

.access-note {
  margin-top: 2rem;
}

.access-note > p {
  margin: 0;
  color: var(--gold);
  font-size: 0.55rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.access-note h2 {
  max-width: 32rem;
  margin: 1rem 0;
  font-size: clamp(1.7rem, 2.7vw, 3rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.access-note > span {
  display: block;
  max-width: 30rem;
  color: rgb(23 23 20 / 55%);
  font-size: 0.72rem;
  line-height: 1.6;
}

.access-note dl {
  margin: 2rem 0 0;
  border-top: 1px solid var(--rule-dark);
}

.access-note dl div {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--rule-dark);
}

.access-note dt,
.access-note dd {
  margin: 0;
  font-size: 0.65rem;
}

.access-note dt {
  color: var(--gold);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.identity-form {
  display: grid;
  margin-top: 2rem;
}

.identity-form > div {
  display: grid;
}

.identity-form label {
  margin-top: 1rem;
  color: rgb(23 23 20 / 52%);
  font-size: 0.52rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.identity-form input {
  width: 100%;
  padding: 0.7rem 0;
  color: var(--charcoal);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule-dark);
  border-radius: 0;
  outline: 0;
  font-size: 0.9rem;
}

.identity-form input:focus {
  border-color: var(--gold);
}

.totp-enrollment {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: 1.5rem;
  align-items: end;
  margin-top: 2rem;
}

.totp-enrollment img {
  display: block;
  width: 9rem;
  height: 9rem;
  padding: 0.5rem;
  background: #fff;
  border: 1px solid var(--rule-dark);
}

.totp-enrollment span {
  display: block;
  margin-bottom: 0.6rem;
  color: rgb(23 23 20 / 52%);
  font-size: 0.52rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.totp-enrollment code {
  display: block;
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.7rem;
  line-height: 1.5;
}

.identity-form button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  padding: 1rem;
  color: var(--ivory);
  background: var(--charcoal);
  border: 0;
  cursor: pointer;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.identity-form button b {
  color: var(--gold);
  font-size: 1.2rem;
  font-weight: 400;
}

.identity-form button:disabled,
.identity-form input:disabled {
  cursor: wait;
  opacity: 0.45;
}

.identity-feedback {
  min-height: 2.2rem;
  margin: 0;
  color: var(--gold);
  line-height: 1.45;
}

.identity-feedback.is-error {
  color: var(--wine);
}

.recovery-panel {
  padding-bottom: 1.5rem;
}

.recovery-words {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  padding: 0;
  margin: 2rem 0 1rem;
  list-style: none;
  border-top: 1px solid var(--rule-dark);
}

.recovery-words li {
  display: grid;
  grid-template-columns: 1.7rem 1fr;
  gap: 0.35rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--rule-dark);
}

.recovery-words li:nth-child(3n + 2),
.recovery-words li:nth-child(3n + 3) {
  padding-left: 0.65rem;
  border-left: 1px solid var(--rule-dark);
}

.recovery-words span {
  color: var(--gold);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.48rem;
}

.recovery-words strong {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.58rem;
  font-weight: 500;
}

.recovery-print {
  padding: 0.55rem 0;
  color: var(--charcoal);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--charcoal);
  cursor: pointer;
  font-size: 0.52rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.recovery-confirm {
  padding-top: 1rem;
  border-top: 1px solid var(--rule-dark);
}

.recovery-confirm > p {
  margin: 0 0 0.75rem;
  color: rgb(23 23 20 / 58%);
  font-size: 0.68rem;
}

.recovery-confirm__fields {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
}

.recovery-confirm__fields label,
.recovery-confirm__fields input {
  min-width: 0;
}

.identity-boundary {
  margin: 0;
  border-top: 1px solid var(--rule-dark);
}

.identity-boundary div {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--rule-dark);
}

.identity-boundary dt,
.identity-boundary dd {
  margin: 0;
}

.identity-boundary dt {
  color: rgb(23 23 20 / 45%);
}

.identity-boundary dd {
  text-align: right;
}

.lab-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 4.75rem;
  padding: 0 clamp(1rem, 2.4vw, 2.5rem);
  color: var(--ivory);
  background: var(--charcoal);
  border-bottom: 1px solid var(--rule);
}

.lab-header__brand {
  display: flex;
  gap: 0.8rem;
  align-items: baseline;
  width: fit-content;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-decoration: none;
}

.lab-header__brand strong {
  color: var(--gold);
  font-weight: 500;
  letter-spacing: 0.2em;
}

.lab-header__session {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.55rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lab-header__session strong {
  color: rgb(242 238 227 / 50%);
  font-weight: 400;
}

.status-dot {
  width: 0.42rem;
  height: 0.42rem;
  background: var(--gold);
}

.lab-header__exit {
  justify-self: end;
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
}

.lab-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(14rem, 18vw) 1fr;
  padding-top: 4.75rem;
}

.lab-sidebar {
  position: sticky;
  top: 4.75rem;
  display: flex;
  height: calc(100vh - 4.75rem);
  flex-direction: column;
  justify-content: space-between;
  padding: 2rem 1.25rem;
  border-right: 1px solid var(--rule);
}

.lab-sidebar__label,
.lab-sidebar__notice span {
  margin: 0 0 1rem;
  color: var(--gold-on-dark);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.lab-sidebar nav {
  display: grid;
}

.lab-nav {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0.25rem 0.5rem;
  padding: 1rem 0;
  color: var(--muted-on-dark);
  background: transparent;
  border: 0;
  border-top: 1px solid var(--rule);
  cursor: pointer;
  text-align: left;
}

.lab-nav:last-child {
  border-bottom: 1px solid var(--rule);
}

.lab-nav span {
  grid-row: 1 / span 2;
  color: var(--gold-on-dark);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.68rem;
}

.lab-nav strong {
  color: inherit;
  font-size: 0.94rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.lab-nav em {
  font-size: 0.68rem;
  font-style: normal;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lab-nav.is-active {
  color: var(--ivory);
}

.lab-sidebar__notice {
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
}

.lab-sidebar__identity {
  display: grid;
  padding: 1rem 0;
  margin-top: auto;
  border-top: 1px solid var(--rule);
}

.lab-sidebar__identity span,
.lab-sidebar__identity em {
  color: var(--gold-on-dark);
  font-size: 0.66rem;
  font-style: normal;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lab-sidebar__identity strong {
  margin: 0.35rem 0;
  font-size: 0.92rem;
  font-weight: 500;
}

.lab-sidebar__identity button {
  width: fit-content;
  padding: 0.5rem 0;
  margin-top: 0.65rem;
  color: var(--muted-on-dark);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lab-sidebar__notice p {
  margin: 0.65rem 0 0;
  color: var(--muted-on-dark);
  font-size: 0.76rem;
  line-height: 1.55;
}

.lab-workspace {
  min-width: 0;
}

.workspace-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: end;
  min-height: 10rem;
  padding: 2rem clamp(1.25rem, 3vw, 3rem);
  color: var(--charcoal);
  background: var(--ivory);
  border-bottom: 1px solid var(--rule-dark);
}

.workspace-head p {
  margin: 0;
  color: var(--gold);
  font-size: 0.55rem;
  letter-spacing: 0.14em;
}

.workspace-head h1 {
  margin: 0.3rem 0 0;
  font-size: clamp(2.3rem, 4.5vw, 5.5rem);
  font-weight: 500;
  line-height: 0.8;
  letter-spacing: -0.065em;
}

.workspace-head dl {
  min-width: min(26rem, 32vw);
  margin: 0;
  border-top: 1px solid var(--rule-dark);
}

.workspace-head dl div {
  display: grid;
  grid-template-columns: 6rem 1fr;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--rule-dark);
}

.workspace-head dt,
.workspace-head dd {
  margin: 0;
  font-size: 0.56rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.workspace-head dt {
  color: rgb(23 23 20 / 50%);
}

.lab-view {
  display: grid;
  min-height: calc(100vh - 14.75rem);
  grid-template-columns: minmax(0, 1.55fr) minmax(20rem, 0.8fr);
}

.lab-view[hidden] {
  display: none;
}

.view-main {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: clamp(1.5rem, 3vw, 3rem);
}

.view-title {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--rule);
}

.view-title p {
  grid-column: 1;
  margin: 0 0 1.5rem;
  color: var(--gold);
  font-size: 0.55rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.view-title h2 {
  grid-column: 1;
  margin: 0;
  font-size: clamp(3.6rem, 7vw, 8rem);
  font-weight: 500;
  line-height: 0.71;
  letter-spacing: -0.075em;
  text-transform: uppercase;
}

.view-title > span {
  grid-column: 2;
  grid-row: 2;
  color: rgb(242 238 227 / 42%);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.54rem;
  letter-spacing: 0.08em;
  text-align: right;
  text-transform: uppercase;
}

.contact-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem 1.5rem;
  align-items: end;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--rule);
}

.contact-strip > div {
  display: grid;
  gap: 0.45rem;
}

.contact-strip label,
.contact-strip p {
  color: rgb(242 238 227 / 42%);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.52rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-strip select {
  width: 100%;
  padding: 0.7rem 2rem 0.7rem 0;
  color: var(--ivory);
  background: var(--charcoal);
  border: 0;
  border-bottom: 1px solid rgb(242 238 227 / 28%);
  border-radius: 0;
  outline: 0;
  font: inherit;
  font-size: 0.72rem;
}

.contact-strip select:focus-visible {
  border-bottom-color: var(--gold);
}

.contact-strip button {
  padding: 0.7rem 0;
  color: var(--gold);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.contact-strip button:disabled,
.contact-strip select:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.contact-strip p {
  grid-column: 1 / -1;
  min-height: 1em;
  margin: 0;
  color: rgb(242 238 227 / 52%);
  text-transform: none;
}

.contact-strip p.is-error {
  color: #d88b76;
}

.message-stream {
  display: grid;
  gap: 1rem;
  align-content: end;
  min-height: 18rem;
  flex: 1;
  padding: 3rem 0;
}

.message {
  width: min(76%, 34rem);
  padding: 1rem;
  color: var(--charcoal);
  background: var(--ivory);
}

.message--system {
  color: var(--muted-on-dark);
  background: transparent;
  border: 1px solid var(--rule);
}

.message--mine {
  justify-self: end;
}

.message--mine span {
  color: var(--gold-on-light);
}

.message--theirs {
  color: var(--ivory);
  background: transparent;
  border: 1px solid var(--rule);
}

.message--failed {
  color: var(--muted-on-dark);
  background: transparent;
  border: 1px dashed rgb(242 238 227 / 24%);
}

.message span {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--gold-on-dark);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.message .message__state {
  margin: 0.45rem 0 0;
  color: rgb(20 20 18 / 64%);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.64rem;
  letter-spacing: 0.06em;
  line-height: 1.3;
  text-align: right;
}

.message--theirs .message__state,
.message--failed .message__state {
  color: var(--quiet-on-dark);
}

.message p {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.6;
}

.composer {
  border-top: 1px solid var(--rule);
}

.composer label {
  display: block;
  padding: 0.8rem 0 0;
  color: var(--gold-on-dark);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.composer textarea {
  width: 100%;
  min-height: 6rem;
  resize: vertical;
  padding: 1rem 0;
  color: var(--ivory);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 1rem;
  line-height: 1.6;
}

.composer textarea::placeholder {
  color: rgb(242 238 227 / 58%);
}

.composer > div {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.8rem;
  border-top: 1px solid var(--rule);
}

.composer > div > span {
  margin-right: auto;
  color: var(--quiet-on-dark);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.composer .composer__attachment {
  color: var(--gold-on-dark);
}

.message__attachment {
  display: grid;
  width: 100%;
  gap: 0.35rem;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  text-align: left;
  cursor: pointer;
}

.message__attachment span,
.message__attachment small {
  color: inherit;
  opacity: 0.7;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.message__attachment strong {
  overflow-wrap: anywhere;
  font-size: 1rem;
  font-weight: 500;
}

.composer button {
  padding: 0.8rem 0;
  color: var(--ivory);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.composer button b {
  margin-left: 1rem;
  color: var(--gold);
  font-size: 1.2rem;
  font-weight: 400;
}

.boundary-panel {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: clamp(1.5rem, 3vw, 3rem);
  color: var(--charcoal);
  background: var(--ivory);
  border-left: 1px solid var(--rule-dark);
}

.boundary-panel header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--rule-dark);
}

.boundary-panel header p,
.boundary-panel header span {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.54rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.boundary-panel header span {
  color: var(--gold);
  text-align: right;
}

.boundary-panel__cipher {
  min-height: 14rem;
  flex: 1;
  padding: 2rem 0;
  overflow-wrap: anywhere;
  color: rgb(23 23 20 / 52%);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.68rem;
  line-height: 1.8;
  letter-spacing: 0.06em;
}

.boundary-panel__cipher span {
  color: var(--gold);
}

.boundary-panel dl {
  margin: 0;
  border-top: 1px solid var(--rule-dark);
}

.boundary-panel dl div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--rule-dark);
}

.boundary-panel dt,
.boundary-panel dd {
  margin: 0;
  font-size: 0.54rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.boundary-panel dt {
  color: rgb(23 23 20 / 48%);
}

.boundary-panel dd {
  text-align: right;
}

.file-drop {
  display: flex;
  min-height: 18rem;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  margin: 3rem 0;
  border: 1px solid var(--rule);
  cursor: pointer;
  text-align: center;
}

.file-drop input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.file-drop span {
  color: var(--gold);
  font-size: 0.55rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.file-drop strong {
  max-width: 30rem;
  margin-top: 1.5rem;
  font-size: clamp(1.4rem, 2.5vw, 2.6rem);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.04em;
}

.file-drop em {
  margin-top: 1.5rem;
  color: rgb(242 238 227 / 40%);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.52rem;
  font-style: normal;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.vault-list {
  border-top: 1px solid var(--rule);
}

.vault-list__empty {
  margin: 0;
  padding: 1.5rem 0;
  color: rgb(242 238 227 / 42%);
  font-size: 0.72rem;
}

.vault-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--rule);
}

.vault-item span {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--gold);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.52rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.vault-item strong {
  font-size: 0.88rem;
  font-weight: 500;
}

.vault-item__actions {
  display: flex;
  gap: 0.5rem;
}

.vault-item button {
  padding: 0.55rem 0.75rem;
  color: var(--ivory);
  background: transparent;
  border: 1px solid var(--rule);
  cursor: pointer;
  font-size: 0.52rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.vault-item button:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.view-main--admin {
  gap: 0;
}

.admin-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(16rem, 0.8fr);
  gap: 2rem;
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--rule);
}

.admin-intro p,
.admin-intro span {
  margin: 0;
}

.admin-intro p {
  max-width: 34rem;
  font-size: clamp(1.35rem, 2.5vw, 2.6rem);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.admin-intro span {
  align-self: end;
  color: rgb(242 238 227 / 48%);
  font-size: 0.72rem;
  line-height: 1.65;
}

.admin-issue-form {
  padding: 2.5rem 0;
}

.admin-issue-form dl {
  margin: 0;
  border-top: 1px solid var(--rule);
}

.admin-issue-form dl div {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--rule);
}

.admin-issue-form dt,
.admin-issue-form dd {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.56rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.admin-issue-form dt {
  color: rgb(242 238 227 / 42%);
}

.admin-confirm {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 1.25rem 0;
  color: rgb(242 238 227 / 58%);
  cursor: pointer;
  font-size: 0.7rem;
  line-height: 1.5;
}

.admin-confirm input {
  width: 0.9rem;
  height: 0.9rem;
  flex: 0 0 auto;
  margin: 0.1rem 0 0;
  accent-color: var(--gold);
}

.admin-issue-form > button {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  color: var(--charcoal);
  background: var(--ivory);
  border: 0;
  cursor: pointer;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.admin-issue-form > button b {
  color: var(--gold);
  font-size: 1.2rem;
  font-weight: 400;
}

.admin-issue-form > button:disabled,
.admin-confirm input:disabled {
  cursor: wait;
  opacity: 0.45;
}

.admin-feedback {
  min-height: 1.3rem;
  margin: 0.8rem 0 0;
  color: var(--gold);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.54rem;
  line-height: 1.45;
}

.admin-feedback.is-error {
  color: #d68694;
}

.credential-result {
  margin-top: 0.5rem;
  color: var(--charcoal);
  background: var(--ivory);
}

.credential-result > header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.25rem;
  border-bottom: 1px solid var(--rule-dark);
}

.credential-result > header p,
.credential-result > header h3 {
  margin: 0;
}

.credential-result > header p {
  color: var(--gold);
  font-size: 0.52rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.credential-result > header h3 {
  margin-top: 0.25rem;
  font-size: 1.15rem;
  font-weight: 500;
}

.credential-result button {
  padding: 0;
  color: rgb(23 23 20 / 58%);
  background: transparent;
  border: 0;
  border-bottom: 1px solid currentcolor;
  cursor: pointer;
  font-size: 0.52rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.credential-result dl {
  margin: 0;
}

.credential-result dl > div {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 1rem;
  padding: 1.25rem;
  border-bottom: 1px solid var(--rule-dark);
}

.credential-result dt {
  color: rgb(23 23 20 / 48%);
  font-size: 0.54rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.credential-result dd {
  display: flex;
  min-width: 0;
  justify-content: space-between;
  gap: 1rem;
  margin: 0;
}

.credential-result code {
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
}

.credential-result > p {
  margin: 0;
  padding: 1rem 1.25rem;
  color: rgb(23 23 20 / 58%);
  font-size: 0.65rem;
}

.member-register {
  margin-top: 4rem;
  padding-bottom: 1rem;
  border-top: 1px solid var(--rule);
}

.member-register > header {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: flex-end;
  padding: 1.5rem 0;
}

.member-register > header p,
.member-register > header h3 {
  margin: 0;
}

.member-register > header p {
  color: var(--gold);
  font-size: 0.52rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.member-register > header h3 {
  margin-top: 0.35rem;
  font-size: clamp(1.6rem, 3vw, 3rem);
  font-weight: 500;
  letter-spacing: -0.045em;
}

.member-register > header button,
.member-row__action button {
  padding: 0 0 0.2rem;
  color: rgb(242 238 227 / 62%);
  background: transparent;
  border: 0;
  border-bottom: 1px solid currentcolor;
  cursor: pointer;
  font-size: 0.52rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.member-register button:disabled {
  cursor: wait;
  opacity: 0.35;
}

.member-feedback {
  min-height: 1.3rem;
  margin: 0 0 0.75rem;
  color: var(--gold);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.54rem;
  line-height: 1.45;
}

.member-feedback.is-error {
  color: #d68694;
}

.member-list {
  border-top: 1px solid var(--rule);
}

.member-list__empty {
  margin: 0;
  padding: 1.25rem 0;
  color: rgb(242 238 227 / 42%);
  font-size: 0.68rem;
}

.member-row {
  display: grid;
  grid-template-columns: minmax(9rem, 0.65fr) minmax(16rem, 1.35fr) auto;
  gap: 1.5rem;
  align-items: center;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--rule);
}

.member-row__identity,
.member-row__state {
  display: grid;
  gap: 0.35rem;
}

.member-row__identity strong {
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.member-row__identity span,
.member-row__state span,
.member-row__action span {
  color: rgb(242 238 227 / 38%);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.5rem;
  line-height: 1.55;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.member-row__state strong {
  color: #9ab293;
  font-size: 0.68rem;
  font-weight: 500;
}

.member-row__state.is-suspended strong {
  color: #d68694;
}

.member-row__action {
  min-width: 5.5rem;
  text-align: right;
}

.admin-policy > p {
  margin: auto 0 2rem;
}

.view-main--audit {
  grid-column: 1 / 2;
}

.audit-ledger {
  margin-top: 3rem;
  border-top: 1px solid var(--rule);
}

.audit-event {
  display: grid;
  grid-template-columns: 7rem 1fr auto;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule);
}

.audit-event time,
.audit-event span {
  color: rgb(242 238 227 / 44%);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.54rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.audit-event strong {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.audit-event span {
  color: var(--gold);
  text-align: right;
}

.boundary-panel--note > p {
  max-width: 28rem;
  margin: auto 0;
  color: rgb(23 23 20 / 62%);
  font-size: 0.85rem;
  line-height: 1.7;
}

.lab-view--tessera {
  display: block;
  min-height: calc(100svh - 14.75rem);
  overflow: hidden;
}

.tessera-messenger {
  position: relative;
  display: grid;
  grid-template-columns: minmax(17rem, 23rem) minmax(0, 1fr);
  min-height: calc(100svh - 14.75rem);
  background: var(--charcoal);
}

.tessera-directory {
  display: flex;
  min-width: 0;
  flex-direction: column;
  color: var(--charcoal);
  background: var(--ivory);
  border-right: 1px solid var(--rule-dark);
}

.tessera-directory__head,
.conversation-head {
  display: flex;
  min-height: 5.5rem;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--rule-dark);
}

.tessera-directory__head {
  justify-content: space-between;
}

.tessera-directory__head p,
.tessera-directory__head h2 {
  margin: 0;
}

.tessera-directory__head p,
.tessera-directory__head > span,
.conversation-head small,
.tessera-profile small,
.nickname-form label,
.nickname-form p,
.tessera-search span,
.tessera-directory__foot,
.contact-item small {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.06em;
}

.tessera-directory__head p {
  color: var(--gold-on-light);
  font-size: 0.66rem;
}

.tessera-directory__head h2 {
  margin-top: 0.18rem;
  font-size: 1.65rem;
  font-weight: 500;
  letter-spacing: -0.055em;
}

.tessera-directory__head > span {
  color: var(--muted-on-light);
  font-size: 0.7rem;
}

.tessera-profile {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--rule-dark);
}

.tessera-avatar {
  display: grid;
  width: 2.35rem;
  height: 2.35rem;
  place-items: center;
  flex: 0 0 auto;
  color: var(--ivory);
  background: var(--charcoal);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
}

.tessera-profile div,
.conversation-head div {
  display: grid;
  min-width: 0;
  gap: 0.18rem;
}

.tessera-profile strong,
.conversation-head strong {
  overflow: hidden;
  font-size: 0.9rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tessera-profile small,
.conversation-head small {
  overflow: hidden;
  color: var(--muted-on-light);
  font-size: 0.7rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tessera-profile button,
.nickname-form button,
.tessera-directory__foot button,
.conversation-head button,
.tessera-security button {
  padding: 0;
  color: var(--gold-on-light);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
}

.nickname-form {
  padding: 0.9rem 1.25rem 1rem;
  background: #e7e1d3;
  border-bottom: 1px solid var(--rule-dark);
}

.nickname-form label,
.nickname-form p {
  display: block;
  color: var(--muted-on-light);
  font-size: 0.66rem;
}

.nickname-form > div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  margin: 0.5rem 0;
}

.nickname-form input,
.tessera-search input {
  min-width: 0;
  padding: 0.7rem 0;
  color: var(--charcoal);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule-dark);
  border-radius: 0;
  outline: 0;
  font: inherit;
  font-size: 0.84rem;
}

.nickname-form input:focus,
.tessera-search input:focus {
  border-bottom-color: var(--gold);
}

.nickname-form p {
  margin: 0;
  line-height: 1.5;
}

.tessera-search {
  display: grid;
  gap: 0.35rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--rule-dark);
}

.tessera-search span {
  color: var(--gold-on-light);
  font-size: 0.66rem;
}

.tessera-contact-list {
  min-height: 10rem;
  flex: 1;
  overflow-y: auto;
}

.tessera-contact-list > p {
  padding: 1.25rem;
  margin: 0;
  color: var(--muted-on-light);
  font-size: 0.78rem;
  line-height: 1.6;
}

.contact-item {
  display: grid;
  width: 100%;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  padding: 1rem 1.25rem;
  color: var(--charcoal);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule-dark);
  border-radius: 0;
  cursor: pointer;
  text-align: left;
}

.contact-item:hover,
.contact-item.is-active {
  background: #e7e1d3;
}

.contact-item:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.contact-item__avatar {
  color: var(--ivory);
  background: var(--gold);
}

.contact-item div {
  display: grid;
  min-width: 0;
  gap: 0.18rem;
}

.contact-item strong,
.contact-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-item strong {
  font-size: 0.86rem;
}

.contact-item small {
  color: var(--muted-on-light);
  font-size: 0.68rem;
}

.contact-item__activity {
  display: grid;
  min-width: 1.5rem;
  justify-items: end;
}

.contact-item__activity strong {
  display: grid;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.3rem;
  place-items: center;
  color: var(--ivory);
  background: var(--gold);
  border-radius: 999px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.66rem;
}

.contact-item__activity i {
  width: 0.38rem;
  height: 0.38rem;
  background: var(--gold);
  border-radius: 50%;
}

.contact-item:disabled .contact-item__activity i {
  background: rgb(23 23 20 / 24%);
}

.tessera-directory__foot {
  padding: 0.85rem 1.25rem 1rem;
  border-top: 1px solid var(--rule-dark);
}

.tessera-directory__foot p {
  margin: 0.55rem 0 0;
  color: var(--muted-on-light);
  font-size: 0.7rem;
  line-height: 1.45;
}

.tessera-directory__foot p.is-error {
  color: #a94f39;
}

.tessera-conversation {
  display: grid;
  min-width: 0;
  grid-template-rows: auto minmax(18rem, 1fr) auto;
  min-height: calc(100svh - 14.75rem);
}

.conversation-head {
  color: var(--ivory);
  border-bottom-color: var(--rule);
}

.conversation-head button {
  color: var(--gold-on-dark);
}

.conversation-head .tessera-avatar {
  color: var(--charcoal);
  background: var(--ivory);
}

.conversation-head small {
  color: var(--muted-on-dark);
}

.conversation-head > [data-security-toggle] {
  margin-left: auto;
}

.conversation-back {
  display: none;
}

.tessera-conversation .message-stream {
  min-height: 0;
  padding: 1.5rem clamp(1.25rem, 3vw, 3rem);
  overflow-y: auto;
}

.tessera-conversation .message {
  width: min(72%, 32rem);
  padding: 0.85rem 1rem;
}

.tessera-conversation .message--mine {
  color: var(--charcoal);
  background: var(--ivory);
}

.tessera-conversation .message--theirs {
  color: var(--ivory);
  background: #20201d;
}

.tessera-conversation .message--system {
  justify-self: center;
  border: 0;
  text-align: center;
}

.tessera-conversation .composer {
  padding: 0 clamp(1.25rem, 3vw, 3rem) 1.25rem;
}

.tessera-conversation .composer textarea {
  min-height: 4rem;
  resize: none;
}

.composer-feedback {
  padding: 0.65rem 0;
  margin: 0;
  color: var(--muted-on-dark);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.68rem;
  line-height: 1.5;
}

.composer-feedback.is-error {
  color: #d9876f;
}

.tessera-security {
  position: absolute;
  z-index: 4;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(28rem, 100%);
  min-height: 0;
  transform: translateX(100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 260ms ease, opacity 180ms ease;
}

.tessera-security.is-open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.tessera-security > strong {
  margin-top: 2rem;
  font-size: 1.6rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.045em;
}

.tessera-security > p {
  color: var(--muted-on-light);
  font-size: 0.74rem;
  line-height: 1.6;
}

.mobile-app-bar,
.mobile-tabbar,
.mobile-vault-add,
.vault-mobile-home {
  display: none;
}

.passkey-signin {
  display: flex;
  width: 100%;
  justify-content: space-between;
  padding: 1rem 0;
  margin-top: 0.85rem;
  color: var(--charcoal);
  background: transparent;
  border: 0;
  border-top: 1px solid var(--rule-dark);
  cursor: pointer;
  font-size: 0.76rem;
}

.mobile-sheet {
  position: fixed;
  z-index: 80;
  inset: 0;
}

.mobile-sheet__backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  background: rgb(0 0 0 / 58%);
  border: 0;
}

.mobile-sheet__panel {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  max-height: min(84svh, 48rem);
  padding: 1.25rem max(1.25rem, env(safe-area-inset-right)) calc(1.25rem + env(safe-area-inset-bottom)) max(1.25rem, env(safe-area-inset-left));
  overflow-y: auto;
  color: var(--charcoal);
  background: var(--ivory);
  box-shadow: 0 -1rem 3rem rgb(0 0 0 / 28%);
}

.mobile-sheet__panel > header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--rule-dark);
}

.mobile-sheet__panel > header span {
  color: var(--gold-on-light);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
}

.mobile-sheet__panel > header h2 {
  margin: 0.4rem 0 0;
  font-size: 1.65rem;
  font-weight: 550;
  letter-spacing: -0.055em;
}

.mobile-sheet__panel > header > button {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  color: var(--charcoal);
  background: transparent;
  border: 1px solid var(--rule-dark);
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.25rem;
}

.mobile-action-list,
.mobile-settings__actions {
  display: grid;
}

.mobile-action-list > button,
.mobile-settings__actions > button {
  display: grid;
  grid-template-columns: 2.5rem 1fr auto;
  gap: 0.2rem 0.85rem;
  align-items: center;
  width: 100%;
  padding: 1rem 0;
  color: var(--charcoal);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule-dark);
  cursor: pointer;
  text-align: left;
}

.mobile-action-list > button > span {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  grid-row: 1 / span 2;
  place-items: center;
  color: var(--ivory);
  background: var(--charcoal);
  font-size: 0.85rem;
}

.mobile-action-list strong,
.mobile-settings__actions strong {
  font-size: 0.92rem;
  font-weight: 600;
}

.mobile-action-list small,
.mobile-settings__actions small {
  grid-column: 2;
  color: var(--muted-on-light);
  font-size: 0.68rem;
  line-height: 1.45;
}

.mobile-vault-form {
  display: grid;
  gap: 1rem;
  padding-top: 1.25rem;
}

.mobile-vault-form label {
  display: grid;
  gap: 0.5rem;
  color: var(--gold-on-light);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
}

.mobile-vault-form input,
.mobile-vault-form textarea {
  width: 100%;
  padding: 1rem;
  color: var(--charcoal);
  background: rgb(255 255 255 / 35%);
  border: 1px solid var(--rule-dark);
  border-radius: 0;
  font: inherit;
  resize: vertical;
}

.mobile-vault-form > p {
  margin: 0;
  color: var(--muted-on-light);
  font-size: 0.68rem;
  line-height: 1.6;
}

.mobile-vault-form > div {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 0.75rem;
}

.mobile-vault-form button {
  padding: 0.9rem;
  color: var(--charcoal);
  background: transparent;
  border: 1px solid var(--rule-dark);
}

.mobile-vault-form button[type="submit"] {
  color: var(--ivory);
  background: var(--charcoal);
}

.vault-password-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

.vault-password-field button {
  border-left: 0;
  font-size: 0.68rem;
}

.vault-detail__body {
  display: grid;
  gap: 1rem;
  padding: 1.25rem 0;
}

.vault-detail__body > div {
  display: grid;
  gap: 0.4rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--rule-dark);
}

.vault-detail__body span {
  color: var(--muted-on-light);
  font-size: 0.62rem;
}

.vault-detail__body strong,
.vault-detail__body p {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.65;
  white-space: pre-wrap;
}

.vault-detail__body .is-secret {
  padding: 0.8rem;
  background: rgb(23 23 20 / 6%);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.vault-detail__body > div > button {
  justify-self: start;
  padding: 0;
  color: var(--gold-on-light);
  background: transparent;
  border: 0;
  font-size: 0.68rem;
}

.vault-detail__body img,
.vault-detail__body video {
  display: block;
  max-width: 100%;
  max-height: 55svh;
  margin: 0 auto;
  object-fit: contain;
}

.vault-detail__actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.vault-detail__actions button {
  padding: 0.9rem;
  color: var(--charcoal);
  background: transparent;
  border: 1px solid var(--rule-dark);
}

.vault-detail__actions button:first-child:not([hidden]) {
  color: var(--ivory);
  background: var(--charcoal);
}

.vault-detail__notice {
  margin: 1rem 0 0;
  color: var(--muted-on-light);
  font-size: 0.68rem;
  line-height: 1.6;
}

.vault-item__icon {
  display: none;
}

.mobile-settings__identity {
  margin: 1.25rem 0 0;
}

.mobile-settings__identity > div {
  display: grid;
  grid-template-columns: 5rem 1fr;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--rule-dark);
}

.mobile-settings__identity dt,
.mobile-settings__identity dd {
  margin: 0;
  font-size: 0.68rem;
}

.mobile-settings__identity dt {
  color: var(--muted-on-light);
}

.mobile-settings__actions > button {
  grid-template-columns: 1fr auto;
}

.mobile-settings__actions b {
  grid-column: 2;
  grid-row: 1 / span 2;
  color: var(--gold-on-light);
}

.mobile-settings__actions button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.mobile-settings__note {
  padding: 1rem 0;
  margin: 0;
  color: var(--muted-on-light);
  font-size: 0.72rem;
  line-height: 1.65;
}

.mobile-settings__signout {
  width: 100%;
  padding: 0.95rem;
  color: var(--wine);
  background: transparent;
  border: 1px solid var(--rule-dark);
  cursor: pointer;
}

.mobile-settings__feedback {
  min-height: 1.2rem;
  margin: 0.8rem 0 0;
  color: var(--wine);
  font-size: 0.68rem;
  line-height: 1.5;
}

@media (max-width: 64rem) {
  .identity-gate {
    grid-template-columns: 1fr 1fr;
  }

  .lab-header {
    grid-template-columns: 1fr auto;
  }

  .lab-header__session {
    display: none;
  }

  .lab-shell {
    grid-template-columns: 1fr;
  }

  .lab-sidebar {
    position: relative;
    top: auto;
    z-index: 5;
    display: block;
    height: auto;
    padding: 0 1.25rem;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--rule);
  }

  .lab-sidebar__label,
  .lab-sidebar__notice {
    display: none;
  }

  .lab-sidebar__identity {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.35rem 0.8rem;
    align-items: center;
    padding: 0.75rem 0;
    margin: 0;
  }

  .lab-sidebar__identity strong {
    margin: 0;
  }

  .lab-sidebar__identity em {
    grid-column: 1 / 3;
  }

  .lab-sidebar__identity button {
    grid-column: 3;
    grid-row: 1 / 3;
    margin: 0;
  }

  .lab-sidebar nav {
    display: flex;
    min-width: max-content;
  }

  .lab-nav {
    width: 11rem;
    padding-right: 1rem;
    margin-right: 1rem;
    border-bottom: 0;
  }

  .lab-nav:last-child {
    border-bottom: 0;
  }

  .lab-view {
    grid-template-columns: 1fr;
  }

  .boundary-panel {
    min-height: 30rem;
    border-top: 1px solid var(--rule-dark);
    border-left: 0;
  }

  .lab-view--tessera,
  .tessera-messenger,
  .tessera-conversation {
    min-height: calc(100svh - 18rem);
  }

  .tessera-messenger {
    grid-template-columns: minmax(16rem, 19rem) minmax(0, 1fr);
  }

  .tessera-security {
    min-height: 100%;
    border-top: 0;
    border-left: 1px solid var(--rule-dark);
  }
}

@media (max-width: 42rem) {
  body {
    overscroll-behavior-y: none;
  }

  .global-nav {
    display: none;
  }

  .identity-gate {
    display: block;
    padding-top: 0;
  }

  .identity-gate__statement {
    min-height: 8.5rem;
    justify-content: flex-start;
    gap: 1.25rem;
    padding: calc(1.25rem + env(safe-area-inset-top)) 1.25rem 1.25rem;
    border-right: 0;
    border-bottom: 1px solid var(--rule);
  }

  .identity-gate__statement h1,
  .identity-gate__lede {
    display: none;
  }

  .identity-mobile-brand {
    display: flex;
    gap: 0.75rem;
    align-items: center;
  }

  .identity-mobile-brand mark {
    display: grid;
    width: 2.8rem;
    height: 2.8rem;
    place-items: center;
    color: var(--charcoal);
    background: var(--ivory);
    font-size: 1rem;
    font-weight: 650;
  }

  .identity-mobile-brand > span {
    display: grid;
    gap: 0.1rem;
  }

  .identity-mobile-brand strong {
    font-size: 0.84rem;
    letter-spacing: 0.12em;
  }

  .identity-mobile-brand small {
    color: var(--gold-on-dark);
    font-size: 0.58rem;
    letter-spacing: 0.1em;
  }

  .identity-gate__control {
    min-height: calc(100svh - 8.5rem);
    padding: 1.5rem 1.25rem;
  }

  .identity-panel {
    padding: 2rem 0;
  }

  .recovery-words {
    grid-template-columns: repeat(2, 1fr);
  }

  .recovery-words li:nth-child(3n + 2),
  .recovery-words li:nth-child(3n + 3) {
    padding-left: 0;
    border-left: 0;
  }

  .recovery-words li:nth-child(even) {
    padding-left: 0.65rem;
    border-left: 1px solid var(--rule-dark);
  }

  .recovery-confirm__fields {
    grid-template-columns: 1fr;
  }

  .totp-enrollment {
    grid-template-columns: 7.5rem minmax(0, 1fr);
    gap: 1rem;
  }

  .totp-enrollment img {
    width: 7.5rem;
    height: 7.5rem;
  }

  .lab-header {
    height: 4rem;
  }

  .lab-header__brand {
    font-size: 0.52rem;
  }

  .lab-header__exit {
    font-size: 0.5rem;
  }

  .lab-shell {
    display: block;
    padding: calc(4.25rem + env(safe-area-inset-top)) 0 calc(4.75rem + env(safe-area-inset-bottom));
  }

  .mobile-app-bar {
    position: fixed;
    z-index: 30;
    top: 0;
    right: 0;
    left: 0;
    display: flex;
    min-height: calc(4.25rem + env(safe-area-inset-top));
    justify-content: space-between;
    align-items: center;
    padding: env(safe-area-inset-top) 1rem 0;
    color: var(--charcoal);
    background: var(--ivory);
    border-bottom: 1px solid var(--rule-dark);
  }

  .mobile-app-bar > a {
    display: flex;
    gap: 0.7rem;
    align-items: center;
    color: inherit;
    text-decoration: none;
  }

  .mobile-app-mark {
    display: grid;
    width: 2rem;
    height: 2rem;
    place-items: center;
    color: var(--ivory);
    background: var(--charcoal);
    font-size: 0.8rem;
    font-weight: 650;
  }

  .mobile-app-bar a > span:last-child {
    display: grid;
    gap: 0.1rem;
  }

  .mobile-app-bar strong {
    font-size: 0.7rem;
    letter-spacing: 0.1em;
  }

  .mobile-app-bar small {
    color: var(--gold-on-light);
    font-size: 0.62rem;
  }

  .mobile-app-bar > button {
    display: flex;
    width: 2.5rem;
    height: 2.5rem;
    justify-content: center;
    gap: 0.2rem;
    align-items: center;
    padding: 0;
    background: transparent;
    border: 0;
  }

  .mobile-app-bar > button span {
    width: 0.22rem;
    height: 0.22rem;
    background: var(--charcoal);
    border-radius: 50%;
  }

  .lab-sidebar {
    display: none;
  }

  .mobile-tabbar {
    position: fixed;
    z-index: 35;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    min-height: calc(4.75rem + env(safe-area-inset-bottom));
    grid-template-columns: repeat(4, 1fr);
    padding: 0.35rem 0 env(safe-area-inset-bottom);
    color: var(--muted-on-light);
    background: var(--ivory);
    border-top: 1px solid var(--rule-dark);
  }

  .mobile-tabbar button {
    display: grid;
    gap: 0.1rem;
    place-items: center;
    padding: 0.25rem;
    color: inherit;
    background: transparent;
    border: 0;
  }

  .mobile-tabbar button.is-active {
    color: var(--charcoal);
  }

  .mobile-tabbar button.is-active::before {
    position: absolute;
    top: 0;
    width: 1.25rem;
    height: 2px;
    background: var(--gold-on-light);
    content: '';
  }

  .mobile-tabbar__icon {
    font-size: 1.05rem;
    line-height: 1;
  }

  .mobile-tabbar strong {
    font-size: 0.58rem;
    font-weight: 550;
  }

  .workspace-head {
    display: block;
  }

  .workspace-head dl {
    min-width: 0;
    margin-top: 2rem;
  }

  .view-title {
    display: block;
  }

  .view-title > span {
    display: block;
    margin-top: 1.5rem;
    text-align: left;
  }

  .message {
    width: 90%;
  }

  .workspace-head {
    display: none;
  }

  .lab-view--tessera,
  .tessera-messenger,
  .tessera-conversation {
    min-height: calc(100svh - 4.25rem - 4.75rem - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  }

  .tessera-messenger {
    display: block;
  }

  .tessera-directory,
  .tessera-conversation {
    min-height: calc(100svh - 4.25rem - 4.75rem - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  }

  .tessera-directory__head,
  .tessera-profile,
  .nickname-form,
  .tessera-search,
  .tessera-contact-list,
  .tessera-directory__foot {
    padding-right: 1rem;
    padding-left: 1rem;
  }

  .tessera-directory__head h2 {
    font-size: 2.5rem;
    line-height: 1;
    letter-spacing: -0.055em;
  }

  .tessera-directory__head > span,
  .tessera-profile small,
  .tessera-directory__foot p {
    font-size: 0.66rem;
  }

  .contact-item {
    min-height: 4.6rem;
    padding: 0.85rem 1rem;
  }

  .contact-item__identity strong,
  .conversation-head strong {
    font-size: 0.92rem;
  }

  .contact-item__identity small,
  .conversation-head small {
    font-size: 0.66rem;
    line-height: 1.35;
  }

  .tessera-messenger.has-conversation .tessera-directory {
    display: none;
  }

  .tessera-messenger:not(.has-conversation) .tessera-conversation {
    display: none;
  }

  .conversation-back {
    display: block;
  }

  .conversation-head {
    padding: 0.85rem 1rem;
  }

  .conversation-head > [data-security-toggle] {
    font-size: 0;
  }

  .conversation-head > [data-security-toggle]::after {
    content: '보안';
    font-size: 0.5rem;
  }

  .tessera-conversation .message-stream {
    padding: 1rem;
  }

  .tessera-conversation .composer {
    padding: 0 1rem 0.75rem;
  }

  .tessera-conversation .composer textarea {
    min-height: 3.6rem;
    font-size: 1rem;
  }

  .lab-view:not(.lab-view--tessera) {
    display: block;
    min-height: calc(100svh - 9rem);
  }

  #archive {
    color: var(--charcoal);
    background: var(--ivory);
  }

  #archive .view-main {
    background: var(--ivory);
  }

  #archive .view-title,
  #archive .file-drop {
    display: none;
  }

  .vault-mobile-home {
    display: block;
  }

  .vault-mobile-home > header {
    padding: 0.75rem 0 1.4rem;
  }

  .vault-mobile-home > header p,
  .vault-mobile-home > header span {
    margin: 0;
    color: var(--gold-on-light);
    font-size: 0.68rem;
    letter-spacing: 0.04em;
  }

  .vault-mobile-home > header h2 {
    margin: 0.8rem 0 1rem;
    font-size: clamp(2.8rem, 13vw, 4rem);
    font-weight: 560;
    line-height: 1;
    letter-spacing: -0.065em;
  }

  .vault-mobile-home > header span {
    color: var(--muted-on-light);
    line-height: 1.5;
  }

  .vault-mobile-summary {
    display: flex;
    align-items: baseline;
    padding: 1rem 0;
    border-top: 1px solid var(--rule-dark);
    border-bottom: 1px solid var(--rule-dark);
  }

  .vault-mobile-summary span,
  .vault-mobile-summary small {
    color: var(--muted-on-light);
    font-size: 0.7rem;
  }

  .vault-mobile-summary strong {
    margin-left: auto;
    font-size: 2rem;
    font-weight: 520;
  }

  .vault-mobile-summary small {
    margin-left: 0.35rem;
  }

  .vault-service-list {
    display: grid;
    padding: 0.75rem 0 1.25rem;
  }

  .vault-service-list button {
    display: grid;
    min-height: 4.85rem;
    grid-template-columns: 2.8rem minmax(0, 1fr) auto;
    gap: 0.8rem;
    align-items: center;
    padding: 0.75rem 0;
    color: var(--charcoal);
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--rule-dark);
    text-align: left;
  }

  .vault-service-icon {
    display: grid;
    width: 2.8rem;
    height: 2.8rem;
    place-items: center;
    color: var(--ivory);
    background: var(--charcoal);
    font-size: 1rem;
  }

  .vault-service-list button:nth-child(2) .vault-service-icon,
  .vault-service-list button:nth-child(3) .vault-service-icon {
    color: var(--charcoal);
    background: #ddcfb3;
  }

  .vault-service-list button > span:nth-child(2) {
    display: grid;
    gap: 0.25rem;
  }

  .vault-service-list strong {
    font-size: 0.98rem;
    font-weight: 620;
  }

  .vault-service-list small {
    color: var(--muted-on-light);
    font-size: 0.68rem;
    line-height: 1.35;
  }

  .vault-service-list b {
    color: var(--gold-on-light);
    font-size: 1.5rem;
    font-weight: 300;
  }

  .vault-mobile-recent {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
  }

  .vault-mobile-recent span {
    font-size: 0.78rem;
    font-weight: 650;
  }

  .vault-mobile-recent small {
    color: var(--muted-on-light);
    font-size: 0.65rem;
  }

  .view-main {
    min-height: calc(100svh - 9rem);
    padding: 1.25rem 1rem 6.5rem;
  }

  .view-title {
    padding: 0.25rem 0 1.25rem;
  }

  .view-title p {
    margin-bottom: 0.85rem;
    font-size: 0.62rem;
  }

  .view-title h2 {
    font-size: clamp(3.2rem, 17vw, 4.8rem);
    line-height: 0.88;
    letter-spacing: -0.065em;
  }

  .view-title > span {
    color: var(--quiet-on-dark);
    font-size: 0.62rem;
  }

  .file-drop {
    min-height: 12rem;
    margin-top: 1.25rem;
    padding: 1.5rem;
  }

  .file-drop strong {
    max-width: 18rem;
    font-size: 1.35rem;
    line-height: 1.25;
  }

  .file-drop em,
  .vault-list__empty,
  .vault-item span {
    color: var(--quiet-on-dark);
    font-size: 0.68rem;
  }

  .mobile-vault-add {
    position: fixed;
    z-index: 25;
    right: 1rem;
    bottom: calc(5.75rem + env(safe-area-inset-bottom));
    display: grid;
    width: 3.6rem;
    height: 3.6rem;
    place-items: center;
    color: var(--charcoal);
    background: var(--ivory);
    border: 0;
    border-radius: 50%;
    box-shadow: 0 0.8rem 2rem rgb(0 0 0 / 30%);
  }

  .mobile-vault-add span {
    font-size: 1.8rem;
    font-weight: 300;
  }

  .boundary-panel {
    display: none;
  }

  .contact-strip {
    grid-template-columns: 1fr;
  }

  .contact-strip p {
    grid-column: 1;
  }

  .contact-strip button {
    justify-self: start;
  }

  .composer > div {
    align-items: flex-end;
  }

  .composer > div > span {
    max-width: 8rem;
  }

  .vault-item {
    grid-template-columns: 1fr auto;
    padding: 1rem 0;
    color: var(--charcoal);
    border-color: var(--rule-dark);
  }

  .vault-list {
    border-color: var(--rule-dark);
  }

  .vault-list__empty {
    color: var(--muted-on-light);
  }

  .vault-item > div:first-child {
    display: grid;
    grid-template-columns: 2.5rem minmax(0, 1fr);
    gap: 0.15rem 0.75rem;
    align-items: center;
  }

  .vault-item__icon {
    display: grid !important;
    width: 2.5rem;
    height: 2.5rem;
    grid-row: 1 / span 2;
    place-items: center;
    margin: 0 !important;
    color: var(--ivory) !important;
    background: var(--charcoal);
    font-family: inherit !important;
    font-size: 0.9rem !important;
    font-style: normal;
  }

  .vault-item span,
  .vault-item strong {
    grid-column: 2;
  }

  .vault-item span {
    margin: 0;
    color: var(--gold-on-light);
  }

  .vault-item strong {
    overflow: hidden;
    font-size: 0.86rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .vault-item__actions {
    display: grid;
    gap: 0.35rem;
  }

  .vault-item button {
    padding: 0.55rem 0.65rem;
    color: var(--charcoal);
    border-color: var(--rule-dark);
    font-size: 0.56rem;
  }

  .admin-intro {
    grid-template-columns: 1fr;
  }

  .admin-issue-form dl div,
  .credential-result dl > div {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .member-register {
    margin-top: 3rem;
  }

  .member-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .member-row__action {
    min-width: 0;
    text-align: left;
  }

  .audit-event {
    grid-template-columns: 5.5rem 1fr;
  }

  .audit-event span {
    grid-column: 2;
    text-align: left;
  }
}

@media print {
  body {
    color: #171714;
    background: #fff;
  }

  .global-nav,
  .identity-gate__statement,
  .identity-status,
  .identity-feedback,
  .identity-boundary,
  .recovery-print,
  .recovery-confirm {
    display: none !important;
  }

  .identity-gate,
  .identity-gate__control,
  .identity-panel {
    display: block !important;
    min-height: 0;
    padding: 0;
    color: #171714;
    background: #fff;
  }

  .recovery-panel {
    max-width: 48rem;
    margin: 2rem auto;
  }
}
