:root {
  --bg:         oklch(96% 0.01 250);
  --surface:    oklch(99% 0.004 250);
  --fg:         oklch(16% 0.015 250);
  --muted:      oklch(45% 0.02 250);
  --border:     oklch(28% 0.015 250);
  --accent:     oklch(84% 0.23 128);
  --expressive: oklch(70% 0.25 350);

  --font-display: 'Bahnschrift Condensed', 'Aptos Display', 'Microsoft YaHei UI', sans-serif;
  --font-body:    'Aptos', 'Segoe UI', 'Microsoft YaHei UI', sans-serif;
  --font-mono:    'Cascadia Mono', 'IBM Plex Mono', ui-monospace, Menlo, monospace;

  --accent-ink: oklch(14% 0.03 128);
  --surface-soft: oklch(92% 0.012 250);
  --surface-strong: oklch(16% 0.015 250);
  --success: oklch(42% 0.13 138);
  --success-soft: oklch(92% 0.08 128);
  --warn: oklch(66% 0.14 78);
  --warn-soft: oklch(96% 0.04 78);
  --danger: oklch(58% 0.22 25);
  --danger-soft: oklch(96% 0.035 25);
  --shadow: 8px 8px 0 var(--fg);
  --shadow-small: 4px 4px 0 var(--fg);
  --radius-lg: 2px;
  --radius-md: 2px;
  --radius-sm: 2px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

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

button {
  letter-spacing: 0.02em;
}

a {
  color: inherit;
}

::selection {
  background: var(--surface-strong);
  color: var(--surface);
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 200;
  padding: 10px 14px;
  background: var(--surface-strong);
  color: var(--surface);
  transform: translateY(-150%);
  transition: transform 160ms ease;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 68px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in oklch, var(--bg) 92%, transparent);
  backdrop-filter: blur(16px);
}

.site-header__inner {
  width: min(1180px, calc(100% - 40px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.wordmark__mark {
  width: 26px;
  height: 26px;
  border: 1px solid var(--fg);
  border-radius: 7px;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.header-nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 550;
  letter-spacing: 0.02em;
}

.header-nav a:hover,
.header-nav a[aria-current="page"] {
  background: var(--surface-soft);
  color: var(--fg);
}

.page {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 48px 0 80px;
}

.page--narrow {
  width: min(760px, calc(100% - 40px));
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 550;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--fg);
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.04;
  letter-spacing: -0.025em;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.12;
  letter-spacing: -0.018em;
}

h3 {
  margin-bottom: 8px;
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.lead {
  max-width: 65ch;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

.microcopy,
.helper {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: 0.01em;
}

.mono,
code,
time,
.table-number {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.surface {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.panel {
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.field {
  display: grid;
  gap: 8px;
}

.field + .field {
  margin-top: 20px;
}

.label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.field-label {
  font-size: 14px;
  font-weight: 550;
  letter-spacing: 0.02em;
}

.text-input,
.text-area,
.select-input {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 12px 14px;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.text-input:hover,
.text-area:hover,
.select-input:hover {
  border-color: color-mix(in oklch, var(--muted) 55%, var(--border));
}

.text-input:focus,
.text-area:focus,
.select-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--accent) 18%, transparent);
}

.text-input--phrase {
  min-height: 64px;
  padding: 16px 18px;
  font-family: var(--font-mono);
  font-size: clamp(17px, 2vw, 22px);
  letter-spacing: 0.01em;
}

.text-area {
  min-height: 190px;
  resize: vertical;
  line-height: 1.6;
}

.btn {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 10px 18px;
  color: var(--fg);
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--shadow-small);
  transition: transform 130ms ease, box-shadow 130ms ease, background 130ms ease;
}

.btn:hover {
  background: var(--surface-soft);
}

.btn:active {
  transform: translateY(2px);
  box-shadow: none;
}

.btn:focus-visible,
.segmented button:focus-visible,
.tab-button:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
}

.btn--primary {
  border-color: color-mix(in oklch, var(--accent) 80%, var(--fg));
  background: var(--fg);
  color: var(--surface);
  box-shadow: 0 10px 22px color-mix(in oklch, var(--accent) 20%, transparent);
}

.btn--primary:hover {
  background: color-mix(in oklch, var(--accent) 90%, var(--surface));
}

.btn--danger {
  border-color: color-mix(in oklch, var(--danger) 35%, var(--border));
  color: var(--danger);
  box-shadow: none;
}

.btn--ghost {
  background: transparent;
  box-shadow: none;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.button-row--end {
  justify-content: flex-end;
}

.notice {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 14px;
}

.notice strong {
  color: var(--fg);
  font-weight: 600;
}

.notice--warning {
  border-color: color-mix(in oklch, var(--warn) 35%, var(--border));
  background: var(--warn-soft);
  color: color-mix(in oklch, var(--warn) 65%, var(--fg));
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 550;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.status-badge--success {
  background: var(--success-soft);
  color: var(--success);
}

.status-badge--warn {
  background: var(--warn-soft);
  color: color-mix(in oklch, var(--warn) 70%, var(--fg));
}

.status-badge--danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.hidden {
  display: none !important;
}

.public-main {
  min-height: calc(100vh - 68px);
  padding: clamp(44px, 7vw, 84px) 0 72px;
}

.public-shell {
  width: min(1040px, calc(100% - 40px));
  margin: 0 auto;
}

.public-intro {
  max-width: 720px;
  margin-bottom: 34px;
}

.public-intro h1 {
  max-width: 11ch;
  margin-bottom: 14px;
  font-size: clamp(38px, 5vw, 56px);
}

.public-intro .lead {
  max-width: 58ch;
}

.retrieve-card {
  display: grid;
  grid-template-columns: minmax(0, 1.44fr) minmax(280px, 0.56fr);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.retrieve-stage {
  min-width: 0;
  min-height: 430px;
  display: grid;
  align-content: center;
  padding: clamp(28px, 5vw, 56px);
}

.retrieve-stage form {
  width: 100%;
}

.retrieve-submit {
  width: 100%;
  min-height: 50px;
  margin-top: 20px;
}

.field-error {
  color: var(--danger);
  font-size: 13px;
  line-height: 1.5;
}

.text-input[aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--danger) 13%, transparent);
}

.loading-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: retrieve-spin 700ms linear infinite;
}

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

.retrieve-side {
  display: flex;
  flex-direction: column;
  padding: clamp(28px, 4vw, 42px);
  border-left: 1px solid var(--border);
  background: var(--surface-soft);
}

.retrieve-side h2 {
  margin-bottom: 0;
  font-size: 26px;
}

.security-list {
  margin: 26px 0 30px;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--border);
}

.security-list li {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.security-index {
  font-family: var(--font-mono);
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.06em;
}

.security-list strong {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
  font-weight: 600;
}

.security-list small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.01em;
}

.security-boundary {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.security-boundary strong {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  letter-spacing: 0.02em;
}

.security-boundary p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.query-failure,
.retrieve-result {
  outline: none;
}

.query-failure h2,
.retrieve-result h2 {
  margin-bottom: 12px;
  font-size: clamp(28px, 4vw, 36px);
}

.query-failure > p:not(.eyebrow) {
  max-width: 54ch;
  margin-bottom: 24px;
  color: var(--muted);
}

.query-failure .btn {
  box-shadow: none;
}

.retrieve-result {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.retrieve-result__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.retrieve-result__meta .mono {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.burn-notice {
  margin: -2px 0 16px;
  padding: 10px 12px;
  border: 1px solid color-mix(in oklch, var(--warn) 35%, var(--border));
  border-radius: var(--radius-sm);
  background: var(--warn-soft);
  color: color-mix(in oklch, var(--warn) 65%, var(--fg));
  font-size: 13px;
}

.retrieve-result pre {
  max-height: 260px;
  min-height: 150px;
  margin: 0;
  padding: 18px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 14px/1.65 var(--font-mono);
}

.result-actions {
  min-height: 48px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.result-actions .btn {
  box-shadow: none;
}

.copy-feedback {
  min-width: 92px;
  color: var(--muted);
  font-size: 13px;
}

.public-footnote {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-top: 18px;
  padding: 0 4px;
  color: var(--muted);
}

.public-footnote .mono {
  flex: 0 0 auto;
  padding-top: 2px;
  font-size: 11px;
  letter-spacing: 0.08em;
}

.public-footnote p {
  margin: 0;
  max-width: 70ch;
  font-size: 12px;
  line-height: 1.55;
}

.visually-hidden {
  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;
}

.gateway-header-note {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
}

.role-gateway {
  min-height: calc(100vh - 68px);
  display: grid;
  place-items: center;
  padding: clamp(44px, 7vw, 84px) 0;
}

.role-gateway__inner {
  width: min(960px, calc(100% - 40px));
}

.role-gateway__intro {
  max-width: 680px;
  margin-bottom: 36px;
}

.role-gateway__intro h1 {
  margin-bottom: 14px;
  font-size: clamp(38px, 5vw, 56px);
}

.role-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.role-card {
  min-height: 330px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 42px;
  padding: clamp(26px, 4vw, 38px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--fg);
  text-decoration: none;
  box-shadow: var(--shadow-small);
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.role-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in oklch, var(--muted) 42%, var(--border));
  box-shadow: var(--shadow);
}

.role-card:active {
  transform: translateY(1px);
  box-shadow: var(--shadow-small);
}

.role-card:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 4px;
}

.role-card__index {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.role-card h2 {
  margin-bottom: 12px;
  font-size: clamp(28px, 3vw, 34px);
}

.role-card p {
  max-width: 40ch;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.role-card__action {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.role-card__action--primary {
  border-color: color-mix(in oklch, var(--accent) 80%, var(--fg));
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 10px 22px color-mix(in oklch, var(--accent) 18%, transparent);
}

.gateway-boundary {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-top: 18px;
  padding: 0 4px;
  color: var(--muted);
}

.gateway-boundary .mono {
  flex: 0 0 auto;
  padding-top: 2px;
  font-size: 11px;
  letter-spacing: 0.08em;
}

.gateway-boundary p {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 120;
  max-width: min(360px, calc(100% - 40px));
  padding: 13px 16px;
  border: 1px solid color-mix(in oklch, var(--surface) 12%, transparent);
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  color: var(--surface);
  box-shadow: var(--shadow);
  font-size: 13px;
}

/* TEMP DROP art direction: clear utility structure with a controlled zine layer. */
body {
  background-color: var(--bg);
}

body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: 4px;
  z-index: 80;
  background: var(--expressive);
  pointer-events: none;
}

::selection {
  background: var(--expressive);
  color: var(--fg);
}

.site-header {
  height: 72px;
  border-bottom: 2px solid var(--fg);
  background: var(--surface);
  backdrop-filter: none;
}

.wordmark {
  gap: 12px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.wordmark__mark {
  width: 42px;
  height: 28px;
  border: 2px solid var(--fg);
  border-radius: 0;
  background: var(--fg);
  color: var(--surface);
  font-size: 11px;
  letter-spacing: 0.05em;
  box-shadow: 3px 3px 0 var(--fg);
}

.header-nav a {
  border-radius: 0;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.header-nav a:hover,
.header-nav a[aria-current="page"] {
  background: var(--accent);
  color: var(--fg);
  text-decoration: none;
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 14px;
  padding: 4px 7px 3px;
  background: var(--fg);
  color: var(--surface);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.09em;
}

h1,
h2,
h3 {
  font-weight: 600;
}

h1 {
  letter-spacing: -0.03em;
}

.surface,
.panel,
.retrieve-card,
.role-card {
  border-width: 2px;
  border-color: var(--fg);
}

.panel,
.surface {
  box-shadow: 4px 4px 0 var(--fg);
}

.text-input,
.text-area {
  border-width: 2px;
  border-color: var(--fg);
  border-radius: 0;
  background: var(--surface);
}

.text-input:focus,
.text-area:focus {
  border-color: var(--fg);
  outline: 3px solid var(--expressive);
  outline-offset: 2px;
  box-shadow: none;
}

.field-label {
  font-weight: 600;
  letter-spacing: 0.02em;
}

.btn {
  min-height: 48px;
  border-width: 2px;
  border-color: var(--fg);
  border-radius: 0;
  font-weight: 600;
  box-shadow: 4px 4px 0 var(--fg);
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 6px 6px 0 var(--fg);
}

.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--fg);
}

.btn--primary,
.btn--primary:hover {
  border-color: var(--fg);
  background: var(--accent);
  color: var(--accent-ink);
}

.btn--ghost {
  border-color: var(--fg);
  background: var(--surface);
  color: var(--fg);
}

.btn--danger {
  border-color: var(--fg);
  color: var(--surface);
}

.status-badge {
  min-height: 28px;
  border: 1px solid currentColor;
  border-radius: 0;
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.status-badge--success {
  border-color: var(--success);
  background: var(--surface);
  color: var(--success);
}

.public-main,
.role-gateway {
  min-height: calc(100vh - 72px);
}

.public-intro h1,
.role-gateway__intro h1 {
  max-width: 12ch;
  font-size: clamp(48px, 7vw, 76px);
  line-height: 0.98;
}

.role-gateway__inner {
  position: relative;
}

.role-gateway__inner::before {
  content: "DROP / 001";
  position: absolute;
  top: -14px;
  right: 0;
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: clamp(30px, 6vw, 74px);
  font-weight: 600;
  letter-spacing: -0.06em;
  line-height: 1;
  opacity: 0.09;
  pointer-events: none;
}

.role-gateway__intro {
  position: relative;
  z-index: 1;
}

.role-grid {
  gap: 24px;
}

.role-card {
  min-height: 350px;
  border-radius: 0;
  box-shadow: 8px 8px 0 var(--fg);
}

.role-card--visitor {
  box-shadow: 8px 8px 0 var(--accent);
}

.role-card--admin {
  box-shadow: 8px 8px 0 var(--expressive);
}

.role-card:hover {
  transform: translate(-2px, -2px);
  border-color: var(--fg);
  box-shadow: 10px 10px 0 var(--fg);
}

.role-card--visitor .role-card__index {
  background: var(--accent);
}

.role-card--admin .role-card__index {
  background: var(--expressive);
}

.role-card__index {
  width: fit-content;
  padding: 5px 8px;
  color: var(--fg);
  font-weight: 600;
}

.role-card h2 {
  font-size: clamp(34px, 4vw, 48px);
}

.role-card__action,
.role-card__action--primary {
  border: 2px solid var(--fg);
  border-radius: 0;
  background: var(--fg);
  color: var(--surface);
  box-shadow: none;
}

.gateway-boundary,
.public-footnote {
  border-top: 1px solid var(--fg);
  padding-top: 12px;
}

.retrieve-card {
  border-radius: 0;
  box-shadow: 8px 8px 0 var(--fg);
}

.retrieve-side {
  border-left: 2px solid var(--fg);
  background: var(--surface-soft);
}

.security-list,
.security-list li,
.security-boundary {
  border-color: color-mix(in oklch, var(--fg) 45%, var(--surface-soft));
}

.security-index {
  color: var(--expressive);
  font-weight: 600;
}

.retrieve-result pre,
.burn-notice {
  border-width: 2px;
  border-radius: 0;
}

.toast {
  border: 2px solid var(--fg);
  border-radius: 0;
  background: var(--fg);
  box-shadow: 5px 5px 0 var(--expressive);
  font-weight: 600;
}
