
@font-face {
  font-family: "Figtree";
  src: url("/fonts/figtree/Figtree[wght].ttf") format("truetype");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Figtree";
  src: url("/fonts/figtree/Figtree-Italic[wght].ttf") format("truetype");
  font-weight: 300 900;
  font-style: italic;
  font-display: swap;
}


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

[hidden] {
  display: none !important;
}

@font-face {
  font-family: "Reglo";
  src: url("/fonts/Reglo-Bold.otf") format("opentype");
  font-weight: 100 900;
}


:root {

  --plum-50: #FAF5FF;
  --plum-100: #F3E8FF;
  --plum-200: #E9D5FF;
  --plum-300: #D4B0F8;
  --plum-400: #B07DDC;
  --plum-500: #9333EA;
  --plum-600: #7E22CE;
  --plum-700: #6B21A8;
  --plum-800: #581C87;
  --plum-900: #3B0764;
  --plum-950: #1A0038;


  --grey-50: #FAF9FB;
  --grey-100: #EDE8F8;
  --grey-200: #D4CCE4;
  --grey-300: #BDB3CC;
  --grey-400: #B0A8BC;
  --grey-500: #9A90A8;
  --grey-600: #7C6B8A;
  --grey-700: #5C4E6A;
  --grey-800: #3D2F4A;
  --grey-900: #281A36;
  --grey-950: #160E1E;


  --green-50: #F0FDF4;
  --green-100: #DCFCE7;
  --green-200: #bbf7d0;
  --green-600: #16A34A;
  --green-700: #15803D;
  --green-800: #15803D;
  --amber-50: #FFFBEB;
  --amber-100: #FEF3C7;
  --amber-200: #FDE68A;
  --amber-500: #F59E0B;
  --amber-600: #D97706;
  --amber-800: #92400E;
  --red-50: #FEF2F2;
  --red-100: #FEE2E2;
  --red-200: #FECACA;
  --red-500: #EF4444;
  --red-600: #DC2626;
  --red-700: #B91C1C;
  --red-800: #991B1B;


  --surface-page: var(--grey-50);
  --surface-card: #FFFFFF;
  --surface-elevated: #FFFFFF;
  --surface-subtle: var(--grey-50);
  --surface-muted: var(--grey-100);
  --surface-input: #FFFFFF;
  --surface-overlay: rgba(255, 255, 255, 0.96);
  --surface-brand: var(--plum-500);
  --surface-brand-tint: var(--plum-100);
  --surface-hover: var(--grey-100);
  --surface-selected: var(--plum-50);
  --surface-selected-strong: var(--plum-100);
  --surface-disabled: var(--grey-100);
  --surface-code: var(--grey-950);
  --text-primary: var(--grey-950);
  --text-secondary: var(--grey-700);
  --text-tertiary: var(--grey-400);
  --text-inverse: #FFFFFF;
  --text-on-brand: #FFFFFF;
  --text-brand: var(--plum-500);
  --text-brand-strong: var(--plum-700);
  --text-selected: var(--plum-800);
  --text-disabled: var(--grey-500);
  --text-on-functional: var(--grey-950);
  --border-default: var(--grey-200);
  --border-strong: var(--grey-300);
  --border-muted: var(--grey-100);
  --border-brand: var(--plum-500);
  --border-brand-subtle: var(--plum-200);
  --border-selected: var(--plum-500);
  --interactive-primary: var(--plum-500);
  --interactive-primary-hover: var(--plum-600);
  --interactive-primary-active: var(--plum-700);
  --interactive-focus-ring: var(--plum-500);
  --interactive-focus-shadow: 0 0 0 3px var(--plum-200);
  --interactive-hover-surface: var(--grey-100);
  --interactive-selected-surface: var(--surface-selected);
  --interactive-selected-text: var(--text-selected);
  --interactive-selected-border: var(--border-selected);
  --success-surface: var(--green-50);
  --success-border: var(--green-200);
  --success-text: var(--green-800);
  --warning-surface: var(--amber-50);
  --warning-border: var(--amber-200);
  --warning-text: var(--amber-800);
  --danger-surface: var(--red-50);
  --danger-border: var(--red-200);
  --danger-text: var(--red-800);
  --danger-action: var(--red-600);
  --info-surface: var(--plum-50);
  --info-border: var(--plum-200);
  --info-text: var(--plum-700);


  --color-plum-50: var(--plum-50);
  --color-plum-100: var(--plum-100);
  --color-plum-200: var(--plum-200);
  --color-plum-300: var(--plum-300);
  --color-plum-400: var(--plum-400);
  --color-plum-500: var(--plum-500);
  --color-plum-600: var(--plum-600);
  --color-plum-700: var(--plum-700);
  --color-plum-800: var(--plum-800);
  --color-plum-900: var(--plum-900);
  --color-plum-950: var(--plum-950);
  --color-grey-50: var(--grey-50);
  --color-grey-100: var(--grey-100);
  --color-grey-200: var(--grey-200);
  --color-grey-300: var(--grey-300);
  --color-grey-400: var(--grey-400);
  --color-grey-500: var(--grey-500);
  --color-grey-600: var(--grey-600);
  --color-grey-700: var(--grey-700);
  --color-grey-800: var(--grey-800);
  --color-grey-900: var(--grey-900);
  --color-grey-950: var(--grey-950);
  --color-green-100: var(--green-100);
  --color-green-600: var(--green-600);
  --color-green-800: var(--green-800);
  --color-amber-100: var(--amber-100);
  --color-amber-600: var(--amber-600);
  --color-amber-800: var(--amber-800);
  --color-red-100: var(--red-100);
  --color-red-600: var(--red-600);
  --color-red-800: var(--red-800);

  --color-bg: var(--surface-page);
  --color-surface: var(--grey-100);
  --color-surface-2: var(--grey-200);
  --color-border: var(--border-default);
  --color-border-focus: var(--plum-500);
  --color-text: var(--text-primary);
  --color-text-muted: var(--text-secondary);
  --color-text-light: var(--text-tertiary);
  --color-accent: var(--plum-500);
  --color-accent-hover: var(--plum-600);
  --color-accent-light: var(--plum-100);
  --color-success: var(--green-600);
  --color-success-bg: var(--success-surface);
  --color-error: var(--red-600);
  --color-error-bg: var(--danger-surface);
  --color-warning: var(--amber-600);
  --color-warning-bg: var(--warning-surface);
  --color-info-bg: var(--info-surface);


  --font-heading: 'Reglo', sans-serif;
  --font-body: 'Figtree', sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Fira Mono', monospace;


  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 28px;


  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-card: 0 2px 14px rgba(26, 0, 56, 0.07);
  --shadow-modal: 0 12px 48px rgba(26, 0, 56, 0.16);
  --shadow-mobile-bar: 0 -10px 28px rgba(22, 14, 30, 0.12);


  --header-height: 58px;
  --pub-nav-height: 64px;
  --pub-nav-gap: 16px;
  --bottom-nav-h: 64px;
  --content-max-w: 580px;
  --public-content-max-w: 1120px;
  --public-content-gutter: 24px;
}

@media (min-width: 480px) and (max-width: 767px) {
  :root {
    --public-content-gutter: 18px;
  }
}

@media (max-width: 479px) {
  :root {
    --public-content-gutter: 14px;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --surface-page: var(--plum-950);
    --surface-card: var(--grey-900);
    --surface-elevated: var(--grey-800);
    --surface-subtle: var(--grey-950);
    --surface-muted: var(--grey-800);
    --surface-input: var(--grey-950);
    --surface-overlay: rgba(40, 26, 54, 0.96);
    --surface-brand: var(--plum-500);
    --surface-brand-tint: var(--plum-900);
    --surface-hover: var(--grey-800);
    --surface-selected: var(--plum-900);
    --surface-selected-strong: var(--grey-800);
    --surface-disabled: var(--grey-900);
    --surface-code: var(--grey-950);
    --text-primary: var(--grey-50);
    --text-secondary: var(--grey-200);
    --text-tertiary: var(--grey-400);
    --text-inverse: var(--grey-50);
    --text-on-brand: var(--grey-50);
    --text-brand: var(--plum-300);
    --text-brand-strong: var(--plum-100);
    --text-selected: var(--plum-100);
    --text-disabled: var(--grey-500);
    --text-on-functional: var(--grey-50);
    --border-default: var(--grey-800);
    --border-strong: var(--grey-700);
    --border-muted: var(--grey-900);
    --border-brand: var(--plum-300);
    --border-brand-subtle: var(--plum-800);
    --border-selected: var(--plum-300);
    --interactive-primary: var(--plum-500);
    --interactive-primary-hover: var(--plum-400);
    --interactive-primary-active: var(--plum-300);
    --interactive-focus-ring: var(--plum-300);
    --interactive-focus-shadow: 0 0 0 3px var(--plum-900);
    --interactive-hover-surface: var(--grey-800);
    --interactive-selected-surface: var(--surface-selected);
    --interactive-selected-text: var(--text-selected);
    --interactive-selected-border: var(--border-selected);
    --success-surface: var(--grey-900);
    --success-border: var(--green-600);
    --success-text: var(--green-100);
    --warning-surface: var(--grey-900);
    --warning-border: var(--amber-600);
    --warning-text: var(--amber-100);
    --danger-surface: var(--grey-900);
    --danger-border: var(--red-600);
    --danger-text: var(--red-100);
    --danger-action: var(--red-600);
    --info-surface: var(--plum-900);
    --info-border: var(--plum-300);
    --info-text: var(--plum-100);
    --color-bg: var(--surface-page);
    --color-surface: var(--surface-muted);
    --color-surface-2: var(--surface-elevated);
    --color-border: var(--border-default);
    --color-text: var(--text-primary);
    --color-text-muted: var(--text-secondary);
    --color-text-light: var(--text-tertiary);
    --color-accent-light: var(--info-surface);
    --color-success-bg: var(--success-surface);
    --color-error-bg: var(--danger-surface);
    --color-warning-bg: var(--warning-surface);
    --color-info-bg: var(--info-surface);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.24);
    --shadow-card: 0 14px 32px rgba(0, 0, 0, 0.24);
    --shadow-modal: 0 24px 58px rgba(0, 0, 0, 0.42);
    --shadow-mobile-bar: 0 -12px 30px rgba(0, 0, 0, 0.34);
  }
}


html {
  -webkit-text-size-adjust: 100%;
  color-scheme: light;
  scroll-behavior: smooth;
}

@media (prefers-color-scheme: dark) {
  html {
    color-scheme: dark;
  }
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--surface-page);
  min-height: 100vh;
}


h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
}

h1 {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.018em;
}

h2 {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.012em;
}

h3 {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
}

h4 {
  font-size: 15px;
  font-weight: 600;
}

p {
  margin-bottom: 12px;
  font-family: var(--font-body);
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--text-brand);
  text-decoration: none;
}

a:hover {
  color: var(--text-brand-strong);
}

small {
  font-size: 13px;
  color: var(--text-secondary);
  font-family: var(--font-body);
}

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

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

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

.text-right {
  text-align: right;
}

.text-sm {
  font-size: 14px;
}

.text-xs {
  font-size: 12px;
}

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

.text-error {
  color: var(--danger-text);
}

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


.account-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface-brand);
  color: var(--text-on-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
}


.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav-h);
  background: var(--surface-overlay);
  border-top: 1px solid var(--border-default);
  z-index: 220;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 6px 12px calc(6px + env(safe-area-inset-bottom, 0px));
  box-shadow: var(--shadow-mobile-bar);
  backdrop-filter: blur(14px);
}

.mobile-bottom-nav__group {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: clamp(4px, 2vw, 12px);
  min-width: 0;
}

.mobile-bottom-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: min(24vw, 88px);
  min-width: 64px;
  min-height: 48px;
  padding: 5px 6px;
  border-radius: 12px;
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.1;
  color: var(--text-tertiary);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: background 0.12s, color 0.12s, transform 0.12s;
  -webkit-tap-highlight-color: transparent;
}

.mobile-bottom-nav__item:hover,
.mobile-bottom-nav__item.active {
  background: var(--info-surface);
  color: var(--info-text);
}

.mobile-bottom-nav__create {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--surface-brand);
  color: var(--text-on-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  flex-shrink: 0;
  box-shadow: 0 8px 20px rgba(147, 51, 234, 0.24);
  transform: translateY(-10px);
  transition: background 0.12s, transform 0.12s;
  -webkit-tap-highlight-color: transparent;
}

.mobile-bottom-nav__create:hover,
.mobile-bottom-nav__create.active {
  background: var(--interactive-primary-hover);
  color: var(--text-on-brand);
}

.mobile-bottom-nav__item:active {
  transform: translateY(1px);
}

.mobile-bottom-nav__create:active {
  transform: translateY(-10px) translateY(1px);
}


.pub-shell {
  --pub-canvas-background: var(--surface-page);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--pub-canvas-background);
  background-attachment: fixed;
}

.nav-mode-marketing .pub-shell {
  --pub-canvas-background:
    radial-gradient(circle at 82% 2%, color-mix(in srgb, var(--surface-brand-tint) 62%, transparent) 0, transparent 34rem),
    var(--surface-page);
}

.pub-nav {
  height: var(--pub-nav-height);
  min-height: var(--pub-nav-height);
  background: var(--pub-canvas-background);
  background-attachment: fixed;
  width: min(calc(100% - (var(--public-content-gutter) * 2)), var(--public-content-max-w));
  margin-inline: auto;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.nav-mode-focused_wizard .pub-nav,
.nav-mode-focused_complete .pub-nav,
.nav-mode-focused_wizard .product-home__footer,
.nav-mode-focused_complete .product-home__footer {
  width: min(calc(100% - (var(--public-content-gutter) * 2)), var(--content-max-w));
}

.pub-nav-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.pub-nav-links {
  display: flex;
  align-items: center;
  gap: var(--pub-nav-gap);
}

.pub-nav-mobile-actions {
  display: none;
  align-items: center;
  gap: var(--pub-nav-gap);
}

.mobile-menu {
  position: relative;
}

.mobile-menu[open] .mobile-menu-trigger {
  background: var(--interactive-selected-surface);
  color: var(--text-primary);
}

.mobile-menu-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  line-height: 1;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border-default);
  border-radius: 999px;
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.mobile-menu-trigger svg {
  display: block;
  flex-shrink: 0;
}

.mobile-menu-trigger::marker {
  display: none;
}

.mobile-menu-trigger::-webkit-details-marker {
  display: none;
}

.mobile-menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 360;
  width: min(280px, calc(100vw - 32px));
  padding: 8px;
  border: 1px solid var(--border-default);
  border-radius: 14px;
  background: var(--surface-elevated);
  box-shadow: var(--shadow-modal);
}

.mobile-menu-account {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px 8px 12px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--border-default);
}

.mobile-menu-account-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.mobile-menu-account-copy strong,
.mobile-menu-account-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-menu-account-copy strong {
  font-family: var(--font-heading);
  font-size: 13px;
  color: var(--text-primary);
}

.mobile-menu-account-copy span {
  font-size: 12px;
  color: var(--text-tertiary);
}

.mobile-menu-link {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.mobile-menu-link:hover,
.mobile-menu-link:focus-visible {
  background: transparent;
  color: var(--text-brand-strong);
}

.mobile-menu-link.active {
  color: var(--text-brand-strong);
  text-decoration: underline;
  text-decoration-color: var(--text-brand);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.mobile-menu-logout {
  margin: 6px 0 0;
  padding-top: 6px;
  border-top: 1px solid var(--border-default);
}

.mobile-menu-link--button {
  color: var(--red-600);
}

.pub-nav-link {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 8px 0;
  transition: color 0.12s;
}

.pub-nav-link:hover,
.pub-nav-link:focus-visible {
  color: var(--text-brand-strong);
}

.pub-nav-link.active {
  color: var(--text-brand-strong);
  text-decoration: underline;
  text-decoration-color: var(--text-brand);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

.pub-nav-control {
  appearance: none;
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.12s;
}

.pub-nav-control:hover,
.pub-nav-control:focus-visible {
  color: var(--text-brand-strong);
}

.pub-nav-account {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pub-nav-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: color 0.12s, background 0.12s;
}

.pub-nav-logout:hover,
.pub-nav-logout:focus-visible {
  background: var(--interactive-hover-surface);
  color: var(--text-primary);
}

.pub-content {
  flex: 1;
  padding: 40px 28px;
  width: 100%;
  max-width: calc(var(--content-max-w) + 56px);
  margin: 0 auto;
}

.pub-content--public-bounds {
  width: min(calc(100% - (var(--public-content-gutter) * 2)), var(--public-content-max-w));
  max-width: none;
  padding-inline: 0;
}

.pub-content--wide {
  max-width: 920px;
}

.pub-footer {
  padding: 16px 28px;
  border-top: 1px solid var(--border-default);
  text-align: center;
  font-size: 12px;
  font-family: var(--font-body);
  color: var(--text-secondary);
}

.pub-footer a {
  color: var(--text-secondary);
  text-decoration: underline;
}

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

.product-home__footer {
  display: flex;
  width: min(calc(100% - (var(--public-content-gutter) * 2)), var(--public-content-max-w));
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin: auto auto 0;
  padding: 28px 0 34px;
  border-top: 1px solid var(--border-default);
  color: var(--text-tertiary);
  font-size: 13px;
}

.product-home__footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
}

.product-home__footer a {
  color: var(--text-secondary);
  text-decoration: none;
}

.product-home__footer a:hover,
.product-home__footer a:focus-visible {
  color: var(--text-primary);
  text-decoration: underline;
}

.product-home__footer p {
  flex: 0 0 auto;
  margin: 0;
}

@media (min-width: 768px) and (max-width: 1023px) {
  .product-home__footer {
    align-items: flex-start;
    flex-direction: column;
    padding-bottom: 28px;
  }
}


.docs-layout {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 36px 28px 64px;
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(0, 1fr) minmax(150px, 190px);
  gap: 36px;
}

.docs-sidebar,
.docs-toc {
  position: sticky;
  top: calc(var(--header-height) + 24px);
  align-self: start;
}

.docs-sidebar {
  border-right: 1px solid var(--border-default);
  padding-right: 20px;
}

@media (min-width: 981px) {
  .docs-sidebar {
    max-height: calc(100vh - var(--header-height) - 48px);
    overflow-y: auto;
  }
}

.docs-sidebar-home,
.docs-nav-link,
.docs-toc-link {
  display: block;
  text-decoration: none;
  border-radius: 8px;
}

.docs-sidebar-home {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  padding: 8px 10px;
  margin-bottom: 18px;
}

.docs-sidebar-home:hover,
.docs-sidebar-home.active {
  color: var(--text-primary);
  background: var(--interactive-hover-surface);
}

.docs-nav-section + .docs-nav-section {
  margin-top: 22px;
}

.docs-nav-heading {
  font-family: var(--font-body);
  font-size: 11px;
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin: 0 0 8px;
}

.docs-nav-link {
  font-size: 14px;
  line-height: 1.35;
  color: var(--text-secondary);
  padding: 7px 10px;
}

.docs-nav-link:hover,
.docs-nav-link.active {
  color: var(--text-primary);
  background: var(--interactive-hover-surface);
}

.docs-main {
  min-width: 0;
  max-width: 760px;
}

.docs-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: var(--text-tertiary);
  margin-bottom: 24px;
}

.docs-breadcrumb a {
  color: var(--text-secondary);
}

.docs-header {
  border-bottom: 1px solid var(--border-default);
  padding-bottom: 28px;
  margin-bottom: 28px;
}

.docs-header h1 {
  font-size: 40px;
  line-height: 1.05;
  letter-spacing: 0;
  margin: 0 0 14px;
}

.docs-header p {
  max-width: 650px;
  font-size: 18px;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0;
}

.docs-meta-row,
.docs-audience-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.docs-meta-row {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 14px;
}

.docs-audience-list {
  margin-top: 18px;
}

.docs-audience-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid var(--border-default);
  background: var(--surface-card);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
}

.docs-prose {
  font-size: 16px;
  line-height: 1.72;
  color: var(--text-primary);
}

.docs-prose h2,
.docs-prose h3 {
  scroll-margin-top: calc(var(--header-height) + 24px);
  letter-spacing: 0;
}

.docs-prose h2 {
  font-size: 24px;
  line-height: 1.25;
  margin: 34px 0 12px;
}

.docs-prose h3 {
  font-size: 18px;
  margin: 26px 0 10px;
}

.docs-prose p,
.docs-prose ul,
.docs-prose ol,
.docs-prose pre,
.docs-prose blockquote,
.docs-prose table {
  margin: 0 0 18px;
}

.docs-prose ul,
.docs-prose ol {
  padding-left: 24px;
}

.docs-prose li + li {
  margin-top: 6px;
}

.docs-prose code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--surface-muted);
  border: 1px solid var(--border-default);
  border-radius: 6px;
  padding: 1px 5px;
}

.docs-prose pre {
  overflow-x: hidden;
  background: var(--surface-code);
  color: var(--text-inverse);
  border-radius: 8px;
  padding: 16px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.docs-prose pre code {
  background: transparent;
  border: 0;
  padding: 0;
  white-space: inherit;
}

.docs-code-block {
  position: relative;
  margin: 0 0 18px;
  font-size:14px;
}

.docs-prose .docs-code-block pre {
  margin: 0;
}

.docs-copy-code-button {
  position: absolute;
  z-index: 1;
  top: 9px;
  right: 9px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--text-inverse) 24%, transparent);
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface-code) 82%, var(--text-inverse));
  color: var(--text-inverse);
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.docs-copy-code-button:hover {
  border-color: color-mix(in srgb, var(--text-inverse) 48%, transparent);
  background: color-mix(in srgb, var(--surface-code) 70%, var(--text-inverse));
}

.docs-copy-code-button:focus-visible {
  outline: 2px solid var(--text-inverse);
  outline-offset: 2px;
}

.docs-copy-code-button:active {
  transform: scale(0.97);
}

.docs-copy-code-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.docs-copy-code-button.is-copied {
  border-color: color-mix(in srgb, var(--text-brand) 60%, var(--text-inverse));
  background: color-mix(in srgb, var(--text-brand) 28%, var(--surface-code));
}

.docs-copy-code-button.is-copied .docs-copy-page-icon--copy {
  display: none;
}

.docs-copy-code-button.is-copied .docs-copy-page-icon--copied {
  display: block;
}

.docs-prose blockquote {
  border-left: 3px solid var(--plum-300);
  padding-left: 16px;
  color: var(--text-secondary);
}

.docs-prose a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.docs-related {
  border-top: 1px solid var(--border-default);
  margin-top: 42px;
  padding-top: 24px;
}

.docs-related h2 {
  font-size: 18px;
  margin: 0 0 14px;
  letter-spacing: 0;
}

.docs-related-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.docs-related-link {
  min-height: 108px;
  border: 1px solid var(--border-default);
  border-radius: 8px;
  padding: 14px;
  color: var(--text-primary);
  background: var(--surface-card);
}

.docs-related-link:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.docs-related-link span,
.docs-related-link small {
  display: block;
}

.docs-related-link span {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 8px;
}

.docs-related-link small {
  font-size: 13px;
  line-height: 1.45;
}

.docs-toc {
  border-left: 1px solid var(--border-default);
  padding-left: 18px;
}

.docs-toc h2 {
  font-family: var(--font-body);
  font-size: 11px;
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin: 0 0 10px;
}

.docs-toc-link {
  font-size: 13px;
  line-height: 1.35;
  color: var(--text-secondary);
  padding: 6px 0;
}

.docs-toc-link:hover {
  color: var(--text-primary);
}

.docs-toc-link--level-3 {
  padding-left: 12px;
}

.docs-copy-page {
  margin-top: 20px;
}

.docs-copy-page-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 6px 9px;
  border: 1px solid var(--border-default);
  border-radius: 8px;
  background: var(--surface-card);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.docs-copy-page-button:hover {
  border-color: var(--border-strong);
  background: var(--interactive-hover-surface);
}

.docs-copy-page-button:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--text-brand) 55%, transparent);
  outline-offset: 2px;
}

.docs-copy-page-button:active {
  transform: scale(0.97);
}

.docs-copy-page-button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.docs-copy-page-button.is-copied {
  border-color: color-mix(in srgb, var(--text-brand) 42%, var(--border-default));
  background: color-mix(in srgb, var(--text-brand) 10%, var(--surface-card));
  color: var(--text-brand);
}

.docs-copy-page-icon--copied {
  display: none;
}

.docs-copy-page-button.is-copied .docs-copy-page-icon--copy {
  display: none;
}

.docs-copy-page-button.is-copied .docs-copy-page-icon--copied {
  display: block;
}

.docs-copy-page-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (max-width: 980px) {
  .docs-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
  }

  .docs-sidebar,
  .docs-toc {
    position: static;
    border: 0;
    padding: 0;
  }

  .docs-sidebar {
    border-bottom: 1px solid var(--border-default);
    padding-bottom: 18px;
  }

  .docs-toc nav,
  .docs-toc h2 {
    display: none;
  }

  .docs-copy-page {
    margin-top: 0;
  }
}

@media (max-width: 640px) {
  .docs-layout {
    padding: 24px 18px 48px;
  }

  .docs-header h1 {
    font-size: 31px;
  }

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

  .docs-related-list {
    grid-template-columns: 1fr;
  }
}

.records-page {
  width: 100%;
  min-width: 0;
}

.records-page-header {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 20px 28px;
  margin-bottom: 28px;
}

.records-page-heading {
  flex: 1 1 240px;
  min-width: 0;
}

.records-page-heading h1,
.records-empty-state h1 {
  margin: 0;
  font-family: var(--font-body);
  font-size: 28px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.018em;
  color: var(--text-primary);
}

.records-result-count {
  margin-top: 5px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-tertiary);
}

.records-search {
  position: relative;
  display: block;
  flex: 1 1 300px;
  min-width: min(300px, 100%);
  max-width: 380px;
  color: var(--text-tertiary);
}

.records-search__icon {
  position: absolute;
  top: 50%;
  left: 14px;
  pointer-events: none;
  transform: translateY(-50%);
}

.records-search .visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  border: 0 !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
}

.records-search input {
  display: block;
  width: 100%;
  height: 42px;
  padding: 0 14px 0 42px;
  border: 1px solid var(--border-default);
  border-radius: 10px;
  outline: none;
  background: var(--surface-input);
  color: var(--text-primary);
  font: 600 13px/1.4 var(--font-body);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.records-search input::placeholder {
  color: var(--text-tertiary);
  opacity: 1;
}

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

.records-filters {
  display: flex;
  flex: 1 0 100%;
  flex-wrap: wrap;
  gap: 8px;
}

.records-filter {
  min-height: 34px;
  padding: 6px 13px;
  border: 1px solid var(--border-default);
  border-radius: 999px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font: 600 12px/1.2 var(--font-body);
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.records-filter:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.records-filter--active {
  border-color: var(--interactive-primary);
  background: var(--interactive-primary);
  color: var(--text-on-brand);
}

.records-filter--active:hover {
  border-color: var(--interactive-primary-hover);
  background: var(--interactive-primary-hover);
  color: var(--text-on-brand);
}

.records-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(360px, 100%), 1fr));
  gap: 20px;
  min-width: 0;
}

.records-card {
  display: flex;
  position: relative;
  min-width: 0;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  border: 1px solid var(--border-default);
  border-radius: 20px;
  background: var(--surface-card);
  box-shadow: var(--shadow-sm);
  color: var(--text-primary);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.records-card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 6px 20px -8px rgba(147, 51, 234, 0.28);
  transform: translateY(-1px);
}

.records-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.records-record-identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.records-identicon,
.records-type-icon {
  display: grid;
  width: 56px;
  height: 40px;
  flex: 0 0 56px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--border-default);
  border-radius: 8px;
  background: var(--surface-muted);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
}

.records-identicon {
  object-fit: cover;
}

.records-type-icon--draft {
  border-color: var(--border-strong);
  background: var(--surface-subtle);
  color: var(--text-tertiary);
}

.records-card-title-group {
  min-width: 0;
}

.records-card-title {
  max-width: 230px;
  overflow: hidden;
  margin: 0;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.records-card-reference {
  margin-top: 3px;
  color: var(--text-tertiary);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.035em;
  line-height: 1.3;
  white-space: nowrap;
}

.records-status-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 26px;
  padding: 5px 11px;
  border: 0;
  border-radius: 999px;
  color: var(--text-on-brand);
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.055em;
  line-height: 1.1;
  text-transform: uppercase;
  white-space: nowrap;
}

.records-status-badge--success {
  background: var(--green-600);
}

.records-status-badge--warning {
  background: var(--amber-600);
}

.records-status-badge--danger {
  background: var(--red-600);
}

.records-status-badge--neutral {
  background: var(--grey-600);
}

.records-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 25px;
}

.records-chip {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 5px 9px;
  border-radius: 8px;
  background: var(--surface-muted);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.2;
}

.records-notarization {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 4px;
  overflow: hidden;
  margin: 0;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 11.5px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.records-notarization strong {
  flex: 0 0 auto;
  color: var(--text-primary);
  font-weight: 800;
}

.records-notarization__hash {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.records-lifecycle {
  display: flex;
  width: 100%;
  align-items: flex-start;
  list-style: none;
}

.records-lifecycle__step {
  display: flex;
  min-width: 0;
  flex: 1 1 0;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.records-lifecycle__node {
  display: block;
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 50%;
}

.records-lifecycle__step--done .records-lifecycle__node,
.records-lifecycle__line--done {
  background: var(--green-600);
}

.records-lifecycle__step--current .records-lifecycle__node,
.records-lifecycle__line--current {
  background: var(--amber-600);
}

.records-lifecycle__step--halted .records-lifecycle__node,
.records-lifecycle__line--halted {
  background: var(--red-600);
}

.records-lifecycle__step--pending .records-lifecycle__node,
.records-lifecycle__line--pending {
  background: var(--grey-400);
}

.records-lifecycle__line {
  height: 2px;
  flex: 1 1 12px;
  margin: 4px 4px 0;
  opacity: 0.35;
}

.records-lifecycle__label {
  overflow: hidden;
  max-width: 100%;
  color: var(--text-tertiary);
  font-family: var(--font-body);
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.records-lifecycle__step--done .records-lifecycle__label {
  color: var(--text-secondary);
}

.records-lifecycle__step--current .records-lifecycle__label {
  color: var(--warning-text);
}

.records-lifecycle__step--halted .records-lifecycle__label {
  color: var(--danger-text);
}

.records-progress {
  margin: 0;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

.records-progress--danger {
  color: var(--danger-action);
  font-weight: 800;
}

.records-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border-muted);
  color: var(--text-tertiary);
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.3;
}

.records-card-footer time {
  white-space: nowrap;
}

.records-card > * {
  pointer-events: none;
}

.records-card-footer a {
  pointer-events: auto;
  overflow: visible;
}

.records-card-footer a::before {
  position: absolute;
  z-index: 1;
  inset: 0;
  content: "";
}

.records-card-action {
  min-width: 0;
  overflow: hidden;
  color: var(--text-brand-strong);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  text-decoration: none;
  white-space: nowrap;
}

.records-card-action:hover {
  color: var(--interactive-primary-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.records-card-action:focus-visible,
.records-filter:focus-visible {
  outline: 2px solid var(--interactive-focus-ring);
  outline-offset: 2px;
}

.records-card-action--primary {
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--interactive-primary);
  color: var(--text-on-brand);
  text-decoration: none;
}

.records-card-action--primary:hover {
  background: var(--interactive-primary-hover);
  color: var(--text-on-brand);
  text-decoration: none;
}

.records-card--draft {
  border-style: dashed;
  background: var(--surface-subtle);
}

.records-card--draft:hover {
  border-style: dashed;
}

.records-filter-empty,
.records-empty-state {
  border: 1px dashed var(--border-strong);
  border-radius: 20px;
  background: var(--surface-card);
  text-align: center;
}

.records-filter-empty {
  padding: 28px 20px;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
}

.records-empty-state {
  max-width: 560px;
  margin: 24px auto 0;
  padding: 56px 24px;
}

.records-empty-placeholder {
  display: block;
  width: 32px;
  height: 32px;
  margin: 0 auto 18px;
  border: 1px solid var(--border-default);
  border-radius: 8px;
  background: repeating-linear-gradient(135deg, var(--surface-muted) 0 5px, var(--border-default) 5px 10px);
}

.records-empty-state h1 {
  font-size: 20px;
}

.records-empty-state p {
  margin: 8px 0 24px;
  color: var(--text-tertiary);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
}

.records-load-more {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

.records-page .btn {
  font-family: var(--font-body);
  font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
  .records-card,
  .records-filter,
  .records-search input {
    transition: none;
  }
}


.company-content-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--surface-page);
}

.company-content-page > .product-home__footer {
  width: min(calc(100% - (var(--public-content-gutter) * 2)), 760px);
}

.company-content-topbar,
.company-content-shell {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding-left: 28px;
  padding-right: 28px;
}

.company-content-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 28px;
  padding-bottom: 28px;
}

.company-content-logo {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.company-content-logo img {
  display: block;
  width: auto;
  max-width: 170px;
  height: 32px;
}

.company-content-home-link {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.company-content-home-link:hover {
  background: var(--interactive-hover-surface);
  color: var(--text-primary);
}

.company-content-shell {
  flex: 1;
  padding-top: 42px;
  padding-bottom: 84px;
}

.company-content-header {
  margin-bottom: 38px;
}

.company-content-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--text-tertiary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.company-content-header h1 {
  max-width: 680px;
  margin: 0 0 18px;
  color: var(--text-primary);
  font-size: 52px;
  line-height: 1.02;
  letter-spacing: 0;
}

.company-content-header p {
  max-width: 650px;
  margin: 0;
  color: var(--text-secondary);
  font-size: 20px;
  line-height: 1.55;
}

.company-content-prose {
  max-width: 680px;
  color: var(--text-primary);
  font-size: 18px;
  line-height: 1.78;
}

.company-content-prose img {
  display: block;
  max-width: 100%;
  width: auto;
  height: auto;
}

.company-content-prose h2,
.company-content-prose h3 {
  color: var(--text-primary);
  letter-spacing: 0;
}

.company-content-prose h2 {
  margin: 42px 0 14px;
  font-size: 26px;
  line-height: 1.22;
}

.company-content-prose h3 {
  margin: 30px 0 12px;
  font-size: 20px;
  line-height: 1.3;
}

.company-content-prose p,
.company-content-prose ul,
.company-content-prose ol,
.company-content-prose blockquote {
  margin: 0 0 22px;
}

.company-content-prose ul,
.company-content-prose ol {
  padding-left: 26px;
}

.company-content-prose li + li {
  margin-top: 8px;
}

.company-content-prose a {
  color: var(--text-brand);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.company-content-prose blockquote {
  border-left: 3px solid var(--plum-300);
  padding-left: 18px;
  color: var(--text-secondary);
}

@media (max-width: 640px) {
  .company-content-topbar,
  .company-content-shell {
    padding-left: 20px;
    padding-right: 20px;
  }

  .company-content-topbar {
    padding-top: 20px;
    padding-bottom: 20px;
  }

  .company-content-shell {
    padding-top: 30px;
    padding-bottom: 60px;
  }

  .company-content-header h1 {
    font-size: 38px;
  }

  .company-content-header p {
    font-size: 18px;
  }

  .company-content-prose {
    font-size: 16px;
    line-height: 1.72;
  }
}


.modal-shell {
  min-height: 100vh;
  background: var(--surface-page);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 32px 20px 48px;
}

.modal-card {
  width: 100%;
  max-width: 520px;
  background: var(--surface-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-modal);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-card-topline {
  display: none;
}

.modal-card-header {
  background: var(--surface-card);
  border-bottom: 1px solid var(--border-default);
  padding: 0 24px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.modal-card-header-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.modal-card-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-card-step-label {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-tertiary);
}

.modal-card-close {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--surface-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 18px;
  line-height: 1;
  transition: background 0.12s, color 0.12s;
  flex-shrink: 0;
}

.modal-card-close:hover {
  background: var(--interactive-hover-surface);
  color: var(--text-primary);
}

.modal-card-body {
  padding: 32px;
  flex: 1;
}

.modal-card-footer {
  border-top: 1px solid var(--border-default);
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.smart-template-dialog {
  padding: 0;
  border: 0;
  background: transparent;
  width: min(560px, calc(100% - 40px));
  max-width: 560px;
  box-shadow: none;
  margin: auto;
}

.smart-template-modal-card {
  max-width: none;
}

.smart-template-footer {
  gap: 16px;
}

.smart-template-footer-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.smart-template-description-input {
  min-height: 148px;
}

.smart-template-loading {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface-subtle);
  border: 1px solid var(--border-default);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-secondary);
}

.smart-template-error {
  display: block;
  margin: 0 0 18px;
  padding: 11px 12px;
  border-radius: 12px;
  background: var(--danger-surface);
  border: 1px solid var(--danger-border);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.55;
  color: var(--danger-text);
}

.smart-template-unsupported-callout {
  margin-bottom: 6px;
}

@keyframes mobile-bottom-sheet-enter {
  from {
    opacity: 0.96;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes mobile-bottom-sheet-exit {
  from {
    opacity: 1;
    transform: translateY(0);
  }

  to {
    opacity: 0.98;
    transform: translateY(100%);
  }
}


.step-pips {
  display: flex;
  align-items: center;
  gap: 6px;
}

.step-pip {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--grey-200);
  transition: all 0.2s;
}

.step-pip.active {
  width: 20px;
  border-radius: 3px;
  background: var(--plum-500);
}


.wizard-steps {
  display: flex;
  align-items: center;
  max-width: var(--content-max-w);
  margin: 0 0 32px;
}

.wizard-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  flex: 1;
}


.wizard-step::after {
  content: '';
  position: absolute;
  top: 14px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--border-default);
  z-index: 0;
}

.wizard-step:last-child::after {
  display: none;
}

.wizard-step.done::after {
  background: var(--border-brand-subtle);
}

.wizard-step-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface-card);
  border: 2px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-tertiary);
  position: relative;
  z-index: 1;
  transition: all 0.2s;
}

.wizard-step.done .wizard-step-circle {
  background: var(--interactive-primary);
  border-color: var(--interactive-primary);
  color: var(--text-on-brand);
}

.wizard-step.current .wizard-step-circle {
  background: var(--interactive-primary);
  border-color: var(--interactive-primary);
  color: var(--text-on-brand);
  box-shadow: var(--interactive-focus-shadow);
}

.wizard-step-label {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  margin-top: 6px;
  text-align: center;
  line-height: 1.2;
}

.wizard-step.done .wizard-step-label {
  color: var(--text-brand);
}

.wizard-step.current .wizard-step-label {
  color: var(--text-primary);
  font-weight: 700;
}


.wizard-form-heading {
  font-family: var(--font-heading);
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.018em;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.wizard-form-subtitle {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

.wizard-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--border-default);
  padding-top: 20px;
  margin-top: 28px;
}

.wizard-form-footer--mobile-only {
  display: none;
}

.mobile-footer-only {

  display: none !important;
}

.wizard-max-w {
  width: 100%;
  max-width: var(--content-max-w);
  margin: 0 auto;
}


.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 100px;
  font-family: var(--font-heading);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: background 0.12s, color 0.12s, border-color 0.12s, opacity 0.12s;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
  line-height: 1;
  letter-spacing: 0;
}

.btn:disabled,
.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}


.btn-lg {
  height: 44px;
  padding: 0 22px;
  font-size: 15px;
}

.btn-md {
  height: 38px;
  padding: 0 16px;
  font-size: 13px;
}

.btn-sm {
  height: 30px;
  padding: 0 12px;
  font-size: 12px;
}

.btn-full {
  width: 100%;
}


.btn:not(.btn-lg):not(.btn-sm) {
  height: 38px;
  padding: 0 16px;
  font-size: 13px;
}


.btn-primary {
  background: var(--interactive-primary);
  color: var(--text-on-brand);
  border-color: var(--interactive-primary);
}

.btn-primary:hover:not(:disabled) {
  background: var(--interactive-primary-hover);
  border-color: var(--interactive-primary-hover);
  color: var(--text-on-brand);
}

.btn-secondary {
  background: transparent;
  color: var(--text-brand);
  border-color: var(--border-brand);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--interactive-selected-surface);
  color: var(--interactive-selected-text);
  border-color: var(--interactive-selected-border);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border-muted);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--interactive-hover-surface);
  color: var(--text-primary);
}

.btn-outline {
  background: var(--surface-card);
  color: var(--text-secondary);
  border-color: var(--border-default);
}

.btn-outline:hover:not(:disabled) {
  background: var(--interactive-hover-surface);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.btn-danger {
  background: transparent;
  color: var(--danger-text);
  border-color: var(--danger-border);
}

.btn-danger:hover:not(:disabled) {
  background: var(--danger-surface);
}


.btn-nav {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 100px;
  transition: background 0.12s, color 0.12s;
  display: inline-flex;
  align-items: center;
}

.btn-nav:hover {
  background: var(--interactive-hover-surface);
  color: var(--text-primary);
}

.btn-nav-primary {
  background: var(--interactive-primary);
  color: var(--text-on-brand);
  padding: 6px 14px;
  border-radius: 100px;
}

.btn-nav-primary:hover {
  background: var(--interactive-primary-hover);
  color: var(--text-on-brand);
}


.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-secondary);
  margin-bottom: 7px;
}

.form-hint {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 5px;
}

.input,
.textarea,
select.input {
  width: 100%;
  height: 40px;
  padding: 0 13px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--surface-input);
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
  appearance: none;
  line-height: 1.5;
}

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

.input:focus,
.textarea:focus {
  outline: none;
  border-color: var(--interactive-focus-ring);
  box-shadow: var(--interactive-focus-shadow);
}

.input:disabled,
.textarea:disabled {
  background: var(--surface-disabled);
  color: var(--text-disabled);
}

.input.error,
.textarea.error {
  border-color: var(--red-600);
}

.textarea {
  height: auto;
  padding: 13px;
  resize: vertical;
  min-height: 140px;
  line-height: 1.6;
}

.textarea-xl {
  min-height: 220px;
}


input[type="date"],
input[type="time"] {
  position: relative;
  appearance: listbox;
  -webkit-appearance: listbox;
  cursor: pointer;
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
  position: absolute;
  top: 0;
  right: 12px;
  bottom: 0;
  width: 16px;
  height: 100%;
  opacity: 0.6;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
  background-size: 16px;
  background-repeat: no-repeat;
  background-position: center;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover,
input[type="time"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}

.textarea::placeholder {
  color: var(--text-tertiary);
}

.textarea-focus {
  outline: none !important;
  border-color: var(--plum-500) !important;
  box-shadow: 0 0 0 3px var(--plum-200) !important;
}

.step1-editor-textarea {
  min-height: 220px;
  border: none;
  box-shadow: none;
  padding: 16px;
}

.tiptap,
.tiptap:focus,
.ProseMirror:focus,
.ProseMirror-focused {
  outline: none !important;
}

.tiptap p,
.tiptap li {
  line-height: 1.6;
}

.tiptap p:last-child {
  margin-bottom: 0;
}

.tiptap p.is-editor-empty:first-child::before {
  content: attr(data-placeholder);
  float: left;
  height: 0;
  pointer-events: none;
  color: var(--text-tertiary);
}

.char-count {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-tertiary);
  text-align: right;
  margin-top: 5px;
  padding-right:8px;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.wordcount-overlay {
  position: absolute;
  bottom: 12px;
  right: 18px;
  margin: 0;
  background: var(--surface-card);
  padding: 2px 6px;
  border-radius: 4px;
  z-index: 10;
  pointer-events: none;
}

.editor-jurisdiction-indicator {
  position: absolute;
  bottom: 17px;
  left: 18px;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: calc(100% - 164px);
  min-width: 0;
  padding: 3px 8px;
  border: 1px solid var(--border-default);
  border-radius: 999px;
  background: var(--surface-card);
  color: var(--text-tertiary);
  font-family: var(--font-body);
  font-size: 11px;
  line-height: 1.35;
  pointer-events: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.editor-jurisdiction-indicator[hidden] {
  display: none;
}

.editor-jurisdiction-indicator--with-actions {
  left: 18px;
  max-width: calc(100% - 164px);
}

.review-editor-shell--actions-visible .editor-jurisdiction-indicator--with-actions {
  left: 88px;
  max-width: calc(100% - 234px);
}

.editor-jurisdiction-indicator__label {
  font-family: var(--font-heading);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  padding-top: 3px;
}

.editor-jurisdiction-indicator__value {
  min-width: 0;
  overflow: hidden;
  color: var(--text-secondary);
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 520px) {
  .editor-jurisdiction-indicator--with-actions .editor-jurisdiction-indicator__label {
    display: none;
  }
}


.editor-quick-actions {
  position: absolute;
  bottom: 16px;
  left: 16px;
  display: flex;
  gap: 8px;
  z-index: 10;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.editor-quick-actions.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.editor-quick-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--border-default);
  background: var(--surface-card);
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease,
    transform 0.15s ease, box-shadow 0.15s ease;
}

.editor-quick-action-btn:hover:not(:disabled) {
  border-color: var(--border-strong);
  background: var(--interactive-hover-surface);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.editor-quick-action-btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.editor-quick-action-icon {
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.editor-quick-action-icon--success {
  position: absolute;
  opacity: 0;
  transform: scale(0.72);
}

.editor-quick-action-btn--flash .editor-quick-action-icon--copy {
  opacity: 0;
  transform: scale(0.72);
}

.editor-quick-action-btn--flash .editor-quick-action-icon--success {
  opacity: 1;
  transform: scale(1);
}

.editor-quick-action-btn--flash {
  background: var(--interactive-selected-surface);
  border-color: var(--interactive-selected-border);
  color: var(--interactive-selected-text);
}

#step1-editor-container .tiptap p.is-editor-empty:first-child::before {
  float: none;
  display: inline;
  margin-right: 8px;
}

.editor-magic-floating {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 9;
  pointer-events: none;
  transition: transform 0.2s ease;
}

.editor-magic-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 28px;
  padding: 0 12px;
  border-radius: 100px;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  pointer-events: auto;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease,
    transform 0.18s ease, opacity 0.18s ease, box-shadow 0.18s ease;
}

.editor-magic-btn--template {
  background: var(--info-surface);
  border: 1px solid var(--info-border);
  color: var(--info-text);
}

.editor-magic-btn--template:hover {
  background: var(--interactive-selected-surface);
  border-color: var(--interactive-selected-border);
  color: var(--interactive-selected-text);
}

.editor-magic-btn.is-switching {
  opacity: 0.72;
  transform: translateY(1px);
}


.char-count.near-limit {
  color: var(--amber-600);
}

.char-count.at-limit {
  color: var(--red-600);
}


.toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--border-default);
  border-radius: 24px;
  transition: 0.2s;
}

.toggle-slider::before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: var(--surface-card);
  border-radius: 50%;
  transition: 0.2s;
  box-shadow: var(--shadow-sm);
}

.toggle input:checked+.toggle-slider {
  background: var(--plum-500);
}

.toggle input:checked+.toggle-slider::before {
  transform: translateX(20px);
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--border-default);
}

.toggle-row:first-child {
  border-top: none;
}

.toggle-label {
  flex: 1;
  font-size: 14px;
  font-family: var(--font-body);
}

.toggle-label strong {
  font-family: var(--font-heading);
  font-weight: 600;
}

.toggle-sub {
  font-size: 12px;
  color: var(--text-secondary);
  display: block;
  margin-top: 2px;
  font-family: var(--font-body);
}


.segmented-control {
  display: flex;
  background: var(--surface-muted);
  border-radius: 100px;
  padding: 3px;
  gap: 2px;
}

.segmented-option {
  flex: 1;
  padding: 7px 16px;
  border: none;
  border-radius: 100px;
  background: transparent;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  color: var(--grey-600);
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
  white-space: nowrap;
}

.segmented-option.active {
  background: var(--surface-card);
  color: var(--plum-600);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.10);
}


.otp-group {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 24px 0;
}

.otp-digit {
  width: 48px;
  height: 58px;
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  border: 1.5px solid var(--border-default);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  color: var(--text-primary);
  background: var(--surface-card);
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.otp-digit:focus {
  outline: none;
  border-color: var(--plum-500);
  box-shadow: 0 0 0 3px var(--plum-200);
}

.otp-digit.filled {
  border-color: var(--plum-500);
}

.create-otp-panel {
  max-width: 480px;
  margin: 0 auto;
}

.create-otp-copy {
  margin-bottom: 20px;
  text-align: center;
}

.create-otp-form {
  max-width: 400px;
  margin: 0 auto;
}

.otp-label {
  display: block;
  margin-bottom: -8px;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-align: center;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.otp-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}

.otp-resend-slot {
  min-width: 0;
}

@media (max-width: 520px) {
  .otp-form-footer {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .otp-form-footer .btn-primary {
    width: 100%;
    justify-content: center;
  }

  .otp-resend-slot {
    text-align: center;
  }
}


.collapsible-toggle {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-secondary);
  padding: 0;
  margin-bottom: 14px;
  transition: color 0.12s;
}

.collapsible-toggle:hover {
  color: var(--text-primary);
}

.collapsible-content {
  display: none;
}

.collapsible-content.open {
  display: block;
}


.card {
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: 14px;
  padding: 20px;
}

.card+.card {
  margin-top: 12px;
}

.card--interactive {
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.card--interactive:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-card);
}

.card-title {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-secondary);
  margin-bottom: 8px;
}


.callout {
  background: var(--info-surface);
  border: 1px solid var(--info-border);
  border-radius: 14px;
  padding: 16px 20px;
}

.callout--warning {
  background: var(--warning-surface);
  border-color: var(--warning-border);
}

.callout--danger {
  background: var(--danger-surface);
  border-color: var(--danger-border);
}

.callout-title {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  color: var(--info-text);
  margin-bottom: 4px;
}

.callout p {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 0;
}


.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 20px;
  padding: 0 7px;
  border-radius: 4px;
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}



.badge-sealed {
  background: var(--success-surface);
  color: var(--success-text);
  border: 1px solid var(--success-border);
}

.badge-sealed::before {
  background: var(--green-600);
}

.badge-pending {
  background: var(--warning-surface);
  color: var(--warning-text);
  border: 1px solid var(--warning-border);
}

.badge-pending::before {
  background: var(--amber-600);
}

.badge-draft {
  background: var(--surface-muted);
  color: var(--text-secondary);
  border: 1px solid var(--border-default);
}

.badge-draft::before {
  background: var(--grey-400);
}

.badge-declined {
  background: var(--danger-surface);
  color: var(--danger-text);
  border: 1px solid var(--danger-border);
}

.badge-declined::before {
  background: var(--red-600);
}

.badge-cancelled {
  background: var(--surface-muted);
  color: var(--text-secondary);
  border: 1px solid var(--border-default);
}

.badge-cancelled::before {
  background: var(--grey-400);
}

.badge-rescinded {
  background: var(--danger-surface);
  color: var(--danger-text);
  border: 1px solid var(--danger-border);
}

.badge-rescinded::before {
  background: var(--red-600);
}

.badge-superseded,
.badge-expired,
.badge-cancelled_draft {
  background: var(--surface-muted);
  color: var(--text-secondary);
  border: 1px solid var(--border-default);
}

.badge-superseded::before,
.badge-expired::before,
.badge-cancelled_draft::before {
  background: var(--grey-400);
}

.badge-agreement {
  background: var(--surface-brand-tint);
  color: var(--text-selected);
  border: 1px solid var(--border-brand-subtle);
}

.badge-agreement::before {
  background: var(--plum-500);
}

.badge-declaration {
  background: var(--info-surface);
  color: var(--info-text);
  border: 1px solid var(--info-border);
}

.badge-declaration::before {
  background: var(--plum-400);
}

.badge-witnessed_agreement {
  background: var(--surface-brand-tint);
  color: var(--text-selected);
  border: 1px solid var(--border-brand-subtle);
}

.badge-witnessed_agreement::before {
  background: var(--plum-500);
}

.badge-pending_confirmation {
  background: var(--warning-surface);
  color: var(--warning-text);
  border: 1px solid var(--warning-border);
}



.badge-counter_under_review {
  background: var(--warning-surface);
  color: var(--warning-text);
  border: 1px solid var(--warning-border);
}

.badge-counter_under_review::before {
  background: var(--amber-600);
}


.agreement-list {
  width: 100%;
  border: 1px solid var(--border-default);
  border-radius: 14px;
  background: var(--surface-card);
  overflow: hidden;
}

.agreement-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 220px) minmax(96px, auto);
  grid-template-areas: "main status proof";
  gap: 20px;
  padding: 16px 20px;
  align-items: center;
  min-height: 72px;
  border-bottom: 1px solid var(--border-default);
  text-decoration: none;
  color: inherit;
  transition:
    background-color 0.2s ease,
    box-shadow 0.2s ease;
}

.agreement-row:last-child {
  border-bottom: none;
}

.agreement-row:hover {
  background: var(--interactive-hover-surface);
  box-shadow: inset 3px 0 0 var(--plum-400);
}

.agreement-row:focus-visible {
  position: relative;
  z-index: 1;
}

.agreement-row-main {
  grid-area: main;
  min-width: 0;
  position: relative;
}

.agreement-row--with-identicon .agreement-row-main {
  min-height: 36px;
  padding-left: 66px;
}

.agreement-row-title {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.agreement-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 0;
  min-width: 0;
  margin-top: 4px;
  font-family: var(--font-body);
  font-size: 11px;
  line-height: 1.4;
  color: var(--text-tertiary);
}

.agreement-row-meta span {
  min-width: 0;
}

.agreement-row-meta span:first-child {
  font-family: var(--font-mono);
}

.agreement-row-meta span + span::before {
  content: "·";
  margin: 0 7px;
  color: var(--grey-300);
}

.agreement-row-progress {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-top: 4px;
}

.agreement-row-progress--danger {
  color: var(--red-600);
}

.agreement-row-status {
  grid-area: status;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  padding: 8px 0;
}

.agreement-row-status .badge-counter_under_review {
  max-width: 100%;
  min-height: 20px;
  height: auto;
  white-space: normal;
  line-height: 1.2;
  text-align: left;
  padding-top: 4px;
  padding-bottom: 4px;
}

.agreement-row-proof {
  grid-area: proof;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.agreement-row-date {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  white-space: nowrap;
  text-align: right;
}

.agreement-row-identicon {
  position: absolute;
  top: 50%;
  left: 0;
  width: 56px;
  height: auto;
  opacity: 0.86;
  transform: translateY(-50%);
}


.agreement-body {
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius);
  padding: 24px;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.85;
  color: var(--text-secondary);
  white-space: pre-wrap;
  word-break: break-word;
}

.stage-4-agreement-preview__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-default);
  background:
    linear-gradient(180deg, rgba(109, 40, 217, 0.05) 0%, rgba(109, 40, 217, 0) 100%);
}

.stage-4-agreement-preview__heading {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.stage-4-agreement-preview__meta {
  margin: 6px 0 0;
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-tertiary);
  max-width: 560px;
}

.stage-4-agreement-preview__body {
  margin: 0;
  border: none;
  border-radius: 0;
  padding: 20px;
  max-height: 420px;
  overflow: auto;
}

.stage-4-agreement-preview__jurisdiction {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid var(--border-default);
  background: var(--surface-page);
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-secondary);
}

.stage-4-agreement-preview__jurisdiction-label {
  flex: 0 0 auto;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  padding-top: 3px;
}

.stage-4-agreement-preview__jurisdiction-value {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 600;
  color: var(--text-primary);
}

.agreement-text-jurisdiction {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid var(--border-default);
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-secondary);
}

.agreement-text-jurisdiction__label {
  flex: 0 0 auto;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  padding-top:3px;
}

.agreement-text-jurisdiction__value {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 600;
  color: var(--text-primary);
}

.stage-4-agreement-preview__editor {
  padding: 20px;
  background: var(--surface-card);
}

.stage-4-agreement-preview__editor .alert {
  margin-bottom: 16px;
}

.stage-4-agreement-preview__hint {
  margin: 0 0 16px;
}

.stage-4-agreement-preview__actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.stage6-focus-lock {
  opacity: 0.56;
  pointer-events: none;
  transition: opacity 0.16s ease;
}

.counter-form-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.counter-redline {
  border: 1px solid var(--border-default);
  border-radius: var(--radius);
  background: var(--surface-subtle);
  padding: 16px;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.85;
  color: var(--text-secondary);
  white-space: pre-wrap;
  word-break: break-word;
}

.counter-redline ins,
.counter-redline del {
  text-decoration: none;
  border-radius: 4px;
  padding: 0 0.08em;
}

.counter-redline ins {
  background: var(--success-surface);
  color: var(--success-text);
  box-shadow: inset 0 -2px 0 var(--success-border);
}

.counter-redline del {
  background: var(--danger-surface);
  color: var(--danger-text);
  box-shadow: inset 0 -2px 0 var(--danger-border);
}

.amendment-preview-redline.counter-redline del,
.originating-counter-review .counter-redline del {
  text-decoration: line-through;
  opacity: 0.4;
}

.counter-redline-change--block {
  display: block;
  padding: 8px 10px;
  margin: 8px 0;
}

.agr-reference {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--interactive-selected-text);
  background: var(--interactive-selected-surface);
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  display: inline-block;
}

.agr-reference-lockup {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding-right: 4px;
  border-radius: var(--radius-sm);
  background: var(--interactive-selected-surface);
}

.agr-reference-lockup .agr-reference {
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.agr-reference-copy-button {
  display: inline-grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--interactive-selected-text);
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.agr-reference-copy-button:hover {
  background: color-mix(in srgb, currentColor 12%, transparent);
}

.agr-reference-copy-button:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--text-brand) 55%, transparent);
  outline-offset: 2px;
}

.agr-reference-copy-button:active {
  transform: scale(0.92);
}

.agr-reference-copied-icon {
  display: none;
}

.agr-reference-copy-button.is-copied .agr-reference-copy-icon {
  display: none;
}

.agr-reference-copy-button.is-copied .agr-reference-copied-icon {
  display: block;
}

.agr-reference-copy-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.agr-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-secondary);
  margin: 12px 0;
}

.agr-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.public-agreement-actions {
  align-items: center;
  flex-wrap: wrap;
}


.party-list {
  list-style: none;
}

.party-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-default);
}

.party-item:last-child {
  border-bottom: none;
}

.party-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.party-avatar--primary {
  background: var(--surface-brand-tint);
  color: var(--text-selected);
}

.party-details {
  flex: 1;
  min-width: 0;
}

.party-name {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.party-contact {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 1px;
}

.party-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 4px;
}

.party-status-badge.confirmed {
  background: var(--success-surface);
  color: var(--success-text);
  border: 1px solid var(--success-border);
}

.party-status-badge.pending {
  background: var(--warning-surface);
  color: var(--warning-text);
  border: 1px solid var(--warning-border);
}

.party-status-badge.declined {
  background: var(--danger-surface);
  color: var(--danger-text);
  border: 1px solid var(--danger-border);
}

.party-status-badge.rescinded {
  background: var(--surface-muted);
  color: var(--text-secondary);
  border: 1px solid var(--border-default);
}

.party-item--initiator {
  display: block;
  padding-top: 14px;
  padding-bottom: 14px;
}

.party-initiator-identity {
  display: flex;
  align-items: center;
  gap: 12px;
}

.party-role-badge {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 3px 10px;
  border: 1px solid var(--border-default);
  border-radius: 20px;
  background: var(--surface-muted);
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
}

.party-initiator-name-field {
  margin: 16px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--border-default);
}

.party-initiator-name-field .form-label {
  margin-bottom: 6px;
}

.party-initiator-name-input {
  width: 100%;
}

.party-initiator-alert {
  margin-top: 16px;
}

.participant-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.participant-section-heading .section-title {
  margin-bottom: 0;
}

.participant-count {
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.participant-summary-card {
  padding: 0 20px;
}

.participant-section-alert {
  margin-bottom: 12px;
}

.witness-editor {
  padding: 0;
  overflow: hidden;
}

.witness-editor-intro {
  margin: 0;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-default);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.55;
}

.witness-editor-alert {
  margin: 16px 20px 0;
}

.witness-editor-status {
  margin: 14px 20px 0;
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 1.45;
}

.witness-editor-alert[hidden],
.witness-editor-status[hidden] {
  display: none;
}

.witness-editor-status {
  padding: 0;
}

.witness-editor-status--pending {
  color: var(--warning-text);
}

.witness-editor-status--error {
  color: var(--danger-text);
}

.witness-editor-list {
  padding: 0 20px;
}

.witness-editor-row {
  padding: 18px 0;
  border: 0;
  border-bottom: 1px solid var(--border-default);
}

.witness-editor-row-header,
.witness-editor-identity,
.witness-editor-actions,
.witness-editor-save-actions {
  display: flex;
  align-items: center;
}

.witness-editor-row-header,
.witness-editor-actions {
  justify-content: space-between;
}

.witness-editor-row-header {
  gap: 12px;
  margin-bottom: 14px;
}

.witness-editor-identity {
  min-width: 0;
  gap: 10px;
}

.witness-editor-identity strong {
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
}

.witness-remove-button {
  flex-shrink: 0;
}

.witness-editor-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.witness-editor-fields .form-group {
  margin-bottom: 0;
}

.witness-field-error {
  margin: 6px 0 0;
  color: var(--danger-text);
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 1.4;
}

.witness-field-error[hidden] {
  display: none;
}

.witness-editor-fields .input[aria-invalid="true"] {
  border-color: var(--danger-border);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--danger-border) 22%, transparent);
}

.witness-empty-state {
  margin: 0;
  padding: 28px 20px;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.witness-editor-actions {
  gap: 12px;
  padding: 14px 20px;
}

.witness-editor-save-actions {
  justify-content: flex-end;
  gap: 8px;
}

.party-auto-card {
  background: var(--surface-page);
}

.party-auto-card .party-contact {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-secondary);
}

.party-status-badge--auto {
  background: var(--surface-muted);
  color: var(--text-secondary);
  border: 1px solid var(--border-default);
}


.contact-type-toggle {
  display: flex;
  border: 1px solid var(--border-default);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 10px;
}

.contact-type-btn {
  flex: 1;
  padding: 8px;
  border: none;
  background: none;
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.12s;
}

.contact-type-btn.active {
  background: var(--interactive-primary);
  color: var(--text-on-brand);
}


.verify-result {
  padding: 20px 24px;
  border-radius: 14px;
  margin: 20px 0;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.verify-result.success {
  background: var(--success-surface);
  border: 1.5px solid var(--green-600);
}

.verify-result.failure {
  background: var(--danger-surface);
  border: 1.5px solid var(--red-600);
}

.verify-result-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
}

.verify-result.success .verify-result-icon {
  background: var(--green-600);
  color: var(--text-inverse);
}

.verify-result.failure .verify-result-icon {
  background: var(--red-600);
  color: var(--text-inverse);
}

.verify-result-body {
  flex: 1;
}

.verify-result-text {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}

.verify-result.success .verify-result-text {
  color: var(--success-text);
}

.verify-result.failure .verify-result-text {
  color: var(--danger-text);
}

.verify-result-sub {
  font-family: var(--font-body);
  font-size: 13px;
}

.verify-result.success .verify-result-sub {
  color: var(--success-text);
}

.verify-result.failure .verify-result-sub {
  color: var(--danger-text);
}

.verify-result-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}


.verify-page {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.verify-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 6px;
}

.verify-hero h1 {
  margin: 0 0 8px;
  font-size: 42px;
  line-height: 1;
  letter-spacing: 0;
}

.verify-kicker {
  margin-bottom: 7px;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grey-600);
}

.verify-lede {
  color: var(--text-secondary);
  font-size: 17px;
  line-height: 1.55;
}

.verify-tool,
.verify-certificate,
.verify-outcome {
  border: 1px solid var(--border-default);
  border-radius: 8px;
  background: var(--surface-card);
  box-shadow: var(--shadow-sm);
}

.verify-tool {
  padding: 20px;
}

.verify-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.verify-section-heading h2 {
  margin: 0 0 4px;
  font-size: 20px;
  letter-spacing: 0;
}

.verify-section-heading p,
.verify-panel-copy span,
.verify-empty-certificate span,
.verify-identicon-row small {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.45;
}

.verify-reference-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.verify-step {
  display: block;
}

.verify-step + .verify-step {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border-default);
}

.verify-step-body {
  min-width: 0;
}

.verify-step-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.verify-step-heading h3 {
  margin: 0 0 3px;
  font-size: 16px;
  letter-spacing: 0;
}

.verify-step-heading p {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.45;
}

.verify-reference-control {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: stretch;
}

.verify-reference-prefix {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border-default);
  border-right: 0;
  border-radius: 8px 0 0 8px;
  background: var(--surface-subtle);
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 800;
}

.verify-reference-control .input {
  height: 40px;
  border-radius: 0 8px 8px 0;
  font-family: var(--font-mono);
  letter-spacing: 0;
  text-transform: uppercase;
}

.verify-reference-button {
  height: 40px;
  min-width: 126px;
}

.verify-method-picker {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 14px;
}

.verify-method-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  border: 1px solid var(--border-default);
  border-radius: 8px;
  background: var(--surface-card);
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.14s, background 0.14s, color 0.14s, box-shadow 0.14s;
}

.verify-method-option:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.verify-method-option.active {
  border-color: var(--plum-400);
  background: var(--info-surface);
  color: var(--info-text);
  box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.10);
}

.verify-panel {
  min-height: 288px;
  padding: 16px;
  border: 1px solid var(--border-default);
  border-radius: 8px;
  background: var(--surface-subtle);
}

.verify-panel-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 13px;
}

.verify-panel-copy strong {
  font-family: var(--font-heading);
  font-size: 15px;
  line-height: 1.35;
}

.verify-textarea {
  min-height: 206px;
  background: var(--surface-input);
}

.verify-mono-input {
  font-family: var(--font-mono);
  font-size: 13px;
}

.verify-dropzone {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 74px;
  margin-bottom: 14px;
  padding: 15px;
  border: 1.5px dashed var(--border-strong);
  border-radius: 8px;
  background: var(--surface-card);
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color 0.14s, background 0.14s, color 0.14s;
}

.verify-dropzone:hover {
  border-color: var(--plum-400);
  background: var(--info-surface);
  color: var(--info-text);
}

.verify-dropzone span {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.verify-dropzone strong {
  overflow: hidden;
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.verify-dropzone input,
#document_file {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.verify-submit {
  margin-top: 16px;
}

.verify-outcome {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  padding: 17px;
}

.verify-outcome--success {
  border-color: var(--success-border);
  background: var(--success-surface);
}

.verify-outcome--warning {
  border-color: var(--warning-border);
  background: var(--warning-surface);
}

.verify-outcome--failure {
  border-color: var(--danger-border);
  background: var(--danger-surface);
}

.verify-outcome-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: var(--surface-card);
}

.verify-outcome--success .verify-outcome-icon {
  color: var(--green-600);
}

.verify-outcome--warning .verify-outcome-icon {
  color: var(--amber-600);
}

.verify-outcome--failure .verify-outcome-icon {
  color: var(--red-600);
}

.verify-outcome-label {
  margin-bottom: 3px;
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0;
}

.verify-outcome-body p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
}

.verify-inline-link {
  display: inline-flex;
  margin-top: 2px;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
}

.verify-check-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.verify-check-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 27px;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid var(--border-default);
  background: var(--surface-card);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}

.verify-check-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--grey-400);
}

.verify-check-pill--ok {
  border-color: var(--success-border);
  color: var(--success-text);
}

.verify-check-pill--ok .verify-check-dot {
  background: var(--green-600);
}

.verify-check-pill--bad {
  border-color: var(--danger-border);
  color: var(--danger-text);
}

.verify-check-pill--bad .verify-check-dot {
  background: var(--red-600);
}

.verify-check-pill--neutral .verify-check-dot {
  background: var(--grey-400);
}

.verify-certificate {
  padding: 18px;
}

.verify-certificate-top,
.verify-identicon-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.verify-certificate-ref {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 800;
  line-height: 1.05;
  padding-top:10px;
  letter-spacing: 0;
}

.verify-identicon-row {
  justify-content: flex-start;
  margin: 18px 0;
  padding: 12px;
  border-radius: 8px;
  background: var(--surface-subtle);
}

.verify-identicon-row span {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.verify-identicon-row strong,
.verify-chain-summary code {
  overflow-wrap: anywhere;
  font-family: var(--font-mono);
  font-size: 12px;
}

.verify-fact-list {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--border-default);
  border-radius: 8px;
}

.verify-fact-list div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 10px 12px;
  background: var(--surface-card);
}

.verify-fact-list dt {
  color: var(--text-tertiary);
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.verify-fact-list dd {
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}

.verify-chain-summary {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  padding: 12px;
  border-radius: 8px;
  background: var(--surface-subtle);
}

.verify-chain-label {
  color: var(--text-tertiary);
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.verify-empty-certificate {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-height: 260px;
  align-content: center;
  color: var(--text-secondary);
  text-align: center;
}

.verify-empty-certificate strong {
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-size: 17px;
}

.verify-actions {
  display: grid;
  gap: 10px;
}

@media (max-width: 640px) {
  .verify-hero h1 {
    font-size: 34px;
  }

  .verify-tool,
  .verify-certificate {
    padding: 16px;
  }

  .verify-reference-bar,
  .verify-method-picker,
  .verify-fact-list div {
    grid-template-columns: 1fr;
  }

  .verify-step-heading {
    flex-direction: column;
  }

  .verify-reference-button {
    width: 100%;
  }

  .verify-method-option {
    justify-content: flex-start;
    padding: 0 12px;
  }

  .verify-panel {
    min-height: 250px;
    padding: 14px;
  }

  .verify-textarea {
    min-height: 180px;
  }

  .verify-outcome {
    grid-template-columns: 1fr;
  }
}


.blockchain-record {
  background: var(--info-surface);
  border: 1px solid var(--info-border);
  border-radius: 14px;
  padding: 16px 20px;
}

.blockchain-record .record-label {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--info-text);
  margin-bottom: 8px;
}

.blockchain-record .tx-hash {
  font-family: var(--font-mono);
  font-size: 11px;
  word-break: break-all;
  color: var(--text-primary);
  background: var(--surface-card);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--info-border);
}

.blockchain-record .tx-link {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-brand);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
}

.blockchain-record .tx-link:hover {
  color: var(--text-brand-strong);
}


.suggestion-card {
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 10px;
  position: relative;
}

.suggestion-card.warning {
  border-color: var(--warning-border);
  background: var(--warning-surface);
}

.suggestion-card.info {
  border-color: var(--info-border);
  background: var(--info-surface);
}

.suggestion-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.suggestion-card-title {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
}

.suggestion-card.warning .suggestion-card-title {
  color: var(--warning-text);
}

.suggestion-card.info .suggestion-card-title {
  color: var(--info-text);
}

.suggestion-card-body {
  font-family: var(--font-body);
  font-size: 13px;
  margin-top: 6px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.suggestion-card.warning .suggestion-card-body {
  color: var(--warning-text);
}

.suggestion-card.info .suggestion-card-body {
  color: var(--info-text);
}

.suggestion-dismiss {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  color: var(--text-tertiary);
  padding: 2px;
  flex-shrink: 0;
  transition: color 0.12s;
}

.suggestion-dismiss:hover {
  color: var(--text-primary);
}


.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 14px;
  margin-bottom: 16px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.alert-error {
  background: var(--danger-surface);
  color: var(--danger-text);
  border: 1px solid var(--danger-border);
}

.alert-success {
  background: var(--success-surface);
  color: var(--success-text);
  border: 1px solid var(--success-border);
}

.alert-info {
  background: var(--info-surface);
  color: var(--info-text);
  border: 1px solid var(--info-border);
}

.alert-warning {
  background: var(--warning-surface);
  color: var(--warning-text);
  border: 1px solid var(--warning-border);
}

.field-help-tooltip {
  appearance: none;
  display: inline-flex;
  width: 18px;
  height: 18px;
  padding: 0;
  margin-left: 4px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: color-mix(in srgb, var(--text-brand) 10%, transparent);
  color: var(--text-secondary);
  cursor: help;
  vertical-align: -3px;
  transition: background-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.field-help-tooltip:hover,
.field-help-tooltip:focus-visible,
.field-help-tooltip[aria-expanded="true"] {
  background: color-mix(in srgb, var(--text-brand) 18%, transparent);
  color: var(--text-brand);
  transform: translateY(-1px);
}

.field-help-tooltip:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--text-brand) 45%, transparent);
  outline-offset: 2px;
}

.field-help-tooltip svg {
  width: 12px;
  height: 12px;
  pointer-events: none;
}

.field-help-tooltip-popup {
  position: fixed;
  z-index: 140;
  width: max-content;
  max-width: min(280px, calc(100vw - 24px));
  padding: 10px 12px;
  border: 1px solid var(--border-default);
  border-radius: 8px;
  background: var(--surface-elevated);
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.14);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
  text-align: left;
  text-transform: none;
  white-space: normal;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .field-help-tooltip {
    transition: none;
  }
}


.section {
  margin-bottom: 28px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-tertiary);
  margin-bottom: 10px;
}


.seal-card {
  text-align: center;
  padding: 32px 20px;
}

.seal-icon-wrap {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--surface-brand-tint);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.seal-title {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.018em;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.seal-sub {
  font-family: var(--font-body);
  color: var(--text-secondary);
  font-size: 15px;
  margin-bottom: 24px;
}


.loading-dots {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.loading-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-tertiary);
  animation: dot-bounce 1.4s infinite ease-in-out;
}

.loading-dots span:nth-child(2) {
  animation-delay: 0.16s;
}

.loading-dots span:nth-child(3) {
  animation-delay: 0.32s;
}

@keyframes dot-bounce {

  0%,
  80%,
  100% {
    transform: scale(0.6);
    opacity: 0.5;
  }

  40% {
    transform: scale(1);
    opacity: 1;
  }
}

.htmx-indicator {
  opacity: 0;
  transition: opacity 0.2s;
}

.htmx-request .htmx-indicator {
  opacity: 1;
}

.htmx-request.htmx-indicator {
  opacity: 1;
}

.signature-surface-lock {
  opacity: 0.78;
  pointer-events: none;
  transition: opacity 0.16s ease;
}

[data-signature-method-card] {
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.signature-finalize-cta {
  padding-top: 8px;
  text-align: center;
}

.signature-finalize-cta--inline {
  margin: 4px 0;
  padding: 4px 0 8px;
}

.signature-finalize-cta--sticky {
  display: none;
}

.signature-method-card-busy {
  opacity: 0.7;
}

.signature-button-loading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.signature-button-spinner {
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: signature-button-spin 0.7s linear infinite;
  flex-shrink: 0;
}

@keyframes signature-button-spin {

  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

@media (max-width: 720px) {
  .signature-surface--has-sticky-finalize {
    padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  }

  .signature-finalize-cta--inline {
    display: none;
  }

  .signature-finalize-cta--sticky {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 120;
    display: block;
    margin: 0;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
    background: var(--surface-overlay);
    border-top: 1px solid var(--border-default);
    box-shadow: var(--shadow-mobile-bar);
    backdrop-filter: blur(12px);
  }

  .signature-finalize-cta--sticky form {
    max-width: var(--content-max-w);
    margin: 0 auto;
  }

  .signature-finalize-cta--sticky .btn {
    width: 100%;
    justify-content: center;
  }
}


.divider {
  border: none;
  border-top: 1px solid var(--border-default);
  margin: 24px 0;
}

.divider-text {
  text-align: center;
  font-family: var(--font-body);
  color: var(--text-tertiary);
  font-size: 13px;
  position: relative;
  margin: 24px 0;
}

.divider-text::before,
.divider-text::after {
  content: '';
  position: absolute;
  top: 50%;
  width: calc(50% - 60px);
  height: 1px;
  background: var(--border-default);
}

.divider-text::before {
  left: 0;
}

.divider-text::after {
  right: 0;
}


.agreement-detail {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.record-detail-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.record-detail-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-tertiary);
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.12s;
}

.record-detail-back:hover {
  color: var(--text-secondary);
}

.record-detail-downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.agreement-state-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.agreement-state-card--success {
  border-color: var(--green-200);
}

.agreement-state-card--warning {
  border-color: var(--amber-200);
}

.agreement-state-card--critical {
  border-color: var(--red-200);
}

.agreement-state-card--brand {
  border-color: var(--plum-200);
}

.agreement-state-main h1 {
  font-size: 26px;
  margin-bottom: 8px;
}

.agreement-state-main p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.65;
}

.agreement-state-kicker {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.agreement-state-progress {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid var(--warning-border);
  border-radius: var(--radius);
  background: var(--warning-surface);
  color: var(--warning-text);
  font-family: var(--font-body);
  font-size: 13px;
}

.agreement-state-progress strong {
  font-family: var(--font-heading);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.agreement-state-text {
  min-width: 0;
  padding-top: 18px;
  border-top: 1px solid var(--border-default);
}

.agreement-state-text .agreement-card-heading {
  margin-bottom: 0;
}

.agreement-counter-review-panel {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding-top: 18px;
  border-top: 1px solid var(--border-default);
}

.agreement-counter-review-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  margin-bottom:10px;
}

.agreement-counter-review-bar h2 {
  color: var(--text-primary);
  font-size: 18px;
  letter-spacing: 0;
}

.agreement-counter-review-context {
  display: grid;
  gap: 4px;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
}

.agreement-counter-review-context strong {
  color: var(--text-primary);
  font-weight: 700;
}

.agreement-counter-review-actions.agreement-action-buttons {
  justify-content: flex-start;
  margin-top: 10px;
}

.agreement-counter-review-diff {
  min-width: 0;
}

.agreement-counter-review-diff-note {
  margin-bottom: 6px;
  color: var(--text-tertiary);
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  line-height: 1.4;
}

.agreement-counter-review-redline.counter-redline {
  border: 0;
  background: transparent;
  padding: 10px 0;
  font-size: 15px;
  padding-top:0px;
}

.agreement-counter-review-redline.counter-redline ins,
.agreement-counter-review-redline.counter-redline del {
  font-size: 15px;
}

.agreement-current-text-details {
  border-top: 1px solid var(--border-default);
  padding-top: 10px;
}

.agreement-current-text-details summary {
  cursor: pointer;
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
}

.agreement-current-text-details .agreement-body-text {
  margin-top: 12px;
}

.agreement-state-meta,
.agreement-meta-list,
.agreement-history-fields {
  display: grid;
  gap: 10px;
  margin: 0;
}

.agreement-state-meta {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.agreement-state-meta dt,
.agreement-meta-list dt,
.agreement-history-fields dt {
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.agreement-state-meta dd,
.agreement-meta-list dd,
.agreement-history-fields dd {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-primary);
  word-break: break-word;
}

.agreement-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}

.agreement-detail-main {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.agreement-action-rail {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.agreement-rail-card,
.agreement-truth-card,
.agreement-history-card {
  padding: 18px;
  min-width: 0;
}

.agreement-card-heading {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-tertiary);
  margin-bottom: 10px;
}

.agreement-permanent-tx-link,
.agreement-permanent-tx-hash {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.45;
}

.agreement-permanent-tx-link {
  color: var(--text-brand);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.agreement-permanent-tx-link:hover {
  color: var(--text-brand-strong);
}

.agreement-actions-card {
  background: var(--surface-card);
  border-color: var(--border-default);
  border-radius: 14px;
  padding: 18px;
}

.agreement-action-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.agreement-notice-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.agreement-notice {
  padding: 14px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius);
  background: var(--surface-card);
}

.agreement-notice--critical {
  border-color: var(--red-200);
}

.agreement-notice--warning {
  border-color: var(--amber-200);
}

.agreement-notice--success {
  border-color: var(--green-200);
}

.agreement-notice--brand {
  border-color: var(--plum-200);
}

.agreement-notice--neutral {
  border-color: var(--grey-200);
}

.agreement-notice-tone {
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  margin-bottom: 4px;
}

.agreement-notice h2 {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.agreement-notice p,
.agreement-rail-copy,
.agreement-empty-copy {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.agreement-action-row-form {
  width: 100%;
  margin: 0;
}

.agreement-action-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 10px 12px;
  border: 0;
  border-radius: var(--radius);
  background: var(--surface-subtle);
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  appearance: none;
}

.agreement-action-row:hover:not(:disabled) {
  background: var(--surface-hover);
  color: var(--text-primary);
}

.agreement-action-row:focus-visible {
  background: var(--surface-hover);
}

.agreement-action-row:focus-visible,
.agreement-action-alert-link:focus-visible {
  outline: 2px solid var(--interactive-focus-ring);
  outline-offset: 2px;
}

.agreement-action-row:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.agreement-action-row__content {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.agreement-action-row__label {
  display: block;
}

.agreement-action-row__chevron {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  color: var(--text-tertiary);
  transition: color 0.2s ease;
}

.agreement-action-row:hover:not(:disabled) .agreement-action-row__chevron,
.agreement-action-row:focus-visible .agreement-action-row__chevron {
  color: var(--text-primary);
}

.agreement-action-row__detail {
  display: block;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--text-secondary);
}

.agreement-action-row--primary {
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--interactive-primary);
  color: var(--text-on-brand);
  font-weight: 700;
  text-align: center;
}

.agreement-action-row--primary:hover:not(:disabled) {
  background: var(--interactive-primary-hover);
  color: var(--text-on-brand);
}

.agreement-action-row--primary .agreement-action-row__content {
  align-items: center;
}

.agreement-action-row--primary .agreement-action-row__detail {
  color: var(--text-on-brand);
}

.agreement-action-row--danger {
  color: var(--danger-action);
}

.agreement-action-row--danger .agreement-action-row__label {
  color: var(--danger-action);
}

@media (prefers-color-scheme: dark) {
  .agreement-action-row:not(.agreement-action-row--primary) {
    background: var(--surface-muted);
  }

  .agreement-action-row:not(.agreement-action-row--primary):hover:not(:disabled),
  .agreement-action-row:not(.agreement-action-row--primary):focus-visible {
    background: var(--surface-selected);
  }
}

.agreement-action-alert {
  padding: 14px 16px;
  border: 0;
  border-left: 2px solid var(--warning-border);
  border-radius: 12px;
  background: var(--warning-surface);
}

.agreement-action-alert__message {
  margin: 0;
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.55;
  color: var(--warning-text);
}

.agreement-action-alert__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 10px;
}

.agreement-action-alert-form {
  display: inline-flex;
  margin: 0;
}

.agreement-action-alert-link {
  display: inline-flex;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-brand);
  cursor: pointer;
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  appearance: none;
}

.agreement-action-alert-link:hover {
  color: var(--text-brand-strong);
}

.agreement-action-buttons,
.agreement-dialog-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.agreement-action-form,
.agreement-dialog-actions form {
  display: inline-flex;
  margin: 0;
}

.agreement-action-details,
.agreement-summary-details,
.agreement-history-details {
  margin-top: 12px;
  border-top: 1px solid var(--border-default);
  padding-top: 10px;
}

.agreement-action-details summary,
.agreement-summary-details summary,
.agreement-history-details summary {
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
}

.agreement-counter-meta {
  margin-top: 12px;
}

.agreement-counter-meta p {
  margin-top: 4px;
}

.agreement-counter-redline-block {
  margin-top: 14px;
}

.agreement-counter-redline-block .form-label + .form-label {
  margin-top: 10px;
}

.agreement-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.agreement-section-header h2 {
  font-size: 18px;
  letter-spacing: 0;
}

.agreement-version-pill,
.agreement-history-count {
  flex-shrink: 0;
  padding: 4px 8px;
  border-radius: 4px;
  background: var(--surface-muted);
  color: var(--text-secondary);
  border: 1px solid var(--border-default);
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.agreement-body-text {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.85;
  white-space: pre-wrap;
  word-break: break-word;
}

.agreement-summary-details p {
  margin-top: 10px;
  color: var(--text-secondary);
}

.agreement-participant-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
}

.agreement-participant-columns h3 {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.agreement-participant-list,
.agreement-history-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.agreement-participant-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.agreement-participant-row {
  display: block;
}

.agreement-participant-trigger {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) max-content 15px;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
  transition: background-color 0.16s ease, box-shadow 0.16s ease;
}

.agreement-participant-trigger:hover,
.agreement-participant-trigger:focus-visible {
  background: var(--interactive-hover-surface);
}

.agreement-participant-trigger:focus-visible {
  outline: 2px solid var(--interactive-focus-ring);
  outline-offset: 2px;
}

.agreement-participant-row--struck {
  opacity: 0.68;
}

.agreement-participant-row--struck .agreement-participant-name,
.agreement-participant-row--struck .agreement-participant-contact,
.agreement-participant-row--struck .agreement-participant-note {
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

.agreement-participant-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.agreement-participant-name {
  display: block;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.agreement-participant-contact,
.agreement-participant-note,
.agreement-participant-status {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-tertiary);
  overflow-wrap: anywhere;
  word-break: normal;
}

.agreement-participant-note {
  display: block;
  margin-top: 3px;
  font-style: italic;
}

.agreement-participant-status {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  min-width: max-content;
  max-width: 13rem;
  text-align: right;
}

.agreement-participant-status .party-status-badge {
  letter-spacing: 0;
}

.agreement-participant-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  color: var(--grey-400);
}

.agreement-dialog--participant {
  width: min(560px, calc(100vw - 28px));
  max-height: min(760px, calc(100vh - 36px));
  overflow: auto;
}

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

.participant-detail-header h2 {
  margin: 4px 0 2px;
}

.participant-detail-header p {
  color: var(--text-secondary);
  overflow-wrap: anywhere;
}

.participant-detail-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border-default);
  border-radius: 8px;
  background: var(--surface-card);
  color: var(--text-secondary);
  cursor: pointer;
}

.participant-detail-close:hover,
.participant-detail-close:focus-visible {
  background: var(--interactive-hover-surface);
  color: var(--text-primary);
}

.participant-detail-section {
  padding-top: 2px;
}

.participant-detail-section-title {
  margin-bottom: 10px;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0;
}

.participant-timeline,
.participant-metadata-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.participant-timeline-event {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 12px;
  padding: 0 0 16px;
  position: relative;
}

.participant-timeline-event::before {
  content: "";
  position: absolute;
  top: 18px;
  bottom: 0;
  left: 6px;
  width: 1px;
  background: var(--border-default);
}

.participant-timeline-event:last-child {
  padding-bottom: 0;
}

.participant-timeline-event:last-child::before {
  display: none;
}

.participant-timeline-marker {
  width: 13px;
  height: 13px;
  margin-top: 4px;
  border: 2px solid var(--grey-300);
  border-radius: 50%;
  background: var(--surface-card);
  z-index: 1;
}

.participant-timeline-event--success .participant-timeline-marker {
  border-color: var(--green-600);
  background: var(--success-surface);
}

.participant-timeline-event--warning .participant-timeline-marker {
  border-color: var(--amber-600);
  background: var(--warning-surface);
}

.participant-timeline-event--critical .participant-timeline-marker {
  border-color: var(--red-600);
  background: var(--danger-surface);
}

.participant-timeline-topline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.participant-timeline-topline h3 {
  font-size: 14px;
}

.participant-timeline-topline time,
.participant-timeline-topline span {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-tertiary);
}

.participant-timeline-event p {
  margin-top: 2px;
  color: var(--text-secondary);
  font-size: 13px;
}

.participant-metadata {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--border-default);
}

.participant-metadata summary {
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0;
}

.participant-metadata-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.participant-metadata-list div {
  display: grid;
  grid-template-columns: minmax(110px, 0.32fr) minmax(0, 1fr);
  gap: 12px;
}

.participant-metadata-list dt {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
}

.participant-metadata-list dd {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-primary);
  overflow-wrap: anywhere;
}

.participant-detail-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--border-default);
}

.agreement-history-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.agreement-history-event {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--border-default);
}

.agreement-history-event:first-child {
  border-top: 0;
  padding-top: 0;
}

.agreement-history-marker {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-top: 7px;
  background: var(--grey-400);
}

.agreement-history-event--success .agreement-history-marker {
  background: var(--green-600);
}

.agreement-history-event--warning .agreement-history-marker {
  background: var(--amber-600);
}

.agreement-history-event--critical .agreement-history-marker {
  background: var(--red-600);
}

.agreement-history-topline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.agreement-history-topline h3 {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.agreement-history-topline time,
.agreement-history-meta {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-tertiary);
}

.agreement-history-content p {
  margin-top: 4px;
  font-size: 13px;
  color: var(--text-secondary);
}

.agreement-history-fields {
  margin-top: 10px;
}

.agreement-history-warning {
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--warning-surface);
  color: var(--warning-text);
  border: 1px solid var(--warning-border);
}

.agreement-history-text {
  margin-top: 12px;
}

.agreement-history-text-label {
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  margin-bottom: 6px;
}

.agreement-history-text pre {
  max-height: 220px;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius);
  background: var(--surface-subtle);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.agreement-dialog {
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 440px;
  width: calc(100% - 48px);
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow-modal);
  margin: auto;
  background: var(--surface-card);
}

.agreement-dialog:focus {
  outline: none;
}

.agreement-dialog--wide {
  max-width: 560px;
}

.agreement-dialog h2 {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.agreement-dialog p {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.agreement-dialog .textarea {
  min-height: 240px;
  font-family: var(--font-body);
  font-size: 13px;
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 268px;
  gap: 24px;
  align-items: start;
}

.detail-main {
  min-width: 0;
}

.detail-aside {
  display: flex;
  flex-direction: column;
  gap: 16px;
}


.landing-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: calc(100vh - 58px);
}

.landing-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--surface-page);
  min-width: 0;
}

.landing-nav {
  height: var(--header-height);
  background: var(--surface-card);
  border-bottom: 1px solid var(--border-default);
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.landing-nav-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.landing-nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.landing-hero {
  flex: 1;
  padding: 64px 40px 48px;
  max-width: 640px;
}

.landing-eyebrow {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--plum-500);
  margin-bottom: 16px;
}

.landing-h1 {
  font-family: var(--font-heading);
  font-size: 42px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.landing-body {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 32px;
  line-height: 1.7;
}

.landing-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.landing-features {
  background: var(--surface-card);
  border-top: 1px solid var(--border-default);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.landing-feature {
  padding: 28px 32px;
  border-right: 1px solid var(--border-default);
}

.landing-feature:last-child {
  border-right: none;
}

.landing-feature-icon {
  width: 36px;
  height: 36px;
  margin-bottom: 12px;
  color: var(--plum-500);
}

.landing-feature-title {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.landing-feature-text {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}


.mt-4 {
  margin-top: 4px;
}

.mt-8 {
  margin-top: 8px;
}

.mt-12 {
  margin-top: 12px;
}

.mt-16 {
  margin-top: 16px;
}

.mt-20 {
  margin-top: 20px;
}

.mt-24 {
  margin-top: 24px;
}

.mt-32 {
  margin-top: 32px;
}

.mb-4 {
  margin-bottom: 4px;
}

.mb-8 {
  margin-bottom: 8px;
}

.mb-12 {
  margin-bottom: 12px;
}

.mb-16 {
  margin-bottom: 16px;
}

.mb-20 {
  margin-bottom: 20px;
}

.mb-24 {
  margin-bottom: 24px;
}

.mb-32 {
  margin-bottom: 32px;
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.items-start {
  align-items: flex-start;
}

.justify-between {
  justify-content: space-between;
}

.justify-center {
  justify-content: center;
}

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

.gap-4 {
  gap: 4px;
}

.gap-8 {
  gap: 8px;
}

.gap-12 {
  gap: 12px;
}

.gap-16 {
  gap: 16px;
}

.gap-24 {
  gap: 24px;
}

.flex-1 {
  flex: 1;
}

.min-w-0 {
  min-width: 0;
}

.w-full {
  width: 100%;
}

.hidden {
  display: none !important;
}


:focus-visible {
  outline: 2px solid var(--interactive-focus-ring);
  outline-offset: 2px;
}

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


@media (max-width: 860px) {
  .has-mobile-nav .mobile-bottom-nav {
    display: grid;
  }

  .nav-mode-focused_wizard .wizard-max-w {
    padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px) + 18px);
  }

  .wizard-form-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 140;
    align-items: stretch;
    margin: 0;
    padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px));
    background: var(--surface-overlay);
    border-top: 1px solid var(--border-default);
    box-shadow: var(--shadow-mobile-bar);
    backdrop-filter: blur(14px);
  }

  .wizard-form-footer--mobile-only {
    display: flex;
  }

  .mobile-inline-hidden {
    display: none !important;
  }

  .mobile-footer-only {
    display: flex !important;
  }

  .wizard-form-footer > .btn,
  .wizard-form-footer > a,
  .wizard-form-footer > button,
  .wizard-form-footer > form,
  .wizard-form-footer > .signature-finalize-cta,
  .wizard-form-footer .continue-tooltip-wrapper {
    flex: 1 1 0;
    min-width: 0;
  }

  .wizard-form-footer .btn,
  .wizard-form-footer button,
  .wizard-form-footer .signature-finalize-cta {
    min-height: 44px;
    width: 100%;
  }

  .wizard-form-footer .signature-finalize-cta {
    align-items: stretch;
    margin: 0;
    padding: 0;
    text-align: initial;
  }

  .wizard-form-footer .signature-finalize-cta form {
    display: flex;
    width: 100%;
  }

  .wizard-form-footer .btn-ghost {
    background: var(--surface-card);
  }

  dialog.mobile-bottom-sheet-dialog--active {
    --mobile-bottom-sheet-viewport-height: 100dvh;
    --mobile-bottom-sheet-viewport-top: 0px;
    --mobile-bottom-sheet-viewport-bottom: 0px;
    color: var(--text-primary);
  }

  dialog.mobile-bottom-sheet-dialog--active.mobile-bottom-sheet-dialog--carded {
    position: fixed !important;
    inset: var(--mobile-bottom-sheet-viewport-top) 0 auto 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: var(--mobile-bottom-sheet-viewport-height) !important;
    max-height: var(--mobile-bottom-sheet-viewport-height) !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: hidden !important;
  }

  dialog.mobile-bottom-sheet-dialog--active.mobile-bottom-sheet-dialog--carded[open] {
    display: flex;
    align-items: flex-end;
    justify-content: center;
  }

  dialog.mobile-bottom-sheet-dialog--active.mobile-bottom-sheet-dialog--carded > .modal-card {
    width: 100%;
    max-width: none;
    height: min(82dvh, calc(var(--mobile-bottom-sheet-viewport-height) - 8px));
    min-height: min(360px, calc(var(--mobile-bottom-sheet-viewport-height) - 8px));
    max-height: calc(var(--mobile-bottom-sheet-viewport-height) - 8px);
    border-radius: 18px 18px 0 0;
    box-shadow: var(--shadow-mobile-bar);
    animation: mobile-bottom-sheet-enter 0.16s cubic-bezier(0.2, 0, 0, 1) both;
  }

  dialog.mobile-bottom-sheet-dialog--active.mobile-bottom-sheet-dialog--carded.mobile-bottom-sheet-dialog--closing > .modal-card {
    animation: mobile-bottom-sheet-exit 0.14s ease-in both;
  }

  dialog.mobile-bottom-sheet-dialog--active.mobile-bottom-sheet-dialog--carded .modal-card-body {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 24px 20px;
    scroll-padding-bottom: 24px;
    -webkit-overflow-scrolling: touch;
  }

  dialog.mobile-bottom-sheet-dialog--active.mobile-bottom-sheet-dialog--carded .modal-card-footer {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px));
    background: var(--surface-card);
  }

  dialog.mobile-bottom-sheet-dialog--active.mobile-bottom-sheet-dialog--direct {
    position: fixed !important;
    inset: auto 0 var(--mobile-bottom-sheet-viewport-bottom) 0 !important;
    display: flex;
    flex-direction: column;
    width: 100vw !important;
    max-width: 100vw !important;
    max-height: calc(var(--mobile-bottom-sheet-viewport-height) - 8px) !important;
    margin: 0 !important;
    padding: 24px 20px calc(12px + env(safe-area-inset-bottom, 0px)) !important;
    border: 1px solid var(--border-default) !important;
    border-bottom: 0 !important;
    border-radius: 18px 18px 0 0 !important;
    background: var(--surface-card) !important;
    box-shadow: var(--shadow-mobile-bar) !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    scroll-padding-bottom: 96px;
    -webkit-overflow-scrolling: touch;
    animation: mobile-bottom-sheet-enter 0.16s cubic-bezier(0.2, 0, 0, 1) both;
  }

  dialog.mobile-bottom-sheet-dialog--active.mobile-bottom-sheet-dialog--direct.mobile-bottom-sheet-dialog--closing {
    animation: mobile-bottom-sheet-exit 0.14s ease-in both;
  }

  dialog.mobile-bottom-sheet-dialog--active.mobile-bottom-sheet-dialog--direct > form,
  dialog.mobile-bottom-sheet-dialog--active.mobile-bottom-sheet-dialog--direct > div:not(.participant-detail-header) {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
  }

  dialog.mobile-bottom-sheet-dialog--active.mobile-bottom-sheet-dialog--direct .textarea {
    max-height: min(42vh, 320px);
  }

  dialog.mobile-bottom-sheet-dialog--active [data-mobile-sheet-footer],
  dialog.mobile-bottom-sheet-dialog--active .agreement-dialog-actions,
  dialog.mobile-bottom-sheet-dialog--active .participant-detail-actions {
    position: sticky;
    bottom: calc(-12px - env(safe-area-inset-bottom, 0px));
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px !important;
    align-items: stretch !important;
    justify-content: stretch !important;
    margin: auto -20px calc(-12px - env(safe-area-inset-bottom, 0px)) !important;
    padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px));
    background: var(--surface-card);
    border-top: 1px solid var(--border-default);
    box-shadow: 0 -12px 28px rgba(22, 14, 30, 0.08);
    z-index: 2;
  }

  dialog.mobile-bottom-sheet-dialog--active [data-mobile-sheet-footer] .btn,
  dialog.mobile-bottom-sheet-dialog--active [data-mobile-sheet-footer] button,
  dialog.mobile-bottom-sheet-dialog--active [data-mobile-sheet-footer] form,
  dialog.mobile-bottom-sheet-dialog--active .agreement-dialog-actions .btn,
  dialog.mobile-bottom-sheet-dialog--active .agreement-dialog-actions button,
  dialog.mobile-bottom-sheet-dialog--active .agreement-dialog-actions form,
  dialog.mobile-bottom-sheet-dialog--active .participant-detail-actions .btn,
  dialog.mobile-bottom-sheet-dialog--active .participant-detail-actions button,
  dialog.mobile-bottom-sheet-dialog--active .participant-detail-actions form {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    justify-content: center;
  }

  dialog.mobile-bottom-sheet-dialog--active [data-mobile-sheet-footer] form,
  dialog.mobile-bottom-sheet-dialog--active .agreement-dialog-actions form,
  dialog.mobile-bottom-sheet-dialog--active .participant-detail-actions form {
    display: flex;
  }

  dialog.mobile-bottom-sheet-dialog--active [data-mobile-sheet-footer] > :only-child,
  dialog.mobile-bottom-sheet-dialog--active .agreement-dialog-actions > :only-child,
  dialog.mobile-bottom-sheet-dialog--active .participant-detail-actions > :only-child,
  dialog.mobile-bottom-sheet-dialog--active .smart-template-footer-actions > :only-child {
    grid-column: 1 / -1;
  }

  dialog.mobile-bottom-sheet-dialog--active .step-pips {
    justify-content: center;
  }

  dialog.mobile-bottom-sheet-dialog--active .smart-template-footer-actions {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  dialog.mobile-bottom-sheet-dialog--active .smart-template-footer-actions .btn {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    justify-content: center;
  }

  dialog.mobile-bottom-sheet-dialog--active #smart-template-discard-btn:not([hidden]) {
    grid-column: 1 / -1;
  }

  .has-mobile-nav .pub-shell {
    padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px));
  }

  .pub-nav {
    position: sticky;
    top: 0;
    z-index: 300;
    padding: 0;
  }

  .pub-nav-logo img,
  .company-content-logo img {
    max-width: 168px;
    height: auto;
  }

  .pub-nav-links {
    display: none;
  }

  .pub-nav-mobile-actions {
    display: flex;
  }

  .landing-hero {
    padding: 40px 24px 32px;
  }

  .landing-nav {
    padding: 0 24px;
  }

  .landing-ctas {
    flex-direction: column;
  }

  .landing-features {
    grid-template-columns: 1fr;
  }

  .landing-feature {
    border-right: none;
    border-bottom: 1px solid var(--border-default);
  }

  .landing-feature:last-child {
    border-bottom: none;
  }

  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-aside {
    order: -1;
  }

  .agreement-state-card,
  .agreement-detail-grid,
  .agreement-participant-columns {
    grid-template-columns: 1fr;
  }

  .agreement-detail {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .agreement-detail-grid,
  .agreement-action-rail,
  .agreement-detail-main {
    display: contents;
  }

  .agreement-action-rail {
    position: static;
  }

  .agreement-state-card--mobile-order {
    order: 1;
  }

  .agreement-actions-card {
    order: 2;
  }

  .agreement-participants-card {
    order: 3;
  }

  .agreement-meta-card {
    order: 4;
  }

  .agreement-permanent-card {
    order: 5;
  }

  .agreement-notices-card {
    order: 6;
  }

  .agreement-history-card--mobile-order {
    order: 7;
  }

  .agreement-state-meta {
    grid-template-columns: 1fr;
  }

  .agreement-counter-review-bar {
    grid-template-columns: 1fr;
  }

  .agreement-history-topline {
    flex-direction: column;
    gap: 2px;
  }

  .agreement-list--entries {
    display: grid;
    gap: 12px;
    border: 0;
    border-radius: 0;
    background: transparent;
    overflow: visible;
  }

  .agreement-list--entries .agreement-row,
  .agreement-list--entries .agreement-row:last-child {
    border: 1px solid var(--border-default);
    border-radius: 14px;
    background: var(--surface-card);
  }

  .agreement-list--entries .agreement-row:hover {
    background: var(--interactive-hover-surface);
  }

  .agreement-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "main main"
      "status proof";
    gap: 12px 14px;
    padding: 15px 16px;
    align-items: flex-start;
    min-height: auto;
  }

  .agreement-row-title {
    white-space: normal;
    padding-right: 0;
    font-size: 15px;
    margin-bottom: 2px;
  }

  .agreement-row--with-identicon .agreement-row-main {
    min-height: 48px;
    padding-right: 78px;
    padding-left: 0;
  }

  .agreement-row-status {
    align-items: flex-start;
    padding: 8px 0 0;
    border-top: 1px solid var(--border-muted);
    margin-top: 0;
  }

  .agreement-row-proof {
    align-self: stretch;
    align-items: flex-start;
    padding-top: 8px;
    border-top: 1px solid var(--border-muted);
  }

  .agreement-row-identicon {
    top: 0;
    right: 0;
    left: auto;
    width: 68px;
    transform: none;
  }

  .wizard-steps {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 100%;
    min-height: 44px;
    margin: 0 0 20px;
    padding: 8px 12px;
    border: 1px solid var(--border-default);
    border-radius: 999px;
    background: var(--surface-card);
  }

  .wizard-step {
    display: none;
  }

  .wizard-step.current {
    display: flex;
    flex: 1;
    min-width: 0;
    flex-direction: row;
    justify-content: flex-start;
    gap: 8px;
  }

  .wizard-step::after {
    display: none;
  }

  .wizard-step-circle {
    width: 26px;
    height: 26px;
    font-size: 11px;
    flex: 0 0 auto;
  }

  .wizard-step-label {
    min-width: 0;
    margin-top: 0;
    overflow: hidden;
    color: var(--text-primary);
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .wizard-step.current .wizard-step-label::before {
    content: "Current step: ";
    color: var(--text-tertiary);
    font-family: var(--font-body);
    font-weight: 500;
  }

  .wizard-max-w {
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  .modal-shell {
    padding: 0;
  }

  .modal-card {
    border-radius: 0;
    min-height: 100vh;
    box-shadow: none;
  }

  .pub-content {
    padding: 24px 20px;
  }

  .pub-content--public-bounds {
    padding-inline: 0;
  }

  .card {
    padding: 16px;
    border-radius: 12px;
  }

  .signature-method-card {
    padding: 16px !important;
  }

  .signature-method-card__summary {
    align-items: flex-start !important;
    flex-wrap: wrap;
    gap: 12px !important;
  }

  .signature-method-card__icon {
    width: 38px !important;
    height: 38px !important;
  }

  .signature-method-card__body {
    flex: 1 1 calc(100% - 54px) !important;
  }

  .signature-method-card__action {
    flex: 1 1 100% !important;
    width: 100%;
    margin-left: 0 !important;
  }

  .signature-method-card__action form,
  .signature-method-card__action .btn,
  .signature-method-actions .btn,
  .signature-method-actions button,
  .signature-method-actions a {
    width: 100%;
    justify-content: center;
  }

  .signature-method-card__action .btn-sm {
    height: 40px;
    padding: 0 16px;
    font-size: 13px;
  }

  .signature-method-card__action .btn-outline {
    background: var(--interactive-primary);
    border-color: var(--interactive-primary);
    color: var(--text-on-brand);
  }

  .signature-method-card__action .btn-outline:hover:not(:disabled) {
    background: var(--interactive-primary-hover);
    border-color: var(--interactive-primary-hover);
    color: var(--text-on-brand);
  }

  .signature-method-actions {
    flex-direction: column;
    align-items: stretch !important;
  }

  .signature-requirement-row {
    align-items: flex-start !important;
    flex-wrap: wrap;
  }

  .signature-requirement-row > span:last-child {
    flex: 1 1 100%;
    padding-left: 32px;
    white-space: normal !important;
  }

  .otp-group {
    gap: 6px;
    justify-content: space-between;
    margin: 20px 0;
  }

  .otp-digit {
    width: min(42px, calc((100vw - 76px) / 6));
    height: 52px;
    font-size: 22px;
  }

  .verify-hero {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .verify-method-picker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .verify-method-option {
    min-height: 46px;
    justify-content: center;
  }

  .verify-certificate-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .verify-reference-control {
    min-width: 0;
  }

  .agreement-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "main main"
      "status proof";
  }

  .agreement-row-proof {
    justify-content: flex-end;
  }

  .agreement-action-buttons,
  .agreement-dialog-actions,
  .participant-detail-actions,
  .public-agreement-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .agreement-action-buttons .btn,
  .agreement-action-buttons form,
  .agreement-dialog-actions .btn,
  .agreement-dialog-actions form,
  .participant-detail-actions .btn,
  .participant-detail-actions form,
  .public-agreement-actions .btn {
    width: 100%;
  }

  .agreement-participant-trigger {
    grid-template-columns: 34px minmax(0, 1fr) 15px;
    grid-template-areas:
      "avatar main chevron"
      "avatar status chevron";
    align-items: start;
  }

  .agreement-participant-trigger > .party-avatar,
  .agreement-participant-trigger > .identicon-img {
    grid-area: avatar;
  }

  .agreement-participant-main {
    grid-area: main;
  }

  .agreement-participant-status {
    grid-area: status;
    align-items: flex-start;
    min-width: 0;
    max-width: none;
    text-align: left;
  }

  .agreement-participant-chevron {
    grid-area: chevron;
    align-self: center;
  }

  .participant-metadata-list div,
  .agreement-meta-list div,
  .agreement-history-fields div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .agreement-dialog,
  .agreement-dialog--participant {
    width: calc(100vw - 28px);
    max-height: calc(100dvh - 28px);
    padding: 22px;
  }

  .review-popover {
    left: 0 !important;
    right: 0;
    top: auto !important;
    bottom: 0;
    width: 100%;
    padding: 0 12px calc(12px + env(safe-area-inset-bottom, 0px));
  }

  .review-popover-card {
    max-height: min(82dvh, 640px);
    border-radius: 18px 18px 0 0;
  }

  .review-popover-actions {
    position: sticky;
    bottom: 0;
    align-items: stretch;
  }

  .review-popover-actions .btn,
  .review-popover-actions button,
  .review-popover-actions form {
    flex: 1 1 100%;
    width: 100%;
  }

  .landing-h1 {
    font-size: 32px;
  }
}

@media (max-width: 860px) and (prefers-reduced-motion: reduce) {
  dialog.mobile-bottom-sheet-dialog--active.mobile-bottom-sheet-dialog--direct,
  dialog.mobile-bottom-sheet-dialog--active.mobile-bottom-sheet-dialog--direct.mobile-bottom-sheet-dialog--closing,
  dialog.mobile-bottom-sheet-dialog--active.mobile-bottom-sheet-dialog--carded > .modal-card,
  dialog.mobile-bottom-sheet-dialog--active.mobile-bottom-sheet-dialog--carded.mobile-bottom-sheet-dialog--closing > .modal-card {
    animation: none;
  }
}

@media (min-width: 641px) {
  .otp-digit {
    width: 52px;
    height: 64px;
    font-size: 26px;
  }
}



.editor-layout {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 24px;
  align-items: start;
  margin-bottom: 24px;
}

.editor-panel {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.editor-textarea {
  min-height: 420px;
  resize: vertical;
  font-size: 14px;
  line-height: 1.75;
}

.editor-toggle-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.editor-ai-notice {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-tertiary);
}

.btn-link {
  background: none;
  border: none;
  padding: 0;
  font-size: 12px;
  color: var(--text-brand);
  cursor: pointer;
  text-decoration: underline;
  font-family: var(--font-body);
}

.btn-link:hover {
  color: var(--text-brand-strong);
}

.editor-toggle {
  display: inline-flex;
  background: var(--surface-muted);
  border-radius: 100px;
  padding: 3px;
  gap: 2px;
}

.editor-toggle-btn {
  background: none;
  border: none;
  border-radius: 100px;
  padding: 5px 14px;
  font-size: 12px;
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}

.editor-toggle-btn.active {
  background: var(--surface-card);
  color: var(--text-primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}


.review-panel {
  min-width: 0;
  position: sticky;
  top: 24px;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--grey-200) transparent;
}

.review-workbench {
  position: relative;
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: calc(var(--radius-lg) + 2px);
  box-shadow: var(--shadow-card);
  padding: 20px;
  padding-bottom:10px;
  margin-bottom: 24px;
  margin-top: 24px;
}

.review-workbench-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.review-workbench-meta {
  margin: 0;
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-tertiary);
}

.review-analysis-region {

}

.review-selection-banner {
  margin-bottom: 14px;
  background: var(--warning-surface);
  border: 1px solid var(--warning-border);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--warning-text);
}

.review-rail {
  margin-bottom: 8px;
}

.review-rail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.review-rail-title {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.review-rail-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--surface-brand-tint);
  color: var(--text-selected);
  border: 1px solid var(--border-brand-subtle);
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
}

.review-rail-items {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  width: 100%;
  margin: 0;
  padding: 2px 0 8px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}

.review-rail-items::-webkit-scrollbar {
  display: none;
}

.review-rail-stage {
  display: inline-flex;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  align-items: center;
  gap: 9px;
  max-width: none;
}

.review-rail-section {
  position: relative;
}

.review-rail-group {
  display: flex;
  flex-wrap: nowrap;
  gap: 9px;
  align-items: center;
  overflow-x: auto;
  overflow-y: hidden;
  width: 100%;
  margin: 0;
  padding: 2px 0 8px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.review-rail-group::-webkit-scrollbar {
  display: none;
}

.review-rail-group-label {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  background: var(--surface-overlay);
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.review-rail-section--completed .review-rail-group-label {
  display: none;
}

.review-rail-item {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border-default);
  border-radius: 999px;
  background: var(--surface-card);
  padding: 7px 11px;
  cursor: pointer;
  transition: border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.review-rail-item:hover {
  border-color: var(--plum-300);
}

.review-rail-item--resolved {
  opacity: 0.72;
  border-color: var(--green-200);
  background: rgba(236, 253, 245, 0.72);
}

.review-rail-item--historical {
  opacity: 0.42;
}

.review-rail-item-title {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

.review-rail-item-meta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.review-editor-shell {
  position: relative;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  background: var(--surface-card);
  padding: 8px;
  overflow: hidden;
}

.review-editor-textarea {
  min-height: 480px;
  border: none;
  box-shadow: none;
}

.review-editor-shell--editor-focus .review-editor-textarea .tiptap {
  color: rgba(22, 14, 30, 0.5);
}

.review-editor-shell--editor-focus .review-editor-textarea .tiptap li::marker {
  color: rgba(22, 14, 30, 0.5);
}

.review-doc-insertion {
  position: relative;
  margin: 14px 0 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease, background 0.16s ease;
}

.review-doc-insertion p:first-of-type,
.review-doc-insertion ul:first-of-type,
.review-doc-insertion ol:first-of-type {
  margin-top: 0;
}

.review-doc-insertion p {
  display: inline;
  margin: 0;
  line-height: 1.9;
  padding: 0 0.14em;
  border-radius: 0.16em;
  background: rgba(204, 251, 241, 0.72);
  box-shadow: inset 0 -2px 0 rgba(13, 148, 136, 0.5);
  text-decoration: underline;
  text-decoration-color: rgba(13, 148, 136, 0.72);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.review-doc-insertion p+p::before {
  content: "";
  display: block;
  height: 0.95em;
}

.review-doc-insertion p:empty,
.review-doc-insertion p:has(> br.ProseMirror-trailingBreak:only-child) {
  display: none;
}

.review-doc-insertion li {
  padding: 0 0.14em;
  border-radius: 0.16em;
  background: rgba(204, 251, 241, 0.72);
  box-shadow: inset 0 -2px 0 rgba(13, 148, 136, 0.5);
  text-decoration: underline;
  text-decoration-color: rgba(13, 148, 136, 0.72);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.review-doc-insertion--dismissed {
  opacity: 0.74;
}

.review-doc-insertion--dismissed p,
.review-doc-insertion--dismissed li {
  background: rgba(226, 232, 240, 0.78);
  box-shadow: inset 0 -2px 0 rgba(100, 116, 139, 0.38);
  text-decoration-color: rgba(100, 116, 139, 0.72);
}

.review-doc-insertion--dismissed p,
.review-doc-insertion--dismissed li {
  text-decoration: line-through;
  text-decoration-thickness: 1.4px;
  text-decoration-color: rgba(71, 85, 105, 0.7);
}

.review-doc-insertion--active {
  box-shadow: none;
}

.review-doc-insertion--active p,
.review-doc-insertion--active li {
  background: rgba(165, 243, 252, 0.78);
  box-shadow: inset 0 -3px 0 rgba(8, 145, 178, 0.56);
  text-decoration-color: rgba(8, 145, 178, 0.9);
}

.review-editor-shell--editor-focus .review-doc-insertion {
  opacity: 0.76;
}

.review-editor-shell--editor-focus .review-doc-insertion--active {
  opacity: 1;
}

.review-inline-marker {
  cursor: pointer;
  border-radius: 6px;
  padding: 0 2px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  transition: background-color 0.14s ease, box-shadow 0.14s ease, opacity 0.14s ease, color 0.14s ease;
}

.review-inline-marker--critical {
  background: rgba(254, 226, 226, 0.92);
  box-shadow: inset 0 -2px 0 rgba(220, 38, 38, 0.25);
}

.review-inline-marker--high {
  background: rgba(254, 243, 199, 0.95);
  box-shadow: inset 0 -2px 0 rgba(217, 119, 6, 0.26);
}

.review-inline-marker--medium {
  background: rgba(243, 232, 255, 0.95);
  box-shadow: inset 0 -2px 0 rgba(147, 51, 234, 0.18);
}

.review-inline-marker--low {
  background: rgba(243, 244, 246, 0.98);
  box-shadow: inset 0 -2px 0 rgba(156, 163, 175, 0.25);
}

.review-inline-marker--suggestion {
  background: rgba(220, 252, 231, 0.95);
  box-shadow: inset 0 -2px 0 rgba(22, 163, 74, 0.2);
}

.review-inline-marker--candidate {
  background: rgba(219, 234, 254, 0.95);
  box-shadow: inset 0 -2px 0 rgba(37, 99, 235, 0.22);
}

.review-inline-marker--active {
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18);
}

.review-editor-shell--editor-focus .review-inline-marker {
  opacity: 0.5;
}

.review-editor-shell--editor-focus .review-inline-marker--active {
  opacity: 1;
  color: var(--text-primary);
}

.review-inline-marker--resolved {
  background: rgba(220, 252, 231, 0.78);
  box-shadow: inset 0 -2px 0 rgba(22, 163, 74, 0.24);
}

.review-popover {
  position: fixed;
  z-index: 400;
  width: min(420px, calc(100% - 24px));
}

.review-popover-card {
  position: relative;
  isolation: isolate;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  background: var(--surface-elevated);
  box-shadow: 0 24px 48px rgba(22, 14, 30, 0.16);
  overflow-x: hidden;
  overflow-y: auto;
  max-height: min(560px, calc(100vh - 24px));
  overscroll-behavior: contain;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}



.review-popover-card::before {
  inset: 0;
  border-radius: inherit;
  box-shadow:
    inset 0 0 0 1px var(--review-popover-accent-soft, transparent),
    0 18px 42px var(--review-popover-glow, transparent);
}

.review-popover-card::after {
  top: 0;
  left: 18px;
  right: 18px;
  height: 3px;
  border-radius: 0 0 999px 999px;
  background: linear-gradient(90deg,
      var(--review-popover-accent-soft, transparent),
      var(--review-popover-accent, transparent));
}

.review-popover-card--editor-context {
  border-color: var(--review-popover-accent, var(--border-default));
  box-shadow:
    0 24px 48px rgba(22, 14, 30, 0.16),
    0 0 0 1px var(--review-popover-accent-soft, transparent);
}

.review-popover-card--editor-context::before,
.review-popover-card--editor-context::after {
  opacity: 1;
}

.review-popover-card--editor-context .review-popover-actions {
  border-top-color: var(--review-popover-accent-soft, var(--border-default));
}

.review-popover-card--tone-critical {
  --review-popover-accent: var(--red-600);
  --review-popover-accent-soft: rgba(220, 38, 38, 0.18);
  --review-popover-glow: rgba(220, 38, 38, 0.14);
}

.review-popover-card--tone-high {
  --review-popover-accent: var(--amber-600);
  --review-popover-accent-soft: rgba(217, 119, 6, 0.18);
  --review-popover-glow: rgba(217, 119, 6, 0.14);
}

.review-popover-card--tone-medium {
  --review-popover-accent: var(--plum-500);
  --review-popover-accent-soft: rgba(147, 51, 234, 0.18);
  --review-popover-glow: rgba(147, 51, 234, 0.14);
}

.review-popover-card--tone-low {
  --review-popover-accent: var(--grey-500);
  --review-popover-accent-soft: rgba(154, 144, 168, 0.18);
  --review-popover-glow: rgba(154, 144, 168, 0.12);
}

.review-popover-card--tone-suggestion {
  --review-popover-accent: var(--green-600);
  --review-popover-accent-soft: rgba(22, 163, 74, 0.18);
  --review-popover-glow: rgba(22, 163, 74, 0.14);
}

.review-popover-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 12px;
}

.review-popover-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.review-popover-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.review-popover-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.review-popover-pill--critical {
  background: var(--danger-surface);
  color: var(--danger-text);
  border: 1px solid var(--danger-border);
}

.review-popover-pill--high {
  background: var(--warning-surface);
  color: var(--warning-text);
  border: 1px solid var(--warning-border);
}

.review-popover-pill--medium {
  background: var(--info-surface);
  color: var(--info-text);
  border: 1px solid var(--info-border);
}

.review-popover-pill--low {
  background: var(--surface-muted);
  color: var(--text-secondary);
  border: 1px solid var(--border-default);
}

.review-popover-pill--suggestion {
  background: var(--success-surface);
  color: var(--success-text);
  border: 1px solid var(--success-border);
}

.review-popover-mode {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-tertiary);
}

.review-popover-status {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.review-popover-status--pending {
  background: var(--surface-muted);
  color: var(--text-secondary);
  border: 1px solid var(--border-default);
}

.review-popover-status--resolved {
  background: var(--success-surface);
  color: var(--success-text);
  border: 1px solid var(--success-border);
}

.review-popover-explanation {
  margin: 0;
  padding: 0 16px 14px;
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-secondary);
}

.review-popover-compare {
  padding: 0 16px 14px;
}

.review-popover-compare-row {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  align-items: start;
}

.review-popover-compare-row+.review-popover-compare-row {
  margin-top: 12px;
}

.review-popover-compare-label {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.review-popover-compare-row--remove .review-popover-compare-label {
  color: var(--danger-text);
}

.review-popover-compare-row--insert .review-popover-compare-label {
  color: var(--success-text);
}

.review-popover-compare-text {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-primary);
}

.review-popover-compare-text del {
  color: var(--red-500);
  text-decoration-thickness: 2px;
}

.review-popover-compare-text ins {
  color: var(--success-text);
  text-decoration: none;
}

.review-popover-manual-hint {
  margin: 0;
  padding: 0 16px 14px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.review-popover-choice-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 16px 14px;
}

.review-popover-choice {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  border: 1px solid var(--border-default);
  border-radius: 10px;
  background: var(--surface-subtle);
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.review-popover-choice:hover {
  border-color: rgba(37, 99, 235, 0.26);
}

.review-popover-choice--active {
  border-color: rgba(37, 99, 235, 0.32);
  background: var(--info-surface);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}

.review-popover-choice-label {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.review-popover-choice-text {
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-primary);
}

.review-popover-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 14px 16px 16px;
  border-top: 1px solid var(--border-default);
  background: var(--surface-subtle);
}

.placeholder-preview {
  margin: 0 0 18px;
  border: 1px solid rgba(8, 145, 178, 0.16);
  border-radius: 12px;
  background: rgba(236, 254, 255, 0.72);
  padding: 12px 14px;
}

.placeholder-preview-label {
  margin-bottom: 8px;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(14, 116, 144, 0.9);
}

.placeholder-preview-body {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-primary);
}

.placeholder-preview-body p:last-child,
.placeholder-preview-body ul:last-child,
.placeholder-preview-body ol:last-child {
  margin-bottom: 0;
}

.review-section {
  margin-bottom: 20px;
}


.issue-card {
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 8px;
  transition: opacity 0.3s, transform 0.3s;
}

.issue-card--critical {
  background: var(--danger-surface);
  border-color: var(--danger-border);
}

.issue-card--high {
  background: var(--warning-surface);
  border-color: var(--warning-border);
}

.issue-card--medium {
  background: var(--info-surface);
  border-color: var(--info-border);
}

.issue-card--low {
  background: var(--surface-subtle);
  border-color: var(--border-default);
}

.issue-card--resolved {
  opacity: 0;
  transform: translateX(8px);
  pointer-events: none;
}

.issue-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 6px;
}

.issue-card-title {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.issue-card-explanation {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 8px;
}

.issue-card-fix {
  background: var(--surface-subtle);
  border-radius: 6px;
  padding: 6px 10px;
  margin-bottom: 8px;
  font-size: 12px;
  font-family: var(--font-body);
  color: var(--text-secondary);
  border: 1px solid var(--border-default);
}

.issue-card-fix-label {
  font-weight: 600;
  color: var(--text-primary);
  margin-right: 4px;
}

.issue-card-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}


.rec-card {
  background: var(--surface-card);
  border: 1px solid var(--success-border);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 8px;
  transition: opacity 0.2s;
}

.rec-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 6px;
}

.rec-card-title {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.rec-card-explanation {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 8px;
}

.rec-card-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}


.severity-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 100px;
  font-size: 10px;
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.severity-badge--critical {
  background: var(--danger-surface);
  color: var(--danger-text);
  border: 1px solid var(--danger-border);
}

.severity-badge--high {
  background: var(--warning-surface);
  color: var(--warning-text);
  border: 1px solid var(--warning-border);
}

.severity-badge--medium {
  background: var(--info-surface);
  color: var(--info-text);
  border: 1px solid var(--info-border);
}

.severity-badge--low {
  background: var(--surface-muted);
  color: var(--text-secondary);
  border: 1px solid var(--border-default);
}

.rec-category-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 100px;
  font-size: 10px;
  font-family: var(--font-heading);
  font-weight: 700;
  background: var(--success-surface);
  color: var(--success-text);
  border: 1px solid var(--success-border);
  flex-shrink: 0;
}


.nonsense-warning {
  background: var(--warning-surface);
  border: 1px solid var(--warning-border);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--warning-text);
  margin-bottom: 16px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}


.unresolved-warning {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--warning-surface);
  border: 1px solid var(--warning-border);
  border-radius: 100px;
  padding: 6px 14px;
  font-size: 12px;
  font-family: var(--font-body);
  color: var(--warning-text);
  white-space: nowrap;
}


.review-skeleton {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 0;
}

.skeleton-line {
  height: 11px;
  background: linear-gradient(90deg, var(--surface-muted) 25%, var(--surface-elevated) 50%, var(--surface-muted) 75%);
  background-size: 200% 100%;
  border-radius: 100px;
  animation: shimmer 1.4s infinite;
}

.skeleton-line--title {
  width: 45%;
}

.skeleton-line--body {
  width: 70%;
}

.skeleton-card {
  height: 82px;
  background: linear-gradient(90deg, var(--surface-muted) 25%, var(--surface-elevated) 50%, var(--surface-muted) 75%);
  background-size: 200% 100%;
  border-radius: var(--radius);
  animation: shimmer 1.4s infinite;
  border: 1px solid var(--border-default);
}

.mt-16 {
  margin-top: 16px;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}




.issue-card--done {
  padding: 8px 12px;
  min-height: 0;
  background: var(--surface-card);
  border-color: var(--grey-200);
  opacity: 0.8;
  transition: opacity 0.2s;
}

.issue-card--done:hover {
  opacity: 1;
}


.issue-card--done-applied {
  border-color: var(--green-200) !important;
}

.issue-card--done-dismissed {
  border-color: var(--grey-200) !important;
}

.issue-card--done-acknowledged {
  border-color: var(--amber-200) !important;
}


.issue-card-resolved-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.issue-card-resolved-row--applied .issue-card-resolved-icon {
  color: var(--green-600);
  font-weight: 700;
}

.issue-card-resolved-row--acknowledged .issue-card-resolved-icon {
  color: var(--amber-600);
  font-weight: 700;
}

.issue-card-resolved-row--dismissed .issue-card-resolved-icon {
  color: var(--text-tertiary);
  font-weight: 700;
}

.issue-card-resolved-icon {
  font-size: 0.875rem;
  line-height: 1;
  flex-shrink: 0;
}

.issue-card-resolved-label {
  font-family: var(--font-body);
}


.issue-card--needs-ack {
  animation: needs-ack-pulse 0.9s ease-in-out 3;
  border-color: var(--red-300) !important;
}

.identicon-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.identicon-lockup--block {
  display: flex;
}

.identicon-img {
  display: block;
  flex-shrink: 0;
  border: 1px solid var(--border-default);
  border-radius: 6px;
  background: var(--surface-page);
}

.identicon-img--document {
  width: 118px;
  height: auto;
}

.identicon-img--document-mini {
  width: 42px;
  height: auto;
}

.identicon-img--signature {
  width: 34px;
  height: 34px;
}

.identicon-copy {
  min-width: 0;
}

.identicon-label {
  display: block;
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.identicon-hash {
  display: block;
  overflow-wrap: anywhere;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.35;
  color: var(--text-secondary);
}

@keyframes needs-ack-pulse {

  0%,
  100% {
    box-shadow: none;
  }

  50% {
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.25);
  }
}


@media (max-width: 767px) {
  .stage-4-agreement-preview__header {
    flex-direction: column;
    align-items: stretch;
  }

  .stage-4-agreement-preview__header .btn {
    width: 100%;
  }

  .party-initiator-identity {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .party-initiator-identity .party-role-badge {
    margin-left: 44px;
  }

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

  .witness-editor-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .witness-editor-actions > .btn,
  .witness-editor-save-actions,
  .witness-editor-save-actions .btn {
    width: 100%;
  }

  .witness-editor-save-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .editor-layout {
    grid-template-columns: 1fr;
  }

  .review-panel {
    position: static;
    max-height: none;
  }

  .editor-toggle-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .review-workbench {
    padding: 16px;
  }

  .review-popover {
    width: calc(100% - 24px);
  }

  .review-popover-compare-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

@media (max-width: 640px) {
  .review-popover {
    left: 0 !important;
    right: 0;
    top: auto !important;
    bottom: 0;
    width: 100%;
    padding: 0 12px calc(12px + env(safe-area-inset-bottom, 0px));
  }

  .review-popover-card {
    max-height: min(82dvh, 640px);
    border-radius: 18px 18px 0 0;
  }

  .review-popover-actions {
    position: sticky;
    bottom: 0;
    align-items: stretch;
  }

  .review-popover-actions .btn,
  .review-popover-actions button,
  .review-popover-actions form {
    flex: 1 1 100%;
    width: 100%;
  }
}


dialog {
  outline: none;
  color: var(--text-primary);
  background: var(--surface-card);
}

dialog::backdrop {
  background: rgba(22, 14, 30, 0.48);
  backdrop-filter: blur(2px);
}
