/* YachtsAds design system — tokens first, mobile-first, compact enterprise density.
   Width rule: hero, h1, eyebrow and lead text always use the full container width (same as the header). */
:root {
  --c-navy-900: #0b2540;
  --c-navy-700: #163a5f;
  --c-sea-600: #0e6ba8;
  --c-sea-500: #1580c4;
  --c-sea-050: #eaf4fb;
  --c-ink: #14202b;
  --c-ink-2: #44515d;
  --c-ink-3: #5f6b76;
  --c-line: #d8dee4;
  --c-line-2: #e9edf1;
  --c-bg: #f5f7f9;
  --c-surface: #ffffff;
  --c-success-bg: #e7f6ec; --c-success-fg: #145c2e;
  --c-error-bg: #fdecec;   --c-error-fg: #9b1c1c;
  --c-info-bg: #eaf2fd;    --c-info-fg: #123d73;
  --c-warn-bg: #fff4e0;    --c-warn-fg: #7a4600;
  --c-danger: #b42318;
  --c-on-dark: #ffffff;
  --c-on-dark-2: #c9d6e3;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --fs-xs: .75rem; --fs-sm: .8125rem; --fs-base: .9375rem; --fs-md: 1.0625rem; --fs-lg: 1.25rem; --fs-xl: 1.625rem; --fs-2xl: 2.125rem;
  --sp-1: .25rem; --sp-2: .5rem; --sp-3: .75rem; --sp-4: 1rem; --sp-5: 1.5rem; --sp-6: 2rem; --sp-7: 3rem;
  --radius: 8px; --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --container: 1280px;
  --gutter: 16px;
  --header-h: 56px;
  --bottom-nav-h: 60px;
  --focus: 0 0 0 3px rgba(21, 128, 196, .45);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: var(--fs-base); line-height: 1.5; color: var(--c-ink); background: var(--c-bg); }
body.is-app { padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom)); }
a { color: var(--c-sea-600); text-underline-offset: 2px; }
a:hover { color: var(--c-navy-700); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 var(--sp-3); color: var(--c-ink); }
h1 { font-size: var(--fs-xl); }
h2 { font-size: var(--fs-md); }
p { margin: 0 0 var(--sp-3); }
code { font-family: var(--font-mono); font-size: .85em; background: var(--c-line-2); padding: 0 .3em; border-radius: 4px; word-break: break-all; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--radius-sm); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: var(--sp-2); top: -40px; background: var(--c-surface); padding: var(--sp-2) var(--sp-3); z-index: 100; }
.skip-link:focus { top: var(--sp-2); }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.main { padding-top: var(--sp-5); padding-bottom: var(--sp-6); min-height: 60vh; }

/* Header */
.site-header { background: var(--c-navy-900); color: var(--c-on-dark); position: sticky; top: 0; z-index: 20; }
.header-inner { display: flex; align-items: center; gap: var(--sp-4); min-height: var(--header-h); flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: var(--sp-2); color: var(--c-on-dark); text-decoration: none; font-weight: 700; font-size: var(--fs-md); }
.brand:hover { color: var(--c-on-dark); }
.brand-mark { width: 22px; height: 22px; fill: currentColor; }
.app-nav { display: none; gap: var(--sp-1); }
.app-nav a { color: var(--c-on-dark-2); text-decoration: none; padding: var(--sp-2) var(--sp-3); border-radius: var(--radius-sm); font-size: var(--fs-sm); font-weight: 600; }
.app-nav a:hover, .app-nav a[aria-current="page"] { color: var(--c-on-dark); background: rgba(255, 255, 255, .1); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: var(--sp-2); }
.header-link { color: var(--c-on-dark); text-decoration: none; font-size: var(--fs-sm); font-weight: 600; }
.header-link:hover { color: var(--c-on-dark); text-decoration: underline; }
.ws-switch { display: flex; gap: var(--sp-1); align-items: center; }
.ws-switch select { max-width: 46vw; background: var(--c-navy-700); color: var(--c-on-dark); border: 1px solid rgba(255, 255, 255, .25); border-radius: var(--radius-sm); padding: 4px 8px; font-size: var(--fs-sm); min-height: 32px; }
.site-header .btn-ghost { color: var(--c-on-dark); border-color: rgba(255, 255, 255, .3); }
.site-header .btn-ghost:hover { background: rgba(255, 255, 255, .1); color: var(--c-on-dark); }
.site-header .ws-switch .btn { background: transparent; color: var(--c-on-dark); border-color: rgba(255, 255, 255, .3); }

/* Footer */
.site-footer { border-top: 1px solid var(--c-line); background: var(--c-surface); font-size: var(--fs-sm); }
.footer-inner { display: flex; flex-wrap: wrap; gap: var(--sp-3); justify-content: space-between; padding-top: var(--sp-4); padding-bottom: var(--sp-4); }

/* Mobile bottom navigation */
.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr); background: var(--c-surface); border-top: 1px solid var(--c-line); padding-bottom: env(safe-area-inset-bottom); }
.bottom-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: var(--bottom-nav-h); color: var(--c-ink-3); text-decoration: none; font-size: var(--fs-xs); font-weight: 600; }
.bottom-nav a[aria-current="page"] { color: var(--c-sea-600); }
.bottom-nav svg { width: 22px; height: 22px; fill: currentColor; }

/* Typography helpers */
.eyebrow { font-size: var(--fs-xs); font-weight: 700; color: var(--c-sea-600); letter-spacing: .02em; margin-bottom: var(--sp-1); }
.lead { font-size: var(--fs-md); color: var(--c-ink-2); }
.muted { color: var(--c-ink-3); }
.small { font-size: var(--fs-sm); }
.prewrap { white-space: pre-wrap; overflow-wrap: anywhere; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2); min-height: 40px; padding: 0 var(--sp-4); border: 1px solid var(--c-line); border-radius: var(--radius-sm); background: var(--c-surface); color: var(--c-ink); font: inherit; font-weight: 600; font-size: var(--fs-sm); text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--c-ink-3); color: var(--c-ink); }
.btn-primary { background: var(--c-sea-600); border-color: var(--c-sea-600); color: var(--c-on-dark); }
.btn-primary:hover { background: var(--c-navy-700); border-color: var(--c-navy-700); color: var(--c-on-dark); }
.btn-ghost { background: transparent; }
.btn-danger { background: var(--c-danger); border-color: var(--c-danger); color: var(--c-on-dark); }
.btn-danger:hover { color: var(--c-on-dark); filter: brightness(.92); }
.btn-sm { min-height: 32px; padding: 0 var(--sp-3); font-size: var(--fs-xs); }
.btn-block { width: 100%; }
.actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; }

/* Layout blocks */
.hero { padding: var(--sp-5) 0 var(--sp-6); }
.hero h1 { font-size: var(--fs-2xl); }
.page-head { display: flex; flex-wrap: wrap; gap: var(--sp-3); justify-content: space-between; align-items: flex-end; margin-bottom: var(--sp-4); }
.page-head > div:first-child { flex: 1 1 100%; }
.page-head h1 { margin-bottom: var(--sp-1); }
.grid-2, .grid-3 { display: grid; gap: var(--sp-4); grid-template-columns: 1fr; }
.panel, .card { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius); padding: var(--sp-4); box-shadow: var(--shadow); margin-bottom: var(--sp-4); }
.grid-2 > .panel, .grid-3 > .card { margin-bottom: 0; }
.grid-2 { margin-bottom: var(--sp-4); }
.card h2 { font-size: var(--fs-md); }
.card p:last-child, .panel p:last-child { margin-bottom: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-3); }
.count { display: inline-block; min-width: 1.6em; padding: 0 .4em; border-radius: 999px; background: var(--c-sea-050); color: var(--c-sea-600); font-size: var(--fs-xs); text-align: center; vertical-align: middle; }
.empty { text-align: center; padding: var(--sp-5) var(--sp-3); color: var(--c-ink-2); }
.auth { padding-top: var(--sp-4); }
.auth .form { max-width: 440px; }
.narrow-state { padding: var(--sp-5); }

/* Rows / lists */
.rows { list-style: none; margin: 0; padding: 0; }
.row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--sp-2); padding: var(--sp-3) 0; border-top: 1px solid var(--c-line-2); }
.row:first-child { border-top: 0; }
.row-actions { display: flex; gap: var(--sp-2); }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: var(--sp-1); margin: var(--sp-2) 0 0; padding: 0; }
.chips li { background: var(--c-sea-050); color: var(--c-navy-700); border-radius: 999px; padding: 2px 10px; font-size: var(--fs-xs); font-weight: 600; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--c-sea-050); color: var(--c-navy-700); font-size: var(--fs-xs); font-weight: 700; }
.badge-muted { background: var(--c-line-2); color: var(--c-ink-2); font-weight: 600; }
.badge-warn { background: var(--c-warn-bg); color: var(--c-warn-fg); }
.badge-danger { background: var(--c-error-bg); color: var(--c-error-fg); }
.text-danger { color: var(--c-error-fg); font-weight: 700; }
.break { overflow-wrap: anywhere; word-break: break-all; }
/* F3: vessel section tabs (scroll inside themselves, never the page), timeline, disclosures */
.subnav { display: flex; gap: var(--sp-1); margin: 0 0 var(--sp-4); padding-bottom: var(--sp-1); border-bottom: 1px solid var(--c-line); overflow-x: auto; max-width: 100%; }
.subnav a { flex: 0 0 auto; padding: var(--sp-2) var(--sp-3); border-radius: var(--radius-sm) var(--radius-sm) 0 0; color: var(--c-ink-2); font-weight: 600; text-decoration: none; }
.subnav a[aria-current="page"] { color: var(--c-navy-700); box-shadow: inset 0 -3px 0 var(--c-sea-600); }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline-item { padding: var(--sp-3) 0 var(--sp-3) var(--sp-4); border-left: 3px solid var(--c-sea-050); }
.timeline-item h3 { margin: 0 0 var(--sp-1); font-size: var(--fs-md); }
.disclosure { margin-top: var(--sp-3); }
.disclosure > summary { cursor: pointer; font-weight: 700; color: var(--c-navy-700); padding: var(--sp-2) 0; }
.change-request { border-top: 1px solid var(--c-line-2); padding: var(--sp-3) 0; }
.route-sketch { width: 100%; height: auto; color: var(--c-sea-600); background: var(--c-sea-050); border-radius: var(--radius); }
.map-frame { display: block; width: 100%; height: 320px; border: 0; border-radius: var(--radius); margin-top: var(--sp-2); }
.footer-links a { color: inherit; }
pre.code { max-width: 100%; overflow-x: auto; padding: var(--sp-3); background: var(--c-line-2); border-radius: var(--radius-sm); font-size: var(--fs-sm); }

/* Spec list */
.spec { margin: 0; display: grid; grid-template-columns: 1fr; }
.spec > div { display: flex; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-2) 0; border-top: 1px solid var(--c-line-2); }
.spec > div:first-child { border-top: 0; }
.spec dt { color: var(--c-ink-3); font-size: var(--fs-sm); }
.spec dd { margin: 0; font-weight: 600; text-align: right; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-3); margin-bottom: var(--sp-4); }
.stat { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius); padding: var(--sp-3); display: flex; flex-direction: column; }
.stat-value { font-size: var(--fs-lg); font-weight: 700; }
.stat-label { font-size: var(--fs-xs); color: var(--c-ink-3); }

/* Tables: stacked cards on small screens, dense table on desktop */
.table-wrap { width: 100%; }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.table thead { display: none; }
.table tr { display: block; border-top: 1px solid var(--c-line-2); padding: var(--sp-2) 0; }
.table tr:first-child { border-top: 0; }
.table td { display: flex; justify-content: space-between; gap: var(--sp-3); padding: 2px 0; }
.table td[data-label]::before { content: attr(data-label); color: var(--c-ink-3); font-size: var(--fs-xs); }
.cell-actions { flex-wrap: wrap; justify-content: flex-start !important; }
.inline-form { display: inline-flex; gap: var(--sp-1); align-items: center; flex-wrap: wrap; }
.inline-form select, .inline-form input { min-height: 32px; padding: 0 8px; border: 1px solid var(--c-line); border-radius: var(--radius-sm); font: inherit; font-size: var(--fs-sm); }
.pager { margin-top: var(--sp-3); }

/* Public marketplace */
.public-nav { display: flex; gap: var(--sp-1); }
.public-nav a { color: var(--c-on-dark-2); text-decoration: none; padding: var(--sp-2) var(--sp-3); border-radius: var(--radius-sm); font-size: var(--fs-sm); font-weight: 600; }
.public-nav a:hover, .public-nav a[aria-current="page"] { color: var(--c-on-dark); background: rgba(255, 255, 255, .1); }
.hero-compact { padding: var(--sp-3) 0 var(--sp-4); }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: var(--sp-1); margin: 0 0 var(--sp-3); padding: 0; font-size: var(--fs-sm); }
.breadcrumbs li + li::before { content: "›"; margin-right: var(--sp-1); color: var(--c-ink-3); }
.listing-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: var(--sp-4); }
.listing-card a { display: flex; flex-direction: column; height: 100%; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--c-ink); box-shadow: var(--shadow); }
.listing-card a:hover { border-color: var(--c-sea-500); }
.listing-card img, .listing-noimg { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: var(--c-line-2); }
.listing-body { display: flex; flex-direction: column; gap: 2px; padding: var(--sp-3); }
.listing-title { font-size: var(--fs-md); }
.listing-price { font-weight: 700; color: var(--c-navy-700); margin-top: var(--sp-1); }
.listing-price-lg { font-size: var(--fs-lg); font-weight: 700; color: var(--c-navy-700); margin: var(--sp-1) 0 0; }
.gallery-public .gallery-item:first-child { grid-column: 1 / -1; }

.chips-nav { margin: 0 0 var(--sp-3); }
.chips-nav a { display: inline-block; padding: 4px 12px; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: var(--fs-sm); background: var(--c-surface); border: 1px solid var(--c-line); color: var(--c-ink-2); }
.chips-nav a[aria-current="page"] { background: var(--c-sea-600); border-color: var(--c-sea-600); color: var(--c-on-dark); }
.chips-nav li { background: none; padding: 0; }
.search-layout { display: grid; grid-template-columns: 1fr; gap: var(--sp-4); }
.filters summary { cursor: pointer; list-style: none; }
.filters summary::-webkit-details-marker { display: none; }
.filters[open] summary { margin-bottom: var(--sp-3); }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2); }
.save-search { margin-bottom: var(--sp-3); font-size: var(--fs-sm); }
.save-search summary { cursor: pointer; color: var(--c-sea-600); font-weight: 600; }
.save-search form { margin-top: var(--sp-2); }
.results-meta { font-size: var(--fs-sm); color: var(--c-ink-2); margin-bottom: var(--sp-3); }
.pager { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }

/* CRM pipeline + quote lines */
.pipeline { display: grid; grid-template-columns: 1fr; gap: var(--sp-3); margin-bottom: var(--sp-4); }
.pipeline-col { margin-bottom: 0; }
.pipeline-col h2 { font-size: var(--fs-base); }
.quote-lines input { width: 100%; min-height: 36px; padding: 0 8px; border: 1px solid var(--c-line); border-radius: var(--radius-sm); font: inherit; }
@media (min-width: 960px) { .pipeline { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

/* Inbox */
.conv-link { display: flex; flex-direction: column; text-decoration: none; color: var(--c-ink); min-width: 0; }
.thread { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-3); }
.msg { max-width: 100%; padding: var(--sp-3); border-radius: var(--radius); border: 1px solid var(--c-line); background: var(--c-surface); }
.msg-mine { background: var(--c-sea-050); border-color: transparent; align-self: flex-end; }
.msg-internal { background: var(--c-warn-bg); border-style: dashed; }
.msg-meta { margin-bottom: var(--sp-1); color: var(--c-ink-3); }
@media (min-width: 720px) { .msg { max-width: 80%; } }

/* Wizard stepper */
.stepper { margin-bottom: var(--sp-4); overflow-x: auto; }
.stepper ol { list-style: none; display: flex; gap: var(--sp-2); margin: 0; padding: 0; }
.stepper li { flex: 0 0 auto; }
.stepper a, .stepper .step-done { display: inline-block; padding: var(--sp-2) var(--sp-3); border-radius: 999px; font-size: var(--fs-sm); font-weight: 600; text-decoration: none; border: 1px solid var(--c-line); background: var(--c-surface); color: var(--c-ink-2); white-space: nowrap; }
.stepper .step-done { background: var(--c-line-2); }
.stepper a[aria-current="step"] { background: var(--c-sea-600); border-color: var(--c-sea-600); color: var(--c-on-dark); }
textarea { width: 100%; padding: var(--sp-2) var(--sp-3); border: 1px solid var(--c-line); border-radius: var(--radius-sm); font: inherit; font-size: 1rem; background: var(--c-surface); color: var(--c-ink); }
fieldset[disabled] { opacity: .7; }

/* Gallery */
.gallery { list-style: none; margin: 0 0 var(--sp-4); padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); }
.gallery-item { display: flex; flex-direction: column; gap: var(--sp-2); }
.gallery-item img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-sm); background: var(--c-line-2); display: block; }
.gallery-meta { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; min-height: 20px; }
.gallery-actions { display: flex; flex-wrap: wrap; gap: var(--sp-1); }
.upload-form { border-top: 1px solid var(--c-line-2); padding-top: var(--sp-4); }
.upload-form input[type="file"] { padding: var(--sp-2); min-height: 0; }

/* Forms */
.form { display: flex; flex-direction: column; gap: var(--sp-3); }
.form-grid { display: grid; grid-template-columns: 1fr; gap: var(--sp-3); }
.field { display: flex; flex-direction: column; gap: 4px; border: 0; margin: 0; padding: 0; min-width: 0; }
.field label, .field legend, .field .label { font-size: var(--fs-sm); font-weight: 600; color: var(--c-ink); padding: 0; }
.field input, .field select { width: 100%; min-height: 42px; padding: 0 var(--sp-3); border: 1px solid var(--c-line); border-radius: var(--radius-sm); background: var(--c-surface); color: var(--c-ink); font: inherit; font-size: 1rem; }
.field input:focus, .field select:focus { border-color: var(--c-sea-500); box-shadow: var(--focus); outline: none; }
.has-error input, .has-error select { border-color: var(--c-danger); }
.field-error { color: var(--c-error-fg); font-size: var(--fs-sm); margin: 0; }
.hint { color: var(--c-ink-3); font-size: var(--fs-xs); margin: 0; }
.choice-row, .check-grid { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); }
.check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choice { display: inline-flex; align-items: center; gap: var(--sp-2); font-weight: 500 !important; min-height: 36px; }
.choice input { width: 18px; height: 18px; }
.sticky-actions { position: sticky; bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom)); background: var(--c-bg); padding: var(--sp-3) 0; }

/* Alerts */
.alert { border-radius: var(--radius-sm); padding: var(--sp-3) var(--sp-4); margin-bottom: var(--sp-4); font-size: var(--fs-sm); }
.alert-success { background: var(--c-success-bg); color: var(--c-success-fg); }
.alert-error { background: var(--c-error-bg); color: var(--c-error-fg); }
.alert-info { background: var(--c-info-bg); color: var(--c-info-fg); }
.alert-warn { background: var(--c-warn-bg); color: var(--c-warn-fg); }

.hide-sm { display: none !important; }
.show-sm { display: block; margin-top: var(--sp-4); }

@media (min-width: 720px) {
  :root { --gutter: 24px; }
  h1 { font-size: var(--fs-2xl); }
  .hero h1 { font-size: 2.5rem; }
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .check-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .listing-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 960px) {
  body.is-app { padding-bottom: 0; }
  .bottom-nav, .show-sm { display: none !important; }
  .hide-sm { display: inline-flex !important; }
  .app-nav { display: flex; }
  .sticky-actions { bottom: 0; }
  .search-layout { grid-template-columns: 280px minmax(0, 1fr); align-items: start; }
  .filters { position: sticky; top: calc(var(--header-h) + var(--sp-3)); }
  .search-layout .listing-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .table thead { display: table-header-group; }
  .table tr { display: table-row; padding: 0; }
  .table th { text-align: left; font-size: var(--fs-xs); color: var(--c-ink-3); font-weight: 700; padding: var(--sp-2) var(--sp-3); border-bottom: 1px solid var(--c-line); }
  .table td { display: table-cell; padding: var(--sp-2) var(--sp-3); vertical-align: top; border-top: 1px solid var(--c-line-2); }
  .table td[data-label]::before { content: none; }
  .cell-actions { white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }

/* F12 language switch (footer) */
.lang-switch { display: inline-flex; gap: var(--sp-1); align-items: center; }
.lang-switch [aria-current="true"] { font-weight: 600; text-decoration: underline; }

/* F14 printable brochure */
.brochure-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: var(--sp-2); margin: var(--sp-3) 0; }
.brochure-photos img { width: 100%; height: auto; }
.brochure-photos img:first-child { grid-column: 1 / -1; }
.brochure-footer { border-top: 1px solid currentColor; margin-top: var(--sp-4); padding-top: var(--sp-2); }
@media print {
  .site-header, .site-footer, .bottom-nav, .no-print, .skip-link { display: none !important; }
  body { background: #fff; color: #000; }
  .brochure .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
}

/* F15 inbox views */
.tabs { display: flex; gap: var(--sp-3); margin: var(--sp-2) 0; }
.tabs [aria-current="page"] { font-weight: 600; text-decoration: underline; }
.plan-grid { display: grid; gap: var(--sp-3); grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
.plan-card { border: 1px solid var(--c-line); border-radius: var(--radius); padding: var(--sp-3); display: flex; flex-direction: column; gap: .5rem; }
.plan-card.is-current { border-color: var(--c-sea-600); }
.plan-card h3 { margin: 0; }
.plan-price { font-size: 1.25rem; font-weight: 600; margin: 0; }
.env-banner { background: var(--c-warn-bg); color: var(--c-ink); text-align: center; padding: var(--sp-1) var(--sp-3); font-size: .875rem; border-bottom: 1px solid var(--c-line); }
.facts { margin: 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: var(--sp-1); }
.bar-chart { width: 100%; height: 140px; display: block; } .bar-chart rect { fill: var(--c-sea-600); } .bar-chart line { stroke: var(--c-line); }

/* F26 profiles, business media, lightbox */
.business-cover { display: block; margin: 0 0 var(--sp-4); border-radius: var(--radius-lg, 12px); overflow: hidden; }
.business-cover img { display: block; width: 100%; height: clamp(160px, 28vw, 360px); object-fit: cover; }
.page-head .business-logo { width: 96px; height: 96px; object-fit: contain; border-radius: var(--radius, 8px); background: var(--surface, #fff); border: 1px solid var(--border, #d8dee6); margin-right: var(--sp-4); flex: none; }
.page-head:has(.business-logo), .person-head { display: flex; align-items: center; gap: var(--sp-4); flex-wrap: wrap; }
.logo-preview { width: 120px; height: 120px; object-fit: contain; border: 1px solid var(--border, #d8dee6); border-radius: var(--radius, 8px); }
.cover-preview { width: 100%; max-width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius, 8px); }
.team-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--sp-3); }
.team-list li { display: flex; align-items: center; gap: var(--sp-3); }
.team-list img, .team-list .avatar-fallback { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none; }
.avatar-fallback { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--brand-soft, #e3edf7); color: var(--brand, #0b2540); font-weight: 700; width: 56px; height: 56px; }
.avatar-lg { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; font-size: 2rem; }
.profile-photo { display: flex; align-items: center; gap: var(--sp-4); flex-wrap: wrap; }
.gallery-public picture { display: block; }
dialog.lightbox { width: min(96vw, 1400px); max-height: 94vh; padding: var(--sp-3); border: 0; border-radius: var(--radius-lg, 12px); background: #0b1420; color: #f3f6fa; }
dialog.lightbox::backdrop { background: rgba(5, 10, 18, 0.85); }
.lightbox-figure { margin: 0; text-align: center; }
.lightbox-img { max-width: 100%; max-height: 78vh; height: auto; width: auto; }
.lightbox-caption { margin-top: var(--sp-2); font-size: 0.9rem; color: #d6dee8; }
.lightbox-bar { display: flex; gap: var(--sp-2); align-items: center; justify-content: center; margin-top: var(--sp-3); flex-wrap: wrap; }
.lightbox-count { min-width: 5em; text-align: center; color: #f3f6fa; }
/* F27 mobile fixes: the public navigation and tab rows scroll inside their own row instead of widening the page */
.public-nav { order: 3; flex: 1 0 100%; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-bottom: var(--sp-1); }
.public-nav::-webkit-scrollbar { display: none; }
.public-nav a { white-space: nowrap; flex: none; }
.tabs { overflow-x: auto; scrollbar-width: thin; padding-bottom: var(--sp-1); }
.tabs > a { white-space: nowrap; flex: none; }
@media (min-width: 960px) { .public-nav { order: 0; flex: 0 1 auto; overflow-x: visible; padding-bottom: 0; } }
@media (min-width: 960px) { .app-nav { flex: 1 1 0; min-width: 0; flex-wrap: wrap; row-gap: 0; } .app-nav a { white-space: nowrap; } }

.tag-list { list-style: none; margin: 0 0 var(--sp-3); padding: 0; display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.tag-list .tag { padding: 2px var(--sp-2); border: 1px solid var(--border, #d8dee6); border-radius: 999px; font-size: var(--fs-sm, .875rem); }
/* F28 mobile: action groups in list rows wrap instead of widening the page */
.row-actions { flex-wrap: wrap; min-width: 0; max-width: 100%; }
.row-actions .inline-form, .inline-form { max-width: 100%; }
/* F37 route stop recommendations: one per line under the stop */
.tip { display: block; flex-basis: 100%; margin-top: var(--sp-1); }
.inline-form input, .inline-form select { min-width: 0; max-width: 100%; }
/* F39 monospace input for error codes */
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
/* F40 one-time photo code */
.code-word { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: var(--fs-lg); letter-spacing: .15em; }
/* F47 article cover */
.article-cover { margin: 0 0 var(--sp-4); }
.article-cover img { width: 100%; height: auto; border-radius: var(--radius); }

/* F74 / M28-F007 formatted editorial text */
.article-body h2, .article-body h3 { margin-top: var(--sp-5); }
.article-body ul, .article-body ol { margin: 0 0 var(--sp-4); padding-left: 1.4em; }
.article-body li + li { margin-top: var(--sp-1); }
.article-body blockquote { margin: 0 0 var(--sp-4); padding: var(--sp-2) 0 var(--sp-2) var(--sp-4); border-left: 3px solid var(--c-line); }

/* F84 360° panorama viewer */
.panorama { height: 320px; margin-bottom: var(--sp-3); border-radius: var(--radius, 8px); background-color: var(--c-line); background-repeat: repeat-x; background-size: auto 100%; cursor: grab; touch-action: pan-y; user-select: none; }
.panorama.is-dragging { cursor: grabbing; }
.panorama:focus-visible { outline: 3px solid var(--c-sea-600, #0b6e99); outline-offset: 2px; }

/* F87 charter fleet grid */
.fleet td { white-space: nowrap; }
.fleet-booked { background: var(--c-success-bg); color: var(--c-success-fg); }
.fleet-hold { background: var(--c-warn-bg); color: var(--c-warn-fg); }
.fleet-blocked { background: var(--c-line); }

/* F88 sub-sections inside a form panel */
.panel-sub { border: 1px solid var(--c-line); border-radius: var(--radius-sm); padding: var(--sp-3); margin: 0 0 var(--sp-4); }
.panel-sub legend { padding: 0 var(--sp-2); font-weight: 600; }
