:root {
  --g50: #f0fdf4; --g100: #dcfce7; --g200: #bbf7d0; --g500: #22c55e; --g600: #16a34a; --g700: #15803d; --g800: #166534; --g900: #14532d;
  --s50: #f8fafc; --s100: #f1f5f9; --s200: #e2e8f0; --s300: #cbd5e1; --s500: #64748b; --s600: #475569; --s700: #334155; --s900: #0f172a;
  --rose: #e11d48; --amber: #b45309;
  --radius: 12px;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--s900); background: var(--s50);
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.45; }
a { color: var(--g700); }
h1 { font-size: 1.6rem; margin: .2rem 0 .6rem; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; margin: 1.8rem 0 .6rem; }
main { max-width: 1180px; margin: 0 auto; padding: 1rem; }
footer { max-width: 1180px; margin: 2rem auto; padding: 0 1rem 2rem; color: var(--s500); font-size: .82rem; }

.top { position: sticky; top: 0; z-index: 5; display: flex; gap: 1rem; align-items: center; justify-content: space-between;
  flex-wrap: wrap; padding: .6rem 1rem; background: var(--g900); color: #fff; }
.brand { display: flex; gap: .5rem; align-items: center; color: #fff; text-decoration: none; font-weight: 700; font-size: 1.15rem; }
.top nav { display: flex; gap: .2rem; flex-wrap: wrap; }
.top nav a { color: var(--g100); text-decoration: none; padding: .4rem .65rem; border-radius: 8px; font-size: .95rem; }
.top nav a.on, .top nav a:hover { background: rgba(255,255,255,.12); color: #fff; }
.top nav a.cta { background: var(--g500); color: var(--g900); font-weight: 600; }
.top nav a.quiet { opacity: .75; }
.pill { display: inline-block; font-size: .72rem; font-weight: 600; padding: .05rem .45rem; border-radius: 99px; background: var(--g100); color: var(--g800); }
.pill.warn { background: #fef3c7; color: var(--amber); }
.top .pill { background: var(--g500); color: var(--g900); }

.filters { background: #fff; border: 1px solid var(--s200); border-radius: var(--radius); padding: .8rem; margin-bottom: .8rem; }
.filters input[type=search] { width: 100%; font-size: 1.05rem; padding: .65rem .8rem; border: 1px solid var(--s300); border-radius: 10px; }
.filters .row { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; align-items: center; }
select, input[type=email], input[list], #storefilter { font: inherit; padding: .45rem .55rem; border: 1px solid var(--s300); border-radius: 8px; background: #fff; }
input[list] { width: 9rem; }
button, .button { font: inherit; cursor: pointer; border: 0; border-radius: 8px; padding: .5rem .9rem; background: var(--g700); color: #fff; font-weight: 600; text-decoration: none; display: inline-block; }
button:hover, .button:hover { background: var(--g800); }
label.check { display: inline-flex; gap: .35rem; align-items: center; }

.count { color: var(--s600); margin: .4rem 0 .8rem; }
.hint { color: var(--s500); font-size: .88rem; font-weight: normal; }
.empty { color: var(--s600); background: #fff; border: 1px dashed var(--s300); border-radius: var(--radius); padding: 1rem; }
.note { padding: .6rem .8rem; border-radius: 8px; }
.note.ok { background: var(--g100); color: var(--g800); }
.note.warn { background: #fef3c7; color: var(--amber); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .8rem; }
.card { position: relative; background: #fff; border: 1px solid var(--s200); border-radius: var(--radius); transition: box-shadow .15s, border-color .15s; }
.card:hover { border-color: var(--g200); box-shadow: 0 6px 18px rgba(20,83,45,.08); }
.card-link { display: flex; flex-direction: column; gap: .35rem; height: 100%; padding: .8rem .9rem; color: inherit; text-decoration: none; }
.card h3 { font-size: 1.02rem; margin: 0; padding-right: 2rem; line-height: 1.25; }
.meta { display: flex; gap: .35rem; flex-wrap: wrap; font-size: .74rem; }
.meta span, .disp { padding: .08rem .45rem; border-radius: 99px; background: var(--s100); color: var(--s700); font-weight: 600; font-size: .74rem; }
.disp.d-trulieve { background: #dcfce7; color: #166534; }
.disp.d-muv { background: #fee2e2; color: #991b1b; }
.disp.d-cookies { background: #dbeafe; color: #1e40af; }
.disp.d-green_dragon { background: #d1fae5; color: #065f46; }
.disp.d-sanctuary { background: #ede9fe; color: #5b21b6; }
.disp.d-curaleaf { background: #e0f2fe; color: #075985; }
.disp.d-flowery { background: #fce7f3; color: #9d174d; }
.disp.d-goldflower { background: #fef3c7; color: #92400e; }
.disp.d-eden { background: #ccfbf1; color: #115e59; }
.type.t-indica { background: #ede9fe; color: #6d28d9; }
.type.t-sativa { background: #fef3c7; color: #92400e; }
.type.t-hybrid { background: #e0f2fe; color: #075985; }
.brandname { color: var(--s500); font-size: .85rem; }
.nums { display: flex; gap: .8rem; font-size: .88rem; color: var(--s600); }
.nums b { color: var(--s900); }
.nums.big { font-size: 1rem; margin: .6rem 0; }
.terps { display: flex; gap: .3rem; flex-wrap: wrap; }
.terp { font-size: .74rem; padding: .08rem .45rem .08rem .4rem; border-radius: 99px; background: color-mix(in srgb, var(--c) 18%, white);
  color: var(--s700); border-left: 4px solid var(--c); }
.why { font-size: .8rem; color: var(--g700); }
.foot { margin-top: auto; display: flex; justify-content: space-between; gap: .5rem; padding-top: .35rem; font-size: .88rem; }
.price { font-weight: 700; color: var(--g800); }
.where { color: var(--s500); text-align: right; }

.heart { position: absolute; top: .55rem; right: .55rem; z-index: 2; width: 2.1rem; height: 2.1rem; padding: 0; border-radius: 99px;
  background: #fff; color: var(--s300); border: 1px solid var(--s200); font-size: 1.05rem; line-height: 1; }
.heart:hover { background: #fff1f2; color: var(--rose); }
.heart.on { color: var(--rose); background: #fff1f2; border-color: #fecdd3; }
.detail .heart, .favlist .heart { position: static; }

.detail { background: #fff; border: 1px solid var(--s200); border-radius: var(--radius); padding: 1rem 1.1rem; }
.detail-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.favs { display: flex; gap: .5rem; align-items: flex-start; }
.strain-fav { background: #fff; color: var(--g800); border: 1px solid var(--g200); font-weight: 600; }
.strain-fav.on { background: var(--g100); }
.strain-fav:hover { background: var(--g50); color: var(--g900); }
.strain { margin-top: .3rem; color: var(--s600); }

table.stock { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--s200); border-radius: var(--radius); overflow: hidden; }
.stock th, .stock td { text-align: left; padding: .5rem .7rem; border-bottom: 1px solid var(--s100); font-size: .92rem; }
.stock th { background: var(--s50); color: var(--s600); font-weight: 600; }
.stock tr.mine td { background: var(--g50); }

.favlist { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.favlist li { display: flex; justify-content: space-between; gap: 1rem; align-items: center; background: #fff; border: 1px solid var(--s200);
  border-left: 5px solid var(--s300); border-radius: 10px; padding: .6rem .8rem; }
.favlist li.instock { border-left-color: var(--g500); }
.favlist .status { display: flex; gap: .6rem; align-items: center; white-space: nowrap; }
.ok { color: var(--g700); font-weight: 600; }
.no { color: var(--s500); }

.settings fieldset { background: #fff; border: 1px solid var(--s200); border-radius: var(--radius); padding: .8rem 1rem; margin: 0 0 1rem; }
.settings legend { font-weight: 700; padding: 0 .3rem; }
.settings label { display: flex; gap: .5rem; align-items: center; margin: .35rem 0; }
.settings details { border-top: 1px solid var(--s100); padding: .4rem 0; }
.settings summary { cursor: pointer; font-weight: 600; }
.storelist { columns: 3 230px; padding: .4rem 0; }
.storelist .store { display: flex; break-inside: avoid; font-size: .9rem; margin: .15rem 0; }
#storefilter { width: 100%; margin: .3rem 0 .4rem; }

.pager { display: flex; gap: 1rem; justify-content: center; align-items: center; margin: 1.2rem 0; }

@media (max-width: 640px) {
  .top { padding: .5rem .7rem; }
  .top nav a { padding: .35rem .5rem; font-size: .88rem; }
  main { padding: .7rem; }
  .grid { grid-template-columns: 1fr; }
  .stock th:nth-child(5), .stock td:nth-child(5) { display: none; }
}

/* ---- Terprint bands, counts and lab profile (drawn by terprint-visuals via bands.js) ---- */
.grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.counts { display: flex; gap: .9rem; flex-wrap: wrap; font-size: .86rem; color: var(--s600); }
.counts b { color: var(--s900); }
.counts .tot-t { color: var(--g700); }
.counts .tot-c { color: #b45309; }
.bands { display: grid; gap: 2px; }
.tp-band { position: relative; width: 100%; min-height: 10px; line-height: 0; }
.tp-band svg { display: block; max-width: 100%; }
/* Pinned to the window and placed by bands.js, so no table, row or page edge can cut it off. */
.tp-band .terprint-tooltip { position: fixed !important; pointer-events: none; z-index: 60; line-height: 1.4; white-space: nowrap; }
/* No overflow rule here: with overflow-x set, the browser also clips downwards and cuts the hover tooltip off.
   The band is drawn to fit its box, so there is nothing to scroll. */
.tp-band.big { margin: .3rem 0 .2rem; }
.band-note { margin: .1rem 0 .6rem; }
.profile { background: #fff; border: 1px solid var(--s200); border-radius: var(--radius); padding: .4rem 1.1rem 1rem; margin-top: .8rem; }
.profile h2 { margin-top: 1rem; display: flex; gap: .5rem; align-items: baseline; flex-wrap: wrap; }
.count-pill { font-size: .8rem; font-weight: 700; padding: .05rem .5rem; border-radius: 99px; background: var(--g100); color: var(--g800); }
.analytes { list-style: none; margin: .4rem 0 0; padding: 0; columns: 2 300px; column-gap: 2rem; }
.analytes li { display: grid; grid-template-columns: 14px minmax(7.5rem, 11rem) 4.2rem 1fr; gap: .5rem; align-items: center;
  padding: .16rem 0; font-size: .92rem; break-inside: avoid; }
.analytes .swatch { width: 14px; height: 14px; border-radius: 4px; border: 1px solid rgba(15,23,42,.18); }
.analytes .av { font-variant-numeric: tabular-nums; font-weight: 600; text-align: right; }
.analytes .bar { height: 8px; background: var(--s100); border-radius: 99px; overflow: hidden; }
.analytes .bar i { display: block; height: 100%; border-radius: 99px; }
.charts { display: flex; flex-wrap: wrap; gap: 1.5rem; margin-top: 1rem; }
.charts figure { margin: 0; text-align: center; flex: 1 1 280px; max-width: 380px; }
.charts figcaption { color: var(--s500); font-size: .85rem; }
.tp-radar, .tp-donut { position: relative; width: 100%; }
.tp-radar svg, .tp-donut svg { max-width: 100%; height: auto; }
.tp-radar svg { overflow: visible; }
.charts figure { padding: 0 1.5rem; }
@media (max-width: 640px) {
  .grid { grid-template-columns: 1fr; }
  .analytes { columns: 1; }
  .analytes li { grid-template-columns: 14px minmax(6.5rem, 1fr) 4rem 30%; }
  .profile { padding: .2rem .8rem .8rem; }
}

/* ---- harvested from the original Terprint: droplet rating, match score, effects, lineage, guide ---- */
.drops { display: inline-flex; gap: 1px; vertical-align: -1px; }
/* How alike two products are: a ring and four meters, drawn by terprint-visuals into this box (bands.js). */
.tp-like { min-height: 48px; margin: .4rem 0 .45rem; line-height: 0; }
.tp-like .terprint-tooltip { line-height: 1.4; }
.ppg { font-weight: 500; color: var(--s500); font-size: .82rem; }
.lineage { margin-top: .25rem; color: var(--s600); display: flex; gap: .35rem; flex-wrap: wrap; align-items: center; }
.lineage .parent { background: var(--g50); border: 1px solid var(--g200); border-radius: 99px; padding: .05rem .6rem; text-decoration: none; font-weight: 600; }
.lineage .x { color: var(--s500); }
.feel { margin-top: .7rem; padding: .7rem .9rem; background: var(--g50); border: 1px solid var(--g100); border-radius: 10px; }
.feel-summary { margin: 0 0 .5rem; font-weight: 600; }
.feel-rows { display: grid; gap: .35rem; }
.feel-rows > div { display: flex; gap: .35rem; flex-wrap: wrap; align-items: center; }
.feel-h { font-size: .8rem; color: var(--s600); min-width: 9.5rem; }
.chip-e, .chip-a { font-size: .82rem; padding: .1rem .6rem; border-radius: 99px; background: #fff; border: 1px solid var(--s200); }
.chip-e { background: linear-gradient(90deg, var(--g200) var(--w), #fff var(--w)); border-color: var(--g200); }
.feel .hint { margin: .45rem 0 0; }
.chips { display: flex; gap: .4rem; flex-wrap: wrap; margin: 0 0 .8rem; }
.chip { padding: .2rem .75rem; border-radius: 99px; background: #fff; border: 1px solid var(--s200); text-decoration: none; color: var(--s700); font-size: .9rem; }
.chip.on { background: var(--g700); border-color: var(--g700); color: #fff; }
.guide { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: .8rem; margin: 1rem 0; }
.guide-item { background: #fff; border: 1px solid var(--s200); border-top: 5px solid var(--c); border-radius: var(--radius); padding: .3rem 1rem .6rem; scroll-margin-top: 5rem; }
.guide-item h2 { margin: .6rem 0 .3rem; display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.guide-item .swatch { width: 16px; height: 16px; border-radius: 4px; border: 1px solid rgba(15,23,42,.18); }
.guide-item p { margin: .3rem 0; font-size: .93rem; }
.guide-item dl { display: grid; grid-template-columns: 8.5rem 1fr; gap: .2rem .6rem; margin: .5rem 0; font-size: .9rem; }
.guide-item dt { color: var(--s600); }
.guide-item dd { margin: 0; }
.guide-item:target { box-shadow: 0 0 0 3px var(--g200); }
.legend { margin-bottom: .4rem; }
a.an { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--s300); justify-self: start; }
@media (max-width: 640px) { .feel-h { min-width: 100%; } }
.analytes.others li { grid-template-columns: 14px minmax(8rem, 11rem) 1fr; }
.analytes .aroma { color: var(--s600); font-size: .88rem; }

/* ---- merged sales pages: hero, features, how it works ---- */
.hero { background: linear-gradient(135deg, var(--g900), #0f3d24 60%, #134e4a); color: #fff; border-radius: 16px; padding: 2.2rem 1.6rem; margin-bottom: 1.2rem; }
.hero h1 { font-size: clamp(1.7rem, 4.2vw, 2.7rem); line-height: 1.12; margin: .4rem 0 .7rem; max-width: 22ch; color: #fff; }
.hero h1 span { color: #86efac; }
.hero-badge { display: inline-block; margin: 0; font-size: .85rem; background: rgba(255,255,255,.12); padding: .25rem .8rem; border-radius: 99px; }
.hero-sub { max-width: 62ch; color: #d1fae5; font-size: 1.05rem; margin: 0 0 1rem; }
.hero-cta { display: flex; gap: .6rem; flex-wrap: wrap; margin: 0; }
.button.big { padding: .7rem 1.2rem; font-size: 1.02rem; }
.hero .button { background: #fff; color: var(--g900); }
.hero .button:hover { background: var(--g100); }
.hero .button.ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.5); }
.hero .button.ghost:hover { background: rgba(255,255,255,.1); }
.hero-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1rem; margin-top: 1.6rem; }
.hero-stats b { display: block; font-size: 1.7rem; }
.hero-stats span { color: #a7f3d0; font-size: .88rem; }
.hero.compact { padding: 1.3rem 1.4rem; }
.hero.compact h1 { font-size: clamp(1.35rem, 3vw, 1.9rem); max-width: none; margin-top: 0; }
.hero.compact .hero-sub { font-size: .98rem; margin-bottom: .8rem; }
.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: .8rem; }
.features article { background: #fff; border: 1px solid var(--s200); border-radius: var(--radius); padding: .2rem 1rem .5rem; }
.features h3 { margin: .8rem 0 .3rem; font-size: 1.05rem; }
.features p { margin: .3rem 0 .6rem; color: var(--s700); font-size: .95rem; }
.how { background: #fff; border: 1px solid var(--s200); border-radius: var(--radius); padding: .6rem 1.2rem; }
.how li { margin: .5rem 0; }
.how h2 { font-size: 1.05rem; margin: 1.1rem 0 .3rem; }
.chips.cats { margin: 0 0 .5rem; }
.chip span { opacity: .7; font-size: .82em; margin-left: .15rem; }
.disp.d-lab { background: #fef9c3; color: #854d0e; }

/* Amount filters: sliders with a lowest and a highest handle */
.ranges { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .4rem 1.4rem; margin-top: .7rem; }
.rng { --lo: 0%; --hi: 100%; --c: var(--g600); min-width: 0; }
.rng-head { display: flex; align-items: center; gap: .4rem; font-size: .88rem; color: var(--s700); }
.rng-head .sw { width: .7rem; height: .7rem; border-radius: 3px; background: var(--c); border: 1px solid rgba(15,23,42,.25); flex: none; }
.rng-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rng-n { color: var(--s500); font-size: .76rem; }
.rng-head output { margin-left: auto; color: var(--s500); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rng.on .rng-head output { color: var(--g800); font-weight: 700; }
.rng-track { position: relative; height: 1.5rem; }
.rng-track::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 6px; transform: translateY(-50%); border-radius: 99px;
  background: linear-gradient(90deg, var(--s200) var(--lo), var(--c) var(--lo), var(--c) var(--hi), var(--s200) var(--hi));
  box-shadow: inset 0 0 0 1px rgba(15,23,42,.12); }
.rng-track input[type=range] { position: absolute; left: 0; top: 0; width: 100%; height: 1.5rem; margin: 0; padding: 0; border: 0;
  background: none; pointer-events: none; -webkit-appearance: none; appearance: none; }
.rng-track input[type=range]::-webkit-slider-runnable-track { background: none; height: 1.5rem; }
.rng-track input[type=range]::-moz-range-track { background: none; height: 1.5rem; }
.rng-track input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto; width: 18px; height: 18px; margin-top: 3px;
  border-radius: 50%; background: #fff; border: 2px solid var(--g800); box-shadow: 0 1px 2px rgba(15,23,42,.3); cursor: grab; }
.rng-track input[type=range]::-moz-range-thumb { pointer-events: auto; width: 14px; height: 14px; border-radius: 50%; background: #fff;
  border: 2px solid var(--g800); box-shadow: 0 1px 2px rgba(15,23,42,.3); cursor: grab; }
.rng-track input[type=range]:focus-visible { outline: none; }
.rng-track input[type=range]:focus-visible::-webkit-slider-thumb { outline: 3px solid var(--g500); outline-offset: 1px; }
.rng-track input[type=range]:focus-visible::-moz-range-thumb { outline: 3px solid var(--g500); outline-offset: 1px; }
.adv { margin-top: .5rem; border-top: 1px solid var(--s200); padding-top: .5rem; }
.adv summary { cursor: pointer; font-weight: 600; color: var(--g800); font-size: .93rem; }
.adv summary .badge { display: inline-block; min-width: 1.3rem; text-align: center; font-size: .75rem; font-weight: 700; padding: .05rem .4rem;
  border-radius: 99px; background: var(--g700); color: #fff; margin-left: .3rem; }
.adv summary .badge[hidden] { display: none; }
.rng:not(.on) .rng-track::before { opacity: .4; }
.adv-body { margin-top: .5rem; }
.adv-body h4 { margin: .9rem 0 .4rem; font-size: .95rem; }
.adv-body h4 span { font-weight: normal; color: var(--s500); font-size: .82rem; margin-left: .3rem; }
.adv-body .hint { margin: 0; }
.adv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: .35rem 1.4rem; }
.adv-actions { margin: .9rem 0 .2rem; display: flex; gap: .5rem; }
button.ghost { background: #fff; color: var(--g800); border: 1px solid var(--s300); }
button.ghost:hover { background: var(--g50); }
.chips.active { margin: 0 0 .5rem; }
.chips.active .chip span { opacity: .85; margin-left: .25rem; font-size: 1em; }

/* List view: main product data and the full terpene band, with the terpenes as sortable column headers */
main.wide { max-width: 1400px; }
.viewswitch { float: right; display: inline-flex; border: 1px solid var(--s300); border-radius: 8px; overflow: hidden; font-size: .88rem; }
.viewswitch a { padding: .25rem .7rem; text-decoration: none; color: var(--s700); background: #fff; }
.viewswitch a.on { background: var(--g700); color: #fff; }
.plist-wrap { background: #fff; border: 1px solid var(--s200); border-radius: var(--radius); }
@media (max-width: 1380px) { .plist-wrap { overflow-x: auto; } }
.plist { border-collapse: collapse; width: 100%; font-size: .9rem; }
.plist th, .plist td { padding: .45rem .4rem; border-bottom: 1px solid var(--s100); text-align: left; vertical-align: middle; font-weight: normal; }
.plist tbody tr:last-child th, .plist tbody tr:last-child td { border-bottom: 0; }
.plist tbody tr:hover th, .plist tbody tr:hover td { background: var(--g50); }
.plist thead th { vertical-align: bottom; background: #fff; border-bottom: 2px solid var(--s200); font-size: .82rem; font-weight: 600; white-space: nowrap; }
@media (min-width: 1381px) { .plist thead th { position: sticky; top: 3.2rem; z-index: 3; } }
.plist thead th > a { color: var(--s700); text-decoration: none; }
.plist thead th.on > a { color: var(--g800); }
.plist .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.plist td.num small { display: block; color: var(--s500); font-size: .74rem; }
.plist .p-name { position: sticky; left: 0; z-index: 1; background: #fff; min-width: 12.5rem; max-width: 17rem; }
.plist thead .p-name { z-index: 4; }
.plist th.p-name .heart { position: static; float: right; margin-left: .3rem; width: 1.5rem; height: 1.5rem; font-size: .8rem; }
.p-link { font-weight: 700; color: var(--s900); text-decoration: none; }
.p-link:hover { text-decoration: underline; }
.p-sub { display: flex; gap: .25rem; flex-wrap: wrap; margin-top: .15rem; font-size: .72rem; }
.p-where { color: var(--s500); font-size: .76rem; margin-top: .1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plist .none { color: var(--s500); font-size: .8rem; }
.band-th, .band-td { width: 906px; min-width: 906px; padding-left: 0 !important; padding-right: .3rem !important; }
.band-td .tp-band { width: 906px; }
.band-head { display: flex; gap: 2px; padding: 0 4px; height: 8.2rem; align-items: stretch; }
.bh { width: 28px; flex: none; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px;
  text-decoration: none; color: var(--s700); border-radius: 5px 5px 0 0; padding-bottom: 3px; }
.bh span { writing-mode: vertical-rl; transform: rotate(180deg); font-size: .72rem; font-weight: 600; white-space: nowrap; line-height: 1; }
.bh i { width: 22px; height: 6px; border-radius: 3px; background: var(--c); box-shadow: inset 0 0 0 1px rgba(15,23,42,.25); }
.bh:hover { background: var(--s100); color: var(--s900); }
.bh.on { background: var(--g100); color: var(--g900); }
.bh.on span { font-weight: 800; }

/* Terprint AI (chat) */
.ask-fab { position: fixed; right: 1rem; bottom: 1rem; z-index: 6; background: var(--g800); color: #fff; text-decoration: none;
  font-weight: 700; padding: .6rem 1rem; border-radius: 99px; box-shadow: 0 4px 14px rgba(15,23,42,.28); font-size: .95rem; }
.ask-fab:hover { background: var(--g900); }
.ask-fab span { color: var(--g200); margin-right: .15rem; }
.chat { max-width: 820px; margin: 0 auto; }
.chat-log { display: flex; flex-direction: column; gap: .7rem; margin: .6rem 0 1rem; min-height: 6rem; }
.msg { max-width: 88%; padding: .6rem .85rem; border-radius: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.msg.user { align-self: flex-end; background: var(--g700); color: #fff; border-bottom-right-radius: 4px; white-space: pre-wrap; }
.msg.bot { align-self: flex-start; background: #fff; border: 1px solid var(--s200); border-bottom-left-radius: 4px; }
.msg.bot p { margin: 0 0 .55rem; }
.msg.bot p:last-child, .msg.bot ul:last-child, .msg.bot ol:last-child { margin-bottom: 0; }
.msg.bot ul, .msg.bot ol { margin: 0 0 .55rem; padding-left: 1.2rem; }
.msg.bot li { margin: .2rem 0; }
.msg.bot a { font-weight: 600; }
.msg.err { background: #fef3c7; border-color: #fde68a; color: var(--amber); }
.msg .status { color: var(--s500); font-size: .88rem; font-style: italic; }
.msg .status::after { content: "…"; animation: tp-dots 1.2s steps(4, end) infinite; display: inline-block; width: 1.2em; overflow: hidden; vertical-align: bottom; }
@keyframes tp-dots { 0% { width: 0; } 100% { width: 1.2em; } }
@media (prefers-reduced-motion: reduce) { .msg .status::after { animation: none; } }
.followups { display: flex; flex-wrap: wrap; gap: .4rem; margin: -.3rem 0 0; }
.followups button, .chat-suggest button { background: #fff; color: var(--g800); border: 1px solid var(--g200); border-radius: 99px;
  padding: .3rem .8rem; font-weight: 600; font-size: .88rem; }
.followups button:hover, .chat-suggest button:hover { background: var(--g50); }
.chat-suggest { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .8rem; }
.chat-suggest[hidden] { display: none; }
.chat-form { display: flex; gap: .5rem; align-items: flex-end; background: #fff; border: 1px solid var(--s300); border-radius: 14px; padding: .5rem; position: sticky; bottom: .6rem; box-shadow: 0 2px 10px rgba(15,23,42,.08); }
.chat-form textarea { flex: 1; font: inherit; border: 0; outline: 0; resize: none; padding: .35rem .4rem; max-height: 9rem; background: transparent; }
.chat-form button[disabled] { opacity: .5; cursor: default; }
.chat-tools { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.chat-tools button { background: none; color: var(--g700); padding: 0; font-weight: 600; text-decoration: underline; }
.chat-gate { background: #fff; border: 1px solid var(--s200); border-radius: var(--radius); padding: 1.2rem; text-align: center; }

/* Sign-in by emailed link */
.signin { max-width: 30rem; margin: 2rem auto; background: #fff; border: 1px solid var(--s200); border-radius: var(--radius); padding: 1.4rem 1.5rem; }
.signin h1 { margin-top: 0; }
.signin-form { display: flex; flex-direction: column; gap: .5rem; margin: 1rem 0; }
.signin-form label { font-weight: 600; font-size: .92rem; }
.signin-form input[type=email] { font: inherit; font-size: 1.05rem; padding: .65rem .75rem; border: 1px solid var(--s300); border-radius: 8px; }
.signin-form input[type=email]:focus { outline: 2px solid var(--g500); outline-offset: 1px; }
.signin button.big { padding: .7rem 1.2rem; font-size: 1.02rem; }
.signin .note a { word-break: break-all; }

/* Product history: headline figures, one small chart per daily measure, and the batch table */
.hist-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .6rem; margin-bottom: .8rem; }
.tile { background: #fff; border: 1px solid var(--s200); border-radius: var(--radius); padding: .65rem .8rem; }
.tile .tl { display: block; color: var(--s600); font-size: .8rem; }
.tile b { display: block; font-size: 1.35rem; line-height: 1.25; }
.tile small { color: var(--s500); font-size: .78rem; }
.hist-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: .6rem; }
.hchart { margin: 0; background: #fff; border: 1px solid var(--s200); border-radius: var(--radius); padding: .6rem .7rem .3rem; min-width: 0; }
.hchart figcaption { font-size: .88rem; font-weight: 600; color: var(--s700); margin-bottom: .2rem; }
.hc-plot { position: relative; border-radius: 6px; cursor: crosshair; }
.hc-plot:focus-visible { outline: 2px solid var(--g600); outline-offset: 2px; }
.hc-plot svg { display: block; max-width: 100%; font-variant-numeric: tabular-nums; }
.hc-tip { position: absolute; pointer-events: none; background: var(--s900); color: #fff; border-radius: 6px; padding: .25rem .5rem;
  font-size: .78rem; line-height: 1.25; white-space: nowrap; box-shadow: 0 2px 8px rgba(15, 23, 42, .25); }
.hc-tip b { display: block; font-size: .95rem; }
.hc-tip span { opacity: .8; }
.hist-days { margin-top: .6rem; }
.hist-days summary { cursor: pointer; color: var(--g700); font-size: .9rem; }
.hist-days table { margin-top: .5rem; }
.hist-days td { font-variant-numeric: tabular-nums; }
.batches-wrap { overflow-x: auto; }
.batches th, .batches td { padding: .5rem .6rem; }
.batches thead th { position: static; }
.batches .b-id { min-width: 11rem; }
.batches .b-id code { font-size: .86rem; font-weight: 700; color: var(--s900); word-break: break-all; }
.batches .b-id .pill { margin-left: .3rem; }
.batches .b-id small { display: block; color: var(--s500); font-size: .74rem; font-weight: normal; }
.batches .b-when, .batches .b-coa { white-space: nowrap; font-size: .86rem; }
.batches .b-band { width: 606px; min-width: 606px; }
.batches .b-band .tp-band { width: 606px; }
.batches .b-band .tp-band + .tp-band { margin-top: 3px; }
