:root {
  --lm-ui-bg: #f5f7f5;
  --lm-ui-surface: #ffffff;
  --lm-ui-surface-subtle: #f8faf9;
  --lm-ui-ink: #101615;
  --lm-ui-muted: #66736f;
  --lm-ui-line: #dfe6e2;
  --lm-ui-line-strong: #cbd6d1;
  --lm-ui-green-deep: #10372f;
  --lm-ui-green-soft: #eaf8f2;
  --lm-ui-radius: 8px;
}

html[data-theme="linkmine"],
html[data-theme="linkmine"] body {
  background: var(--lm-ui-bg) !important;
  color: var(--lm-ui-ink) !important;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
  letter-spacing: 0 !important;
}

html[data-theme="linkmine"] body:has(> .lm-doc-navbar-shell)::before {
  display: none !important;
  content: none !important;
}

html[data-theme="linkmine"] :where(h1, h2, h3, h4, h5, h6, p, label, a, button, input, select, textarea, span) {
  letter-spacing: 0 !important;
}

html[data-theme="linkmine"] :where(h1, h2, h3, h4, h5, h6) {
  font-family: inherit !important;
}

html[data-theme="linkmine"] .lm-doc-navbar-shell {
  position: sticky !important;
  top: 0 !important;
  z-index: 70 !important;
  width: 100% !important;
  min-height: 64px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-bottom: 1px solid var(--lm-ui-line) !important;
  border-radius: 0 !important;
  background: rgba(255, 255, 255, 0.96) !important;
  box-shadow: none !important;
  backdrop-filter: saturate(1.1) blur(16px) !important;
}

html[data-theme="linkmine"] .lm-doc-navbar {
  width: min(calc(100% - 48px), 1440px) !important;
  min-height: 64px !important;
  height: auto !important;
  margin: 0 auto !important;
  padding: 0 !important;
  gap: 18px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--lm-ui-ink) !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

html[data-theme="linkmine"] .lm-doc-navbar-start {
  gap: 18px !important;
}

html[data-theme="linkmine"] .lm-doc-navbar-logo-image {
  height: 25px !important;
  max-height: 25px !important;
  max-width: 142px !important;
  filter: drop-shadow(0 1px 1px rgba(16, 55, 47, 0.32));
}

html[data-theme="linkmine"] .lm-doc-workspace-title {
  padding-left: 18px !important;
  border-left: 1px solid var(--lm-ui-line) !important;
  color: var(--lm-ui-muted) !important;
  font-size: 14px !important;
  font-weight: 650 !important;
}

html[data-theme="linkmine"] .lm-doc-navbar-actions,
html[data-theme="linkmine"] .lm-doc-system-nav {
  gap: 2px !important;
  flex-wrap: nowrap !important;
}

html[data-theme="linkmine"] :where(.lm-doc-system-link, .lm-doc-navbar > .lm-doc-navbar-actions > .lm-doc-nav-link) {
  min-height: 44px !important;
  height: 44px !important;
  padding: 0 12px !important;
  border: 1px solid transparent !important;
  border-radius: var(--lm-ui-radius) !important;
  background: transparent !important;
  color: var(--lm-ui-muted) !important;
  box-shadow: none !important;
  font-size: 14px !important;
  font-weight: 600 !important;
}

html[data-theme="linkmine"] :where(.lm-doc-system-link, .lm-doc-navbar > .lm-doc-navbar-actions > .lm-doc-nav-link):hover,
html[data-theme="linkmine"] :where(.lm-doc-system-link, .lm-doc-navbar > .lm-doc-navbar-actions > .lm-doc-nav-link):focus-visible {
  background: #f1f5f3 !important;
  color: var(--lm-ui-ink) !important;
}

html[data-theme="linkmine"] .lm-doc-system-link.is-active {
  background: var(--lm-ui-green-soft) !important;
  color: var(--lm-ui-green-deep) !important;
}

html[data-theme="linkmine"] .lm-doc-user-chip {
  width: 38px !important;
  min-width: 38px !important;
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 !important;
  border: 1px solid var(--lm-ui-green-deep) !important;
  border-radius: var(--lm-ui-radius) !important;
  background: var(--lm-ui-green-deep) !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

html[data-theme="linkmine"] .lm-doc-dropdown,
html[data-theme="linkmine"] .lm-doc-navbar .dropdown-content {
  margin-top: 8px !important;
  padding: 8px !important;
  border: 1px solid var(--lm-ui-line) !important;
  border-radius: var(--lm-ui-radius) !important;
  background: #ffffff !important;
  color: var(--lm-ui-ink) !important;
  box-shadow: 0 16px 36px rgba(16, 55, 47, 0.14) !important;
  backdrop-filter: none !important;
}

html[data-theme="linkmine"] .lm-doc-dropdown :where(a, button, label, span, svg) {
  color: var(--lm-ui-ink) !important;
  stroke: currentColor !important;
}

html[data-theme="linkmine"] .lm-doc-dropdown :where(a, button, label) {
  min-height: 38px !important;
  border-radius: 6px !important;
  font-size: 14px !important;
}

html[data-theme="linkmine"] body > .lm-contract-content-shell {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

html[data-theme="linkmine"] body > .lm-contract-content-shell :where(.lm-contract-dashboard-surface, .lm-contract-detail-surface, .lm-contract-folder-surface, .lm-contract-archive-surface) {
  position: relative !important;
  z-index: 1 !important;
  display: block !important;
  width: min(calc(100% - 48px), 1200px) !important;
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 32px 0 64px !important;
}

html[data-theme="linkmine"] body > .lm-contract-content-shell :where(.lm-contract-dashboard-surface, .lm-contract-detail-surface, .lm-contract-archive-surface)::before {
  display: none !important;
  content: none !important;
}

html[data-theme="linkmine"] body > .lm-contract-content-shell .lm-contract-dashboard-surface > .flex.justify-between.items-center.w-full.mb-4,
html[data-theme="linkmine"] body > .lm-contract-content-shell dashboard-dropzone.lm-contract-dashboard-surface > .flex.justify-between.items-center.w-full.mb-4.relative,
html[data-theme="linkmine"] .lm-contract-folder-surface > dashboard-dropzone > .relative.flex.justify-between.items-center.w-full.mb-4,
html[data-theme="linkmine"] .lm-contract-archive-surface .lm-archive-header,
html[data-theme="linkmine"] body > .lm-contract-content-shell .lm-contract-detail-surface > .flex:first-child {
  min-height: 64px !important;
  margin: 0 0 24px !important;
  gap: 16px !important;
}

html[data-theme="linkmine"] :where(.lm-contract-dashboard-surface, .lm-contract-detail-surface, .lm-contract-folder-surface, .lm-contract-archive-surface) h1,
html[data-theme="linkmine"] .lm-settings-page h1 {
  margin: 0 !important;
  color: var(--lm-ui-ink) !important;
  font-size: 32px !important;
  font-weight: 750 !important;
  line-height: 1.2 !important;
}

html[data-theme="linkmine"] :where(.lm-contract-dashboard-surface, .lm-contract-detail-surface, .lm-contract-folder-surface, .lm-contract-archive-surface) h1 + p {
  margin-top: 6px !important;
  color: var(--lm-ui-muted) !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
}

html[data-theme="linkmine"] :where(.btn, .base-button, .white-button, button[type="submit"], .lm-party-guide-button, .lm-apple-notice-button) {
  min-height: 40px !important;
  height: auto;
  padding: 0 14px !important;
  gap: 8px !important;
  border-radius: var(--lm-ui-radius) !important;
  box-shadow: none !important;
  font-size: 14px !important;
  font-weight: 650 !important;
  line-height: 1 !important;
  transform: none !important;
}

html[data-theme="linkmine"] :where(.base-button, .btn-primary, button[type="submit"]):not(.btn-ghost) {
  border-color: var(--lm-ui-green-deep) !important;
  background: var(--lm-ui-green-deep) !important;
  color: #ffffff !important;
}

html[data-theme="linkmine"] :where(.white-button, .btn-outline, .btn-ghost) {
  border: 1px solid var(--lm-ui-line-strong) !important;
  background: #ffffff !important;
  color: var(--lm-ui-green-deep) !important;
}

html[data-theme="linkmine"] #templates_submissions_toggle.lm-contract-view-toggle {
  min-height: 40px !important;
  padding: 3px !important;
  gap: 3px !important;
  border: 1px solid var(--lm-ui-line) !important;
  border-radius: var(--lm-ui-radius) !important;
  background: #ffffff !important;
}

html[data-theme="linkmine"] #templates_submissions_toggle .lm-contract-toggle-btn {
  min-width: 84px !important;
  min-height: 32px !important;
  height: 32px !important;
  padding: 0 12px !important;
  border-radius: 6px !important;
  background: transparent !important;
  color: var(--lm-ui-muted) !important;
  font-size: 13px !important;
  font-weight: 650 !important;
}

html[data-theme="linkmine"] #templates_submissions_toggle .lm-contract-toggle-btn.is-active,
html[data-theme="linkmine"] #templates_submissions_toggle .lm-contract-toggle-btn:hover {
  background: var(--lm-ui-green-soft) !important;
  color: var(--lm-ui-green-deep) !important;
}

html[data-theme="linkmine"] #templates_upload_button,
html[data-theme="linkmine"] dashboard-dropzone a.white-button[data-turbo-frame="modal"] {
  min-width: 0 !important;
  min-height: 40px !important;
  height: 40px !important;
  padding: 0 14px !important;
  border-radius: var(--lm-ui-radius) !important;
  font-size: 14px !important;
}

html[data-theme="linkmine"] #templates_upload_button {
  border: 1px solid transparent !important;
  background: transparent !important;
  color: var(--lm-ui-green-deep) !important;
}

html[data-theme="linkmine"] .lm-template-card-link {
  padding-right: 96px !important;
  border: 1px solid var(--lm-ui-line) !important;
  border-radius: var(--lm-ui-radius) !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

html[data-theme="linkmine"] .lm-template-card-link:hover,
html[data-theme="linkmine"] .lm-template-card-link:focus-visible {
  border-color: #aebdb6 !important;
  background: var(--lm-ui-surface-subtle) !important;
}

html[data-theme="linkmine"] .lm-template-card-action,
html[data-theme="linkmine"] .lm-contract-folder-surface .lm-template-card-action {
  width: 64px !important;
  min-width: 64px !important;
  min-height: 28px !important;
  height: 28px !important;
  padding: 0 8px !important;
  gap: 4px !important;
  border: 1px solid var(--lm-ui-line) !important;
  border-radius: 6px !important;
  background: #ffffff !important;
  color: var(--lm-ui-green-deep) !important;
  box-shadow: none !important;
  font-size: 12px !important;
}

html[data-theme="linkmine"] :where(.lm-contract-dashboard-surface, .lm-contract-archive-surface, .lm-contract-detail-surface) > .space-y-4 > .bg-base-200,
html[data-theme="linkmine"] .lm-contract-detail-surface .space-y-4 > .bg-base-200 {
  min-height: 84px !important;
  border: 1px solid var(--lm-ui-line) !important;
  border-radius: var(--lm-ui-radius) !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

html[data-theme="linkmine"] :where(.card, .modal-box, .alert, .form-container, .draw-field-container, .field-type-button, .fields-list-item) {
  border-radius: var(--lm-ui-radius) !important;
  box-shadow: none !important;
}

html[data-theme="linkmine"] :where(.base-input, .input, .select, input[type="text"], input[type="email"], input[type="password"], input[type="tel"], input[type="url"], input[type="number"], input[type="date"], select) {
  min-height: 42px !important;
  height: 42px;
  padding: 9px 12px !important;
  border: 1px solid var(--lm-ui-line-strong) !important;
  border-radius: var(--lm-ui-radius) !important;
  background: #ffffff !important;
  color: var(--lm-ui-ink) !important;
  font-size: 14px !important;
  line-height: 1.45 !important;
  box-shadow: none !important;
}

html[data-theme="linkmine"] :where(.textarea, .base-textarea, textarea) {
  min-height: 96px !important;
  padding: 10px 12px !important;
  border: 1px solid var(--lm-ui-line-strong) !important;
  border-radius: var(--lm-ui-radius) !important;
  background: #ffffff !important;
  color: var(--lm-ui-ink) !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
  box-shadow: none !important;
}

html[data-theme="linkmine"] :where(input, select, textarea):focus {
  border-color: #278869 !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(69, 215, 168, 0.2) !important;
}

html[data-theme="linkmine"] .lm-settings-page,
html[data-theme="linkmine"] body > .lm-contract-content-shell:has(#account_settings_menu) {
  width: min(calc(100% - 48px), 1200px) !important;
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 32px 0 64px !important;
}

html[data-theme="linkmine"] body > .lm-contract-content-shell > .lm-settings-page,
html[data-theme="linkmine"] body > .lm-contract-content-shell > div:has(#account_settings_menu) {
  gap: 24px !important;
  margin: 0 auto !important;
}

html[data-theme="linkmine"] #account_settings_menu {
  padding: 8px !important;
  border: 1px solid var(--lm-ui-line) !important;
  border-radius: var(--lm-ui-radius) !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

html[data-theme="linkmine"] .lm-signing-header,
html[data-theme="linkmine"] page-container,
html[data-theme="linkmine"] .lm-completed-card,
html[data-theme="linkmine"] .lm-completed-summary {
  border-radius: var(--lm-ui-radius) !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

html[data-theme="linkmine"] template-builder #title_container.title-container,
html[data-theme="linkmine"] .lm-contract-submission-toolbar {
  width: min(calc(100% - 48px), 1440px) !important;
  min-height: 56px !important;
  margin: 12px auto 16px !important;
  padding: 8px 14px !important;
  border: 1px solid var(--lm-ui-line) !important;
  border-radius: var(--lm-ui-radius) !important;
  background: #ffffff !important;
  color: var(--lm-ui-ink) !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

html[data-theme="linkmine"] template-builder #title_container .template-name,
html[data-theme="linkmine"] .lm-contract-submission-toolbar h1 {
  color: var(--lm-ui-ink) !important;
}

@media (max-width: 920px) {
  html[data-theme="linkmine"] .lm-doc-navbar {
    width: min(calc(100% - 24px), 1440px) !important;
    align-items: center !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    padding: 10px 0 !important;
  }

  html[data-theme="linkmine"] .lm-doc-navbar-actions {
    width: 100% !important;
    overflow-x: auto !important;
    justify-content: flex-start !important;
  }

  html[data-theme="linkmine"] body > .lm-contract-content-shell :where(.lm-contract-dashboard-surface, .lm-contract-detail-surface, .lm-contract-folder-surface, .lm-contract-archive-surface),
  html[data-theme="linkmine"] .lm-settings-page,
  html[data-theme="linkmine"] body > .lm-contract-content-shell:has(#account_settings_menu),
  html[data-theme="linkmine"] body > .lm-contract-content-shell > .lm-settings-page {
    width: min(calc(100% - 24px), 1200px) !important;
    margin: 0 auto !important;
    padding: 24px 0 48px !important;
  }

  html[data-theme="linkmine"] :where(.lm-contract-dashboard-surface, .lm-contract-detail-surface, .lm-contract-folder-surface, .lm-contract-archive-surface) h1,
  html[data-theme="linkmine"] .lm-settings-page h1 {
    font-size: 28px !important;
  }
}

/* 2026-08-04 button readability pass.
 * This file loads after the legacy theme, so it is the single final authority
 * for action contrast across signing, templates, submissions and settings. */
:root {
  --lm-ui-action: #35c196;
  --lm-ui-action-hover: #45d7a8;
  --lm-ui-on-action: #07120f;
  --lm-ui-action-ink: #125b44;
  --lm-ui-action-line: #9fd8c4;
  --lm-ui-action-soft: #eaf8f2;
  --lm-ui-danger: #b42318;
  --lm-ui-danger-hover: #8f1d14;
}

html[data-theme="linkmine"] .btn:not(.btn-primary):not(.btn-neutral):not(.btn-error):not(.btn-warning):not(.btn-success):not(.btn-info):not(.btn-ghost):not(.btn-outline):not(.complete-button),
html[data-theme="linkmine"] :where(.white-button, .btn-outline, .btn-ghost, .lm-signing-flow-secondary) {
  border: 1px solid var(--lm-ui-action-line) !important;
  background: #ffffff !important;
  color: var(--lm-ui-action-ink) !important;
}

html[data-theme="linkmine"] .btn:not(.btn-primary):not(.btn-neutral):not(.btn-error):not(.btn-warning):not(.btn-success):not(.btn-info):not(.btn-ghost):not(.btn-outline):not(.complete-button):hover,
html[data-theme="linkmine"] :where(.white-button, .btn-outline, .btn-ghost, .lm-signing-flow-secondary):hover {
  border-color: #72c5a7 !important;
  background: var(--lm-ui-action-soft) !important;
  color: #0b4735 !important;
}

html[data-theme="linkmine"] :where(.base-button, .btn-primary, .complete-button, .btn-neutral, button[type="submit"], .lm-party-guide-button, .lm-apple-notice-button, .lm-signing-flow-primary):not(.btn-ghost):not(.btn-outline):not(.btn-error):not(.btn-warning) {
  border-color: var(--lm-ui-action) !important;
  background: var(--lm-ui-action) !important;
  color: var(--lm-ui-on-action) !important;
}

html[data-theme="linkmine"] :where(.base-button, .btn-primary, .complete-button, .btn-neutral, button[type="submit"], .lm-party-guide-button, .lm-apple-notice-button, .lm-signing-flow-primary):not(.btn-ghost):not(.btn-outline):not(.btn-error):not(.btn-warning):hover {
  border-color: var(--lm-ui-action-hover) !important;
  background: var(--lm-ui-action-hover) !important;
  color: var(--lm-ui-on-action) !important;
}

html[data-theme="linkmine"] :where(.base-button, .btn-primary, .complete-button, .btn-neutral, button[type="submit"], .lm-party-guide-button, .lm-apple-notice-button, .lm-signing-flow-primary):not(.btn-ghost):not(.btn-outline):not(.btn-error):not(.btn-warning) :where(span, svg),
html[data-theme="linkmine"] :where(.white-button, .btn-outline, .btn-ghost, .lm-signing-flow-secondary) :where(span, svg) {
  color: currentColor !important;
  stroke: currentColor !important;
}

html[data-theme="linkmine"] :where(.btn-error, .btn-danger, button[type="submit"].btn-error, button[type="submit"].btn-danger) {
  border-color: var(--lm-ui-danger) !important;
  background: var(--lm-ui-danger) !important;
  color: #ffffff !important;
}

html[data-theme="linkmine"] :where(.btn-error, .btn-danger, button[type="submit"].btn-error, button[type="submit"].btn-danger):hover {
  border-color: var(--lm-ui-danger-hover) !important;
  background: var(--lm-ui-danger-hover) !important;
  color: #ffffff !important;
}

html[data-theme="linkmine"] .btn-success {
  border-color: var(--lm-ui-action) !important;
  background: var(--lm-ui-action) !important;
  color: var(--lm-ui-on-action) !important;
}

html[data-theme="linkmine"] .btn-success:hover {
  border-color: var(--lm-ui-action-hover) !important;
  background: var(--lm-ui-action-hover) !important;
  color: var(--lm-ui-on-action) !important;
}

html[data-theme="linkmine"] .btn-info {
  border-color: #0b63ce !important;
  background: #0b63ce !important;
  color: #ffffff !important;
}

html[data-theme="linkmine"] .btn-info:hover {
  border-color: #084f9f !important;
  background: #084f9f !important;
  color: #ffffff !important;
}

html[data-theme="linkmine"] .btn-warning {
  border-color: #9a4c00 !important;
  background: #9a4c00 !important;
  color: #ffffff !important;
}

html[data-theme="linkmine"] .btn-warning:hover {
  border-color: #7c3e00 !important;
  background: #7c3e00 !important;
  color: #ffffff !important;
}

html[data-theme="linkmine"] .btn-active:not(.btn-error):not(.btn-warning):not(.btn-info):not(.btn-success) {
  border-color: #72c5a7 !important;
  background: var(--lm-ui-action-soft) !important;
  color: var(--lm-ui-action-ink) !important;
}

html[data-theme="linkmine"] .btn-disabled {
  border-color: #d6dedb !important;
  background: #edf1ef !important;
  color: #7a8782 !important;
  opacity: 1 !important;
}

html[data-theme="linkmine"] :where(.btn, .base-button, .white-button, button[type="submit"], .lm-party-guide-button, .lm-apple-notice-button, .lm-signing-flow-primary, .lm-signing-flow-secondary):focus-visible {
  outline: 3px solid rgba(27, 122, 94, 0.24) !important;
  outline-offset: 2px !important;
}

html[data-theme="linkmine"] :where(.btn, .base-button, .white-button, button[type="submit"], .lm-signing-flow-primary, .lm-signing-flow-secondary):disabled,
html[data-theme="linkmine"] :where(.btn, .base-button, .white-button, button[type="submit"], .lm-signing-flow-primary, .lm-signing-flow-secondary)[aria-disabled="true"] {
  border-color: #d6dedb !important;
  background: #edf1ef !important;
  color: #7a8782 !important;
  cursor: not-allowed !important;
  opacity: 1 !important;
}

/* Compact process guide on the contract entry page. */
html[data-theme="linkmine"] .lm-signing-flow {
  margin: 0 0 24px !important;
  overflow: hidden;
  border: 1px solid var(--lm-ui-line) !important;
  border-radius: 12px !important;
  background: #ffffff !important;
}

html[data-theme="linkmine"] .lm-project-contract-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 1px solid #bfe8d7;
  border-radius: 12px;
  background: #f1faf6;
  color: #173f35;
}

html[data-theme="linkmine"] .lm-project-contract-context > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

html[data-theme="linkmine"] .lm-project-contract-context strong {
  font-size: 14px;
  line-height: 1.45;
}

html[data-theme="linkmine"] .lm-project-contract-context span {
  color: #4c655e;
  font-size: 12px;
  line-height: 1.55;
}

html[data-theme="linkmine"] .lm-project-contract-context-badge {
  flex: none;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border: 1px solid #9fdcc5;
  border-radius: 999px;
  background: #ffffff;
  color: #176b51 !important;
  font-weight: 700;
  white-space: nowrap;
}

html[data-theme="linkmine"] .lm-project-contract-context.is-warning {
  border-color: #ead9a5;
  background: #fff9e8;
  color: #694f13;
}

html[data-theme="linkmine"] .lm-project-contract-context.is-warning span {
  color: #765f2d;
}

@media (max-width: 640px) {
  html[data-theme="linkmine"] .lm-project-contract-context {
    align-items: flex-start;
    flex-direction: column;
  }
}

html[data-theme="linkmine"] .lm-signing-flow-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 22px 18px;
  border-bottom: 1px solid var(--lm-ui-line) !important;
}

html[data-theme="linkmine"] .lm-signing-flow-eyebrow {
  margin: 0 0 3px !important;
  color: var(--lm-ui-action-ink) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

html[data-theme="linkmine"] .lm-signing-flow h2 {
  margin: 0 !important;
  color: var(--lm-ui-ink) !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
}

html[data-theme="linkmine"] .lm-signing-flow-intro p:last-child {
  margin: 5px 0 0 !important;
  color: var(--lm-ui-muted) !important;
  font-size: 13px !important;
}

html[data-theme="linkmine"] .lm-signing-flow-links {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
}

html[data-theme="linkmine"] :where(.lm-signing-flow-primary, .lm-signing-flow-secondary) {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  gap: 7px;
  border-radius: 8px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  text-decoration: none !important;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease !important;
}

html[data-theme="linkmine"] .lm-signing-flow-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

html[data-theme="linkmine"] .lm-signing-flow-steps li {
  display: flex;
  min-width: 0;
  padding: 18px 20px 20px;
  gap: 11px;
}

html[data-theme="linkmine"] .lm-signing-flow-steps li + li {
  border-left: 1px solid var(--lm-ui-line) !important;
}

html[data-theme="linkmine"] .lm-signing-flow-number {
  display: inline-flex;
  flex: 0 0 26px;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--lm-ui-action-soft) !important;
  color: var(--lm-ui-action-ink) !important;
  font-size: 12px !important;
  font-weight: 750 !important;
}

html[data-theme="linkmine"] .lm-signing-flow-steps div {
  min-width: 0;
}

html[data-theme="linkmine"] .lm-signing-flow-steps strong,
html[data-theme="linkmine"] .lm-signing-flow-steps div > span {
  display: block;
}

html[data-theme="linkmine"] .lm-signing-flow-steps strong {
  margin: 2px 0 5px;
  color: var(--lm-ui-ink) !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
}

html[data-theme="linkmine"] .lm-signing-flow-steps div > span {
  color: var(--lm-ui-muted) !important;
  font-size: 12px !important;
  line-height: 1.55 !important;
}

@media (max-width: 920px) {
  html[data-theme="linkmine"] .lm-signing-flow-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  html[data-theme="linkmine"] .lm-signing-flow-steps li:nth-child(3) {
    border-left: 0 !important;
  }

  html[data-theme="linkmine"] .lm-signing-flow-steps li:nth-child(n + 3) {
    border-top: 1px solid var(--lm-ui-line) !important;
  }
}

@media (max-width: 640px) {
  html[data-theme="linkmine"] .lm-signing-flow-intro {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
  }

  html[data-theme="linkmine"] .lm-signing-flow-links,
  html[data-theme="linkmine"] :where(.lm-signing-flow-primary, .lm-signing-flow-secondary) {
    width: 100%;
  }

  html[data-theme="linkmine"] .lm-signing-flow-links {
    flex-direction: column;
  }

  html[data-theme="linkmine"] .lm-signing-flow-steps {
    grid-template-columns: 1fr;
  }

  html[data-theme="linkmine"] .lm-signing-flow-steps li + li {
    border-top: 1px solid var(--lm-ui-line) !important;
    border-left: 0 !important;
  }
}

@media (max-width: 640px) {
  html[data-theme="linkmine"] .lm-doc-workspace-title {
    display: none !important;
  }

  html[data-theme="linkmine"] body > .lm-contract-content-shell .lm-contract-dashboard-surface > .flex.justify-between.items-center.w-full.mb-4,
  html[data-theme="linkmine"] body > .lm-contract-content-shell dashboard-dropzone.lm-contract-dashboard-surface > .flex.justify-between.items-center.w-full.mb-4.relative {
    align-items: flex-start !important;
    flex-direction: column !important;
  }
}

/* High-specificity cleanup for legacy dashboard rules. */
html[data-theme="linkmine"] .lm-doc-system-nav .lm-doc-system-link,
html[data-theme="linkmine"] .lm-doc-navbar .lm-doc-navbar-actions > .lm-doc-nav-link {
  min-height: 44px !important;
  height: 44px !important;
  padding: 0 12px !important;
  border: 1px solid transparent !important;
  border-radius: var(--lm-ui-radius) !important;
  background: transparent !important;
  color: var(--lm-ui-muted) !important;
  box-shadow: none !important;
  font-size: 14px !important;
  font-weight: 600 !important;
}

html[data-theme="linkmine"] .lm-doc-system-nav .lm-doc-system-link.is-active {
  background: var(--lm-ui-green-soft) !important;
  color: var(--lm-ui-green-deep) !important;
}

html[data-theme="linkmine"] body > .lm-contract-content-shell .lm-contract-dashboard-surface,
html[data-theme="linkmine"] body > .lm-contract-content-shell .lm-contract-detail-surface,
html[data-theme="linkmine"] body > .lm-contract-content-shell .lm-contract-folder-surface,
html[data-theme="linkmine"] body > .lm-contract-content-shell .lm-contract-archive-surface,
html[data-theme="linkmine"] body > .lm-contract-content-shell > .lm-settings-page,
html[data-theme="linkmine"] body > .lm-contract-content-shell:has(#account_settings_menu) {
  width: min(calc(100% - 48px), 1200px) !important;
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 32px 0 64px !important;
}

html[data-theme="linkmine"] body > .lm-contract-content-shell .lm-contract-dashboard-surface::before,
html[data-theme="linkmine"] body > .lm-contract-content-shell .lm-contract-detail-surface::before,
html[data-theme="linkmine"] body > .lm-contract-content-shell .lm-contract-archive-surface::before {
  display: none !important;
  content: none !important;
}

html[data-theme="linkmine"] body > .lm-contract-content-shell .lm-contract-dashboard-surface h1,
html[data-theme="linkmine"] body > .lm-contract-content-shell .lm-contract-detail-surface h1,
html[data-theme="linkmine"] body > .lm-contract-content-shell .lm-contract-folder-surface h1,
html[data-theme="linkmine"] body > .lm-contract-content-shell .lm-contract-archive-surface h1,
html[data-theme="linkmine"] body > .lm-contract-content-shell .lm-settings-page h1 {
  margin: 0 !important;
  font-size: 32px !important;
  line-height: 1.2 !important;
  letter-spacing: 0 !important;
}

html[data-theme="linkmine"] body > .lm-contract-content-shell .lm-contract-dashboard-surface .lm-template-card-link,
html[data-theme="linkmine"] body > .lm-contract-content-shell .lm-contract-folder-surface .lm-template-card-link {
  border-radius: var(--lm-ui-radius) !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

html[data-theme="linkmine"] body > .lm-contract-content-shell .lm-contract-dashboard-surface .lm-template-card-action,
html[data-theme="linkmine"] body > .lm-contract-content-shell .lm-contract-folder-surface .lm-template-card-action {
  border-radius: 6px !important;
  box-shadow: none !important;
}

html[data-theme="linkmine"] body > .lm-contract-content-shell :where(
  .lm-contract-dashboard-surface,
  .lm-contract-detail-surface,
  .lm-contract-folder-surface,
  .lm-contract-archive-surface,
  .lm-settings-page
) :where(.btn, .base-button, .white-button, button[type="submit"]) {
  border-radius: var(--lm-ui-radius) !important;
  box-shadow: none !important;
  transform: none !important;
}

html[data-theme="linkmine"] body > .lm-contract-content-shell .lm-contract-dashboard-surface > .space-y-4 > .bg-base-200 :where(.btn, .base-button, .white-button, download-button),
html[data-theme="linkmine"] body > .lm-contract-content-shell .lm-contract-archive-surface > .space-y-4 > .bg-base-200 :where(.btn, .base-button, .white-button, download-button),
html[data-theme="linkmine"] body > .lm-contract-content-shell .lm-contract-detail-surface .space-y-4 > .bg-base-200 :where(.btn, .base-button, .white-button, download-button) {
  min-height: 36px !important;
  height: 36px !important;
  border-radius: var(--lm-ui-radius) !important;
}

html[data-theme="linkmine"] body > .lm-contract-content-shell .lm-contract-detail-surface :where(.btn, .base-button, .white-button),
html[data-theme="linkmine"] body > .lm-contract-content-shell .lm-settings-page :where(.btn, .base-button, .white-button, button[type="submit"]) {
  border-radius: var(--lm-ui-radius) !important;
}

html[data-theme="linkmine"] body > div.lm-contract-content-shell > div.lm-settings-page a.base-button,
html[data-theme="linkmine"] body > div.lm-contract-content-shell > div.lm-settings-page button.btn,
html[data-theme="linkmine"] body > div.lm-contract-content-shell > div.lm-settings-page button[type="submit"] {
  border-radius: 8px !important;
}

html[data-theme="linkmine"] #update_signature_button,
html[data-theme="linkmine"] #update_initials_button {
  border-radius: 8px !important;
}

@media (max-width: 920px) {
  html[data-theme="linkmine"] body > .lm-contract-content-shell .lm-contract-dashboard-surface,
  html[data-theme="linkmine"] body > .lm-contract-content-shell .lm-contract-detail-surface,
  html[data-theme="linkmine"] body > .lm-contract-content-shell .lm-contract-folder-surface,
  html[data-theme="linkmine"] body > .lm-contract-content-shell .lm-contract-archive-surface,
  html[data-theme="linkmine"] body > .lm-contract-content-shell > .lm-settings-page,
  html[data-theme="linkmine"] body > .lm-contract-content-shell:has(#account_settings_menu) {
    width: min(calc(100% - 24px), 1200px) !important;
    margin: 0 auto !important;
    padding: 24px 0 48px !important;
  }
}
