:root { --table-ink:#283a6e; --table-paper:#f5f5f2; --table-line:#dce1e9; --ease-drawer:cubic-bezier(.32,.72,0,1); --tile-edge:min(76px,calc((100vw - 170px)/16)); }
html { scrollbar-gutter:stable; }
body.table-app { margin:0; background:#fff; color:#232b38; }
body.is-reading { overflow:hidden; }
.table-site-header { height:64px; padding:0 40px; display:flex; align-items:center; gap:32px; border-bottom:1px solid var(--table-line); background:#fff; position:sticky; top:0; z-index:70; }
.table-site-header > a:not(.logo) { margin-left:auto; font-size:14px; color:var(--table-ink); text-decoration:none; }
.locale-code { display:flex; align-items:center; gap:7px; color:var(--table-ink); font-size:13px; }
.table-main { --tile-edge:min(72px,calc((100cqw - 90px)/16)); container-type:inline-size; max-width:1472px; padding:0 40px 20px; margin:0 auto; }
.table-page-heading { height:88px; display:flex; align-items:center; justify-content:space-between; gap:24px; }
.table-page-heading h1 { font-size:32px; line-height:1.15; font-weight:500; color:var(--table-ink); letter-spacing:-.025em; margin:0 0 5px; }
.table-page-heading p { margin:0; font-size:14px; line-height:1.4; color:#52627a; }
.restore-table { background:transparent; border:0; border-radius:3px; display:flex; align-items:center; gap:8px; min-height:44px; padding:6px 10px; font-size:14px; white-space:nowrap; }
.table-workspace { position:relative; display:block; }
.matrix-pane { min-width:0; min-height:0; position:relative; z-index:1; }
.matrix-tools { height:56px; gap:16px; align-items:center; padding:0 4px 12px; }
.matrix-tools:not([hidden]) { display:flex; }
.matrix-search { min-width:0; width:100%; display:flex; align-items:center; gap:8px; background:white; border-bottom:1px solid #aebad0; padding:0 2px; }
.matrix-search svg { width:18px; height:18px; }
.matrix-search input { font:inherit; font-size:14px; min-height:42px; width:100%; min-width:0; border:0; background:transparent; color:var(--table-ink); outline-offset:2px; }
.matrix-tools > span { font-size:12px; color:#52627a; font-variant-numeric:tabular-nums; padding-right:8px; }
.table-map { display:grid; grid-template-columns:repeat(16,var(--tile-edge)); grid-template-rows:repeat(5,max(68px,var(--tile-edge))) auto; gap:6px; }
.table-map .ingredient-group, .table-map .group-tiles { display:contents; }
.table-map .group-heading { grid-column:var(--label-col); grid-row:6; margin:6px 0 0; }
.ingredient-group { --fill:#e6eaf0; }
.group-heading { margin:0; font-size:13px; font-weight:500; line-height:1.3; color:#344568; min-width:0; }
.group-heading > span { display:inline-block; width:9px; height:9px; margin-right:5px; background:var(--fill); clip-path:polygon(0 0,75% 0,100% 25%,100% 100%,0 100%); }
.table-bands { display:grid; gap:22px; margin-top:24px; }
.table-bands .ingredient-group { display:grid; grid-template-columns:repeat(16,var(--tile-edge)); gap:6px; }
.table-bands .group-tiles { display:contents; }
.table-bands .group-heading { grid-column:1 / span 2; grid-row:1 / span var(--band-rows,1); padding-top:4px; }
.table-tile { position:relative; isolation:isolate; display:flex; flex-direction:column; align-items:flex-start; width:var(--tile-edge); height:var(--tile-edge); min-width:0; grid-column:var(--col); grid-row:var(--row); padding:6px 5px 5px 7px; background:transparent; border:0; border-radius:0; font:inherit; color:#283a6e; text-align:left; text-decoration:none; cursor:pointer; touch-action:manipulation; scroll-margin:100px 20px 24px; }
.table-tile::before { content:""; position:absolute; inset:0; z-index:-1; background:var(--fill); clip-path:polygon(0 0,76% 0,100% 24%,100% 100%,0 100%); }
.table-tile::after { content:""; position:absolute; width:13%; height:13%; right:0; top:0; background:#c28a3b; clip-path:polygon(0 0,100% 0,100% 100%); opacity:0; }
.table-tile[data-selected=true] { color:white; }
.table-tile[data-selected=true]::before { background:#283a6e; }
.table-tile[data-selected=true]::after { opacity:1; }
.table-tile:active { transform:scale(.975); }
.tile-number { font-size:9px; line-height:10px; opacity:.9; font-variant-numeric:tabular-nums; }
.tile-symbol { font-weight:600; font-size:23px; line-height:25px; margin-top:2px; }
.tile-name { font-size:9.5px; line-height:11px; margin-top:auto; overflow-wrap:anywhere; hyphens:auto; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; }
.table-workspace.is-open { display:grid; grid-template-columns:minmax(0,1fr) minmax(440px,520px); gap:28px; height:calc(100dvh - 168px); }
.is-open .matrix-pane { display:flex; flex-direction:column; padding-right:4px; }
.is-open .matrix-scroll { min-height:0; flex:1; overflow-y:auto; overflow-x:hidden; overscroll-behavior:contain; scrollbar-width:thin; scrollbar-color:#b4bfd0 transparent; padding:4px 12px 32px 4px; }
.is-open .table-map, .is-open .table-bands { display:block; margin:0; }
.is-open .ingredient-group { display:block; margin:0 0 22px; }
.is-open .group-heading { margin:0 0 9px; padding:0; }
.is-open .group-tiles { display:grid; grid-template-columns:repeat(auto-fill,var(--tile-edge)); gap:6px; }
.is-open .table-tile { grid-column:auto; grid-row:auto; }
.table-reader { min-width:0; min-height:0; overflow-y:auto; overflow-x:hidden; scrollbar-width:thin; scrollbar-color:#b4bfd0 transparent; background:white; border-radius:3px; box-shadow:0 12px 34px #17223812; border-left:1px solid #e3e7ee; position:relative; z-index:40; overscroll-behavior:contain; }
.reader-toolbar { position:sticky; top:0; min-height:44px; display:flex; align-items:center; justify-content:flex-end; z-index:2; background:linear-gradient(white 70%,#ffffff00); pointer-events:none; }
.reader-close, .reader-back { pointer-events:auto; min-width:44px; height:44px; display:inline-flex; align-items:center; justify-content:center; gap:5px; padding:8px; color:#283a6e; background:white; border:0; border-radius:3px; cursor:pointer; }
.reader-close { margin:8px 10px 0 0; }
.reader-back { display:none; font-size:14px; }
.table-reader .passport { padding:0 30px 26px; border-radius:0; box-shadow:none; }
.table-reader .passport-heading { margin:0 0 24px; gap:16px; }
.table-reader .identity h2 { font-size:32px; overflow-wrap:anywhere; }
.table-reader .group-name { font-size:12px; text-decoration:none; color:#52627a; }
.table-reader .description { font-size:17px; }
.table-reader .passport-fields > div { grid-template-columns:116px minmax(0,1fr); gap:16px; }
.table-reader .passport-fields dt { font-size:12px; }
.table-reader .passport-fields dd { font-size:15px; }
.table-reader .products-link { font-size:15px; }
.table-reader .passport-actions { margin-top:18px; }
.table-reader .source-details { margin-top:20px; }
.screen-notes { margin-top:28px; padding:16px 0 0; border-top:1px solid var(--table-line); font-size:12px; color:#52627a; }
.screen-notes p { margin:0; }
.is-reading .screen-notes { display:none; }
.empty-results { color:#52627a; font-size:15px; margin:20px 4px; }
.motion-layer { position:fixed; inset:0; z-index:30; pointer-events:none; overflow:hidden; }
.motion-cell { position:fixed; margin:0; transform-origin:0 0; pointer-events:auto; }
.motion-flight { position:fixed; z-index:65; margin:0; pointer-events:none; transform-origin:0 0; }
.reader-ghost { position:fixed; z-index:40; pointer-events:none; margin:0; }
.table-tile:focus-visible, .reader-close:focus-visible, .reader-back:focus-visible, .restore-table:focus-visible, input:focus-visible { outline:2px solid #283a6e; outline-offset:3px; }
@media (hover:hover) and (pointer:fine) {
  .table-tile:not([data-selected=true]):hover::after { opacity:.65; }
  .reader-close:hover, .reader-back:hover, .restore-table:hover { background:#eff2f7; }
}
@media (max-width:1099px) {
  .table-map, .table-bands { display:block; margin:0; }
  .table-map .ingredient-group, .table-bands .ingredient-group { display:block; margin-bottom:24px; }
  .table-map .group-tiles, .table-bands .group-tiles { display:grid; grid-template-columns:repeat(5,var(--tile-edge)); gap:6px; }
  .table-map .group-heading, .table-bands .group-heading { margin:0 0 9px; padding:0; }
  .table-tile { grid-column:auto; grid-row:auto; }
  .ingredient-matrix { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; }
  .table-workspace.is-open { grid-template-columns:minmax(0,1fr) minmax(420px,48%); gap:20px; }
  .is-open .ingredient-matrix { display:block; }
  .is-open .group-tiles { grid-template-columns:repeat(auto-fill,var(--tile-edge)); }
  .table-reader .passport { padding-inline:24px; }
}
@media (max-width:959px) {
  .table-main { --tile-edge:calc((100cqw - 24px)/5); }
  .table-site-header { height:56px; padding:0 20px; gap:18px; }
  .table-site-header .logo img { width:132px; height:26px; }
  .table-site-header > a:not(.logo) { font-size:13px; }
  .table-main { padding:0 16px 24px; }
  .table-page-heading { height:auto; min-height:112px; padding:18px 0; gap:12px; }
  .table-page-heading h1 { font-size:28px; }
  .table-page-heading p { font-size:13px; max-width:34ch; }
  .ingredient-matrix { display:block; }
  .table-map .group-tiles, .table-bands .group-tiles, .is-open .group-tiles { grid-template-columns:repeat(5,minmax(0,1fr)); gap:6px; }
  .table-tile { width:100%; height:var(--tile-edge); padding:6px; }
  .table-workspace.is-open { display:block; height:auto; }
  .is-open .matrix-pane { display:block; padding:0; }
  .is-open .matrix-tools { display:none; }
  .is-open .matrix-scroll { overflow:visible; padding:0; }
  .table-reader { position:fixed; inset:56px 0 0; border:0; border-radius:0; height:calc(100dvh - 56px); z-index:50; box-shadow:none; }
  .reader-toolbar { justify-content:space-between; min-height:52px; padding:0 12px; background:white; }
  .reader-back { display:inline-flex; }
  .reader-close { margin:0; }
  .table-reader .passport { padding:16px 22px 24px; }
  .table-reader .identity h2 { font-size:30px; }
  .table-reader .passport-fields > div { display:block; }
  .table-reader .passport-fields dd { font-size:16px; }
  .table-reader .description { font-size:17px; }
  .restore-table { display:none !important; }
  .motion-flight { z-index:65; }
}
@media (min-width:640px) and (max-width:959px) {
  .table-main { --tile-edge:76px; }
  .ingredient-matrix { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; }
  .group-tiles { grid-template-columns:repeat(auto-fill,76px) !important; }
}
@media (prefers-reduced-motion:reduce) { .table-tile:active { transform:none; } }

/* The accepted world is preserved; this delta accommodates111 and long EN labels. */
.table-main{max-width:1392px}
.table-workspace:not(.is-open){max-width:1242px;margin-inline:auto}
.table-page-heading{max-width:1242px;margin-inline:auto}
.is-reading .table-page-heading{max-width:none}
.table-tile{height:max(68px,var(--tile-edge))}
.table-tile .tile-number{position:absolute;top:4px;left:6px;font-size:8px;line-height:9px}
.table-tile .tile-symbol{font-size:22px;line-height:24px;margin-top:9px}
.table-tile .tile-name{font-size:10px;line-height:11.5px;margin-top:auto;hyphens:manual}
.table-bands .ingredient-group{grid-auto-rows:max(68px,var(--tile-edge))}
.editorial-marker{position:absolute;right:12px;top:6px;width:8px;height:8px;fill:none;stroke:#986418;stroke-width:1.4}
.table-tile[data-selected=true] .editorial-marker{stroke:#efd39c}
.draft-reader-note{color:#52627a;font-size:16px;line-height:1.5}
.passport-actions:has(a[hidden]):not(:has(a:not([hidden]))){display:none}
::selection{background:#dce3f4;color:#283a6e}
input{caret-color:#283a6e}
a{text-underline-offset:.18em}
@media(min-width:960px) and (max-width:1099px){.table-main{--tile-edge:68px}.table-map .group-tiles,.table-bands .group-tiles{grid-template-columns:repeat(5,68px)}}
@media(max-width:639px){.table-tile{height:max(78px,var(--tile-edge))}.table-tile .tile-name{-webkit-line-clamp:3}.table-tile .tile-symbol{font-size:21px;line-height:23px;margin-top:8px}.table-reader{padding-bottom:env(safe-area-inset-bottom)}.table-bands .ingredient-group{grid-auto-rows:auto}}
@media(max-width:359px){.table-tile .tile-symbol{font-size:19px;line-height:22px}}
@media(max-width:359px){.table-tile[data-entry-id=msm] .tile-symbol{font-size:17px}}

::selection{background:#d8e0f3;color:#172b59} .table-reader{scrollbar-color:#aeb9cf #f5f6f8;scrollbar-width:thin} .matrix-search input{caret-color:#283a6e} .passport-fields dd{font-variant-numeric:tabular-nums} #ingredient-name:focus{outline:none}.table-page-heading .vt-table-intro{margin-bottom:0}
@media(max-width:959px){body.is-reading .vt-header{display:none}body.is-reading .table-reader{top:0;height:100dvh}}
