/*
  tiro.legal — dossier design system
  ----------------------------------
  Warm-void maroon palette matching the desktop app.
  Sharp corners, hairline dividers, 4px baseline rhythm.
  Inter (tight tracking) + JetBrains Mono for metadata.
*/

:root {
  color-scheme: dark;

  /* warm void / surface tonal layering (from Advocate's Edge + app screenshots) */
  --void: #0f0808;
  --bg: #1b1111;
  --surface-1: #201515;
  --surface-2: #281d1d;
  --surface-3: #332727;
  --surface-4: #3e3231;
  --line: #3a2a2a;
  --line-strong: #574241;
  --line-outline: #a58a8a;

  /* text */
  --text: #f3dedd;
  --text-muted: #ddc0be;
  --text-soft: #a58a8a;
  --text-faint: #7a6362;

  /* brand */
  --primary: #a63a3f;
  --primary-soft: rgba(166, 58, 63, 0.12);
  --primary-line: rgba(166, 58, 63, 0.32);
  --primary-bright: #ffb3b2;
  --primary-deep: #852129;

  /* status */
  --success: #81d7b4;
  --danger: #ffb4ab;

  /* motion & shape */
  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --ease: cubic-bezier(0.2, 0.65, 0.2, 1);
  --t-fast: 180ms;
  --t: 260ms;
  --t-slow: 440ms;

  /* layout */
  --container: min(1240px, calc(100vw - clamp(64px, 7vw, 132px)));
  --margin-x: clamp(32px, 5vw, 66px);

  /* fonts */
  --sans: "Inter", "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 85% -10%, rgba(166, 58, 63, 0.14), transparent 60%),
    radial-gradient(800px 500px at -10% 30%, rgba(166, 58, 63, 0.06), transparent 70%),
    linear-gradient(180deg, #1d1212 0%, var(--bg) 32%, #180e0e 100%);
  overflow-x: hidden;
  font-feature-settings: "ss01", "cv11";
  font-variant-ligatures: common-ligatures;
}

::selection {
  background: rgba(166, 58, 63, 0.42);
  color: #fff;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  border: 0;
  background: none;
  cursor: pointer;
}

img,
svg {
  display: block;
  max-width: 100%;
}

/* ---------- layout primitives ---------- */

.site {
  position: relative;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  min-height: 100dvh;
}

.container {
  width: var(--container);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  top: -3rem;
  left: 1rem;
  z-index: 100;
  padding: 12px 20px;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  transform: translateY(4rem);
  outline: 2px solid var(--primary-bright);
}

/* ---------- typography ---------- */

.label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.label-accent {
  color: var(--primary-bright);
}

.label-dot {
  width: 6px;
  height: 6px;
  background: var(--primary);
  display: inline-block;
}

.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: -0.025em;
  font-weight: 600;
  text-wrap: balance;
}

.display {
  font-size: clamp(2.6rem, 6.8vw, 5.2rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
  font-weight: 600;
}

.display .accent {
  color: var(--primary-bright);
  font-style: italic;
  font-weight: 500;
}

.display-sm {
  font-size: clamp(1.9rem, 3.4vw, 2.7rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 600;
}

.lead {
  max-width: 58ch;
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.muted {
  color: var(--text-muted);
}

.soft {
  color: var(--text-soft);
}

/* ---------- top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: linear-gradient(180deg, rgba(15, 8, 8, 0.88), rgba(15, 8, 8, 0.6));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-text {
  display: grid;
  gap: 2px;
}

.brand-logo {
  height: 26px;
  width: auto;
  display: block;
}

.brand-text small {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--text-soft);
  text-transform: uppercase;
}

.nav {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 32px;
}

.nav a {
  position: relative;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--t-fast) var(--ease);
  padding: 4px 0;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 1px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t) var(--ease);
}

.nav a:hover {
  color: var(--text);
}

.nav a:hover::after {
  transform: scaleX(1);
}

.topbar-cta {
  justify-self: end;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: transform var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease),
    border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
  will-change: transform;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 1px 0 rgba(0, 0, 0, 0.5);
}

.btn-primary:hover {
  background: var(--primary-deep);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 0 0 1px rgba(166, 58, 63, 0.4), 0 10px 30px -12px rgba(166, 58, 63, 0.6);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line-strong);
}

.btn-ghost:hover {
  border-color: var(--line-outline);
  background: rgba(255, 255, 255, 0.03);
}

.btn-compact {
  height: 36px;
  padding: 0 14px;
  font-size: 11px;
}

.btn-arrow::after {
  content: "→";
  font-weight: 400;
  transition: transform var(--t-fast) var(--ease);
}

.btn-arrow:hover::after {
  transform: translateX(3px);
}

/* ---------- dossier meta strip ---------- */

.meta-strip {
  border-bottom: 1px solid var(--line);
  background: var(--void);
}

.meta-strip-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 28px;
  padding: 10px 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--text-soft);
  text-transform: uppercase;
}

.meta-strip-inner span strong {
  color: var(--text-muted);
  font-weight: 500;
  margin-left: 8px;
}

.meta-strip-inner .live::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  margin-right: 8px;
  box-shadow: 0 0 0 3px rgba(129, 215, 180, 0.18);
  vertical-align: middle;
  animation: pulseDot 2.8s var(--ease) infinite;
}

@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 0 3px rgba(129, 215, 180, 0.18); }
  50% { box-shadow: 0 0 0 6px rgba(129, 215, 180, 0.05); }
}

/* ---------- section frame ---------- */

.section {
  position: relative;
  padding-block: clamp(72px, 10vw, 140px);
}

.section + .section {
  border-top: 1px solid var(--line);
}

.section-head {
  display: grid;
  gap: 12px;
  max-width: 64ch;
  margin-bottom: 56px;
}

.section-head.center {
  margin-inline: auto;
  text-align: center;
  justify-items: center;
}

.section-head.between {
  max-width: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px;
}

/* ---------- hero ---------- */

.hero {
  padding-top: clamp(60px, 8vw, 110px);
  padding-bottom: clamp(72px, 8vw, 120px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 48px;
  align-items: center;
}

.hero-copy {
  display: grid;
  gap: 28px;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-block: 4px;
}

.hero-label::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--primary);
}

.hero-title {
  display: grid;
  gap: 4px;
}

.hero-title span {
  display: block;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-proof {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: 12px;
  border-top: 1px solid var(--line);
}

.hero-proof > div {
  padding: 20px 20px 4px 0;
  border-right: 1px solid var(--line);
}

.hero-proof > div:last-child {
  border-right: 0;
  padding-left: 20px;
}

.hero-proof > div:first-child {
  padding-left: 0;
}

.hero-proof dt {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 8px;
}

.hero-proof dd {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.45;
}

/* ---------- app preview (hero stage) ---------- */

.app-frame {
  position: relative;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 40px 80px -30px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(255, 255, 255, 0.02);
  transform: perspective(2000px) rotateX(0.5deg);
}

.app-chrome {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--void);
}

.app-dots {
  display: inline-flex;
  gap: 6px;
}

.app-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--surface-3);
  border: 1px solid var(--line-strong);
}

.app-title {
  margin-left: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-faint);
}

.app-body {
  display: grid;
  grid-template-columns: 160px 200px minmax(0, 1fr);
  min-height: 440px;
}

.app-sidebar {
  border-right: 1px solid var(--line);
  background: var(--surface-1);
  padding: 14px 10px;
  display: grid;
  gap: 4px;
  align-content: start;
}

.app-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 8px 14px;
}

.app-sidebar-head .mark {
  width: 22px;
  height: 22px;
  background: linear-gradient(180deg, rgba(166, 58, 63, 0.4), rgba(166, 58, 63, 0.12));
  border: 1px solid var(--primary-line);
  border-radius: var(--radius-xs);
}

.app-sidebar-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  font-size: 12px;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
}

.app-sidebar-item.is-active {
  background: rgba(166, 58, 63, 0.14);
  color: var(--text);
  border: 1px solid rgba(166, 58, 63, 0.25);
}

.app-sidebar-item::before {
  content: "";
  width: 12px;
  height: 10px;
  border: 1px solid currentColor;
  border-top-width: 2px;
  opacity: 0.55;
  border-radius: 1px;
}

.app-doc-panel {
  border-right: 1px solid var(--line);
  background: var(--surface-1);
  padding: 14px 14px;
  display: grid;
  gap: 10px;
  align-content: start;
}

.app-tab-row {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  background: var(--void);
  border-radius: var(--radius-sm);
  width: fit-content;
}

.app-tab {
  font-size: 11px;
  padding: 6px 12px;
  color: var(--text-soft);
  border-radius: var(--radius-xs);
  font-weight: 500;
}

.app-tab.is-active {
  background: var(--primary);
  color: #fff;
}

.app-section-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding-top: 8px;
}

.app-doc-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 11px;
  color: var(--text-muted);
}

.app-doc-item::before {
  content: "";
  width: 9px;
  height: 12px;
  border: 1px solid var(--primary-line);
  background: rgba(166, 58, 63, 0.14);
  flex: 0 0 auto;
}

.app-chat {
  padding: 18px 22px;
  display: grid;
  gap: 14px;
  align-content: start;
  background: radial-gradient(800px 300px at 50% -50%, rgba(166, 58, 63, 0.08), transparent);
  overflow: hidden;
}

.app-chat-head {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.app-chat-head strong {
  color: var(--text-muted);
  font-weight: 500;
}

.app-bubble-user {
  justify-self: end;
  max-width: 75%;
  padding: 8px 14px;
  background: rgba(166, 58, 63, 0.22);
  border: 1px solid rgba(166, 58, 63, 0.35);
  color: var(--text);
  font-size: 12.5px;
  border-radius: 14px 14px 4px 14px;
}

.app-answer {
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--text-muted);
  display: grid;
  gap: 10px;
}

.app-answer strong {
  color: var(--text);
  font-weight: 600;
}

.app-answer mark {
  background: rgba(255, 217, 84, 0.22);
  color: var(--text);
  padding: 0 3px;
}

.app-source-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--primary-bright);
  border: 1px solid var(--primary-line);
  background: rgba(166, 58, 63, 0.14);
  border-radius: var(--radius-xs);
}

.app-input {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  background: var(--surface-1);
  border-radius: var(--radius-sm);
  color: var(--text-faint);
  font-size: 12px;
}

.app-input::after {
  content: "↑";
  margin-left: auto;
  color: var(--primary-bright);
  font-weight: 600;
}

/* ---------- about ---------- */

.section-about {
  background:
    radial-gradient(760px 340px at 10% 14%, rgba(166, 58, 63, 0.12), transparent 72%),
    radial-gradient(660px 320px at 92% 76%, rgba(166, 58, 63, 0.08), transparent 76%),
    linear-gradient(180deg, #1d1212 0%, var(--bg) 42%, #180e0e 100%);
  overflow: hidden;
}

.about-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: clamp(32px, 5vw, 68px);
  padding: clamp(28px, 4vw, 42px);
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.015), rgba(255, 255, 255, 0)),
    rgba(32, 21, 21, 0.78);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 28px 90px -48px rgba(0, 0, 0, 0.9);
}

.about-shell::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  pointer-events: none;
}

.about-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 18px;
  align-content: center;
}

.about-label {
  color: var(--primary-bright);
}

.about-label .label-dot {
  background: var(--primary);
  box-shadow: 0 0 0 4px rgba(166, 58, 63, 0.08);
}

.about-era {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.about-copy h2 {
  max-width: 14ch;
  color: var(--text);
}

.about-story {
  position: relative;
  margin: 0;
  display: grid;
  gap: 18px;
  padding: 28px 32px 28px 36px;
  border-left: 1px solid var(--primary-line);
  background: linear-gradient(135deg, rgba(166, 58, 63, 0.1), rgba(166, 58, 63, 0.03));
  box-shadow: inset 0 0 0 1px rgba(166, 58, 63, 0.14);
}

.about-story::before {
  content: "“";
  position: absolute;
  left: 18px;
  top: 4px;
  font-family: "Cardo", serif;
  font-size: 4rem;
  line-height: 1;
  color: rgba(255, 179, 178, 0.12);
}

.about-story p {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: 28ch;
  font-family: "Cardo", serif;
  font-size: clamp(1.25rem, 2.25vw, 1.8rem);
  line-height: 1.5;
  letter-spacing: -0.015em;
  color: var(--text);
}

.about-story p:last-child {
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  color: var(--primary-bright);
}

.about-note {
  max-width: 50ch;
  margin: 0;
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.75;
}

.about-panel {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 24px;
  padding: 30px;
  align-content: start;
  border: 1px solid var(--line);
  background:
    radial-gradient(220px 120px at 80% 12%, rgba(166, 58, 63, 0.14), transparent 80%),
    linear-gradient(180deg, var(--surface-2), var(--void));
}

.about-panel::after {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  pointer-events: none;
}

.about-panel-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.about-seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--primary-line);
  border-radius: 999px;
  background: rgba(166, 58, 63, 0.12);
  color: var(--primary-bright);
  font-family: var(--mono);
  font-size: 10px;
}

.about-diagram {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 22px;
}

.about-role {
  display: grid;
  gap: 8px;
}

.about-role-label {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.about-role strong {
  font-family: "Cardo", serif;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1;
  color: var(--text);
}

.about-role p {
  margin: 0;
  max-width: 26ch;
  color: var(--text-muted);
  font-size: 0.97rem;
  line-height: 1.7;
}

.about-divider {
  position: relative;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(166, 58, 63, 0.46), transparent);
}

.about-divider::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 6px rgba(166, 58, 63, 0.08);
}

.about-maxim {
  position: relative;
  z-index: 1;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-family: "Cardo", serif;
  font-size: 1.35rem;
  line-height: 1.45;
  color: var(--primary-bright);
  text-wrap: balance;
}

/* ---------- principles ---------- */

.principles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.principle {
  position: relative;
  padding: 32px 28px 36px 28px;
  display: grid;
  gap: 10px;
  align-content: start;
  border-right: 1px solid var(--line);
}

.principle:last-child {
  border-right: 0;
}

.principle-num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--primary-bright);
  margin-bottom: 4px;
}

.principle h3 {
  font-size: 1.3rem;
  line-height: 1.2;
}

.principle p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.96rem;
  line-height: 1.6;
}

/* ---------- exhibits ---------- */

.exhibit {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 56px;
  align-items: center;
  padding-block: 56px;
}

.exhibit + .exhibit {
  border-top: 1px solid var(--line);
}

.exhibit.flip {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
}

.exhibit.flip .exhibit-copy {
  order: 2;
}

.exhibit.flip .exhibit-art {
  order: 1;
}

.exhibit-copy {
  display: grid;
  gap: 16px;
  align-content: center;
}

.exhibit-label {
  display: inline-flex;
  align-items: baseline;
  gap: 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.exhibit-label .num {
  color: var(--primary-bright);
  font-weight: 600;
}

.exhibit-label .kind {
  color: var(--text-soft);
}

.exhibit-copy h3 {
  font-size: clamp(1.65rem, 2.8vw, 2.3rem);
  line-height: 1.1;
  letter-spacing: -0.035em;
  font-weight: 600;
}

.exhibit-copy p {
  margin: 0;
  max-width: 54ch;
  color: var(--text-muted);
  font-size: 1.02rem;
  line-height: 1.7;
}

.exhibit-bullets {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.exhibit-bullets li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: baseline;
  color: var(--text-muted);
  font-size: 0.96rem;
  line-height: 1.55;
}

.exhibit-bullets li::before {
  content: "";
  width: 14px;
  height: 1px;
  background: var(--primary);
  margin-top: 10px;
}

/* ---------- exhibit art cards ---------- */

.exhibit-art {
  position: relative;
}

.card {
  position: relative;
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, var(--surface-1), var(--bg));
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 30px 60px -30px rgba(0, 0, 0, 0.6);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--void);
}

.card-head .mono {
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.06em;
}

.card-head .dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  margin-right: 6px;
  vertical-align: middle;
}

.card-body {
  padding: 22px;
}

/* contradiction timeline */
.timeline {
  display: grid;
  gap: 10px;
}

.timeline-row {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-1);
}

.timeline-row.alert {
  border-color: rgba(166, 58, 63, 0.45);
  background: rgba(166, 58, 63, 0.08);
}

.timeline-row .time {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--primary-bright);
}

.timeline-row .body strong {
  display: block;
  font-size: 13px;
  color: var(--text);
  font-weight: 600;
  margin-bottom: 2px;
}

.timeline-row .body small {
  font-size: 12px;
  color: var(--text-muted);
}

.timeline-row .sig {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-soft);
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
}

.timeline-row.alert .sig {
  color: var(--primary-bright);
  border-color: rgba(166, 58, 63, 0.4);
}

/* knowledge graph */
.graph {
  position: relative;
  height: 320px;
  background:
    radial-gradient(600px 300px at 50% 60%, rgba(166, 58, 63, 0.14), transparent 70%),
    linear-gradient(var(--surface-1), var(--bg));
  overflow: hidden;
}

.graph svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.graph-node {
  position: absolute;
  transform: translate(-50%, -50%);
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: -0.01em;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  color: var(--text);
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.graph-node.primary {
  background: rgba(166, 58, 63, 0.22);
  border-color: rgba(166, 58, 63, 0.5);
  color: var(--primary-bright);
  font-weight: 600;
}

.graph-node.small {
  padding: 4px 8px;
  font-size: 11px;
  color: var(--text-muted);
}

/* person dossier */
.dossier-person {
  display: grid;
  gap: 14px;
}

.dossier-person header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.person-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--primary-line);
  background: linear-gradient(180deg, rgba(166, 58, 63, 0.35), rgba(166, 58, 63, 0.1));
  color: var(--primary-bright);
  font-weight: 600;
  font-family: var(--mono);
  font-size: 14px;
  border-radius: var(--radius-xs);
}

.dossier-person header strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.dossier-person header span {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-soft);
  letter-spacing: 0.06em;
}

.dossier-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.dossier-metrics div {
  padding: 14px 16px;
  border-right: 1px solid var(--line);
}

.dossier-metrics div:last-child {
  border-right: 0;
}

.dossier-metrics dt {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 6px;
}

.dossier-metrics dd {
  margin: 0;
  font-family: var(--mono);
  font-size: 18px;
  color: var(--text);
  font-weight: 500;
}

.dossier-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dossier-tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 9px;
  color: var(--text-muted);
  border: 1px solid var(--line);
  background: var(--surface-1);
  border-radius: var(--radius-xs);
}

/* law search card */
.law-search {
  display: grid;
  gap: 14px;
}

.law-input {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--primary-line);
  background: rgba(166, 58, 63, 0.08);
  border-radius: var(--radius-sm);
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text);
}

.law-input::before {
  content: "⌕";
  color: var(--primary-bright);
  font-size: 16px;
}

.law-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.law-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  border: 1px solid var(--line);
  color: var(--text-muted);
  border-radius: var(--radius-xs);
}

.law-chip.active {
  border-color: rgba(166, 58, 63, 0.5);
  background: rgba(166, 58, 63, 0.14);
  color: var(--primary-bright);
}

.law-chip::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-faint);
}

.law-chip.active::before {
  background: var(--primary-bright);
}

.law-result {
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: var(--surface-1);
  border-radius: var(--radius-sm);
  display: grid;
  gap: 8px;
}

.law-result header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.law-result header strong {
  color: var(--text-muted);
  font-weight: 500;
}

.law-result p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
}

.law-result p mark {
  background: rgba(166, 58, 63, 0.22);
  color: var(--text);
  padding: 0 3px;
}

/* ---------- chain of custody ---------- */

.chain {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.chain-row {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 22px 28px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-1);
}

.chain-row:last-child {
  border-bottom: 0;
}

.chain-row.final {
  background: linear-gradient(90deg, rgba(166, 58, 63, 0.14), transparent 80%);
  border-left: 2px solid var(--primary);
}

.chain-index {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--primary-bright);
}

.chain-row h4 {
  margin: 0 0 4px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.chain-row p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.94rem;
  line-height: 1.55;
  max-width: 62ch;
}

.chain-status {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 6px 10px;
  border: 1px solid var(--line);
  color: var(--text-soft);
  border-radius: var(--radius-xs);
}

.chain-row.final .chain-status {
  color: var(--primary-bright);
  border-color: rgba(166, 58, 63, 0.45);
  background: rgba(166, 58, 63, 0.14);
}

/* ---------- hardware ---------- */

.hw-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 48px;
  align-items: start;
}

.hw-copy {
  display: grid;
  gap: 18px;
  align-content: start;
  position: sticky;
  top: 96px;
}

.hw-actions {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.hw-summary {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-muted);
  min-height: 1.4em;
  padding: 10px 12px;
  border-left: 1px solid var(--primary);
  background: rgba(166, 58, 63, 0.06);
}

.hw-os {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
  margin-top: 16px;
}

.hw-os div {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.hw-os dt {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.hw-os dd {
  margin: 0;
  color: var(--text-muted);
}

.hw-table-wrap {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface-1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.hw-table {
  width: 100%;
  border-collapse: collapse;
}

.hw-table th,
.hw-table td {
  text-align: left;
  padding: 16px 18px;
  font-size: 13px;
  border-bottom: 1px solid var(--line);
}

.hw-table th {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--text-soft);
  background: var(--void);
}

.hw-table td {
  color: var(--text-muted);
  font-family: var(--mono);
}

.hw-table td:first-child {
  color: var(--text);
  font-family: var(--sans);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.hw-table tbody tr {
  transition: background-color var(--t-fast) var(--ease);
}

.hw-table tbody tr.is-active {
  background: rgba(166, 58, 63, 0.12);
}

.hw-table tbody tr.is-active td:first-child {
  color: var(--primary-bright);
  border-left: 2px solid var(--primary);
  padding-left: 16px;
}

.hw-table tbody tr:last-child td {
  border-bottom: 0;
}

.hw-meta {
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-faint);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 12px;
  align-items: start;
  background: var(--void);
}

.hw-meta .status-pill {
  align-self: start;
  margin-top: 2px;
}

.hw-meta-headline {
  margin: 0;
  color: var(--text-muted);
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0;
  line-height: 1.5;
}

.hw-meta-detail {
  grid-column: 2;
  margin: 0;
  font-family: var(--sans);
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0;
  line-height: 1.5;
}

.hw-meta .status-pill {
  padding: 4px 8px;
  border: 1px solid var(--line);
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 10px;
  border-radius: var(--radius-xs);
}

.hw-meta[data-state="success"] .status-pill {
  color: var(--success);
  border-color: rgba(129, 215, 180, 0.35);
}

.hw-meta[data-state="unavailable"] .status-pill {
  color: var(--text-muted);
}

.hw-meta[data-state="mobile"] .status-pill {
  color: var(--danger);
  border-color: rgba(255, 180, 171, 0.35);
}

/* ---------- access (form) ---------- */

.access {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
  gap: 64px;
  align-items: start;
}

.access-copy {
  display: grid;
  gap: 18px;
  align-content: start;
}

.access-direct {
  margin-top: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  display: grid;
  gap: 4px;
}

.access-direct a {
  color: var(--primary-bright);
  font-size: 14px;
}

.access-direct a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.form {
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, var(--surface-1), var(--bg));
  padding: 32px;
  border-radius: var(--radius-md);
  display: grid;
  gap: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.form-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-soft);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.form-row {
  display: grid;
  gap: 6px;
}

.form-row label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-soft);
  font-weight: 600;
}

.form-row input,
.form-row textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--void);
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-size: 14px;
  border-radius: var(--radius-sm);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}

.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--primary-line);
  background: var(--bg);
  box-shadow: 0 0 0 3px rgba(166, 58, 63, 0.14);
}

.form-row input.is-invalid,
.form-row textarea.is-invalid {
  border-color: rgba(255, 180, 171, 0.55);
}

.form-row small {
  font-size: 12px;
  color: var(--text-soft);
}

.field-error {
  margin: 0;
  min-height: 16px;
  font-size: 12px;
  color: var(--danger);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 8px;
}

.form-feedback {
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: var(--void);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.55;
}

.form-feedback a {
  color: var(--primary-bright);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.feedback-state {
  display: none;
}

.form-feedback.idle .feedback-empty,
.form-feedback.loading .feedback-loading,
.form-feedback.success .feedback-success,
.form-feedback.error .feedback-error {
  display: block;
}

.form-feedback.error {
  border-color: rgba(255, 180, 171, 0.35);
  color: var(--danger);
}

/* ---------- footer ---------- */

.footer {
  border-top: 1px solid var(--line);
  padding: 32px 0 48px;
  margin-top: 48px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 32px;
  align-items: center;
}

.footer-brand .brand-logo {
  height: 28px;
  margin-bottom: 6px;
}

.footer-brand small {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.08em;
}

.footer-nav {
  display: inline-flex;
  gap: 24px;
}

.footer-nav a {
  font-size: 13px;
  color: var(--text-muted);
  transition: color var(--t-fast) var(--ease);
}

.footer-nav a:hover {
  color: var(--text);
}

.footer-copy {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.08em;
}

/* ---------- scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translate3d(0, 16px, 0);
  transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease);
}

.reveal.in {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.reveal-children > * {
  opacity: 0;
  transform: translate3d(0, 14px, 0);
  transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease);
}

.reveal-children.in > *:nth-child(1) { transition-delay: 40ms; }
.reveal-children.in > *:nth-child(2) { transition-delay: 140ms; }
.reveal-children.in > *:nth-child(3) { transition-delay: 240ms; }
.reveal-children.in > *:nth-child(4) { transition-delay: 340ms; }
.reveal-children.in > *:nth-child(5) { transition-delay: 440ms; }
.reveal-children.in > *:nth-child(6) { transition-delay: 540ms; }

.reveal-children.in > * {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* ---------- focus ring ---------- */

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--primary-bright);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

/* ---------- responsive ---------- */

@media (max-width: 1120px) {
  .hero-grid,
  .about-shell,
  .access,
  .hw-grid {
    grid-template-columns: 1fr;
  }

  .hw-copy {
    position: static;
  }

  .exhibit,
  .exhibit.flip {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .exhibit.flip .exhibit-copy {
    order: 1;
  }

  .exhibit.flip .exhibit-art {
    order: 2;
  }

  .principles {
    grid-template-columns: 1fr;
  }

  .principle {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .principle:last-child {
    border-bottom: 0;
  }

  .nav {
    display: none;
  }

  .section-head.between {
    grid-template-columns: 1fr;
    align-items: start;
  }
}

@media (max-width: 760px) {
  :root {
    --container: calc(100vw - 32px);
  }

  .topbar-cta {
    display: none;
  }

  .topbar-inner {
    grid-template-columns: 1fr;
    height: 60px;
  }

  .section {
    padding-block: 64px;
  }

  .hero {
    padding-top: 32px;
  }

  .about-shell {
    padding: 22px;
  }

  .about-story {
    padding: 22px 18px 22px 24px;
  }

  .about-panel {
    padding: 22px;
  }

  .about-panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-proof {
    grid-template-columns: 1fr;
  }

  .hero-proof > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 16px 0;
  }

  .hero-proof > div:last-child {
    border-bottom: 0;
  }

  .app-body {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .app-sidebar,
  .app-doc-panel {
    display: none;
  }

  .app-chat {
    padding: 16px;
  }

  .chain-row {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    gap: 12px;
  }

  .chain-status {
    grid-column: 2;
  }

  .hw-table th,
  .hw-table td {
    padding: 12px 12px;
    font-size: 12px;
  }

  .form {
    padding: 22px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .reveal,
  .reveal-children > * {
    opacity: 1;
    transform: none;
  }
}

/* ---------- udf editor mock ---------- */

.udf-editor {
  display: grid;
  gap: 12px;
}

.udf-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: var(--surface-1);
  border-radius: var(--radius-sm);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
}

.udf-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  padding: 4px 8px;
  border-radius: var(--radius-xs);
  border: 1px solid transparent;
  letter-spacing: 0.04em;
}

.udf-tool.active {
  background: rgba(166, 58, 63, 0.14);
  border-color: rgba(166, 58, 63, 0.5);
  color: var(--primary-bright);
}

.udf-tool.ai {
  background: rgba(166, 58, 63, 0.22);
  border-color: rgba(166, 58, 63, 0.6);
  color: var(--primary-bright);
  font-weight: 600;
}

.udf-source-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: -4px;
}

.udf-divider {
  width: 1px;
  height: 16px;
  background: var(--line);
  margin: 0 4px;
}

.udf-page {
  padding: 16px 18px;
  border: 1px solid var(--line);
  background: var(--surface-1);
  border-radius: var(--radius-sm);
  display: grid;
  gap: 8px;
}

.udf-page h4 {
  margin: 0 0 4px;
  font-family: var(--sans);
  font-size: 14px;
  letter-spacing: 0.16em;
  color: var(--text);
  text-align: center;
}

.udf-page .udf-meta {
  margin: 0 0 6px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-faint);
  text-align: center;
  letter-spacing: 0.06em;
}

.udf-page p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
}

.udf-page p mark {
  background: rgba(166, 58, 63, 0.22);
  color: var(--text);
  padding: 0 3px;
}
