/*
 * HELM 2026 modern release layer
 *
 * This file intentionally loads after the historical release styles. It is the
 * single visual contract for public pages, authentication, buyer views, and the
 * brokerage workspace while the earlier file continues to own feature layouts.
 */

:root {
  --modern-ink: #0b2032;
  --modern-ink-soft: #294156;
  --modern-copy: #4c6376;
  --modern-muted: #6d8293;
  --modern-canvas: #f5f7f8;
  --modern-surface: #ffffff;
  --modern-surface-muted: #eff3f5;
  --modern-line: #d9e3e8;
  --modern-line-strong: #c2d0d7;
  --modern-gold: #c09b57;
  --modern-gold-strong: #806027;
  --modern-aqua: #096c79;
  --modern-green: #1f8b68;
  --modern-red: #bb544b;
  --modern-shadow-xs: 0 1px 2px rgba(16, 36, 55, 0.05);
  --modern-shadow-sm: 0 10px 28px rgba(11, 32, 50, 0.075);
  --modern-shadow-md: 0 22px 56px rgba(11, 32, 50, 0.12);
  --modern-radius: 8px;
  --modern-control-height: 42px;
  --modern-header-height: 74px;
  --modern-platform-header-height: 64px;
  --modern-public-title-offset: clamp(3rem, 6vw, 5.4rem);
  --modern-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --font-sans: "Inter", "Segoe UI", Arial, sans-serif;
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-serif: "Cormorant Garamond", Georgia, serif;
}

/* Keep the first public-page heading on one shared vertical rhythm. */
:is(
  .page-route-listings,
  .page-route-ai-finder,
  .page-route-how-it-works,
  .page-route-brokerage,
  .page-route-request-demo
) > .section:first-child {
  padding-top: var(--modern-public-title-offset) !important;
}

.page-route-brokerage .brokerage-value-section {
  padding-top: 0;
}

.page-route-request-demo .demo-hero-copy {
  min-height: 0;
  align-content: start;
  padding-top: 0;
}

/* The app bar owns this offset; keeping one value prevents a spacer below it. */
.site-shell-platform {
  --platform-appbar-height: calc(var(--modern-platform-header-height) + 1px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  letter-spacing: 0 !important;
}

html {
  scroll-behavior: smooth;
  background: var(--modern-canvas);
}

body {
  min-width: 320px;
  color: var(--modern-ink);
  background: var(--modern-canvas) !important;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

:where(button, input, textarea, select) {
  font: inherit;
}

:where(a, button, input, textarea, select, summary) {
  -webkit-tap-highlight-color: transparent;
}

:where(a, button, .listing-card, .feature-card, .panel, .platform-link) {
  transition:
    color 180ms var(--modern-ease),
    background-color 180ms var(--modern-ease),
    border-color 180ms var(--modern-ease),
    box-shadow 180ms var(--modern-ease),
    opacity 180ms var(--modern-ease),
    transform 180ms var(--modern-ease);
}

:where(a, button, input, textarea, select, summary):focus-visible {
  outline: 3px solid rgba(19, 137, 154, 0.3) !important;
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 9999;
  padding: 0.7rem 1rem;
  border-radius: 6px;
  color: #fff;
  background: var(--modern-ink);
  box-shadow: var(--modern-shadow-sm);
  font-size: 0.88rem;
  font-weight: 800;
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.container {
  width: min(1520px, calc(100% - clamp(2rem, 5vw, 5rem)));
}

:where(h1, h2, h3, h4, p) {
  margin-top: 0;
}

:where(h1, h2, h3, h4) {
  color: var(--modern-ink);
  text-wrap: balance;
}

:where(p, li, small) {
  color: var(--modern-copy);
}

.eyebrow,
.panel-label {
  color: var(--modern-gold-strong);
  font-family: var(--font-sans);
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.section-copy {
  max-width: 72ch;
  color: var(--modern-copy);
  font-size: clamp(1rem, 1.15vw, 1.1rem);
  line-height: 1.65;
}

.section {
  padding-block: clamp(3.5rem, 6vw, 6.25rem);
}

.section + .section {
  border-top: 1px solid rgba(16, 36, 55, 0.06);
}

.section-heading {
  max-width: 850px;
  margin-bottom: clamp(1.8rem, 4vw, 3rem);
}

.section-heading :where(h1, h2) {
  margin-bottom: 0.7rem;
  font-family: var(--font-display);
  font-size: clamp(2.35rem, 4.5vw, 4.15rem);
  font-weight: 600;
  line-height: 0.98;
}

.page-shell {
  isolation: isolate;
}

.page-shell::after {
  display: none !important;
}

.page-shell-main {
  padding-top: calc(var(--modern-header-height) + 1px);
  background: var(--modern-canvas);
}

.page-shell-main::before {
  opacity: 0.09;
  filter: saturate(0.45) contrast(0.9);
}

.page-route-ai-finder {
  --modern-route-image: url("/public/assets/backgrounds/helm-bg-open-water.png");
  --modern-route-position: center;
}

.page-route-how-it-works {
  --modern-route-image: url("/public/assets/backgrounds/helm-bg-deck-sunrise.png");
  --modern-route-position: center right;
}

.page-route-brokerage {
  --modern-route-image: url("/public/assets/backgrounds/helm-bg-marina-gold.png");
  --modern-route-position: center right;
}

.page-route-request-demo {
  --modern-route-image: url("/public/assets/backgrounds/helm-bg-sunset-horizon.png");
  --modern-route-position: center;
}

:is(
  .page-route-ai-finder,
  .page-route-how-it-works,
  .page-route-brokerage,
  .page-route-request-demo
)::before {
  opacity: 1 !important;
  background-image:
    linear-gradient(180deg, rgba(245, 247, 248, 0.82), rgba(239, 243, 245, 0.9)),
    var(--modern-route-image) !important;
  background-position: center, var(--modern-route-position) !important;
  background-size: cover, cover !important;
  background-repeat: no-repeat !important;
  filter: saturate(0.72) contrast(0.94);
}

/* Public navigation */

.topbar:not(.topbar-platform) {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 1000;
  min-height: var(--modern-header-height);
  border-bottom: 1px solid rgba(16, 36, 55, 0.08);
  background: rgba(255, 255, 255, 0.92) !important;
  box-shadow: 0 1px 0 rgba(16, 36, 55, 0.02);
  backdrop-filter: blur(18px) saturate(1.15);
}

.topbar:not(.topbar-platform) .nav-shell {
  min-height: var(--modern-header-height);
  gap: clamp(1rem, 2.5vw, 2.5rem);
}

.brand-lockup {
  min-width: max-content;
  gap: 0.75rem;
}

.brand-logo {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(16, 36, 55, 0.08);
  border-radius: 6px;
  background: #fff;
  object-fit: contain;
}

.brand-text span {
  color: var(--modern-ink);
  font-family: var(--font-display);
  font-size: 1.58rem;
  font-weight: 600;
  line-height: 0.95;
}

.brand-text small {
  margin-top: 0.28rem;
  color: var(--modern-muted);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
}

.nav-links {
  align-items: center;
  gap: 0;
}

.topbar:not(.topbar-platform) .nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 1rem;
  border-radius: 0 !important;
  color: var(--modern-ink-soft);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1;
}

.topbar:not(.topbar-platform) .nav-link:not(:first-child)::before {
  position: absolute;
  top: 50%;
  left: 0;
  width: 1px;
  height: 18px;
  background: linear-gradient(
    180deg,
    transparent,
    rgba(16, 36, 55, 0.2) 22%,
    rgba(16, 36, 55, 0.2) 78%,
    transparent
  );
  content: "";
  transform: translateY(-50%);
}

.nav-link:hover {
  color: var(--modern-ink);
  background: transparent !important;
}

.nav-link.is-active,
.nav-link[aria-current="page"] {
  color: var(--modern-ink);
  background: transparent !important;
}

.nav-link.is-active::after,
.nav-link[aria-current="page"]::after {
  position: absolute;
  bottom: -0.72rem;
  left: 50%;
  width: min(74%, 112px);
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--modern-gold), transparent);
  box-shadow: 0 2px 10px rgba(184, 146, 79, 0.24);
  content: "";
  transform: translateX(-50%);
}

.nav-actions {
  gap: 0.55rem;
}

.nav-actions .btn {
  min-height: 42px;
  padding-inline: 0.95rem;
  white-space: nowrap;
}

.mobile-menu-toggle {
  width: 44px;
  height: 44px;
  border: 1px solid var(--modern-line);
  border-radius: 6px;
  background: #fff;
}

.mobile-nav {
  border-top: 1px solid var(--modern-line);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--modern-shadow-md);
}

.mobile-link {
  border-radius: 6px;
  color: var(--modern-ink);
}

/* Controls */

.btn,
button.btn {
  min-height: var(--modern-control-height);
  padding: 0.7rem 1rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 750;
  line-height: 1.2;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.btn:active:not(:disabled) {
  transform: translateY(0) scale(0.985);
}

.btn-primary,
.btn-gold {
  border: 1px solid #9f7a39;
  color: #102437;
  background: #d9bc7a;
  box-shadow: 0 6px 16px rgba(184, 146, 79, 0.2);
}

.btn-primary:hover,
.btn-gold:hover {
  border-color: #8d6829;
  color: #081725;
  background: #e3ca91;
  box-shadow: 0 10px 24px rgba(184, 146, 79, 0.25);
}

.btn-soft {
  border: 1px solid #17384f;
  color: #fff;
  background: #17384f;
  box-shadow: var(--modern-shadow-xs);
}

.btn-soft:hover {
  border-color: #102b3e;
  color: #fff;
  background: #102b3e;
}

.btn-ghost,
.chip-button {
  border: 1px solid var(--modern-line-strong);
  color: var(--modern-ink);
  background: rgba(255, 255, 255, 0.9);
}

.btn-ghost:hover,
.chip-button:hover {
  border-color: #9fb2bc;
  color: var(--modern-ink);
  background: #fff;
  box-shadow: var(--modern-shadow-xs);
}

:where(input, textarea, select, .custom-select-trigger, .custom-select-search) {
  min-height: var(--modern-control-height);
  border: 1px solid var(--modern-line-strong) !important;
  border-radius: 6px !important;
  color: var(--modern-ink) !important;
  background: #fff !important;
  box-shadow: inset 0 1px 1px rgba(16, 36, 55, 0.025);
}

:where(input, textarea, select, .custom-select-trigger, .custom-select-search):hover {
  border-color: #a8bac3 !important;
}

:where(input, textarea, select, .custom-select-trigger, .custom-select-search):focus {
  border-color: var(--modern-aqua) !important;
  box-shadow: 0 0 0 3px rgba(19, 137, 154, 0.12) !important;
}

:where(input, textarea)::placeholder {
  color: #91a0ad !important;
  opacity: 1;
}

.input-shell label,
.input-shell > span {
  margin-bottom: 0.34rem;
  color: var(--modern-ink-soft);
  font-size: 0.78rem;
  font-weight: 750;
}

.custom-select-menu {
  border: 1px solid var(--modern-line-strong) !important;
  border-radius: 8px !important;
  background: #fff !important;
  box-shadow: 0 18px 45px rgba(16, 36, 55, 0.16) !important;
}

.custom-select-option {
  min-height: 40px;
  border-radius: 5px;
  color: var(--modern-ink) !important;
}

.custom-select-option:hover,
.custom-select-option.is-selected {
  background: #eaf2f4 !important;
}

/* Public hero and sections */

.hero-section {
  min-height: calc(100vh - var(--modern-header-height));
  padding: 0;
}

.page-route-home .hero-section {
  min-height: auto;
  padding: 0 !important;
}

.page-route-home .hero-section {
  min-height: auto;
}

.page-route-home .hero-section > .hero-grid-refined {
  position: relative;
  display: grid;
  align-items: stretch;
  width: 100%;
  max-width: none;
  min-height: min(620px, calc(100svh - var(--modern-header-height) - 110px));
  padding: 0 !important;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #0a2134 url("/public/assets/helm-home-marina-hero.png") center / cover no-repeat !important;
  box-shadow: none;
}

.page-route-home .hero-grid-refined::after {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  background:
    linear-gradient(90deg, rgba(4, 17, 29, 0.96) 0%, rgba(5, 21, 35, 0.86) 35%, rgba(5, 21, 35, 0.42) 66%, rgba(5, 21, 35, 0.16) 100%) !important;
  content: "";
}

.page-route-home .hero-copy {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(800px, 64%);
  max-width: none;
  align-content: center;
  min-height: 100%;
  padding-block: clamp(2.75rem, 5vw, 5rem) !important;
  padding-right: clamp(2rem, 4vw, 4rem);
  padding-left: max(clamp(1.5rem, 5vw, 5rem), calc((100vw - 1520px) / 2));
}

.page-route-home .hero-copy .eyebrow {
  color: #f0cf87 !important;
  font-size: 0.8rem;
  font-weight: 750;
  line-height: 1.2;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.56);
}

html[data-theme="light"] body .page-route-home .hero-copy .eyebrow,
html[data-theme="dark"] body .page-route-home .hero-copy .eyebrow {
  color: #f0cf87 !important;
}

.page-route-home .hero-copy h1 {
  max-width: 16ch;
  margin: 0.75rem 0 1.2rem;
  color: #fff !important;
  font-family: var(--font-display);
  font-size: clamp(3.55rem, 5.65vw, 5.8rem);
  font-weight: 600;
  line-height: 0.91;
  text-shadow: 0 3px 28px rgba(0, 0, 0, 0.35);
}

.page-route-home .hero-subheadline {
  max-width: 31ch;
  margin-bottom: 1.8rem;
  color: rgba(244, 249, 252, 0.9) !important;
  font-size: clamp(1.05rem, 1.45vw, 1.3rem);
  line-height: 1.55;
}

.page-route-home .hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.page-route-home .hero-actions .btn {
  width: auto;
  min-height: 46px;
  padding-inline: 1rem;
  font-size: 0.85rem;
  white-space: nowrap !important;
}

.page-route-home .hero-actions .btn-ghost,
.page-route-home .hero-actions .btn-soft {
  border-color: rgba(255, 255, 255, 0.24);
  color: #fff;
  background: rgba(5, 18, 30, 0.68);
  backdrop-filter: blur(8px);
}

.page-route-home .hero-actions .btn-ghost:hover,
.page-route-home .hero-actions .btn-soft:hover {
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
  background: rgba(5, 18, 30, 0.88);
}

.page-route-home .hero-visual {
  display: none;
}

.home-flow-section,
.home-featured-section {
  background: rgba(255, 255, 255, 0.72);
}

.page-route-home .home-flow-section {
  padding-top: clamp(2.5rem, 4vw, 3.5rem);
}

.home-story-section {
  background: #edf2f4;
}

.home-audience-divider {
  width: min(1040px, 100%);
  margin-block: 2.25rem 1.4rem;
}

.home-audience-divider span {
  color: var(--modern-gold-strong);
  font-size: clamp(1.4rem, 2vw, 1.85rem);
  text-shadow: none;
}

.home-audience-divider::before,
.home-audience-divider::after {
  background: linear-gradient(90deg, transparent, rgba(184, 146, 79, 0.65));
}

.home-audience-divider::after {
  background: linear-gradient(90deg, rgba(184, 146, 79, 0.65), transparent);
}

.panel,
.metric-card,
.signal-card,
.feature-card,
.timeline-card,
.home-yacht-card,
.listing-card,
.report-card,
.auth-panel,
.empty-state,
.broker-card,
.brokerage-pricing-card,
.brokerage-pricing-note,
.brokerage-connect-card {
  border: 1px solid var(--modern-line);
  border-radius: var(--modern-radius) !important;
  background: var(--modern-surface);
  box-shadow: var(--modern-shadow-xs);
}

.feature-card,
.signal-card,
.listing-card,
.home-yacht-card {
  overflow: hidden;
}

.feature-card:hover,
.signal-card:hover,
.listing-card:hover,
.home-yacht-card:hover {
  border-color: #bdcbd2;
  box-shadow: var(--modern-shadow-sm);
  transform: translateY(-3px);
}

.feature-card h3,
.signal-card h3 {
  color: var(--modern-ink);
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.05;
}

.feature-card p,
.signal-card p {
  color: var(--modern-copy);
}

.feature-card-icon-shell {
  border-radius: 8px !important;
  box-shadow: none !important;
}

.story-panel {
  padding: clamp(1.5rem, 3vw, 2.5rem);
}

.story-panel::after,
.cta-banner::after {
  display: none;
}

.stack-item {
  border-radius: 6px;
}

.listing-card-media {
  aspect-ratio: 16 / 10;
  border-radius: 0;
}

.listing-card-image {
  transition: transform 420ms var(--modern-ease);
}

.listing-card:hover .listing-card-image {
  transform: scale(1.025);
}

.listing-card-content {
  padding: 1.15rem;
}

.listing-card-content h3 {
  color: var(--modern-ink);
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 600;
}

.listing-card-foot {
  border-top-color: var(--modern-line);
}

.cta-banner {
  overflow: hidden;
  border: 1px solid #1f465f;
  border-radius: var(--modern-radius);
  color: #fff;
  background: #102b3e !important;
  box-shadow: var(--modern-shadow-md);
}

.cta-banner :where(h2, p, .eyebrow) {
  color: #fff;
}

.cta-banner .eyebrow {
  color: #e3c786;
}

/* Browse, detail, pricing, and legal pages */

.browse-hero,
.brokerage-signup-hero,
.detail-hero {
  padding-block: clamp(3rem, 6vw, 6rem);
}

.page-route-listings .browse-hero {
  padding: 0 0 clamp(2rem, 3.5vw, 3.25rem);
}

.page-route-listings .browse-hero-copy h1 {
  max-width: 20ch;
  font-size: clamp(3.1rem, 4.6vw, 5.15rem);
  white-space: normal;
}

.browse-hero-copy h1,
.brokerage-signup-hero h1,
.listing-detail-title-block h1 {
  color: var(--modern-ink);
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 0.94;
}

.listing-toolbar,
.browse-filter-shell {
  position: relative;
  border: 1px solid var(--modern-line);
  border-radius: var(--modern-radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--modern-shadow-sm);
}

.listing-results-header {
  align-items: end;
  border-bottom: 1px solid var(--modern-line);
  padding-bottom: 1rem;
}

.listing-detail-main-media,
.listing-detail-thumb {
  border-radius: var(--modern-radius);
}

.listing-detail-broker-card,
.listing-detail-match-panel,
.listing-detail-description-card,
.listing-detail-inquiry-aside .panel {
  border-radius: var(--modern-radius) !important;
}

.brokerage-pricing-grid {
  gap: 1rem;
}

.brokerage-pricing-card {
  overflow: hidden;
}

.brokerage-pricing-card:hover {
  border-color: #b7c8d0;
  box-shadow: var(--modern-shadow-sm);
  transform: translateY(-2px);
}

.pricing-card-annual-price,
.pricing-card-primary-price,
.pricing-card-price {
  border-radius: 6px !important;
}

.legal-copy,
.privacy-layout,
.terms-layout {
  max-width: 900px;
}

/* Authentication and buyer profile */

.page-route-login .section,
.page-route-broker-login .section,
.page-route-buyer-login .section,
.page-route-buyer-signup .section {
  display: grid;
  min-height: calc(100vh - var(--modern-header-height));
  align-items: center;
  padding-block: clamp(2.5rem, 6vw, 5rem);
  background:
    linear-gradient(rgba(244, 247, 248, 0.88), rgba(244, 247, 248, 0.96)),
    url("/public/assets/backgrounds/helm-bg-deck-sunrise.png") center / cover fixed;
}

.auth-layout-single {
  display: grid;
  width: min(560px, 100%);
  margin-inline: auto;
}

.auth-panel {
  gap: 1.2rem;
  padding: clamp(1.4rem, 4vw, 2.4rem);
  border-color: rgba(16, 36, 55, 0.12);
  box-shadow: 0 24px 70px rgba(16, 36, 55, 0.14);
}

.auth-card-brand {
  align-items: center;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--modern-line);
}

.auth-card-brand img {
  width: 58px;
  height: 58px;
  border: 1px solid var(--modern-line);
  border-radius: 6px;
}

.auth-card-brand :where(h1, h3) {
  margin: 0.15rem 0 0;
  color: var(--modern-ink);
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.65rem);
  font-weight: 600;
  line-height: 0.98;
}

.auth-form {
  gap: 1rem;
}

.auth-submit-button {
  border-color: #17384f !important;
  color: #fff !important;
  background: #17384f !important;
}

.auth-submit-button:hover {
  color: #fff !important;
  background: #102b3e !important;
}

.auth-switch-panel {
  padding-top: 1rem;
  border-top: 1px solid var(--modern-line);
}

.auth-switch-actions {
  gap: 0.5rem;
}

.auth-switch-link {
  min-width: 0;
  padding-inline: 0.7rem;
}

.auth-switch-link.is-active,
.auth-switch-link[aria-current="page"] {
  border-color: #9f7a39 !important;
  color: #102437 !important;
  background: #d9bc7a !important;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  border-color: var(--modern-line-strong) !important;
  -webkit-text-fill-color: var(--modern-ink) !important;
  box-shadow: 0 0 0 1000px var(--modern-surface) inset !important;
  caret-color: var(--modern-ink);
}

.success-banner,
.error-banner {
  border-radius: 6px;
}

/* Brokerage workspace shell */

.topbar-platform {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 1200;
  min-height: var(--modern-platform-header-height);
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  background: #081c2c !important;
  box-shadow: 0 2px 14px rgba(5, 18, 30, 0.14);
}

.topbar-platform .platform-appbar {
  min-height: var(--modern-platform-header-height);
}

.topbar-platform .brand-logo {
  width: 40px;
  height: 40px;
}

.topbar-platform .brand-text span {
  color: #fff;
  font-size: 1.3rem;
}

.topbar-platform .brand-text small {
  color: rgba(226, 236, 242, 0.72);
}

.platform-main-site-link {
  min-height: 40px;
  padding: 0.6rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  color: rgba(245, 249, 252, 0.88);
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.84rem;
  font-weight: 750;
}

.platform-main-site-link:hover {
  border-color: rgba(255, 255, 255, 0.26);
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.platform-notification-link {
  position: relative;
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #dce8ef;
  border: 1px solid rgba(210, 226, 236, 0.24);
  background: rgba(255, 255, 255, 0.06);
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.platform-notification-link:hover,
.platform-notification-link.is-active {
  color: #ffffff;
  border-color: rgba(225, 190, 112, 0.72);
  background: rgba(225, 190, 112, 0.12);
}

.platform-notification-link .platform-link-icon {
  width: 21px;
  height: 21px;
}

.platform-notification-link > span:last-child:not(.platform-link-icon) {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  display: inline-grid;
  place-items: center;
  border: 2px solid #071c2c;
  border-radius: 999px;
  color: #071c2c;
  background: #e2c276;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
}

.notification-inbox-list {
  display: grid;
  border-top: 1px solid #dfe7ec;
}

.notification-inbox-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid #e4eaee;
}

.notification-inbox-row > div {
  min-width: 0;
}

.notification-inbox-row span,
.notification-inbox-row small {
  color: #66798a;
}

.notification-inbox-row strong {
  display: block;
  margin: 3px 0 5px;
  color: #0b2235;
  font-size: 1rem;
}

.notification-inbox-row p {
  margin: 0 0 6px;
  color: #506678;
  overflow-wrap: anywhere;
}

.notification-inbox-row.is-unread {
  box-shadow: inset 3px 0 0 #d5ad55;
  padding-left: 14px;
}

.notification-read-state {
  font-weight: 700;
}

html[data-theme="dark"] .notification-inbox-list,
html[data-theme="dark"] .notification-inbox-row {
  border-color: rgba(187, 208, 220, 0.17);
}

html[data-theme="dark"] .notification-inbox-row strong {
  color: #f2f6f8;
}

html[data-theme="dark"] .notification-inbox-row p,
html[data-theme="dark"] .notification-inbox-row span,
html[data-theme="dark"] .notification-inbox-row small {
  color: #b8c7d1;
}

@media (max-width: 680px) {
  .notification-inbox-row {
    grid-template-columns: 1fr;
  }

  .notification-inbox-row .btn {
    justify-self: start;
  }
}

.nav-profile-button {
  border-radius: 6px;
}

.site-shell-platform,
.page-shell-platform,
.section-platform,
.section-platform .platform-shell,
.section-platform .platform-main-scroll {
  background: var(--modern-canvas) !important;
}

.section-platform {
  color: var(--modern-ink);
}

.section-platform .platform-shell {
  border: 0 !important;
}

.platform-sidebar-rail {
  border: 0;
  border-right: 1px solid #d8e2e7;
  color: #4f6476;
  background: #eef2f4 !important;
}

.platform-sidebar-rail:hover,
.platform-sidebar-rail:focus-visible {
  color: var(--modern-ink);
  background: #e2eaee !important;
}

.platform-sidebar-rail__icon {
  width: 36px;
  height: 36px;
  border: 1px solid #cbd8de;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.72);
}

.platform-sidebar-rail__label {
  color: #4d6477;
  font-size: 0.66rem;
  font-weight: 750;
}

.section-platform .platform-sidebar-scroll {
  border-right: 1px solid #d5e0e5;
  color: var(--modern-ink);
  background: #eef2f4 !important;
  box-shadow: 14px 0 34px rgba(16, 36, 55, 0.075);
}

.section-platform .platform-brand {
  margin: 0;
  padding: 1rem;
  border: 0;
  border-bottom: 1px solid #d3dee3;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.section-platform .platform-brand span {
  color: var(--modern-ink);
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 800;
}

.section-platform .platform-brand small {
  color: var(--modern-muted);
}

.platform-sidebar-collapse {
  border-radius: 6px;
}

.section-platform .platform-nav {
  gap: 0.4rem;
  padding: 0.7rem;
}

.section-platform .platform-nav-group {
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 7px !important;
  background: transparent !important;
  box-shadow: none !important;
}

.section-platform .platform-nav-group[open] {
  border-color: #d4dfe4;
  background: rgba(255, 255, 255, 0.68) !important;
}

.section-platform .platform-group-label {
  min-height: 38px;
  padding: 0.58rem 0.7rem;
  color: #53697b;
  font-size: 0.72rem;
  font-weight: 800;
}

.section-platform .platform-group-label:hover {
  color: var(--modern-ink);
  background: rgba(255, 255, 255, 0.5);
}

.section-platform .platform-group-arrow {
  width: 24px;
  height: 24px;
  border-color: #c8d5db;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.62);
}

.section-platform .platform-group-links {
  gap: 0.12rem;
  padding: 0.18rem 0.28rem 0.38rem;
}

.section-platform .platform-link {
  position: relative;
  min-height: 38px;
  padding: 0.5rem 0.62rem;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #4e6375;
  font-size: 0.84rem;
  font-weight: 700;
}

.section-platform .platform-link:hover {
  border-color: #d2dde2;
  color: var(--modern-ink);
  background: rgba(255, 255, 255, 0.82);
}

.section-platform .platform-link.is-active,
.section-platform .platform-link[aria-current="page"] {
  border-color: rgba(19, 137, 154, 0.18);
  color: #0c4f5b !important;
  background: #dcecee !important;
  box-shadow: inset 3px 0 0 var(--modern-gold) !important;
}

.section-platform .platform-sidebar-scroll .platform-link.is-active,
.section-platform .platform-sidebar-scroll .platform-link[aria-current="page"],
html[data-theme="light"] .section-platform .platform-sidebar-scroll .platform-link.is-active,
html[data-theme="light"] .section-platform .platform-sidebar-scroll .platform-link[aria-current="page"] {
  border-color: rgba(19, 137, 154, 0.18) !important;
  color: #0c4f5b !important;
  background: #dcecee !important;
  box-shadow: inset 3px 0 0 var(--modern-gold) !important;
}

.section-platform .platform-link.is-active *,
.section-platform .platform-link[aria-current="page"] * {
  color: inherit !important;
}

.section-platform .platform-sidebar-scroll .platform-link.is-active *,
.section-platform .platform-sidebar-scroll .platform-link[aria-current="page"] * {
  color: inherit !important;
}

.section-platform .platform-link-icon {
  color: currentColor;
  background: transparent;
}

.section-platform .platform-session-card {
  margin: auto 0.8rem 0.8rem;
  border-color: #d0dce2;
  background: rgba(255, 255, 255, 0.62);
}

.section-platform .platform-main-scroll {
  border-left: 0 !important;
}

.section-platform .platform-main {
  gap: 1rem;
  width: min(1680px, 100%);
  margin-inline: auto;
  padding: clamp(0.9rem, 1.6vw, 1.4rem) clamp(1rem, 2vw, 1.65rem) clamp(1.8rem, 3vw, 2.6rem);
}

.section-platform .platform-header-compact {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  margin: 0;
  padding: 0.8rem clamp(1rem, 2vw, 1.65rem) 0.85rem;
  border: 0;
  border-bottom: 1px solid var(--modern-line);
  border-radius: 0 !important;
  background: rgba(245, 247, 248, 0.93) !important;
  box-shadow: none !important;
  backdrop-filter: blur(18px) saturate(1.12);
}

.section-platform .platform-header-kicker {
  margin: 0 0 0.22rem;
  color: #6a4d16 !important;
  font-size: 0.65rem;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.section-platform .platform-header-kicker span {
  margin-inline: 0.28rem;
  color: #5c7182;
}

.section-platform .platform-header-compact h1 {
  margin: 0;
  color: var(--modern-ink);
  font-family: var(--font-sans) !important;
  font-size: clamp(1.7rem, 2.45vw, 2.25rem) !important;
  font-weight: 780 !important;
  line-height: 1.05;
}

.section-platform .platform-header-compact .section-copy {
  max-width: 860px;
  margin: 0.2rem 0 0;
  color: var(--modern-copy);
  font-size: 0.9rem;
  line-height: 1.45;
}

.section-platform .platform-header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.55rem;
}

.section-platform .platform-page-guide {
  display: block;
  margin: 0.75rem clamp(1rem, 2vw, 1.65rem) 0;
  padding: 0;
  border: 1px solid #d8e4e8;
  border-radius: var(--modern-radius) !important;
  color: var(--modern-ink);
  background: #edf4f5 !important;
  box-shadow: none !important;
}

.section-platform .platform-page-guide__summary {
  display: grid;
  grid-template-columns: minmax(110px, 0.2fr) minmax(0, 1fr) 24px;
  gap: 0.8rem;
  align-items: center;
  min-height: 46px;
  padding: 0.62rem 0.8rem;
  cursor: pointer;
  list-style: none;
  transition: background-color 180ms var(--modern-ease);
}

.section-platform .platform-page-guide__summary:hover {
  background: rgba(255, 255, 255, 0.5);
}

.section-platform .platform-page-guide__summary::-webkit-details-marker {
  display: none;
}

.section-platform .platform-page-guide__label {
  color: #765414 !important;
  font-size: 0.66rem !important;
  font-weight: 850 !important;
  text-transform: uppercase;
}

.section-platform .platform-page-guide__summary p {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.35;
}

.section-platform .platform-page-guide__toggle {
  position: relative;
  width: 24px;
  height: 24px;
  border: 1px solid #c8d7dd;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.7);
}

.section-platform .platform-page-guide__toggle::before,
.section-platform .platform-page-guide__toggle::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 1.5px;
  background: #4d6477;
  content: "";
  transition: transform 180ms var(--modern-ease);
}

.section-platform .platform-page-guide__toggle::before {
  transform: translate(-72%, -50%) rotate(45deg);
}

.section-platform .platform-page-guide__toggle::after {
  transform: translate(-28%, -50%) rotate(-45deg);
}

.section-platform .platform-page-guide[open] .platform-page-guide__toggle::before {
  transform: translate(-72%, -50%) rotate(-45deg);
}

.section-platform .platform-page-guide[open] .platform-page-guide__toggle::after {
  transform: translate(-28%, -50%) rotate(45deg);
}

.section-platform .platform-page-guide__meta {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  padding: 0.68rem 0.8rem 0.78rem;
  border-top: 1px solid #d8e4e8;
}

.section-platform .platform-page-guide__summary p,
.section-platform .platform-page-guide__meta span {
  color: var(--modern-copy);
}

.platform-context-nav {
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.65rem;
  margin: 0.6rem clamp(1rem, 2vw, 1.65rem) 0;
}

.platform-context-nav__label {
  font-size: 0.64rem;
}

.platform-context-nav__links {
  display: flex;
  gap: 0.42rem;
  overflow-x: auto;
  padding: 0.08rem 0 0.18rem;
  scrollbar-width: none;
}

.platform-context-nav__links::-webkit-scrollbar {
  display: none;
}

.platform-context-link {
  flex: 0 1 210px;
  grid-template-columns: auto minmax(0, 1fr);
  min-width: 160px;
  min-height: 42px;
  padding: 0.42rem 0.55rem;
  border: 1px solid var(--modern-line);
  border-radius: 7px !important;
  color: var(--modern-ink);
  background: #fff !important;
  box-shadow: var(--modern-shadow-xs) !important;
  overflow: hidden;
}

.platform-context-link :where(strong, small, span) {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: normal;
}

.platform-context-link:hover {
  border-color: #b8c8d0;
  box-shadow: var(--modern-shadow-sm) !important;
  transform: translateY(-1px);
}

.platform-context-link .platform-link-icon {
  width: 28px;
  height: 28px;
}

.platform-context-link strong {
  font-size: 0.78rem;
}

.platform-context-link small {
  font-size: 0.64rem;
}

.section-platform .platform-main :where(
  .panel,
  .metric-card,
  .stack-item,
  .key-value,
  .detail-chip,
  .table-shell,
  .broker-table-wrap,
  .broker-record-row,
  .lead-list-item,
  .listing-card,
  .vault-document-item,
  .notification-panel,
  .dm-thread-panel,
  .dm-conversation-panel,
  .platform-filter-panel,
  .ops-filter-panel,
  .helm-command-hero,
  .helm-action-tile,
  .helm-command-metric,
  .helm-visual-panel,
  .helm-configuration-panel,
  .broker-os-panel,
  .broker-os-card,
  .broker-os-row-card,
  .agent-command-panel,
  .agent-walkthrough-panel,
  .agent-workflow-panel,
  .lead-command-card,
  .lead-route-row,
  .lead-source-command-card,
  .post-sale-plan-card,
  .post-sale-detail-section
) {
  border: 1px solid var(--modern-line) !important;
  border-radius: var(--modern-radius) !important;
  color: var(--modern-ink) !important;
  background: #fff !important;
  box-shadow: var(--modern-shadow-xs) !important;
}

.section-platform .platform-main :where(
  .panel,
  .metric-card,
  .helm-action-tile,
  .helm-command-metric,
  .broker-os-card,
  .broker-os-row-card,
  .lead-list-item,
  .listing-card,
  .post-sale-plan-card
):hover {
  border-color: #c0cfd6 !important;
  box-shadow: var(--modern-shadow-sm) !important;
}

.section-platform .platform-main :where(h1, h2, h3, h4, strong, b, .metric-value) {
  color: var(--modern-ink) !important;
}

.section-platform .platform-main :where(h2, h3, h4) {
  font-family: var(--font-sans) !important;
  font-weight: 760 !important;
  line-height: 1.2;
}

.section-platform .platform-main :where(p, li, small, label, td, th, .section-copy, .field-helper) {
  color: var(--modern-copy) !important;
}

.section-platform .platform-main :where(.panel-label, .eyebrow) {
  color: var(--modern-gold-strong) !important;
}

.section-platform .metric-card {
  min-height: 132px;
  padding: 1rem;
}

.section-platform .metric-card h3 {
  color: var(--modern-copy) !important;
  font-size: 0.84rem;
  font-weight: 700;
}

.section-platform .metric-card .metric-value,
.section-platform .metric-card > strong {
  font-family: var(--font-sans);
  font-size: clamp(2rem, 3vw, 2.75rem);
  font-weight: 780;
  font-variant-numeric: tabular-nums;
}

.section-platform .helm-command-overview {
  gap: 1rem;
}

.section-platform .helm-command-hero {
  border-color: #d6e4e8 !important;
  background: #eef5f6 !important;
}

.section-platform .helm-command-hero h2 {
  max-width: 16ch;
  font-family: var(--font-sans) !important;
  font-size: clamp(2rem, 3.4vw, 3.4rem);
  line-height: 1.02;
}

.platform-sidebar-open .section-platform .helm-command-hero h2 {
  max-width: 18ch;
  font-size: clamp(1.8rem, 2.7vw, 2.8rem) !important;
}

.section-platform .onboarding-page .broker-hero :where(h1, h2) {
  max-width: 30ch !important;
  margin: 0.12rem 0 0.55rem;
  font-family: var(--font-sans) !important;
  font-size: clamp(2rem, 3vw, 3rem) !important;
  font-weight: 780 !important;
  line-height: 1.08 !important;
  overflow-wrap: anywhere;
}

.section-platform .onboarding-step-panel :where(h2, h3),
.section-platform .review-grid h3,
.section-platform .onboarding-roster-card strong,
.section-platform .integration-row strong,
.section-platform .module-card span,
.section-platform .permission-row strong,
.section-platform .agent-mode-card span,
.section-platform .agent-workflow-row strong {
  font-family: var(--font-sans) !important;
}

.platform-sidebar-open .dm-thread-heading {
  display: grid;
  justify-items: start;
  gap: 0.45rem;
}

.platform-sidebar-open .dm-thread-heading h3 {
  white-space: nowrap;
}

.platform-sidebar-open .dm-thread-heading span:not(.status-badge) {
  white-space: nowrap;
}

.section-platform .helm-command-metrics {
  gap: 0.8rem;
}

.section-platform .helm-command-metric strong {
  font-family: var(--font-sans);
  font-weight: 780;
  font-variant-numeric: tabular-nums;
}

.section-platform .helm-action-tile {
  min-height: 70px;
}

.section-platform .helm-pipeline-chart {
  border-top-color: #dbe5e9;
  background: linear-gradient(to top, rgba(16, 36, 55, 0.055) 1px, transparent 1px) 0 0 / 100% 25%;
}

.section-platform .helm-donut span,
.section-platform .helm-readiness-gauge span {
  background: #fff;
}

.section-platform .broker-table,
.section-platform .data-table {
  color: var(--modern-ink);
}

.section-platform :where(.broker-table th, .data-table th, .ops-table-head) {
  color: #667b8d !important;
  background: #edf2f4 !important;
}

.section-platform :where(.broker-table td, .data-table td) {
  border-top-color: var(--modern-line) !important;
}

.section-platform :where(.broker-table tbody tr, .data-table tbody tr) {
  transition: background-color 160ms var(--modern-ease);
}

.section-platform :where(.broker-table tbody tr, .data-table tbody tr):hover {
  background: #f4f8f9;
}

.section-platform .broker-record-head {
  color: #667b8d;
  background: #edf2f4;
}

.section-platform :where(.backend-tabs, .segmented-control, .post-sale-filter-tabs) {
  border-color: var(--modern-line);
  border-radius: 7px;
  background: #edf2f4;
}

.section-platform :where(.backend-tabs button, .segmented-control button, .post-sale-filter-tabs button) {
  border-radius: 5px;
  color: var(--modern-copy);
}

.section-platform :where(.backend-tabs button.is-active, .segmented-control button.is-active, .post-sale-filter-tabs button.is-active) {
  color: var(--modern-ink);
  background: #fff;
  box-shadow: var(--modern-shadow-xs);
}

.section-platform :where(.status-badge, .intent-badge, .pill-tag, .meta-chip) {
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
}

.section-platform :where(input, textarea, select, .custom-select-trigger) {
  min-width: 0;
}

.section-platform :where(input, textarea)::placeholder {
  color: #718393;
  opacity: 1;
}

.section-platform :where(button, input, textarea, select):disabled,
.section-platform [aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.64;
}

.section-platform :where(.panel, .metric-card, .broker-os-card, .helm-action-tile, .stack-item) {
  min-width: 0;
}

.section-platform :where(.panel, .metric-card, .broker-os-card, .helm-action-tile, .stack-item) :where(h2, h3, h4, p, strong, span) {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.toast-region {
  right: 1rem;
  bottom: 1rem;
}

.toast {
  border: 1px solid var(--modern-line);
  border-radius: var(--modern-radius) !important;
  color: var(--modern-ink);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 20px 50px rgba(16, 36, 55, 0.16);
  backdrop-filter: blur(16px);
}

/* Dark mode */

html[data-theme="dark"] {
  color-scheme: dark;
  --modern-ink: #f4f8fa;
  --modern-ink-soft: #d9e4ea;
  --modern-copy: #b7c7d1;
  --modern-muted: #91a5b3;
  --modern-canvas: #07131e;
  --modern-surface: #0d2130;
  --modern-surface-muted: #102838;
  --modern-line: rgba(210, 225, 234, 0.13);
  --modern-line-strong: rgba(210, 225, 234, 0.2);
  --modern-gold: #d5b46e;
  --modern-gold-strong: #e1c47f;
  --modern-aqua: #45c3cf;
  --modern-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.2);
  --modern-shadow-sm: 0 10px 28px rgba(0, 0, 0, 0.24);
  --modern-shadow-md: 0 22px 58px rgba(0, 0, 0, 0.34);
}

html[data-theme="dark"] body,
html[data-theme="dark"] .page-shell-main,
html[data-theme="dark"] .site-shell-platform,
html[data-theme="dark"] .page-shell-platform,
html[data-theme="dark"] .section-platform,
html[data-theme="dark"] .section-platform .platform-shell,
html[data-theme="dark"] .section-platform .platform-main-scroll {
  color: var(--modern-ink);
  background: var(--modern-canvas) !important;
}

html[data-theme="dark"] .page-shell::after {
  display: none !important;
}

html[data-theme="dark"] .page-shell-main::before {
  opacity: 0.13;
  filter: saturate(0.35) brightness(0.48);
}

html[data-theme="dark"] :is(
  .page-route-ai-finder,
  .page-route-how-it-works,
  .page-route-brokerage,
  .page-route-request-demo
)::before {
  opacity: 1 !important;
  background-image:
    linear-gradient(180deg, rgba(5, 16, 25, 0.84), rgba(7, 22, 34, 0.92)),
    var(--modern-route-image) !important;
  background-position: center, var(--modern-route-position) !important;
  background-size: cover, cover !important;
  filter: saturate(0.68) contrast(1.02) brightness(0.74);
}

html[data-theme="dark"] .topbar:not(.topbar-platform) {
  border-bottom-color: var(--modern-line);
  background: rgba(5, 16, 25, 0.94) !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03);
}

html[data-theme="dark"] .topbar:not(.topbar-platform) :where(.brand-text span, .nav-link, .mobile-link) {
  color: var(--modern-ink) !important;
}

html[data-theme="dark"] .topbar:not(.topbar-platform) .brand-text small {
  color: var(--modern-muted) !important;
}

html[data-theme="dark"] .nav-link:hover,
html[data-theme="dark"] .nav-link.is-active,
html[data-theme="dark"] .nav-link[aria-current="page"] {
  color: #fff !important;
  background: transparent !important;
}

html[data-theme="dark"] .nav-link:not(:first-child)::before {
  background: linear-gradient(
    180deg,
    transparent,
    rgba(217, 228, 234, 0.22) 22%,
    rgba(217, 228, 234, 0.22) 78%,
    transparent
  );
}

html[data-theme="dark"] .mobile-menu-toggle,
html[data-theme="dark"] .mobile-nav {
  border-color: var(--modern-line);
  background: #0a1c2a;
}

html[data-theme="dark"] .page-route-home .hero-section > .hero-grid-refined {
  background: #06131e url("/public/assets/helm-home-marina-hero.png") center / cover no-repeat !important;
}

html[data-theme="dark"] .page-route-home .hero-grid-refined::after {
  background:
    linear-gradient(90deg, rgba(2, 10, 17, 0.96) 0%, rgba(4, 17, 28, 0.86) 42%, rgba(4, 17, 28, 0.38) 72%, rgba(4, 17, 28, 0.18) 100%) !important;
}

html[data-theme="dark"] .home-flow-section,
html[data-theme="dark"] .home-featured-section,
html[data-theme="dark"] .home-story-section {
  background: #081824;
}

html[data-theme="dark"] :where(
  .panel,
  .metric-card,
  .signal-card,
  .feature-card,
  .timeline-card,
  .home-yacht-card,
  .listing-card,
  .report-card,
  .auth-panel,
  .empty-state,
  .broker-card,
  .brokerage-pricing-card,
  .brokerage-pricing-note,
  .brokerage-connect-card,
  .listing-toolbar,
  .browse-filter-shell,
  .listing-detail-broker-card,
  .listing-detail-match-panel,
  .listing-detail-description-card,
  .listing-detail-inquiry-aside .panel
) {
  border-color: var(--modern-line) !important;
  color: var(--modern-copy) !important;
  background: var(--modern-surface) !important;
  box-shadow: var(--modern-shadow-xs) !important;
}

html[data-theme="dark"] :where(
  h1,
  h2,
  h3,
  h4,
  strong,
  .feature-card h3,
  .signal-card h3,
  .listing-card-content h3
) {
  color: var(--modern-ink) !important;
}

html[data-theme="dark"] :where(p, li, small, .section-copy, .feature-card p, .signal-card p) {
  color: var(--modern-copy) !important;
}

html[data-theme="dark"] :where(.eyebrow, .panel-label) {
  color: var(--modern-gold-strong) !important;
}

html[data-theme="dark"] .cta-banner {
  border-color: rgba(213, 180, 110, 0.24);
  background: #102838 !important;
}

html[data-theme="dark"] .page-route-login .section,
html[data-theme="dark"] .page-route-broker-login .section,
html[data-theme="dark"] .page-route-buyer-login .section,
html[data-theme="dark"] .page-route-buyer-signup .section {
  background:
    linear-gradient(rgba(7, 19, 30, 0.88), rgba(7, 19, 30, 0.96)),
    url("/public/assets/backgrounds/helm-bg-deck-sunrise.png") center / cover fixed;
}

html[data-theme="dark"] :where(input, textarea, select, .custom-select-trigger, .custom-select-search) {
  border-color: var(--modern-line-strong) !important;
  color: var(--modern-ink) !important;
  background: #071722 !important;
}

html[data-theme="dark"] .custom-select-menu {
  border-color: var(--modern-line-strong) !important;
  color: var(--modern-ink) !important;
  background: #0c2130 !important;
}

html[data-theme="dark"] .custom-select-option:hover,
html[data-theme="dark"] .custom-select-option.is-selected {
  background: #173343 !important;
}

html[data-theme="dark"] .btn-soft {
  border-color: #d5b46e;
  color: #07131e;
  background: #d5b46e;
}

html[data-theme="dark"] .btn-soft:hover {
  border-color: #e3c98e;
  color: #07131e;
  background: #e3c98e;
}

html[data-theme="dark"] .btn-ghost,
html[data-theme="dark"] .chip-button {
  border-color: var(--modern-line-strong);
  color: var(--modern-ink);
  background: rgba(255, 255, 255, 0.045);
}

html[data-theme="dark"] .platform-sidebar-rail,
html[data-theme="dark"] .section-platform .platform-sidebar-scroll {
  border-color: var(--modern-line);
  color: var(--modern-copy) !important;
  background: #081a27 !important;
  box-shadow: 14px 0 36px rgba(0, 0, 0, 0.22) !important;
}

html[data-theme="dark"] .platform-sidebar-rail__icon,
html[data-theme="dark"] .section-platform .platform-group-arrow {
  border-color: var(--modern-line-strong);
  background: rgba(255, 255, 255, 0.055);
}

html[data-theme="dark"] .section-platform .platform-nav-group[open] {
  border-color: var(--modern-line);
  background: rgba(255, 255, 255, 0.035) !important;
}

html[data-theme="dark"] .section-platform .platform-link {
  color: var(--modern-copy);
}

html[data-theme="dark"] .section-platform .platform-link:hover {
  border-color: var(--modern-line);
  color: var(--modern-ink);
  background: rgba(255, 255, 255, 0.055);
}

html[data-theme="dark"] .section-platform .platform-link.is-active,
html[data-theme="dark"] .section-platform .platform-link[aria-current="page"] {
  border-color: rgba(69, 195, 207, 0.2);
  color: #e9fbfd !important;
  background: rgba(69, 195, 207, 0.12) !important;
  box-shadow: inset 3px 0 0 var(--modern-gold);
}

html[data-theme="dark"] .section-platform .platform-sidebar-scroll .platform-link.is-active,
html[data-theme="dark"] .section-platform .platform-sidebar-scroll .platform-link[aria-current="page"] {
  border-color: rgba(69, 195, 207, 0.2) !important;
  color: #e9fbfd !important;
  background: rgba(69, 195, 207, 0.12) !important;
  box-shadow: inset 3px 0 0 var(--modern-gold) !important;
}

html[data-theme="dark"] .section-platform .platform-link.is-active *,
html[data-theme="dark"] .section-platform .platform-link[aria-current="page"] * {
  color: inherit !important;
}

html[data-theme="dark"] .section-platform .platform-sidebar-scroll .platform-link.is-active *,
html[data-theme="dark"] .section-platform .platform-sidebar-scroll .platform-link[aria-current="page"] * {
  color: inherit !important;
}

html[data-theme="dark"] .section-platform .platform-header-compact {
  border-bottom-color: var(--modern-line);
  background: rgba(7, 25, 38, 0.94) !important;
}

html[data-theme="dark"] .section-platform .platform-header-kicker {
  color: var(--modern-gold-strong) !important;
}

html[data-theme="dark"] .section-platform .platform-header-kicker span,
html[data-theme="dark"] .platform-sidebar-rail__label {
  color: var(--modern-copy) !important;
}

html[data-theme="dark"] .section-platform .platform-page-guide {
  border-color: var(--modern-line);
  background: #0d2635 !important;
}

html[data-theme="dark"] .section-platform .platform-page-guide__summary:hover {
  background: rgba(255, 255, 255, 0.035);
}

html[data-theme="dark"] .section-platform .platform-page-guide__meta {
  border-color: var(--modern-line);
}

html[data-theme="dark"] .section-platform .platform-page-guide__toggle {
  border-color: var(--modern-line-strong);
  background: rgba(255, 255, 255, 0.055);
}

html[data-theme="dark"] .section-platform .platform-page-guide__toggle::before,
html[data-theme="dark"] .section-platform .platform-page-guide__toggle::after {
  background: var(--modern-copy);
}

html[data-theme="dark"] .platform-context-link {
  border-color: var(--modern-line);
  color: var(--modern-ink);
  background: var(--modern-surface) !important;
}

html[data-theme="dark"] .section-platform .platform-main :where(
  .panel,
  .metric-card,
  .stack-item,
  .key-value,
  .detail-chip,
  .table-shell,
  .broker-table-wrap,
  .broker-record-row,
  .lead-list-item,
  .listing-card,
  .vault-document-item,
  .notification-panel,
  .dm-thread-panel,
  .dm-conversation-panel,
  .platform-filter-panel,
  .ops-filter-panel,
  .helm-command-hero,
  .helm-action-tile,
  .helm-command-metric,
  .helm-visual-panel,
  .helm-configuration-panel,
  .broker-os-panel,
  .broker-os-card,
  .broker-os-row-card,
  .agent-command-panel,
  .agent-walkthrough-panel,
  .agent-workflow-panel,
  .lead-command-card,
  .lead-route-row,
  .lead-source-command-card,
  .post-sale-plan-card,
  .post-sale-detail-section
) {
  border-color: var(--modern-line) !important;
  color: var(--modern-copy) !important;
  background: var(--modern-surface) !important;
  box-shadow: var(--modern-shadow-xs) !important;
}

html[data-theme="dark"] .section-platform .platform-main :where(h1, h2, h3, h4, strong, b, .metric-value) {
  color: var(--modern-ink) !important;
}

html[data-theme="dark"] .section-platform .platform-main :where(p, li, small, label, td, th, .section-copy, .field-helper) {
  color: var(--modern-copy) !important;
}

html[data-theme="dark"] .section-platform .platform-main :where(.panel-label, .eyebrow) {
  color: var(--modern-gold-strong) !important;
}

html[data-theme="dark"] .section-platform .helm-command-hero {
  background: #0c2635 !important;
}

html[data-theme="dark"] .section-platform .helm-donut span,
html[data-theme="dark"] .section-platform .helm-readiness-gauge span {
  background: #081a27;
}

html[data-theme="dark"] .section-platform :where(.broker-table th, .data-table th, .ops-table-head, .broker-record-head) {
  color: var(--modern-muted) !important;
  background: #0a1c29 !important;
}

html[data-theme="dark"] .toast {
  border-color: var(--modern-line);
  color: var(--modern-ink);
  background: rgba(13, 33, 48, 0.98);
}

/* Responsive release rules */

@media (max-width: 1180px) {
  .nav-links {
    display: none;
  }

  .mobile-menu-toggle {
    display: inline-flex;
  }

  .page-route-home .hero-copy {
    width: min(780px, 88%);
  }

}

@media (max-width: 980px) {
  :root {
    --modern-header-height: 68px;
    --modern-platform-header-height: 64px;
  }

  .container {
    width: min(100% - 1.5rem, 1480px);
  }

  .brand-logo {
    width: 42px;
    height: 42px;
  }

  .brand-text small {
    display: none;
  }

  .section-platform .platform-main {
    padding: 0.9rem;
  }

  .section-platform .platform-header-compact {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .section-platform .platform-header-actions {
    justify-content: flex-start;
  }

  .section-platform .platform-sidebar-scroll {
    box-shadow: 18px 0 42px rgba(16, 36, 55, 0.18);
  }
}

@media (max-width: 760px) {
  body {
    font-size: 15px;
  }

  .section {
    padding-block: 3rem;
  }

  .nav-actions > .btn,
  .platform-main-site-link {
    display: none;
  }

  .page-route-home .hero-section {
    min-height: auto;
    padding-bottom: 1.25rem !important;
  }

  .page-route-home .hero-section > .hero-grid-refined {
    min-height: min(590px, calc(100svh - 205px));
    padding: 0 !important;
    background-position: 64% center !important;
  }

  .page-route-home .hero-visual {
    display: none !important;
  }

  .page-route-home .hero-grid-refined::after {
    background:
      linear-gradient(180deg, rgba(5, 18, 30, 0.72) 0%, rgba(5, 18, 30, 0.48) 28%, rgba(5, 18, 30, 0.93) 78%, rgba(5, 18, 30, 0.98) 100%) !important;
  }

  .page-route-home .hero-copy {
    width: 100%;
    align-content: end;
    padding: 1.5rem !important;
  }

  .page-route-home .hero-copy h1 {
    max-width: 10ch;
    font-size: clamp(3.3rem, 17vw, 5rem);
  }

  .page-route-home .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .page-route-home .hero-actions .btn {
    width: 100%;
    white-space: normal !important;
  }

  .home-audience-divider span {
    font-size: 1.25rem;
    white-space: normal;
    text-align: center;
  }

  .auth-switch-actions {
    grid-template-columns: 1fr;
  }

  .section-platform .platform-header-actions,
  .section-platform .platform-header-actions .btn {
    width: 100%;
  }

  .section-platform .platform-page-guide {
    margin: 0.65rem 0.9rem 0;
    padding: 0;
  }

  .section-platform .platform-page-guide__summary {
    grid-template-columns: minmax(0, 1fr) 24px;
    gap: 0.35rem 0.75rem;
    padding: 0.68rem 0.75rem;
  }

  .section-platform .platform-page-guide__summary p {
    grid-column: 1 / -1;
  }

  .section-platform .platform-page-guide__toggle {
    grid-column: 2;
    grid-row: 1;
  }

  .section-platform .platform-page-guide__meta {
    grid-template-columns: 1fr;
    gap: 0.45rem;
    padding: 0.68rem 0.75rem 0.75rem;
  }

  .platform-context-nav {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    margin-inline: 0.9rem;
    overflow: hidden;
  }

  .platform-context-nav__links {
    display: flex !important;
    width: 100%;
    gap: 0.55rem;
    overflow-x: auto;
    padding: 0.08rem 0 0.4rem;
    scroll-padding-inline: 0.1rem;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .platform-context-link {
    flex: 0 0 168px;
    min-width: 168px !important;
    scroll-snap-align: start;
  }

  .section-platform .onboarding-progress {
    display: flex;
    width: 100%;
    gap: 0.55rem;
    overflow-x: auto;
    padding-bottom: 0.4rem;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
  }

  .section-platform .onboarding-progress__step {
    flex: 0 0 148px;
    min-width: 148px;
    scroll-snap-align: start;
  }

  .section-platform .helm-command-hero h2 {
    font-size: 2rem;
  }

  .toast-region {
    right: 0.65rem;
    bottom: 0.65rem;
    left: 0.65rem;
  }

  .toast {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .brand-text span {
    font-size: 1.25rem;
  }

  .topbar-platform .brand-text small {
    display: none;
  }

  .section-heading :where(h1, h2) {
    font-size: 2.65rem;
  }

  .auth-panel {
    padding: 1.1rem;
  }

  .auth-card-brand :where(h1, h3) {
    font-size: 2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Release contrast and profile refinements */

html[data-theme="light"] body .page-shell .eyebrow,
html[data-theme="light"] body .page-shell .panel-label {
  color: #765414 !important;
}

.listing-art-tag {
  border-color: rgba(255, 255, 255, 0.34) !important;
  color: #fff !important;
  background: rgba(7, 24, 39, 0.9) !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.34);
}

html:not([data-theme="dark"]) body .cta-banner :where(h2, h3, p, .section-copy) {
  color: #f8fbfc !important;
}

html[data-theme="light"] body .page-shell .cta-banner .eyebrow,
html[data-theme="light"] body .page-shell .cta-banner .panel-label {
  color: #f0d28e !important;
}

.section-platform .platform-main .deal-tracker-row .deal-field-value {
  color: #496176 !important;
}

.section-platform :where(.broker-table th, .data-table th, .ops-table-head, .broker-record-head) {
  color: #506779 !important;
}

.section-platform .team-member-card,
.section-platform .team-member-contact-item,
.section-platform .team-stat-chip {
  color: var(--modern-ink) !important;
  background: #fff !important;
}

.section-platform .team-member-contact-item span {
  color: #765414 !important;
}

.section-platform .team-member-contact-item :where(a, p),
.section-platform .team-stat-chip :where(strong, span) {
  color: var(--modern-ink) !important;
}

.section-platform .closing-progress > div > span,
.section-platform .post-sale-plan-meta > span,
.section-platform .post-sale-key-value > span {
  color: #586f82 !important;
}

.section-platform .closing-progress > div > strong,
.section-platform .post-sale-plan-meta > strong,
.section-platform .post-sale-key-value > strong {
  color: var(--modern-ink) !important;
}

.section-platform .closing-document-row,
.section-platform .client-next-step-card,
.section-platform .client-info-tile,
.section-platform .client-narrative-card,
.section-platform .client-activity-item {
  border-color: var(--modern-line) !important;
  color: var(--modern-ink) !important;
  background: #fff !important;
}

.section-platform .client-next-step-number {
  color: #102a40 !important;
  background: #d9eef1 !important;
}

.section-platform .client-list-status small {
  color: #496176 !important;
}

html[data-theme="light"] .section-platform .platform-main .backend-tabs button > small {
  color: #40596d !important;
}

.section-platform .post-sale-plan-vessel {
  color: #765414 !important;
}

.section-platform .queue-item-pill--risk {
  color: #805400 !important;
}

.profile-favorites-panel .pill-tag {
  border-color: #b8dfe3 !important;
  color: #0b6571 !important;
  background: #e5f8fa !important;
}

/* Accessible semantic colors on light surfaces */

html[data-theme="light"] :where(.preview-chip, .pill-tag, .score-pill) {
  border-color: #acd9df !important;
  color: #075f6d !important;
  background: #e7f6f8 !important;
}

html[data-theme="light"] .status-badge.success {
  border-color: #addac9 !important;
  color: #126149 !important;
  background: #e4f4ed !important;
}

html[data-theme="light"] .status-badge.warm {
  border-color: #e1c17b !important;
  color: #754900 !important;
  background: #fff2d6 !important;
}

html[data-theme="light"] :where(.status-badge.solid, .intent-badge) {
  border-color: #abd5dd !important;
  color: #075b69 !important;
  background: #e5f4f7 !important;
}

html[data-theme="light"] .status-badge.muted {
  border-color: #cbd6dc !important;
  color: #40586b !important;
  background: #edf1f3 !important;
}

html[data-theme="light"] .icon-status-pill--success {
  border-color: #addac9 !important;
  color: #126149 !important;
  background: #e4f4ed !important;
}

html[data-theme="light"] .icon-status-pill--warning {
  border-color: #e1c17b !important;
  color: #754900 !important;
  background: #fff2d6 !important;
}

html[data-theme="light"] :where(.icon-status-pill--info, .icon-status-pill--active) {
  border-color: #abd5dd !important;
  color: #075b69 !important;
  background: #e5f4f7 !important;
}

html[data-theme="light"] .icon-status-pill--critical {
  border-color: #e4b5b1 !important;
  color: #8b302e !important;
  background: #fbe9e7 !important;
}

html[data-theme="light"] .listing-detail-price-block .detail-price {
  color: #08758a !important;
}

.topbar-platform .brand-lockup {
  color: #fff !important;
}

.section-platform .post-sale-plan-blocker {
  border-color: #e0c27d !important;
  color: #684811 !important;
  background: #fff3d3 !important;
}

.section-platform .broker-os-pill-row span,
.section-platform .broker-os-mini-grid > div,
.section-platform .broker-os-roadmap-card,
.section-platform .broker-os-step-list article,
.section-platform .broker-os-note-card {
  border-color: var(--modern-line) !important;
  color: var(--modern-ink) !important;
  background: #f4f7f8 !important;
}

.section-platform .broker-os-pill-row span {
  color: #496176 !important;
}

.section-platform :where(.input-shell label, .input-shell > span, .custom-select-label) {
  color: #40596d !important;
}

.section-platform :where(.text-link, a:not(.btn):not(.platform-link):not(.platform-context-link)) {
  color: #0b6571;
}

.section-platform :where(.text-link, a:not(.btn):not(.platform-link):not(.platform-context-link)):hover {
  color: #064a53;
}

.skip-link {
  color: #fff !important;
  background: #071827 !important;
}

/* Sharper, calmer profile workspace */

.profile-section {
  min-height: calc(100svh - var(--modern-header-height));
  padding-block: 2.2rem 4rem;
  background: var(--modern-canvas) !important;
}

.profile-container {
  width: min(100% - 2rem, 1280px);
  gap: 1rem;
}

.profile-hero {
  grid-template-columns: minmax(300px, 0.78fr) minmax(520px, 1.22fr);
  gap: 1.5rem;
  padding: 1.35rem !important;
  border-color: var(--modern-line) !important;
  border-radius: var(--modern-radius) !important;
  background: #fff !important;
  box-shadow: var(--modern-shadow-xs) !important;
}

.profile-identity {
  min-width: 0;
}

.profile-identity h1 {
  margin: 0.12rem 0 0.35rem;
  font-family: var(--font-sans);
  font-size: clamp(1.8rem, 3vw, 2.65rem);
  font-weight: 780;
  line-height: 1.06;
}

.profile-identity .section-copy {
  margin: 0;
}

.profile-avatar-square {
  width: 74px;
  height: 74px;
  border: 1px solid rgba(184, 146, 79, 0.44);
  border-radius: 7px;
  color: #102a40;
  background: #f8f4ea;
  box-shadow: none;
}

.profile-action-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.profile-action-card {
  min-width: 0;
  min-height: 64px;
  padding: 0.7rem;
  border-color: var(--modern-line);
  border-radius: 7px;
  color: var(--modern-ink);
  background: #f7f9fa;
  box-shadow: none;
  transition:
    border-color var(--modern-transition),
    background var(--modern-transition),
    transform var(--modern-transition);
}

.profile-action-card:hover,
.profile-action-card.is-active {
  border-color: #b8c9d1;
  color: var(--modern-ink);
  background: #edf5f6;
  transform: translateY(-1px);
}

.profile-action-card.is-active {
  box-shadow: inset 3px 0 0 var(--modern-gold);
}

.profile-action-icon {
  width: 32px;
  height: 32px;
  border: 1px solid #d7e5e8;
  border-radius: 6px;
  color: #17465b;
  background: #edf5f6;
}

.profile-action-link span {
  min-width: 0;
}

.profile-action-link strong,
.profile-action-link small {
  overflow-wrap: anywhere;
}

.profile-action-link strong {
  color: var(--modern-ink);
  font-size: 0.82rem;
  line-height: 1.2;
}

.profile-action-link small {
  color: #5d7182;
  font-size: 0.7rem;
  line-height: 1.28;
}

.profile-subnav {
  display: flex;
  gap: 0;
  padding: 0;
  overflow-x: auto;
  overflow-y: hidden;
  border: 0;
  border-bottom: 1px solid var(--modern-line);
  border-radius: 0;
  background: transparent;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.profile-subnav::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.profile-subnav a {
  position: relative;
  min-height: 48px;
  padding: 0 1rem;
  border-radius: 0;
  color: #52697b;
  font-size: 0.84rem;
  white-space: nowrap;
}

.profile-subnav a:hover {
  color: var(--modern-ink);
  background: transparent;
}

.profile-subnav a.is-active {
  color: var(--modern-ink);
  background: transparent;
}

.profile-subnav a.is-active::after {
  position: absolute;
  right: 0.8rem;
  bottom: -1px;
  left: 0.8rem;
  height: 2px;
  background: var(--modern-gold);
  content: "";
}

.profile-info-panel,
.profile-favorites-panel,
.profile-card {
  border-color: var(--modern-line) !important;
  border-radius: var(--modern-radius) !important;
  color: var(--modern-ink) !important;
  background: #fff !important;
  box-shadow: var(--modern-shadow-xs) !important;
}

.profile-info-grid {
  gap: 0;
}

.profile-info-block {
  padding: 0 1.1rem;
}

.profile-info-block:first-child {
  padding-left: 0;
}

.profile-info-block:last-child {
  padding-right: 0;
}

.profile-info-block + .profile-info-block {
  border-left: 1px solid var(--modern-line);
}

.profile-detail-list {
  gap: 0;
}

.profile-detail-list div {
  grid-template-columns: minmax(112px, 0.42fr) minmax(0, 1fr);
  align-items: baseline;
  gap: 0.7rem;
  padding: 0.72rem 0;
  border: 0;
  border-bottom: 1px solid var(--modern-line);
  border-radius: 0;
  background: transparent;
}

.profile-detail-list span {
  color: #586f82;
  font-size: 0.7rem;
}

.profile-detail-list strong {
  min-width: 0;
  color: var(--modern-ink);
  overflow-wrap: anywhere;
}

.profile-subpage-card {
  width: min(100%, 980px);
  max-width: none;
  padding: clamp(1.15rem, 2vw, 1.65rem) !important;
}

.profile-form {
  margin-top: 0.2rem;
}

.profile-form .btn[type="submit"] {
  justify-self: start;
  width: auto;
  min-width: 180px;
}

.profile-live-verification,
.profile-verification-card,
.profile-connection-list,
.profile-connection-row {
  border-color: var(--modern-line);
  border-radius: 7px;
  color: var(--modern-ink);
  background: #f7f9fa;
}

.profile-connection-row {
  border-radius: 0;
}

.profile-connection-row span,
.profile-verification-card span:not(.profile-verification-pill) {
  color: #765414;
}

.profile-connection-row strong,
.profile-verification-card strong {
  color: var(--modern-ink);
}

.profile-verification-complete,
.profile-verification-missing {
  border-color: var(--modern-line);
  border-radius: 6px;
}

.profile-verification-complete {
  border-color: rgba(33, 151, 116, 0.2);
  background: #edf8f4;
}

.profile-verification-missing {
  background: #ffffff;
}

.profile-connection-status {
  border-radius: 999px;
}

html[data-theme="dark"] .profile-section {
  background: var(--modern-canvas) !important;
}

html[data-theme="dark"] :where(
  .profile-hero,
  .profile-info-panel,
  .profile-favorites-panel,
  .profile-card
) {
  border-color: var(--modern-line) !important;
  color: var(--modern-copy) !important;
  background: var(--modern-surface) !important;
  box-shadow: var(--modern-shadow-xs) !important;
}

html[data-theme="dark"] .profile-avatar-square {
  border-color: rgba(213, 180, 110, 0.36);
  color: #f4f8fa;
  background: #173040;
}

html[data-theme="dark"] .profile-action-card {
  border-color: var(--modern-line);
  color: var(--modern-ink);
  background: #0a1c29;
}

html[data-theme="dark"] .profile-action-card:hover,
html[data-theme="dark"] .profile-action-card.is-active {
  border-color: rgba(69, 195, 207, 0.28);
  background: #102c3d;
}

html[data-theme="dark"] .profile-action-icon {
  border-color: var(--modern-line);
  color: #bcecf0;
  background: #123043;
}

html[data-theme="dark"] .profile-action-link strong,
html[data-theme="dark"] .profile-identity h1,
html[data-theme="dark"] .profile-detail-list strong,
html[data-theme="dark"] .profile-connection-row strong,
html[data-theme="dark"] .profile-verification-card strong {
  color: var(--modern-ink) !important;
}

html[data-theme="dark"] .profile-action-link small,
html[data-theme="dark"] .profile-detail-list span {
  color: var(--modern-copy) !important;
}

html[data-theme="dark"] .profile-subnav {
  border-color: var(--modern-line);
}

html[data-theme="dark"] .profile-subnav a {
  color: var(--modern-copy);
}

html[data-theme="dark"] .profile-subnav a:hover,
html[data-theme="dark"] .profile-subnav a.is-active {
  color: var(--modern-ink);
  background: transparent;
}

html[data-theme="dark"] .profile-info-block + .profile-info-block,
html[data-theme="dark"] .profile-detail-list div,
html[data-theme="dark"] .profile-connection-row + .profile-connection-row {
  border-color: var(--modern-line);
}

html[data-theme="dark"] :where(
  .profile-live-verification,
  .profile-verification-card,
  .profile-connection-list,
  .profile-connection-row
) {
  border-color: var(--modern-line);
  color: var(--modern-copy);
  background: #0a1c29;
}

html[data-theme="dark"] .profile-connection-row span,
html[data-theme="dark"] .profile-verification-card span:not(.profile-verification-pill) {
  color: var(--modern-gold-strong) !important;
}

html[data-theme="dark"] .profile-live-verification-header p:not(.panel-label),
html[data-theme="dark"] .profile-verification-card .profile-verification-complete span,
html[data-theme="dark"] .profile-verification-card .profile-verification-missing span {
  color: var(--modern-copy) !important;
}

html[data-theme="dark"] .profile-verification-complete {
  border-color: rgba(71, 196, 155, 0.24);
  background: rgba(24, 79, 65, 0.42);
}

html[data-theme="dark"] .profile-verification-complete strong,
html[data-theme="dark"] .profile-connection-status {
  color: #a8edd4 !important;
}

html[data-theme="dark"] .profile-verification-missing {
  border-color: var(--modern-line);
  background: #0d2331;
}

html[data-theme="dark"] .profile-connection-status {
  border-color: rgba(71, 196, 155, 0.24);
  background: rgba(24, 79, 65, 0.42);
}

/* Dark workspace surface and text contract */

html[data-theme="dark"] .skip-link {
  color: #07131e !important;
  background: #f4f8fa !important;
}

html[data-theme="dark"] .listing-card-favorite,
html[data-theme="dark"] .favorite-button {
  border-color: var(--modern-line-strong) !important;
  color: #f4f8fa !important;
  background: rgba(7, 19, 30, 0.88) !important;
}

html[data-theme="dark"] body .page-shell .btn.btn-ghost {
  border-color: var(--modern-line-strong) !important;
  color: var(--modern-ink) !important;
  background: rgba(255, 255, 255, 0.045) !important;
}

html[data-theme="dark"] :where(.privacy-copy a, .terms-copy a, .contact-copy a, .main-site-footer a) {
  color: #9ceaf2 !important;
}

html[data-theme="dark"] .legal-contact-card a {
  color: #9ceaf2 !important;
}

html[data-theme="dark"] .legal-effective-date {
  border-color: var(--modern-line) !important;
  color: var(--modern-copy) !important;
  background: #102838 !important;
}

html[data-theme="dark"] .field-group > span,
html[data-theme="dark"] .field-group > label > span {
  color: #d9e4ea !important;
}

html[data-theme="dark"] .auth-switch-panel > span {
  color: var(--modern-gold-strong) !important;
}

html[data-theme="dark"] .section-platform .platform-main :where(
  .team-member-card,
  .team-member-contact-item,
  .team-stat-chip,
  .team-assignment-panel,
  .team-assignment-option,
  .closing-room-card,
  .closing-document-row,
  .client-list-card,
  .client-detail-panel,
  .client-detail-block,
  .client-info-tile,
  .client-narrative-card,
  .client-activity-panel,
  .client-activity-item,
  .client-next-step-card,
  .notification-broker-card,
  .notification-event-row,
  .notification-provider-row,
  .listing-assignment-row,
  .broker-os-card,
  .broker-os-row-card,
  .broker-os-mini-grid > div,
  .broker-os-roadmap-card,
  .broker-os-step-list article,
  .broker-os-note-card,
  .post-sale-key-value,
  .permission-meta-cell
) {
  border-color: var(--modern-line) !important;
  color: var(--modern-copy) !important;
  background: var(--modern-surface) !important;
  box-shadow: var(--modern-shadow-xs) !important;
}

html[data-theme="dark"] .section-platform .platform-main :where(
  .team-member-card,
  .team-member-contact-item,
  .team-stat-chip,
  .client-list-card,
  .client-detail-panel,
  .client-info-tile,
  .client-narrative-card,
  .client-activity-item,
  .client-next-step-card,
  .closing-room-card,
  .closing-document-row,
  .broker-os-card,
  .broker-os-row-card,
  .broker-os-mini-grid > div,
  .broker-os-roadmap-card,
  .broker-os-step-list article,
  .notification-broker-card,
  .notification-event-row,
  .notification-provider-row
) :where(h2, h3, h4, strong, b) {
  color: var(--modern-ink) !important;
}

html[data-theme="dark"] .section-platform .platform-main :where(
  .team-member-contact-item,
  .team-stat-chip,
  .client-detail-panel,
  .client-info-tile,
  .client-narrative-card,
  .client-activity-item,
  .client-next-step-card,
  .closing-room-card,
  .closing-document-row,
  .broker-os-card,
  .broker-os-row-card,
  .broker-os-mini-grid > div,
  .broker-os-roadmap-card,
  .broker-os-step-list article,
  .notification-broker-card,
  .notification-event-row,
  .notification-provider-row
) :where(p, small, li, a:not(.btn), span:not(.status-badge):not(.pill-tag)) {
  color: var(--modern-copy) !important;
}

html[data-theme="dark"] .section-platform :where(.broker-table th, .data-table th, .ops-table-head, .broker-record-head) {
  color: #b7c7d1 !important;
  background: #0a1c29 !important;
}

html[data-theme="dark"] .section-platform :where(.broker-table tbody tr, .data-table tbody tr):hover {
  background: rgba(69, 195, 207, 0.055);
}

html[data-theme="dark"] .section-platform .broker-record-head-deals > span,
html[data-theme="dark"] .section-platform .deal-field-value,
html[data-theme="dark"] .section-platform .post-sale-plan-meta > span,
html[data-theme="dark"] .section-platform .post-sale-key-value > span,
html[data-theme="dark"] .section-platform .closing-progress > div > span {
  color: var(--modern-copy) !important;
}

html[data-theme="dark"] .section-platform .broker-os-pill-row span {
  border-color: var(--modern-line) !important;
  color: var(--modern-copy) !important;
  background: #0a1c29 !important;
}

html[data-theme="dark"] .section-platform .post-sale-plan-blocker {
  border-color: rgba(225, 196, 127, 0.32) !important;
  color: #f2d997 !important;
  background: rgba(135, 92, 18, 0.24) !important;
}

html[data-theme="dark"] .section-platform .client-next-step-number {
  color: #dffbfc !important;
  background: #174353 !important;
}

html[data-theme="dark"] .section-platform .platform-main .onboarding-progress__step:not(.is-active) > span {
  color: #f8e6ba !important;
  background: rgba(213, 180, 110, 0.16) !important;
}

html[data-theme="dark"] .section-platform .broker-assignment-copy > span {
  color: var(--modern-copy) !important;
}

html[data-theme="dark"] .section-platform .notification-event-meta > span {
  border-color: var(--modern-line) !important;
  color: var(--modern-copy) !important;
  background: #0a1c29 !important;
}

html[data-theme="dark"] .section-platform .notification-channel-check {
  border-color: var(--modern-line) !important;
  color: var(--modern-copy) !important;
  background: #0a1c29 !important;
}

html[data-theme="dark"] .section-platform .notification-channel-check.is-active {
  border-color: rgba(225, 196, 127, 0.34) !important;
  background: rgba(225, 196, 127, 0.12) !important;
}

html[data-theme="dark"] .section-platform .notification-channel-check span {
  color: var(--modern-ink) !important;
}

html[data-theme="dark"] .section-platform .notification-channel-check small {
  color: var(--modern-copy) !important;
}

html[data-theme="dark"] .section-platform .platform-main :where(
  .backend-tabs,
  .segmented-control,
  .post-sale-filter-tabs
) {
  border-color: var(--modern-line) !important;
  background: #0a1c29 !important;
}

html[data-theme="dark"] .section-platform :where(
  .backend-tabs button,
  .segmented-control button,
  .post-sale-filter-tabs button,
  .post-sale-filter-tab
) {
  border-color: var(--modern-line) !important;
  color: var(--modern-copy) !important;
  background: #071722 !important;
}

html[data-theme="dark"] .section-platform :where(
  .backend-tabs button.is-active,
  .segmented-control button.is-active,
  .post-sale-filter-tabs button.is-active,
  .post-sale-filter-tab.is-active
) {
  color: #07131e !important;
  background: var(--modern-gold) !important;
}

html[data-theme="dark"] .section-platform :where(
  .backend-tabs button.is-active,
  .segmented-control button.is-active,
  .post-sale-filter-tabs button.is-active,
  .post-sale-filter-tab.is-active
) :where(span, small, strong) {
  color: #07131e !important;
}

html[data-theme="dark"] .section-platform .platform-main .backend-tabs button.is-active > small {
  color: #07131e !important;
  background: transparent !important;
}

html[data-theme="dark"] .section-platform :where(.input-shell label, .input-shell > span, .custom-select-label) {
  color: #d9e4ea !important;
}

html[data-theme="dark"] .section-platform :where(.text-link, a:not(.btn):not(.platform-link):not(.platform-context-link)) {
  color: #9ceaf2;
}

html[data-theme="dark"] .section-platform :where(.text-link, a:not(.btn):not(.platform-link):not(.platform-context-link)):hover {
  color: #fff;
}

@media (max-width: 1050px) {
  .profile-hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .profile-container {
    width: min(100% - 1rem, 1280px);
  }

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

  .profile-info-grid {
    grid-template-columns: 1fr;
  }

  .profile-info-block {
    padding: 0;
  }

  .profile-info-block + .profile-info-block {
    padding-top: 0.9rem;
    border-top: 1px solid var(--modern-line);
    border-left: 0;
  }

  .profile-panel-header {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .profile-identity {
    display: grid;
  }

  .profile-action-grid {
    grid-template-columns: 1fr;
  }

  .profile-detail-list div {
    grid-template-columns: 1fr;
  }

  .profile-otp-row {
    grid-template-columns: 1fr;
  }
}
.auth-recovery-description {
  color: var(--modern-copy);
  font-size: 1rem;
  line-height: 1.65;
  margin: 0 0 1rem;
}

.auth-recovery-link {
  margin: 0.25rem 0 0;
  text-align: center;
}

.auth-recovery-link a {
  color: var(--modern-ink);
  font-weight: 700;
  text-decoration-color: color-mix(in srgb, var(--gold) 65%, transparent);
  text-underline-offset: 0.25rem;
}

.auth-recovery-link a:hover,
.auth-recovery-link a:focus-visible {
  color: var(--modern-gold-strong);
}

/* Embedded signing workspace */
.signature-summary-grid {
  margin-bottom: 1rem;
}

.signature-readiness-bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--modern-line);
  border-left: 3px solid #2e8b75;
  background: color-mix(in srgb, #dff3ec 62%, var(--modern-surface));
}

.signature-readiness-bar.needs-setup {
  border-left-color: var(--modern-gold-strong);
  background: color-mix(in srgb, #fff3d8 64%, var(--modern-surface));
}

.signature-readiness-bar h3,
.signature-readiness-bar p {
  margin: 0;
}

.signature-readiness-bar h3 {
  margin-top: 0.18rem;
  color: var(--modern-ink);
  font-size: 1.05rem;
}

.signature-readiness-bar p:last-child {
  margin-top: 0.25rem;
  color: var(--modern-copy);
}

.signature-readiness-icon {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #25735f;
  font-weight: 800;
}

.signature-readiness-bar.needs-setup .signature-readiness-icon {
  color: #172531;
  background: var(--modern-gold);
}

.signature-studio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(290px, 0.72fr);
  gap: 1rem;
  align-items: start;
}

.signature-builder-panel,
.signature-control-panel,
.signature-envelope-panel {
  min-width: 0;
}

.signature-packet-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 1rem;
}

.signature-packet-form .full-span {
  grid-column: 1 / -1;
}

.signature-approval-check {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
  padding: 0.85rem;
  border: 1px solid color-mix(in srgb, var(--modern-gold) 58%, var(--modern-line));
  background: color-mix(in srgb, var(--modern-gold) 10%, var(--modern-surface));
  cursor: pointer;
}

.signature-approval-check input {
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.15rem;
  accent-color: var(--modern-gold-strong);
}

.signature-approval-check span {
  display: grid;
  gap: 0.15rem;
}

.signature-approval-check strong {
  color: var(--modern-ink);
}

.signature-approval-check small {
  color: var(--modern-copy);
  line-height: 1.45;
}

.signature-control-panel > h3 {
  margin: 0.2rem 0 1rem;
}

.signature-control-list {
  display: grid;
  gap: 0;
  padding: 0;
  margin: 0;
  list-style: none;
}

.signature-control-list li {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 0.75rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--modern-line);
}

.signature-control-list li > span {
  display: grid;
  width: 1.8rem;
  height: 1.8rem;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--modern-gold) 60%, var(--modern-line));
  border-radius: 50%;
  color: var(--modern-gold-strong);
  font-weight: 800;
}

.signature-control-list li div {
  display: grid;
  gap: 0.15rem;
}

.signature-control-list strong {
  color: var(--modern-ink);
}

.signature-control-list small {
  color: var(--modern-copy);
  line-height: 1.45;
}

.signature-legal-note {
  margin-top: 1rem;
  padding: 0.85rem;
  border-left: 3px solid var(--modern-gold);
  background: var(--modern-surface-muted);
}

.signature-legal-note strong,
.signature-legal-note p {
  color: var(--modern-ink);
}

.signature-legal-note p {
  margin: 0.25rem 0 0;
  color: var(--modern-copy);
  font-size: 0.88rem;
  line-height: 1.5;
}

.signature-action-banner,
.signature-envelope-panel {
  margin-top: 1rem;
}

.signature-envelope-list,
.signature-recipient-list {
  display: grid;
  gap: 0.7rem;
}

.signature-envelope-card {
  border: 1px solid var(--modern-line);
  border-radius: 6px;
  background: var(--modern-surface);
  overflow: hidden;
}

.signature-envelope-head,
.signature-envelope-foot,
.signature-recipient-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.signature-envelope-head {
  padding: 1rem;
  border-bottom: 1px solid var(--modern-line);
}

.signature-envelope-head h3,
.signature-envelope-head p {
  margin: 0;
}

.signature-envelope-head h3 {
  margin-top: 0.15rem;
  font-size: 1.05rem;
}

.signature-envelope-head p:last-child {
  margin-top: 0.25rem;
  color: var(--modern-copy);
  font-size: 0.88rem;
}

.signature-envelope-state,
.signature-recipient-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.signature-recipient-list {
  padding: 0.35rem 1rem;
}

.signature-recipient-row {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--modern-line);
}

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

.signature-recipient-identity {
  display: flex;
  min-width: 0;
  gap: 0.7rem;
  align-items: center;
}

.signature-recipient-identity > div {
  display: grid;
  min-width: 0;
  gap: 0.1rem;
}

.signature-recipient-identity strong {
  color: var(--modern-ink);
}

.signature-recipient-identity small {
  color: var(--modern-copy);
  overflow-wrap: anywhere;
}

.signature-recipient-avatar {
  display: grid;
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: #0b2233;
  background: color-mix(in srgb, var(--modern-gold) 56%, #fff);
  font-size: 0.78rem;
  font-weight: 800;
}

.signature-envelope-foot {
  padding: 0.7rem 1rem;
  border-top: 1px solid var(--modern-line);
  color: var(--modern-copy);
  background: var(--modern-surface-muted);
  font-size: 0.82rem;
}

.signature-envelope-links {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.signature-envelope-links a,
.dm-signature-message-link {
  color: var(--modern-aqua);
  font-weight: 750;
  text-underline-offset: 0.2rem;
}

.document-file-input input[type="file"] {
  min-height: 3.2rem;
  padding: 0.65rem;
  border: 1px dashed var(--modern-line-strong);
  background: var(--modern-surface-muted);
}

.document-file-input small {
  color: var(--modern-copy);
}

.dm-signature-packets,
.dm-signature-signer-list {
  display: grid;
  gap: 0.65rem;
}

.dm-signature-packet {
  padding: 0.75rem;
  border: 1px solid var(--modern-line);
  border-radius: 6px;
  background: var(--modern-surface-muted);
}

.dm-signature-packet-head,
.dm-signature-signer-list > div {
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
  align-items: center;
}

.dm-signature-packet-head > div,
.dm-signature-signer-list > div > span {
  display: grid;
  min-width: 0;
  gap: 0.1rem;
}

.dm-signature-packet-head strong,
.dm-signature-signer-list strong {
  color: var(--modern-ink);
}

.dm-signature-packet-head span,
.dm-signature-signer-list small {
  color: var(--modern-copy);
  font-size: 0.78rem;
}

.dm-signature-signer-list {
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--modern-line);
}

.dm-signature-message-link {
  display: inline-block;
  margin-top: 0.45rem;
  font-size: 0.82rem;
}

.signing-page {
  width: min(100% - 2rem, 1180px);
  min-height: calc(100vh - 7rem);
  margin: 0 auto;
  padding: 1.25rem 0 2rem;
}

.signing-brand-row {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  margin-bottom: 1rem;
}

.signing-brand-row img {
  width: 2.8rem;
  height: 2.8rem;
  padding: 0.35rem;
  border: 1px solid var(--modern-line);
  border-radius: 6px;
  background: #fff;
  object-fit: contain;
}

.signing-brand-row > div {
  display: grid;
}

.signing-brand-row strong {
  color: var(--modern-ink);
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
}

.signing-brand-row span,
.signing-page footer {
  color: var(--modern-copy);
}

.signing-intro-card,
.signing-demo-card,
.signing-frame-shell {
  border: 1px solid var(--modern-line);
  border-radius: 8px;
  background: var(--modern-surface);
  box-shadow: 0 18px 55px rgba(6, 26, 40, 0.1);
}

.signing-intro-card {
  width: min(100%, 760px);
  margin: 7vh auto;
  padding: clamp(1.4rem, 4vw, 3rem);
}

.signing-intro-card h1,
.signing-demo-card h1 {
  margin: 0.25rem 0 0.75rem;
  color: var(--modern-ink);
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.8rem);
  font-weight: 500;
  line-height: 1.02;
}

.signing-intro-card > p:not(.panel-label),
.signing-demo-card > div > p:not(.panel-label) {
  color: var(--modern-copy);
  font-size: 1.04rem;
  line-height: 1.65;
}

.signing-guardrails {
  display: grid;
  gap: 0.5rem;
  margin: 1.25rem 0;
  padding: 1rem;
  border-left: 3px solid var(--modern-gold);
  background: var(--modern-surface-muted);
}

.signing-guardrails span {
  color: var(--modern-ink);
  font-weight: 650;
}

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

.signing-loader {
  display: inline-block;
  width: 2.5rem;
  height: 2.5rem;
  border: 3px solid var(--modern-line);
  border-top-color: var(--modern-gold-strong);
  border-radius: 50%;
  animation: helm-signing-spin 0.8s linear infinite;
}

@keyframes helm-signing-spin {
  to { transform: rotate(360deg); }
}

.signing-success-mark {
  display: grid;
  width: 3rem;
  height: 3rem;
  margin: 0 auto 0.85rem;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #25735f;
  font-size: 1.4rem;
  font-weight: 800;
}

.signing-demo-card {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
  gap: 1rem;
  padding: 1rem;
}

.signing-demo-card > div:first-child,
.signing-demo-document {
  padding: clamp(1rem, 3vw, 2rem);
}

.signing-demo-document {
  min-height: 520px;
  border: 1px solid var(--modern-line);
  background: #fff;
}

.signing-demo-document > span {
  color: #8a641c;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.signing-demo-document h2,
.signing-demo-document p {
  color: #102639;
}

.signing-demo-line {
  height: 1px;
  margin: 10rem 0 1rem;
  background: #102639;
}

.signing-frame-shell header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--modern-line);
}

.signing-frame-shell h2,
.signing-frame-shell p {
  margin: 0;
}

.signing-provider-frame {
  display: block;
  width: 100%;
  min-height: 760px;
  border: 0;
  background: #fff;
}

.signing-page footer {
  display: flex;
  justify-content: center;
  gap: 1rem;
  padding-top: 1rem;
  font-size: 0.82rem;
}

.signing-page footer a {
  color: var(--modern-aqua);
}

html[data-theme="dark"] .signature-readiness-bar {
  background: rgba(37, 115, 95, 0.13);
}

html[data-theme="dark"] .signature-readiness-bar.needs-setup,
html[data-theme="dark"] .signature-approval-check {
  background: rgba(210, 169, 82, 0.1);
}

html[data-theme="dark"] .signing-demo-document {
  background: #f8fafb;
}

.document-template-library {
  margin-top: 1rem;
  overflow: hidden;
}

.template-library-header {
  align-items: flex-start;
}

.document-template-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  padding: 0 1.25rem 1.25rem;
  border-bottom: 1px solid var(--modern-line);
}

.document-template-tab {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  min-height: 68px;
  padding: 0.75rem;
  border: 1px solid var(--modern-line);
  border-radius: 7px;
  color: var(--modern-ink);
  background: var(--modern-surface-muted);
  text-align: left;
  cursor: pointer;
}

.document-template-tab:hover {
  border-color: var(--modern-line-strong);
  background: var(--modern-surface);
  transform: translateY(-1px);
}

.document-template-tab.is-active {
  border-color: color-mix(in srgb, var(--modern-gold) 68%, var(--modern-line));
  background: color-mix(in srgb, var(--modern-gold) 9%, var(--modern-surface));
  box-shadow: inset 0 -3px 0 var(--modern-gold);
}

.document-template-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--modern-gold) 48%, transparent);
  border-radius: 6px;
  color: var(--modern-gold-strong);
  background: color-mix(in srgb, var(--modern-gold) 10%, var(--modern-surface));
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
}

.document-template-tab strong,
.document-template-tab small {
  display: block;
  min-width: 0;
}

.document-template-tab strong {
  color: var(--modern-ink);
  font-size: 0.9rem;
}

.document-template-tab small,
.template-role-count {
  color: var(--modern-muted);
  font-size: 0.74rem;
}

.template-role-count {
  white-space: nowrap;
}

.document-template-workspace {
  display: grid;
  grid-template-columns: minmax(230px, 0.33fr) minmax(0, 1fr);
  gap: 1.5rem;
  padding: 1.5rem;
}

.template-workspace-intro {
  align-self: start;
  position: sticky;
  top: 1rem;
}

.template-workspace-intro h3 {
  margin-bottom: 0.6rem;
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 2.5vw, 2.2rem);
  line-height: 1;
}

.template-control-note {
  display: grid;
  gap: 0.25rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--modern-line);
}

.template-control-note strong {
  color: var(--modern-green);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.template-control-note span {
  color: var(--modern-copy);
  font-size: 0.82rem;
}

.document-template-form {
  min-width: 0;
}

.template-form-context,
.template-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.template-field-groups {
  display: grid;
  gap: 0;
  margin-top: 1.5rem;
}

.template-field-group {
  min-width: 0;
  margin: 0;
  padding: 1.25rem 0;
  border: 0;
  border-top: 1px solid var(--modern-line);
}

.template-field-group legend {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  margin-bottom: 0.9rem;
  padding: 0;
  color: var(--modern-ink);
  font-size: 0.82rem;
  font-weight: 800;
}

.template-field-group legend span {
  color: var(--modern-gold-strong);
  font-family: var(--font-display);
  font-size: 1rem;
}

.template-field.is-wide,
.template-form-context .full-span {
  grid-column: 1 / -1;
}

.template-field > label,
.template-form-context label {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
}

.template-field > label > span:last-child,
.template-form-context label > span {
  color: var(--modern-muted);
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
}

.template-input-control {
  position: relative;
}

.template-input-control :is(input, select, textarea),
.template-form-context :is(input, select) {
  width: 100%;
}

.template-field-suffix {
  position: absolute;
  top: 50%;
  right: 0.8rem;
  color: var(--modern-muted);
  font-size: 0.82rem;
  transform: translateY(-50%);
  pointer-events: none;
}

.template-field-help {
  display: block;
  margin-top: 0.4rem;
  color: var(--modern-muted);
  font-size: 0.76rem;
  line-height: 1.45;
}

.template-review-check {
  margin: 1rem 0;
}

.template-signer-routing {
  display: grid;
  gap: 0;
  margin: 0.25rem 0 0.5rem;
  border-top: 1px solid var(--modern-line);
}

.template-signer-heading,
.template-signer-card {
  display: grid;
  align-items: center;
  gap: 0.8rem;
}

.template-signer-heading {
  grid-template-columns: 1fr auto;
  padding: 1rem 0 0.7rem;
}

.template-signer-heading h4,
.template-signer-heading p {
  margin: 0;
}

.template-signer-heading > span {
  color: var(--modern-muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.template-signer-card {
  grid-template-columns: minmax(150px, 0.72fr) repeat(2, minmax(0, 1fr));
  padding: 0.8rem 0;
  border-top: 1px solid var(--modern-line);
}

.template-signer-role {
  display: grid;
  gap: 0.22rem;
  align-content: center;
}

.template-signer-role label {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  color: var(--modern-copy);
  font-size: 0.72rem;
}

.template-signer-role label input {
  width: 15px;
  height: 15px;
}

.template-signer-role strong {
  color: var(--modern-ink);
  font-size: 0.86rem;
}

.template-signer-role small {
  font-size: 0.72rem;
  line-height: 1.35;
}

html[data-theme="dark"] .document-template-tab.is-active {
  background: color-mix(in srgb, var(--modern-gold) 13%, var(--modern-surface));
}

@media (max-width: 980px) {
  .signature-studio-grid,
  .signing-demo-card {
    grid-template-columns: 1fr;
  }

  .signature-control-panel {
    order: -1;
  }

  .document-template-workspace {
    grid-template-columns: 1fr;
  }

  .template-workspace-intro {
    position: static;
  }

  .document-template-tabs {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .document-template-tabs {
    padding-inline: 0.75rem;
  }

  .document-template-tab {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 0.25rem 0.65rem;
    align-items: start;
  }

  .document-template-tab strong {
    overflow-wrap: normal;
    word-break: normal;
  }

  .template-role-count {
    grid-column: 2;
    white-space: normal;
  }

  .signature-readiness-bar {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .signature-readiness-bar > :last-child {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .signature-packet-form {
    grid-template-columns: 1fr;
  }

  .signature-packet-form > * {
    grid-column: 1;
  }

  .template-form-context,
  .template-field-grid,
  .template-signer-card {
    grid-template-columns: 1fr;
  }

  .template-field.is-wide,
  .template-form-context .full-span {
    grid-column: 1;
  }

  .signature-envelope-head,
  .signature-envelope-foot,
  .signature-recipient-row,
  .dm-signature-packet-head,
  .dm-signature-signer-list > div,
  .signing-frame-shell header {
    align-items: flex-start;
    flex-direction: column;
  }

  .signature-envelope-state,
  .signature-recipient-actions {
    justify-content: flex-start;
  }

  .signing-page {
    width: min(100% - 1rem, 1180px);
  }

  .signing-provider-frame {
    min-height: 680px;
  }
}

/* Workspace release: shared surfaces and a compact, data-led command center. */
:root {
  --workspace-bg: #f3f6f6;
  --workspace-surface: #ffffff;
  --workspace-soft: #edf3f2;
  --workspace-ink: #172d35;
  --workspace-copy: #4d646b;
  --workspace-muted: #52686e;
  --workspace-line: #dbe5e5;
  --workspace-accent: #117567;
  --workspace-hover: #e8f3f0;
  --modern-muted: #526873;
}
html[data-theme="dark"] {
  --workspace-bg: #101719;
  --workspace-surface: #182225;
  --workspace-soft: #202e31;
  --workspace-ink: #f0f6f5;
  --workspace-copy: #c0d0d0;
  --workspace-muted: #a2b8b9;
  --workspace-line: #35494b;
  --workspace-accent: #7ed7bf;
  --workspace-hover: #233e39;
  --modern-canvas: #101719;
  --modern-surface: #182225;
  --modern-surface-muted: #202e31;
  --modern-ink: #f0f6f5;
  --modern-copy: #c0d0d0;
  --modern-muted: #a2b8b9;
  --modern-line: #35494b;
}
.site-shell-platform { --platform-sidebar-width: 244px; }
.site-shell-platform .topbar-platform { background: #112d37 !important; box-shadow: none !important; border-bottom: 1px solid #2e4650; }
.platform-appbar { gap: 24px; }
.workspace-search-trigger { display:flex; align-items:center; gap:12px; width:min(400px, 32%); min-height:40px; padding:8px 14px; margin-left:auto; margin-right:auto; border:1px solid #526971; border-radius:6px; color:#e4eeee; background:#213e48; text-align:left; font:inherit; font-size:13px; cursor:pointer; }
.workspace-search-trigger:hover { background:#2d4d57; border-color:#91aaa9; }
.workspace-search-trigger .platform-link-icon { background:transparent; color:inherit; width:20px; height:20px; }
.workspace-search-trigger svg { width:20px; height:20px; }
html[data-theme] .section-platform .platform-sidebar-scroll { margin-block:0; background:var(--workspace-surface) !important; border-right:1px solid var(--workspace-line); box-shadow:none; scrollbar-width:thin; scrollbar-color:var(--workspace-line) transparent; }
html[data-theme] .section-platform .platform-nav-group,
html[data-theme] .section-platform .platform-nav-group[open] { border:0 !important; background:transparent !important; border-radius:0 !important; overflow:visible; }
html[data-theme] .section-platform .platform-nav { padding:12px; gap:8px; }
html[data-theme] .section-platform .platform-brand { padding:18px 14px; gap:10px; border-color:var(--workspace-line); }
html[data-theme] .section-platform .platform-brand img { width:34px; height:34px; border-radius:5px; }
html[data-theme] .section-platform .platform-brand span { font-size:14px; color:var(--workspace-ink) !important; }
html[data-theme] .section-platform .platform-brand small { font-size:10px; line-height:1.5; color:var(--workspace-copy) !important; }
html[data-theme] .section-platform .platform-group-summary { min-height:30px; padding:0 6px; }
html[data-theme] .section-platform .platform-group-label { min-height:28px; padding:6px; font-size:10px; line-height:1.5; color:var(--workspace-muted) !important; font-weight:700; }
html[data-theme] .section-platform .platform-group-arrow { width:18px; height:18px; border:0; background:transparent; }
html[data-theme] .section-platform .platform-group-links { padding:2px 0; gap:3px; }
html[data-theme] .section-platform .platform-link { min-height:36px; padding:7px 10px; font-size:12px; font-weight:550; color:var(--workspace-copy) !important; border:0; border-radius:5px; box-shadow:none; background:transparent; }
html[data-theme] .section-platform .platform-sidebar-scroll .platform-link:hover { background:var(--workspace-soft) !important; color:var(--workspace-ink) !important; }
html[data-theme] .section-platform .platform-sidebar-scroll .platform-link.is-active { background:var(--workspace-hover) !important; color:var(--workspace-accent) !important; box-shadow:inset 2px 0 0 var(--modern-gold) !important; font-weight:700; }
html[data-theme] .section-platform .platform-link-icon { width:22px; height:22px; border:0; background:transparent; flex-shrink:0; }
.platform-link-icon svg { width:20px; height:20px; }
html[data-theme] .section-platform .platform-session-card { margin:16px 12px; padding:14px 0; border:0; border-top:1px solid var(--workspace-line); border-radius:0; background:transparent !important; box-shadow:none; }
html[data-theme] .section-platform .platform-session-card h3 { font:600 13px/1.5 var(--font-sans); color:var(--workspace-ink); }
html[data-theme] .section-platform .platform-session-card p { font-size:11px; }
html[data-theme] .section-platform .platform-header-compact { padding:22px 28px 18px; position:static; background:var(--workspace-bg) !important; border-bottom:0; backdrop-filter:none; min-height:110px; }
html[data-theme] .section-platform .platform-header-compact h1 { font-size:28px !important; line-height:1.2; font-weight:650 !important; }
html[data-theme] .section-platform .platform-header-kicker { color:var(--workspace-muted) !important; font-size:10px; margin-bottom:8px; }
html[data-theme] .section-platform .platform-header-compact .section-copy { font-size:13px; color:var(--workspace-copy); margin-top:6px; }
html[data-theme] .section-platform .platform-main { padding:8px 28px 40px; gap:20px; }
html[data-theme] .section-platform .platform-main-scroll { background:var(--workspace-bg) !important; scrollbar-width:thin; scrollbar-color:var(--workspace-line) transparent; }
html[data-theme] .section-platform .platform-header-compact { grid-template-columns:minmax(0,1fr) auto !important; }
html[data-theme] .section-platform .platform-header-actions { display:flex !important; align-items:center; justify-self:end; flex-wrap:wrap; gap:8px; }
html[data-theme] .section-platform .platform-header-actions .btn { min-height:38px; font-size:12px; gap:7px; padding:8px 14px; }
html[data-theme] .topbar-platform .platform-link-icon { color:#e4eeee !important; background:transparent !important; }
html[data-theme] .topbar-platform .platform-link-icon svg { fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
html[data-theme] .section-platform .platform-header-actions .platform-link-icon { color:inherit; }
html[data-theme] .section-platform .platform-main :is(.panel, .stat-card, .feature-card) { box-shadow:none !important; border-color:var(--workspace-line) !important; }
html[data-theme] .section-platform .panel-header h3 { font-size:20px !important; line-height:1.25; font-family:var(--font-sans) !important; font-weight:600 !important; }
html[data-theme] .section-platform .panel-label { font-size:10px; line-height:1.6; }
html[data-theme] .section-platform :is(.platform-filter-panel, .backend-filter-row) { padding:16px; gap:14px; }
html[data-theme] .section-platform :is(.custom-select-trigger, input:not([type=checkbox]):not([type=radio]), select) { min-height:40px; font-size:13px; }
html[data-theme] .section-platform :is(.input-shell, .field) > :is(span, label) { font-size:12px; }

.workspace-dashboard { min-width:0; }
.workspace-dashboard *, .workspace-search-dialog * { box-sizing:border-box; }
.workspace-dashboard :is(h2, h3, p) { margin:0; }
.workspace-metrics { display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); padding:22px 0 26px; border-top:1px solid var(--workspace-line); border-bottom:1px solid var(--workspace-line); margin-bottom:28px; }
.workspace-metric { display:grid; align-content:start; gap:8px; padding:0 22px; border-right:1px solid var(--workspace-line); min-width:0; text-decoration:none; transition:background 160ms; }
.workspace-metric:first-child { padding-left:0; }
.workspace-metric:last-child { border:0; }
.workspace-metric-label { display:flex; align-items:center; gap:8px; color:var(--workspace-copy); font-size:12px; font-weight:550; }
.workspace-metric > strong { font:650 34px/1.25 var(--font-sans); color:var(--workspace-ink); font-variant-numeric:tabular-nums; }
.workspace-metric small { font-size:11px; color:var(--workspace-muted); }
.workspace-metric:hover strong { color:var(--workspace-accent); }
.workspace-columns { display:grid; grid-template-columns:minmax(0, 1fr) 310px; gap:32px; align-items:start; }
.workspace-primary, .workspace-secondary { min-width:0; display:grid; gap:30px; }
.workspace-secondary { border-left:1px solid var(--workspace-line); padding-left:26px; gap:26px; }
.workspace-section { min-width:0; }
.workspace-section-header { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:18px; }
.section-platform .workspace-dashboard .workspace-section-header h2 { font:600 18px/1.3 var(--font-sans) !important; color:var(--workspace-ink) !important; }
.workspace-section-header .text-link { white-space:nowrap; font-size:11px; color:var(--workspace-accent); }
.workspace-eyebrow { font-size:10px; margin-bottom:5px !important; color:var(--workspace-muted); }
.workspace-stage-chart { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:16px; padding:14px 0 18px; border-bottom:1px solid var(--workspace-line); }
.workspace-stage { display:grid; grid-template-rows:24px 108px 32px; gap:8px; align-items:start; }
.workspace-stage > strong { font-size:17px; color:var(--workspace-ink); font-weight:600; }
.workspace-stage small { font-size:10px; color:var(--workspace-copy); line-height:1.5; }
.workspace-stage-track { display:flex; align-items:flex-end; height:108px; width:100%; background:var(--workspace-soft); border-radius:4px 4px 0 0; overflow:hidden; }
.workspace-stage-track span { display:block; width:100%; background:#258b7e; border-radius:4px 4px 0 0; }
.workspace-tone-blue .workspace-stage-track span { background:#4a829f; }
.workspace-tone-gold .workspace-stage-track span { background:#b48b41; }
.workspace-tone-green .workspace-stage-track span { background:#527e64; }
.workspace-tabs { display:flex; align-items:stretch; gap:22px; border-bottom:1px solid var(--workspace-line); }
.workspace-tabs button { display:flex; align-items:center; gap:8px; min-height:42px; padding:8px 0; font:600 12px/1.4 var(--font-sans); color:var(--workspace-copy); background:transparent; border:0; border-bottom:2px solid transparent; border-radius:0; cursor:pointer; }
.workspace-tabs button[aria-selected=true] { color:var(--workspace-accent); border-bottom-color:var(--workspace-accent); }
.workspace-tabs button span { min-width:21px; padding:2px 5px; border-radius:4px; background:var(--workspace-soft); color:var(--workspace-copy); font-size:10px; }
.workspace-queue-row { display:flex; align-items:center; gap:12px; min-height:72px; padding:14px 0; border-bottom:1px solid var(--workspace-line); text-decoration:none; }
.workspace-queue-row > span:nth-child(2) { display:grid; gap:5px; flex:1; min-width:0; }
.workspace-queue-row strong { font-size:12px; line-height:1.5; font-weight:600; color:var(--workspace-ink); }
.workspace-queue-row small { font-size:11px; color:var(--workspace-muted); }
.workspace-queue-row > .status-badge { flex-shrink:0; font-size:9px; }
.workspace-queue-row:hover { background:var(--workspace-soft); }

.listing-detail-thumb figcaption {
  left:0; right:0; bottom:0; padding:8px 10px;
  background:#10232b; color:#fff; letter-spacing:0; font-weight:600;
}
.workspace-empty { padding:22px 0; color:var(--workspace-muted); font-size:12px; }
.workspace-portfolio { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.workspace-vessel { display:block; min-width:0; border:1px solid var(--workspace-line); border-radius:6px; overflow:hidden; background:var(--workspace-surface); color:var(--workspace-ink); text-decoration:none; }
.workspace-vessel img { width:100%; height:auto; aspect-ratio:5/3; object-fit:cover; display:block; transition:transform 240ms; }
.workspace-vessel:hover img { transform:scale(1.02); }
.workspace-vessel > div { padding:13px; display:grid; gap:6px; }
.section-platform .workspace-dashboard .workspace-vessel h3 { font:600 14px/1.4 var(--font-sans) !important; color:var(--workspace-ink); }
.workspace-vessel small { font-size:10px; color:var(--workspace-muted); }
.workspace-vessel div > span:not(.status-badge) { font-size:12px; font-weight:600; }
.workspace-vessel .status-badge { justify-self:start; font-size:9px; }
.section-platform .workspace-dashboard .workspace-assistant { padding:20px; background:#143d3b !important; color:#eef9f5; border-radius:8px; }
.section-platform .workspace-dashboard .workspace-assistant h2 { font:600 21px/1.3 var(--font-sans) !important; color:#f3faf7 !important; margin:18px 0 10px; }
.section-platform .workspace-dashboard .workspace-assistant p { color:#c4ded5 !important; font-size:12px; line-height:1.6; }
.section-platform .workspace-dashboard .workspace-assistant small { display:block; color:#bad5cf !important; font-size:10px; line-height:1.6; margin-top:12px; }
.workspace-assistant-mark { display:flex; gap:8px; align-items:center; font-size:12px; font-weight:600; color:#cfe9df; }
.workspace-assistant form { display:grid; gap:10px; margin-top:18px; }
html[data-theme] .section-platform .workspace-dashboard .workspace-assistant textarea { width:100%; min-height:95px; background:#244e4a !important; color:#f6fffb !important; border:1px solid #527f73 !important; border-radius:5px; padding:12px; resize:vertical; font:12px/1.6 var(--font-sans); }
html[data-theme] .section-platform .workspace-dashboard .workspace-assistant textarea::placeholder { color:#c2d8ce !important; }
.workspace-assistant .btn { min-height:38px; font-size:12px; gap:8px; }
.workspace-meeting { display:flex; gap:14px; padding:14px 0; border-bottom:1px solid var(--workspace-line); }
.workspace-meeting time { width:42px; flex-shrink:0; padding:8px 6px; background:var(--workspace-soft); color:var(--workspace-accent); font-size:11px; line-height:1.5; font-weight:600; border-radius:4px; text-align:center; }
.workspace-meeting > span { display:grid; align-content:center; gap:5px; }
.workspace-meeting strong { font-size:12px; font-weight:550; color:var(--workspace-ink); }
.workspace-meeting small { font-size:10px; color:var(--workspace-muted); }
.workspace-status-row { display:flex; justify-content:space-between; gap:12px; padding:12px 0; border-bottom:1px solid var(--workspace-line); color:var(--workspace-copy); font-size:11px; }
.workspace-status-row strong { color:var(--workspace-accent); text-align:right; font-weight:600; }
.workspace-secondary .activity-timeline { gap:12px; }
.workspace-secondary :is(.timeline-item, .activity-item) { padding:10px 0; background:transparent !important; border:0; border-radius:0; box-shadow:none; }
.workspace-secondary :is(.timeline-item, .activity-item) strong { font-size:12px; }
.workspace-secondary :is(.timeline-item, .activity-item) p { font-size:11px; color:var(--workspace-muted); }
.route-loading { display:grid; justify-items:center; align-content:center; gap:14px; min-height:280px; padding:30px; color:var(--modern-copy); }
.route-loading-indicator { width:28px; height:28px; border:2px solid var(--modern-line); border-top-color:var(--workspace-accent); border-radius:50%; animation:workspace-spin 800ms linear infinite; }
@keyframes workspace-spin { to { transform:rotate(360deg); } }

.workspace-search-dialog { position:fixed; inset:100px 0 auto; width:min(640px, calc(100% - 32px)); max-height:calc(100dvh - 140px); padding:0; border:1px solid var(--workspace-line); border-radius:8px; background:var(--workspace-surface); color:var(--workspace-ink); box-shadow:0 24px 80px #0005; overflow:hidden; }
.workspace-search-dialog::backdrop { background:#081c2680; backdrop-filter:blur(3px); }
.workspace-search-dialog header { display:flex; justify-content:space-between; align-items:center; gap:15px; padding:20px 22px 12px; }
.workspace-search-dialog h2 { margin:0; font:600 16px/1.5 var(--font-sans); color:var(--workspace-ink); }
.workspace-search-dialog header button { width:32px; height:32px; border:0; background:var(--workspace-soft); color:var(--workspace-copy); border-radius:5px; font-size:23px; cursor:pointer; }
.workspace-search-dialog input { width:calc(100% - 44px); margin:0 22px 16px; min-height:46px; padding:12px; border:1px solid var(--workspace-line); border-radius:5px; background:var(--workspace-bg); color:var(--workspace-ink); font:14px var(--font-sans); }
.workspace-search-dialog input::placeholder { color:var(--workspace-muted); }
.workspace-search-dialog [role=listbox] { max-height:min(460px, calc(100dvh - 290px)); overflow-y:auto; padding:4px 10px 12px; border-top:1px solid var(--workspace-line); }
.workspace-search-dialog [role=option] { display:flex; justify-content:space-between; align-items:center; gap:20px; padding:12px; border-radius:5px; cursor:pointer; }
.workspace-search-dialog [role=option][aria-selected=true] { background:var(--workspace-hover); }
.workspace-search-dialog [role=option] > span:first-child { min-width:0; display:grid; gap:4px; }
.workspace-search-dialog [role=option] strong { font-size:13px; color:var(--workspace-ink); }
.workspace-search-dialog [role=option] small { font-size:11px; color:var(--workspace-muted); overflow-wrap:anywhere; }
.workspace-result-type { font-size:10px; color:var(--workspace-copy); white-space:nowrap; }
.workspace-search-dialog .workspace-empty { padding:20px; }
@media (min-width:981px) {
  .site-shell-platform .section-platform .platform-shell { grid-template-columns:52px 0 minmax(0,1fr) !important; }
  .site-shell-platform.platform-sidebar-open .section-platform .platform-shell { grid-template-columns:0 244px minmax(0,1fr) !important; }
}
@media (max-width:1200px) {
  .workspace-columns { grid-template-columns:minmax(0,1fr) 270px; gap:22px; }
  .workspace-secondary { padding-left:20px; }
  .workspace-metric { padding-inline:14px; }
  .workspace-metric > strong { font-size:28px; }
}
@media (max-width:900px) {
  .workspace-columns { grid-template-columns:1fr; }
  .workspace-secondary { border:0; padding:0; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; }
  .workspace-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px 0; }
  .workspace-metric:nth-child(3) { padding-left:0; }
  .workspace-metric:nth-child(2) { border:0; }
  .workspace-search-trigger { width:40px; padding:8px; }
  .workspace-search-trigger > span:not(.platform-link-icon) { display:none; }
}
@media (max-width:600px) {
  html[data-theme] .section-platform .platform-header-compact { padding:20px 16px 14px; min-height:0; grid-template-columns:1fr !important; gap:12px; }
  html[data-theme] .section-platform .platform-header-actions { justify-self:start; }
  html[data-theme] .section-platform .platform-header-compact h1 { font-size:24px !important; }
  html[data-theme] .section-platform .platform-main { padding:8px 16px 28px; }
  .platform-appbar { gap:10px; }
  .workspace-search-trigger { flex-shrink:0; }
  .workspace-secondary { grid-template-columns:1fr; }
  .workspace-portfolio { grid-template-columns:1fr; }
  .workspace-vessel { display:grid; grid-template-columns:125px minmax(0,1fr); }
  .workspace-vessel img { height:100%; aspect-ratio:auto; }
  .workspace-metric > strong { font-size:28px; }
  .workspace-metric-label { font-size:11px; gap:4px; }
  .workspace-stage-chart { gap:8px; }
  .workspace-stage { grid-template-rows:24px 80px 40px; }
  .workspace-stage-track { height:80px; }
  .workspace-queue-row { gap:8px; }
  .workspace-queue-row > .platform-link-icon { display:none; }
  .workspace-queue-row > .status-badge { max-width:92px; white-space:normal; text-align:center; }
  .workspace-tabs { gap:18px; }
  .workspace-search-dialog { top:24px; max-height:calc(100dvh - 48px); }
}
@media (prefers-reduced-motion:reduce) {
  .route-loading-indicator { animation:none; }
  .workspace-vessel:hover img { transform:none; }
}

html[data-theme] .section-platform .platform-main-shell { border:0 !important; border-radius:0 !important; }
html[data-theme] .section-platform .platform-main-scroll { margin:0 !important; padding:0 !important; }
html[data-theme] .section-platform .platform-header-compact { padding:24px 28px 20px !important; border:0 !important; }
html[data-theme] .section-platform .platform-main { padding:8px 28px 40px !important; }
html[data-theme] .section-platform .platform-link-badge { box-shadow:none !important; font-size:9px; border-radius:4px; padding:3px 6px; }
.deal-view-toolbar { display:flex; justify-content:space-between; align-items:center; gap:16px; font-size:12px; color:var(--workspace-copy); }
.workspace-segmented { display:flex; gap:2px; padding:3px; background:var(--workspace-soft); border:1px solid var(--workspace-line); border-radius:6px; }
.workspace-segmented button { display:flex; align-items:center; gap:6px; min-height:32px; padding:6px 12px; border:0; border-radius:4px; color:var(--workspace-copy); background:transparent; font:600 12px var(--font-sans); cursor:pointer; }
.workspace-segmented button[aria-pressed=true] { background:var(--workspace-surface); color:var(--workspace-accent); box-shadow:0 1px 3px #0001; }
.deal-board { display:grid; grid-auto-flow:column; grid-auto-columns:230px; gap:16px; min-width:0; max-width:100%; overflow-x:auto; padding:4px 0 20px; align-items:start; scrollbar-width:thin; scrollbar-color:var(--workspace-line) transparent; }
.deal-board-lane { min-width:0; border-top:3px solid var(--workspace-accent); padding-top:14px; }
.deal-board-lane:nth-child(3n+2) { border-top-color:#527e9a; }
.deal-board-lane:nth-child(3n) { border-top-color:#b48b41; }
.deal-board-lane > header { display:flex; justify-content:space-between; align-items:center; gap:10px; }
.section-platform .deal-board-lane h2 { font:600 13px/1.4 var(--font-sans) !important; margin:0; color:var(--workspace-ink); }
.deal-board-lane > header > span { font-size:11px; color:var(--workspace-muted); }
.deal-board-value { margin:6px 0 18px; font-size:12px; color:var(--workspace-muted); }
.deal-board-card { display:grid; gap:8px; padding:16px; border:1px solid var(--workspace-line); border-radius:6px; margin-bottom:12px; background:var(--workspace-surface); text-decoration:none; color:var(--workspace-ink); transition:border-color 140ms, box-shadow 140ms; }
.deal-board-card:hover { border-color:var(--workspace-accent); box-shadow:0 3px 12px #0001; }
.deal-board-card small { font-size:11px; color:var(--workspace-copy); }
.section-platform .deal-board-card h3 { font:600 16px/1.4 var(--font-sans) !important; margin:0; color:var(--workspace-ink); }
.deal-board-card > strong { font-size:14px; font-weight:600; color:var(--workspace-accent); }
.deal-board-card p { font-size:11px; line-height:1.6; color:var(--workspace-copy); margin:0; }
.deal-board-card footer { display:flex; align-items:center; justify-content:space-between; gap:8px; padding-top:12px; border-top:1px solid var(--workspace-line); margin-top:6px; font-size:10px; color:var(--workspace-muted); }
.deal-board-card .status-badge { font-size:9px; }
.deal-board-empty { font-size:12px; padding:24px 12px; text-align:center; border:1px dashed var(--workspace-line); border-radius:6px; color:var(--workspace-muted); }

/* Legacy workflow metadata must use opaque, theme-aware text as well. */
html[data-theme] .section-platform {
  --broker-ink-muted: var(--modern-copy);
  --broker-ink-soft: var(--modern-copy);
}
html[data-theme] .section-platform .client-list-header {
  background:var(--modern-surface-muted) !important;
  color:var(--modern-copy) !important;
}
html[data-theme] .section-platform .client-list-header span {
  color:var(--modern-copy) !important;
}
html[data-theme="light"] .section-platform :is(
  .broker-assignment-copy span, .lead-list-line, .broker-os-note-card span,
  .lead-command-eyebrow > span, .lead-source-command-card span, .lead-route-row span,
  .dm-thread-listing, .dm-message-meta span, .dm-message-foot span,
  .dm-composer-note, .dm-context-grid span, .dm-context-item span,
  .post-sale-list-header > span, .post-sale-plan-meta span, .post-sale-plan-footer,
  .post-sale-provider-card span, .post-sale-task-row span, .post-sale-proposal-row span,
  .post-sale-key-value span, .post-sale-timeline span
) {
  color:var(--modern-copy) !important;
}

html[data-theme] .site-shell-platform .section-platform .platform-nav-group {
  background:transparent !important; border:0 !important; box-shadow:none !important;
}
html[data-theme] .site-shell-platform .section-platform .platform-brand {
  background:transparent !important;
}
html[data-theme] .site-shell-platform .section-platform .platform-sidebar-scroll .platform-link {
  background:transparent !important; color:var(--workspace-copy) !important;
}
html[data-theme] .site-shell-platform .section-platform .platform-sidebar-scroll .platform-link.is-active {
  background:var(--workspace-hover) !important; color:var(--workspace-accent) !important;
}
html[data-theme] .site-shell-platform .section-platform .platform-main :is(.panel, .stat-card, .feature-card) {
  background:var(--workspace-surface) !important;
}
html[data-theme] .site-shell-platform .section-platform .platform-main :is(.reply-box, .dm-context-rail, .dm-context-card, .dm-context-grid > div, .dm-context-item, .dm-conversation-header) {
  color:var(--workspace-copy) !important; background:var(--workspace-soft) !important; border-color:var(--workspace-line) !important;
}
html[data-theme] .site-shell-platform .section-platform .platform-main :is(.dm-thread, .dm-message-bubble) {
  background:var(--workspace-surface) !important; border-color:var(--workspace-line) !important;
}
html[data-theme] .site-shell-platform .section-platform .dm-thread-topline {
  display:block;
}
html[data-theme] .site-shell-platform .section-platform .dm-thread-topline strong {
  display:block; white-space:normal; overflow-wrap:anywhere;
}
html[data-theme] .site-shell-platform .section-platform .dm-thread-topline small {
  display:block; margin-top:4px; font-size:10px; color:var(--workspace-muted) !important;
}
.integration-health-detail { font-size:12px; line-height:1.5; padding-top:12px; border-top:1px solid var(--workspace-line); }
html[data-theme="dark"] .contact-consent { color:var(--modern-copy) !important; background:var(--modern-surface-muted) !important; border-color:var(--modern-line) !important; }
html[data-theme="dark"] .contact-consent span { color:inherit !important; }
html[data-theme="dark"] .contact-consent a { color:var(--modern-aqua) !important; }
html[data-theme="dark"] .site-shell-platform .section-platform .platform-main :is(.client-section-heading > span, .notification-test-result span, .notification-test-result strong) { color:var(--workspace-copy) !important; }
html[data-theme="dark"] .site-shell-platform .section-platform .platform-main .text-link { color:var(--workspace-accent) !important; background:transparent !important; }
html[data-theme="dark"] .site-shell-platform .section-platform .platform-main .danger-link { color:#ffb0a5 !important; }
html[data-theme="dark"] .site-shell-platform .section-platform .platform-main .post-sale-timeline span.is-complete { color:#d0f2e5 !important; background:#20483e !important; }
html[data-theme="dark"] .site-shell-platform .section-platform .platform-main .post-sale-timeline span:not(.is-complete) { color:var(--workspace-copy) !important; background:var(--workspace-soft) !important; }
html[data-theme="dark"] .site-shell-platform .section-platform .platform-main .post-sale-timeline span.is-current { color:#f5dda3 !important; background:#423923 !important; }
html[data-theme="dark"] .site-shell-platform .section-platform .platform-main .report-metric { background:var(--workspace-soft) !important; border-color:var(--workspace-line) !important; }
html[data-theme="dark"] .site-shell-platform .section-platform .platform-main .report-metric :is(span, strong, p) { color:var(--workspace-ink) !important; }
.workspace-mobile-menu { display:none; }
@media (max-width:980px) {
  .site-shell-platform .topbar-platform .platform-appbar { display:grid !important; grid-template-columns:40px minmax(70px,1fr) 40px auto !important; gap:8px; padding:0 12px; width:100%; }
  .workspace-mobile-menu { display:grid; place-items:center; width:40px; height:40px; padding:0; border:1px solid #526971; border-radius:6px; color:#e4eeee; background:transparent; cursor:pointer; }
  .workspace-search-trigger { width:40px; margin:0; }
  .workspace-search-trigger > span:not(.platform-link-icon) { display:none; }
  .site-shell-platform .topbar-platform .brand-lockup { min-width:0; gap:8px; }
  .site-shell-platform .topbar-platform .brand-text { display:none; }
  .site-shell-platform .topbar-platform .brand-logo { width:36px; height:36px; }
  .site-shell-platform .topbar-platform .platform-appbar-actions { gap:8px; width:auto; }
  .site-shell-platform .topbar-platform .platform-main-site-link { display:none; }
  .site-shell-platform .section-platform .platform-shell { grid-template-columns:0 minmax(0,1fr) !important; }
  .site-shell-platform .section-platform .platform-sidebar-rail { display:none !important; }
  html[data-theme] .section-platform .platform-header-compact { padding:22px 16px 16px !important; }
  html[data-theme] .section-platform .platform-main { padding:8px 16px 32px !important; }
  html[data-theme] .section-platform .platform-header-actions { width:auto !important; flex-direction:row !important; }
  html[data-theme] .section-platform .platform-header-actions .btn { width:auto !important; }
}
.page-route-home .hero-section > .hero-grid-refined { min-height:min(660px, calc(100svh - 120px)) !important; }
.page-route-home .hero-copy { padding:64px 5%; gap:0; max-width:100%; }
html[data-theme] body .page-route-home .hero-copy h1 { font-size:104px !important; line-height:1.05 !important; font-weight:500; margin:18px 0 20px !important; color:#fff !important; }
html[data-theme] body .page-route-home .hero-copy .eyebrow { font-size:12px; font-weight:500; text-transform:none; color:#efd3a0 !important; }
html[data-theme] body .page-route-home .hero-subheadline { font-size:30px; line-height:1.4; font-weight:400; color:#ecf2f0 !important; max-width:600px; }
.page-route-home .hero-actions { margin-top:30px; }
html[data-theme] .page-shell-main :is(.browse-hero-copy, .finder-hero, .how-hero, .demo-hero-copy, .brokerage-value-copy) h1 { font-size:52px !important; line-height:1.08; }
.page-shell-main .feature-card, .page-shell-main .signal-card { box-shadow:none !important; border-color:var(--modern-line); }

.page-shell[class*="page-route-profile"] { padding-top:calc(var(--modern-header-height) + 1px); background:var(--workspace-bg); }
.page-shell[class*="page-route-profile"]::before { display:none; }
html[data-theme] .profile-section { background:var(--workspace-bg) !important; padding-top:32px; }
html[data-theme] .profile-container { width:min(1280px,calc(100% - 32px)); }
html[data-theme] .profile-hero { padding:0 0 24px !important; border:0; border-radius:0 !important; background:transparent !important; box-shadow:none !important; }
html[data-theme] .profile-identity h1 { font-size:32px; font-weight:650; line-height:1.2; text-wrap:initial; }
html[data-theme] .profile-section h2 { font-family:var(--font-sans); font-size:24px; font-weight:650; line-height:1.3; color:var(--workspace-ink); }
html[data-theme] .profile-info-panel,
html[data-theme] .profile-favorites-panel { background:transparent !important; border:0; border-radius:0 !important; box-shadow:none !important; padding:20px 0 !important; }
html[data-theme] .profile-subpage-card { width:100%; }
html[data-theme] .profile-panel-header { margin-bottom:24px; }
html[data-theme] .profile-section .profile-action-card { background:var(--workspace-surface); border-color:var(--workspace-line); }
html[data-theme] .profile-section .profile-action-card small { color:var(--workspace-copy); }
html[data-theme] .profile-section .profile-action-card:hover,
html[data-theme] .profile-section .profile-action-card.is-active { background:var(--workspace-hover); }
@media (max-width: 620px) {
  html[data-theme] .profile-section { padding-top:24px; }
  html[data-theme] .profile-identity h1 { font-size:28px; }
  html[data-theme] .profile-identity { display:grid; grid-template-columns:56px minmax(0,1fr); align-items:start; gap:14px; }
  html[data-theme] .profile-avatar-square { width:56px; height:56px; }
  html[data-theme] .profile-section h2 { font-size:22px; }
  html[data-theme] .profile-section .profile-action-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  html[data-theme] .profile-action-card { min-height:58px; padding:10px; gap:8px; }
  html[data-theme] .profile-action-card small { display:none; }
}
@media (max-width:980px) {
  html[data-theme] body .page-route-home .hero-copy h1 { font-size:80px !important; }
  html[data-theme] body .page-route-home .hero-subheadline { font-size:26px; }
}
@media (max-width:600px) {
  html[data-theme] .section-platform .platform-header-compact { padding:20px 16px 14px !important; }
  html[data-theme] .section-platform .platform-main { padding:8px 16px 28px !important; }
  html[data-theme] body .page-route-home .hero-copy h1 { font-size:64px !important; }
  html[data-theme] body .page-route-home .hero-subheadline { font-size:24px; }
  .page-route-home .hero-copy { padding:40px 24px; }
  .page-route-home .hero-actions { gap:10px; }
  html[data-theme] .page-shell-main :is(.browse-hero-copy, .finder-hero, .how-hero, .demo-hero-copy, .brokerage-value-copy) h1 { font-size:36px !important; }
}
