:root {
  --z-bg: #f7f4ee;
  --z-surface: #fffefa;
  --z-surface-muted: #f3eee6;
  --z-ink: #111111;
  --z-muted: #5f6368;
  --z-border: #ded7cc;
  --z-red: #a93424;
  --z-red-soft: #f8e8e4;
  --z-green: #2f6f4e;
  --z-green-soft: #e8f2ec;
  --z-amber: #9a5b16;
  --z-amber-soft: #fff3dc;
  --z-shadow: 0 12px 30px rgba(17, 17, 17, 0.05);
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--z-bg);
  color: var(--z-ink);
  letter-spacing: 0;
}

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

a,
button,
input,
select,
textarea {
  touch-action: manipulation;
}

img,
video,
canvas {
  max-width: 100%;
}

:focus-visible {
  outline: 2px solid var(--z-red);
  outline-offset: 2px;
}

.z-body {
  background:
    linear-gradient(180deg, rgba(255, 254, 250, 0.82), rgba(247, 244, 238, 0.96)),
    var(--z-bg);
  color: var(--z-ink);
}

.z-header {
  background: rgba(255, 254, 250, 0.95);
  border-bottom: 1px solid var(--z-border);
  backdrop-filter: blur(14px);
}

.z-main {
  width: 100%;
}

.z-nav-link {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  min-height: 2.5rem;
}

.z-card,
.z-card-muted {
  border: 1px solid var(--z-border);
  border-radius: 8px;
}

.z-card {
  background: var(--z-surface);
  box-shadow: var(--z-shadow);
}

.z-card-muted {
  background: var(--z-surface-muted);
}

.z-button-primary,
.z-button-secondary {
  align-items: center;
  border-radius: 8px;
  display: inline-flex;
  font-weight: 600;
  justify-content: center;
  min-height: 44px;
  padding: 0.625rem 1rem;
}

.z-button-primary {
  background: var(--z-ink);
  color: var(--z-surface);
}

.z-button-primary:hover {
  background: #000000;
}

.z-button-secondary {
  background: var(--z-surface);
  border: 1px solid var(--z-border);
  color: var(--z-ink);
}

.z-button-secondary:hover {
  border-color: #bfb5a7;
  background: #fbf8f2;
}

.z-form-control {
  background: #ffffff;
  border: 1px solid var(--z-border);
  border-radius: 8px;
  min-height: 44px;
}

.z-form-control:focus {
  border-color: var(--z-red);
  box-shadow: 0 0 0 3px rgba(169, 52, 36, 0.12);
  outline: none;
}

.z-status-badge {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  min-height: 1.75rem;
  padding: 0 0.625rem;
}

.z-status-public {
  background: var(--z-green-soft);
  color: var(--z-green);
}

.z-status-foundation {
  background: #eee8de;
  color: #51493f;
}

.z-status-exclusive {
  background: var(--z-red-soft);
  color: var(--z-red);
}

.z-status-neutral {
  background: #ece7df;
  color: var(--z-muted);
}

.z-risk-note {
  background: var(--z-amber-soft);
  border-left: 3px solid var(--z-amber);
  color: var(--z-amber);
}

.z-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.z-empty-state {
  color: var(--z-muted);
  font-size: 0.875rem;
  padding: 1.25rem;
}

.locked-citation {
  border-left: 4px solid var(--z-red);
}
