/* AMZShark application styles. Colour is reserved for rating data; everything else is ink. */
:root {
  --ink: #141513;
  --ink-2: #4c4e4a;
  --ink-3: #6b6d68;
  --line: #e6e6e2;
  --line-2: #c8c9c4;
  --wash: #f6f6f3;
  --paper: #fff;
  --bar: #111210;
  --danger: #b3261e;
  --r1: #c8451b;
  --r2: #e59a73;
  --r3: #b4b2a9;
  --r4: #62a89c;
  --r5: #17695f;
  --r1-bg: #f8dacd;
  --r1-fg: #7c260a;
  --r2-bg: #fbeadf;
  --r2-fg: #84431c;
  --r3-bg: #efeee9;
  --r3-fg: #4c4e4a;
  --r4-bg: #dcefeb;
  --r4-fg: #1a5a51;
  --r5-bg: #b9e0d9;
  --r5-fg: #0c4039;
  --sans: "Libre Franklin Variable", "Libre Franklin", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Source Serif 4 Variable", "Source Serif 4", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --bs-body-font-family: var(--sans);
  --bs-body-color: var(--ink);
  --bs-link-color-rgb: 20, 21, 19;
  --bs-link-hover-color-rgb: 20, 21, 19;
  --bs-border-color: var(--line);
  --bar-height: 52px;
  --gutter: max(1.5rem, calc((100vw - 1640px) / 2));
  --row-bg: var(--paper);
}

html { scroll-padding-top: calc(var(--bar-height) + .5rem); scroll-padding-bottom: var(--product-selection-space, 0px); }
html, body { overflow-x: clip; }
body {
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font: 400 14px/1.45 var(--sans);
  font-feature-settings: "tnum";
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
.btn:hover, .page-link:hover, .dropdown-item:hover { text-decoration: none; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
h1, h2, h3 { color: var(--ink); letter-spacing: -.008em; }
h1 { margin: 0; font-size: 1.5rem; font-weight: 600; line-height: 1.2; }
h2 { margin: 0; font-size: 1rem; font-weight: 600; }
h3 { margin: 0; font-size: .875rem; font-weight: 600; }
.text-secondary { color: var(--ink-2) !important; }
.mono { font-family: var(--mono); font-size: .9em; letter-spacing: -.01em; }
.fw-semibold { font-weight: 600 !important; }
.min-w-0 { min-width: 0; }

/* Shell */
.app-bar {
  position: sticky; top: 0; z-index: 1030;
  display: flex; align-items: stretch; gap: 2rem;
  min-height: var(--bar-height); padding: 0 var(--gutter);
  background: var(--bar); color: #fff;
}
.navbar-brand, .brand {
  display: flex; align-items: center; gap: .5rem;
  color: #fff; font-size: .9375rem; font-weight: 650; letter-spacing: -.01em;
}
.navbar-brand:hover, .brand:hover { color: #fff; text-decoration: none; }
.navbar-brand svg, .brand svg { width: 18px; height: 18px; fill: currentColor; }
.app-nav { display: flex; flex: 1; align-items: stretch; justify-content: space-between; min-width: 0; }
.app-nav-links { display: flex; align-items: stretch; gap: 1.375rem; }
.app-nav-sep { align-self: center; width: 1px; height: 16px; background: rgba(255, 255, 255, .22); }
.app-bar .nav-link {
  display: flex; align-items: center; padding: 2px 0 0;
  border-bottom: 2px solid transparent;
  color: rgba(255, 255, 255, .66); font-size: .8438rem; font-weight: 500; white-space: nowrap;
}
.app-bar .nav-link:hover { color: #fff; text-decoration: none; }
.app-bar .nav-link.active { border-bottom-color: #fff; color: #fff; }
.app-bar :focus-visible { outline-color: #fff; }
.app-bar .nav-link:focus-visible { outline: 2px solid #fff; outline-offset: -2px; box-shadow: none; color: #fff; }
.app-bar .dropdown-menu :focus-visible { outline-color: var(--ink); outline-offset: -2px; }
.app-user { display: flex; align-items: center; }
.app-user-toggle {
  padding: .25rem 0; border: 0; background: none;
  color: rgba(255, 255, 255, .8); font-size: .8438rem;
}
.app-user-toggle:hover, .app-user-toggle[aria-expanded="true"] { color: #fff; }
@media (min-width: 992px) { .app-nav.collapse { display: flex; } }
.app-nav-toggle { display: none; margin-left: auto; padding: 0; border: 0; background: none; color: #fff; }
.app-nav-toggle svg { width: 22px; height: 22px; }
.content { min-width: 0; }
.page { width: 100%; padding: 1.75rem var(--gutter) 4rem; }
.page-narrow > * { max-width: 40rem; }

/* Page heading */
.page-head {
  display: flex; flex-wrap: wrap; gap: .75rem 2rem;
  align-items: flex-end; justify-content: space-between;
  margin-bottom: 1.5rem;
}
.page-head > div:first-child { min-width: 0; max-width: 62rem; }
.page-head h1 { overflow-wrap: anywhere; }
.page-head p { margin: .3rem 0 0; color: var(--ink-2); }
.page-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.app-kicker {
  display: inline-block; margin-bottom: .35rem;
  color: var(--ink-3); font-size: .8125rem;
}
.app-kicker::before { content: "\2190\00a0"; }
.app-kicker:hover { color: var(--ink); }

/* Buttons */
.btn {
  --bs-btn-padding-y: .375rem; --bs-btn-padding-x: .8rem;
  --bs-btn-font-size: .8438rem; --bs-btn-font-weight: 550;
  --bs-btn-border-radius: 4px;
  transition: none;
}
.btn-sm { --bs-btn-padding-y: .2rem; --bs-btn-padding-x: .6rem; --bs-btn-font-size: .8125rem; --bs-btn-border-radius: 4px; }
.btn-primary {
  --bs-btn-bg: var(--ink); --bs-btn-border-color: var(--ink); --bs-btn-color: #fff;
  --bs-btn-hover-bg: #33352f; --bs-btn-hover-border-color: #33352f; --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: #000; --bs-btn-active-border-color: #000; --bs-btn-active-color: #fff;
  --bs-btn-disabled-bg: var(--line-2); --bs-btn-disabled-border-color: var(--line-2);
}
.btn-outline-secondary {
  --bs-btn-color: var(--ink); --bs-btn-border-color: var(--line-2); --bs-btn-bg: var(--paper);
  --bs-btn-hover-bg: var(--wash); --bs-btn-hover-border-color: var(--ink-3); --bs-btn-hover-color: var(--ink);
  --bs-btn-active-bg: var(--line); --bs-btn-active-border-color: var(--ink-3); --bs-btn-active-color: var(--ink);
  --bs-btn-disabled-color: var(--ink-3); --bs-btn-disabled-border-color: var(--line);
}
.btn-outline-danger {
  --bs-btn-color: var(--danger); --bs-btn-border-color: var(--line-2); --bs-btn-bg: var(--paper);
  --bs-btn-hover-bg: var(--danger); --bs-btn-hover-border-color: var(--danger); --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: #8f1d17; --bs-btn-active-border-color: #8f1d17; --bs-btn-active-color: #fff;
}
.btn-danger {
  --bs-btn-bg: var(--danger); --bs-btn-border-color: var(--danger);
  --bs-btn-hover-bg: #8f1d17; --bs-btn-hover-border-color: #8f1d17;
  --bs-btn-active-bg: #8f1d17; --bs-btn-active-border-color: #8f1d17;
}
.link-action { padding: 0; border: 0; background: none; color: var(--ink-2); font-size: .8125rem; }
.link-action:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.link-action.danger:hover { color: var(--danger); }
.row-actions { display: flex; flex-wrap: wrap; gap: .875rem; justify-content: flex-end; }

/* Forms */
.form-label { margin-bottom: .25rem; color: var(--ink-2); font-size: .8125rem; font-weight: 500; }
.form-control, .form-select {
  min-height: 34px; padding: .3rem .55rem;
  border-color: var(--line-2); border-radius: 4px;
  background-color: var(--paper); color: var(--ink); font-size: .875rem;
}
.form-select { padding-right: 1.75rem; background-position: right .45rem center; background-size: 12px 10px; }
.form-control::placeholder { color: var(--ink-3); opacity: 1; }
.form-control:focus, .form-select:focus { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.form-control[readonly] { background: var(--wash); color: var(--ink-2); }
.form-text { margin-top: .3rem; color: var(--ink-3); font-size: .8125rem; }
.form-check-input { width: 15px; height: 15px; margin-top: .15em; border-color: var(--ink-3); border-radius: 3px; }
.form-check-input:checked { border-color: var(--ink); background-color: var(--ink); }
.form-check-input:focus { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.form-check-input:disabled { opacity: .3; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: .375rem; }
.font-monospace { font-family: var(--mono) !important; font-size: .8125rem; }
.check-row { display: flex; align-items: center; gap: .5rem; padding: .15rem 0; }
.check-row label { margin: 0; }

/* Alerts */
.alert {
  --bs-alert-padding-y: .625rem; --bs-alert-padding-x: .875rem;
  --bs-alert-margin-bottom: 1.25rem;
  --bs-alert-border-radius: 4px;
  --bs-alert-bg: var(--wash); --bs-alert-border-color: var(--line); --bs-alert-color: var(--ink);
}
.alert-danger { --bs-alert-bg: #fbeeec; --bs-alert-border-color: #efc9c5; --bs-alert-color: #7d1a14; }

/* Dropdowns */
.dropdown-menu {
  --bs-dropdown-border-radius: 4px; --bs-dropdown-border-color: var(--line-2);
  --bs-dropdown-font-size: .8438rem; --bs-dropdown-padding-y: .25rem; --bs-dropdown-min-width: 11rem;
  --bs-dropdown-link-hover-bg: var(--wash); --bs-dropdown-link-active-bg: var(--ink);
  --bs-dropdown-item-padding-y: .35rem; --bs-dropdown-item-padding-x: .75rem;
  --bs-dropdown-divider-bg: var(--line);
  box-shadow: 0 6px 20px rgba(20, 21, 19, .1);
}
.dropdown-divider { margin: .25rem 0; }

/* Ledger tables: a heavy rule under the header, hairlines between rows, no boxes. */
.table {
  --bs-table-bg: transparent; --bs-table-color: var(--ink); --bs-table-hover-bg: var(--wash); --bs-table-hover-color: var(--ink);
  --bs-table-border-color: var(--line);
  margin: 0; font-size: .875rem;
}
.table > thead > tr > th {
  padding: 0 .75rem .45rem;
  border-bottom: 1px solid var(--ink);
  color: var(--ink-3); font-size: .75rem; font-weight: 500; white-space: nowrap;
}
.table > tbody > tr > td { padding: .625rem .75rem; border-bottom-color: var(--line); }
.table > tbody > tr:last-child > td { border-bottom-color: var(--line-2); }
.table > * > tr > :first-child { padding-left: 0; }
.table > * > tr > :last-child { padding-right: 0; }
.table-hover > tbody > tr:hover > * { --bs-table-bg-state: var(--wash); }
.table .text-end { font-variant-numeric: tabular-nums; }
.table-responsive { position: relative; }
.table .badge { --bs-badge-font-size: .875rem; font-weight: 400; }
.cell-primary { font-weight: 550; }
.cell-muted { color: var(--ink-2); }
.table-note { margin-top: .75rem; }

/* Status words read as a dot plus text, not coloured pills. */
.badge {
  --bs-badge-padding-x: 0; --bs-badge-padding-y: 0; --bs-badge-font-size: .8125rem; --bs-badge-font-weight: 500;
  --bs-badge-border-radius: 0; --bs-badge-color: var(--ink);
  display: inline-flex; align-items: center; gap: .375rem;
  background: none !important; border: 0 !important; color: var(--ink) !important; vertical-align: baseline;
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); }
.badge.text-bg-success::before { background: var(--r5); }
.badge.text-bg-warning::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink-2); }
.badge.text-bg-primary::before { background: var(--ink); }

/* Pagination (markup is shared with public pages, so it is only restyled here). */
.pagination { --bs-pagination-font-size: .8125rem; gap: .125rem; }
.page-link {
  padding: .15rem .45rem; border: 0; border-radius: 3px;
  background: none; color: var(--ink);
}
.page-link:hover { background: var(--wash); color: var(--ink); }
.page-link:focus { box-shadow: none; background: none; }
.page-link:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.page-item.active .page-link { background: var(--ink); color: #fff; }
.page-item.disabled .page-link { background: none; color: var(--line-2); }
.page-item:first-child .page-link, .page-item:last-child .page-link { border-radius: 3px; }
.pager { padding: .75rem 0; }
.pager-top { padding: 0 0 1rem; }
.pager .small { color: var(--ink-3) !important; font-size: .8125rem; }

/* Rating data */
.rate {
  display: grid; place-items: center;
  width: 26px; height: 26px; border-radius: 3px;
  font-size: .8125rem; font-weight: 600;
}
.rate[data-rating="1"] { background: var(--r1-bg); color: var(--r1-fg); }
.rate[data-rating="2"] { background: var(--r2-bg); color: var(--r2-fg); }
.rate[data-rating="3"] { background: var(--r3-bg); color: var(--r3-fg); }
.rate[data-rating="4"] { background: var(--r4-bg); color: var(--r4-fg); }
.rate[data-rating="5"] { background: var(--r5-bg); color: var(--r5-fg); }
.rate-sm { width: 18px; height: 18px; margin-left: auto; font-size: .6875rem; }
.star-col { width: 48px; }
.mix { display: flex; gap: 1px; width: 100%; height: 8px; vertical-align: middle; }
.mix i { display: block; flex-basis: 0; min-width: 1px; }
.mix i[data-star="1"] { background: var(--r1); }
.mix i[data-star="2"] { background: var(--r2); }
.mix i[data-star="3"] { background: var(--r3); }
.mix i[data-star="4"] { background: var(--r4); }
.mix i[data-star="5"] { background: var(--r5); }

/* Tabs */
.tabs { display: flex; gap: 1.25rem; overflow-x: auto; scrollbar-width: none; }
.tabs a {
  padding: .35rem 0 .45rem; border-bottom: 2px solid transparent;
  color: var(--ink-2); font-size: .8438rem; white-space: nowrap;
}
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a[aria-current] { border-bottom-color: var(--ink); color: var(--ink); font-weight: 550; }

/* Product Explorer */
.explorer { display: grid; grid-template-columns: 208px minmax(0, 1fr); gap: 0 2.5rem; align-items: start; }
.explorer-rail { position: sticky; top: calc(var(--bar-height) + 1.75rem); display: grid; gap: .875rem; }
.explorer-title { padding-bottom: .25rem; }
.explorer-title h1 { font-size: 1.375rem; line-height: 44px; white-space: nowrap; }
.explorer-title p { margin: 0; color: var(--ink-2); font-size: .8125rem; }
.explorer-rail-toggle { display: none; }
.explorer-rail-actions { display: flex; gap: .5rem; align-items: center; justify-content: space-between; padding-top: .25rem; }
.explorer-search { position: relative; display: flex; gap: .5rem; margin-bottom: .75rem; }
.explorer-search svg {
  position: absolute; top: 50%; left: .75rem; width: 16px; height: 16px;
  transform: translateY(-50%); color: var(--ink-3); pointer-events: none;
}
.explorer-search input { min-height: 44px; padding-left: 2.25rem; font-size: 1rem; }
.explorer-search input:focus { box-shadow: none; }
.explorer-search .btn { flex: none; min-height: 44px; }
.explorer-bar { display: flex; gap: 1rem 2rem; align-items: flex-end; justify-content: space-between; margin-bottom: 1rem; }
.explorer-sort { display: flex; flex: none; gap: .5rem; align-items: center; padding-bottom: .2rem; }
.explorer-sort label { margin: 0; white-space: nowrap; }
.explorer-sort select { width: auto; min-height: 30px; font-size: .8125rem; }
.results .select-cell { width: 34px; }
.results .image-cell { width: 76px; padding-right: .25rem; padding-left: 0; }
.results img, .product-image-empty { display: block; width: 60px; height: 60px; object-fit: contain; mix-blend-mode: multiply; }
.product-image-empty { display: grid; place-items: center; background: var(--wash); color: var(--ink-3); font-size: .6875rem; text-align: center; }
.results .title { display: -webkit-box; overflow: hidden; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-weight: 550; line-height: 1.3; }
.results .code { margin-top: .2rem; color: var(--ink-3); font-size: .75rem; }
.results .mix-cell { width: 148px; }
.results .num { width: 72px; text-align: right; }
.results .date { width: 112px; color: var(--ink-2); text-align: right; white-space: nowrap; }
.results tbody tr:has(.product-selector:checked) > * { --bs-table-bg-state: var(--wash); }
.results tbody tr:has(.product-selector:disabled) img { opacity: .45; }
.explorer-note { padding: .75rem 0 0; color: var(--ink-3); font-size: .8125rem; }

/* Selection dock */
.selection-bar { position: fixed; right: 0; bottom: 0; left: 0; z-index: 1040; background: var(--bar); color: #fff; }
.selection-form { display: flex; flex-wrap: wrap; gap: .625rem 1rem; align-items: center; padding: .625rem var(--gutter); }
.selection-count { font-size: .875rem; font-weight: 550; white-space: nowrap; }
.selection-form .form-control {
  flex: 1 1 16rem; width: auto; border-color: rgba(255, 255, 255, .28);
  background: rgba(255, 255, 255, .07); color: #fff;
}
.selection-form .form-control::placeholder { color: rgba(255, 255, 255, .6); }
.selection-form .form-control:focus { border-color: #fff; box-shadow: 0 0 0 1px #fff; }
.selection-form .btn-primary { --bs-btn-bg: #fff; --bs-btn-border-color: #fff; --bs-btn-color: var(--ink); --bs-btn-hover-bg: var(--line); --bs-btn-hover-border-color: var(--line); --bs-btn-hover-color: var(--ink); }
.selection-form .link-action { color: rgba(255, 255, 255, .75); }
.selection-form .link-action:hover { color: #fff; }
.selection-form :focus-visible { outline-color: #fff; }
.product-selection-active .content { padding-bottom: var(--product-selection-space, 4rem); }

/* Empty states */
.empty { padding: 3.5rem 1rem; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); text-align: center; }
.empty h2 { margin-bottom: .375rem; }
.empty p { margin: 0 auto; max-width: 34rem; color: var(--ink-2); }
.empty .btn { margin-top: 1rem; }

/* Reviews */
.filter-bar {
  display: grid; gap: .75rem; align-items: end;
  grid-template-columns: minmax(14rem, 1fr) repeat(2, 8.5rem) repeat(2, 9.5rem) auto;
  margin-bottom: 1.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--line);
}
.filter-actions { display: flex; gap: .75rem; align-items: center; }
.reviews-table { table-layout: fixed; }
.reviews-table .col-rating { width: 44px; }
.reviews-table .col-product { width: 25%; }
.reviews-table .col-reviewer { width: 12%; }
.reviews-table .col-date { width: 92px; }
.reviews-table tbody td { vertical-align: top; padding-block: .875rem; }
.review-heading { display: block; margin-bottom: .2rem; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.review-body {
  display: -webkit-box; margin: 0; max-width: 46rem; overflow: hidden;
  -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  color: var(--ink-2); font: 400 .9375rem/1.45 var(--serif); overflow-wrap: anywhere;
}
.review-body.is-open { display: block; }
.table-hover > tbody > tr:hover { --row-bg: var(--wash); }
.review-text { position: relative; max-width: 46rem; }
.review-more {
  position: absolute; right: 0; bottom: 0; padding-left: 2rem;
  background: linear-gradient(90deg, transparent, var(--row-bg) 1.25rem);
  color: var(--ink); font-size: .8125rem; line-height: 1.45rem; text-decoration: underline; text-underline-offset: 2px;
}
.review-more[aria-expanded="true"] { position: static; display: block; padding: 0; background: none; }
.title-status { margin-left: .625rem; letter-spacing: 0; }
.review-product { display: flex; gap: .625rem; min-width: 0; }
.review-product img, .review-product .thumb-empty { flex: none; width: 40px; height: 40px; object-fit: contain; mix-blend-mode: multiply; }
.review-product .thumb-empty { background: var(--wash); }
.review-product .title { display: -webkit-box; overflow: hidden; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: .8125rem; line-height: 1.3; }
.review-product .code { display: block; margin-top: .15rem; color: var(--ink-3); font-size: .75rem; }
.reviews-table .cell-reviewer, .reviews-table .cell-date { color: var(--ink-2); font-size: .8125rem; overflow-wrap: anywhere; }

/* Product detail */
.product-head { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; gap: 1.5rem; align-items: start; margin-bottom: 2rem; }
.product-head img, .product-head .product-image-empty { width: 112px; height: 112px; object-fit: contain; }
.product-head h1 { max-width: 52rem; font-size: 1.375rem; line-height: 1.25; }
.product-head .code { margin-top: .5rem; color: var(--ink-3); font-size: .8125rem; }
.product-grid { display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 3rem; align-items: start; }
.product-rail { position: sticky; top: calc(var(--bar-height) + 1.5rem); padding-top: .75rem; border-top: 1px solid var(--ink); }
.score { display: flex; gap: .625rem; align-items: baseline; margin-bottom: 1rem; }
.score strong { font-size: 2.5rem; font-weight: 500; line-height: 1; letter-spacing: -.02em; }
.score span { color: var(--ink-2); font-size: .8125rem; }
.dist { display: grid; gap: .375rem; margin: 0 0 1rem; }
.dist-row { display: grid; grid-template-columns: 3.25rem minmax(0, 1fr) 2.75rem; gap: .5rem; align-items: center; font-size: .8125rem; }
.dist-row > span:first-child { color: var(--ink-2); }
.dist-row > span:last-child { text-align: right; }
.dist-track { display: block; height: 12px; background: var(--wash); }
.dist-fill { display: block; height: 100%; }
.dist-row:nth-child(1) .dist-fill { background: var(--r5); }
.dist-row:nth-child(2) .dist-fill { background: var(--r4); }
.dist-row:nth-child(3) .dist-fill { background: var(--r3); }
.dist-row:nth-child(4) .dist-fill { background: var(--r2); }
.dist-row:nth-child(5) .dist-fill { background: var(--r1); }
.product-rail-note { margin: 0; color: var(--ink-3); font-size: .8125rem; }
.review-feed { border-top: 1px solid var(--ink); }
.review-item { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 0 .875rem; padding: 1.125rem 0; border-bottom: 1px solid var(--line); }
.review-item .review-text { max-width: 44rem; }
.review-item .review-body { -webkit-line-clamp: 5; color: var(--ink); max-width: 44rem; }
.review-item .review-body.is-open { display: block; }
.review-meta { margin-top: .4rem; color: var(--ink-3); font-size: .8125rem; }

/* Form pages */
.section { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 1rem 2.5rem; padding: 1.5rem 0; border-top: 1px solid var(--line); }
.section:first-of-type { border-top: 1px solid var(--ink); }
.section-intro p { margin: .25rem 0 0; color: var(--ink-3); font-size: .8125rem; }
.section-body { max-width: 34rem; display: grid; gap: 1rem; }
.section-body > .actions { display: flex; gap: .5rem; align-items: center; }
.section-full { padding-top: 1.5rem; }
.section-head { display: flex; flex-wrap: wrap; gap: .5rem 2rem; align-items: flex-end; justify-content: space-between; margin-bottom: 1.25rem; }
.section-head p { margin: .2rem 0 0; color: var(--ink-3); font-size: .8125rem; }
.plan-summary { display: grid; grid-template-columns: 13rem minmax(0, 1fr); gap: .375rem 1rem; margin: 0; }
.plan-summary > div { display: contents; }
.plan-summary dt { color: var(--ink-3); font-weight: 400; }
.plan-summary dd { margin: 0; font-weight: 550; }
.plan-section { border-top: 1px solid var(--line); }
.plan-table td, .plan-table th { white-space: nowrap; }
.plan-table .plan-picked > td { background: var(--wash); }
.form-sheet { display: grid; gap: 1.125rem; padding-top: 1.25rem; border-top: 1px solid var(--ink); }
.form-actions { display: flex; gap: .5rem; align-items: center; padding-top: .25rem; }
.source-tabs { margin-bottom: 1.5rem; border-bottom: 1px solid var(--line); }
.source-tabs + .form-sheet { padding-top: 0; border-top: 0; }
.confirm { padding-top: 1.25rem; border-top: 1px solid var(--danger); }
.confirm dl { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: .375rem 1rem; margin: 0 0 1rem; }
.confirm dt { color: var(--ink-3); font-weight: 400; }
.confirm dd { margin: 0; font-weight: 550; overflow-wrap: anywhere; }
.confirm p { max-width: 34rem; margin: 0 0 1.25rem; color: var(--ink-2); }

/* Loading */
.loading { padding-top: 1.25rem; border-top: 1px solid var(--ink); }
.estimated-progress-meta { display: flex; gap: 1rem; align-items: baseline; justify-content: space-between; margin-bottom: .5rem; }
.estimated-progress-percent { font-size: 2.5rem; font-weight: 500; line-height: 1; letter-spacing: -.02em; }
.estimated-progress-track { height: 4px; background: var(--line); }
.estimated-progress-bar { width: 0; height: 100%; background: var(--ink); transition: width .5s linear; }
.loading-term { min-height: 1.25rem; margin-top: .625rem; color: var(--ink-3); font: 400 .8125rem var(--mono); transition: opacity .2s; }
#loading-message { margin: 1rem 0 0; color: var(--ink-2); }

/* Admin */
.admin-table { font-size: .8125rem; }
.admin-table > tbody > tr > td { padding: .5rem .625rem; }
.admin-table .cell-date { white-space: nowrap; }
.admin-table > thead > tr > th { padding-inline: .625rem; }
.admin-user-source { max-width: 13rem; overflow-wrap: anywhere; }
.admin-activity-user { max-width: 12rem; overflow-wrap: anywhere; }
.stat-chart { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 1.5rem 2.5rem; padding: 1.25rem 0 2rem; border-top: 1px solid var(--ink); }
.stat-chart + .stat-chart { border-top-color: var(--line); }
.stat-chart .empty { padding: 0; border: 0; text-align: left; }
.stat-chart .empty p { margin: .2rem 0 0; }
.stat-chart header p { margin: .2rem 0 0; color: var(--ink-3); font-size: .8125rem; }
.stat-list { display: grid; gap: .75rem; margin: 1.25rem 0 0; }
.stat-list dt { color: var(--ink-3); font-size: .75rem; font-weight: 400; }
.stat-list dd { margin: 0; font-size: 1.25rem; font-weight: 500; letter-spacing: -.01em; line-height: 1.2; }
.stats-chart { position: relative; height: 220px; min-width: 0; }

/* Public pages */
.public-bar { justify-content: space-between; }
.public-bar-actions { display: flex; gap: 1.25rem; align-items: center; }
.public-sign-in { color: rgba(255, 255, 255, .8); font-size: .8438rem; font-weight: 500; }
.public-sign-in:hover { color: #fff; }
.public-sign-up:focus-visible { outline: 2px solid #fff; outline-offset: 2px; box-shadow: none; }
.public-sign-up { --bs-btn-bg: #fff; --bs-btn-border-color: #fff; --bs-btn-color: var(--ink); --bs-btn-hover-bg: var(--line); --bs-btn-hover-border-color: var(--line); --bs-btn-hover-color: var(--ink); --bs-btn-active-bg: var(--line-2); --bs-btn-active-border-color: var(--line-2); --bs-btn-active-color: var(--ink); }
.public-head h1 { max-width: 40rem; font-size: 2rem; line-height: 1.15; letter-spacing: -.015em; }
.public-head p:last-child { max-width: 44rem; font-size: 1rem; }
.page-head .public-kicker { margin: 0 0 .5rem; color: var(--ink-3); font-size: .8125rem; }
.public-list { border-top: 1px solid var(--ink); }
.source-tabs + .public-list { border-top: 0; }
.public-row { display: flex; gap: 1rem 3rem; align-items: baseline; justify-content: space-between; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.public-row:last-child { border-bottom-color: var(--line-2); }
.public-row > div:first-child { min-width: 0; }
.public-row h2 { font-size: 1rem; overflow-wrap: anywhere; }
.public-row p { max-width: 46rem; margin: .25rem 0 0; color: var(--ink-2); font: 400 .9375rem/1.45 var(--serif); }
.public-row-meta { flex: none; color: var(--ink-3); font-size: .8125rem; text-align: right; }
.page-head .public-meta { color: var(--ink-3); font-size: .8125rem; }
.public-cta { display: flex; flex-wrap: wrap; gap: .75rem 2rem; align-items: center; justify-content: space-between; margin-bottom: 1.75rem; padding: .75rem 1rem; background: var(--wash); }
.public-cta p { margin: 0; font-weight: 550; }
.public-cta-actions { display: flex; gap: 1rem; align-items: center; }
.public-related { padding-top: 1.5rem; }
.public-related .section-head { margin-bottom: .75rem; }
.public-related ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: 0 2.5rem; margin: 0; padding: 0; border-top: 1px solid var(--ink); list-style: none; }
.public-related li { padding: .625rem 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.reviews-table.public-reviews .col-product { width: 28%; }
.reviews-table.public-reviews .col-reviewer { width: 11%; }

/* Responsive */
@media (max-width: 1199.98px) {
  .filter-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-bar > :first-child, .filter-actions { grid-column: 1 / -1; }
  .app-nav-links { gap: 1rem; }
}
@media (max-width: 991.98px) {
  .app-bar { flex-wrap: wrap; gap: 0; padding: 0 1rem; }
  .public-bar { flex-wrap: nowrap; }
  .navbar-brand { min-height: var(--bar-height); }
  .app-nav-toggle { display: grid; place-items: center; width: 44px; height: var(--bar-height); margin-right: -.625rem; }
  .app-nav { flex-basis: 100%; }
  .app-nav:not(.show):not(.collapsing) { display: none; }
  .app-nav.show, .app-nav.collapsing { display: block; }
  .app-nav-links { flex-direction: column; gap: 0; padding-bottom: .5rem; }
  .app-bar .nav-link { min-height: 40px; padding: 0; border-bottom: 0; }
  .app-bar .nav-link.active { font-weight: 600; }
  .app-nav-sep { width: 100%; height: 1px; margin: .25rem 0; }
  .app-user { min-height: 44px; border-top: 1px solid rgba(255, 255, 255, .22); }
  .page { padding: 1.25rem 1rem 3rem; }
  .explorer { grid-template-columns: minmax(0, 1fr); }
  .explorer-rail { position: static; margin-bottom: 1rem; }
  .explorer-rail-toggle {
    display: flex; justify-content: space-between; width: 100%; padding: .5rem 0;
    border: 0; border-block: 1px solid var(--line); background: none; font-size: .8438rem; font-weight: 550;
  }
  .explorer-rail-toggle::after { content: "+"; }
  .explorer-rail-toggle[aria-expanded="true"]::after { content: "\2212"; }
  .explorer-fields:not(.show):not(.collapsing) { display: none; }
  .explorer-fields { display: grid; gap: .875rem; padding-top: .75rem; }
  .explorer-fields .field-grid-sm { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
  .product-grid { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .product-rail { position: static; }
  .section { grid-template-columns: minmax(0, 1fr); }
  .stat-chart { grid-template-columns: minmax(0, 1fr); }
  .stat-list { grid-auto-flow: column; }
  .table-stack > thead { display: none; }
  .table-stack, .table-stack > tbody, .table-stack > tbody > tr, .table-stack > tbody > tr > td { display: block; width: 100% !important; }
  .table-stack > tbody > tr { position: relative; padding: .875rem 0; border-bottom: 1px solid var(--line); }
  .table-stack > tbody > tr > td { padding: 0; border: 0; }
  .results > tbody > tr { display: grid; grid-template-columns: 26px 68px minmax(0, 1fr) minmax(0, 1fr); gap: 0 .375rem; align-items: start; }
  .results > tbody > tr > td { width: auto !important; }
  .results .title-cell { grid-column: 3 / -1; }
  .results .image-cell { grid-row: span 4; }
  .results .select-cell { grid-row: span 4; }
  .results .mix-cell { grid-column: 3 / -1; padding: .5rem 0 .375rem; }
  .results .num { width: auto; text-align: left; font-size: .8125rem; }
  .results .date { grid-column: 3 / -1; width: auto; color: var(--ink); text-align: left; font-size: .8125rem; white-space: normal; }
  .results .stack-label::after { content: attr(data-label); margin-left: .25rem; color: var(--ink-3); }
  .reviews-table > tbody > tr { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 0 .75rem; }
  .reviews-table > tbody > tr > td { grid-column: 2 / -1; }
  .reviews-table > tbody > tr > td:first-child { grid-column: 1; grid-row: 1 / span 3; }
  .reviews-table .cell-product { margin-top: .625rem; }
  .reviews-table .cell-reviewer, .reviews-table .cell-date { grid-column: auto; margin-top: .375rem; }
  .list-table > tbody > tr > td:not(:first-child):not(:last-child) { display: inline; width: auto !important; color: var(--ink-2); font-size: .8125rem; text-align: left; }
  .list-table > tbody > tr > td:not(:first-child):not(:last-child):not(:nth-last-child(2))::after { content: " \00b7 "; }
  .list-table > tbody > tr > td[data-label]::before { content: attr(data-label) " "; color: var(--ink-3); }
  .list-table .badge { --bs-badge-font-size: .8125rem; }
  .row-actions { justify-content: flex-start; margin-top: .375rem; }
  .product-head { grid-template-columns: 72px minmax(0, 1fr); gap: 1rem; }
  .product-head img, .product-head .product-image-empty { width: 72px; height: 72px; }
  .product-head .page-actions { grid-column: 1 / -1; }
  .stats-chart { height: 200px; }
  .public-head h1 { font-size: 1.625rem; }
  .public-row { flex-direction: column; gap: .375rem; }
  .public-row-meta { text-align: left; }
  td:has(> .review-product) { min-width: 16rem; }
  .results tbody tr:has(.product-selector:checked) { background: var(--wash); }
  .results tbody tr:has(.product-selector:checked) > * { --bs-table-bg-state: transparent; }
}
@media (max-width: 575.98px) {
  .explorer-bar { flex-direction: column; align-items: stretch; }
  .filter-bar { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .selection-count { flex: 1; }
  .selection-form .form-control { order: 3; flex-basis: 100%; }
  .selection-form .btn-primary { order: 4; width: 100%; }
}
@media print {
  .app-bar, .selection-bar, .review-more, .filter-bar, .page-actions, .row-actions { display: none !important; }
  .review-body, .review-item .review-body { display: block; overflow: visible; -webkit-line-clamp: none; line-clamp: none; }
  .explorer-rail, .product-rail { position: static; }
}
@media (prefers-reduced-motion: reduce) {
  .estimated-progress-bar, .loading-term { transition: none; }
}
