:root {
  --ink: #22251f;
  --muted: #666b5d;
  --line: #d9dccf;
  --surface: #fffffa;
  --page: #f1f3ea;
  --subtle: #f8fafc;
  --blue: #4a685e;
  --blue-dark: #40504a;
  --red: #e25c22;
  --red-dark: #744c31;
  --amber: #776b3f;
  --success: #527257;
  --danger: #895249;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
  --shadow-soft: 0 10px 28px rgba(34, 37, 31, 0.08);
  --shadow-lift: 0 16px 38px rgba(34, 37, 31, 0.12);
  --shadow-inset: inset 0 1px 0 rgba(255, 255, 255, 0.65);
  --radius: 8px;
  --radius-sm: 6px;
  --focus-ring: 0 0 0 3px color-mix(in srgb, var(--blue) 18%, transparent);
  --shell-max: 1680px;
  --shell-gutter: 20px;
  --shell-wide-gutter: 12px;
}

:root[data-theme="dark"] {
  --ink: #edf0e8;
  --muted: #b7bda9;
  --line: #3a4236;
  --surface: #161a15;
  --page: #0f130f;
  --subtle: #1d231c;
  --blue: #8aa99d;
  --blue-dark: #b7c6bd;
  --red: #f07a3d;
  --red-dark: #d19772;
  --amber: #c9ba7b;
  --success: #93b88f;
  --danger: #d39186;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.42);
  --shadow-soft: 0 12px 32px rgba(0, 0, 0, 0.26);
  --shadow-lift: 0 18px 42px rgba(0, 0, 0, 0.34);
  --shadow-inset: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  --focus-ring: 0 0 0 3px color-mix(in srgb, var(--blue) 24%, transparent);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--page) 88%, var(--surface)) 0, var(--page) 280px),
    var(--page);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, Helvetica, sans-serif;
  line-height: 1.45;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 10px 32px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  border-top: 4px solid var(--blue);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
}

.brand {
  color: var(--blue);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0;
  text-decoration: none;
}

.brand::after {
  content: "";
  display: block;
  width: 38px;
  height: 3px;
  margin-top: 2px;
  background: var(--red);
}

.nav {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
}

.nav a,
.link-button,
.theme-toggle {
  color: var(--ink);
  text-decoration: none;
}

.nav a:hover,
.link-button:hover,
.theme-toggle:hover {
  color: var(--blue);
}

.nav a:not(.button),
.link-button {
  border-radius: 999px;
  padding: 6px 2px;
}

.inline-form {
  display: inline;
}

.link-button {
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  padding: 0;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  min-height: 34px;
  padding: 4px 10px 4px 6px;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease;
}

.theme-toggle[aria-pressed="true"] {
  background: var(--subtle);
  border-color: var(--line);
  color: var(--ink);
}

.theme-toggle-track {
  position: relative;
  display: inline-flex;
  width: 42px;
  height: 22px;
  flex: 0 0 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--page);
  transition:
    background-color 180ms ease,
    border-color 180ms ease;
}

.theme-toggle-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: var(--shadow);
  transition:
    transform 220ms ease,
    background-color 180ms ease;
}

.theme-toggle-label {
  min-width: 76px;
  text-align: left;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 16%, transparent);
}

.theme-toggle[aria-pressed="true"] .theme-toggle-track {
  background: var(--blue);
  border-color: var(--blue);
}

.theme-toggle[aria-pressed="true"] .theme-toggle-knob {
  transform: translateX(20px);
  background: var(--surface);
}

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

.page-shell {
  flex: 1 0 auto;
  width: min(var(--shell-max), calc(100% - var(--shell-gutter)));
  margin: 26px auto 56px;
}

.page-shell-wide {
  width: calc(100% - var(--shell-wide-gutter));
  max-width: none;
}

.site-footer {
  flex-shrink: 0;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 94%, var(--page));
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 2fr);
  gap: 24px;
  width: min(var(--shell-max), calc(100% - var(--shell-gutter)));
  margin: 0 auto;
  padding: 22px 0 14px;
}

.footer-brand p {
  max-width: 320px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

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

.footer-column {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.footer-column h2 {
  margin: 0;
  font-size: 14px;
  flex: 0 0 100%;
}

.footer-column a {
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}

.footer-column a:hover {
  color: var(--blue);
  text-decoration: underline;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(var(--shell-max), calc(100% - var(--shell-gutter)));
  margin: 0 auto;
  padding: 10px 0 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.footer-theme-toggle {
  flex: 0 0 auto;
  margin-left: auto;
}

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
  gap: 28px;
  min-height: 360px;
  margin-bottom: 28px;
  padding: 38px;
  color: #fff;
  background: var(--blue);
  border-radius: var(--radius);
  border-bottom: 5px solid var(--red);
  box-shadow: var(--shadow-soft);
}

.hero-copy {
  align-self: center;
  max-width: 700px;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 72px);
  line-height: 0.98;
}

.hero-copy p:not(.eyebrow) {
  max-width: 580px;
  margin: 16px 0 0;
  color: #e6eef7;
  font-size: 19px;
}

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

.hero-market-board {
  align-self: end;
  display: grid;
  gap: 10px;
}

.hero-market-board div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.1);
}

.hero-market-board span {
  color: #e6eef7;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-market-board strong {
  font-size: 26px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 15px;
  border: 1px solid var(--red);
  border-radius: var(--radius-sm);
  background: var(--red);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.button:hover {
  background: var(--red-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.button:focus-visible,
.link-button:focus-visible,
.nav a:focus-visible {
  outline: 0;
  box-shadow: var(--focus-ring);
}

.button-secondary {
  color: var(--blue);
  background: color-mix(in srgb, var(--surface) 92%, var(--page));
  border-color: var(--line);
}

.button-secondary:hover {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}

.button-danger {
  color: #fff;
  background: var(--danger);
  border-color: var(--danger);
}

.button-danger:hover {
  background: var(--red-dark);
  border-color: var(--red-dark);
}

.button:disabled,
.button[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(0.25);
  transform: none;
  box-shadow: none;
}

.button-small {
  min-height: 34px;
  padding: 7px 12px;
}

.button-icon {
  width: 34px;
  min-width: 34px;
  padding: 7px;
  justify-content: center;
}

.button-icon span[aria-hidden="true"] {
  font-size: 11px;
  line-height: 1;
}

.button-icon svg {
  display: block;
}

.button-full {
  width: 100%;
}

.message-stack {
  width: min(1440px, calc(100% - 20px));
  margin: 14px auto 0;
}

.message {
  margin-bottom: 8px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.message-success {
  border-color: #7ab8a9;
}

.message-error {
  border-color: #d88d8d;
  color: var(--danger);
}

.message-info {
  border-color: #9fb8dc;
  color: var(--blue);
}

.market-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
  padding-bottom: 2px;
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.section-heading h1,
.market-header h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.01em;
}

.market-header h2 {
  margin: 0;
  font-size: 28px;
}

.content-section-header {
  margin-top: 24px;
}

.section-heading h2,
.dashboard-section h2,
.detail-main h2,
.form-panel h2 {
  margin-top: 0;
  font-size: 18px;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--red);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.landing-hero .eyebrow {
  color: #fff;
}

.filter-bar {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr auto auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 96%, #fff) 0, var(--surface) 100%),
    var(--surface);
  box-shadow: var(--shadow-soft), var(--shadow-inset);
}

.filter-modal {
  width: min(760px, calc(100vw - 28px));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 24px 70px rgb(0 0 0 / 45%);
}

.filter-modal::backdrop {
  background: rgb(0 0 0 / 55%);
}

.filter-modal-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
}

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

.filter-checkboxes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.filter-checkboxes legend {
  padding: 0 6px;
  font-weight: 900;
}

.filter-checkboxes label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-checkboxes input {
  width: auto;
}

.filter-modal-actions {
  justify-content: flex-end;
}

.pagination-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 24px 0 6px;
}

.content-page {
  display: grid;
  gap: 20px;
}

.page-summary {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.prose {
  max-width: 820px;
}

.prose p {
  margin: 0 0 14px;
}

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

.docs-hero {
  align-items: end;
}

.docs-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.docs-nav {
  position: sticky;
  top: 84px;
  display: grid;
  gap: 2px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.docs-nav a {
  padding: 8px 9px;
  border-radius: var(--radius-sm);
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  transition:
    background-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.docs-nav a:hover {
  background: color-mix(in srgb, var(--blue) 9%, var(--surface));
  transform: translateX(2px);
}

.docs-content {
  display: grid;
  gap: 28px;
}

.docs-section {
  display: grid;
  gap: 10px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 90px;
}

.docs-section:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.docs-section h2,
.docs-section h3,
.docs-section p {
  margin: 0;
}

.docs-section h2 {
  font-size: 28px;
}

.docs-section h3 {
  font-size: 18px;
}

.docs-section ul {
  margin: 0;
  padding-left: 20px;
}

.docs-section li {
  margin: 5px 0;
}

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

.docs-grid > div {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--page) 78%, var(--surface));
  box-shadow: var(--shadow);
}

.faq-page {
  gap: 16px;
}

.faq-search {
  display: grid;
  gap: 8px;
}

.faq-results-count {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.faq-group {
  display: grid;
  gap: 10px;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.faq-popular {
  border-color: rgba(74, 104, 94, 0.45);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: 54px;
  padding: 14px 16px;
  border: 0;
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
}

.faq-question:hover {
  background: color-mix(in srgb, var(--surface) 70%, var(--page));
}

.faq-question small {
  display: block;
  margin-bottom: 3px;
  color: var(--red);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.faq-icon {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  position: relative;
}

.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  background: var(--blue);
  border-radius: 999px;
  transition: transform 180ms ease;
}

.faq-icon::before {
  top: 8px;
  left: 2px;
  width: 14px;
  height: 2px;
}

.faq-icon::after {
  top: 2px;
  left: 8px;
  width: 2px;
  height: 14px;
}

.faq-question[aria-expanded="true"] .faq-icon::after {
  transform: rotate(90deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 220ms ease;
}

.faq-answer p {
  margin: 0;
  padding: 0 16px 16px;
  color: var(--muted);
}

.faq-empty {
  margin-top: 4px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.form-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--ink);
  background: color-mix(in srgb, var(--surface) 96%, var(--page));
  font: inherit;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: 0;
  border-color: var(--blue);
  background: var(--surface);
  box-shadow: var(--focus-ring);
}

input[readonly],
.input-readonly {
  color: var(--muted);
  background: color-mix(in srgb, var(--page) 78%, var(--line));
}

.field,
.field-grid {
  display: grid;
  gap: 8px;
}

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

.listing-field-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

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

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

.checkbox-dropdown {
  position: relative;
}

.checkbox-dropdown summary {
  cursor: pointer;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: color-mix(in srgb, var(--surface) 94%, var(--page));
  font-weight: 700;
}

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

.checkbox-dropdown-panel {
  position: absolute;
  z-index: 20;
  width: min(100%, 420px);
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.checkbox-dropdown-panel ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.checkbox-dropdown-panel label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.choice-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: color-mix(in srgb, var(--surface) 94%, var(--page));
  cursor: pointer;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease;
}

.choice-card:has(input:checked) {
  border-color: var(--blue);
  background: color-mix(in srgb, var(--blue) 8%, var(--surface));
  box-shadow: inset 0 0 0 1px var(--blue);
}

.form-subsection {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--subtle) 84%, var(--surface));
}

.form-subsection h3 {
  margin: 0;
  font-size: 18px;
}

.sale-contract-summary .section-row {
  align-items: flex-start;
}

.contract-drawer[hidden] {
  display: none;
}

.contract-drawer {
  position: fixed;
  inset: 0;
  z-index: 40;
  opacity: 0;
  pointer-events: none;
}

.contract-drawer.contract-drawer-open,
.contract-drawer.contract-drawer-closing {
  opacity: 1;
  pointer-events: auto;
}

.contract-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 19, 15, 0.46);
  opacity: 0;
  backdrop-filter: blur(2px);
}

.contract-drawer-open .contract-drawer-backdrop {
  opacity: 1;
  animation: contractBackdropIn 240ms ease both;
}

.contract-drawer-closing .contract-drawer-backdrop {
  opacity: 0;
  animation: contractBackdropOut 180ms ease both;
}

.contract-drawer-panel {
  position: absolute;
  top: 18px;
  left: 50%;
  bottom: 18px;
  width: min(1440px, calc(100vw - 36px));
  transform: translateX(-50%) translateY(18px) scale(0.985);
  opacity: 0;
  overflow: auto;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
  will-change: transform, opacity;
}

.contract-drawer-open .contract-drawer-panel {
  transform: translateX(-50%) translateY(0) scale(1);
  opacity: 1;
  animation: contractPanelIn 340ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.contract-drawer-closing .contract-drawer-panel {
  transform: translateX(-50%) translateY(12px) scale(0.99);
  opacity: 0;
  animation: contractPanelOut 210ms ease both;
}

body.contract-drawer-active {
  overflow: hidden;
}

@keyframes contractBackdropIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes contractBackdropOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes contractPanelIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(34px) scale(0.955);
  }
  70% {
    opacity: 1;
    transform: translateX(-50%) translateY(-2px) scale(1.002);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

@keyframes contractPanelOut {
  from {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateX(-50%) translateY(18px) scale(0.985);
  }
}

.contract-drawer-header,
.contract-builder-grid,
.contract-template-row {
  display: grid;
  gap: 16px;
}

.contract-drawer-header {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 92%, var(--page));
  box-shadow: var(--shadow);
}

.contract-drawer-header h2 {
  margin: 0;
  font-size: 28px;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

.contract-builder-grid {
  grid-template-columns: minmax(420px, 0.95fr) minmax(520px, 1.05fr);
  align-items: start;
}

.contract-builder-form,
.contract-step,
.contract-preview {
  display: grid;
  gap: 12px;
}

.contract-inline-fields {
  display: grid;
  grid-template-columns: minmax(110px, 0.8fr) minmax(150px, 1.2fr);
  gap: 10px;
}

.contract-step,
.contract-preview {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--subtle) 88%, var(--surface));
  box-shadow: var(--shadow);
}

.contract-step h3,
.contract-preview h3,
.contract-template-row h3 {
  margin: 0;
}

.contract-preview {
  position: sticky;
  top: 0;
}

.contract-preview pre,
.contract-preview textarea {
  min-height: 520px;
  max-height: 58vh;
  overflow: auto;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
  resize: vertical;
}

.contract-template-editor-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.62fr) minmax(520px, 1.38fr);
  gap: 18px;
  align-items: start;
}

.contract-drawer-preview textarea {
  min-height: 62vh;
}

.contract-viewer {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--subtle) 88%, var(--surface));
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.contract-viewer pre {
  max-height: 420px;
  overflow: auto;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.contract-upload-step {
  margin-top: 10px;
}

.contract-template-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.contract-template-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding: 14px;
  border-top: 1px solid var(--line);
}

.contract-template-actions {
  display: flex;
  justify-content: flex-end;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.checkbox-row input {
  width: auto;
  margin: 0;
}

.location-picker {
  position: relative;
}

.country-picker {
  display: block;
  position: relative;
}

.location-suggestions,
.country-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 30;
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-lift);
}

.location-suggestion,
.location-suggestion-empty,
.country-suggestion {
  display: block;
  width: 100%;
  min-height: 38px;
  padding: 9px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  background: transparent;
  font: inherit;
  text-align: left;
}

.location-suggestion,
.country-suggestion {
  cursor: pointer;
}

.location-suggestion:hover,
.location-suggestion:focus,
.country-suggestion:hover,
.country-suggestion:focus {
  color: #fff;
  background: var(--blue);
  outline: 0;
}

.country-suggestion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.country-suggestion span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.country-suggestion:hover span,
.country-suggestion:focus span {
  color: #fff;
}

.location-suggestion-empty {
  color: var(--muted);
}

.listing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(246px, 1fr));
  gap: 16px;
  justify-content: stretch;
}

.page-shell-wide .listing-grid {
  grid-template-columns: repeat(auto-fill, minmax(246px, 1fr));
}

.listing-card,
.dashboard-section,
.form-panel,
.action-panel,
.detail-main,
.empty-state,
.narrow-panel,
.wide-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.listing-card {
  display: grid;
  grid-template-rows: auto minmax(26px, auto) minmax(42px, auto) 20px minmax(72px, auto) auto;
  gap: 10px;
  padding: 0 14px 14px;
  min-height: 446px;
  overflow: hidden;
  align-content: stretch;
  transition:
    border-color 160ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.listing-card:hover {
  border-color: color-mix(in srgb, var(--blue) 36%, var(--line));
  box-shadow: var(--shadow-lift);
  transform: translateY(-2px);
}

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

.career-card {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.career-card h2 {
  margin: 0;
  font-size: 20px;
}

.listing-card h2 {
  margin: 0;
  font-size: 17px;
  line-height: 1.24;
  min-height: 42px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.listing-card h2 a {
  text-decoration: none;
}

.listing-card h2 a:hover {
  color: var(--blue);
  text-decoration: underline;
}

.listing-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.listing-card > p:nth-of-type(1) {
  min-height: 20px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.listing-card > p:nth-of-type(2) {
  min-height: 72px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.listing-card-media {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 170px;
  margin: 0 -14px 0;
  overflow: hidden;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--blue) 10%, var(--subtle)), var(--subtle));
  text-decoration: none;
}

.listing-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.listing-card-media-empty span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 26px;
  align-content: start;
  overflow: hidden;
  color: var(--blue);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.card-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 7px;
  border: 1px solid color-mix(in srgb, var(--blue) 22%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--blue) 7%, var(--surface));
}

.metric-row,
.detail-metrics {
  display: grid;
  gap: 10px;
  margin: 0;
}

.metric-row {
  grid-template-columns: 1fr 1fr;
  align-self: end;
  margin-top: auto;
  position: relative;
}

.detail-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 22px 0;
}

.metric-row div,
.detail-metrics div {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--subtle) 88%, var(--surface));
}

.metric-row div {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 64px;
  min-width: 0;
  overflow: hidden;
}

.metric-row dd {
  white-space: nowrap;
  line-height: 1.18;
  margin-top: 4px;
}

.metric-row-reveal .metric-available {
  position: relative;
  z-index: 2;
  justify-self: start;
  width: 100%;
  transition:
    width 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.metric-row-reveal .metric-full {
  display: none;
}

.listing-card:hover .metric-row-reveal .metric-available,
.metric-row-reveal .metric-available:focus {
  width: calc(200% + 10px);
  border-color: color-mix(in srgb, var(--accent) 68%, var(--line));
  box-shadow: 0 12px 28px color-mix(in srgb, var(--text) 14%, transparent);
}

.listing-card:hover .metric-row-reveal .metric-compact,
.metric-row-reveal .metric-available:focus .metric-compact {
  display: none;
}

.listing-card:hover .metric-row-reveal .metric-full,
.metric-row-reveal .metric-available:focus .metric-full {
  display: inline;
}

.auction-countdown-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line));
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
}

.auction-countdown-line span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.auction-countdown-line strong {
  color: var(--text);
  font-size: 13px;
  text-align: right;
}

dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

dd {
  margin: 3px 0 0;
  font-weight: 900;
}

.locked-note,
.muted,
.form-note,
.seller-line {
  color: var(--muted);
}

.listing-gallery {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 10px;
  max-width: 820px;
  margin: 22px 0;
}

.listing-gallery img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}

.listing-gallery img:first-child {
  grid-row: span 2;
  height: 350px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 22px;
}

.tag-list span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--blue-dark);
  background: var(--subtle);
  font-size: 13px;
  font-weight: 900;
}

.trade-note-list {
  display: grid;
  gap: 10px;
  margin: 10px 0 22px;
}

.trade-note-list div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--subtle) 88%, var(--surface));
}

.trade-note-list dd {
  font-weight: 400;
}

.listing-map-section {
  margin-top: 24px;
}

.listing-map {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  margin-top: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--page) 72%, var(--line));
  box-shadow: var(--shadow-soft);
}

.listing-map iframe {
  width: 100%;
  height: 280px;
  border: 0;
}

.listing-map .leaflet-container,
.listing-map.leaflet-container {
  width: 100%;
  height: 280px;
}

.listing-map p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.map-fallback {
  display: inline-flex;
  margin-top: 8px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
}

.map-fallback:hover {
  text-decoration: underline;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 980px) 340px;
  justify-content: center;
  gap: 18px;
  align-items: start;
}

.detail-main,
.action-panel,
.narrow-panel,
.wide-panel {
  padding: 24px;
}

.narrow-panel {
  width: min(560px, 100%);
  margin: 0 auto;
}

.checkout-review-panel {
  box-sizing: border-box;
  width: min(1180px, 100%);
  margin: 0 auto;
  padding-top: 18px;
}

.checkout-review-panel .section-heading {
  margin-bottom: 18px;
}

.checkout-review-grid {
  display: grid;
  grid-template-columns: minmax(340px, 0.9fr) minmax(480px, 1.1fr);
  gap: 20px;
  align-items: stretch;
}

.checkout-review-left,
.checkout-review-right {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.checkout-review-right {
  grid-auto-rows: minmax(0, auto);
}

.checkout-review-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 96%, var(--red) 4%), var(--surface));
  box-shadow: var(--shadow-soft);
}

.checkout-review-hero {
  position: relative;
  border-top: 3px solid var(--red);
}

.checkout-review-hero h2 {
  max-width: 680px;
  margin: 10px 0 4px;
  font-size: 24px;
  line-height: 1.15;
}

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

.checkout-card-heading h3,
.checkout-review-confirm h3 {
  margin: 0;
  font-size: 18px;
}

.checkout-review-value {
  display: grid;
  gap: 4px;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--red) 36%, var(--line));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--page) 84%, var(--red) 16%);
}

.checkout-review-value span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.checkout-review-value strong {
  color: var(--amber);
  font-size: 30px;
  line-height: 1.05;
}

.checkout-review-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.checkout-review-facts div {
  min-height: 82px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--page) 82%, var(--surface) 18%);
}

.checkout-review-facts .checkout-review-fact-wide {
  grid-column: 1 / -1;
}

.checkout-review-facts dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.checkout-review-facts dd {
  margin: 6px 0 0;
  font-weight: 800;
  line-height: 1.35;
}

.checkout-review-terms {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
}

.checkout-review-terms h3 {
  margin: 0;
}

.checkout-review-terms pre {
  flex: 1;
  max-height: 560px;
  min-height: 0;
  margin: 0;
  padding: 16px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--page) 88%, var(--surface) 12%);
  font: inherit;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.checkout-review-confirm {
  display: grid;
  gap: 14px;
}

.checkout-action-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.checkout-review-confirm .checkbox-line {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--page) 88%, var(--surface) 12%);
}

.checkout-review-confirm .button {
  justify-self: start;
}

.price-block {
  display: grid;
  gap: 4px;
  margin-bottom: 16px;
}

.price-block .label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.price-block strong {
  color: var(--blue);
  font-size: 30px;
  line-height: 1.1;
}

.price-block small {
  color: var(--muted);
}

.panel-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 15px;
}

.timeline-event {
  position: relative;
  padding-left: 15px;
  border-left: 2px solid var(--line);
}

.timeline-event::before {
  content: "";
  position: absolute;
  top: 4px;
  left: -6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--blue);
}

.timeline-event-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 5px;
}

.timeline-event p {
  margin: 0 0 5px;
  font-size: 0.95rem;
}

.timeline-event-actor {
  font-size: 0.85rem;
}

.order-row {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

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

.order-row-main {
  flex: 1;
  min-width: 0;
}

.order-row-status {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  min-width: 180px;
  text-align: right;
}

.order-row-status .label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
}

.orders-list-actions {
  margin-top: 10px;
}

.offer-panel,
.chat-offer-card,
.offer-row {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--subtle) 88%, var(--surface));
}

.offer-panel {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding: 14px;
}

.offer-action-form {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.offer-action-form input {
  width: 130px;
}

.chat-offer-card {
  display: inline-grid;
  gap: 8px;
  margin-top: 8px;
  padding: 10px;
}

.chat-offer-card span,
.chat-offer-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.chat-offer-card span {
  text-transform: uppercase;
}

.chat-offer-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.offer-table {
  display: grid;
  gap: 0;
}

.offer-row {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 150px 330px;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 0;
  border-width: 1px 0 0;
  background: transparent;
}

.offer-row:first-child {
  border-top: 0;
}

.offer-row > div:first-child {
  display: grid;
  gap: 3px;
}

.offer-row span {
  color: var(--muted);
  font-size: 13px;
}

.stacked-form,
.form-panel {
  display: grid;
  gap: 14px;
  align-content: start;
}

.stacked-form p,
.form-panel p {
  margin: 0;
}

.form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
  align-items: start;
  gap: 18px;
}

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

.form-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.form-field-full {
  grid-column: 1 / -1;
}

.checkbox-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.sale-type-options ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.sale-type-options label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--surface) 94%, var(--page));
  font-weight: 800;
}

.auction-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.auction-panel-header h2 {
  margin: 0;
}

.auction-fieldset {
  display: grid;
  gap: 14px;
  align-content: start;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.start-now-checkbox {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--surface) 96%, var(--page));
}

.form-panel-disabled {
  color: var(--muted);
  background: color-mix(in srgb, var(--page) 78%, var(--surface));
}

.form-panel-disabled input,
.form-panel-disabled select,
.form-panel-disabled textarea {
  color: var(--muted);
  background: color-mix(in srgb, var(--page) 82%, var(--line));
  cursor: not-allowed;
}

.form-actions {
  grid-column: 1 / -1;
}

.form-actions-inline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.upload-field input[type="file"] {
  padding: 14px;
  border-style: dashed;
  background: color-mix(in srgb, var(--subtle) 82%, var(--surface));
}

.existing-image-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 132px));
  gap: 8px;
  justify-content: start;
}

.existing-image-strip img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.seller-activity-shell {
  display: grid;
  gap: 12px;
}

.seller-activity-toolbar,
.seller-activity-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.seller-activity-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
}

.seller-activity-toolbar h2,
.seller-activity-toolbar p {
  margin: 0;
}

.seller-activity-toolbar p,
.seller-activity-status {
  color: var(--muted);
  font-size: 13px;
}

.seller-activity-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.seller-activity-status::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--success);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--success) 40%, transparent);
  animation: chatLightGreen 1400ms ease-in-out infinite;
}

.seller-activity-shell[data-live-state="inactive"] .seller-activity-status::before {
  background: var(--danger);
  animation-name: chatLightRed;
}

.seller-activity-list {
  display: grid;
  gap: 12px;
}

.seller-activity-card {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr) 150px;
  gap: 16px;
  align-items: stretch;
  padding: 14px;
}

.seller-activity-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 118px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--subtle);
  color: var(--blue);
  font-size: 34px;
  font-weight: 900;
  text-decoration: none;
}

.seller-activity-thumb img {
  width: 100%;
  height: 100%;
  min-height: 118px;
  object-fit: cover;
}

.seller-activity-main {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.seller-activity-heading {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
}

.seller-activity-heading h2 {
  margin: 3px 0 2px;
  font-size: 20px;
  line-height: 1.18;
}

.seller-activity-heading h2 a {
  color: inherit;
  text-decoration: none;
}

.seller-activity-heading h2 a:hover {
  color: var(--blue);
  text-decoration: underline;
}

.seller-activity-latest {
  display: grid;
  gap: 3px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--subtle) 82%, var(--surface));
}

.seller-activity-latest strong,
.seller-activity-latest p {
  margin: 0;
}

.seller-activity-latest p,
.seller-activity-latest time {
  color: var(--muted);
  font-size: 13px;
}

.seller-activity-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(86px, 1fr));
  gap: 8px;
  margin: 0;
}

.seller-activity-metrics div {
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.seller-activity-actions {
  display: grid;
  align-content: start;
  gap: 8px;
}

.verification-banner {
  margin-bottom: 14px;
}

.verification-banner h2 {
  margin: 0 0 6px;
  font-size: 20px;
}

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

.control-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.control-metrics div,
.control-metrics a {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 96%, #fff), var(--surface));
  box-shadow: var(--shadow-soft), var(--shadow-inset);
  text-decoration: none;
}

.control-metrics a:hover {
  border-color: var(--blue);
}

.control-metrics span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.control-metrics strong {
  display: block;
  margin-top: 4px;
  color: var(--blue);
  font-size: 30px;
  line-height: 1;
}

.control-panel {
  display: grid;
  gap: 16px;
}

.control-pending-filter {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

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

.control-function-card {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 190px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  text-decoration: none;
  transition:
    border-color 160ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.control-function-card:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow-lift);
  transform: translateY(-2px);
}

.control-function-card-primary {
  border-color: rgba(74, 104, 94, 0.45);
}

.control-function-card strong {
  font-size: 24px;
  line-height: 1.1;
}

.control-function-card p {
  margin: 0;
  color: var(--muted);
}

.control-company-list {
  display: grid;
  gap: 12px;
}

.control-company-card {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1.7fr) auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 96%, #fff), var(--surface));
  box-shadow: var(--shadow-soft), var(--shadow-inset);
}

.control-company-card h3 {
  margin: 0;
  font-size: 20px;
}

.control-company-card p {
  margin: 4px 0 0;
  color: var(--muted);
}

.control-company-facts,
.control-review-facts,
.control-risk-summary {
  display: grid;
  gap: 10px;
  margin: 0;
}

.control-company-facts {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.control-company-facts div,
.control-review-facts div,
.control-risk-summary div,
.control-risk-summary a {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--subtle) 84%, var(--surface));
}

.control-risk-summary a {
  color: inherit;
  text-decoration: none;
}

.control-risk-summary a:hover {
  border-color: var(--blue);
  background: var(--surface);
}

.control-company-facts dd,
.control-review-facts dd,
.control-risk-summary dd {
  overflow-wrap: anywhere;
}

.control-review-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 18px;
  align-items: start;
}

.control-review-main,
.control-review-actions {
  display: grid;
  gap: 16px;
}

.control-review-facts {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.control-review-wide {
  grid-column: 1 / -1;
}

.control-company-logo {
  display: block;
  max-width: 120px;
  max-height: 64px;
  object-fit: contain;
}

.control-member-list {
  display: grid;
  gap: 8px;
}

.control-member-list div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.control-member-list span {
  color: var(--muted);
}

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

.control-company-table {
  display: grid;
  gap: 0;
}

.control-company-table-head,
.control-company-table-row,
.control-listing-table-head,
.control-listing-row {
  display: grid;
  gap: 14px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.control-company-table-row,
.control-listing-row {
  border-radius: var(--radius-sm);
  padding-inline: 10px;
  margin-inline: -10px;
  transition:
    background-color 160ms ease,
    box-shadow 160ms ease;
}

.control-company-table-row:hover,
.control-listing-row:hover {
  background: color-mix(in srgb, var(--subtle) 72%, transparent);
  box-shadow: inset 3px 0 0 color-mix(in srgb, var(--blue) 45%, transparent);
}

.control-company-table-head,
.control-company-table-row {
  grid-template-columns: minmax(260px, 1.4fr) 110px 140px minmax(170px, 0.9fr) minmax(130px, 0.7fr) 88px;
  padding-inline: 10px;
}

.control-pending-table .control-company-table-head,
.control-pending-table .control-company-table-row {
  grid-template-columns: minmax(280px, 1.5fr) 110px 140px minmax(180px, 0.9fr) minmax(110px, 0.65fr) auto;
}

.control-listing-table-head,
.control-listing-row {
  grid-template-columns: minmax(250px, 1fr) 120px 120px minmax(130px, 0.55fr) 260px;
}

.control-message-table .control-company-table-head,
.control-message-table .control-company-table-row {
  grid-template-columns: minmax(250px, 1.3fr) minmax(220px, 1fr) minmax(190px, 0.9fr) 90px auto;
}

.company-member-table .control-company-table-head,
.company-member-table .control-company-table-row {
  grid-template-columns: minmax(240px, 1.3fr) minmax(150px, 0.7fr) minmax(150px, 0.7fr) minmax(160px, 0.8fr) auto;
}

.control-company-table-head,
.control-listing-table-head {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.control-company-table-head span:last-child {
  text-align: right;
}

.control-company-table-head:first-child,
.control-company-table-row:first-of-type {
  border-top: 0;
}

.control-company-table-row > div,
.control-listing-row > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.control-company-table-row span,
.control-listing-row span {
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.control-company-table-row strong,
.control-listing-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.control-row-actions {
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 6px;
}

.control-row-actions .inline-form {
  line-height: 0;
}

.control-row-actions .button:not(.button-icon) {
  white-space: nowrap;
}

.control-chat-shell {
  min-height: min(720px, calc(100vh - 220px));
}

.dashboard-section {
  padding: 18px;
  align-self: start;
}

.section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.section-row h2 {
  margin: 0;
}

.section-row a {
  color: var(--blue);
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
}

.disabled-link {
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
  opacity: 0.62;
  cursor: not-allowed;
}

.compact-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.sale-terms-dashboard-card .section-row {
  align-items: flex-start;
}

.sale-terms-dashboard-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--blue);
  background: color-mix(in srgb, var(--blue) 7%, var(--surface));
  font-size: 12px;
  font-weight: 900;
}

.dashboard-section-wide {
  grid-column: 1 / -1;
}

.auction-centre,
.notification-centre {
  width: min(1040px, 100%);
  margin: 0 auto;
}

.auction-centre {
  display: grid;
  gap: 12px;
}

.auction-centre-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.auction-centre-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.auction-centre-row h2,
.auction-centre-row p {
  margin: 0;
}

.auction-centre-actions {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.auction-bid-history {
  grid-column: 1 / -1;
  color: var(--muted);
}

.auction-bid-history ul {
  display: grid;
  gap: 6px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.auction-bid-history li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}

.status-pill-danger {
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 10%, var(--surface));
}

.nav-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
}

.nav-bookmark-icon {
  display: block;
}

.notifications-dropdown-container {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.notifications-bell-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  color: inherit;
  font: inherit;
  line-height: 1;
  background: transparent;
  cursor: pointer;
  transform-origin: 50% 0;
  transition:
    color 160ms ease,
    transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.notifications-bell-btn:hover,
.notifications-bell-btn:focus-visible,
.notifications-bell-active {
  color: var(--orange);
}

.notifications-bell-active {
  transform: translateY(-1px);
}

.notifications-bell-active > span:first-child {
  display: inline-block;
  animation: notificationBellPulse 240ms ease-out;
  transform-origin: 50% 50%;
}

.notifications-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 5px;
  border-radius: 999px;
  color: #fff;
  background: var(--orange);
  font-size: 10px;
  font-weight: 900;
}

.notifications-dropdown-content {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  width: min(360px, calc(100vw - 24px));
  max-height: min(460px, calc(100vh - 120px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-strong);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px) scale(0.97);
  transform-origin: top right;
  transition:
    opacity 180ms ease,
    transform 240ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.notifications-dropdown-content.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  animation: notificationPanelOpen 220ms ease-out;
}

.notifications-dropdown-content.is-closing {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px) scale(0.985);
  animation: notificationPanelClose 220ms ease forwards;
}

.notifications-dropdown-content[hidden] {
  display: none !important;
}

.notifications-dropdown-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.notifications-dropdown-header h2 {
  margin: 0;
  font-size: 16px;
}

.notifications-dropdown-list {
  overflow-y: auto;
  overflow-x: hidden;
}

.notifications-dropdown-list .stacked-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.notifications-dropdown-list .stacked-list li + li {
  border-top: 1px solid var(--line);
}

.notifications-dropdown-list .notification-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  box-sizing: border-box;
  padding: 14px 16px;
  border-top: 0;
  transition:
    background-color 160ms ease,
    color 160ms ease;
}

.notifications-dropdown-list .notification-row:hover {
  background: color-mix(in srgb, var(--mint) 7%, transparent);
}

.notifications-dropdown-list .notification-row > span {
  display: grid;
  gap: 4px;
}

.notifications-dropdown-list .notification-row small {
  white-space: normal;
  line-height: 1.3;
}

.notifications-dropdown-list li.unread .notification-row {
  background: color-mix(in srgb, var(--blue) 8%, transparent);
}

.notifications-dropdown-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.notifications-dropdown-footer a {
  font-weight: 900;
  text-decoration: none;
}

.notifications-dropdown-loading,
.no-notifications-msg {
  padding: 16px;
  text-align: center;
}

@keyframes notificationPanelOpen {
  0% {
    opacity: 0;
    transform: translateY(-8px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes notificationPanelClose {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-10px) scale(0.97);
  }
}

@keyframes notificationBellPulse {
  0% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.12);
  }
  100% {
    transform: scale(1);
  }
}

.notification-list-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.notification-list-panel .stacked-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.notification-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  padding: 16px 18px;
  border-top: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}

.notification-list-panel li:first-child .notification-row {
  border-top: 0;
}

.notification-row > span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.notification-row small {
  white-space: nowrap;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.stats-grid article {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.stats-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.stats-grid strong {
  color: var(--blue);
  font-size: 28px;
}

.inline-filter-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 0.5fr) auto;
  gap: 12px;
  align-items: end;
}

.profile-settings-form {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 14px;
}

.checkbox-grid-disabled {
  opacity: 0.45;
}

.checkbox-grid-disabled .checkbox-row {
  cursor: not-allowed;
}

.profile-layout,
.conversation-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: start;
}

.profile-layout {
  grid-template-columns: minmax(0, 1fr);
  margin-bottom: 22px;
}

.company-profile-logo {
  width: 76px;
  height: 76px;
  flex: 0 0 auto;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.company-profile-logo-empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--blue);
  font-size: 28px;
  font-weight: 900;
}

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

.profile-facts div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--subtle) 88%, var(--surface));
}

.verification-pending-panel {
  display: grid;
  gap: 16px;
}

.verification-pending-panel p {
  margin: 0;
}

.verification-pending-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.verification-pending-facts div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--subtle) 88%, var(--surface));
}

.seller-link,
.seller-line a {
  color: var(--blue);
  font-weight: 900;
  text-decoration: none;
}

.seller-link:hover,
.seller-line a:hover {
  text-decoration: underline;
}

.contact-seller-panel {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.contact-seller-panel h2 {
  margin: 0;
  font-size: 18px;
}

.messages-workspace {
  display: grid;
  grid-template-columns: minmax(320px, 390px) minmax(0, 1fr);
  min-height: min(720px, calc(100vh - 210px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.messages-sidebar {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-width: 0;
  border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--page) 72%, var(--surface));
}

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

.messages-sidebar-header div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.messages-sidebar-header span:not(.messages-count) {
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.messages-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  min-height: 30px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #fff;
  background: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.messages-search {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.messages-search input {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface);
  font-size: 14px;
}

.messages-search input:focus {
  color: var(--ink);
}

.conversation-list {
  min-height: 0;
  overflow-y: auto;
}

.conversation-row {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  transition:
    background-color 160ms ease,
    box-shadow 160ms ease;
}

.conversation-row:hover,
.conversation-row-active {
  background: color-mix(in srgb, var(--blue) 9%, var(--surface));
  box-shadow: inset 3px 0 0 var(--blue);
}

.conversation-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  color: #fff;
  background: var(--blue);
  font-weight: 900;
  text-transform: uppercase;
}

.conversation-avatar-large {
  width: 52px;
  height: 52px;
  font-size: 20px;
}

.conversation-product-thumb,
.conversation-product-hero,
.chat-product-thumb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--line);
  color: #fff;
  background: var(--blue);
  font-weight: 900;
  text-decoration: none;
  text-transform: uppercase;
}

.conversation-product-thumb {
  width: 62px;
  height: 62px;
  border-radius: var(--radius-sm);
}

.conversation-product-hero {
  width: 104px;
  height: 76px;
  border-radius: var(--radius-sm);
}

.chat-product-thumb {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
}

.conversation-product-thumb img,
.conversation-product-hero img,
.chat-product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.conversation-row-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.conversation-row-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.conversation-row-title strong,
.conversation-subject,
.conversation-listing-title,
.conversation-snippet {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-row-title strong {
  font-size: 15px;
}

.conversation-row-title time {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.conversation-subject {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.conversation-listing-title {
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.conversation-snippet {
  color: var(--muted);
  font-size: 13px;
}

.messages-empty {
  padding: 26px 18px;
}

.messages-filter-empty {
  margin: 0;
  padding: 20px 18px;
  color: var(--muted);
  font-weight: 800;
}

.messages-empty h2,
.conversation-preview-empty h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.messages-empty p,
.conversation-preview-empty p {
  margin: 0;
  color: var(--muted);
}

.conversation-preview {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-width: 0;
  background:
    linear-gradient(color-mix(in srgb, var(--page) 88%, transparent), color-mix(in srgb, var(--page) 88%, transparent)),
    repeating-linear-gradient(135deg, transparent 0 18px, rgba(74, 104, 94, 0.06) 18px 19px);
}

.conversation-preview-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.conversation-preview-header h2 {
  margin: 0;
  overflow: hidden;
  font-size: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-preview-header p {
  margin: 2px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-preview-body {
  display: grid;
  align-content: end;
  justify-items: start;
  gap: 14px;
  min-height: 0;
  padding: 24px;
  overflow-y: auto;
}

.conversation-day {
  justify-self: center;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  font-size: 12px;
  font-weight: 900;
}

.preview-bubble {
  display: grid;
  gap: 6px;
  max-width: min(620px, 78%);
  padding: 13px 14px 9px;
  border: 1px solid color-mix(in srgb, var(--blue) 22%, var(--line));
  border-radius: 12px 12px 12px 4px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.preview-bubble p {
  margin: 0;
  color: var(--ink);
}

.preview-bubble time {
  justify-self: end;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.conversation-preview-composer {
  margin: 14px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface);
  text-decoration: none;
}

.conversation-preview-composer:hover {
  color: var(--blue);
  border-color: var(--blue);
}

.conversation-preview-empty {
  align-self: center;
  justify-self: center;
  max-width: 380px;
  padding: 28px;
  text-align: center;
}

.message-thread {
  min-height: 420px;
  max-height: min(62vh, 680px);
  overflow-y: auto;
  padding: 18px;
  background: var(--subtle);
}

.chat-shell {
  display: grid;
  grid-template-rows: auto minmax(360px, 1fr) auto;
  min-height: min(760px, calc(100vh - 190px));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.chat-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.chat-toolbar div {
  display: grid;
  flex: 1 1 auto;
  gap: 2px;
  min-width: 0;
}

.chat-toolbar span,
.chat-status {
  color: var(--muted);
  font-size: 13px;
}

.chat-status-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.chat-status {
  white-space: nowrap;
}

.chat-activity-light {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--danger);
  box-shadow: 0 0 0 rgba(137, 82, 73, 0.45);
  animation: chatLightRed 1200ms ease-in-out infinite;
}

.chat-shell[data-chat-state="active"] .chat-activity-light {
  background: var(--success);
  box-shadow: 0 0 0 rgba(82, 114, 87, 0.45);
  animation-name: chatLightGreen;
}

.chat-shell[data-chat-state="inactive"] .chat-activity-light {
  background: var(--danger);
  animation-name: chatLightRed;
}

@keyframes chatLightGreen {
  0% {
    box-shadow: 0 0 0 0 rgba(82, 114, 87, 0.42);
  }
  70% {
    box-shadow: 0 0 0 7px rgba(82, 114, 87, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(82, 114, 87, 0);
  }
}

@keyframes chatLightRed {
  0% {
    box-shadow: 0 0 0 0 rgba(137, 82, 73, 0.42);
  }
  70% {
    box-shadow: 0 0 0 7px rgba(137, 82, 73, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(137, 82, 73, 0);
  }
}

.message-thread-inner {
  display: grid;
  align-content: end;
  gap: 12px;
  min-height: 100%;
}

.chat-message {
  max-width: 78%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 12px 12px 12px 4px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.chat-message-own {
  justify-self: end;
  border-color: color-mix(in srgb, var(--blue) 35%, var(--line));
  border-radius: 12px 12px 4px 12px;
  background: color-mix(in srgb, var(--blue) 10%, var(--surface));
}

.chat-message-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
}

.chat-message p {
  margin: 0;
}

.chat-attachments {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.chat-attachment {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: min(260px, 100%);
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  text-decoration: none;
}

.chat-attachment:hover {
  border-color: var(--blue);
}

.chat-attachment img,
.chat-attachment-type {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
}

.chat-attachment img {
  object-fit: cover;
}

.chat-attachment-type {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--blue);
  font-size: 11px;
  font-weight: 900;
}

.chat-attachment strong,
.chat-attachment small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-attachment small {
  color: var(--muted);
  font-size: 12px;
}

.chat-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: end;
  padding: 14px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.chat-composer textarea {
  min-height: 48px;
  max-height: 140px;
  resize: vertical;
}

.chat-composer button {
  align-self: end;
}

.chat-composer button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.chat-composer .errorlist {
  grid-column: 1 / -1;
}

.chat-attachment-control {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--blue);
  background: color-mix(in srgb, var(--surface) 94%, var(--page));
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease;
}

.chat-attachment-control:hover {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}

.chat-attachment-control input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.chat-file-hint {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
}

.row-link,
.notice-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
}

.row-link strong {
  color: var(--amber);
  white-space: nowrap;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 28px;
  text-align: center;
}

.errorlist {
  margin: 0;
  padding-left: 18px;
  color: var(--danger);
}

@media (max-width: 1100px) {
  .listing-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 840px) {
  .site-header,
  .market-header,
  .seller-activity-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    flex-wrap: wrap;
  }

  .filter-bar,
  .filter-modal-grid,
  .filter-checkboxes,
  .listing-grid,
  .docs-layout,
  .docs-grid,
  .detail-layout,
  .profile-layout,
  .conversation-layout,
  .control-metrics,
  .control-function-grid,
  .control-company-card,
  .control-company-facts,
  .control-company-table-head,
  .control-company-table-row,
  .control-listing-table-head,
  .control-listing-row,
  .control-review-layout,
  .control-review-facts,
  .verification-pending-facts,
  .contract-builder-grid,
  .contract-template-row,
  .contract-template-editor-grid,
  .contract-inline-fields,
  .checkout-review-grid,
  .checkout-review-facts,
  .stats-grid,
  .dashboard-grid,
  .auction-centre-row,
  .career-grid,
  .footer-inner,
  .footer-links,
  .form-grid,
  .listing-field-grid,
  .field-grid,
  .checkbox-grid,
  .profile-facts,
  .conversation-row,
  .choice-row,
  .seller-activity-card,
  .seller-activity-metrics,
  .listing-gallery,
  .landing-hero {
    grid-template-columns: 1fr;
  }

  .seller-activity-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .checkout-review-terms,
  .checkout-review-confirm {
    grid-column: auto;
    grid-row: auto;
  }

  .checkout-review-terms pre {
    max-height: 360px;
  }

  .order-row,
  .timeline-event-header {
    flex-direction: column;
  }

  .order-row-status {
    min-width: 0;
    text-align: left;
  }

  .auction-centre-actions,
  .notification-row {
    align-items: stretch;
    flex-direction: column;
  }

  .notification-row small {
    white-space: normal;
  }

  .inline-filter-form {
    grid-template-columns: 1fr;
  }

  .docs-nav {
    position: static;
  }

  .chat-shell {
    min-height: calc(100vh - 190px);
  }

  .chat-toolbar,
  .chat-composer {
    grid-template-columns: 1fr;
  }

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

  .chat-message {
    max-width: 92%;
  }

  .listing-gallery img,
  .listing-gallery img:first-child {
    height: 220px;
  }

  .detail-metrics {
    grid-template-columns: 1fr;
  }

  .form-actions {
    grid-column: auto;
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .contract-drawer-panel {
    inset: 8px;
    width: auto;
    transform: none;
    padding: 16px;
  }

  .contract-drawer-open .contract-drawer-panel,
  .contract-drawer-closing .contract-drawer-panel {
    transform: none;
  }

  .contract-drawer-open .contract-drawer-panel {
    animation: contractPanelInMobile 300ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .contract-drawer-closing .contract-drawer-panel {
    animation: contractPanelOutMobile 190ms ease both;
  }

  .contract-preview {
    position: static;
  }

  .contract-preview pre {
    min-height: 320px;
  }

  .footer-theme-toggle {
    margin-left: 0;
  }

  .messages-workspace {
    grid-template-columns: 1fr;
    min-height: auto;
  }

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

  .conversation-row {
    grid-template-columns: 62px minmax(0, 1fr);
  }

  .conversation-preview {
    min-height: 440px;
  }

  .conversation-preview-header {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .conversation-preview-header .button {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .chat-composer {
    grid-template-columns: 1fr;
  }

.preview-bubble {
    max-width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .contract-drawer,
  .contract-drawer-backdrop,
  .contract-drawer-panel {
    transition: none;
    animation: none;
  }
}

@keyframes contractPanelInMobile {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes contractPanelOutMobile {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(12px) scale(0.99);
  }
}

.security-code-box {
  background: var(--page);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--blue-dark);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  margin: 6px 0 0;
  overflow-wrap: anywhere;
  padding: 11px 12px;
  text-align: center;
}

.qr-code-box {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  justify-content: center;
  margin: 10px auto 0;
  max-width: 158px;
  padding: 9px;
  width: 100%;
}

.qr-code-box img {
  display: block;
  height: 136px;
  image-rendering: pixelated;
  max-width: 100%;
  object-fit: contain;
  width: 136px;
}

.two-factor-setup-panel {
  gap: 16px;
  padding: 20px;
}

.two-factor-setup-panel p {
  max-width: 100%;
}

.two-factor-qr-section {
  border-bottom: 1px solid var(--line);
  display: grid;
  justify-items: center;
  padding-bottom: 16px;
  text-align: center;
}

.two-factor-manual-section,
.two-factor-confirm-form {
  display: grid;
  gap: 10px;
}

.setup-link-details {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--page);
}

.setup-link-details summary {
  color: var(--blue-dark);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 900;
  padding: 10px 12px;
}

.setup-link-box {
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: var(--page);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.78rem;
  line-height: 1.45;
  max-height: 92px;
  overflow: auto;
  overflow-wrap: anywhere;
  padding: 10px 12px;
}

.two-factor-confirm-form p {
  display: grid;
  gap: 6px;
}

.two-factor-confirm-form .button {
  justify-self: start;
}

.break-word {
  overflow-wrap: anywhere;
}

.recovery-code-list {
  display: grid;
  gap: 8px;
  margin: 14px 0 20px;
  padding-left: 22px;
}

.recovery-code-list code {
  background: var(--page);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  display: inline-block;
  font-size: 0.95rem;
  padding: 7px 9px;
}

