@import url('/tokens.css');

:root {
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

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

html,
body {
  height: 100%;
}

body {
  overflow: hidden;
}

button,
input,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

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

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 1px solid var(--line-lit);
  outline-offset: 2px;
}

::selection {
  background: rgba(194, 144, 73, 0.28);
}

.site-shell {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--canvas);
  color: var(--text-primary);
}

.site-header {
  height: 52px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: var(--canvas);
}

.wordmark,
.nav-button {
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
}

.wordmark {
  font-size: 17px;
  font-weight: 620;
  letter-spacing: -0.01em;
  line-height: 1;
}

.wordmark:hover {
  color: var(--lens-archer);
}

.product-label,
.nav-button,
.preview-badge,
.eyebrow,
.section-label,
.case-note,
.back-button,
.prop-number,
.standing,
.detail-key,
.receipt-state,
.search-key,
.gate-footnote,
.home-footnote {
  font-family: var(--font-mono);
  font-weight: 600;
}

.home-notice {
  max-width: 480px;
  color: var(--signal-sealed);
  font-size: 11px;
  line-height: 1.5;
}

.product-label {
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--text-ghost);
}

.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}

.site-nav a {
  font-size: 12px;
}

.nav-button {
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--text-ghost);
}

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

.preview-badge {
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  color: var(--signal-active);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.connection-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.connection-button:hover,
.connection-button.is-connected {
  border-color: var(--line-lit);
  color: var(--text-primary);
}

.connection-button.is-connected::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--signal-sealed);
  content: '';
}

.connection-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.app-main {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.home-view {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px;
  text-align: center;
}

.eyebrow,
.section-label {
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--text-ghost);
}

.home-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 660;
  letter-spacing: -0.03em;
  line-height: 1.12;
}

.claim-form {
  width: min(560px, 100%);
  display: flex;
  gap: 8px;
}

.claim-input {
  min-width: 0;
  flex: 1;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  outline: none;
  background: var(--sunken);
  color: var(--text-primary);
  font-size: 14.5px;
}

.claim-input::placeholder {
  color: var(--text-ghost);
}

.claim-input:focus {
  border-color: var(--line-lit);
}

.claim-submit {
  width: 46px;
  height: 46px;
  flex: none;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: var(--r-md);
  background: var(--text-primary);
  color: var(--canvas);
  cursor: pointer;
  transition: transform var(--dur-micro) var(--curve), background var(--dur-micro) var(--curve);
}

.claim-submit:hover {
  transform: translateX(2px);
  background: #fff;
}

.home-promise {
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 500;
}

.connection-card {
  min-width: min(360px, 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--text-muted);
  font-size: 11px;
  cursor: pointer;
}

.connection-card:hover {
  border-color: var(--line-lit);
  color: var(--text-primary);
}

.connection-card.connected {
  border-color: rgba(106, 167, 135, 0.28);
}

.connection-dot {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: var(--signal-dormant);
}

.connection-card.connected .connection-dot {
  background: var(--signal-sealed);
}

.prepare-view {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 24px 72px;
}

.prepare-eyebrow {
  margin-top: 28px;
}

.prepare-intro {
  max-width: 620px;
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 12.5px;
  line-height: 1.6;
}

.connect-panel,
.receipt-picker,
.seal-panel,
.sealed-result {
  margin-top: 28px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
}

.connect-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 18px;
}

.connect-panel h2,
.picker-header h2,
.seal-panel h2,
.sealed-result h2 {
  margin: 5px 0 0;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 640;
  letter-spacing: -0.02em;
}

.connect-panel p,
.picker-header p,
.seal-panel p,
.seal-actions span {
  margin: 5px 0 0;
  color: var(--text-muted);
  font-size: 11.5px;
  line-height: 1.5;
}

.no-margin {
  margin-top: 0;
}

.picker-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.receipt-search input {
  width: 190px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  outline: none;
  background: var(--sunken);
  color: var(--text-primary);
  font-size: 11px;
}

.receipt-search input:focus {
  border-color: var(--line-lit);
}

.receipt-list {
  max-height: 360px;
  overflow-y: auto;
  padding: 8px;
}

.receipt-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  cursor: pointer;
}

.receipt-option:hover {
  background: var(--raised);
}

.receipt-option.selected {
  border-color: var(--line-lit);
  background: var(--raised);
}

.receipt-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.receipt-check {
  width: 14px;
  height: 14px;
  flex: none;
  border: 1px solid var(--line-lit);
  border-radius: 50%;
}

.receipt-option.selected .receipt-check {
  border: 4px solid var(--surface);
  background: var(--signal-sealed);
  box-shadow: 0 0 0 1px var(--signal-sealed);
}

.receipt-copy {
  min-width: 0;
  flex: 1;
}

.receipt-copy strong,
.receipt-copy span {
  display: block;
}

.receipt-copy strong {
  overflow: hidden;
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 570;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.receipt-copy span {
  margin-top: 2px;
  color: var(--text-ghost);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.receipt-id {
  color: var(--text-ghost);
  font-family: var(--font-mono);
  font-size: 8px;
}

.empty-receipts {
  padding: 28px 12px;
  color: var(--text-muted);
  font-size: 12px;
  text-align: center;
}

.prepare-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  margin-top: 16px;
}

.prepare-actions > span,
.seal-actions > span {
  color: var(--text-ghost);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.05em;
  text-align: center;
  text-transform: uppercase;
}

.wide-button {
  min-height: 42px;
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.inline-error {
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(205, 104, 104, 0.28);
  border-radius: var(--r-sm);
  color: #d99797;
  font-size: 11.5px;
  line-height: 1.5;
}

.basis-summary {
  margin-top: 14px;
  padding: 8px 10px;
  border-left: 1px solid var(--line-lit);
  color: var(--text-muted);
  font-size: 10.5px;
  line-height: 1.55;
}

.basis-summary span {
  padding-right: 8px;
  color: var(--text-ghost);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.limitations ul {
  margin: 5px 0 0;
  padding-left: 16px;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.55;
}

.proposal-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.proposal-list div {
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.5;
}

.proposal-list span {
  display: inline-block;
  min-width: 86px;
  color: var(--signal-active);
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.seal-panel,
.sealed-result {
  padding: 18px;
}

.seal-panel label {
  display: block;
  margin-top: 16px;
  color: var(--text-ghost);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.seal-panel textarea {
  width: 100%;
  min-height: 104px;
  margin-top: 6px;
  padding: 12px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  outline: none;
  background: var(--sunken);
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 14px;
  line-height: 1.5;
}

.seal-panel textarea:focus {
  border-color: var(--line-lit);
}

.seal-actions {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 10px;
}

.illustrative-seal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.sealed-result {
  border-color: rgba(106, 167, 135, 0.26);
}

.sealed-meta {
  margin-top: 8px;
  color: var(--text-ghost);
  font-family: var(--font-mono);
  font-size: 8.5px;
  line-height: 1.5;
  word-break: break-all;
}

.link-button {
  display: inline-block;
  margin-top: 14px;
}

.examples {
  max-width: 640px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.example-chip,
.secondary-button,
.oedit-toggle {
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: none;
  cursor: pointer;
  transition: background var(--dur-micro) var(--curve), border-color var(--dur-micro) var(--curve), color var(--dur-micro) var(--curve);
}

.example-chip {
  padding: 5px 12px;
  color: var(--text-muted);
  font-size: 12px;
}

.example-chip:hover,
.secondary-button:hover {
  border-color: var(--line-lit);
  background: var(--raised);
  color: var(--text-secondary);
}

.home-footnote {
  max-width: 440px;
  color: var(--text-ghost);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.result-view {
  max-width: 680px;
  margin: 0 auto;
  padding: 24px 24px 64px;
}

.result-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.back-button {
  border: 0;
  padding: 0;
  background: none;
  color: var(--text-muted);
  font-size: 10px;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.back-button:hover {
  color: var(--text-primary);
}

.case-note {
  margin-left: auto;
  color: var(--text-ghost);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-align: right;
}

.oedit-toggle {
  padding: 4px 12px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 620;
}

.oedit-toggle[aria-pressed="true"] {
  border-color: var(--text-primary);
  background: var(--text-primary);
  color: var(--canvas);
}

.claim-quoted {
  margin-bottom: 0;
  margin-top: 20px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 660;
  letter-spacing: -0.03em;
  line-height: 1.3;
}

.claim-explainer {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 12px;
}

.section-label {
  margin-top: 24px;
  letter-spacing: 0.1em;
}

.propositions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.proposition {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
}

.proposition-summary {
  width: 100%;
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 12px 14px;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
}

.proposition-summary:hover {
  background: var(--raised);
}

.prop-number {
  flex: none;
  color: var(--text-ghost);
  font-size: 10px;
}

.prop-copy {
  flex: 1;
  min-width: 0;
}

.prop-title,
.prop-plain {
  display: block;
  line-height: 1.5;
}

.prop-title {
  color: var(--text-primary);
  font-size: 13.5px;
}

.prop-plain {
  padding-top: 3px;
  color: var(--text-muted);
  font-size: 12px;
}

.type-letter {
  flex: none;
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
}

.standing {
  flex: none;
  font-size: 9px;
  letter-spacing: 0.06em;
  text-align: right;
}

.standing-sealed { color: var(--signal-sealed); }
.standing-active { color: var(--signal-active); }
.standing-dormant { color: var(--signal-dormant); }

.chevron {
  width: 10px;
  height: 10px;
  flex: none;
  color: var(--text-ghost);
  transition: transform var(--dur-micro) var(--curve);
}

.proposition-summary[aria-expanded="true"] .chevron {
  transform: rotate(180deg);
}

.proposition-details {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
}

.detail-row,
.basis-row,
.search-row,
.request-row {
  display: flex;
  gap: 10px;
}

.detail-key,
.search-key {
  width: 110px;
  flex: none;
  padding-top: 2px;
  color: var(--text-ghost);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.detail-value,
.basis-value,
.search-value,
.request-value {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.5;
}

.basis-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.basis-id {
  width: 110px;
  flex: none;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
}

.stronger-wording {
  padding: 10px 12px;
  border: 1px dashed var(--line-lit);
  border-radius: var(--r-sm);
}

.stronger-wording .detail-key {
  width: auto;
  color: var(--signal-sealed);
}

.stronger-copy {
  margin-top: 4px;
  color: var(--text-primary);
  font-size: 13.5px;
  line-height: 1.5;
}

.case-link {
  font-size: 12px;
}

.search-receipt,
.request-draft {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
}

.search-caveat {
  padding-top: 8px;
  border-top: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 12px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.primary-button,
.secondary-button {
  padding: 6px 14px;
  font-size: 12px;
}

.primary-button {
  border: 1px solid var(--text-primary);
  border-radius: var(--r-pill);
  background: var(--text-primary);
  color: var(--canvas);
  font-weight: 620;
  cursor: pointer;
}

.action-link {
  padding: 6px 4px;
  font-size: 12px;
}

.request-draft {
  margin-top: 12px;
  border-style: dashed;
  border-color: var(--line-lit);
}

.receipt-state {
  color: var(--signal-active);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.request-row .detail-key {
  width: 130px;
}

.beta-gate {
  position: fixed;
  inset: 0;
  z-index: 30;
  overflow-y: auto;
  background: var(--canvas);
}

.beta-gate[hidden] {
  display: none;
}

.gate-inner {
  min-height: 100%;
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 32px;
  padding: 48px 24px;
  font-family: var(--font-mono);
}

.gate-wordmark {
  color: var(--text-primary);
  font-size: 28px;
  font-weight: 620;
  letter-spacing: -0.01em;
}

.gate-subtitle {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 20px;
}

.gate-sequence {
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: var(--text-secondary);
  font-size: 17px;
}

.gate-sequence > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lens-symbol {
  width: 18px;
  flex: none;
  text-align: center;
  font-family: var(--font-ui);
  font-size: 20px;
  font-weight: 620;
  line-height: 1;
}

.lens-grace { color: var(--lens-grace); }
.lens-archer { color: var(--lens-archer); }
.lens-cloud { color: var(--lens-cloud); }
.lens-seven { color: var(--lens-seven); font-size: 17px; font-weight: 700; }

.gate-copy {
  margin: 0;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 14.5px;
  line-height: 1.9;
}

.beta-form {
  display: flex;
  flex-direction: column;
}

.beta-form label {
  color: var(--text-muted);
  font-size: 12px;
}

.beta-form input {
  width: min(480px, 100%);
  padding: 8px 2px;
  border: 0;
  border-bottom: 1px solid var(--line-lit);
  border-radius: 0;
  outline: 0;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 17px;
}

.beta-form input:focus {
  border-bottom-color: var(--text-primary);
}

.gate-footnote {
  color: var(--text-ghost);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.06em;
}

.noscript {
  position: fixed;
  inset: auto 16px 16px;
  z-index: 100;
  padding: 12px;
  border: 1px solid var(--line-lit);
  background: var(--surface);
  color: var(--text-secondary);
}

.movement-page {
  min-height: 100%;
  overflow-y: auto;
  background: var(--canvas);
  color: var(--text-primary);
}

.movement-header {
  position: sticky;
  top: 0;
  z-index: 5;
  height: 52px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: var(--canvas);
}

.movement-wordmark {
  color: var(--text-primary);
  font-size: 17px;
  font-weight: 620;
  letter-spacing: -0.01em;
}

.movement-label,
.movement-kicker,
.movement-meta,
.movement-key,
.movement-path {
  font-family: var(--font-mono);
  font-weight: 600;
}

.movement-label,
.movement-kicker,
.movement-meta {
  color: var(--text-ghost);
  font-size: 9px;
  letter-spacing: 0.1em;
}

.case-body {
  overflow: hidden;
}

.case-shell {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--canvas);
  color: var(--text-primary);
}

.case-cover {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px;
  background: var(--canvas);
  text-align: center;
}

.case-cover[hidden] {
  display: none;
}

.case-cover-kicker,
.case-cover-meta,
.case-badge,
.case-context,
.case-section-label,
.case-inspector-kicker,
.case-inspector-number,
.case-inspector-label,
.case-status,
.case-list-number,
.case-list-status {
  font-family: var(--font-mono);
  font-weight: 600;
}

.case-cover-kicker {
  color: var(--text-ghost);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.case-cover-word {
  margin: 0;
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.04;
}

.case-cover-law {
  font-size: 17px;
  font-weight: 620;
  letter-spacing: -0.01em;
}

.case-cover-copy {
  max-width: 440px;
  margin: 0;
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.65;
}

.case-enter {
  margin-top: 8px;
  padding: 9px 20px;
  border: 1px solid var(--text-primary);
  border-radius: var(--r-pill);
  background: var(--text-primary);
  color: var(--canvas);
  font-size: 13.5px;
  font-weight: 620;
  cursor: pointer;
}

.case-cover-meta {
  color: var(--text-ghost);
  font-size: 9px;
  letter-spacing: 0.1em;
}

.case-header {
  height: 52px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
}

.case-wordmark {
  color: var(--text-primary);
  font-size: 17px;
  font-weight: 620;
  letter-spacing: -0.01em;
}

.case-badge,
.case-preview {
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  color: var(--text-ghost);
  font-size: 9px;
  letter-spacing: 0.1em;
}

.case-divider {
  width: 1px;
  height: 16px;
  background: var(--line);
}

.case-company {
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 500;
}

.case-star-copy {
  color: var(--text-muted);
  font-size: 12px;
}

.case-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.case-nav a,
.case-nav button {
  font-size: 12px;
}

.case-nav button {
  padding: 5px 14px;
  border: 1px solid var(--text-primary);
  border-radius: var(--r-pill);
  background: var(--text-primary);
  color: var(--canvas);
  cursor: pointer;
}

.case-context {
  height: 36px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 10px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.case-context-spacer {
  flex: 1;
}

.case-preview {
  color: var(--signal-active);
}

.case-content {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
}

.case-workspace {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 24px;
  overflow-y: auto;
}

.case-heading-row {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.case-section-label {
  color: var(--text-ghost);
  font-size: 9px;
  letter-spacing: 0.1em;
}

.case-heading {
  margin: 8px 0 0;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 660;
  letter-spacing: -0.03em;
}

.case-controls {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

.case-control-group {
  display: flex;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
}

.case-control-group button {
  padding: 5px 9px;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.case-control-group button.is-active {
  background: var(--raised);
  color: var(--text-primary);
}

.case-map {
  position: relative;
  min-height: 460px;
  flex: 1;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--sunken);
  overflow: hidden;
}

.case-map-lines,
.case-node-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.case-map-lines {
  overflow: visible;
}

.case-band,
.case-axis,
.case-trajectory,
.case-forecast,
.case-north-star path {
  fill: none;
}

.case-band {
  stroke: var(--line);
  stroke-width: 1;
}

.case-map-lines text {
  fill: var(--text-ghost);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.case-axis {
  stroke: var(--line-lit);
  stroke-width: 1;
}

.case-trajectory {
  stroke: var(--text-secondary);
  stroke-width: 2;
}

.case-forecast {
  stroke: var(--text-ghost);
  stroke-width: 1.5;
  stroke-dasharray: 5 5;
}

.case-north-star path {
  stroke: var(--text-primary);
  stroke-width: 1.2;
  stroke-linecap: round;
}

.case-north-star circle {
  fill: var(--text-primary);
}

.case-axis-label {
  text-anchor: middle;
  fill: var(--text-muted) !important;
  font-size: 13px !important;
}

.case-map-label {
  position: absolute;
  top: 3%;
  right: 3%;
  color: var(--text-ghost);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.case-node {
  position: absolute;
  width: 22px;
  height: 22px;
  transform: translate(-50%, -50%);
  border: 0;
  background: transparent;
  cursor: pointer;
}

.case-node-dot {
  position: absolute;
  inset: 6px;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: currentColor;
}

.case-node.partial .case-node-dot,
.case-node.open .case-node-dot {
  background: var(--sunken);
}

.case-node.passed { color: var(--signal-sealed); }
.case-node.partial { color: var(--signal-active); }
.case-node.active { color: var(--lens-archer); }
.case-node.open { color: var(--signal-dormant); }

.case-node.is-selected::after {
  content: '';
  position: absolute;
  inset: 1px;
  border: 1px solid var(--line-lit);
  border-radius: 50%;
}

.case-node-label {
  position: absolute;
  top: 19px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-ghost);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 600;
  white-space: nowrap;
}

.case-simple .case-node-label,
.case-simple .case-band,
.case-simple .case-map-lines text:not(.case-axis-label),
.case-simple .case-map-label {
  display: none;
}

.case-list {
  display: none;
  flex-direction: column;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}

.case-list-row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 9px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

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

.case-list-row:hover,
.case-list-row.is-selected {
  background: var(--raised);
}

.case-list-number,
.case-list-status {
  color: var(--text-ghost);
  font-size: 9px;
}

.case-list-name {
  color: var(--text-secondary);
  font-size: 12px;
}

.case-list-status.passed { color: var(--signal-sealed); }
.case-list-status.partial { color: var(--signal-active); }
.case-list-status.active { color: var(--lens-archer); }
.case-list-status.open { color: var(--signal-dormant); }

.case-workspace[data-view="list"] .case-map {
  display: none;
}

.case-workspace[data-view="list"] .case-list {
  display: flex;
}

.case-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 12px;
  color: var(--text-muted);
  font-size: 10px;
}

.case-legend > span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.legend-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.legend-dot.passed { color: var(--signal-sealed); }
.legend-dot.partial { color: var(--signal-active); }
.legend-dot.active { color: var(--lens-archer); }
.legend-dot.open { color: var(--signal-dormant); }

.case-legend-note {
  margin-left: auto;
  color: var(--text-ghost);
}

.case-inspector {
  min-height: 0;
  padding: 24px 20px;
  border-left: 1px solid var(--line);
  background: var(--surface);
  overflow-y: auto;
}

.case-inspector-kicker,
.case-inspector-label {
  color: var(--text-ghost);
  font-size: 9px;
  letter-spacing: 0.1em;
}

.case-inspector-number {
  margin-top: 24px;
  color: var(--text-ghost);
  font-size: 10px;
}

.case-inspector-title {
  margin: 6px 0 0;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 660;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.case-status {
  display: inline-block;
  margin-top: 10px;
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  color: var(--lens-archer);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.case-status.passed { color: var(--signal-sealed); }
.case-status.partial { color: var(--signal-active); }
.case-status.active { color: var(--lens-archer); }
.case-status.open { color: var(--signal-dormant); }

.case-inspector-summary {
  margin-top: 18px;
  color: var(--text-secondary);
  font-size: 13.5px;
  line-height: 1.6;
}

.case-inspector-section {
  margin-top: 20px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.case-inspector-section p {
  margin: 6px 0 0;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.6;
}

.case-check-link {
  display: inline-block;
  margin-top: 24px;
  font-size: 12px;
}

@media (max-width: 960px) {
  .case-star-copy {
    display: none;
  }

  .case-content {
    display: block;
    overflow-y: auto;
  }

  .case-workspace {
    min-height: 600px;
    overflow: visible;
  }

  .case-inspector {
    min-height: 420px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

@media (max-width: 640px) {
  .case-header,
  .case-context {
    padding-inline: 16px;
  }

  .case-company,
  .case-divider,
  .case-context > span:nth-child(-n + 3) {
    display: none;
  }

  .case-workspace {
    min-height: 540px;
    padding: 18px 16px;
  }

  .case-heading-row {
    flex-direction: column;
  }

  .case-controls {
    margin-left: 0;
  }

  .case-map {
    min-height: 360px;
  }

  .case-map-lines text,
  .case-node-label {
    display: none;
  }

  .case-list-row {
    grid-template-columns: 36px 1fr auto;
    padding-inline: 10px;
  }

  .case-inspector {
    padding-inline: 16px;
  }
}

.movement-nav {
  margin-left: auto;
  display: flex;
  gap: 12px;
}

.movement-nav a {
  font-size: 12px;
}

.movement-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 24px 64px;
}

.movement-stack {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.movement-stack-row,
.constitution-row,
.layer-row,
.prediction-row {
  display: flex;
  align-items: baseline;
  border-bottom: 1px solid var(--line);
}

.movement-stack-row {
  gap: 14px;
  padding: 14px 4px;
}

.movement-key {
  width: 104px;
  flex: none;
  color: var(--text-ghost);
  font-size: 9px;
  letter-spacing: 0.1em;
}

.movement-statement {
  font-family: var(--font-display);
  font-weight: 660;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.movement-section {
  margin-top: 28px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.movement-section.intro {
  margin-top: 32px;
  border-top: 0;
}

.movement-copy {
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 14.5px;
  line-height: 1.7;
}

.movement-thesis {
  margin-top: 12px;
  font-size: 14.5px;
  font-weight: 620;
}

.movement-note {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 12px;
}

.constitution,
.layers,
.predictions {
  display: flex;
  flex-direction: column;
  margin-top: 8px;
}

.constitution-row {
  gap: 12px;
  padding: 11px 4px;
}

.constitution-number {
  width: 28px;
  flex: none;
  color: var(--text-ghost);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
}

.constitution-title {
  display: block;
  font-size: 13.5px;
  font-weight: 620;
}

.constitution-body,
.layer-freedom,
.prediction-text {
  display: block;
  padding-top: 3px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.55;
}

.layer-row,
.prediction-row {
  gap: 12px;
  padding: 9px 4px;
}

.layer-name {
  width: 128px;
  flex: none;
  font-size: 13.5px;
  font-weight: 620;
}

.layer-freedom,
.prediction-text {
  padding-top: 0;
}

.declaration {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
  padding: 4px 0 4px 16px;
  border-left: 1px solid var(--line-lit);
}

.declaration p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14.5px;
  line-height: 1.6;
}

.ignition-title {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 660;
  letter-spacing: -0.03em;
}

.movement-path {
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1.9;
}

.prediction-key {
  width: 76px;
  flex: none;
  color: var(--text-ghost);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
}

.movement-closing {
  margin-top: 28px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.movement-closing-copy {
  font-size: 14.5px;
  font-weight: 620;
  line-height: 1.6;
}

.movement-meta {
  margin-top: 12px;
  letter-spacing: 0.08em;
}

@media (max-width: 720px) {
  .site-header {
    gap: 8px;
    padding: 0 16px;
  }

  .site-nav {
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .site-nav::-webkit-scrollbar {
    display: none;
  }

  .nav-button,
  .preview-badge {
    display: none;
  }

  .connection-button {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .prepare-view {
    padding-inline: 16px;
  }

  .connect-panel,
  .picker-header,
  .illustrative-seal {
    align-items: stretch;
    flex-direction: column;
  }

  .receipt-search input {
    width: 100%;
  }

  .result-view {
    padding-inline: 16px;
  }

  .case-note {
    max-width: 150px;
  }

  .proposition-summary {
    align-items: flex-start;
    gap: 8px;
    padding: 12px;
  }

  .standing {
    max-width: 92px;
  }

  .detail-row,
  .search-row,
  .request-row {
    flex-direction: column;
    gap: 3px;
  }

  .detail-key,
  .search-key,
  .request-row .detail-key {
    width: auto;
  }

  .gate-inner {
    gap: 24px;
    padding-block: 32px;
  }

  .movement-header {
    padding-inline: 16px;
  }

  .movement-label {
    display: none;
  }

  .movement-content {
    padding-inline: 16px;
  }

  .movement-stack-row,
  .layer-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .movement-key,
  .layer-name {
    width: auto;
  }
}

@media (max-width: 440px) {
  .product-label {
    display: none;
  }

  .site-nav a {
    display: none;
  }

  .connection-button {
    max-width: 170px;
  }

  .home-view {
    align-items: stretch;
    text-align: left;
  }

  .examples {
    justify-content: flex-start;
  }

  .example-chip {
    text-align: left;
  }

  .home-footnote {
    text-align: left;
  }

  .case-note {
    display: none;
  }

  .prop-number {
    display: none;
  }

  .standing {
    max-width: 76px;
    font-size: 8px;
  }

  .type-letter {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
