/* BizFair design system. One file, tokens first, no framework.
   The look: a bright exhibition hall. Cool light paper, deep navy ink, one signage accent per theme plus a
   warm "lanyard" secondary used only for counters, highlights and the occasional badge. Plus Jakarta Sans
   for everything. Themes switch on html[data-theme], light/dark on html[data-mode], company page
   layouts on body[data-layout]. Accessibility baseline: WCAG 2.2 AA contrast, visible focus, 44px targets,
   reduced motion respected. */

/* ---------------------------------------------------------------- tokens */
:root {
  --paper: #f5f8fc;
  --surface: #ffffff;
  --surface-2: #eef3f9;
  --surface-3: #e3eaf3;
  --ink: #15213b;
  --ink-2: #4e5a72;
  --ink-3: #7b869c;
  --line: #d9e1ec;
  --line-2: #c3cedd;
  --accent: #1f5eff;
  --accent-ink: #ffffff;
  --accent-soft: #e4ecff;
  --accent-deep: #1545c4;
  --warm: #ffb224;
  --warm-ink: #3a2a00;
  --warm-soft: #fff1cf;
  --ok: #178a4c;
  --ok-soft: #dff5e8;
  --warn: #9a5b00;
  --warn-soft: #fff0d4;
  --danger: #c0271f;
  --danger-soft: #fde6e4;
  --focus: #1f5eff;
  --r-1: 6px; --r-2: 12px; --r-3: 20px;
  --shadow-1: 0 1px 2px rgba(21, 33, 59, .06);
  --shadow-2: 0 6px 24px rgba(21, 33, 59, .08);
  --font: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, Roboto, "Noto Sans", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 72px;
  --max: 1200px;
  --topbar-h: 64px;
  color-scheme: light;
}
html[data-theme="ocean"]   { --accent: #0e7c86; --accent-deep: #0a5c64; --accent-soft: #dcf2f4; --warm: #ff7a59; --warm-soft: #ffe4dc; --warm-ink: #4a1a0c; --paper: #f3f9fa; --surface-2: #e8f3f4; --focus: #0e7c86; }
html[data-theme="sunrise"] { --accent: #c92a6b; --accent-deep: #9c1e52; --accent-soft: #fbe3ec; --warm: #ffc745; --warm-soft: #fff3cf; --warm-ink: #3d2d00; --paper: #fbf6f7; --surface-2: #f6eaee; --focus: #c92a6b; }
html[data-theme="meadow"]  { --accent: #1e8a4c; --accent-deep: #156637; --accent-soft: #e0f3e7; --warm: #f2a900; --warm-soft: #fff0c2; --warm-ink: #3a2900; --paper: #f4f9f5; --surface-2: #e8f2ea; --focus: #1e8a4c; }

html[data-mode="dark"] {
  --paper: #0f1522; --surface: #171f30; --surface-2: #1f2a3f; --surface-3: #283550;
  --ink: #e9eef7; --ink-2: #aeb8cc; --ink-3: #7f8aa3; --line: #2b3650; --line-2: #3a4866;
  --accent-ink: #ffffff; --accent-soft: #1e2d55; --ok-soft: #12301f; --warn-soft: #3a2a0d; --danger-soft: #3d1715; --warm-soft: #3a2d10; --warm-ink: #ffe3a3;
  --shadow-1: none; --shadow-2: 0 8px 24px rgba(0, 0, 0, .4);
  color-scheme: dark;
}
html[data-mode="dark"][data-theme="daylight"] { --accent: #6b93ff; --accent-deep: #4a73e0; --focus: #8fb0ff; }
html[data-mode="dark"][data-theme="ocean"]   { --accent: #3fb7c2; --accent-deep: #2a97a1; --accent-soft: #123a3e; --focus: #6ad3dc; }
html[data-mode="dark"][data-theme="sunrise"] { --accent: #ff6fa6; --accent-deep: #e04f8a; --accent-soft: #3d1b2a; --focus: #ff9cc1; }
html[data-mode="dark"][data-theme="meadow"]  { --accent: #4fc57f; --accent-deep: #32a562; --accent-soft: #163b26; --focus: #7fe0a5; }
@media (prefers-color-scheme: dark) {
  html[data-mode="auto"] {
    --paper: #0f1522; --surface: #171f30; --surface-2: #1f2a3f; --surface-3: #283550;
    --ink: #e9eef7; --ink-2: #aeb8cc; --ink-3: #7f8aa3; --line: #2b3650; --line-2: #3a4866;
    --accent-ink: #ffffff; --accent-soft: #1e2d55; --ok-soft: #12301f; --warn-soft: #3a2a0d; --danger-soft: #3d1715; --warm-soft: #3a2d10; --warm-ink: #ffe3a3;
    --shadow-1: none; --shadow-2: 0 8px 24px rgba(0, 0, 0, .4);
    color-scheme: dark;
  }
  html[data-mode="auto"][data-theme="daylight"] { --accent: #6b93ff; --accent-deep: #4a73e0; --focus: #8fb0ff; }
  html[data-mode="auto"][data-theme="ocean"]   { --accent: #3fb7c2; --accent-deep: #2a97a1; --accent-soft: #123a3e; --focus: #6ad3dc; }
  html[data-mode="auto"][data-theme="sunrise"] { --accent: #ff6fa6; --accent-deep: #e04f8a; --accent-soft: #3d1b2a; --focus: #ff9cc1; }
  html[data-mode="auto"][data-theme="meadow"]  { --accent: #4fc57f; --accent-deep: #32a562; --accent-soft: #163b26; --focus: #7fe0a5; }
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.55 var(--font); font-feature-settings: "ss01", "cv11"; }
img, video { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 var(--s-3); font-weight: 700; letter-spacing: -0.015em; }
h1 { font-size: 2rem; letter-spacing: -0.025em; }
h2 { font-size: 1.375rem; }
h3 { font-size: 1.125rem; }
h4 { font-size: 1rem; }
p { margin: 0 0 var(--s-3); }
small, .muted { color: var(--ink-2); font-size: .9rem; }
.faint { color: var(--ink-3); }
code, .mono { font-family: var(--mono); font-size: .9em; }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--s-5) 0; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: var(--r-1); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: var(--r-1); z-index: 100; }
.skip:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.prewrap { white-space: pre-wrap; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------------------------------------------------------------- topbar */
.topbar { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar__inner { max-width: var(--max); margin: 0 auto; padding: 0 var(--s-5); height: var(--topbar-h); display: flex; align-items: center; gap: var(--s-4); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.125rem; color: var(--ink); letter-spacing: -0.02em; }
.brand:hover { text-decoration: none; }
.brand__mark { width: 32px; height: 32px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-size: .8rem; font-weight: 800; letter-spacing: 0; position: relative; overflow: hidden; }
.brand__mark::after { content: ""; position: absolute; right: -6px; bottom: -6px; width: 16px; height: 16px; border-radius: 4px; background: var(--warm); transform: rotate(20deg); }
.topbar__spacer { flex: 1; }
.topbar__links { display: flex; align-items: center; gap: var(--s-2); }
.topbar__links > a:not(.btn), .topbar__links > button.linkbtn { color: var(--ink-2); padding: 8px 10px; border-radius: var(--r-1); font-weight: 500; min-height: 40px; display: inline-flex; align-items: center; white-space: nowrap; }
.topbar__links > a:not(.btn):hover { color: var(--ink); background: var(--surface-2); text-decoration: none; }
.topbar__links > a:not(.btn)[aria-current="page"] { color: var(--accent); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-deep); display: inline-grid; place-items: center; font-weight: 700; font-size: .8rem; }
html[data-mode="dark"] .avatar { color: var(--accent); }
.lang { position: relative; }
.lang select, .mode-switch select { appearance: none; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: var(--r-1); padding: 8px 28px 8px 10px; font: inherit; font-size: .85rem; font-weight: 600; min-height: 40px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-position: calc(100% - 15px) 17px, calc(100% - 10px) 17px; background-size: 5px 5px; background-repeat: no-repeat; }
.topbar__menu { display: none; min-width: 44px; min-height: 44px; padding: 8px; border-radius: var(--r-1); border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; align-items: center; justify-content: center; }
.topbar__menu .ico { width: 22px; height: 22px; }
.topbar__drawer { position: absolute; right: var(--s-4); top: calc(var(--topbar-h) - 6px); min-width: 240px; max-width: calc(100vw - 32px); }
.topbar__drawer a, .topbar__drawer button { display: block; width: 100%; min-height: 44px; }
.topbar__drawer .row { padding: 6px 10px; gap: 8px; }
@media (max-width: 860px) {
  /* a:not(.btn--primary) on purpose: a plain "> a" loses to "> a:not(.btn)" above and the links stay (issue #15) */
  .topbar__links > a:not(.btn--primary), .topbar__links > button.linkbtn, .topbar__links .mode-switch, .topbar__links .lang { display: none; }
  .topbar__links > a.btn--primary { display: inline-flex; }
  .topbar__menu { display: inline-flex; }
  .topbar__inner { padding: 0 var(--s-4); }
}
/* phones: brand and menu button only; "create your page" is in the drawer */
@media (max-width: 480px) {
  .topbar__links > a.btn--primary { display: none; }
}

/* ------------------------------------------------------------ app shell */
.shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); max-width: calc(var(--max) + 240px); margin: 0 auto; min-height: calc(100vh - var(--topbar-h)); }
.sidenav { padding: var(--s-5) var(--s-4); border-right: 1px solid var(--line); background: var(--surface); position: sticky; top: var(--topbar-h); height: calc(100vh - var(--topbar-h)); overflow-y: auto; }
.sidenav__co { display: flex; align-items: center; gap: 10px; padding: 0 8px var(--s-4); margin-bottom: var(--s-3); border-bottom: 1px solid var(--line); }
.sidenav__co .logo { width: 36px; height: 36px; border-radius: 9px; object-fit: cover; background: var(--surface-2); flex: none; }
.sidenav__co strong { display: block; font-size: .95rem; line-height: 1.2; }
.sidenav__co small { display: block; }
.sidenav ul { list-style: none; margin: 0; padding: 0; }
.sidenav li { margin: 2px 0; }
.sidenav li.sep { margin: var(--s-3) 0 var(--s-2); padding: 0 8px; font-size: .75rem; color: var(--ink-3); font-weight: 600; }
.sidenav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--r-1); color: var(--ink-2); font-weight: 500; min-height: 40px; }
.sidenav a:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.sidenav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-deep); font-weight: 700; }
html[data-mode="dark"] .sidenav a[aria-current="page"] { color: var(--accent); }
.sidenav .ico { width: 20px; height: 20px; flex: none; opacity: .85; }
.count { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--warm); color: var(--warm-ink); font-size: .75rem; font-weight: 700; display: inline-grid; place-items: center; }
main.app { padding: var(--s-6) var(--s-6) var(--s-8); min-width: 0; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidenav { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: var(--s-3) var(--s-4); }
  .sidenav__co { display: none; }
  .sidenav ul { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 4px; }
  .sidenav li.sep { display: none; }
  .sidenav a { white-space: nowrap; }
  main.app { padding: var(--s-5) var(--s-4) var(--s-7); }
}

/* --------------------------------------------------------- page scaffold */
.page { max-width: var(--max); margin: 0 auto; padding: var(--s-6) var(--s-5) var(--s-8); }
.page--narrow { max-width: 760px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s-4); margin-bottom: var(--s-5); }
.page-head h1 { margin-bottom: 4px; }
.page-head p { margin: 0; color: var(--ink-2); max-width: 60ch; }
.section-title { display: flex; align-items: center; gap: 12px; margin: var(--s-6) 0 var(--s-4); }
.section-title h2 { margin: 0; }
.section-title::after { content: ""; flex: 1; height: 2px; background: linear-gradient(90deg, var(--accent) 0, var(--accent) 48px, var(--line) 48px); }
.section-title .muted { margin-left: auto; }
.grid { display: grid; gap: var(--s-4); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.stack > * + * { margin-top: var(--s-3); }
.row { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-3); align-items: center; }
.row--between { justify-content: space-between; }
.row--end { justify-content: flex-end; }
.split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: var(--s-5); align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2); padding: var(--s-5); box-shadow: var(--shadow-1); }
.card + .card { margin-top: var(--s-4); }
.card--flat { box-shadow: none; }
.card--soft { background: var(--surface-2); border-color: transparent; }
.card--accent { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); background: linear-gradient(180deg, var(--accent-soft), var(--surface) 60%); }
.card h2:first-child, .card h3:first-child { margin-top: 0; }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-4); }
.card__head h2, .card__head h3 { margin: 0; }
.card--inner { padding: var(--s-4); border-radius: var(--r-1); }

/* stat band: one strip, not four identical boxes */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2); overflow: hidden; }
.stat { padding: var(--s-4) var(--s-5); border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat__value { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.stat__label { color: var(--ink-2); font-size: .85rem; margin-top: 2px; }
.stat--warm .stat__value { color: var(--accent); }
@media (max-width: 600px) { .stat { border-right: 0; border-bottom: 1px solid var(--line); } .stat:last-child { border-bottom: 0; } }

/* ----------------------------------------------------------------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; white-space: nowrap; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; transition: background .12s, border-color .12s, transform .06s; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.btn--warm { background: var(--warm); border-color: var(--warm); color: var(--warm-ink); }
.btn--warm:hover { filter: brightness(.96); }
.btn--ghost { border-color: transparent; background: transparent; color: var(--accent); }
.btn--ghost:hover { background: var(--accent-soft); }
.btn--danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); }
.btn--danger:hover { background: var(--danger-soft); }
.btn--small { min-height: 36px; padding: 6px 12px; font-size: .9rem; border-radius: 8px; }
.btn--large { min-height: 52px; padding: 14px 26px; font-size: 1.05rem; border-radius: 12px; }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn .ico { width: 18px; height: 18px; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; }
.linkbtn:hover { text-decoration: underline; }
.actions { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.ico { width: 1.1em; height: 1.1em; vertical-align: -0.2em; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* ------------------------------------------------------------------ forms */
.field { margin-bottom: var(--s-4); }
.field--inline { display: flex; gap: var(--s-3); align-items: end; }
label, .label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; color: var(--ink); }
.hint { color: var(--ink-2); font-size: .85rem; margin: 4px 0 0; }
input[type="text"], input[type="email"], input[type="password"], input[type="url"], input[type="number"], input[type="search"], input[type="tel"],
input[type="date"], input[type="datetime-local"], input[type="time"], input[type="color"], select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; }
input[type="color"] { padding: 4px; width: 64px; }
textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: 3px solid color-mix(in srgb, var(--focus) 35%, transparent); border-color: var(--focus); }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: .85rem; margin-top: 4px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; min-height: 32px; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
fieldset { border: 1px solid var(--line); border-radius: var(--r-2); padding: var(--s-4); margin: 0 0 var(--s-4); }
legend { font-weight: 700; padding: 0 6px; }
.form-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-4); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 var(--s-4); }
.form-grid .field--full { grid-column: 1 / -1; }
.form-summary { margin-bottom: var(--s-4); }
.input-group { display: flex; }
.input-group > input { border-radius: 8px 0 0 8px; }
.input-group > .btn { border-radius: 0 8px 8px 0; margin-left: -1px; }
.dropzone { border: 2px dashed var(--line-2); border-radius: var(--r-2); padding: var(--s-5); text-align: center; color: var(--ink-2); background: var(--surface-2); }
.dropzone.is-over { border-color: var(--accent); background: var(--accent-soft); }
.lang-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: var(--s-4); }
.lang-tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 12px; font: inherit; font-weight: 600; color: var(--ink-2); cursor: pointer; min-height: 40px; }
.lang-tabs button[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }
.lang-tabs button .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); margin-left: 6px; }

/* ----------------------------------------------------- badges and notices */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font-size: .8rem; font-weight: 600; line-height: 1.5; white-space: nowrap; }
.badge--accent { background: var(--accent-soft); color: var(--accent-deep); }
html[data-mode="dark"] .badge--accent { color: var(--accent); }
.badge--warm { background: var(--warm-soft); color: var(--warm-ink); }
.badge--ok { background: var(--ok-soft); color: var(--ok); }
.badge--warn { background: var(--warn-soft); color: var(--warn); }
.badge--danger { background: var(--danger-soft); color: var(--danger); }
.badge--outline { background: transparent; border: 1px solid var(--line-2); }
.badge .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.notice { padding: 12px 16px; border-radius: var(--r-1); background: var(--surface-2); border-left: 4px solid var(--line-2); margin: 0 0 var(--s-4); }
.notice--ok { background: var(--ok-soft); border-left-color: var(--ok); }
.notice--warn { background: var(--warn-soft); border-left-color: var(--warn); }
.notice--danger { background: var(--danger-soft); border-left-color: var(--danger); }
.notice--info { background: var(--accent-soft); border-left-color: var(--accent); }
.verified { color: var(--accent); }
.empty { text-align: center; padding: var(--s-7) var(--s-4); color: var(--ink-2); }
.empty svg { width: 48px; height: 48px; margin-bottom: var(--s-3); opacity: .5; }
.empty .btn { margin-top: var(--s-3); }

/* ----------------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-2); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th, .table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { font-weight: 600; color: var(--ink-2); font-size: .85rem; background: var(--surface-2); white-space: nowrap; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: color-mix(in srgb, var(--accent-soft) 45%, transparent); }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table .thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--surface-2); }
.table--compact th, .table--compact td { padding: 8px 10px; }
.table input, .table select { min-height: 36px; padding: 6px 8px; }
.list { list-style: none; margin: 0; padding: 0; }
.list-item { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-3) 0; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.list-item__title { font-weight: 600; }
.list-item__meta { color: var(--ink-2); font-size: .85rem; }
.list-item--unread .list-item__title::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--warm); margin-right: 8px; vertical-align: middle; }
.list-item .spacer { flex: 1; }

/* ------------------------------------------------------------------- tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: var(--s-4); overflow-x: auto; }
.tabs [role="tab"] { background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 14px; font: inherit; font-weight: 600; color: var(--ink-2); cursor: pointer; white-space: nowrap; min-height: 44px; }
.tabs [role="tab"][aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }
.tabs [role="tab"]:hover { color: var(--ink); }
.pills { display: inline-flex; gap: 4px; background: var(--surface-2); padding: 4px; border-radius: 999px; }
.pills button { border: 0; background: none; font: inherit; font-weight: 600; padding: 6px 14px; border-radius: 999px; color: var(--ink-2); cursor: pointer; min-height: 36px; }
.pills button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }

/* ----------------------------------------------------------------- toasts */
.toasts { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 90; max-width: min(420px, calc(100vw - 32px)); }
.toast { background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 10px; box-shadow: var(--shadow-2); font-weight: 500; }
html[data-mode="dark"] .toast { background: var(--surface-3); color: var(--ink); }
.toast--error { background: var(--danger); color: #fff; }
.toast--ok { background: var(--ok); color: #fff; }

/* --------------------------------------------------------------- skeleton */
.skeleton { background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: var(--r-1); min-height: 1em; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* ------------------------------------------------------------ public: hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--s-7); align-items: center; padding: var(--s-8) 0 var(--s-7); }
.hero h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); line-height: 1.05; letter-spacing: -0.035em; margin-bottom: var(--s-4); max-width: 14ch; }
.hero p.lead { font-size: 1.2rem; color: var(--ink-2); max-width: 44ch; margin-bottom: var(--s-5); }
.hero .actions { gap: var(--s-3); }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; padding-top: var(--s-6); } }
/* the hall map: a grid of stands in the theme's colours, the one deliberate decorative element */
.hall { display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: 56px; gap: 10px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-3); box-shadow: var(--shadow-2); }
.hall .stand { border-radius: 10px; background: var(--surface-2); position: relative; overflow: hidden; }
.hall .stand::after { content: ""; position: absolute; left: 10px; bottom: 8px; width: 34%; height: 6px; border-radius: 3px; background: var(--line-2); }
.hall .stand--a { background: var(--accent); grid-column: span 2; grid-row: span 2; }
.hall .stand--a::after { background: rgba(255, 255, 255, .6); width: 50%; }
.hall .stand--w { background: var(--warm); }
.hall .stand--w::after { background: rgba(0, 0, 0, .18); }
.hall .stand--s { background: var(--accent-soft); }
.hall .stand--s::after { background: var(--accent); opacity: .5; }
.hall .stand--l { grid-column: span 2; }
.hall .stand--t { grid-row: span 2; }
.hall .aisle { grid-column: 1 / -1; height: 10px; border-radius: 5px; background: repeating-linear-gradient(90deg, var(--line) 0 18px, transparent 18px 28px); align-self: center; }
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4); margin: var(--s-6) 0; }
@media (max-width: 900px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }
.feature { padding: var(--s-5); border-radius: var(--r-2); background: var(--surface); border: 1px solid var(--line); }
.feature .ico-box { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-deep); display: grid; place-items: center; margin-bottom: var(--s-3); }
html[data-mode="dark"] .feature .ico-box { color: var(--accent); }
.feature .ico-box .ico { width: 22px; height: 22px; }
.feature h3 { margin-bottom: 6px; }
.feature p { margin: 0; color: var(--ink-2); }
.cta-band { margin: var(--s-7) 0 0; padding: var(--s-6); border-radius: var(--r-3); background: var(--ink); color: #fff; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-4); }
html[data-mode="dark"] .cta-band { background: var(--surface-3); color: var(--ink); }
.cta-band h2 { margin: 0 0 4px; }
.cta-band p { margin: 0; opacity: .8; }
.footer { border-top: 1px solid var(--line); padding: var(--s-6) var(--s-5); color: var(--ink-2); font-size: .9rem; }
.footer__inner { max-width: var(--max); margin: 0 auto; display: flex; flex-wrap: wrap; gap: var(--s-4); justify-content: space-between; }
.footer a { color: var(--ink-2); }

/* ------------------------------------------------------------ auth pages */
.auth { max-width: 460px; margin: var(--s-7) auto; }
.auth .card { padding: var(--s-6); }
.auth h1 { font-size: 1.6rem; }
.auth .alt { text-align: center; margin-top: var(--s-4); color: var(--ink-2); }

/* -------------------------------------------------- directory and product cards */
.filters { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: end; margin-bottom: var(--s-5); }
.filters .field { margin: 0; min-width: 180px; flex: 1; }
.filters .field--search { flex: 2; min-width: 240px; }
.co-card { display: flex; gap: var(--s-4); padding: var(--s-4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2); color: inherit; }
.co-card:hover { text-decoration: none; border-color: var(--line-2); box-shadow: var(--shadow-2); }
.co-card .logo { width: 56px; height: 56px; border-radius: 12px; object-fit: contain; background: var(--surface-2); flex: none; display: grid; place-items: center; font-weight: 800; color: var(--ink-2); }
.co-card__name { font-weight: 700; display: flex; align-items: center; gap: 6px; }
.co-card__tag { color: var(--ink-2); font-size: .9rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.co-card__meta { color: var(--ink-3); font-size: .85rem; margin-top: 6px; }
.co-card__body { flex: 1; min-width: 0; }
.co-card__tag + .co-card__meta, .co-card__meta + .co-card__tag { margin-top: 4px; }
.product-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2); overflow: hidden; color: inherit; }
.product-card:hover { text-decoration: none; border-color: var(--line-2); box-shadow: var(--shadow-2); }
.product-card__img { aspect-ratio: 4 / 3; background: var(--surface-2); display: grid; place-items: center; color: var(--ink-3); overflow: hidden; }
.product-card__img img { width: 100%; height: 100%; object-fit: cover; }
.product-card__body { padding: var(--s-3) var(--s-4) var(--s-4); display: grid; gap: 4px; }
.product-card__name { font-weight: 700; }
.product-card__sku { color: var(--ink-3); font-family: var(--mono); font-size: .8rem; }
.product-card__price { font-weight: 700; color: var(--accent); }
.load-more { display: flex; justify-content: center; margin-top: var(--s-5); }

/* ------------------------------------------------------ company stand page */
.stand-cover { height: 260px; background: linear-gradient(120deg, var(--accent) 0%, color-mix(in srgb, var(--accent) 55%, var(--warm)) 100%); background-size: cover; background-position: center; border-radius: 0 0 var(--r-3) var(--r-3); position: relative; }
.stand-cover.has-image { background-image: var(--cover); }
.stand-head { position: relative; z-index: 1; max-width: var(--max); margin: -64px auto 0; padding: 0 var(--s-5); display: flex; flex-wrap: wrap; gap: var(--s-4); align-items: flex-end; }
.nameplate { width: 128px; height: 128px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-2); display: grid; place-items: center; overflow: hidden; flex: none; font-size: 2rem; font-weight: 800; color: var(--accent); }
.nameplate img { width: 100%; height: 100%; object-fit: contain; padding: 12px; }
.stand-title { flex: 1; min-width: 240px; padding-bottom: 6px; }
.stand-title h1 { margin: 0 0 2px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stand-title .tagline { font-size: 1.1rem; color: var(--ink-2); margin: 0; }
.stand-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); padding-bottom: 6px; }
.stand-strip { max-width: var(--max); margin: var(--s-4) auto 0; padding: 0 var(--s-5); display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); color: var(--ink-2); font-size: .95rem; }
.stand-strip span { display: inline-flex; align-items: center; gap: 6px; }
.stand-body { max-width: var(--max); margin: var(--s-5) auto 0; padding: 0 var(--s-5) var(--s-8); display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--s-5); align-items: start; }
.stand-main { min-width: 0; display: grid; gap: var(--s-5); }
.stand-side { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-4); min-width: 0; position: sticky; top: calc(var(--topbar-h) + 16px); overflow-wrap: anywhere; }
.stand-side .kv { grid-template-columns: max-content minmax(0, 1fr); }
.stand-side .kv dd, .stand-side a { overflow-wrap: anywhere; word-break: break-word; }
.stand-side .card { padding: var(--s-4); }
.stand-compact { max-width: var(--max); margin: var(--s-4) auto 0; padding: 0 var(--s-5); display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; }
.stand-compact .nameplate { width: 56px; height: 56px; border-radius: 14px; font-size: 1.1rem; box-shadow: var(--shadow-1); }
.stand-compact h2 { margin: 0; font-size: 1.1rem; }
.stand-compact .muted { font-size: .9rem; }
.stand-compact .stand-actions { margin-left: auto; padding: 0; }
.how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4); margin: var(--s-6) 0; counter-reset: step; }
.how__step { position: relative; padding: var(--s-5) var(--s-5) var(--s-5) 72px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2); }
.how__step::before { counter-increment: step; content: counter(step); position: absolute; left: var(--s-5); top: var(--s-5); width: 36px; height: 36px; border-radius: 50%; background: var(--warm); color: var(--warm-ink); display: grid; place-items: center; font-weight: 800; }
.how__step h3 { margin-bottom: 4px; }
.how__step p { margin: 0; color: var(--ink-2); }
@media (max-width: 800px) { .how { grid-template-columns: 1fr; } }
.result-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s-3); margin-bottom: var(--s-4); color: var(--ink-2); }
.result-bar select { min-height: 40px; width: auto; }
.legal { max-width: 76ch; }
.legal h2 { margin-top: var(--s-6); }
.legal .notice { margin-top: var(--s-5); }
.stand-nav { display: flex; gap: 4px; flex-wrap: wrap; max-width: var(--max); margin: var(--s-4) auto 0; padding: 0 var(--s-5); }
.stand-nav a { padding: 8px 12px; border-radius: 999px; color: var(--ink-2); font-weight: 600; font-size: .9rem; border: 1px solid var(--line); }
.stand-nav a:hover { text-decoration: none; background: var(--surface-2); color: var(--ink); }
@media (max-width: 900px) {
  .stand-cover { height: 180px; border-radius: 0; }
  .stand-head { margin-top: -48px; }
  .nameplate { width: 96px; height: 96px; border-radius: 18px; }
  .stand-body { grid-template-columns: 1fr; }
  .stand-side { position: static; }
}
/* layouts (BF-7): the order and emphasis of sections */
body[data-layout="showcase"] .stand-cover { height: 360px; }
body[data-layout="showcase"] .stand-main { grid-template-columns: 1fr; }
body[data-layout="showcase"] .stand-main > [data-section="showrooms"] { order: -2; }
body[data-layout="showcase"] .stand-main > [data-section="presentations"] { order: -1; }
body[data-layout="catalogue"] .stand-body { grid-template-columns: 260px minmax(0, 1fr); }
body[data-layout="catalogue"] .stand-side { order: -1; }
body[data-layout="catalogue"] .stand-main > [data-section="lines"] { order: -2; }
body[data-layout="catalogue"] .stand-main > [data-section="products"] { order: -1; }
body[data-layout="catalogue"] .stand-cover { height: 160px; }
body[data-layout="magazine"] .stand-main > [data-section="posts"] { order: -2; }
body[data-layout="magazine"] .stand-main > [data-section="manuals"] { order: -1; }
body[data-layout="magazine"] .stand-main .post-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
body[data-layout="magazine"] .stand-cover { height: 200px; }
@media (max-width: 900px) { body[data-layout="catalogue"] .stand-body { grid-template-columns: 1fr; } body[data-layout="showcase"] .stand-cover { height: 220px; } }
.line-list { display: grid; gap: 8px; }
.line-list a { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-radius: var(--r-1); background: var(--surface-2); color: var(--ink); font-weight: 600; }
.line-list a:hover { background: var(--accent-soft); text-decoration: none; }
.line-list a[aria-current="true"] { background: var(--accent); color: var(--accent-ink); }
.line-list .n { font-weight: 500; color: var(--ink-2); font-size: .85rem; }
.line-list a[aria-current="true"] .n { color: inherit; opacity: .85; }
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--s-4); }
.post-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2); overflow: hidden; color: inherit; }
.post-card:hover { text-decoration: none; box-shadow: var(--shadow-2); }
.post-card__img { aspect-ratio: 16 / 9; background: var(--surface-2); object-fit: cover; width: 100%; }
.post-card__body { padding: var(--s-4); }
.post-card__title { font-weight: 700; margin-bottom: 4px; }
.post-card__sum { color: var(--ink-2); font-size: .9rem; }
.post-card__meta { color: var(--ink-3); font-size: .8rem; margin-top: 8px; }
.prose { max-width: 72ch; line-height: 1.65; }
.prose h2 { margin-top: var(--s-5); }
.prose img { border-radius: var(--r-2); }
.prose pre { background: var(--surface-2); padding: var(--s-4); border-radius: var(--r-1); overflow-x: auto; }
.prose blockquote { margin: var(--s-4) 0; padding: 4px var(--s-4); border-left: 4px solid var(--accent); color: var(--ink-2); }
.prose table { border-collapse: collapse; }
.prose td, .prose th { border: 1px solid var(--line); padding: 6px 10px; }

/* ------------------------------------------------------ product detail page */
.product-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-5); align-items: start; }
@media (max-width: 800px) { .product-hero { grid-template-columns: 1fr; } }
.gallery { display: grid; gap: 8px; }
.gallery__main { aspect-ratio: 4 / 3; border-radius: var(--r-2); background: var(--surface-2); overflow: hidden; display: grid; place-items: center; }
.gallery__main img, .gallery__main video { width: 100%; height: 100%; object-fit: contain; }
.gallery__thumbs { display: flex; gap: 8px; overflow-x: auto; }
.gallery__thumbs button { width: 64px; height: 64px; border-radius: 8px; border: 2px solid transparent; padding: 0; background: var(--surface-2); overflow: hidden; cursor: pointer; flex: none; }
.gallery__thumbs button[aria-pressed="true"] { border-color: var(--accent); }
.gallery__thumbs img { width: 100%; height: 100%; object-fit: cover; }
.spec-table th { width: 40%; color: var(--ink-2); font-weight: 600; }
.price-box { padding: var(--s-4); border-radius: var(--r-2); background: var(--accent-soft); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3); }
.price-box .price { font-size: 1.5rem; font-weight: 800; color: var(--accent-deep); }
html[data-mode="dark"] .price-box .price { color: var(--accent); }

/* ------------------------------------------------------------- showrooms */
.showroom-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--s-4); }
.showroom-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2); overflow: hidden; }
.showroom-item--wide { grid-column: span 2; }
.showroom-item__media { aspect-ratio: 16 / 10; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; }
.showroom-item__media img, .showroom-item__media video { width: 100%; height: 100%; object-fit: cover; }
.showroom-item__body { padding: var(--s-4); }
.showroom-item--text { background: var(--accent-soft); border-color: transparent; }
.showroom-item--text .showroom-item__body { padding: var(--s-5); }
.booth { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-3); background: radial-gradient(ellipse at 50% 0%, var(--surface) 0%, var(--surface-2) 60%, var(--surface-3) 100%); border: 1px solid var(--line); overflow: hidden; }
.booth::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 28%; background: linear-gradient(180deg, transparent, var(--line)); opacity: .6; }
.booth .hotspot { position: absolute; transform: translate(-50%, -50%); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2); padding: 6px; box-shadow: var(--shadow-2); width: 18%; min-width: 96px; cursor: pointer; text-align: left; font: inherit; color: inherit; }
.booth .hotspot img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; display: block; }
.booth .hotspot span { display: block; font-size: .8rem; font-weight: 600; padding: 4px 2px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.booth .hotspot:hover, .booth .hotspot[aria-expanded="true"] { border-color: var(--accent); }
.booth-detail { margin-top: var(--s-4); }
.tour { display: grid; gap: var(--s-4); }
.tour__stop { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: var(--s-4); align-items: start; }
.tour__num { width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 800; font-size: 1.1rem; position: relative; }
.tour__stop:not(:last-child) .tour__num::after { content: ""; position: absolute; top: 56px; left: 27px; width: 2px; height: calc(100% + 16px); background: var(--line-2); }
.tour__media { border-radius: var(--r-2); overflow: hidden; background: var(--surface-2); margin-top: var(--s-3); }
.tour__media img, .tour__media video { width: 100%; display: block; }

/* --------------------------------------------------- presentations / agenda */
.agenda { display: grid; gap: var(--s-3); }
.agenda__item { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: var(--s-4); align-items: center; padding: var(--s-4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2); }
.agenda__date { text-align: center; border-right: 1px solid var(--line); padding-right: var(--s-3); }
.agenda__date .d { font-size: 1.6rem; font-weight: 800; line-height: 1; letter-spacing: -0.03em; }
.agenda__date .m { color: var(--ink-2); font-size: .85rem; }
.agenda__date .t { color: var(--accent); font-weight: 700; font-size: .9rem; margin-top: 4px; }
.agenda__item.is-live { border-color: var(--warm); }
@media (max-width: 640px) { .agenda__item { grid-template-columns: 72px minmax(0, 1fr); } .agenda__item > .actions { grid-column: 1 / -1; } }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.slots button { padding: 10px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface); font: inherit; font-weight: 600; cursor: pointer; }
.slots button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* ------------------------------------------------------------- inbox / chat */
.inbox { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: var(--s-4); align-items: start; }
@media (max-width: 860px) { .inbox { grid-template-columns: 1fr; } }
.messages { display: grid; gap: var(--s-3); padding: var(--s-4); background: var(--surface-2); border-radius: var(--r-2); max-height: 60vh; overflow-y: auto; }
.msg { max-width: 78%; padding: 10px 14px; border-radius: 14px 14px 14px 4px; background: var(--surface); border: 1px solid var(--line); }
.msg--ours { margin-left: auto; border-radius: 14px 14px 4px 14px; background: var(--accent-soft); border-color: transparent; }
.msg__meta { font-size: .78rem; color: var(--ink-3); margin-bottom: 2px; }
.msg__body { white-space: pre-wrap; }
.composer { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-2); margin-top: var(--s-3); align-items: end; }
.composer textarea { min-height: 56px; }

/* --------------------------------------------------------- RFQ / timeline */
.timeline { list-style: none; margin: 0; padding: 0 0 0 20px; border-left: 2px solid var(--line-2); display: grid; gap: var(--s-3); }
.timeline li { position: relative; }
.timeline li::before { content: ""; position: absolute; left: -26px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.timeline li.is-muted::before { background: var(--line-2); }
.timeline li.is-error::before { background: var(--danger); }
.timeline .when { color: var(--ink-3); font-size: .8rem; }
.status-flow { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.status-flow .step { padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--ink-3); font-size: .8rem; font-weight: 600; }
.status-flow .step.is-done { background: var(--ok-soft); color: var(--ok); }
.status-flow .step.is-current { background: var(--accent); color: var(--accent-ink); }
.total-row td { font-weight: 800; border-top: 2px solid var(--line-2); }
.kanban { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--s-4); }
.kanban__col h3 { display: flex; justify-content: space-between; font-size: .95rem; color: var(--ink-2); }
.kanban__col .card { padding: var(--s-4); margin-bottom: var(--s-3); }

/* ------------------------------------------------------------ network */
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--s-3); }
.feed-item { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: var(--s-3); padding: var(--s-4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2); }
.feed-item .logo { width: 48px; height: 48px; border-radius: 12px; object-fit: contain; background: var(--surface-2); }
.feed-item__who { font-weight: 700; }
.feed-item__when { color: var(--ink-3); font-size: .8rem; }

/* --------------------------------------------------------- charts (small) */
.chart { display: flex; align-items: flex-end; gap: 3px; height: 120px; padding: 8px 0; }
.chart__bar { flex: 1; background: var(--accent); border-radius: 3px 3px 0 0; min-height: 2px; opacity: .85; position: relative; }
.chart__bar:hover { opacity: 1; }
.chart__bar[title] { cursor: default; }
.chart__axis { display: flex; justify-content: space-between; color: var(--ink-3); font-size: .75rem; }

/* ------------------------------------------------------------- appearance */
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: var(--s-3); }
.theme-swatch { border: 2px solid var(--line); border-radius: var(--r-2); padding: 10px; cursor: pointer; background: var(--surface); text-align: left; font: inherit; }
.theme-swatch[aria-pressed="true"] { border-color: var(--accent); }
.theme-swatch .sw { height: 44px; border-radius: 8px; margin-bottom: 8px; display: grid; grid-template-columns: 1fr 1fr 1fr; overflow: hidden; }
.theme-swatch .sw i { display: block; }
.layout-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: var(--s-3); }
.layout-swatch { border: 2px solid var(--line); border-radius: var(--r-2); padding: 10px; cursor: pointer; background: var(--surface); font: inherit; text-align: left; }
.layout-swatch[aria-pressed="true"] { border-color: var(--accent); }
.layout-swatch .wire { height: 80px; border-radius: 6px; background: var(--surface-2); margin-bottom: 8px; display: grid; gap: 4px; padding: 6px; }
.layout-swatch .wire i { display: block; background: var(--line-2); border-radius: 2px; }
.layout-swatch .wire--classic { grid-template-rows: 18px 1fr 1fr; }
.layout-swatch .wire--showcase { grid-template-rows: 40px 1fr; }
.layout-swatch .wire--catalogue { grid-template-columns: 24px 1fr; grid-template-rows: 1fr 1fr; }
.layout-swatch .wire--magazine { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }

/* ------------------------------------------------------------- utilities */
.mt-0 { margin-top: 0 !important; } .mt-2 { margin-top: var(--s-2); } .mt-3 { margin-top: var(--s-3); } .mt-4 { margin-top: var(--s-4); } .mt-5 { margin-top: var(--s-5); } .mt-6 { margin-top: var(--s-6); }
.mb-0 { margin-bottom: 0 !important; } .mb-2 { margin-bottom: var(--s-2); } .mb-3 { margin-bottom: var(--s-3); } .mb-4 { margin-bottom: var(--s-4); } .mb-5 { margin-bottom: var(--s-5); }
.w-100 { width: 100%; } .flex-1 { flex: 1; min-width: 0; }
.thumb-sm { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; background: var(--surface-2); }
.thumb-md { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; background: var(--surface-2); }
.media-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: var(--s-2); }
.media-tile { position: relative; border-radius: var(--r-1); overflow: hidden; background: var(--surface-2); aspect-ratio: 1; border: 1px solid var(--line); }
.media-tile img { width: 100%; height: 100%; object-fit: cover; }
.media-tile .doc { display: grid; place-items: center; height: 100%; padding: 8px; font-size: .75rem; text-align: center; word-break: break-word; color: var(--ink-2); }
.media-tile .rm { position: absolute; top: 4px; right: 4px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.kv dt { color: var(--ink-2); font-weight: 600; }
.kv dd { margin: 0; }
.progress { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--accent); }
.secret { font-family: var(--mono); letter-spacing: .1em; }
.diff-from { color: var(--ink-3); text-decoration: line-through; }
.diff-to { color: var(--ok); font-weight: 600; }
.menu { position: absolute; right: 0; top: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2); box-shadow: var(--shadow-2); min-width: 220px; padding: 6px; z-index: 50; display: grid; }
.menu a, .menu button { text-align: left; padding: 10px 12px; border-radius: 8px; color: var(--ink); background: none; border: 0; font: inherit; cursor: pointer; }
.menu a:hover, .menu button:hover { background: var(--surface-2); text-decoration: none; }
.has-menu { position: relative; }
@media print { .topbar, .sidenav, .toasts, .btn, .stand-actions { display: none !important; } body { background: #fff; } }

/* ------------------------------------------------------- content editor (network-content module) */
.md-toolbar { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.md-editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-4); align-items: stretch; }
.md-editor textarea { min-height: 320px; font-family: var(--mono); font-size: .9rem; line-height: 1.5; resize: vertical; }
.md-preview { border: 1px solid var(--line); border-radius: var(--r-1); padding: var(--s-4); background: var(--surface-2); min-height: 320px; max-height: 70vh; overflow: auto; }
.md-preview img { max-width: 100%; height: auto; }
.prose img { max-width: 100%; height: auto; }
.prose pre code { white-space: pre; }
@media (max-width: 900px) { .md-editor { grid-template-columns: 1fr; } }

/* ------------------------------------------------------- product line page (public) */
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; font-weight: 700; color: var(--accent-deep); margin: 0 0 var(--s-2); }
.line-hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--s-5); align-items: stretch; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-3); overflow: hidden; }
.line-hero__media { background: var(--surface-2); display: grid; place-items: center; min-height: 260px; color: var(--ink-3); }
.line-hero__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.line-hero__body { padding: var(--s-5) var(--s-5) var(--s-5) 0; display: flex; flex-direction: column; gap: var(--s-2); }
.line-hero__body h1 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); line-height: 1.1; letter-spacing: -0.03em; margin-bottom: var(--s-2); }
.line-hero__body .lead { font-size: 1.1rem; color: var(--ink-2); margin: 0 0 var(--s-2); }
.highlights { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.highlights li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.4; }
.highlights .ico { flex: none; width: 20px; height: 20px; margin-top: 2px; padding: 3px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-deep); }
.line-hero__facts { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-2); }
.line-hero__facts .fact { display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font-size: .85rem; }
.line-hero__facts .fact strong { color: var(--ink); font-size: 1rem; }
.line-hero__facts .fact:hover { text-decoration: none; background: var(--accent-soft); color: var(--accent-deep); }
@media (max-width: 800px) { .line-hero { grid-template-columns: 1fr; } .line-hero__body { padding: 0 var(--s-4) var(--s-4); } .line-hero__media { min-height: 200px; aspect-ratio: 16 / 9; } }
.gallery__main--wide { aspect-ratio: 16 / 9; }
.gallery__zoom { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.gallery__zoom img { width: 100%; height: 100%; object-fit: contain; display: block; }
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--s-4); }
.video-card { margin: 0; background: var(--surface-2); border-radius: var(--r-2); overflow: hidden; }
.video-card video { width: 100%; aspect-ratio: 16 / 9; background: #000; display: block; }
.video-card figcaption { padding: var(--s-2) var(--s-3); font-size: .85rem; color: var(--ink-2); }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.other-lines .thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--surface-2); flex: none; display: inline-block; }
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(10, 14, 24, .92); display: grid; place-items: center; padding: var(--s-6); }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 2 * var(--s-6) - 40px); object-fit: contain; border-radius: var(--r-1); box-shadow: var(--shadow-2); }
.lightbox__close, .lightbox__nav { position: absolute; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .14); color: #fff; display: grid; place-items: center; cursor: pointer; }
.lightbox__close:hover, .lightbox__nav:hover { background: rgba(255, 255, 255, .28); }
.lightbox__close { top: var(--s-4); right: var(--s-4); }
.lightbox__nav { top: 50%; transform: translateY(-50%); }
.lightbox__nav--prev { left: var(--s-4); }
.lightbox__nav--next { right: var(--s-4); }
.lightbox__caption { position: absolute; bottom: var(--s-4); left: 0; right: 0; text-align: center; color: #fff; font-size: .9rem; padding: 0 var(--s-6); }
.lightbox .ico { width: 22px; height: 22px; }
.cover-badge { position: absolute; left: 4px; top: 4px; }

/* ------------------------------------------------------- "about the company" sidebar card */
.co-about__tag { margin: var(--s-3) 0 0; font-weight: 600; color: var(--ink); }
.co-about__text { margin: var(--s-2) 0 0; color: var(--ink-2); font-size: .9rem; line-height: 1.5; }
.co-about__facts { margin-top: var(--s-3); padding-top: var(--s-3); border-top: 1px solid var(--line); font-size: .9rem; gap: 4px 12px; }
.co-about__facts dt { font-weight: 500; color: var(--ink-3); }
.co-about__more { display: inline-block; margin-top: var(--s-3); font-weight: 600; }

/* ------------------------------------------------------- directory: extended cards, grid (2 columns) or list */
.co-card--rich .co-card__desc { color: var(--ink-2); font-size: .9rem; line-height: 1.45; margin-top: 8px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.co-card--rich .co-card__addr { display: flex; gap: 6px; align-items: flex-start; color: var(--ink-3); font-size: .85rem; margin-top: 8px; }
.co-card--rich .co-card__addr .ico { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.co-card__facts { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--ink-2); font-size: .85rem; }
.co-card__facts strong { color: var(--ink); }
.co-grid { display: grid; gap: var(--s-4); }
.co-grid--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.co-grid--grid .co-card--rich { display: grid; grid-template-columns: 56px minmax(0, 1fr); grid-template-rows: 1fr auto; grid-template-areas: "logo body" "facts facts"; gap: var(--s-3) var(--s-4); }
.co-grid--grid .co-card--rich .logo { grid-area: logo; }
.co-grid--grid .co-card--rich .co-card__body { grid-area: body; }
.co-grid--grid .co-card--rich .co-card__facts { grid-area: facts; border-top: 1px solid var(--line); padding-top: var(--s-3); }
.co-grid--list { grid-template-columns: 1fr; gap: var(--s-2); }
.co-grid--list .co-card--rich { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; grid-template-areas: "logo body facts"; align-items: center; gap: var(--s-2) var(--s-4); padding: var(--s-3) var(--s-4); }
.co-grid--list .co-card--rich .logo { grid-area: logo; width: 48px; height: 48px; }
.co-grid--list .co-card--rich .co-card__body { grid-area: body; }
.co-grid--list .co-card--rich .co-card__facts { grid-area: facts; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; white-space: nowrap; }
.co-grid--list .co-card--rich .co-card__desc { display: none; }
.co-grid--list .co-card--rich .co-card__tag { -webkit-line-clamp: 1; margin-top: 2px; }
.co-grid--list .co-card--rich .co-card__addr { margin-top: 4px; }
.view-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin-left: auto; }
.view-toggle button { border: 0; background: var(--surface); color: var(--ink-3); padding: 6px 10px; cursor: pointer; display: grid; place-items: center; }
.view-toggle button + button { border-left: 1px solid var(--line); }
.view-toggle button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-deep); }
.view-toggle .ico { width: 18px; height: 18px; }
.result-bar .view-toggle + label { margin-left: var(--s-3); }
@media (max-width: 760px) {
  .co-grid--grid { grid-template-columns: 1fr; }
  .co-grid--list .co-card--rich { grid-template-columns: 48px minmax(0, 1fr); grid-template-areas: "logo body" "facts facts"; }
  .co-grid--list .co-card--rich .co-card__facts { flex-direction: row; align-items: center; text-align: left; white-space: normal; }
}

/* ------------------------------------------------------- RFQ lines: product type-ahead on the description */
.combo { position: relative; }
.combo__input { min-width: 260px; width: 100%; }
.combo-cell { width: 38%; }
.combo-cell .combo__sku { margin-top: 4px; }
.combo__list { position: fixed; z-index: 120; margin: 0; padding: 6px; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2); box-shadow: var(--shadow-2); max-height: 320px; overflow: auto; }
.combo__list[hidden] { display: none; }
.combo__item { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.combo__item[aria-selected="true"], .combo__item:hover { background: var(--accent-soft); }
.combo__name { font-weight: 600; }
.combo__meta { color: var(--ink-3); font-size: .8rem; }
.combo__empty { padding: 10px 12px; color: var(--ink-3); font-size: .9rem; }

/* ------------------------------------------------------- inbox: three panes (conversations, messages, context) */
/* The inbox uses the full window: the shell is wider than on other pages and the panes scroll on their own, so the
   list, the composer and the context stay in view. The centre pane is the widest. Up to 1240px the context is a
   drawer behind "Details"; up to 1100px one pane shows at a time (data-view on .inbox3: list | thread); up to
   900px, where the side navigation moves on top, the page scrolls and only the open conversation is window-high. */
body[data-page="inbox"] .shell, body[data-page="inbox"] .topbar__inner { max-width: 1840px; }
.inbox3 { position: relative; display: grid; grid-template-columns: minmax(250px, 1fr) minmax(0, 2.2fr) minmax(250px, 1fr); gap: var(--s-4); min-height: 480px; }
.inbox3 > .card { margin-top: 0; padding: 0; }
.inbox3__pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; }
.inbox3__head { flex: none; display: flex; align-items: center; gap: var(--s-3); min-height: 72px; padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--line); }
.inbox3__head h2 { margin: 0; font-size: 1.125rem; line-height: 1.3; overflow-wrap: anywhere; }
.inbox3__head h2:focus { outline: none; }
.inbox3__head > .badge { margin-left: auto; flex: none; text-transform: uppercase; letter-spacing: .05em; font-size: .7rem; }
.inbox3__sub { margin: 2px 0 0; color: var(--ink-2); font-size: .88rem; }
.inbox3__search { flex: none; padding: var(--s-3) var(--s-4) 0; }
.inbox3__search input { border-radius: 999px; padding-left: 16px; background: var(--surface-2); border-color: transparent; }
.inbox3__search input:focus { background: var(--surface); }
.inbox3__scroll { flex: 1; min-height: 0; overflow-y: auto; padding: var(--s-3) var(--s-4) var(--s-4); }
.inbox3__scroll .load-more { margin-top: var(--s-3); }
.inbox3__hint { margin: var(--s-3) 0 0; }
.inbox3__blank { flex: 1; display: grid; place-items: center; padding: var(--s-6); text-align: center; color: var(--ink-2); }
.inbox3__blank .ico { width: 44px; height: 44px; margin-bottom: var(--s-3); opacity: .45; }
.inbox3__blank p { margin: 0; max-width: 32ch; }
.inbox3__open { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.inbox3__open[hidden], .inbox3__blank[hidden] { display: none; }
.inbox3__back, .inbox3__details, .inbox3__close { display: none; flex: none; }
.inbox3__composer { flex: none; border-top: 1px solid var(--line); padding: var(--s-3) var(--s-4) var(--s-4); }
.inbox3__composer .composer { margin-top: 0; }
.inbox3__composer .hint { margin-top: 6px; }
.inbox3 .messages { flex: 1; min-height: 0; max-height: none; border-radius: 0; align-content: start; padding: var(--s-4) var(--s-5); }
.inbox3 .msg { justify-self: start; min-width: 180px; max-width: min(78%, 640px); padding: 10px 14px 12px; box-shadow: var(--shadow-1); }
.inbox3 .msg--ours { justify-self: end; margin-left: 0; box-shadow: none; }
.inbox3 .msg__meta { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-4); margin-bottom: 4px; }
.msg__author { font-weight: 600; color: var(--ink-2); }
.msg-day { justify-self: center; padding: 2px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-3); font-size: .75rem; font-weight: 600; }
.messages .empty-note { margin: 0; text-align: center; }

.thread-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.thread-list__empty .empty { padding: var(--s-6) var(--s-2); }
.thread-card { display: block; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-2); background: var(--surface); color: var(--ink); }
.thread-card:hover { background: var(--surface-2); border-color: var(--line-2); text-decoration: none; }
.thread-card[aria-current="true"] { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); box-shadow: inset 3px 0 0 var(--accent); }
.thread-card__top { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); margin-bottom: 6px; }
.thread-card__top .badge { text-transform: uppercase; letter-spacing: .05em; font-size: .68rem; }
.thread-card[aria-current="true"] .badge:not(.badge--warm):not(.badge--ok) { background: var(--surface); }
.thread-card__time { color: var(--ink-3); font-size: .78rem; white-space: nowrap; }
.thread-card__subject { font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.thread-card--unread .thread-card__subject { font-weight: 800; }
.thread-card__with { display: flex; align-items: center; gap: var(--s-2); margin-top: 6px; color: var(--ink-2); font-size: .85rem; font-weight: 600; }
.thread-card__with .flex-1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-card__logo { flex: none; width: 22px; height: 22px; border-radius: 6px; object-fit: cover; background: var(--surface-2); font-size: .6rem; }
.thread-card__preview { margin-top: 4px; color: var(--ink-2); font-size: .88rem; line-height: 1.4; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }

.inbox3__context .inbox3__scroll { padding: 0; }
.inbox3__context .inbox3__hint { padding: 0 var(--s-4); }
.ctx { padding: var(--s-4); border-bottom: 1px solid var(--line); }
.ctx:last-child { border-bottom: 0; }
.ctx__label { margin: 0 0 var(--s-3); color: var(--ink-3); font-size: .72rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.ctx__note { margin: var(--s-3) 0 0; color: var(--ink-2); font-size: .88rem; }
.ctx .kv { margin-top: var(--s-3); font-size: .92rem; }
.ctx .kv dd { overflow-wrap: anywhere; }
.ctx .btn { margin-top: var(--s-3); }
.ctx-company { display: flex; gap: var(--s-3); align-items: flex-start; }
.ctx-company__logo { flex: none; width: 56px; height: 56px; border-radius: 12px; object-fit: cover; background: var(--surface-2); font-size: 1.05rem; }
.ctx-company__name { font-weight: 700; font-size: 1.05rem; line-height: 1.3; overflow-wrap: anywhere; }
.ctx-company .badge { margin-top: 4px; }
.ctx-company__tagline { margin: 6px 0 0; color: var(--ink-2); font-size: .9rem; }
.ctx-item { border: 1px solid var(--line); border-radius: var(--r-2); background: var(--surface-2); overflow: hidden; }
.ctx-item__img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--surface-3); }
.ctx-item__body { padding: var(--s-3) var(--s-4) var(--s-4); }
.ctx-item__type { color: var(--accent-deep); font-size: .72rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
html[data-mode="dark"] .ctx-item__type { color: var(--accent); }
.ctx-item__title { margin-top: 2px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.ctx-item__code { color: var(--ink-2); font-size: .88rem; }
.ctx-item__text { margin: 6px 0 0; color: var(--ink-2); font-size: .9rem; }

@media (min-width: 901px) {
  body[data-page="inbox"] main.app { display: flex; flex-direction: column; height: calc(100vh - var(--topbar-h)); min-height: 720px; padding-bottom: var(--s-5); }
  body[data-page="inbox"] .inbox3 { flex: 1; min-height: 0; }
}
@media (max-height: 820px) {      /* short windows: the room goes to the messages */
  body[data-page="inbox"] .page-head { margin-bottom: var(--s-4); }
  body[data-page="inbox"] .page-head p, .inbox3__composer .hint { display: none; }
}
@media (max-width: 1240px) {
  .inbox3 { grid-template-columns: minmax(240px, 320px) minmax(0, 1fr); }
  .inbox3__details, .inbox3__close { display: inline-flex; }
  .inbox3__head > .inbox3__close { margin-left: auto; }
  .inbox3__head > .badge + .inbox3__close { margin-left: 0; }
  .inbox3__thread .inbox3__head { flex-wrap: wrap; row-gap: var(--s-2); }
  .inbox3__thread .inbox3__head > .flex-1 { order: 1; flex-basis: 100%; }
  .inbox3__thread .inbox3__head > .badge { margin-left: 0; margin-right: auto; }
  .inbox3__context { display: none; position: absolute; top: 0; right: 0; bottom: 0; z-index: 5; width: min(360px, 100%); box-shadow: var(--shadow-2); }
  .inbox3[data-details="open"] .inbox3__context { display: flex; }
}
@media (max-width: 1100px) {
  .inbox3 { grid-template-columns: minmax(0, 1fr); }
  .inbox3[data-view="list"] .inbox3__thread, .inbox3[data-view="thread"] .inbox3__list { display: none; }
  .inbox3__back { display: inline-flex; }
  .inbox3__back span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
}
@media (max-width: 900px) {
  .inbox3 { min-height: 0; }
  .inbox3__thread { height: calc(100vh - var(--topbar-h) - var(--s-4)); min-height: 420px; }
  .inbox3__list .inbox3__scroll { overflow: visible; }
  .inbox3 .messages { padding: var(--s-3); }
  .inbox3 .msg { max-width: 88%; }
}
