:root {
  --bg: #f8f8f7;
  --paper: #fbfbfa;
  --ink: #0c0c0d;
  --ink-soft: #242426;
  --muted: #6e6e73;
  --subtle: #8b8b91;
  --line: #e7e7e4;
  --field: #ffffff;
  --focus: #5b5bc4;
  --focus-ring: 0 0 0 4px rgba(91, 91, 196, 0.16);
  --dark: #080808;
  --dark-soft: #111111;
  --dark-text: #f4f4f5;
  --dark-muted: #b5b5b8;
  --dark-subtle: #7b7b80;
  --dark-line: rgba(255, 255, 255, 0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.profile-page {
  background: #fbfbfa;
}

body.dashboard-page {
  background: #fbfbfa;
}

body.toc-page {
  background: #101010;
  color: #f7f7f5;
}

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

button,
input {
  font: inherit;
}

.lang-toggle {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 50;
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid rgba(140, 140, 145, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 10px 30px rgba(15, 15, 15, 0.08);
  backdrop-filter: blur(12px);
}

.lang-toggle button {
  min-width: 34px;
  height: 28px;
  padding: 0 8px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
  font-weight: 750;
  cursor: pointer;
}

.lang-toggle button.active {
  background: var(--ink);
  color: #ffffff;
}

.toc-shell {
  width: min(100% - 48px, 1180px);
  margin: 0 auto;
  padding: 42px 0 72px;
}

.toc-page .brand {
  margin-bottom: 52px;
}

.toc-page .brand-mark {
  background: #ffffff;
  color: #111111;
}

.toc-header {
  margin-bottom: 28px;
}

.toc-eyebrow {
  margin: 0 0 16px;
  color: #9fcfbd;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.toc-header h1 {
  margin: 0 0 14px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1;
  letter-spacing: 0;
  font-weight: 720;
}

.toc-header p {
  max-width: 780px;
  margin: 0;
  color: #c6c6c1;
  font-size: 19px;
  line-height: 1.45;
  font-weight: 520;
}

.toc-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 34px;
}

.toc-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: #c6c6c1;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 650;
}

.toc-legend strong {
  color: #ffffff;
  font-weight: 800;
}

.toc-sections {
  display: grid;
  gap: 22px;
}

.toc-section {
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  background: #181818;
}

.toc-section-heading {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 22px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.toc-section-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #f4f0df;
  color: #171717;
  font-size: 13px;
  line-height: 1;
  font-weight: 850;
}

.toc-section h2 {
  margin: 0 0 5px;
  color: #ffffff;
  font-size: clamp(25px, 3vw, 34px);
  line-height: 1.15;
  letter-spacing: 0;
  font-weight: 760;
}

.toc-section-heading p {
  max-width: 740px;
  margin: 0;
  color: #aaa9a3;
  font-size: 15px;
  line-height: 1.45;
  font-weight: 550;
}

.toc-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc-item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(220px, 0.75fr) auto minmax(260px, 1.35fr);
  gap: 12px;
  align-items: center;
  min-height: auto;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.045);
}

.toc-item-secondary {
  border-style: dashed;
  background: rgba(255, 255, 255, 0.025);
  opacity: 0.86;
}

.toc-link {
  display: inline-block;
  max-width: 100%;
  margin: 0;
  color: #ffffff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 14px;
  line-height: 1.25;
  font-weight: 760;
  overflow-wrap: anywhere;
}

.toc-link:hover {
  color: #9fcfbd;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.toc-item p {
  margin: 0;
  color: #c8c7c1;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 520;
}

.toc-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin: 0;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1;
  font-weight: 820;
  text-transform: uppercase;
  vertical-align: top;
}

.toc-badge.main {
  background: #d9efe5;
  color: #173628;
}

.toc-badge.optional {
  background: #f4e9c8;
  color: #3e3214;
}

.toc-badge.side {
  background: #303030;
  color: #d6d6d0;
}

.toc-badge.internal {
  background: #d8e7f5;
  color: #162f43;
}

.toc-badge.ai {
  background: #eadff7;
  color: #342041;
}

.entry-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(520px, 1fr);
  background: var(--paper);
}

.entry-form-panel {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 92px 52px 64px;
}

.entry-form-inner {
  width: min(100%, 620px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 66px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.brand-mark {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: var(--ink);
  color: #ffffff;
  font-size: 15px;
  font-weight: 750;
  line-height: 1;
}

.brand-name {
  font-size: 18px;
}

.intro {
  margin-bottom: 40px;
}

.step-label {
  margin: 0 0 18px;
  color: var(--subtle);
  font-size: 15px;
  line-height: 1.2;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.intro h1 {
  margin: 0 0 24px;
  font-size: clamp(44px, 4.3vw, 60px);
  line-height: 1.03;
  letter-spacing: -0.04em;
  font-weight: 620;
}

.intro p {
  max-width: 500px;
  margin: 0;
  color: var(--muted);
  font-size: 21px;
  line-height: 1.45;
  font-weight: 520;
  letter-spacing: -0.02em;
}

.signup-form {
  max-width: 560px;
}

.field {
  margin-bottom: 28px;
}

.field label {
  display: block;
  margin-bottom: 10px;
  color: var(--ink-soft);
  font-size: 18px;
  line-height: 1.2;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.field input {
  width: 100%;
  height: 58px;
  padding: 0 20px;
  border: 1px solid #d9d9d7;
  border-radius: var(--radius-sm);
  background: var(--field);
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
  outline: none;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.field input:focus {
  border-color: var(--focus);
  box-shadow: var(--focus-ring);
}

.field input::placeholder {
  color: #9f9fa4;
}

.field-help {
  max-width: 520px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.35;
  font-weight: 520;
  letter-spacing: -0.015em;
}

.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 68px;
  margin-top: 22px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: #ffffff;
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.02em;
  cursor: pointer;
}

.primary-action:hover {
  background: #171719;
}

.primary-action:active {
  transform: translateY(1px);
}

.login-copy {
  margin: 34px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.4;
  text-align: center;
  font-weight: 520;
}

.login-copy a {
  color: #4646a6;
  font-weight: 650;
}

.email-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 28px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--ink);
}

.summary-label {
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.email-summary strong {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 16px;
  font-weight: 650;
}

.email-summary a {
  color: #4646a6;
  font-size: 14px;
  font-weight: 650;
}

.code-input {
  letter-spacing: 0.18em;
  font-weight: 650;
}

.secondary-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.4;
  font-weight: 560;
}

.secondary-actions button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #4646a6;
  font-weight: 650;
  cursor: pointer;
}

.secondary-actions a {
  color: #4646a6;
  font-weight: 650;
}

.verify-mobile-page .secondary-actions {
  justify-content: stretch;
}

.verify-mobile-page .secondary-actions .secondary-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 68px;
  padding: 0 20px;
  border: 1px solid #ddddda;
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--muted);
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.verify-mobile-page .secondary-actions .secondary-action-button:hover {
  background: #f5f5f3;
}

.verify-mobile-page .secondary-actions .secondary-action-button:active {
  transform: translateY(1px);
}

.company-siren-page .secondary-actions {
  justify-content: stretch;
}

.company-siren-page .secondary-actions .secondary-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 68px;
  padding: 0 20px;
  border: 1px solid #ddddda;
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--muted);
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.company-siren-page .secondary-actions .secondary-action-button:hover {
  background: #f5f5f3;
}

.company-siren-page .secondary-actions .secondary-action-button:active {
  transform: translateY(1px);
}

.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
  font-weight: 540;
}

.consent-row input {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  margin-top: 2px;
  accent-color: var(--ink);
}

.value-panel {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: radial-gradient(circle at 30% 20%, #151515 0, var(--dark) 44%);
  color: var(--dark-text);
  border-bottom-left-radius: 28px;
  overflow: hidden;
}

.value-inner {
  width: min(100%, 880px);
  margin: 0 auto;
  padding: 80px;
}

.value-inner h2 {
  max-width: 780px;
  margin: 0 0 26px;
  font-size: clamp(42px, 4.1vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.045em;
  font-weight: 620;
}

.value-lead {
  max-width: 770px;
  margin: 0;
  color: var(--dark-muted);
  font-size: 22px;
  line-height: 1.42;
  letter-spacing: -0.02em;
  font-weight: 520;
}

.promise-list {
  display: grid;
  gap: 21px;
  margin: 60px 0 72px;
  padding: 0;
  list-style: none;
}

.promise-list li {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #d5d5d8;
  font-size: 19px;
  line-height: 1.35;
  font-weight: 620;
  letter-spacing: -0.02em;
}

.check {
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #343437;
  color: #f1f1f2;
  font-size: 18px;
  font-weight: 800;
}

.value-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 40px;
  border-top: 1px solid var(--dark-line);
  color: var(--dark-muted);
  font-size: 18px;
  line-height: 1.5;
  letter-spacing: -0.02em;
}

.value-footer strong {
  color: var(--dark-text);
  font-weight: 700;
}

.simple-header {
  height: 70px;
  display: flex;
  align-items: center;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
  background: rgba(251, 251, 250, 0.94);
}

.simple-header .brand {
  margin: 0;
}

.profile-shell {
  width: min(100% - 40px, 860px);
  margin: 0 auto;
  padding: 52px 0 40px;
}

.profile-hero {
  text-align: center;
  margin: 0 auto 28px;
}

.profile-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 3.8vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.045em;
  font-weight: 620;
}

.profile-hero p {
  max-width: 760px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.45;
  font-weight: 520;
  letter-spacing: -0.015em;
}

.manual-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
  color: #9c9ca1;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.manual-divider span {
  height: 1px;
  background: var(--line);
}

.profile-card {
  padding: 34px;
  border: 1px solid #ececea;
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(15, 15, 15, 0.04);
}

.prefill-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 650;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #4f8a63;
}

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

.profile-field-wide {
  grid-column: 1 / -1;
}

.profile-field label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.25;
  font-weight: 700;
}

.profile-field input {
  width: 100%;
  height: 56px;
  padding: 0 18px;
  border: 1px solid #ededeb;
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  font-size: 20px;
  font-weight: 520;
  letter-spacing: -0.02em;
  outline: none;
}

.profile-field input:focus {
  border-color: var(--focus);
  box-shadow: var(--focus-ring);
}

.profile-field input[readonly] {
  background: #f0f0ef;
  color: #77777d;
}

.logo-section {
  display: grid;
  grid-template-columns: 84px 1fr auto;
  align-items: center;
  gap: 18px;
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.logo-placeholder {
  width: 84px;
  height: 84px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #f1f1f0;
  color: #b1b1b5;
  font-weight: 650;
}

.logo-copy strong {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 4px;
  font-size: 18px;
  font-weight: 700;
}

.optional-tag {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border: 1px solid #dededb;
  border-radius: 999px;
  background: #f7f7f6;
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
  font-weight: 750;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.logo-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.35;
  font-weight: 520;
}

.secondary-button {
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid #ddddda;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.profile-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 38px;
}

.later-link {
  color: var(--muted);
  font-size: 16px;
  font-weight: 650;
}

.profile-submit {
  width: auto;
  min-width: 210px;
  height: 58px;
  margin: 0;
  padding: 0 30px;
  font-size: 20px;
}

.profile-footnote {
  margin: 28px 0 0;
  color: var(--muted);
  text-align: center;
  font-size: 15px;
  font-weight: 520;
}

.profile-footnote strong {
  color: var(--ink);
}

.plan-shell {
  width: min(100% - 40px, 1120px);
}

.plan-hero {
  max-width: 840px;
}

.plan-form {
  display: grid;
  gap: 22px;
}

.plan-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 16px;
  line-height: 1.35;
  font-weight: 560;
}

.plan-context strong {
  color: var(--ink);
  font-size: 18px;
  font-weight: 750;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 0;
  margin: 0;
  border: 0;
}

.plan-option {
  position: relative;
  min-height: 390px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  border: 1px solid #dededb;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease, transform 140ms ease;
}

.plan-option:hover {
  border-color: #bdbdb8;
  transform: translateY(-1px);
}

.plan-option:focus-within {
  border-color: var(--focus);
  box-shadow: var(--focus-ring);
}

.plan-option:has(input:checked) {
  border-color: #27674d;
  background: #fbfffd;
  box-shadow: 0 18px 48px rgba(28, 91, 66, 0.12);
}

.plan-topline {
  min-height: 28px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.plan-pill,
.plan-limit {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1.15;
  font-weight: 780;
  letter-spacing: 0.02em;
}

.plan-pill {
  padding: 0 10px;
  background: #d9f0e5;
  color: #173d2e;
  text-transform: uppercase;
}

.plan-pill.muted {
  background: #f2ead6;
  color: #47391a;
}

.plan-limit {
  justify-content: flex-end;
  color: var(--muted);
  text-align: right;
}

.plan-name {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 28px;
  line-height: 1.05;
  font-weight: 760;
  letter-spacing: -0.03em;
}

.plan-price {
  display: block;
  color: #1f5340;
  font-size: 24px;
  line-height: 1.1;
  font-weight: 760;
  letter-spacing: -0.02em;
}

.plan-copy {
  display: block;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.38;
  font-weight: 540;
}

.plan-features {
  display: grid;
  gap: 9px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.35;
  font-weight: 620;
}

.plan-features span {
  position: relative;
  padding-left: 18px;
}

.plan-features span::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: -1px;
  color: #27674d;
  font-weight: 780;
}

.plan-summary {
  padding: 18px 20px;
  border-left: 4px solid #c7a64b;
  border-radius: 8px;
  background: #fbf8ee;
  color: #4d4326;
}

.plan-summary strong {
  display: block;
  margin-bottom: 6px;
  color: #2f2816;
  font-size: 17px;
  line-height: 1.25;
  font-weight: 760;
}

.plan-summary p {
  margin: 0;
  font-size: 16px;
  line-height: 1.45;
  font-weight: 540;
}

.plan-actions {
  margin-top: 8px;
}

.plan-actions .later-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.dashboard-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
}

.dashboard-sidebar {
  min-height: 100vh;
  padding: 36px 22px;
  border-right: 1px solid var(--line);
  background: #ffffff;
}

.dashboard-brand {
  margin: 0 0 44px;
  padding: 0 8px 28px;
  border-bottom: 1px solid var(--line);
}

.dashboard-nav {
  display: grid;
  gap: 8px;
}

.dashboard-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 750;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.dashboard-nav a.active {
  background: #eeeeed;
  color: var(--ink);
}

.nav-icon {
  width: 22px;
  color: #8d8d92;
  font-size: 19px;
  text-align: center;
}

.dashboard-main {
  padding: 54px 44px 80px;
  overflow: hidden;
}

.dashboard-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 46px;
}

.dashboard-header h1 {
  margin: 0 0 8px;
  font-size: clamp(42px, 4.8vw, 62px);
  line-height: 0.98;
  letter-spacing: -0.055em;
  font-weight: 660;
}

.dashboard-header p {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.35;
  font-weight: 560;
}

.invite-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 8px;
  background: var(--ink);
  color: #ffffff;
  font-size: 15px;
  font-weight: 750;
}

.empty-dashboard-header {
  margin-bottom: 34px;
}

.empty-dashboard-card {
  min-height: 440px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(32px, 6vw, 72px);
  border: 1px solid #eeeeec;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 24px 80px rgba(15, 15, 15, 0.04);
}

.empty-dashboard-icon {
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
  border-radius: 14px;
  background: #f0f0ef;
  color: var(--muted);
  font-size: 24px;
  font-weight: 800;
}

.empty-dashboard-card h2 {
  max-width: 620px;
  margin: 0 0 16px;
  color: var(--ink);
  font-size: clamp(34px, 4.2vw, 56px);
  line-height: 1;
  letter-spacing: -0.055em;
  font-weight: 660;
}

.empty-dashboard-card p {
  max-width: 680px;
  margin: 0 0 34px;
  color: var(--muted);
  font-size: 22px;
  line-height: 1.35;
  font-weight: 560;
}

.empty-dashboard-action {
  min-height: 56px;
  padding: 0 24px;
  font-size: 17px;
}

.dashboard-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 46px;
}

.dashboard-kpi {
  min-height: 132px;
  padding: 28px;
  border: 1px solid #eeeeec;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 20px 60px rgba(15, 15, 15, 0.03);
}

.dashboard-kpi strong {
  display: block;
  margin-bottom: 12px;
  color: var(--ink);
  font-size: 46px;
  line-height: 1;
  font-weight: 640;
  letter-spacing: -0.05em;
}

.dashboard-kpi.risk strong {
  color: #b94a3e;
}

.dashboard-kpi span {
  color: var(--muted);
  font-size: 17px;
  font-weight: 560;
}

.table-card {
  border: 1px solid #eeeeec;
  border-radius: 16px;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(15, 15, 15, 0.03);
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}

.table-tabs {
  display: flex;
  align-items: center;
  gap: 20px;
}

.table-tabs button {
  position: relative;
  padding: 0 0 12px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
}

.table-tabs button.active {
  color: var(--ink);
}

.table-tabs button.active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -23px;
  left: 0;
  height: 3px;
  background: var(--ink);
}

.dashboard-search {
  width: min(100%, 260px);
  height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid #eeeeec;
  border-radius: 999px;
  color: var(--muted);
  background: #ffffff;
}

.dashboard-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  font-size: 15px;
}

.dashboard-search input::placeholder {
  color: #a0a0a5;
}

.table-scroll {
  overflow-x: auto;
}

.subcontractor-table {
  width: 100%;
  min-width: 960px;
  border-collapse: collapse;
}

.subcontractor-table th {
  padding: 20px 24px;
  color: var(--muted);
  background: #f6f6f5;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-align: left;
  text-transform: uppercase;
}

.subcontractor-table td {
  padding: 22px 24px;
  border-top: 1px solid #f0f0ef;
  color: var(--ink);
  font-size: 16px;
  font-weight: 560;
  vertical-align: middle;
}

.subcontractor-table tbody tr.clickable-row {
  cursor: pointer;
}

.subcontractor-table tbody tr.clickable-row:hover {
  background: #fafafa;
}

.subcontractor-table td strong,
.subcontractor-table td .row-title {
  display: block;
  margin-bottom: 4px;
  font-size: 17px;
  font-weight: 720;
  letter-spacing: -0.02em;
}

.subcontractor-table td .row-title:hover,
.subcontractor-table td a:hover {
  text-decoration: underline;
}

.subcontractor-table td span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 520;
}

.subcontractor-table td a {
  font-weight: 720;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 13px;
  border-radius: 999px;
  font-size: 14px !important;
  font-weight: 700 !important;
}

.status-pill.success {
  background: #e5f2e8;
  color: #2d6b3f !important;
}

.status-pill.warning {
  background: #fff2d9;
  color: #9b5a11 !important;
}

.status-pill.danger {
  background: #ffe5e2;
  color: #a2352c !important;
}

.status-pill.neutral {
  background: #eeeeed;
  color: #5f6067 !important;
}

.account-note-card {
  margin-bottom: 28px;
  padding: 24px 28px;
  border: 1px solid #eeeeec;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 20px 60px rgba(15, 15, 15, 0.03);
}

.account-note-card strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 760;
  letter-spacing: -0.02em;
}

.account-note-card p {
  max-width: 820px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.45;
  font-weight: 560;
}

.collaborators-table {
  min-width: 860px;
}

.collaborator-dialog {
  width: min(100% - 36px, 560px);
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: transparent;
}

.collaborator-dialog::backdrop {
  background: rgba(15, 15, 15, 0.42);
}

.collaborator-dialog-card {
  padding: 30px;
  border: 1px solid #eeeeec;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 30px 90px rgba(15, 15, 15, 0.2);
}

.dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 26px;
}

.dialog-header h2 {
  margin: 0;
  color: var(--ink);
  font-size: 34px;
  line-height: 1;
  letter-spacing: -0.05em;
  font-weight: 660;
}

.dialog-close {
  width: 38px;
  height: 38px;
  border: 1px solid #ddddda;
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.dialog-copy {
  margin: 14px 0 26px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.45;
  font-weight: 560;
}

.dialog-cancel {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.detail-main {
  max-width: 1180px;
}

.static-simulate-button {
  min-height: 34px;
  margin: 8px 0 20px;
  padding: 0 12px;
  border: 1px dashed #b9b9b4;
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
  cursor: pointer;
}

.static-simulate-button:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.upload-review-panel {
  display: grid;
  gap: 18px;
  margin-bottom: 42px;
  padding: 24px;
  border: 1px solid #d8e6dc;
  border-radius: 16px;
  background: #f7fcf9;
  box-shadow: 0 24px 80px rgba(15, 15, 15, 0.06);
}

.upload-review-panel[hidden] {
  display: none;
}

.upload-review-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.upload-review-header h2 {
  margin: 4px 0 8px;
  color: var(--ink);
  font-size: clamp(30px, 3.4vw, 44px);
  line-height: 1.02;
  letter-spacing: -0.05em;
  font-weight: 690;
}

.upload-review-header p:not(.method-eyebrow) {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.45;
  font-weight: 560;
}

.upload-review-list {
  display: grid;
  gap: 12px;
}

.upload-review-card {
  padding: 18px;
  border: 1px solid #e2ebe4;
  border-radius: 12px;
  background: #ffffff;
}

.upload-review-main {
  display: grid;
  grid-template-columns: minmax(220px, 1.05fr) minmax(240px, 1.15fr) auto auto;
  gap: 18px;
  align-items: start;
}

.upload-review-main h3 {
  margin: 4px 0 10px;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.22;
  letter-spacing: -0.02em;
  font-weight: 760;
  overflow-wrap: anywhere;
}

.compact-extraction {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.3;
  font-weight: 620;
}

.compact-extraction span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.25;
  font-weight: 750;
  cursor: pointer;
}

.review-checkbox input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  accent-color: var(--ink);
}

.global-review-check {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid #d6e6dc;
  border-radius: 999px;
  background: #ffffff;
  white-space: nowrap;
}

.review-details {
  min-width: 120px;
}

.review-details summary {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid #dededb;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 760;
  list-style: none;
  cursor: pointer;
}

.review-details summary::-webkit-details-marker {
  display: none;
}

.review-details[open] {
  grid-column: 1 / -1;
}

.review-details[open] summary {
  margin-bottom: 12px;
}

.review-details .extraction-list {
  background: #ffffff;
}

.upload-review-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 4px;
}

.upload-review-actions .secondary-button,
.upload-review-actions .invite-button {
  min-width: 130px;
}

.admin-dashboard-main {
  max-width: 1280px;
}

.admin-dashboard-main .dashboard-header {
  margin-bottom: 34px;
}

.admin-subcontractor-table {
  min-width: 860px;
}

.admin-message-header {
  align-items: center;
}

.admin-message-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.message-template-stack {
  display: grid;
  gap: 24px;
}

.template-list-panel {
  min-width: 0;
}

.template-table {
  min-width: 960px;
}

.template-table .selected-row {
  background: #f7f7f5;
  box-shadow: inset 4px 0 0 var(--ink);
}

.template-workspace {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.template-panel {
  min-width: 0;
  padding: 24px;
  border: 1px solid #eeeeec;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 20px 60px rgba(15, 15, 15, 0.03);
}

.template-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.template-panel-header h2 {
  margin: 3px 0 0;
  color: var(--ink);
  font-size: 28px;
  line-height: 1.12;
  letter-spacing: -0.035em;
  font-weight: 720;
}

.template-state-row,
.template-action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.template-guardrail {
  display: grid;
  gap: 4px;
  margin-bottom: 20px;
  padding: 14px 16px;
  border: 1px solid #f0dfc3;
  border-radius: 8px;
  background: #fff8eb;
}

.template-guardrail strong {
  color: #8a530f;
  font-size: 14px;
  font-weight: 800;
}

.template-guardrail span {
  color: #755b34;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 560;
}

.template-editor-form {
  gap: 20px;
}

.profile-field textarea.template-body-field {
  min-height: 170px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 14px;
  line-height: 1.5;
}

.profile-field textarea.template-json-field {
  min-height: 190px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 14px;
  line-height: 1.5;
}

.email-preview {
  overflow: hidden;
  border: 1px solid #eeeeec;
  border-radius: 8px;
  background: #f8f8f7;
}

.email-preview-subject {
  display: grid;
  gap: 5px;
  padding: 16px 18px;
  border-bottom: 1px solid #eeeeec;
  background: #ffffff;
}

.email-preview-subject span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.email-preview-subject strong {
  color: var(--ink);
  font-size: 17px;
  line-height: 1.35;
  font-weight: 760;
}

.email-preview-body {
  padding: 22px 18px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
  font-weight: 540;
}

.email-preview-body p {
  margin: 0 0 12px;
}

.email-preview-body a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 6px;
  background: var(--ink);
  color: #ffffff;
  font-weight: 750;
}

.template-text-preview {
  margin-top: 18px;
}

.template-text-preview pre {
  margin: 8px 0 0;
  padding: 16px;
  overflow-x: auto;
  border: 1px solid #eeeeec;
  border-radius: 8px;
  background: #101010;
  color: #f6f6f1;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.template-version-table {
  min-width: 760px;
}

.admin-tool-header {
  max-width: 860px;
}

.admin-tool-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  max-width: 640px;
}

.extract-all-stack {
  display: grid;
  gap: 24px;
  max-width: 980px;
}

.extract-all-intake,
.extract-all-outputs {
  display: grid;
  gap: 16px;
}

.extract-region-heading h2 {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 28px;
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 740;
}

.extract-region-heading p:not(.method-eyebrow) {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.45;
  font-weight: 540;
}

.urssaf-input-column {
  display: grid;
  gap: 16px;
}

.urssaf-dropzone {
  min-height: 250px;
  gap: 9px;
  padding: 24px;
}

.urssaf-dropzone .upload-arrow {
  font-size: 34px;
}

.urssaf-dropzone strong {
  font-size: 18px;
}

.urssaf-dropzone span {
  font-size: 13px;
}

.urssaf-dropzone .secondary-button {
  min-height: 36px;
  padding: 0 16px;
  font-size: 14px;
}

.extract-all-dropzone {
  min-height: 300px;
}

.extract-output-list {
  display: grid;
  gap: 16px;
}

.extract-output-card {
  min-width: 0;
  display: grid;
  gap: 16px;
  padding: 22px;
  border: 1px solid #eeeeec;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 20px 60px rgba(15, 15, 15, 0.03);
}

.extract-output-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.extract-output-header h3 {
  margin: 10px 0 0;
  color: var(--ink);
  font-size: 21px;
  line-height: 1.15;
  letter-spacing: -0.025em;
  font-weight: 740;
}

.sample-document-card {
  display: grid;
  gap: 18px;
  padding: 22px;
  border: 1px solid #eeeeec;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 20px 60px rgba(15, 15, 15, 0.03);
}

.sample-document-card h2 {
  margin: 4px 0 6px;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-weight: 700;
}

.sample-document-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  font-weight: 520;
}

.sample-document-list {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.sample-document-list li {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fdfdfc;
  overflow: hidden;
}

.sample-document-link {
  display: grid;
  gap: 3px;
  min-height: 64px;
  padding: 12px 14px;
  color: inherit;
  text-decoration: none;
}

.sample-document-link:hover {
  background: #f8f8f7;
}

.sample-document-link:focus-visible {
  outline: none;
  box-shadow: inset var(--focus-ring);
}

.sample-document-link strong {
  display: block;
  color: var(--focus);
  font-size: 14px;
  line-height: 1.25;
  font-weight: 760;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.sample-document-link span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.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;
}

.extraction-card {
  padding: 30px;
  border: 1px solid #eeeeec;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 20px 60px rgba(15, 15, 15, 0.03);
}

.extraction-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.extraction-card h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: -0.04em;
  font-weight: 660;
}

.extraction-list {
  display: grid;
  gap: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.extraction-list div {
  display: grid;
  grid-template-columns: minmax(160px, 0.75fr) minmax(0, 1.25fr);
  gap: 18px;
  padding: 16px 18px;
  border-top: 1px solid var(--line);
}

.extraction-list div:first-child {
  border-top: 0;
}

.extraction-list dt {
  color: var(--muted);
  font-size: 14px;
  font-weight: 760;
}

.extraction-list dd {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 620;
}

.ai-output-section {
  margin-top: 24px;
}

.ai-output-section .method-eyebrow {
  margin: 0 0 8px;
}

.ai-output-description {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  font-weight: 520;
}

.json-output {
  margin: 0;
  padding: 16px;
  overflow: auto;
  border: 1px solid #dededb;
  border-radius: 12px;
  background: #101010;
  color: #f7f7f5;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.55;
}

.json-output code {
  font: inherit;
}

.json-key {
  color: #79c0ff;
}

.json-string {
  color: #a5d6ff;
}

.json-boolean {
  color: #ff7b72;
}

.extract-hub-section {
  display: grid;
  gap: 22px;
  max-width: 640px;
}

.extract-hub-heading h2 {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 28px;
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 740;
}

.extract-hub-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.extract-hub-card {
  min-height: 210px;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 22px;
  border: 1px solid #eeeeec;
  border-radius: 8px;
  background: #ffffff;
  color: inherit;
  text-decoration: none;
  box-shadow: 0 20px 60px rgba(15, 15, 15, 0.03);
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.extract-hub-card:hover {
  border-color: #cfcfca;
  box-shadow: 0 22px 64px rgba(15, 15, 15, 0.07);
  transform: translateY(-1px);
}

.extract-hub-card-primary {
  border-color: #c7d9cf;
  background: #f7fcf9;
}

.extract-hub-card-primary .extract-hub-token {
  background: #d9f0e5;
  color: #173d2e;
}

.extract-hub-card:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring), 0 22px 64px rgba(15, 15, 15, 0.07);
}

.extract-hub-token {
  width: fit-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eadff7;
  color: #342041;
  font-size: 12px;
  line-height: 1.15;
  font-weight: 780;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.extract-hub-card h3 {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 23px;
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 760;
}

.extract-hub-card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.42;
  font-weight: 540;
}

.extract-hub-link {
  align-self: end;
  margin-top: 6px;
  color: var(--focus);
  font-size: 15px;
  line-height: 1.2;
  font-weight: 760;
}

.detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

.detail-header h1 {
  margin: 0 0 10px;
  font-size: clamp(42px, 5vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.055em;
  font-weight: 660;
}

.detail-header p {
  margin: 0;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.4;
  font-weight: 560;
}

.score-badge {
  min-width: 150px;
  padding: 18px;
  border: 1px solid #eedfd5;
  border-radius: 14px;
  background: #fff7ed;
  color: #8d4715;
  text-align: center;
}

.score-badge strong {
  display: block;
  margin-bottom: 6px;
  color: #a14f18;
  font-size: 28px;
  line-height: 1;
  font-weight: 760;
}

.score-badge span {
  color: #8d4715;
  font-size: 14px;
  font-weight: 750;
}

.detail-alert {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 34px;
  padding: 22px 24px;
  border-left: 4px solid #c65b4a;
  border-radius: 10px;
  background: #fff0ec;
  color: #7e3329;
}

.detail-alert strong {
  flex: 0 0 auto;
  font-size: 18px;
  font-weight: 780;
}

.detail-alert span {
  color: #7d5d58;
  font-size: 16px;
  line-height: 1.45;
  font-weight: 560;
}

.detail-section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.detail-section-header h2 {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.detail-section-header p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 650;
}

.detail-section-header > span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: #ffffff;
  font-size: 14px;
  font-weight: 720;
}

.document-chip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  margin-bottom: 12px;
}

.document-chip {
  width: 100%;
  min-height: 118px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font: inherit;
  text-align: center;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.document-chip:hover {
  border-color: #cfcfcb;
  box-shadow: 0 18px 45px rgba(15, 15, 15, 0.08);
  transform: translateY(-1px);
}

.document-chip:focus-visible {
  outline: 3px solid rgba(28, 126, 214, 0.35);
  outline-offset: 3px;
}

.document-chip.valid {
  background: #e7f4e8;
  border-color: #d7ead9;
}

.document-chip.warning {
  background: #fff5dd;
  border-color: #eee0b8;
}

.document-chip strong {
  color: var(--muted);
  font-size: 15px;
  font-weight: 750;
}

.document-chip span {
  color: #4c7d55;
  font-size: 15px;
  font-weight: 750;
}

.document-chip.warning span {
  color: #9b6a12;
}

.document-chip-expiry {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  margin-top: 2px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
  font-weight: 760;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.document-chip-expiry.is-near-expiry {
  color: #b93037;
}

.document-preview-dialog {
  width: min(100% - 32px, 1180px);
  height: min(100vh - 46px, 860px);
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: transparent;
}

.document-preview-dialog::backdrop {
  background: rgba(5, 5, 5, 0.78);
}

.document-preview-shell {
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  background: #151515;
  box-shadow: 0 40px 110px rgba(0, 0, 0, 0.45);
}

.document-preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.document-preview-toolbar .step-label {
  margin-bottom: 3px;
  color: rgba(255, 255, 255, 0.56);
  font-size: 12px;
  letter-spacing: 0.12em;
}

.document-preview-toolbar h2 {
  margin: 0;
  color: #ffffff;
  font-size: 20px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 720;
}

.document-preview-toolbar span {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 620;
}

.document-preview-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.document-preview-actions .secondary-button,
.document-preview-actions .invite-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.document-preview-actions .dialog-close {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.document-preview-frame-wrap {
  min-height: 0;
  padding: 18px;
}

.document-preview-frame-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 12px;
  background: #ffffff;
}

.legal-reference {
  margin: 0 0 30px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  font-weight: 560;
}

.detail-documents-section {
  display: grid;
  gap: 18px;
}

.detail-section-header.compact {
  margin-bottom: 0;
}

.detail-dropzone {
  min-height: 230px;
}

.document-list-card {
  border: 1px solid #eeeeec;
  border-radius: 16px;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(15, 15, 15, 0.03);
}

.document-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}

.document-list-header h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -0.035em;
  font-weight: 680;
}

.document-list-header span {
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
}

.document-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
}

.document-filter-bar button {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid #dededb;
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
}

.document-filter-bar button.active {
  border-color: var(--ink);
  background: var(--ink);
  color: #ffffff;
}

.documents-table {
  min-width: 780px;
}

.documents-table td:first-child {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.detail-summary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 18px;
}

.detail-card {
  padding: 24px;
  border: 1px solid #eeeeec;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 20px 60px rgba(15, 15, 15, 0.03);
}

.detail-card h2 {
  margin: 0 0 18px;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -0.035em;
  font-weight: 680;
}

.detail-card dl {
  display: grid;
  gap: 14px;
  margin: 0;
}

.detail-card dl div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 14px;
}

.detail-card dt {
  color: var(--muted);
  font-size: 14px;
  font-weight: 740;
}

.detail-card dd {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 620;
}

.risk-note {
  background: #fffdf7;
}

.risk-note p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.5;
  font-weight: 560;
}

.add-subcontractor-main {
  max-width: 1180px;
}

.back-link {
  display: inline-flex;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
}

.add-header {
  max-width: 760px;
  margin-bottom: 36px;
}

.add-header h1 {
  margin: 0 0 12px;
  font-size: clamp(42px, 5vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.055em;
  font-weight: 660;
}

.add-header p {
  margin: 0;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.45;
  font-weight: 520;
  letter-spacing: -0.02em;
}

.add-method-grid {
  display: grid;
  grid-template-columns: minmax(0, 760px);
  gap: 20px;
  align-items: start;
}

.add-method-card {
  padding: 30px;
  border: 1px solid #eeeeec;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 20px 60px rgba(15, 15, 15, 0.03);
}

.method-eyebrow {
  margin-bottom: 14px;
  color: #9a9aa0;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.add-method-card h2 {
  margin: 0 0 10px;
  font-size: 30px;
  line-height: 1.12;
  letter-spacing: -0.04em;
  font-weight: 630;
}

.add-method-card p {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.5;
  font-weight: 520;
}

.add-flow-card {
  width: min(100%, 760px);
  padding: 30px;
  border: 1px solid #eeeeec;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 20px 60px rgba(15, 15, 15, 0.03);
}

.channel-choice {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

.channel-choice legend {
  width: 100%;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.channel-choice label {
  cursor: pointer;
}

.channel-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.channel-choice span {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid #dededb;
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  font-size: 15px;
  font-weight: 750;
}

.channel-choice input:checked + span {
  border-color: var(--ink);
  background: var(--ink);
  color: #ffffff;
}

.large-dropzone {
  min-height: 420px;
}

.flow-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 30px;
}

.flow-actions .primary-action {
  margin-top: 0;
}

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

.method-form {
  display: grid;
  gap: 18px;
}

.method-form.compact {
  gap: 16px;
}

.profile-field label span {
  display: inline-flex;
  margin-left: 6px;
  color: #9a9aa0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.profile-field select,
.profile-field textarea {
  width: 100%;
  border: 1px solid #ededeb;
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-size: 17px;
  font-weight: 520;
  outline: none;
}

.profile-field select {
  height: 52px;
  padding: 0 14px;
}

.profile-field textarea {
  min-height: 96px;
  padding: 14px;
  resize: vertical;
}

.profile-field select:focus,
.profile-field textarea:focus {
  border-color: var(--focus);
  box-shadow: var(--focus-ring);
}

.method-submit {
  height: 56px;
  margin-top: 6px;
  font-size: 18px;
}

.dropzone-card {
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  padding: 34px;
  border: 2px dashed #d8d8d5;
  border-radius: 14px;
  background: #fdfdfc;
  text-align: center;
  cursor: pointer;
}

.dropzone-card:focus {
  outline: none;
  border-color: var(--focus);
  box-shadow: var(--focus-ring);
}

.upload-arrow {
  color: #8d8d92;
  font-size: 48px;
  line-height: 1;
  font-weight: 800;
}

.dropzone-card strong {
  color: var(--ink);
  font-size: 22px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.dropzone-card span {
  max-width: 360px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
  font-weight: 520;
}

.wide-button {
  width: 100%;
}

@media (max-width: 1120px) {
  .plan-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .plan-option {
    min-height: 330px;
  }
}

@media (max-width: 760px) {
  .toc-item {
    grid-template-columns: minmax(190px, 1fr) auto;
  }

  .toc-item p {
    grid-column: 1 / -1;
  }
}

@media (max-width: 980px) {
  .entry-shell {
    grid-template-columns: 1fr;
  }

  .entry-form-panel {
    min-height: auto;
    padding: 48px 24px 56px;
  }

  .brand {
    margin-bottom: 46px;
  }

  .value-panel {
    min-height: auto;
    border-bottom-left-radius: 0;
  }

  .value-inner {
    padding: 56px 24px 64px;
  }

}

@media (max-width: 560px) {
  .toc-shell {
    width: min(100% - 28px, 1180px);
    padding: 28px 0 48px;
  }

  .toc-page .brand {
    margin-bottom: 34px;
  }

  .toc-header h1 {
    font-size: 44px;
  }

  .toc-header p {
    font-size: 16px;
  }

  .toc-legend {
    margin-bottom: 22px;
  }

  .toc-legend span {
    width: 100%;
    align-items: flex-start;
    min-height: auto;
    padding: 10px 12px;
  }

  .toc-section {
    padding: 18px;
  }

  .toc-section-heading {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .toc-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .toc-item {
    grid-template-columns: 1fr;
    gap: 8px;
    min-height: auto;
  }

  .toc-badge {
    margin-left: 0;
  }

  .entry-form-panel {
    padding: 32px 18px 44px;
  }

  .intro h1 {
    font-size: 40px;
  }

  .intro p,
  .value-lead {
    font-size: 18px;
  }

  .field label,
  .login-copy,
  .value-footer {
    font-size: 16px;
  }

  .field input {
    height: 54px;
    font-size: 18px;
  }

  .email-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .field-help {
    font-size: 14px;
  }

  .primary-action {
    height: 60px;
    font-size: 19px;
  }

  .value-inner h2 {
    font-size: 34px;
  }

  .promise-list {
    margin: 42px 0 48px;
  }

  .promise-list li {
    align-items: flex-start;
    font-size: 16px;
  }

  .simple-header {
    padding: 0 20px;
  }

  .profile-shell {
    width: min(100% - 28px, 860px);
    padding-top: 34px;
  }

  .plan-context {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .plan-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .plan-option {
    min-height: auto;
  }

  .plan-topline {
    min-height: auto;
  }

  .plan-actions {
    gap: 12px;
  }

  .extract-hub-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .extract-hub-card {
    min-height: auto;
  }

  .profile-card {
    padding: 22px;
  }

  .profile-grid,
  .logo-section {
    grid-template-columns: 1fr;
  }

  .profile-field input {
    font-size: 17px;
  }

  .profile-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .profile-submit {
    width: 100%;
  }

  .later-link {
    text-align: center;
  }

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

  .dashboard-sidebar {
    min-height: auto;
    padding: 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .dashboard-brand {
    margin-bottom: 18px;
    padding-bottom: 16px;
  }

  .dashboard-nav {
    grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  }

  .dashboard-nav a {
    justify-content: center;
    min-height: 42px;
    padding: 0 8px;
    font-size: 12px;
  }

  .nav-icon {
    display: none;
  }

  .dashboard-main {
    padding: 32px 18px 56px;
  }

  .dashboard-header {
    flex-direction: column;
    margin-bottom: 28px;
  }

  .invite-button {
    width: 100%;
  }

  .admin-message-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .template-panel {
    padding: 20px;
  }

  .template-panel-header {
    align-items: stretch;
    flex-direction: column;
  }

  .template-state-row,
  .template-action-row {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-kpis {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 28px;
  }

  .dashboard-kpi {
    min-height: 96px;
  }

  .table-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-search {
    width: 100%;
  }

  .add-method-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .add-method-card {
    padding: 22px;
  }

  .add-flow-card {
    width: 100%;
    padding: 22px;
  }

  .flow-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .summary-edit-grid {
    grid-template-columns: 1fr;
  }

  .detail-header,
  .detail-alert,
  .detail-section-header,
  .upload-review-header {
    align-items: stretch;
    flex-direction: column;
  }

  .upload-review-panel {
    padding: 18px;
  }

  .upload-review-main {
    grid-template-columns: 1fr;
  }

  .compact-extraction span {
    white-space: normal;
  }

  .global-review-check {
    justify-content: flex-start;
    white-space: normal;
  }

  .upload-review-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .score-badge {
    width: 100%;
  }

  .document-chip-grid,
  .detail-summary-grid,
  .admin-tool-grid {
    grid-template-columns: 1fr;
  }

  .document-preview-dialog {
    width: 100%;
    height: 100%;
    max-height: none;
    margin: 0;
    border-radius: 0;
  }

  .document-preview-shell {
    border-radius: 0;
  }

  .document-preview-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .document-preview-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .detail-card dl div,
  .extraction-list div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .extraction-card-header {
    flex-direction: column;
  }
}
