/* ==========================================================================
   Design Tokens & Themes
   ========================================================================== */

:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --ink: #17212f;
  --muted: #647083;
  --line: #d7dde5;
  --accent: #116466;
  --accent-strong: #0b4b4d;
  --accent-alt: #b08a2e;
  --accent-soft: #e8f2f2;
  --accent-contrast: #ffffff;
  --topbar-bg: rgba(255, 255, 255, 0.96);
  --footer-bg: rgba(255, 255, 255, 0.96);
  --warn: #945600;
  --gold: #b08a2e;
  --gold-soft: rgba(176, 138, 46, 0.16);
  --shadow: 0 12px 30px rgba(23, 33, 47, 0.06);
  --radius: 0;
  --radius-sm: 0;
  --radius-xs: 0;
  --footer-height: 42px;
}

.theme-maritime {
  --bg: #f3f8fa;
  --surface: #ffffff;
  --ink: #132a36;
  --muted: #58717d;
  --line: #cbdde4;
  --accent: #00778b;
  --accent-strong: #005568;
  --accent-alt: #d87a1c;
  --accent-soft: #e2f2f5;
  --topbar-bg: rgba(255, 255, 255, 0.96);
  --footer-bg: rgba(255, 255, 255, 0.96);
  --warn: #9a5a00;
}

.theme-forest {
  --bg: #f4f8f3;
  --surface: #ffffff;
  --ink: #17251b;
  --muted: #637466;
  --line: #d4dfd2;
  --accent: #2f6f3e;
  --accent-strong: #245533;
  --accent-alt: #d5a51f;
  --accent-soft: #e6f1e5;
  --topbar-bg: rgba(255, 255, 255, 0.96);
  --footer-bg: rgba(255, 255, 255, 0.96);
  --warn: #8f5d00;
}

.theme-burgundy {
  --bg: #f7f2ed;
  --surface: #fffefa;
  --ink: #261417;
  --muted: #735f60;
  --line: #e5d8c8;
  --accent: #7b1f35;
  --accent-strong: #4e1120;
  --accent-alt: #b88a2c;
  --accent-soft: rgba(184, 138, 44, 0.16);
  --topbar-bg: rgba(255, 253, 248, 0.96);
  --footer-bg: rgba(255, 253, 248, 0.96);
  --warn: #a56b00;
  --gold: #b88a2c;
  --gold-soft: rgba(184, 138, 44, 0.16);
}

.theme-wine {
  --bg: #faf6f7;
  --surface: #ffffff;
  --ink: #2a1720;
  --muted: #755d67;
  --line: #e3d3d8;
  --accent: #8a2345;
  --accent-strong: #671936;
  --accent-alt: #c58a21;
  --accent-soft: #f2e5ea;
  --topbar-bg: rgba(255, 255, 255, 0.96);
  --footer-bg: rgba(255, 255, 255, 0.96);
  --warn: #8f5d00;
}

.theme-graphite {
  --bg: #f5f6f7;
  --surface: #ffffff;
  --ink: #15181d;
  --muted: #626b76;
  --line: #d2d8df;
  --accent: #3f5468;
  --accent-strong: #263746;
  --accent-alt: #b8762a;
  --accent-soft: #e8edf2;
  --topbar-bg: rgba(255, 255, 255, 0.96);
  --footer-bg: rgba(255, 255, 255, 0.96);
  --warn: #915f00;
}

.theme-graphite-light {
  --bg: #f3f5f8;
  --surface: #ffffff;
  --ink: #18202a;
  --muted: #647182;
  --line: #d4dbe5;
  --accent: #42556d;
  --accent-strong: #2b3b50;
  --accent-alt: #b7782f;
  --accent-soft: #e7edf4;
  --topbar-bg: rgba(255, 255, 255, 0.96);
  --footer-bg: rgba(255, 255, 255, 0.96);
  --warn: #946000;
}

.theme-graphite-dark {
  color-scheme: dark;
  --bg: #14191f;
  --surface: #1d242c;
  --ink: #f4f7fb;
  --muted: #aeb9c8;
  --line: rgba(255, 255, 255, 0.12);
  --accent: #7f98b7;
  --accent-strong: #a8bdd7;
  --accent-alt: #f2bb5a;
  --accent-soft: rgba(127, 152, 183, 0.16);
  --accent-contrast: #10161d;
  --topbar-bg: rgba(24, 31, 39, 0.96);
  --footer-bg: rgba(24, 31, 39, 0.96);
  --warn: #f2bb5a;
  --shadow: 0 16px 38px rgba(0, 0, 0, 0.26);
}

.theme-ocean-light {
  --bg: #f1f7fb;
  --surface: #ffffff;
  --ink: #102737;
  --muted: #567184;
  --line: #cfe0ea;
  --accent: #0b7294;
  --accent-strong: #074f69;
  --accent-alt: #e07a22;
  --accent-soft: #e2f0f7;
  --topbar-bg: rgba(255, 255, 255, 0.96);
  --footer-bg: rgba(255, 255, 255, 0.96);
  --warn: #9b6200;
}

.theme-ocean-dark {
  color-scheme: dark;
  --bg: #0f1d27;
  --surface: #162733;
  --ink: #f2f8fb;
  --muted: #a9c1cf;
  --line: rgba(255, 255, 255, 0.12);
  --accent: #33a6cf;
  --accent-strong: #6ac3e2;
  --accent-alt: #f0bd64;
  --accent-soft: rgba(51, 166, 207, 0.17);
  --accent-contrast: #071823;
  --topbar-bg: rgba(17, 31, 42, 0.96);
  --footer-bg: rgba(17, 31, 42, 0.96);
  --warn: #f0bd64;
  --shadow: 0 16px 38px rgba(0, 0, 0, 0.26);
}

.theme-forest-light {
  --bg: #f3f8f4;
  --surface: #ffffff;
  --ink: #17271b;
  --muted: #607565;
  --line: #d3dfd4;
  --accent: #2f7440;
  --accent-strong: #225630;
  --accent-alt: #d2a11e;
  --accent-soft: #e3efe5;
  --topbar-bg: rgba(255, 255, 255, 0.96);
  --footer-bg: rgba(255, 255, 255, 0.96);
  --warn: #8d6000;
}

.theme-forest-dark {
  color-scheme: dark;
  --bg: #121c15;
  --surface: #1a261d;
  --ink: #f2f8f2;
  --muted: #aec3b1;
  --line: rgba(255, 255, 255, 0.12);
  --accent: #56b26c;
  --accent-strong: #88cf98;
  --accent-alt: #eebd67;
  --accent-soft: rgba(86, 178, 108, 0.16);
  --accent-contrast: #08160c;
  --topbar-bg: rgba(21, 32, 24, 0.96);
  --footer-bg: rgba(21, 32, 24, 0.96);
  --warn: #eebd67;
  --shadow: 0 16px 38px rgba(0, 0, 0, 0.26);
}

.theme-ruby-light {
  --bg: #fbf3f5;
  --surface: #ffffff;
  --ink: #2c171d;
  --muted: #7a5f68;
  --line: #e6d3d8;
  --accent: #a22845;
  --accent-strong: #7a1d34;
  --accent-alt: #c98a1e;
  --accent-soft: #f5e4e9;
  --topbar-bg: rgba(255, 255, 255, 0.96);
  --footer-bg: rgba(255, 255, 255, 0.96);
  --warn: #985c00;
}

.theme-ruby-dark {
  color-scheme: dark;
  --bg: #1d1216;
  --surface: #28181d;
  --ink: #fbf3f5;
  --muted: #d1aebb;
  --line: rgba(255, 255, 255, 0.12);
  --accent: #e45779;
  --accent-strong: #f08ca4;
  --accent-alt: #f0b96a;
  --accent-soft: rgba(228, 87, 121, 0.17);
  --accent-contrast: #1c080f;
  --topbar-bg: rgba(31, 19, 23, 0.96);
  --footer-bg: rgba(31, 19, 23, 0.96);
  --warn: #f0b96a;
  --shadow: 0 16px 38px rgba(0, 0, 0, 0.28);
}

.theme-amber-light {
  --bg: #fcf8ef;
  --surface: #ffffff;
  --ink: #2a2113;
  --muted: #7b6950;
  --line: #eadfca;
  --accent: #b27416;
  --accent-strong: #88560e;
  --accent-alt: #426b8f;
  --accent-soft: #f6ecd7;
  --topbar-bg: rgba(255, 255, 255, 0.96);
  --footer-bg: rgba(255, 255, 255, 0.96);
  --warn: #8f5200;
}

.theme-amber-dark {
  color-scheme: dark;
  --bg: #1f1810;
  --surface: #2b2116;
  --ink: #fbf6ee;
  --muted: #d6c1a0;
  --line: rgba(255, 255, 255, 0.12);
  --accent: #efaf43;
  --accent-strong: #f7ca79;
  --accent-alt: #7f98b7;
  --accent-soft: rgba(239, 175, 67, 0.17);
  --accent-contrast: #1a1006;
  --topbar-bg: rgba(33, 25, 17, 0.96);
  --footer-bg: rgba(33, 25, 17, 0.96);
  --warn: #ffd28b;
  --shadow: 0 16px 38px rgba(0, 0, 0, 0.28);
}

.theme-plum-light {
  --bg: #f8f3f8;
  --surface: #ffffff;
  --ink: #28192d;
  --muted: #73627a;
  --line: #e2d8e6;
  --accent: #7b3f8f;
  --accent-strong: #5b2d6b;
  --accent-alt: #b27a21;
  --accent-soft: #efe4f3;
  --topbar-bg: rgba(255, 255, 255, 0.96);
  --footer-bg: rgba(255, 255, 255, 0.96);
  --warn: #946000;
}

.theme-plum-dark {
  color-scheme: dark;
  --bg: #18111c;
  --surface: #221728;
  --ink: #f9f3fb;
  --muted: #c7b1d1;
  --line: rgba(255, 255, 255, 0.12);
  --accent: #b671cc;
  --accent-strong: #d29ae0;
  --accent-alt: #efbf77;
  --accent-soft: rgba(182, 113, 204, 0.16);
  --accent-contrast: #17091d;
  --topbar-bg: rgba(24, 18, 29, 0.96);
  --footer-bg: rgba(24, 18, 29, 0.96);
  --warn: #efbf77;
  --shadow: 0 16px 38px rgba(0, 0, 0, 0.28);
}

.theme-platform-public {
  color-scheme: dark;
  --bg: #1b2737;
  --surface: #243246;
  --ink: #ffffff;
  --muted: #d6deea;
  --line: rgba(255, 255, 255, 0.2);
  --accent: #e2382d;
  --accent-strong: #ff5a47;
  --accent-alt: #ff9d5c;
  --accent-soft: rgba(226, 56, 45, 0.18);
  --accent-contrast: #111111;
  --topbar-bg: rgba(28, 40, 56, 0.96);
  --footer-bg: rgba(28, 40, 56, 0.96);
  --warn: #ff9d5c;
  --gold: #e2382d;
  --gold-soft: rgba(226, 56, 45, 0.18);
  --shadow: 0 16px 38px rgba(0, 0, 0, 0.22);
}

.corners-square {
  --radius: 0;
  --radius-sm: 0;
  --radius-xs: 0;
}

.corners-soft {
  --radius: 8px;
  --radius-sm: 6px;
  --radius-xs: 4px;
}

.corners-round {
  --radius: 18px;
  --radius-sm: 12px;
  --radius-xs: 8px;
}

/* ==========================================================================
   Base & Page Shell
   ========================================================================== */

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  --label: color-mix(in srgb, var(--ink) 72%, var(--muted));
  --field-bg: color-mix(in srgb, var(--surface) 88%, var(--bg));
  --field-border: color-mix(in srgb, var(--line) 84%, var(--ink) 16%);
  --field-placeholder: color-mix(in srgb, var(--muted) 72%, var(--ink));
  --button-bg: color-mix(in srgb, var(--surface) 92%, var(--bg));
  --button-hover-bg: color-mix(in srgb, var(--accent-soft) 42%, var(--surface));
  --chip-bg: color-mix(in srgb, var(--surface) 88%, var(--bg));
  --neutral-bg: color-mix(in srgb, var(--surface) 82%, var(--bg));
  --neutral-ink: color-mix(in srgb, var(--ink) 72%, var(--muted));
  --warning-bg: color-mix(in srgb, var(--warn) 12%, var(--surface));
  display: flex;
  flex-direction: column;
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color 140ms ease, background-color 140ms ease, border-color 140ms ease, text-decoration-color 140ms ease;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 12px 28px;
  background: var(--topbar-bg);
  border-bottom: 2px solid var(--accent);
  backdrop-filter: blur(10px);
}

.app-topbar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: stretch;
  padding: 12px 28px 10px;
}

.app-topbar-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-tools form {
  margin: 0;
}

.admin-workspace-switch {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.admin-workspace-switch form {
  display: flex;
  align-items: center;
  gap: 3px;
}

.workspace-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
  padding: 6px 9px;
  text-decoration: none;
  white-space: nowrap;
}

.workspace-button:hover {
  border-color: var(--line);
  color: var(--accent-strong);
}

.workspace-button.active {
  background: var(--accent-strong);
  color: var(--accent-contrast);
}

.workspace-button.secondary {
  border-color: var(--line);
  background: var(--surface);
}

.admin-organization-picker {
  position: relative;
  padding-left: 4px;
  border-left: 1px solid var(--line);
}

.admin-organization-picker summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
  list-style: none;
  padding: 7px 10px;
  white-space: nowrap;
}

.admin-organization-picker summary::-webkit-details-marker {
  display: none;
}

.admin-organization-picker summary::after {
  color: var(--muted);
  content: "▾";
  font-size: 10px;
  margin-left: 2px;
}

.admin-organization-picker[open] summary {
  border-color: var(--accent);
}

.admin-organization-picker summary span {
  color: var(--muted);
}

.admin-organization-picker summary strong {
  display: inline-block;
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}

.admin-organization-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 30;
  width: min(300px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 4px;
}

.admin-organization-menu form {
  display: block;
  margin: 0;
}

.admin-organization-menu button {
  display: block;
  width: 100%;
  border: 0;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  padding: 9px 10px;
  text-align: left;
}

.admin-organization-menu button:hover,
.admin-organization-menu button.active {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.app-nav {
  display: flex;
  flex-wrap: nowrap;
  gap: 3px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.app-nav a {
  flex: 0 0 auto;
  font-size: 13px;
  padding: 6px 8px;
}

@media (min-width: 901px) {
  .public-topbar,
  .internal-site .app-topbar {
    position: fixed;
    right: 0;
    left: 0;
  }

  .public-site .page {
    padding-top: 68px;
    padding-bottom: var(--footer-height);
  }

  .internal-site .page {
    padding-top: 104px;
    padding-bottom: calc(var(--footer-height) + 34px);
  }

  .public-site .site-footer,
  .internal-site .site-footer {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 10;
    background: var(--footer-bg);
    backdrop-filter: blur(10px);
  }

  .theme-burgundy .public-topbar {
    border-bottom-color: var(--gold);
  }

  .theme-burgundy.public-site .site-footer {
    border-top-color: var(--gold);
  }

  .theme-burgundy.internal-site .site-footer {
    border-top-color: var(--gold);
  }
}

@media (min-width: 901px) {
  .internal-site .page {
    padding-bottom: 28px;
  }

  .internal-site .site-footer {
    position: static;
    background: var(--footer-bg);
    backdrop-filter: none;
  }
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.brand {
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.public-brand img {
  display: block;
  max-width: 230px;
  max-height: 54px;
  object-fit: contain;
}

.public-brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
  white-space: normal;
}

.public-brand-name {
  max-width: 360px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.public-topbar {
  background: var(--topbar-bg);
}

.public-platform-site {
  --radius: 0;
  --radius-sm: 0;
  --radius-xs: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  background-attachment: fixed;
}

.public-platform-site .page {
  background: transparent;
}

.public-platform-site .public-topbar {
  position: fixed;
  border-bottom: 0;
  background: var(--topbar-bg);
  justify-content: flex-start;
  padding-left: 22px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
}

.public-platform-site .public-topbar::after {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  content: "";
  pointer-events: none;
}

.public-platform-site .brand,
.public-platform-site h1,
.public-platform-site h2,
.public-platform-site h3,
.public-platform-site strong {
  color: var(--ink);
}

.public-platform-site nav a {
  color: var(--muted);
}

.public-platform-site .public-nav a,
.public-platform-site .public-mobile-nav a {
  background: transparent;
  transition: color 140ms ease;
}

.public-platform-site .public-nav a.active,
.public-platform-site .public-nav a:hover,
.public-platform-site .public-mobile-nav a.active,
.public-platform-site .public-mobile-nav a:hover {
  background: transparent;
  color: var(--accent-strong);
}

.public-platform-site .public-nav a.active,
.public-platform-site .public-mobile-nav a.active {
  font-weight: 900;
}

.public-platform-site .site-footer {
  position: relative;
  border-top: 0;
  background: var(--footer-bg);
  box-shadow: 0 -12px 32px rgba(0, 0, 0, 0.12);
}

@media (min-width: 901px) {
  .public-platform-site .site-footer {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 10;
  }
}

.public-platform-site .site-footer::before {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 1px;
  background: var(--accent);
  content: "";
  pointer-events: none;
}

.public-platform-site .panel,
.public-platform-site .empty-state,
.public-platform-site .public-catalog-list,
.public-platform-site .catalog-status article,
.public-platform-site .info-accordion details {
  background: color-mix(in srgb, var(--surface) 88%, var(--bg));
  border-color: var(--line);
}

.public-platform-site .public-organization-card {
  border-color: color-mix(in srgb, var(--gold) 62%, var(--line));
  background: color-mix(in srgb, var(--surface) 92%, var(--bg) 8%);
}

.public-platform-site .public-organization-card:hover {
  border-color: var(--gold);
  background: color-mix(in srgb, var(--surface) 86%, var(--accent-soft) 14%);
}

.public-platform-site input,
.public-platform-site textarea,
.public-platform-site select {
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--ink);
}

.public-platform-site input:focus,
.public-platform-site textarea:focus,
.public-platform-site select:focus {
  border-color: color-mix(in srgb, var(--accent) 68%, #ffffff);
  outline: 3px solid rgba(226, 56, 45, 0.16);
}

.public-platform-site .button.primary {
  color: var(--accent-contrast);
}

.public-organization-site {
  background: var(--bg);
  background-attachment: fixed;
}

.public-organization-site .public-topbar {
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 26%, var(--line));
  background: var(--topbar-bg);
  box-shadow: 0 14px 34px color-mix(in srgb, var(--accent) 8%, rgba(0, 0, 0, 0.1));
}

.public-organization-site .public-topbar::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--accent-alt);
  content: "";
  pointer-events: none;
}

.public-organization-site .site-footer {
  border-top: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line));
  background: var(--footer-bg);
}

.public-organization-site .site-footer::before {
  background: var(--accent-alt);
}

.public-mobile-menu {
  display: none;
}

.public-mobile-menu summary {
  list-style: none;
}

.public-mobile-menu summary::-webkit-details-marker {
  display: none;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

nav a {
  border-radius: var(--radius-sm);
  color: var(--muted);
  padding: 8px 10px;
  text-decoration: none;
}

nav a.active,
nav a:hover {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

nav a.active {
  font-weight: 850;
}

.page p a:not(.button),
.page li a:not(.button),
.legal-text a,
.table-wrap a:not(.button) {
  color: var(--accent-strong);
  font-weight: 800;
  text-decoration-color: color-mix(in srgb, var(--accent) 42%, transparent);
}

.page p a:not(.button):hover,
.page li a:not(.button):hover,
.legal-text a:hover,
.table-wrap a:not(.button):hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}

.public-platform-site .page p a:not(.button),
.public-platform-site .page li a:not(.button),
.public-platform-site .legal-text a,
.public-platform-site .table-wrap a:not(.button) {
  color: var(--accent-strong);
}

.organization-public-nav {
  gap: 4px;
  margin-left: auto;
}

.organization-public-nav a {
  font-size: 14px;
  font-weight: 800;
  padding: 8px 9px;
}

.public-organization-site .public-nav a,
.public-organization-site .public-mobile-nav a,
.organization-public-nav a {
  background: transparent;
  border-radius: 0;
}

.public-organization-site .public-nav a.active,
.public-organization-site .public-nav a:hover,
.public-organization-site .public-mobile-nav a.active,
.public-organization-site .public-mobile-nav a:hover,
.organization-public-nav a.active,
.organization-public-nav a:hover {
  background: transparent;
  color: var(--accent-strong);
}

.public-organization-site .public-nav a.active,
.public-organization-site .public-mobile-nav a.active,
.organization-public-nav a.active {
  border-bottom: 2px solid var(--accent-alt);
  font-weight: 900;
}

.menu-lines {
  display: inline-grid;
  gap: 4px;
  width: 18px;
}

.menu-lines span {
  display: block;
  height: 2px;
  background: currentColor;
}

.theme-burgundy .eyebrow,
.theme-burgundy .public-stats strong {
  color: var(--gold);
}

.logout {
  margin-left: 0;
}

.topbar-tools .link-button {
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--muted);
  padding: 5px 7px;
}

.topbar-tools .link-button:hover {
  border-color: var(--line);
  background: color-mix(in srgb, var(--surface) 72%, var(--bg));
  color: var(--accent-strong);
}

.link-button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  font-size: 13px;
  padding: 6px 0;
}

.link-button:hover {
  color: var(--accent-strong);
}

.link-button.quiet {
  color: var(--muted);
}

/* ==========================================================================
   Layout Primitives & Typography
   ========================================================================== */

.page {
  flex: 1 0 auto;
  width: min(1180px, calc(100vw - 40px));
  margin: 28px auto 60px;
}

.internal-site .page {
  width: min(1380px, calc(100vw - 56px));
  margin-top: 22px;
}

.page-lots .page {
  width: min(1240px, calc(100vw - 56px));
  margin-top: 18px;
}

.public-site .page {
  width: min(1180px, calc(100vw - 40px));
}

.public-platform-site .page {
  width: min(1500px, calc(100vw - 80px));
  margin-top: 14px;
}

h1,
h2 {
  margin: 0 0 12px;
  line-height: 1.12;
}

h1 {
  font-size: 28px;
}

h2 {
  font-size: 19px;
}

.hero,
.panel,
.stat,
.two-col > div,
.empty-state {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.internal-site .hero,
.internal-site .panel,
.internal-site .stat,
.internal-site .two-col > div,
.internal-site .empty-state,
.internal-site .admin-dashboard-grid > div,
.internal-site .table-wrap {
  background: var(--neutral-bg);
  box-shadow: var(--shadow);
}

/* ==========================================================================
   Public Platform Pages
   ========================================================================== */

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 26px;
}

.index-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: start;
  max-width: 860px;
  min-height: 0;
  margin: 0 auto;
  padding: 54px 0 42px;
  text-align: left;
}

.index-hero h1 {
  max-width: 820px;
  font-size: 48px;
  margin-left: 0;
  margin-right: 0;
}

.index-hero .lead {
  max-width: 760px;
  margin-left: 0;
  margin-right: 0;
}

.index-proof {
  display: grid;
  gap: 14px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.index-proof p {
  color: var(--muted);
  margin: 0;
  max-width: 760px;
}

.index-stats {
  display: grid;
  gap: 10px;
}

.index-stats article {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: end;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}

.index-stats article:first-child {
  border-top: 1px solid var(--line);
}

.index-stats strong {
  color: var(--accent-strong);
  font-size: 42px;
  line-height: 0.95;
}

.index-stats span {
  color: var(--muted);
  font-weight: 850;
  padding-bottom: 4px;
}

.faq-section {
  display: grid;
  grid-template-columns: minmax(240px, 330px) minmax(0, 760px);
  gap: 64px;
  align-items: start;
  max-width: 1160px;
  margin: 0 0 32px;
  padding-top: 30px;
}

.section-intro {
  margin-bottom: 16px;
  text-align: center;
}

.section-intro h1 {
  font-size: 30px;
}

.faq-intro {
  max-width: none;
  margin: 0;
  text-align: left;
}

.faq-intro h1 {
  color: var(--gold);
  font-size: 22px;
  text-transform: uppercase;
}

.faq-intro p {
  max-width: 620px;
  margin: 0;
}

.faq-intro .muted {
  margin: 0;
  max-width: 620px;
}

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 34px;
  align-items: center;
  padding: 46px 0 22px;
}

.landing-hero h1 {
  max-width: 820px;
  font-size: 56px;
}

.lead {
  max-width: 760px;
  color: var(--muted);
  font-size: 19px;
  margin: 0 0 22px;
}

.landing-copy {
  min-width: 0;
}

.landing-preview,
.feature-grid article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.landing-preview {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.preview-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.preview-top strong {
  color: var(--accent-strong);
}

.preview-checklist {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.preview-checklist li {
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  background: var(--neutral-bg);
  border-radius: var(--radius-sm);
  padding: 12px;
}

.preview-checklist strong,
.preview-checklist span {
  display: block;
}

.preview-checklist span {
  color: var(--muted);
  margin-top: 4px;
}

.preview-image {
  display: grid;
  min-height: 190px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 850;
}

.preview-lines {
  display: grid;
  gap: 6px;
}

.preview-lines span {
  color: var(--muted);
}

.public-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 10px 0 24px;
}

.public-stats article {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 18px;
}

.public-stats strong,
.public-stats span {
  display: block;
}

.public-stats strong {
  color: var(--accent-strong);
  font-size: 34px;
  line-height: 1;
}

.public-stats span {
  color: var(--muted);
  font-weight: 800;
  margin-top: 8px;
}

.info-accordion {
  display: grid;
  gap: 9px;
  max-width: none;
  margin: 0;
}

.info-accordion details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: none;
  overflow: hidden;
}

.info-accordion details[open] {
  border-color: color-mix(in srgb, var(--accent) 28%, var(--line));
}

.info-accordion summary {
  cursor: pointer;
  color: var(--ink);
  font-size: 17px;
  font-weight: 850;
  list-style: none;
  padding: 14px 18px;
}

.info-accordion summary::-webkit-details-marker {
  display: none;
}

.info-accordion summary::after {
  content: "+";
  float: right;
  color: var(--accent-strong);
  font-weight: 900;
}

.info-accordion details[open] summary::after {
  content: "−";
}

.info-accordion p {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
  margin: 0;
  padding: 12px 18px 15px;
}

.catalog-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 32px;
  align-items: end;
  max-width: 1120px;
  margin: 0 auto 28px;
  padding: 38px 0 12px;
}

.public-simple-head {
  max-width: 760px;
  margin: 0 0 14px;
  padding-top: 10px;
}

.public-simple-head h1 {
  color: var(--gold);
  font-size: 17px;
  font-weight: 900;
  text-transform: uppercase;
}

.public-simple-head.compact {
  margin-bottom: 12px;
}

.public-simple-head p {
  color: var(--muted);
  margin: 0;
}

.catalog-overview h1 {
  font-size: 42px;
}

.catalog-overview .lead {
  margin-bottom: 0;
}

.public-platform-site .catalog-overview {
  grid-template-columns: minmax(0, 820px);
  justify-content: start;
  align-items: start;
  gap: 14px;
  margin-left: 0;
  margin-right: 0;
}

.public-overview-meta {
  border-left: 3px solid var(--accent);
  color: var(--accent-strong);
  font-size: 14px;
  font-weight: 850;
  margin: 18px 0 0;
  padding-left: 12px;
}

.public-platform-site .catalog-list-grid {
  grid-template-columns: minmax(0, 720px);
  justify-content: start;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
}

.public-platform-site .public-catalog-list {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.public-platform-site .catalog-list-head {
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
  padding-bottom: 12px;
}

.public-platform-site .compact-empty {
  display: block;
  min-height: auto;
  border: 1px solid var(--line);
  background: var(--neutral-bg);
  padding: 16px 18px;
  text-align: left;
}

.public-platform-site .info-accordion details {
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.public-platform-site .info-accordion details[open] {
  border-color: var(--line);
}

.public-platform-site .info-accordion summary {
  padding: 16px 0;
}

.public-platform-site .info-accordion p {
  border-top: 0;
  padding: 0 0 16px;
}

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

.catalog-status article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 16px;
}

.catalog-status strong,
.catalog-status span {
  display: block;
}

.catalog-status strong {
  color: var(--accent-strong);
  font-size: 34px;
  line-height: 1;
}

.catalog-status span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  margin-top: 6px;
}

.compact-flow {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.feature-grid article {
  padding: 22px;
}

.feature-grid p {
  color: var(--muted);
}

.public-flow {
  margin-top: 18px;
  padding: 24px 0 6px;
}

.public-flow h2 {
  margin-bottom: 14px;
}

.public-flow ol {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.public-flow li {
  min-width: 0;
  border-top: 3px solid var(--accent);
  background: var(--surface);
  padding: 14px 0 0;
}

.public-flow strong,
.public-flow span {
  display: block;
}

.public-flow span {
  color: var(--muted);
  margin-top: 5px;
}

/* ==========================================================================
   Public Legal Pages
   ========================================================================== */

.legal-page {
  width: min(900px, 100%);
  margin: 16px 0 48px;
  padding: 0;
}

.legal-page h1 {
  max-width: 760px;
  border-bottom: 1px solid var(--line);
  font-size: clamp(34px, 5vw, 48px);
  margin-bottom: 22px;
  padding-bottom: 16px;
}

.legal-page h2 {
  max-width: 760px;
  color: var(--accent-strong);
  font-size: 20px;
  margin-top: 28px;
}

.legal-page p {
  color: var(--muted);
  max-width: 720px;
  margin: 0 0 14px;
}

.legal-page p strong {
  color: var(--ink);
}

.legal-text {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

.public-platform-site .legal-page {
  width: min(860px, 100%);
  max-width: none;
  margin: 54px auto 48px;
}

.public-platform-site .legal-page h1 {
  position: relative;
  border-bottom: 0;
  max-width: none;
  margin-bottom: 28px;
  padding-bottom: 18px;
}

.public-platform-site .legal-page h1::after {
  position: absolute;
  bottom: 0;
  left: 0;
  width: min(148px, 36vw);
  height: 2px;
  background: var(--accent);
  content: "";
}

.public-platform-site .legal-page h2 {
  color: var(--accent-strong);
  max-width: none;
}

.public-platform-site .legal-page p {
  max-width: 760px;
}

/* ==========================================================================
   Public Organization Pages
   ========================================================================== */

.public-contact {
  margin-top: 0;
}

.public-links {
  border-top: 1px solid var(--line);
  margin-top: 22px;
  padding-top: 20px;
}

.public-profile {
  margin-top: 0;
  text-align: left;
}

.public-profile h2 {
  margin-bottom: 8px;
}

.public-profile p {
  color: var(--muted);
  margin: 0;
}

.public-contact h2 {
  margin-bottom: 8px;
}

.public-contact p {
  margin: 0 0 8px;
}

.public-contact-panel {
  display: grid;
  gap: 14px;
}

.public-contact-panel h2 {
  margin: 0;
}

.public-contact-person {
  display: grid;
  gap: 3px;
  border-left: 3px solid color-mix(in srgb, var(--accent) 62%, var(--line));
  padding-left: 12px;
}

.public-contact-person span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.public-contact-person strong {
  color: var(--ink);
  font-size: 17px;
}

.contact-links {
  display: grid;
  gap: 9px;
  align-items: start;
}

.contact-links a,
.contact-pill {
  display: flex;
  align-items: center;
  width: fit-content;
  min-height: 30px;
  border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--line));
  border-radius: 0;
  background: var(--chip-bg);
  color: var(--accent-strong);
  font-weight: 800;
  padding: 5px 9px;
  text-decoration: none;
}

.contact-links a:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent-soft) 72%, var(--surface) 28%);
  color: var(--accent);
}

.contact-pill {
  color: var(--muted);
}

.public-org-head {
  margin: 0 0 22px;
  max-width: none;
  border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--line));
  border-left: 4px solid var(--accent);
  background: color-mix(in srgb, var(--surface) 90%, var(--accent-soft) 10%);
  box-shadow: var(--shadow);
  padding: 18px 20px;
}

.public-org-title {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.public-org-title img {
  width: 112px;
  height: 112px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 12px;
}

.public-org-logo-placeholder {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 112px;
  height: 112px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 44px;
  font-weight: 900;
}

.public-org-title h1 {
  font-size: 42px;
}

.public-org-summary h1 {
  font-size: clamp(30px, 4vw, 42px);
}

.public-org-summary .muted {
  max-width: 720px;
  margin: 0;
}

.public-organization-site .public-org-summary h1,
.public-organization-site .public-org-title h1 {
  color: var(--accent-strong);
}

.public-org-counts {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  margin: 12px 0 0;
}

.public-section-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 1120px;
  border-top: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line));
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line));
  margin: 0 auto 22px;
  padding: 10px 0;
}

.public-section-nav a {
  border: 0;
  border-radius: 0;
  background: transparent;
  font-weight: 800;
  padding: 8px 11px;
  text-decoration: none;
}

.public-section-nav a.active,
.public-section-nav a:hover {
  background: transparent;
  color: var(--accent-strong);
}

.public-section-nav a.active {
  border-bottom: 2px solid var(--accent-alt);
  font-weight: 950;
}

.public-org-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 18px;
  max-width: 1120px;
  margin: 0 auto 32px;
}

.public-org-grid .public-profile,
.public-org-grid .public-contact {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}

.public-org-grid .public-links {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 16px;
}

.public-org-content {
  max-width: 840px;
  margin: 0 0 32px;
  background: transparent;
  padding: 0;
}

.public-org-content.compact {
  max-width: 820px;
}

.public-org-content .public-profile,
.public-org-content .public-contact {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}

.public-org-info-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 38px;
  align-items: start;
  max-width: 1120px;
  margin: 20px 0 34px;
}

.public-terms-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: 38px;
  align-items: start;
  max-width: 1120px;
  margin: 20px 0 34px;
}

.public-terms-main {
  min-width: 0;
}

.public-org-info-main,
.public-org-info-side {
  min-width: 0;
}

.public-org-info-main {
  padding-top: 0;
}

.public-org-info-side {
  display: grid;
  gap: 18px;
  border-left: 2px solid color-mix(in srgb, var(--accent-alt) 62%, var(--accent));
  padding-left: 26px;
}

.public-org-info-side .public-contact,
.public-org-info-side .public-links {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}

.public-org-info-side .public-links {
  border-bottom: 1px solid var(--line);
  border-top: 0;
  margin-top: 0;
  padding-bottom: 18px;
  padding-top: 0;
}

.public-org-info-side .public-contact-panel .contact-links {
  padding-top: 2px;
}

.public-org-info-side .public-contact-panel .contact-links a {
  width: min(100%, 270px);
}

.public-terms-side {
  align-self: start;
}

.public-note {
  border-left: 0;
  background: transparent;
  margin: 0;
  padding: 0;
}

.public-note strong,
.public-note p {
  display: block;
  margin: 0;
}

.public-note p {
  color: var(--muted);
  margin-top: 4px;
}

.public-organization-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 390px));
  gap: 12px;
  justify-content: start;
  max-width: 1160px;
  margin: 4px 0 34px;
}

.public-organization-list article {
  margin: 0;
}

.public-organization-card {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 74px;
  border: 1px solid color-mix(in srgb, var(--gold) 62%, var(--line));
  border-radius: 0;
  background: color-mix(in srgb, var(--surface) 86%, var(--accent-soft) 14%);
  padding: 10px 12px;
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.public-organization-card:hover {
  border-color: color-mix(in srgb, var(--accent) 72%, var(--gold));
  background: color-mix(in srgb, var(--surface) 72%, var(--accent-soft) 28%);
  box-shadow: 0 12px 28px color-mix(in srgb, var(--accent) 12%, rgba(0, 0, 0, 0.15));
  transform: translateY(-2px);
}

.public-organization-card.without-logo {
  grid-template-columns: 1fr;
}

.public-organization-logo {
  display: grid;
  align-self: start;
  width: 62px;
  height: 48px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--gold) 42%, var(--line));
  background: rgba(255, 255, 255, 0.94);
}

.public-organization-logo img {
  display: block;
  max-width: 54px;
  max-height: 38px;
  object-fit: contain;
}

.public-organization-main {
  display: grid;
  min-width: 0;
  align-content: start;
}

.public-organization-main strong {
  color: var(--ink);
  display: block;
  overflow: hidden;
  font-size: 17px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-terms {
  margin-top: 22px;
}

.public-terms-layout .public-terms {
  margin-top: 0;
}

.public-terms p,
.public-terms li {
  color: var(--muted);
  max-width: 920px;
  white-space: normal;
}

.public-terms h2,
.public-terms h3 {
  margin-top: 18px;
}

.public-terms-page {
  max-width: 1120px;
  margin: 0 0 38px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.public-terms-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 1100px;
  border-bottom: 1px solid var(--line);
  margin: 0 0 24px;
  padding: 0 0 14px;
}

.public-terms-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--line));
  border-radius: 0;
  color: var(--accent-strong);
  font-size: 14px;
  font-weight: 800;
  padding: 4px 8px;
  text-decoration: none;
}

.public-terms-nav a.is-sub {
  color: var(--muted);
  font-size: 13px;
}

.public-terms-nav a:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent-soft) 72%, var(--surface) 28%);
  color: var(--accent);
}

.public-terms-page p,
.public-terms-page li {
  max-width: none;
}

.public-terms-body {
  max-width: 1100px;
  column-count: 2;
  column-gap: 46px;
  column-rule: 1px solid color-mix(in srgb, var(--accent) 38%, var(--line));
}

.public-terms-layout .public-terms-body {
  column-count: 1;
  column-rule: 0;
}

.public-terms-body > * {
  break-inside: avoid;
}

.public-terms-body > :first-child {
  margin-top: 0;
}

.public-terms ul,
.public-terms ol {
  padding-left: 24px;
}

.public-terms blockquote {
  border-left: 4px solid var(--line);
  color: var(--muted);
  margin-left: 0;
  padding-left: 12px;
}

/* ==========================================================================
   Footer & Utility Text
   ========================================================================== */

.site-footer {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: var(--footer-height);
  border-top: 1px solid var(--accent);
  color: var(--muted);
  padding: 0 20px;
}

.site-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(1180px, 100%);
  min-height: var(--footer-height);
  line-height: 1;
}

.internal-site .site-footer-inner {
  width: min(1380px, 100%);
}

.site-footer nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 16px;
  width: auto;
}

.footer-copy {
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: auto;
  border: 0;
  border-bottom: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-size: 14px;
  font-weight: 650;
  line-height: 1;
  padding: 0;
  text-decoration: none;
}

.site-footer a:hover {
  background: transparent;
  border-bottom-color: transparent;
  color: var(--accent-strong);
}

.site-footer a.active,
.public-platform-site .site-footer a.active {
  background: transparent;
  border-bottom-color: transparent;
  color: var(--accent-strong);
  font-weight: 850;
}

.cookie-notice {
  position: fixed;
  right: 18px;
  bottom: 62px;
  z-index: 40;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  width: min(760px, calc(100vw - 36px));
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--surface) 94%, var(--bg));
  box-shadow: var(--shadow);
  padding: 14px 16px;
}

.cookie-notice p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.cookie-notice strong {
  color: var(--ink);
}

.cookie-notice-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.cookie-notice-actions a {
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.cookie-notice-actions button {
  min-height: 34px;
  border: 1px solid var(--accent);
  border-radius: var(--radius-xs);
  background: var(--accent);
  color: var(--accent-contrast, #ffffff);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  padding: 7px 12px;
}

.cookie-notice-actions button:hover {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.muted {
  color: var(--muted);
}

.warning {
  border-left: 4px solid var(--warn);
  color: var(--warn);
  margin: 0 0 14px;
  padding: 8px 12px;
  background: var(--warning-bg);
}

.warning-text {
  color: var(--warn);
  font-weight: 800;
}

.notice {
  border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--line));
  background: color-mix(in srgb, var(--surface) 92%, var(--accent-soft));
  border-radius: var(--radius);
  color: var(--accent-strong);
  font-size: 14px;
  margin-bottom: 14px;
  padding: 9px 11px;
}

/* ==========================================================================
   Internal App Shell & Dashboard
   ========================================================================== */

.context-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: -6px 0 12px;
}

.context-bar span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: color-mix(in srgb, var(--muted) 82%, var(--bg));
  font-size: 12px;
  font-weight: 650;
  padding: 2px 0;
}

.context-bar span + span::before {
  content: "/";
  color: var(--line);
  margin-right: 6px;
}

.page-lots .context-bar {
  display: none;
}

.auth-panel {
  display: grid;
  min-height: calc(100vh - 150px);
  place-items: center;
}

.auth-panel .panel {
  border-top: 4px solid var(--accent);
  width: min(100%, 460px);
}

.theme-burgundy .auth-panel .panel {
  border-top-color: var(--gold);
}

.public-platform-site .auth-panel {
  min-height: calc(100vh - 210px);
  align-content: center;
  justify-items: center;
  padding: 44px 0;
}

.public-platform-site .auth-form,
.public-platform-site .auth-panel .panel {
  position: relative;
  display: grid;
  gap: 16px;
  width: min(100%, 560px);
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  margin-inline: auto;
  padding: clamp(12px, 3vw, 22px) 0 0;
}

.public-platform-site .auth-form::before,
.public-platform-site .auth-panel .panel::before {
  position: absolute;
  top: 0;
  left: 0;
  width: min(156px, 34vw);
  height: 3px;
  background: var(--accent);
  content: "";
}

.public-platform-site .auth-panel h1 {
  font-size: clamp(30px, 3vw, 40px);
  margin-bottom: 4px;
}

.public-platform-site .auth-panel .muted {
  color: color-mix(in srgb, var(--muted) 88%, #ffffff);
  font-size: 17px;
  margin: 0 0 8px;
}

.public-platform-site .auth-panel label {
  display: grid;
  gap: 8px;
  color: color-mix(in srgb, var(--muted) 86%, #ffffff);
  font-size: 15px;
  font-weight: 700;
}

.public-platform-site .auth-form input,
.public-platform-site .auth-form textarea,
.public-platform-site .auth-form select {
  min-height: 48px;
  background: rgba(255, 255, 255, 0.05);
}

.public-platform-site .auth-panel .button.primary {
  justify-self: start;
  min-height: 42px;
  margin-top: 8px;
  padding-inline: 18px;
}

.public-platform-site.public-page-login .auth-panel {
  align-content: start;
  padding-top: clamp(76px, 11vh, 124px);
}

.public-platform-site.public-page-login .auth-form {
  width: min(100%, 520px);
}

.public-platform-site .auth-panel .panel > p:last-child {
  margin-top: 0;
}

.public-platform-site .auth-panel a {
  color: var(--accent-strong);
  font-weight: 800;
}

.code-box {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #111827;
  color: #e5e7eb;
  padding: 12px;
  white-space: pre-wrap;
}

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

.stat {
  padding: 16px 18px;
}

.stat strong {
  display: block;
  font-size: 30px;
  line-height: 1;
}

.stat span {
  color: var(--muted);
  display: block;
  font-size: 13px;
  font-weight: 760;
  margin-top: 8px;
}

.two-col,
.split {
  display: grid;
  grid-template-columns: minmax(320px, 430px) minmax(0, 1fr);
  gap: 18px;
}

.two-col > div,
.panel {
  padding: 20px;
}

.stack {
  display: grid;
  gap: 14px;
}

.invite-link-panel {
  margin-bottom: 18px;
  padding: 18px 20px;
}

.invite-link-panel input {
  overflow: hidden;
  font-weight: 700;
  text-overflow: ellipsis;
}

.narrow-left {
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
}

.lot-editor {
  grid-template-columns: minmax(340px, 430px) minmax(0, 1fr);
}

.lot-onepager {
  display: grid;
  gap: 10px;
  width: 100%;
}

.lot-onepager-head {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  padding-bottom: 12px;
}

.lot-onepager-head h1 {
  font-size: clamp(30px, 3vw, 42px);
  margin-bottom: 0;
}

.lot-code-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid color-mix(in srgb, var(--accent) 44%, var(--line));
  background: var(--chip-bg);
  color: var(--accent-strong);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
  font-weight: 850;
  justify-self: start;
  margin: 0;
  padding: 4px 9px;
}

.lot-preflight {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-left: 3px solid color-mix(in srgb, var(--gold) 70%, var(--accent));
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--gold-soft) 40%, var(--surface));
  color: var(--ink);
  padding: 12px 14px;
}

.lot-preflight-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lot-onepager-form {
  display: grid;
  gap: 0;
}

.lot-entry-panel {
  display: grid;
  width: 100%;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: visible;
  padding: 0;
}

.internal-site.page-lots .lot-entry-panel {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: none;
}

.lot-form-section {
  padding: 16px 18px;
}

.lot-form-section label {
  margin-bottom: 0;
}

.lot-form-section + .lot-form-section {
  border-top: 1px solid color-mix(in srgb, var(--line) 74%, transparent);
}

.lot-form-section:last-of-type {
  padding-bottom: 0;
}

.lot-priority-grid,
.lot-compact-strip {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 12px;
  row-gap: 10px;
  align-items: end;
  justify-content: stretch;
}

.lot-consignor-field {
  grid-column: span 4;
}

.lot-area-field {
  grid-column: span 4;
}

.lot-status-field {
  grid-column: span 2;
}

.lot-sort-field {
  grid-column: span 2;
}

.lot-status-field .custom-dropdown summary,
.lot-priority-grid input {
  min-height: 40px;
}

.lot-primary-intro {
  grid-column: 1 / -1;
  margin-bottom: -2px;
}

.lot-section-bar {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.lot-section-bar strong {
  display: block;
  margin-top: 2px;
}

.lot-catalog-reference-list {
  display: grid;
  gap: 8px;
}

.lot-catalog-reference-row {
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(0, 1fr) 42px;
  gap: 10px;
  align-items: end;
  justify-content: stretch;
}

.lot-catalog-reference-row.has-custom-catalog {
  grid-template-columns: minmax(180px, 220px) minmax(0, 1fr) minmax(150px, 200px) 42px;
}

.lot-catalog-reference-row .icon-button {
  justify-self: end;
}

.custom-catalog-label {
  display: none;
}

.custom-catalog-label.is-visible {
  display: grid;
}

.icon-button {
  display: inline-grid;
  width: 42px;
  min-width: 42px;
  height: 44px;
  place-items: center;
  padding: 0;
  font-size: 22px;
  line-height: 1;
}

.lot-entry-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 20px;
  align-items: start;
}

.lot-main-column,
.lot-photo-panel {
  min-width: 0;
}

.lot-main-column {
  display: grid;
  gap: 16px;
}

.lot-photo-panel {
  display: grid;
  gap: 14px;
  border-left: 1px solid color-mix(in srgb, var(--accent) 42%, var(--line));
  padding-left: 18px;
}

.lot-photo-panel.is-bottom {
  border-left: 0;
  border-top: 1px solid color-mix(in srgb, var(--line) 74%, transparent);
  background: color-mix(in srgb, var(--bg) 70%, var(--surface));
  padding: 22px 24px 24px;
}

.lot-photo-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.lot-photo-head h2 {
  margin: 0;
}

.lot-image-manager {
  display: grid;
  gap: 10px;
}

.lot-image-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 10px;
}

.lot-image-controls {
  display: grid;
  gap: 9px;
  min-width: 0;
}

.lot-image-title {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.lot-image-title strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lot-image-title span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.lot-image-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.lot-image-flags .check-row {
  margin: 0;
}

.lot-image-empty {
  display: grid;
  gap: 4px;
  border: 1px dashed color-mix(in srgb, var(--accent) 48%, var(--line));
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--accent-soft) 30%, var(--surface));
  color: var(--muted);
  padding: 16px;
}

.lot-image-empty strong {
  color: var(--ink);
}

.lot-image-placeholder {
  display: grid;
  width: 96px;
  height: 72px;
  place-items: center;
  border: 1px dashed color-mix(in srgb, var(--accent) 50%, var(--line));
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 850;
}

.file-button {
  position: relative;
  overflow: hidden;
  margin: 0;
}

.file-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.lot-list-section {
  margin-top: 6px;
}

.lot-form-actions {
  position: sticky;
  bottom: 0;
  z-index: 6;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  background: color-mix(in srgb, var(--surface) 94%, var(--bg));
  box-shadow: 0 -10px 22px rgba(15, 23, 42, 0.06);
  margin-top: -1px;
  padding: 12px 14px;
  backdrop-filter: blur(10px);
}

.flow {
  margin: 0;
  padding-left: 22px;
}

.flow li + li {
  margin-top: 8px;
}

.actions,
.section-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.actions {
  flex-wrap: wrap;
}

.actions.wrap {
  flex-wrap: wrap;
}

.section-head {
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-head.compact {
  margin-bottom: 12px;
}

.admin-hero {
  align-items: flex-start;
  min-height: 0;
}

.admin-hero h1 {
  max-width: 720px;
  font-size: 30px;
}

.admin-hero .muted {
  max-width: 660px;
  margin-bottom: 0;
}

.admin-hero .actions {
  justify-content: flex-end;
  min-width: 320px;
}

.dashboard-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 14px;
  align-items: stretch;
}

.dashboard-hero-grid .hero {
  min-width: 0;
}

.context-panel {
  display: grid;
  align-content: start;
  gap: 8px;
}

.context-panel h2,
.context-panel p {
  margin: 0;
}

.context-panel .actions {
  margin-top: 6px;
}

.workspace-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.workspace-actions form {
  margin: 0;
}

.admin-dashboard > div {
  min-width: 0;
}

.admin-dashboard-grid {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
}

.admin-dashboard-grid > div {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

.org-switch-list {
  display: grid;
  gap: 8px;
}

.org-switch-list form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--neutral-bg);
  padding: 10px;
}

.org-switch-list form.is-current {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.org-switch-list span,
.org-switch-list small {
  display: block;
  min-width: 0;
}

.org-switch-list small {
  color: var(--muted);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.row-actions form {
  margin: 0;
}

.status-form {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.auction-edit-row td {
  background: var(--neutral-bg);
  padding-top: 10px;
  padding-bottom: 14px;
}

.auction-edit-form {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(150px, 190px) minmax(140px, 170px) auto;
  gap: 10px;
  align-items: end;
}

.auction-edit-form label {
  margin: 0;
}

.account-row-form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 8px;
  margin: 0;
}

.account-row-form label {
  display: grid;
  gap: 3px;
  margin: 0;
}

.account-row-form label span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.account-row-form .custom-dropdown-label {
  align-self: center;
  margin: 0 -4px 0 0;
  white-space: nowrap;
}

.account-row-form .custom-dropdown {
  width: 150px;
  margin: 0;
}

.account-row-form .custom-dropdown summary {
  min-height: 34px;
  padding: 6px 28px 6px 8px;
}

.account-row-form input[type="password"] {
  width: 150px;
  min-height: 34px;
  padding: 6px 8px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid var(--line);
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 850;
  padding: 3px 8px;
}

.status-draft {
  background: var(--neutral-bg);
  color: var(--neutral-ink);
}

.status-running {
  border-color: color-mix(in srgb, var(--accent) 30%, var(--line));
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.status-closed {
  background: var(--neutral-bg);
  color: var(--neutral-ink);
}

.status-active,
.status-settled {
  border-color: color-mix(in srgb, var(--accent) 30%, var(--line));
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.status-blocked,
.status-withdrawn {
  background: var(--warning-bg);
  color: var(--warn);
}

.theme-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(138px, 1fr));
  gap: 10px;
}

.theme-preview {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--ink);
  min-height: 96px;
  padding: 10px;
}

.theme-preview.is-selected {
  border-color: var(--accent);
  outline: 2px solid color-mix(in srgb, var(--accent) 22%, transparent);
}

.theme-preview strong {
  font-size: 14px;
  line-height: 1.2;
}

.theme-preview-swatch {
  display: block;
  height: 30px;
  border-radius: var(--radius-sm);
  background: var(--accent);
}

.theme-preview small {
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.2;
}

.settings-note {
  margin-top: 14px;
}

.settings-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  margin: -4px 0 16px;
  padding: 0 0 12px;
}

.settings-page-head h1 {
  font-size: 30px;
  margin-bottom: 2px;
}

.settings-page-head .muted {
  max-width: 680px;
  margin: 0;
}

.settings-head-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.settings-layout {
  align-items: start;
}

.settings-layout.narrow-left {
  grid-template-columns: minmax(520px, 1fr) minmax(300px, 380px);
  gap: 26px;
}

.settings-form {
  display: grid;
  gap: 10px;
  align-self: start;
  border-top: 2px solid var(--accent);
  padding-top: 14px;
}

.settings-form h2 {
  border-top: 1px solid var(--line);
  font-size: 20px;
  margin: 6px 0 0;
  padding-top: 14px;
}

.settings-form h2:first-of-type {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}

.settings-form-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

.settings-form-row label {
  min-width: 0;
}

.settings-side {
  display: grid;
  gap: 12px;
  min-width: 0;
  border-top: 2px solid var(--accent);
  padding-top: 14px;
}

.settings-side-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 76%, transparent);
  padding: 16px;
}

.settings-side-card h2 {
  font-size: 20px;
  margin-bottom: 0;
}

.settings-side-card .muted {
  margin: 0;
}

.settings-theme-summary {
  display: grid;
  gap: 8px;
}

.settings-theme-chip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 74px;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  padding: 10px;
}

.settings-theme-chip span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.settings-theme-chip strong {
  display: block;
  margin-top: 2px;
}

.settings-theme-chip i {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 74px;
  height: 34px;
  border: 1px solid var(--line);
  background: var(--surface);
  overflow: hidden;
}

.settings-theme-chip i b {
  display: block;
}

.settings-theme-chip i b:nth-child(1) {
  background: var(--surface);
}

.settings-theme-chip i b:nth-child(2) {
  background: var(--accent);
}

.settings-theme-chip i b:nth-child(3) {
  background: var(--accent-alt);
}

.settings-layout .panel h2 {
  margin-bottom: 16px;
}

.settings-layout .custom-dropdown {
  margin-bottom: 12px;
}

.info-panel {
  min-height: 0;
}

.info-panel h2 {
  max-width: 620px;
}

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

.list-workspace {
  display: grid;
  gap: 16px;
}

.entry-dialog {
  width: min(760px, calc(100vw - 96px));
  max-height: calc(100vh - 90px);
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 26px 70px rgba(23, 33, 47, 0.2);
  padding: 0;
}

.entry-dialog::backdrop {
  background: rgba(23, 33, 47, 0.34);
}

.modal-form {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 22px;
}

.dialog-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}

.dialog-head h2 {
  margin-bottom: 4px;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.terms-editor-page {
  grid-template-columns: minmax(360px, 1fr) minmax(280px, 420px);
  align-items: start;
}

.terms-editor-single {
  display: block;
  max-width: 1120px;
}

.terms-editor-single .panel {
  min-height: 0;
}

.terms-editor-page .rich-editor {
  min-height: 430px;
}

.terms-preview {
  min-height: 260px;
}

/* ==========================================================================
   Buttons, Forms & Editors
   ========================================================================== */

.button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--button-bg);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 7px 12px;
  text-decoration: none;
  white-space: nowrap;
}

.button:hover {
  border-color: var(--accent);
  background: var(--button-hover-bg);
}

.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-contrast);
}

.button.primary:hover {
  background: var(--accent-strong);
}

.button.small {
  min-height: 29px;
  padding: 5px 9px;
  font-size: 13px;
}

.button.icon {
  width: 48px;
  height: 48px;
  font-size: 25px;
}

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

.field-label {
  color: var(--label);
  font-size: 13px;
  font-weight: 750;
  margin: 0 0 6px;
}

.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.rich-editor {
  min-height: 260px;
  max-height: 520px;
  overflow: auto;
  width: 100%;
  border: 1px solid var(--field-border);
  border-radius: var(--radius-sm);
  background: var(--field-bg);
  color: var(--ink);
  font: inherit;
  margin-bottom: 14px;
  padding: 12px;
}

.rich-editor h2,
.rich-editor h3 {
  margin-top: 16px;
}

.rich-editor ul,
.rich-editor ol {
  padding-left: 24px;
}

.rich-editor blockquote {
  border-left: 4px solid var(--line);
  color: var(--muted);
  margin-left: 0;
  padding-left: 12px;
}

.condition-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 0 14px;
}

.condition-picker.compact {
  margin-bottom: 0;
}

.condition-option {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--chip-bg);
  cursor: pointer;
  font-size: 14px;
  font-weight: 850;
  margin: 0;
  padding: 5px 8px;
}

.condition-option input {
  width: 18px;
  height: 18px;
}

.condition-option span {
  line-height: 1;
}

.condition-symbols {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0 0 10px;
}

.condition-symbols span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  background: var(--chip-bg);
  color: var(--accent-strong);
  font-weight: 850;
  padding: 3px 7px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--field-border);
  border-radius: var(--radius-sm);
  background: var(--field-bg);
  color: var(--ink);
  font: inherit;
  padding: 9px 10px;
}

input::placeholder,
textarea::placeholder {
  color: var(--field-placeholder);
  opacity: 1;
}

input:disabled,
select:disabled,
textarea:disabled,
button:disabled,
.button:disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

input[readonly],
textarea[readonly] {
  background: color-mix(in srgb, var(--field-bg) 72%, var(--neutral-bg));
  color: var(--neutral-ink);
}

input:focus,
select:focus,
textarea:focus,
.rich-editor:focus {
  border-color: color-mix(in srgb, var(--accent) 62%, var(--line));
  outline: 3px solid color-mix(in srgb, var(--accent-soft) 70%, transparent);
}

textarea {
  resize: vertical;
}

input[type="checkbox"] {
  width: 18px;
  height: 18px;
  padding: 0;
}

.custom-dropdown-label {
  display: block;
  margin: 0 0 6px;
  color: var(--ink);
  font-weight: 850;
}

.custom-dropdown {
  position: relative;
}

.custom-dropdown details {
  position: relative;
}

.custom-dropdown summary {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-height: 40px;
  border: 1px solid var(--field-border);
  border-radius: var(--radius-sm);
  background: var(--field-bg);
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
  list-style: none;
  padding: 8px 34px 8px 10px;
}

.custom-dropdown summary span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.custom-dropdown summary::after {
  content: "";
  position: absolute;
  right: 13px;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translateY(-2px);
}

.custom-dropdown details[open] summary {
  border-color: color-mix(in srgb, var(--accent) 62%, var(--line));
  outline: 3px solid color-mix(in srgb, var(--accent-soft) 70%, transparent);
}

.custom-dropdown-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: grid;
  max-height: 280px;
  overflow: auto;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line));
  border-radius: var(--radius-sm);
  background: var(--field-bg);
  box-shadow: var(--shadow);
  padding: 6px;
}

.custom-dropdown-menu button {
  display: grid;
  gap: 2px;
  width: 100%;
  border: 0;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  padding: 8px 9px;
  text-align: left;
}

.custom-dropdown-menu button.has-theme-preview {
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: center;
  column-gap: 10px;
}

.custom-dropdown-menu button.has-theme-preview .custom-dropdown-meta {
  grid-column: 2;
}

.theme-option-preview {
  display: inline-grid;
  grid-template-columns: repeat(3, 1fr);
  flex: 0 0 auto;
  width: 58px;
  height: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  overflow: hidden;
  vertical-align: middle;
}

.custom-dropdown summary .theme-option-preview {
  width: 52px;
  height: 18px;
  margin-right: 8px;
}

.theme-option-preview i {
  display: block;
  min-width: 0;
}

.theme-option-preview i:nth-child(1) {
  background: var(--surface);
}

.theme-option-preview i:nth-child(2) {
  background: var(--accent);
}

.theme-option-preview i:nth-child(3) {
  background: var(--accent-alt);
}

.custom-dropdown-menu strong,
.custom-dropdown-menu span {
  overflow-wrap: anywhere;
}

.custom-dropdown-menu button:hover,
.custom-dropdown-menu button:focus {
  background: var(--button-hover-bg);
  outline: 0;
}

.custom-dropdown-menu span {
  color: var(--muted);
  font-size: 13px;
}

.check-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  color: var(--ink);
  font-weight: 800;
}

.check-row input {
  margin-top: 2px;
}

.check-row span {
  line-height: 1.3;
}

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

.lot-commercial-grid {
  grid-template-columns: minmax(170px, 220px) minmax(170px, 220px);
  justify-content: stretch;
  align-items: end;
  gap: 12px;
}

.form-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.lot-section-description {
  display: grid;
  gap: 16px;
}

.lot-section-description label {
  max-width: none;
}

.lot-section-description textarea {
  min-height: 170px;
}

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

/* ==========================================================================
   Tables
   ========================================================================== */

.table-wrap {
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 760px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px 14px;
  text-align: left;
  vertical-align: middle;
}

th {
  background: color-mix(in srgb, var(--bg) 78%, var(--surface));
  color: color-mix(in srgb, var(--muted) 86%, var(--ink));
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

tbody tr {
  background: var(--surface);
}

tbody tr:hover {
  background: color-mix(in srgb, var(--accent-soft) 32%, var(--surface));
}

tr:last-child td {
  border-bottom: 0;
}

/* ==========================================================================
   Internal Cleanup
   ========================================================================== */

.internal-site {
  --shadow: none;
  --field-bg: var(--surface);
  --button-bg: var(--surface);
  --button-hover-bg: color-mix(in srgb, var(--accent-soft) 42%, var(--surface));
  --neutral-bg: color-mix(in srgb, var(--surface) 88%, var(--bg));
  min-width: 1180px;
}

.internal-site .app-topbar {
  gap: 0;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 96%, var(--bg));
  padding: 10px 40px 0;
}

.internal-site .app-topbar-main {
  min-height: 36px;
  border-bottom: 1px solid var(--line);
}

.internal-site .brand {
  font-size: 18px;
  font-weight: 900;
  line-height: 1.1;
}

.internal-site .app-nav {
  gap: 18px;
  align-items: center;
  min-height: 38px;
  padding: 0;
}

.internal-site .app-nav a {
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
  padding: 10px 0 9px;
}

.internal-site .app-nav a:hover {
  background: transparent;
  color: var(--accent-strong);
}

.internal-site .app-nav a.active {
  background: transparent;
  border-bottom-color: var(--accent);
  color: var(--accent-strong);
  font-weight: 900;
}

.internal-site .page {
  width: min(1640px, calc(100vw - 80px));
  margin-top: 16px;
}

.internal-site.page-lots .page {
  width: min(1640px, calc(100vw - 80px));
}

.internal-site .context-bar {
  gap: 8px;
  border-bottom: 1px solid var(--line);
  margin: -2px 0 14px;
  padding-bottom: 8px;
}

.internal-site .context-bar span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.internal-site .notice {
  border: 0;
  border-left: 3px solid var(--accent);
  background: color-mix(in srgb, var(--accent-soft) 38%, transparent);
  box-shadow: none;
  margin-bottom: 14px;
  padding: 9px 12px;
}

.internal-site .hero,
.internal-site .panel,
.internal-site .stat,
.internal-site .two-col > div,
.internal-site .empty-state,
.internal-site .admin-dashboard-grid > div,
.internal-site .table-wrap,
.internal-site .settings-side-card {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: none;
}

.internal-site .panel,
.internal-site .two-col > div,
.internal-site .empty-state,
.internal-site .settings-side-card {
  padding: 16px;
}

.internal-site .split,
.internal-site .two-col {
  gap: 20px;
}

.internal-site .split.narrow-left {
  grid-template-columns: minmax(300px, 390px) minmax(0, 1fr);
}

.internal-site .section-head {
  align-items: flex-end;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
  padding-bottom: 10px;
}

.internal-site h1 {
  font-size: 24px;
  line-height: 1.15;
}

.internal-site h2 {
  font-size: 18px;
}

.internal-site .section-head h1,
.internal-site .panel h1 {
  margin-bottom: 6px;
}

.internal-site .muted {
  color: var(--muted);
}

.internal-site label {
  gap: 5px;
  margin-bottom: 10px;
}

.internal-site input,
.internal-site textarea {
  min-height: 38px;
  padding: 8px 10px;
}

.internal-site input[type="file"] {
  min-height: 40px;
  background: var(--surface);
  padding: 6px;
}

.internal-site input[type="file"]::file-selector-button {
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: color-mix(in srgb, var(--surface) 86%, var(--bg));
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 750;
  margin-right: 10px;
  padding: 4px 9px;
}

.internal-site input[type="file"]::file-selector-button:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.internal-site .custom-dropdown-label {
  margin-bottom: 5px;
}

.internal-site .custom-dropdown summary {
  min-height: 38px;
  padding-top: 7px;
  padding-bottom: 7px;
}

.internal-site .button {
  min-height: 34px;
  padding: 6px 11px;
}

.internal-site .button.small {
  min-height: 28px;
  padding: 4px 8px;
}

.internal-site .table-wrap {
  border-color: var(--line);
}

.internal-site table {
  min-width: 720px;
}

.internal-site th,
.internal-site td {
  padding: 10px 12px;
}

.internal-site th {
  background: color-mix(in srgb, var(--surface) 72%, var(--bg));
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0;
}

.internal-site tbody tr {
  background: var(--surface);
}

.internal-site tbody tr:hover {
  background: color-mix(in srgb, var(--accent-soft) 24%, var(--surface));
}

.internal-site .actions,
.internal-site .row-actions,
.internal-site .status-form,
.internal-site .account-row-form {
  gap: 7px;
}

.internal-site .settings-page-head {
  margin-top: 0;
}

.internal-site .settings-layout.narrow-left {
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 0;
  border: 1px solid var(--line);
  background: var(--surface);
}

.internal-site.page-settings .settings-page-head {
  margin-bottom: 12px;
  padding-bottom: 10px;
}

.internal-site.page-settings .settings-page-head h1 {
  font-size: 24px;
}

.internal-site.page-settings .settings-form,
.internal-site.page-settings .settings-side {
  border-top: 0;
  padding-top: 0;
}

.internal-site.page-settings .settings-form {
  padding: 18px 20px;
}

.internal-site.page-settings .settings-side {
  gap: 0;
  border-left: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 55%, var(--surface));
  padding: 18px;
}

.internal-site.page-settings .settings-form h2 {
  font-size: 18px;
  margin-top: 4px;
  padding-top: 12px;
}

.internal-site.page-settings .settings-side-card {
  gap: 10px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  padding: 0 0 16px;
}

.internal-site.page-settings .settings-side-card + .settings-side-card {
  padding-top: 16px;
}

.internal-site.page-settings .settings-side-card:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.internal-site.page-settings .settings-theme-chip {
  grid-template-columns: minmax(0, 1fr) 58px;
  border-color: color-mix(in srgb, var(--line) 82%, transparent);
  background: var(--surface);
  padding: 9px;
}

.internal-site.page-settings .settings-theme-chip strong {
  font-size: 15px;
  line-height: 1.2;
}

.internal-site.page-settings .settings-theme-chip span {
  font-size: 10px;
}

.internal-site.page-settings .settings-theme-chip i {
  width: 58px;
  height: 28px;
}

.internal-site.page-users .split.narrow-left {
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  gap: 20px;
}

.internal-site.page-users .stack {
  gap: 12px;
}

.internal-site.page-users .panel h1,
.internal-site.page-users section > h1 {
  font-size: 22px;
}

.internal-site.page-users .invite-link-panel {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  padding: 14px;
}

.internal-site.page-users .invite-link-panel h1 {
  font-size: 20px;
  margin: 0;
}

.internal-site.page-users .account-row-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(128px, 150px)) repeat(2, minmax(118px, 140px)) auto;
  gap: 7px;
  align-items: end;
}

.internal-site.page-users .account-row-form .custom-dropdown,
.internal-site.page-users .account-row-form input[type="password"] {
  width: 100%;
}

.internal-site.page-users .account-row-form .custom-dropdown-label {
  margin: 0 0 4px;
}

.internal-site.page-users td:last-child {
  min-width: 620px;
}

.internal-site.page-lots .lot-onepager {
  gap: 8px;
}

.internal-site.page-lots .lot-preflight {
  margin-bottom: 4px;
  padding: 10px 12px;
}

.internal-site.page-lots .lot-form-section {
  padding: 12px 16px;
}

.internal-site.page-lots .lot-section-bar strong {
  font-size: 18px;
}

.internal-site.page-lots .lot-section-bar {
  margin-bottom: 8px;
}

.internal-site.page-lots .lot-primary-intro {
  margin-bottom: -4px;
}

.internal-site.page-lots .lot-photo-panel.is-bottom {
  padding: 14px 16px 16px;
}

/* ==========================================================================
   Media Previews
   ========================================================================== */

.thumb {
  display: block;
  width: 72px;
  height: 54px;
  object-fit: contain;
  background: var(--neutral-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
}

.thumb.preview {
  width: 140px;
  height: 100px;
  margin-bottom: 12px;
}

.logo-preview {
  display: block;
  max-width: 220px;
  max-height: 90px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--field-bg);
  margin: 0 0 14px;
  padding: 10px;
}

.internal-site.page-settings .logo-preview {
  max-width: 150px;
  max-height: 72px;
  margin: -2px 0 12px;
  padding: 8px;
}

/* ==========================================================================
   Catalogs & Lots
   ========================================================================== */

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.lot-card {
  display: grid;
  grid-template-rows: 190px auto;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.lot-image {
  display: grid;
  place-items: center;
  background: #eef2f6;
  color: var(--muted);
}

.lot-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.lot-body {
  padding: 16px;
  min-width: 0;
}

.lot-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--accent-strong);
  margin-bottom: 10px;
}

.lot-body h2,
.lot-body p,
.lot-meta {
  overflow-wrap: anywhere;
}

.lot-body p {
  margin: 0 0 12px;
}

.price {
  font-weight: 850;
}

.result-price {
  color: var(--accent-strong);
}

.catalog-list-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  max-width: 1120px;
  margin: 0 auto 34px;
}

.public-catalog-list {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 22px;
}

.catalog-list-head {
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
  padding-bottom: 14px;
}

.catalog-list-head h2 {
  margin-bottom: 6px;
}

.catalog-list-head p {
  margin: 0;
}

.compact-empty {
  display: grid;
  min-height: 150px;
  align-content: center;
  border: 1px dashed var(--line);
  box-shadow: none;
  padding: 22px;
  text-align: left;
}

.compact-empty strong {
  color: var(--accent-strong);
  font-size: 18px;
}

.compact-empty p {
  margin: 6px 0 0;
}

.catalog-link-list {
  display: grid;
  gap: 10px;
}

.catalog-link-list article,
.catalog-auction-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 0;
  background: color-mix(in srgb, var(--surface) 88%, var(--bg));
  padding: 13px 15px;
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.catalog-auction-card:hover {
  border-color: var(--gold);
  background: var(--neutral-bg);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.16);
  transform: translateY(-1px);
}

.catalog-link-list h3 {
  margin: 0 0 5px;
}

.catalog-link-list p {
  margin: 0;
}

.catalog-card-main,
.catalog-card-meta {
  display: grid;
  min-width: 0;
}

.catalog-card-main {
  gap: 3px;
}

.catalog-card-main span,
.catalog-card-meta {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.catalog-card-main strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-card-meta {
  gap: 4px;
  justify-items: end;
  text-align: right;
  white-space: nowrap;
}

.public-catalog-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  max-width: 1280px;
  margin: 0 auto 34px;
}

.public-catalog-sidebar {
  position: sticky;
  top: 116px;
  display: grid;
  gap: 12px;
  min-width: 0;
}

.public-catalog-search,
.public-catalog-menu {
  border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--line));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 92%, var(--accent-soft) 8%);
  box-shadow: var(--shadow);
  padding: 16px;
}

.public-catalog-search {
  display: grid;
  gap: 12px;
}

.public-catalog-search h2 {
  margin: 0;
  font-size: 18px;
}

.public-catalog-search label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.public-catalog-search input,
.public-catalog-search select {
  text-transform: none;
}

.public-catalog-menu {
  display: grid;
  gap: 6px;
}

.public-catalog-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
  border-left: 3px solid var(--accent);
  color: var(--accent-strong);
  font-weight: 850;
  padding: 6px 8px;
  text-decoration: none;
}

.public-catalog-menu a::after {
  content: "›";
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
}

.public-catalog-menu a:hover {
  border-color: color-mix(in srgb, var(--accent) 34%, var(--line));
  border-left-color: var(--accent-strong);
  background: color-mix(in srgb, var(--accent-soft) 80%, var(--surface) 20%);
}

.public-catalog-main {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.public-catalog-title {
  position: relative;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line));
  padding-bottom: 18px;
}

.public-catalog-title::after {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: min(180px, 32vw);
  height: 2px;
  background: var(--accent);
  content: "";
}

.public-catalog-title h1 {
  font-size: clamp(30px, 5vw, 52px);
}

.public-catalog-title p {
  margin: 0;
}

.public-area-overview {
  display: grid;
  grid-template-columns: minmax(150px, 220px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 84%, var(--accent-soft) 16%);
  padding: 15px 16px;
}

.public-area-overview h2,
.public-area-overview p {
  margin: 0;
}

.public-area-overview h2 {
  color: var(--accent-strong);
  font-size: 17px;
  text-transform: uppercase;
}

.public-area-overview p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.public-area-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.public-area-chips a {
  display: inline-grid;
  grid-template-columns: auto auto;
  gap: 2px 8px;
  align-items: center;
  min-height: 34px;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--line));
  border-radius: var(--radius-xs);
  background: color-mix(in srgb, var(--surface) 94%, var(--accent-soft) 6%);
  color: var(--ink);
  padding: 6px 8px;
  text-decoration: none;
}

.public-area-chips a.active,
.public-area-chips a:hover {
  border-color: color-mix(in srgb, var(--accent) 75%, var(--line));
  background: color-mix(in srgb, var(--accent-soft) 82%, var(--surface) 18%);
}

.public-area-chips span {
  font-weight: 900;
}

.public-area-chips small {
  color: var(--muted);
  font-size: 12px;
}

.public-area-chips strong {
  grid-row: 1 / span 2;
  grid-column: 2;
  color: var(--accent-strong);
  font-size: 15px;
}

.public-lot-list {
  display: grid;
  gap: 12px;
}

.public-lot-row {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) minmax(120px, auto);
  gap: 18px;
  align-items: start;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--line));
  border-left: 3px solid color-mix(in srgb, var(--accent) 62%, var(--line));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 94%, var(--accent-soft) 6%);
  box-shadow: var(--shadow);
  padding: 14px;
}

.public-lot-row:hover {
  border-color: color-mix(in srgb, var(--accent) 32%, var(--line));
  border-left-color: var(--accent);
  box-shadow: 0 12px 30px color-mix(in srgb, var(--accent) 10%, rgba(0, 0, 0, 0.14));
}

.public-lot-photo {
  display: grid;
  width: 100%;
  aspect-ratio: 4 / 3;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  background: color-mix(in srgb, var(--bg) 82%, var(--surface));
  color: var(--muted);
  font-weight: 750;
}

.public-lot-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.public-lot-text {
  min-width: 0;
}

.public-lot-topline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  margin-bottom: 8px;
}

.public-lot-topline strong {
  color: var(--accent-strong);
  font-size: 18px;
}

.public-lot-topline span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.public-lot-text h2 {
  margin-bottom: 8px;
  font-size: 21px;
}

.public-lot-text p {
  margin: 0;
  color: var(--muted);
}

.public-lot-price {
  display: grid;
  gap: 4px;
  justify-items: end;
  text-align: right;
}

.public-lot-price span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.public-lot-price strong {
  color: var(--accent-strong);
  font-size: 18px;
  white-space: nowrap;
}

.public-lot-empty {
  min-height: 110px;
}

/* ==========================================================================
   Auction Day & Display View
   ========================================================================== */

.auction-toolbar {
  display: grid;
  grid-template-columns: 54px minmax(0, 360px) 54px;
  align-items: end;
  justify-content: center;
  gap: 12px;
  margin-bottom: 18px;
}

.auction-control-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  gap: 16px;
  align-items: start;
}

.auction-lot-nav {
  display: grid;
  grid-template-columns: auto minmax(260px, 420px) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
  padding: 12px;
}

.auction-lot-jump {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.auction-lot-jump label {
  margin-bottom: 0;
}

.auction-control-card {
  display: grid;
  grid-template-columns: minmax(280px, 42%) minmax(0, 1fr);
  gap: 20px;
}

.auction-control-photo {
  display: grid;
  min-height: 320px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--neutral-bg);
  color: var(--muted);
  overflow: hidden;
}

.auction-control-photo img {
  width: 100%;
  height: 100%;
  max-height: 420px;
  object-fit: contain;
}

.auction-day-form {
  display: grid;
  gap: 8px;
}

.auction-result-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.auction-result-actions .button,
.auction-jump-inline .button {
  width: 100%;
}

.auction-jump-inline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
  border-top: 1px solid var(--line);
  margin-top: 4px;
  padding-top: 12px;
}

.auction-jump-inline label {
  margin-bottom: 0;
}

.auction-jump-form {
  border-top: 1px solid var(--line);
  margin-top: 16px;
  padding-top: 16px;
}

.jump-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.auction-lot {
  display: grid;
  grid-template-columns: minmax(360px, 1.1fr) minmax(320px, 0.9fr);
  min-height: calc(100vh - 170px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.auction-photo {
  display: grid;
  place-items: center;
  background: #edf1f5;
  color: var(--muted);
}

.auction-photo img {
  width: 100%;
  height: 100%;
  max-height: calc(100vh - 170px);
  object-fit: contain;
}

.auction-info {
  align-self: center;
  padding: 42px;
}

.auction-info h1 {
  font-size: clamp(32px, 4vw, 58px);
}

.auction-info p {
  font-size: 20px;
}

.auction-price {
  display: inline-flex;
  margin-top: 18px;
  border-radius: var(--radius);
  background: #e8f2f2;
  color: var(--accent-strong);
  font-size: 28px;
  font-weight: 900;
  padding: 14px 18px;
}

.empty-state {
  padding: 48px;
  text-align: center;
}

.auction-display-screen {
  min-height: 100vh;
  overflow: hidden;
  background: #101010;
  color: #fff;
}

.auction-display {
  display: grid;
  grid-template-columns: minmax(0, 58vw) minmax(360px, 1fr);
  min-height: 100vh;
}

.display-photo {
  display: grid;
  place-items: center;
  background: #080808;
  color: rgba(255, 255, 255, 0.55);
  font-size: 28px;
  font-weight: 800;
}

.display-photo img {
  width: 100%;
  height: 100vh;
  object-fit: contain;
}

.display-info {
  display: grid;
  align-content: center;
  gap: 22px;
  padding: clamp(34px, 5vw, 72px);
}

.display-area {
  color: var(--gold);
  font-size: clamp(18px, 2vw, 28px);
  font-weight: 900;
  margin: 0;
  text-transform: uppercase;
}

.display-info h1 {
  color: #fff;
  font-size: clamp(42px, 5.6vw, 86px);
  margin: 0;
}

.display-description {
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(20px, 2.2vw, 34px);
  line-height: 1.35;
  margin: 0;
  white-space: pre-wrap;
}

.display-price {
  justify-self: start;
  border: 2px solid var(--gold);
  color: #fff;
  font-size: clamp(26px, 3vw, 46px);
  font-weight: 950;
  padding: 14px 20px;
}

.price-input {
  max-width: 150px;
}

.sticky-actions {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  background: rgba(246, 247, 249, 0.92);
  padding: 14px 0;
  backdrop-filter: blur(8px);
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */

@media (max-width: 900px) {
  .topbar,
  .hero,
  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar {
    gap: 10px;
    padding: 12px 18px;
  }

  .app-topbar {
    padding: 12px 18px 10px;
  }

  .app-topbar-main {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-tools {
    width: 100%;
    justify-content: space-between;
  }

  .admin-workspace-switch {
    flex: 1 1 auto;
    flex-wrap: wrap;
    align-items: stretch;
  }

  .admin-organization-picker {
    flex: 1 1 100%;
    padding-top: 3px;
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .admin-organization-picker summary {
    justify-content: space-between;
    width: 100%;
  }

  .admin-organization-picker summary strong {
    max-width: min(320px, 58vw);
  }

  .admin-organization-menu {
    position: static;
    width: 100%;
    margin-top: 6px;
    box-shadow: none;
  }

  .settings-page-head,
  .settings-layout.narrow-left {
    grid-template-columns: 1fr;
  }

  .settings-page-head {
    align-items: start;
    flex-direction: column;
  }

  .settings-head-actions {
    justify-content: flex-start;
  }

  .internal-site .page {
    width: min(100vw - 32px, 760px);
  }

  .internal-site .app-topbar {
    padding: 12px 18px 0;
  }

  .internal-site .app-nav {
    gap: 14px;
    width: 100%;
  }

  .internal-site .section-head {
    align-items: flex-start;
  }

  .internal-site.page-users .account-row-form,
  .internal-site.page-users .split.narrow-left,
  .internal-site.page-settings .settings-layout.narrow-left {
    grid-template-columns: 1fr;
  }

  .internal-site.page-users td:last-child {
    min-width: 0;
  }

  .public-topbar {
    flex-direction: row;
    align-items: center;
  }

  .public-platform-site .public-topbar {
    position: static;
    padding-left: 18px;
  }

  .public-platform-site .public-topbar::after {
    left: 0;
    width: 100%;
  }

  .public-desktop-nav {
    display: none;
  }

  .public-mobile-menu {
    position: relative;
    display: block;
    margin-left: auto;
  }

  .public-platform-site .public-mobile-menu {
    margin-left: 0;
    margin-right: auto;
  }

  .public-platform-site .page {
    width: calc(100vw - 28px);
  }

  .public-mobile-menu summary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    color: var(--accent-strong);
    cursor: pointer;
    font-weight: 800;
    padding: 8px 10px;
    user-select: none;
  }

  .public-mobile-menu[open] summary {
    background: var(--accent-soft);
  }

  .public-mobile-nav {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    display: flex;
    width: min(82vw, 340px);
    flex-direction: column;
    gap: 4px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    padding: 8px;
  }

  .public-platform-site .public-mobile-nav {
    right: auto;
    left: 0;
  }

  .public-mobile-nav a {
    display: block;
    border-radius: var(--radius-sm);
    padding: 10px 12px;
  }

  .public-mobile-nav .mobile-home-link {
    border-bottom: 1px solid var(--line);
    color: var(--accent-strong);
    margin-bottom: 4px;
    padding-bottom: 12px;
  }

  nav:not(.public-mobile-nav) {
    width: 100%;
  }

  .page {
    width: min(100vw - 24px, 760px);
    margin-top: 20px;
  }

  .landing-hero {
    gap: 22px;
    padding-top: 28px;
  }

  .landing-hero h1 {
    font-size: 40px;
  }

  .platform-hero {
    margin-top: 34px;
  }

  .platform-hero h1 {
    font-size: 42px;
  }

  .lead {
    font-size: 18px;
  }

  .stat-grid,
  .dashboard-hero-grid,
  .public-stats,
  .public-org-head,
  .public-org-grid,
  .public-terms-layout,
  .two-col,
  .split,
  .faq-section,
  .auction-control-grid,
  .auction-control-card,
  .lot-editor,
  .narrow-left,
  .auction-lot,
  .landing-hero,
  .index-hero,
  .catalog-overview,
  .catalog-list-grid,
  .public-catalog-layout,
  .public-area-overview,
  .feature-grid,
  .public-flow ol,
  .auction-edit-form {
    grid-template-columns: 1fr;
  }

  .lot-onepager-head {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .lot-priority-grid,
  .lot-compact-strip,
  .lot-catalog-reference-row,
  .lot-catalog-reference-row.has-custom-catalog,
  .lot-commercial-grid,
  .form-grid.three,
  .lot-entry-grid {
    grid-template-columns: 1fr;
  }

  .lot-consignor-field,
  .lot-area-field,
  .lot-status-field,
  .lot-sort-field {
    grid-column: auto;
  }

  .lot-photo-panel {
    border-top: 1px solid var(--line);
    border-left: 0;
    padding-top: 16px;
    padding-left: 0;
  }

  .lot-form-section,
  .lot-photo-panel.is-bottom {
    padding: 18px;
  }

  .public-catalog-sidebar {
    position: static;
  }

  .public-lot-row {
    grid-template-columns: 150px minmax(0, 1fr);
  }

  .public-lot-price {
    grid-column: 1 / -1;
    justify-items: start;
    text-align: left;
  }

  .catalog-overview {
    gap: 18px;
  }

  .public-org-head {
    align-items: start;
  }

  .public-org-info-layout,
  .public-terms-layout {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .public-org-info-side {
    border-top: 1px solid var(--line);
    border-left: 0;
    padding-top: 18px;
    padding-left: 0;
  }

  .public-terms-body {
    column-count: 1;
    column-rule: 0;
  }

  .public-flow li {
    border-top: 0;
    border-left: 3px solid var(--accent);
    padding: 0 0 0 12px;
  }

  .auction-lot {
    min-height: 0;
  }

  .auction-display {
    grid-template-columns: 1fr;
  }

  .auction-result-actions,
  .auction-lot-nav,
  .auction-lot-jump,
  .auction-jump-inline {
    grid-template-columns: 1fr;
  }

  .display-photo img {
    height: 48vh;
  }

  .auction-photo {
    min-height: 320px;
  }

  .auction-info {
    padding: 24px;
  }

  .auction-info h1 {
    font-size: 32px;
  }

  .auction-info p {
    font-size: 17px;
  }
}

@media (max-width: 620px) {
  body {
    line-height: 1.4;
  }

  .internal-site .page {
    width: calc(100vw - 24px);
    margin-top: 12px;
  }

  .internal-site .app-nav {
    gap: 12px;
  }

  .internal-site .panel,
  .internal-site .two-col > div,
  .internal-site .empty-state,
  .internal-site .settings-side-card {
    padding: 14px;
  }

  .internal-site th,
  .internal-site td {
    padding: 9px 10px;
  }

  .settings-page-head {
    padding: 14px 0;
  }

  .settings-form-row {
    grid-template-columns: 1fr;
  }

  .topbar {
    position: static;
  }

  .public-topbar {
    align-items: center;
    flex-direction: row;
    gap: 12px;
    padding: 10px 14px;
  }

  .public-platform-site .public-topbar {
    position: static;
    padding-left: 14px;
  }

  .public-platform-site .public-topbar::after {
    left: 0;
    width: 100%;
  }

  .brand {
    white-space: normal;
  }

  .public-brand {
    flex: 1 1 auto;
    gap: 9px;
  }

  .public-brand img {
    max-width: 118px;
    max-height: 42px;
  }

  .public-brand-name {
    font-size: 15px;
    line-height: 1.15;
  }

  nav a {
    padding: 7px 8px;
  }

  .landing-hero h1 {
    font-size: 32px;
  }

  .index-hero {
    min-height: 0;
    margin-top: 26px;
    padding: 24px 0 18px;
    text-align: left;
  }

  .index-hero h1 {
    font-size: 34px;
  }

  .index-hero .actions {
    justify-content: stretch;
  }

  .index-proof article,
  .public-catalog-list,
  .catalog-status article {
    padding: 14px;
  }

  .page-lots .page {
    width: min(100vw - 24px, 760px);
  }

  .lot-form-actions {
    justify-content: stretch;
  }

  .lot-form-actions .button {
    flex: 1 1 auto;
  }

  .catalog-overview {
    padding-top: 18px;
  }

  .catalog-overview h1 {
    font-size: 30px;
  }

  .public-org-head {
    padding-top: 8px;
  }

  .public-org-summary h1 {
    font-size: 30px;
  }

  .public-org-info-layout {
    margin-bottom: 24px;
  }

  .catalog-status,
  .catalog-link-list article {
    grid-template-columns: 1fr;
  }

  .public-organization-list {
    grid-template-columns: 1fr;
    max-width: 100%;
  }

  .public-organization-card {
    grid-template-columns: 1fr;
    min-height: 0;
    width: 100%;
  }

  .catalog-auction-card {
    grid-template-columns: 1fr;
  }

  .catalog-card-meta {
    justify-items: start;
    text-align: left;
  }

  .public-catalog-layout {
    gap: 18px;
    margin-bottom: 24px;
  }

  .public-catalog-search,
  .public-catalog-menu,
  .public-area-overview,
  .public-lot-row {
    padding: 12px;
  }

  .public-area-chips {
    gap: 6px;
  }

  .public-area-chips a {
    width: 100%;
  }

  .public-lot-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .public-lot-photo {
    max-height: 220px;
  }

  .public-lot-topline {
    align-items: flex-start;
    flex-direction: column;
  }

  .public-lot-text h2 {
    font-size: 19px;
  }

  .section-intro {
    text-align: left;
  }

  .section-intro h1 {
    font-size: 24px;
  }

  h1 {
    font-size: 25px;
  }

  .landing-preview,
  .feature-grid article,
  .panel,
  .two-col > div {
    padding: 16px;
  }

  .preview-image {
    min-height: 150px;
  }

  .actions {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .actions .button {
    width: 100%;
  }

  .catalog-grid {
    grid-template-columns: 1fr;
  }

  .lot-card {
    grid-template-rows: 170px auto;
  }

  .form-grid,
  .jump-form,
  .auction-toolbar {
    grid-template-columns: 1fr;
  }

  .lot-image-row {
    grid-template-columns: 1fr;
  }

  .button.icon {
    width: 100%;
  }

  .terms-editor-page .rich-editor {
    min-height: 320px;
  }

  .site-footer {
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px env(safe-area-inset-bottom);
    text-align: center;
  }

  .site-footer-inner {
    justify-content: center;
    min-height: 40px;
    width: 100%;
  }

  .site-footer nav {
    justify-content: center;
    gap: 20px;
    width: 100%;
  }

  .site-footer a {
    min-height: auto;
    padding: 2px 0;
  }

  .public-platform-site .site-footer::before {
    right: 0;
    width: 100%;
  }

  .cookie-notice {
    right: 12px;
    bottom: 12px;
    left: 12px;
    grid-template-columns: 1fr;
    gap: 10px;
    width: auto;
    padding: 12px;
  }

  .cookie-notice p {
    font-size: 12px;
  }

  .cookie-notice-actions {
    justify-content: space-between;
    width: 100%;
  }

  .footer-copy,
  .footer-home,
  .footer-intern {
    display: none;
  }
}
