/*
 * TensorActivity Shop: the store and /backdoor.
 *
 * The tokens are TensorActivity's own (its site/assets/style.css), so the
 * shop reads as part of the company rather than a template: Inter Tight, the
 * warm paper ground, ink text, orange only as a surface or a small mark,
 * never as text (2.92:1 on the light ground).
 */

@font-face {
  font-family: "Inter Tight";
  src: url("intertight.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: optional;
}

:root {
  color-scheme: light;
  --bg: #fbfaf8;
  --bg-2: #f3f1ed;
  --surface: #ffffff;
  --surface-2: #f7f5f2;
  --line: #e7e3dc;
  --line-2: #d8d2c8;
  --text: #15130f;
  --text-2: #57514a;
  --text-3: #6f685f;
  --brand: #fb6302;
  --brand-ink: #b64a00;
  --brand-soft: #fff1e6;
  --on-brand: #15130f;
  --ink-btn: #15130f;
  --on-ink: #fbfaf8;
  --danger: #b42318;
  --danger-soft: #fef3f2;
  --ok: #067647;
  --ok-soft: #e8f6ee;
  --warn: #9a5b00;
  --warn-soft: #fff6e0;
  --series: #2a78d6;
  --series-soft: #cde2fb;
  --shadow: 0 1px 2px rgb(21 19 15 / .05), 0 12px 32px -12px rgb(21 19 15 / .18);
  --font: "Inter Tight", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --r-sm: 8px;
  --r: 12px;
  --page: 76rem;
  --gutter: clamp(1rem, 4vw, 2rem);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0b0a09;
    --bg-2: #11100e;
    --surface: #161412;
    --surface-2: #1c1a17;
    --line: #2a2622;
    --line-2: #3a352f;
    --text: #f4f1ec;
    --text-2: #c3bcb2;
    --text-3: #9d958a;
    --brand: #ff7a1f;
    --brand-ink: #ff9a52;
    --brand-soft: rgb(255 122 31 / .12);
    --ink-btn: #f4f1ec;
    --on-ink: #15130f;
    --danger: #f97066;
    --danger-soft: rgb(249 112 102 / .10);
    --ok: #47cd89;
    --ok-soft: rgb(71 205 137 / .10);
    --warn: #fdb022;
    --warn-soft: rgb(253 176 34 / .10);
    --series: #3987e5;
    --series-soft: rgb(57 135 229 / .18);
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 12px 32px -12px rgb(0 0 0 / .6);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.5 var(--font);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); font-weight: 650; }
h2 { font-size: 1.25rem; font-weight: 600; }
h3 { font-size: 1rem; font-weight: 600; }
p { margin: 0 0 1em; }
.muted { color: var(--text-3); }
.small { font-size: .85rem; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.wrap { max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 40rem; }
main.wrap { padding-top: 1.5rem; padding-bottom: 4rem; min-height: 60vh; }

/* ------------------------------------------------------------- controls -- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 44px; padding: 0 1.15rem;
  border: 1px solid var(--ink-btn); border-radius: var(--r-pill, 999px);
  background: var(--ink-btn); color: var(--on-ink);
  font: 600 .95rem/1 var(--font); text-decoration: none; cursor: pointer;
  transition: opacity .15s;
}
.btn:hover { opacity: .88; }
.btn.alt { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn.alt:hover { border-color: var(--text); opacity: 1; }
.btn.small { min-height: 34px; padding: 0 .8rem; font-size: .85rem; }
.btn.wide { width: 100%; }
.btn.danger { color: var(--danger); }
.btn[disabled], .btn.busy { opacity: .55; pointer-events: none; }
.link { background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

label { display: block; margin-bottom: .9rem; font-size: .88rem; font-weight: 550; color: var(--text-2); }
input[type=text], input[type=email], input[type=tel], input[type=url], input[type=number], input[type=search], input[type=password], select, textarea {
  display: block; width: 100%; margin-top: .35rem;
  padding: .65rem .8rem; min-height: 44px;
  border: 1px solid var(--line-2); border-radius: var(--r-sm);
  background: var(--surface); color: var(--text);
  font: 400 1rem/1.4 var(--font);
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--text); box-shadow: 0 0 0 3px var(--brand-soft); }
label.check { display: flex; align-items: center; gap: .55rem; font-weight: 450; color: var(--text); }
label.check input { width: 18px; height: 18px; accent-color: var(--text); }
.row2, .row3 { display: grid; gap: 0 1rem; grid-template-columns: 1fr 1fr; }
.row3 { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 640px) { .row2, .row3 { grid-template-columns: 1fr; } }
code { font-size: .85em; background: var(--bg-2); padding: .1em .35em; border-radius: 4px; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1.25rem; margin-bottom: 1rem; }
.form-error { color: var(--danger); font-weight: 550; }

/* ---------------------------------------------------------------- store -- */

.announce { background: var(--text); color: var(--bg); text-align: center; font-size: .85rem; padding: .5rem var(--gutter); }

.top { background: var(--bg); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.top-row { display: flex; align-items: center; gap: 1rem; height: 64px; }
.brand { font-weight: 700; font-size: 1.1rem; letter-spacing: -0.02em; text-decoration: none; white-space: nowrap; display: flex; align-items: center; gap: .55rem; }
.brand::before { content: ""; width: 22px; height: 22px; border-radius: 5px; background: var(--brand) url("icon.svg") center/cover; flex: none; }
.top .search { flex: 1; max-width: 26rem; margin-left: auto; }
.top .search input { margin: 0; min-height: 40px; border-radius: 999px; background: var(--surface-2); border-color: transparent; padding-left: 1rem; }
.top-links { display: flex; align-items: center; gap: 1.1rem; font-size: .92rem; }
.top-links a { text-decoration: none; }
.top-links a:hover { text-decoration: underline; }
.cart-link { position: relative; display: inline-flex; }
.cart-count { position: absolute; top: -6px; right: -9px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--brand); color: var(--on-brand); font-size: .7rem; font-weight: 700; display: grid; place-items: center; }
.cats { display: flex; gap: 1.4rem; overflow-x: auto; padding-bottom: .7rem; font-size: .9rem; scrollbar-width: none; }
.cats a { text-decoration: none; color: var(--text-2); white-space: nowrap; }
.cats a:hover { color: var(--text); }
@media (max-width: 640px) {
  .top-row { flex-wrap: wrap; height: auto; padding-top: .7rem; padding-bottom: .7rem; gap: .6rem 1rem; }
  .top .search { order: 3; flex-basis: 100%; max-width: none; }
  .top-links { margin-left: auto; }
}


.intro h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); font-weight: 650; line-height: 1; letter-spacing: -0.045em; }
.intro p { font-size: 1.1rem; color: var(--text-2); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 2.2rem 0 1rem; border-top: 1px solid var(--line); padding-top: 1.2rem; }
.section-head h2 { margin: 0; }
.section-title { margin: 2.5rem 0 1rem; }
.page-title { margin-bottom: .4em; }
.lead { color: var(--text-2); font-size: 1.05rem; }
.crumbs { font-size: .85rem; color: var(--text-3); margin-bottom: 1rem; }
.crumbs a { color: var(--text-2); text-decoration: none; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 2rem 1.25rem; }
@media (max-width: 640px) { .grid { grid-template-columns: 1fr 1fr; gap: 1.5rem .75rem; } }
.card { text-decoration: none; display: block; }
.card-img { position: relative; aspect-ratio: 1; background: var(--surface-2); border-radius: var(--r); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .card-img img { transform: scale(1.03); }
.noimg { width: 100%; height: 100%; background: var(--bg-2); aspect-ratio: 1; }
.badge { position: absolute; top: .6rem; left: .6rem; background: var(--brand); color: var(--on-brand); font-size: .75rem; font-weight: 700; padding: .2rem .5rem; border-radius: 6px; }
.card-body { padding: .7rem .1rem 0; }
.card-title { font-size: .95rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.price { display: flex; align-items: baseline; gap: .45rem; flex-wrap: wrap; margin-top: .3rem; font-variant-numeric: tabular-nums; }
.price .now { font-weight: 650; }
.price .was { color: var(--text-3); font-size: .9em; }
.price .from { color: var(--text-3); font-size: .85em; }
.price.big { font-size: 1.45rem; margin: .4rem 0 1.4rem; }
.price .save { font-size: .8rem; font-weight: 700; background: var(--brand-soft); color: var(--brand-ink); padding: .15rem .5rem; border-radius: 6px; align-self: center; }
.empty { padding: 3rem 0; }

.facts { list-style: none; padding: 0; margin: 4rem 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; border-top: 1px solid var(--line); padding-top: 1.5rem; font-size: .92rem; color: var(--text-2); }
.facts strong { display: block; color: var(--text); }
@media (max-width: 640px) { .facts { grid-template-columns: 1fr; } }

.product { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
@media (max-width: 860px) { .product { grid-template-columns: 1fr; } }
.gallery { position: sticky; top: 88px; }
@media (max-width: 860px) { .gallery { position: static; } }
.gallery-main { aspect-ratio: 1; background: var(--surface-2); border-radius: var(--r); overflow: hidden; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.thumbs { display: flex; gap: .5rem; margin-top: .6rem; overflow-x: auto; }
.thumb { flex: none; width: 68px; height: 68px; padding: 0; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); overflow: hidden; cursor: pointer; }
.thumb[aria-current=true] { border-color: var(--text); border-width: 2px; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.buy h1 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: .2em; }
.options { border: 0; padding: 0; margin: 0 0 1.2rem; }
.options legend { font-size: .85rem; font-weight: 600; color: var(--text-2); margin-bottom: .5rem; }
.opt { display: inline-block; margin: 0 .4rem .5rem 0; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt span { display: inline-block; padding: .55rem .95rem; border: 1px solid var(--line-2); border-radius: var(--r-sm); color: var(--text); font-weight: 500; cursor: pointer; }
.opt input:checked + span { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
.opt input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.qty-row { display: grid; grid-template-columns: 96px 1fr; gap: .6rem; align-items: end; margin-bottom: .6rem; }
.qty { margin: 0; }
.qty span { font-size: .8rem; }
.qty input { margin-top: .2rem; text-align: center; }
.added { margin: .7rem 0 0; font-size: .9rem; color: var(--ok); }
.perks { list-style: none; padding: 1.2rem 0; margin: 1.2rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: .9rem; color: var(--text-2); display: grid; gap: .45rem; }
.perks li::before { content: ""; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--brand); margin: 0 .6rem 2px 0; vertical-align: middle; }
.description, .prose { line-height: 1.65; color: var(--text-2); }
.description ul, .prose ul { padding-left: 1.2rem; }
.description li, .prose li { margin-bottom: .3rem; }
.prose h3 { color: var(--text); margin-top: 1.8rem; }

.checkout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
@media (max-width: 860px) { .checkout { grid-template-columns: 1fr; } .checkout aside { order: -1; } }
.checkout h2 { font-size: 1.05rem; margin-top: .4rem; }
.signin-hint { font-size: .9rem; background: var(--surface-2); padding: .75rem 1rem; border-radius: var(--r-sm); }
.lines { list-style: none; padding: 0; margin: 0; }
.lines li { display: grid; grid-template-columns: 56px 1fr auto auto; gap: .8rem; align-items: center; padding: .7rem 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.lines img { border-radius: var(--r-sm); background: var(--surface-2); width: 56px; height: 56px; object-fit: cover; }
.l-price { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.l-qty { color: var(--text-3); }
.totals { display: grid; grid-template-columns: 1fr auto; gap: .4rem 1rem; margin: 1rem 0 0; font-variant-numeric: tabular-nums; }
.totals dt { color: var(--text-2); }
.totals dd { margin: 0; text-align: right; }
.totals .total { font-weight: 700; font-size: 1.1rem; color: var(--text); padding-top: .6rem; border-top: 1px solid var(--line); }
.or { display: flex; align-items: center; gap: .8rem; color: var(--text-3); font-size: .85rem; margin: 1.2rem 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
#paypal-buttons { min-height: 50px; }

.cart-table { width: 100%; }
.cart-row { display: grid; grid-template-columns: 88px 1fr auto; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); align-items: center; }
.cart-row img, .cart-row .noimg { width: 88px; height: 88px; border-radius: var(--r-sm); object-fit: cover; }
.cart-row .c-title { font-weight: 550; text-decoration: none; }
.cart-row .c-meta { color: var(--text-3); font-size: .88rem; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 999px; margin-top: .5rem; }
.stepper button { width: 34px; height: 34px; border: 0; background: none; color: var(--text); font-size: 1.1rem; cursor: pointer; }
.stepper span { min-width: 1.8rem; text-align: center; font-variant-numeric: tabular-nums; }
.c-right { text-align: right; }
.c-right .l-price { display: block; }
.remove { font-size: .82rem; color: var(--text-3); }
.cart-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 2rem; align-items: start; }
@media (max-width: 860px) { .cart-layout { grid-template-columns: 1fr; } }
.coupon { display: flex; gap: .5rem; margin-top: 1rem; }
.coupon input { margin: 0; }
.hint { font-size: .88rem; color: var(--brand-ink); margin: .8rem 0 0; }

.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem; margin: 1.5rem 0 2rem; counter-reset: s; }
.steps li { border-top: 3px solid var(--line); padding-top: .5rem; font-size: .85rem; color: var(--text-3); }
.steps li.done { border-color: var(--text); color: var(--text); font-weight: 600; }

table.list { width: 100%; border-collapse: collapse; font-size: .9rem; }
.list th { text-align: left; font-weight: 550; color: var(--text-3); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; padding: .5rem .6rem; border-bottom: 1px solid var(--line); }
.list td { padding: .65rem .6rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.list tr:last-child td { border-bottom: 0; }
.list .r { text-align: right; font-variant-numeric: tabular-nums; }
.list a { text-decoration: none; font-weight: 550; }
.list a:hover { text-decoration: underline; }
.table-wrap { overflow-x: auto; }
.account-actions { display: flex; gap: .6rem; margin-top: 1.5rem; }
.center-msg { padding: 5rem 0; }
.search.big { display: flex; gap: .5rem; max-width: 34rem; margin-bottom: 2rem; }
.search.big input { margin: 0; }

.foot { border-top: 1px solid var(--line); background: var(--bg-2); padding: 2.5rem 0 1.5rem; font-size: .9rem; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 1.5rem; }
.foot-brand { font-weight: 700; text-decoration: none; letter-spacing: -0.01em; }
.foot-grid p a { display: inline; margin: 0; color: var(--text); text-decoration: underline; }
.foot-grid nav a { display: block; color: var(--text-2); text-decoration: none; margin-top: .35rem; }
.foot-grid nav a:hover { color: var(--text); }
.foot-base { margin-top: 2rem; font-size: .8rem; }
@media (max-width: 640px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > div:first-child { grid-column: 1 / -1; } }

/* ------------------------------------------------------------ backdoor -- */

body.admin { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100vh; background: var(--bg-2); }
.side { background: var(--surface); border-right: 1px solid var(--line); padding: 1.2rem .8rem; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.side-brand { font-weight: 700; text-decoration: none; padding: 0 .6rem 1.2rem; display: block; letter-spacing: -0.01em; }
.side-brand span { display: block; font-weight: 450; font-size: .8rem; color: var(--text-3); }
.side nav a { display: flex; justify-content: space-between; align-items: center; padding: .55rem .6rem; border-radius: var(--r-sm); text-decoration: none; color: var(--text-2); font-size: .92rem; font-weight: 500; }
.side nav a:hover { background: var(--surface-2); color: var(--text); }
.side nav a[aria-current=page] { background: var(--bg-2); color: var(--text); font-weight: 600; }
.pill { background: var(--brand); color: var(--on-brand); font-size: .72rem; font-weight: 700; border-radius: 999px; padding: .05rem .45rem; }
.side-foot { margin-top: auto; padding: 0 .6rem; display: grid; gap: .5rem; font-size: .85rem; color: var(--text-2); }
.side-foot a { text-decoration: none; }
.admin-main { padding: 1.6rem clamp(1rem, 3vw, 2.4rem) 4rem; max-width: 84rem; }
@media (max-width: 860px) {
  body.admin { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: .4rem; padding: .7rem; }
  .side-brand { padding: 0 .4rem; }
  .side nav { display: flex; overflow-x: auto; width: 100%; order: 3; }
  .side nav a { white-space: nowrap; gap: .4rem; }
  .side-foot { margin: 0 0 0 auto; display: flex; gap: 1rem; }
}
.admin h1 { font-size: 1.6rem; display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.head-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.head-row p { margin: 0; }
.row-actions { display: flex; gap: .5rem; align-items: center; }
.inline-search input { margin: 0; min-height: 40px; width: 15rem; }
.alert { padding: .75rem 1rem; border-radius: var(--r-sm); margin-bottom: 1rem; font-size: .92rem; }
.alert.good { background: var(--ok-soft); color: var(--ok); }
.alert.bad { background: var(--danger-soft); color: var(--danger); }
.alert.warn { background: var(--warn-soft); color: var(--warn); }

.tabs { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; }
.tabs a { padding: .4rem .85rem; border-radius: 999px; text-decoration: none; font-size: .85rem; color: var(--text-2); white-space: nowrap; }
.tabs a[aria-current=true] { background: var(--ink-btn); color: var(--on-ink); }
.tabs.scroll { display: flex; overflow-x: auto; margin-bottom: 1rem; max-width: 100%; }

.live { display: inline-flex; align-items: center; gap: .35rem; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }

.insights { display: grid; gap: .5rem; margin-bottom: 1.2rem; }
.insight { display: flex; align-items: center; gap: .7rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: .6rem .9rem; font-size: .9rem; }
.insight .icon { flex: none; width: 1.3rem; height: 1.3rem; border-radius: 50%; display: grid; place-items: center; font-size: .7rem; font-weight: 700; background: var(--bg-2); color: var(--text-2); }
.insight.urgent .icon { background: var(--danger-soft); color: var(--danger); }
.insight.warn .icon { background: var(--warn-soft); color: var(--warn); }
.insight.good .icon { background: var(--ok-soft); color: var(--ok); }
.insight a { margin-left: auto; white-space: nowrap; font-weight: 600; text-decoration: none; font-size: .85rem; }

.hero-tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1.2rem 1.4rem; margin-bottom: 1rem; }
.hero-value { font-size: clamp(2.4rem, 5vw, 3.4rem); font-weight: 650; letter-spacing: -0.03em; line-height: 1.1; margin: .2rem 0 .4rem; }
.tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
@media (max-width: 1100px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1rem; }
.tile-label { font-size: .82rem; color: var(--text-3); }
.tile-value { font-size: 1.5rem; font-weight: 650; letter-spacing: -0.02em; margin: .25rem 0; font-variant-numeric: tabular-nums; }
.tile-foot { display: flex; gap: .4rem; font-size: .78rem; flex-wrap: wrap; }
.delta { font-weight: 600; }
.delta.up { color: var(--ok); }
.delta.down { color: var(--danger); }
.delta.flat { color: var(--text-3); }

.charts { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
@media (max-width: 1000px) { .charts { grid-template-columns: 1fr; } }
.chart { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1rem 1rem .6rem; }
.chart figcaption { font-weight: 600; margin-bottom: .5rem; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .gridline { stroke: var(--line); stroke-width: 1; }
.chart .base { stroke: var(--line-2); stroke-width: 1; }
.chart .axis { fill: var(--text-3); font: 400 11px var(--font); font-variant-numeric: tabular-nums; }
.chart .bar { fill: var(--series); }
.chart .hit { fill: transparent; }
.chart .col:hover .hit, .chart .col:focus .hit { fill: var(--series-soft); opacity: .5; }
.chart .col { outline: none; }
.as-table { margin-top: .4rem; font-size: .82rem; color: var(--text-3); }
.as-table summary { cursor: pointer; }
.as-table table { margin-top: .5rem; max-height: 14rem; overflow: auto; display: block; }

.funnel { list-style: none; padding: 0; margin: .8rem 0 0; display: grid; gap: .55rem; }
.funnel li { display: grid; grid-template-columns: 11rem 1fr 4rem 4rem; gap: .8rem; align-items: center; font-size: .9rem; }
@media (max-width: 640px) { .funnel li { grid-template-columns: 1fr 3rem 3.5rem; } .f-track { grid-column: 1 / -1; grid-row: 2; } }
.f-track { height: 22px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.f-bar { display: block; height: 100%; background: var(--series); border-radius: 0 4px 4px 0; }
.f-value { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.f-step { text-align: right; font-size: .82rem; font-variant-numeric: tabular-nums; }

.breakdowns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
@media (max-width: 860px) { .breakdowns { grid-template-columns: 1fr; } }
.breakdown ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .3rem; }
.breakdown li { position: relative; display: flex; justify-content: space-between; gap: 1rem; padding: .4rem .6rem; font-size: .88rem; border-radius: 4px; overflow: hidden; }
.breakdown .fill { position: absolute; inset: 0 auto 0 0; background: var(--series-soft); border-radius: 4px; z-index: 0; }
.breakdown .b-label, .breakdown .b-value { position: relative; z-index: 1; }
.breakdown .b-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.breakdown .b-value { font-variant-numeric: tabular-nums; white-space: nowrap; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; font-size: .9rem; }
.checks li::before { content: "●"; margin-right: .55rem; font-size: .7rem; vertical-align: 1px; }
.checks .good::before { color: var(--ok); }
.checks .bad::before { color: var(--danger); }
.checks .off::before { color: var(--text-3); }

.status { display: inline-block; font-size: .75rem; font-weight: 600; padding: .15rem .55rem; border-radius: 999px; background: var(--bg-2); color: var(--text-2); text-transform: capitalize; vertical-align: middle; }
.s-paid { background: var(--warn-soft); color: var(--warn); }
.s-ordered { background: var(--series-soft); color: var(--text); }
.s-shipped, .s-delivered { background: var(--ok-soft); color: var(--ok); }
.s-cancelled, .s-refunded { background: var(--danger-soft); color: var(--danger); }
.s-pending { background: var(--bg-2); color: var(--text-3); }
.thumb-cell { width: 52px; }
.thumb-cell img { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; background: var(--surface-2); }
.empty-state { text-align: center; padding: 3rem 1rem; }
.actions { display: flex; gap: .4rem; justify-content: flex-end; }

.order-grid, .form-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
@media (max-width: 1000px) { .order-grid, .form-grid { grid-template-columns: 1fr; } }
.next-step { border-color: var(--brand); box-shadow: inset 3px 0 0 var(--brand); }
.history { list-style: none; padding: 0; font-size: .88rem; display: grid; gap: .3rem; margin-bottom: 1rem; }
.address { line-height: 1.6; }
.stack { display: grid; gap: .5rem; justify-items: start; }

.image-grid { display: flex; flex-wrap: wrap; gap: .8rem; margin-bottom: 1rem; }
.image-cell { width: 120px; }
.image-cell img { width: 120px; height: 120px; object-fit: cover; border-radius: var(--r-sm); background: var(--surface-2); margin-bottom: .3rem; }
.image-cell label { margin: 0; display: flex; gap: .3rem; align-items: center; font-weight: 450; }
.drop input[type=file] { display: block; margin: .4rem 0; padding: 1.2rem; width: 100%; border: 1.5px dashed var(--line-2); border-radius: var(--r-sm); background: var(--surface-2); font: inherit; }
.upload-preview { display: flex; flex-wrap: wrap; gap: .5rem; }
.upload-preview img { width: 72px; height: 72px; object-fit: cover; border-radius: 6px; }
.price-preview table { width: 100%; font-size: .88rem; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.price-preview th { text-align: left; color: var(--text-3); font-weight: 500; font-size: .78rem; padding: .3rem 0; }
.price-preview td { padding: .35rem 0; border-top: 1px solid var(--line); }
.price-preview td:not(:first-child), .price-preview th:not(:first-child) { text-align: right; }
.save-bar { position: sticky; bottom: 0; padding: .8rem 0; background: linear-gradient(transparent, var(--bg-2) 30%); }
.danger-zone { margin-top: 2rem; display: flex; align-items: center; gap: .6rem; }
.cat-row { display: grid; grid-template-columns: 4rem 1fr 1.4fr auto auto auto; gap: .5rem; align-items: center; margin-bottom: .5rem; }
.cat-row input { margin: 0; }
.cat-row .sort { text-align: center; }
@media (max-width: 760px) { .cat-row { grid-template-columns: 4rem 1fr; } .cat-row > :nth-child(n+4) { grid-column: span 1; } }
.settings h3 { margin-top: .4rem; }
.settings .panel h3 + h3, .settings .panel h3:not(:first-child) { margin-top: 1.6rem; }

.tip { position: fixed; z-index: 50; pointer-events: none; background: var(--text); color: var(--bg); font-size: .8rem; padding: .4rem .6rem; border-radius: 6px; max-width: 18rem; box-shadow: var(--shadow); }

/* --------------------------------------------------------------- waves -- */

/* TensorActivity's grid of waves (its site/assets/style.css, ".waves", has
   the reasoning): horizontal lines rippling left to right, vertical lines top
   to bottom, each one SVG pattern 448px per wavelength, slid by exactly one
   wavelength so the loop has no seam. Only `transform` moves; nothing
   repaints. Reduced motion leaves them still. */
.intro, .hero-tile { position: relative; isolation: isolate; }
.intro { max-width: none; padding: clamp(3rem, 8vw, 6rem) 0 clamp(2rem, 4vw, 3rem); }
.intro > h1, .intro > p { max-width: 40rem; }
.intro::after {
  content: ""; position: absolute; z-index: -1; inset: 0 calc(var(--gutter) * -1);
  background: radial-gradient(circle 26rem at calc(100% - 10rem) 6rem, rgb(251 99 2 / .16), rgb(251 99 2 / 0));
  -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent);
  pointer-events: none;
}
.waves {
  position: absolute; inset: 0; z-index: -2; overflow: hidden; color: var(--line-2); pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 62% 75% at 75% 35%, #000 12%, transparent 72%);
  mask-image: radial-gradient(ellipse 62% 75% at 75% 35%, #000 12%, transparent 72%);
}
.intro .waves { inset: 0 calc(var(--gutter) * -1); }
.hero-tile .waves { border-radius: var(--r); }
.waves svg { position: absolute; max-width: none; will-change: transform; }
.waves path { fill: none; stroke: currentColor; stroke-width: 1; }
.waves .waves-x { top: 0; left: -448px; width: calc(100% + 448px); height: 100%; animation: wave-x 28s linear infinite, swell-x 7s ease-in-out infinite alternate; }
.waves .waves-y { top: -448px; left: 0; width: 100%; height: calc(100% + 448px); animation: wave-y 36s linear infinite, swell-y 9s ease-in-out infinite alternate; }
@keyframes wave-x { to { transform: translateX(448px); } }
@keyframes wave-y { to { transform: translateY(448px); } }
@keyframes swell-x { from { translate: 0 -6px; } to { translate: 0 6px; } }
@keyframes swell-y { from { translate: -6px 0; } to { translate: 6px 0; } }
@media (max-width: 40rem) {
  .waves .waves-x, .waves .waves-y { scale: .6; transform-origin: 0 0; }
  .waves .waves-x { left: -268.8px; width: calc((100% + 268.8px) / .6); height: calc(100% / .6); }
  .waves .waves-y { top: -268.8px; width: calc(100% / .6); height: calc((100% + 268.8px) / .6); }
  .waves path { stroke-width: 1.6667; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

.import { border-style: dashed; }
.import-row { display: flex; gap: .5rem; }
.import-row input { margin: 0; }
.import-status { margin: .6rem 0 0; }
.import-status.bad { color: var(--danger); }
.import-status.good { color: var(--ok); }

.local { font-size: .8rem; color: var(--text-3); margin-top: .1rem; font-variant-numeric: tabular-nums; }
.local.big-local { font-size: .95rem; margin: -1rem 0 1.4rem; }

.ship-bar { margin-top: 1rem; font-size: .88rem; color: var(--text-2); }
.ship-bar p { margin: 0 0 .4rem; }
.ship-bar .track { display: block; height: 6px; background: var(--bg-2); border-radius: 3px; overflow: hidden; }
.ship-bar .track span { display: block; height: 100%; background: var(--brand); border-radius: 3px; }

.mini-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem; }
.mini { display: grid; gap: .35rem; align-content: start; font-size: .88rem; }
.mini img, .mini .noimg { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-sm); background: var(--surface-2); }
.mini-title { text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mini .btn { justify-self: start; }


.order-links { font-size: .92rem; }
body.invoice { background: var(--surface); }
.invoice main { padding-top: 2.5rem; }
.invoice-head { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 2px solid var(--text); padding-bottom: 1rem; margin-bottom: 1.5rem; }
.invoice-head .r { text-align: right; }
.invoice-head h1 { margin: 0; font-size: 1.6rem; }
.invoice .brand::before { display: none; }
.invoice h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); }
.invoice table.list { margin: 1.5rem 0 .5rem; }
.no-print { margin-top: 2rem; }
@media print { .no-print { display: none; } body.invoice { background: #fff; color: #000; } }

.multibuy { font-size: .9rem; font-weight: 600; color: var(--brand-ink); background: var(--brand-soft); padding: .5rem .8rem; border-radius: var(--r-sm); margin: 1rem 0 0; }
.wa { position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 30; width: 54px; height: 54px; border-radius: 50%; background: #25d366; color: #fff; display: grid; place-items: center; box-shadow: var(--shadow); }
.wa:hover { transform: scale(1.05); }


.top .search { position: relative; }
.suggest { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 40; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.suggest:empty { display: none; }
.suggest a { display: grid; grid-template-columns: 40px 1fr auto; gap: .7rem; align-items: center; padding: .5rem .7rem; text-decoration: none; font-size: .9rem; }
.suggest a:hover, .suggest a:focus { background: var(--surface-2); }
.suggest img, .suggest .noimg { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; }
.suggest p { margin: 0; padding: .7rem; }

.sale-ends { font-size: .88rem; font-weight: 600; color: var(--brand-ink); margin: -1rem 0 1.2rem; }
.price-preview .loss { color: var(--danger); font-weight: 600; }

.predict { margin-top: 3rem; }
