/*! Alijahon UI · aj.css · "Zamonaviy minimal" v1 · docs/ui/README.md
 * Ledger with a crimson seal: stone surfaces, 1px hairlines, one accent (#B40000), Inter, tabular figures.
 * Element styles apply only under .aj; components are prefixed aj-. Mobile first: 640 / 768 / 1024 / 1280. */

/* 1 · Fonts: Inter 4 variable (fontsource 5.3.0, OFL); latin has oʻ gʻ. No ?v= (the preload must match): rename to upgrade */
@font-face{font-family:"Inter Variable";font-style:normal;font-weight:100 900;font-display:swap;src:url("fonts/inter-latin-wght-normal.woff2") format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Inter Variable";font-style:normal;font-weight:100 900;font-display:swap;src:url("fonts/inter-latin-ext-wght-normal.woff2") format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:"Inter Variable";font-style:normal;font-weight:100 900;font-display:swap;src:url("fonts/inter-cyrillic-wght-normal.woff2") format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}

/* 2 · Tokens (components inline the 4px, type and radius scales as px; page CSS uses the tokens) */
:root{
--aj-brand:#B40000;--aj-brand-hover:#960000;--aj-brand-active:#7A0505;--aj-brand-on:#fff;
--aj-brand-50:#FFF5F5;--aj-brand-100:#FFE3E3;--aj-brand-200:#FFC9C9;--aj-brand-300:#FCA5A5;
--aj-focus-ring:0 0 0 3px rgb(180 0 0 / .22);
--aj-bg:#FAFAF9;--aj-surface:#fff;--aj-surface-2:#F5F5F4;--aj-surface-3:#EEECEA;
--aj-border:#E7E5E4;--aj-border-strong:#D6D3D1;--aj-divider:#F0EEEC;
--aj-text:#1C1917;--aj-text-2:#44403C;--aj-muted:#78716C;--aj-subtle:#A8A29E;
--aj-success:#15803D;--aj-success-bg:#F0FDF4;--aj-success-border:#BBF7D0;
--aj-warning:#B45309;--aj-warning-bg:#FFFBEB;--aj-warning-border:#FDE68A;
--aj-info:#1D4ED8;--aj-info-bg:#EFF6FF;--aj-info-border:#BFDBFE;
--aj-danger:#B40000;--aj-danger-bg:#FFF5F5;--aj-danger-border:#FFC9C9;
--aj-violet:#6D28D9;--aj-violet-bg:#F5F3FF;--aj-violet-border:#DDD6FE;
--aj-teal:#0F766E;--aj-teal-bg:#F0FDFA;--aj-teal-border:#99F6E4;
--aj-font:"Inter Variable",Inter,system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
--aj-mono:ui-monospace,"SF Mono",Menlo,Consolas,"Liberation Mono",monospace;
--aj-fs-xs:12px;--aj-fs-sm:13px;--aj-fs-base:14px;--aj-fs-md:15px;--aj-fs-lg:16px;--aj-fs-xl:18px;--aj-fs-2xl:22px;--aj-fs-3xl:28px;--aj-fs-4xl:36px;
--aj-1:4px;--aj-2:8px;--aj-3:12px;--aj-4:16px;--aj-5:20px;--aj-6:24px;--aj-8:32px;--aj-10:40px;--aj-12:48px;--aj-16:64px;
--aj-radius-sm:6px;--aj-radius:8px;--aj-radius-lg:12px;--aj-radius-xl:16px;--aj-radius-full:999px;
--aj-shadow-sm:0 1px 2px rgb(28 25 23 / .06);--aj-shadow-md:0 4px 16px rgb(28 25 23 / .08),0 1px 3px rgb(28 25 23 / .06);--aj-shadow-lg:0 16px 48px rgb(28 25 23 / .16);
--aj-control-h:40px;--aj-control-h-sm:32px;--aj-control-h-lg:48px;--aj-header-h:60px;--aj-sidebar-w:248px;--aj-bottom-nav-h:56px;--aj-rule:3px;
--aj-container:1200px;--aj-container-wide:1440px;--aj-gutter:16px;
--aj-ease:cubic-bezier(.2,0,0,1);--aj-dur:140ms;--aj-dur-slow:220ms;
--aj-tr:color var(--aj-dur) var(--aj-ease),background-color var(--aj-dur) var(--aj-ease),border-color var(--aj-dur) var(--aj-ease),opacity var(--aj-dur) var(--aj-ease),transform var(--aj-dur) var(--aj-ease);
--aj-z-header:40;--aj-z-drawer:60;--aj-z-modal:80;--aj-z-toast:90}
@media (min-width:768px){:root{--aj-gutter:24px}}
@media (min-width:1280px){:root{--aj-gutter:32px}}

/* 3 · Base (scoped to .aj, never global) */
.aj{color-scheme:light;margin:0;min-height:100vh;min-height:100dvh;padding-top:var(--aj-rule);background:var(--aj-bg);color:var(--aj-text);font:400 14px/1.5 var(--aj-font);font-optical-sizing:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-text-size-adjust:100%;text-size-adjust:100%;-webkit-tap-highlight-color:transparent}
/* signature 1: 3px crimson rule pinned to the top edge, the binding of the ledger */
.aj::before{content:"";position:fixed;inset:0 0 auto;height:var(--aj-rule);background:var(--aj-brand);z-index:61;pointer-events:none}
.aj *,.aj ::before,.aj ::after{box-sizing:border-box}
.aj :where(h1,h2,h3,h4,h5,h6,p,figure,blockquote,dl,dd,ol,ul,fieldset){margin:0}
.aj :where(ol,ul)[class]{padding:0;list-style:none}
.aj :where(h1,h2,h3,h4,h5,h6){font-weight:600;line-height:1.25;letter-spacing:-.011em;color:var(--aj-text);text-wrap:balance}
.aj :where(img,svg,video,canvas,picture){display:block;max-width:100%}
.aj :where(img,video){height:auto}
.aj :where(a){color:inherit;text-decoration:none}
.aj :where(button,input,select,textarea){font:inherit;color:inherit;letter-spacing:inherit;margin:0}
.aj :where(button,summary){cursor:pointer}
.aj :where(hr){height:0;border:0;border-top:1px solid var(--aj-divider);margin:16px 0}
.aj :where(strong,b){font-weight:600}
.aj :where(code,kbd,pre){font-family:var(--aj-mono);font-size:.92em}
.aj :where(fieldset){border:0;padding:0;min-width:0}
.aj ::selection{background:var(--aj-brand-100);color:var(--aj-text)}
.aj :focus-visible{outline:none;box-shadow:var(--aj-focus-ring)}
.aj [hidden]{display:none!important}

/* 4 · Layout */
.aj-container{width:100%;max-width:calc(var(--aj-container) + 2 * var(--aj-gutter));margin-inline:auto;padding-left:max(var(--aj-gutter),env(safe-area-inset-left));padding-right:max(var(--aj-gutter),env(safe-area-inset-right))}
.aj-container--wide{max-width:calc(var(--aj-container-wide) + 2 * var(--aj-gutter))}
.aj-container--narrow{max-width:calc(720px + 2 * var(--aj-gutter))}
.aj-stack{display:flex;flex-direction:column;gap:var(--gap,16px);min-width:0}
.aj-stack--1{--gap:4px}.aj-stack--2{--gap:8px}.aj-stack--3{--gap:12px}.aj-stack--6{--gap:24px}.aj-stack--8{--gap:32px}
.aj-cluster{display:flex;flex-wrap:wrap;align-items:center;gap:var(--gap,8px)}
.aj-cluster--3{--gap:12px}.aj-cluster--4{--gap:16px}
.aj-cluster--between{justify-content:space-between}.aj-cluster--end{justify-content:flex-end}.aj-cluster--start{align-items:flex-start}
.aj-grid{display:grid;gap:var(--gap,16px);grid-template-columns:minmax(0,1fr)}
.aj-grid--auto{grid-template-columns:repeat(auto-fill,minmax(min(240px,100%),1fr))}
.aj-split{display:grid;gap:24px;grid-template-columns:minmax(0,1fr);align-items:start}
.aj-section{padding-block:32px}
@media (min-width:640px){.aj-grid--2,.aj-grid--3,.aj-grid--4{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (min-width:768px){.aj-section{padding-block:48px}}
@media (min-width:1024px){
.aj-grid--3{grid-template-columns:repeat(3,minmax(0,1fr))}
.aj-grid--4{grid-template-columns:repeat(4,minmax(0,1fr))}
.aj-split{grid-template-columns:minmax(240px,280px) minmax(0,1fr);gap:32px}
.aj-split--end{grid-template-columns:minmax(0,1fr) minmax(300px,380px)}}

/* 5 · Type */
.aj-display{font-size:28px;font-weight:680;line-height:1.15;letter-spacing:-.022em;color:var(--aj-text);text-wrap:balance}
.aj-h1{font-size:22px;font-weight:650;line-height:1.2;letter-spacing:-.011em;color:var(--aj-text)}
.aj-h2{font-size:18px;font-weight:650;line-height:1.25;letter-spacing:-.011em;color:var(--aj-text)}
.aj-h3{font-size:16px;font-weight:600;line-height:1.3;letter-spacing:-.011em;color:var(--aj-text)}
.aj-h4{font-size:14px;font-weight:600;line-height:1.35;color:var(--aj-text)}
.aj-eyebrow{font-size:12px;font-weight:600;line-height:1.4;letter-spacing:.06em;text-transform:uppercase;color:var(--aj-muted)}
.aj-lead{font-size:15px;line-height:1.6;color:var(--aj-text-2)}
.aj-muted{color:var(--aj-muted)}
.aj-num{font-variant-numeric:tabular-nums}
.aj-money{font-variant-numeric:tabular-nums;white-space:nowrap}
.aj-money__cur{color:var(--aj-muted);font-size:.86em;font-weight:450;letter-spacing:0}
.aj-money--empty{color:var(--aj-subtle)}
.aj-mono{font-family:var(--aj-mono);font-size:.92em}
@media (min-width:768px){.aj-display{font-size:36px}.aj-h1{font-size:28px;letter-spacing:-.022em}.aj-h2{font-size:22px}}
.aj-link,.aj-prose a{color:var(--aj-text);font-weight:500;text-decoration:underline;text-decoration-color:var(--aj-border-strong);text-decoration-thickness:1px;text-underline-offset:3px;transition:var(--aj-tr)}
.aj-link:hover,.aj-prose a:hover{color:var(--aj-brand);text-decoration-color:currentColor}
/* rich text from CKEditor (product descriptions, about, FAQ, privacy) */
.aj-prose{max-width:72ch;font-size:15px;line-height:1.7;color:var(--aj-text-2);overflow-wrap:break-word}
.aj-prose > * + *{margin-top:1em}
.aj-prose :where(h1,h2,h3,h4){margin-top:1.6em;font-size:17px;line-height:1.3}
.aj-prose :where(h1,h2){font-size:20px}
.aj-prose :where(ul,ol){padding-left:1.25em}
.aj-prose :where(li + li){margin-top:.35em}
.aj-prose :where(strong){color:var(--aj-text)}
.aj-prose :where(img){border-radius:8px}
.aj-prose :where(blockquote){padding-left:16px;border-left:2px solid var(--aj-border-strong);color:var(--aj-muted)}
.aj-prose :where(table){width:100%;border-collapse:collapse;font-size:14px}
.aj-prose :where(th,td){padding:6px 10px;border:1px solid var(--aj-border);text-align:left}

/* 6 · Icons ({% icon %}: Lucide sprite, 1.75 stroke) */
.aj-icon{display:inline-block;flex:none;width:20px;height:20px;vertical-align:middle;overflow:visible}
.aj-icon--xs{width:14px;height:14px}.aj-icon--sm{width:16px;height:16px}.aj-icon--md{width:18px;height:18px}.aj-icon--lg{width:24px;height:24px}.aj-icon--xl{width:32px;height:32px}
.aj-icon--spin{animation:aj-spin .8s linear infinite}

/* 7 · Buttons: .aj-btn alone is --secondary (white, border); variants set three local custom properties */
.aj-btn{--bg:var(--aj-surface);--fg:var(--aj-text);--bd:var(--aj-border-strong);position:relative;display:inline-flex;align-items:center;justify-content:center;gap:8px;height:40px;padding:0 16px;border:1px solid var(--bd);border-radius:8px;background:var(--bg);color:var(--fg);font-size:14px;font-weight:550;line-height:1;white-space:nowrap;cursor:pointer;-webkit-user-select:none;user-select:none;transition:var(--aj-tr)}
.aj-btn .aj-icon{width:18px;height:18px;margin-inline:-2px}
.aj-btn:hover{--bg:var(--aj-surface-2);--bd:var(--aj-subtle)}
.aj-btn:active{--bg:var(--aj-surface-3);transform:translateY(.5px)}
.aj-btn--primary{--bg:var(--aj-brand);--fg:var(--aj-brand-on);--bd:var(--aj-brand)}
.aj-btn--primary:hover{--bg:var(--aj-brand-hover);--bd:var(--aj-brand-hover)}
.aj-btn--primary:active{--bg:var(--aj-brand-active);--bd:var(--aj-brand-active)}
.aj-btn--primary:focus-visible{box-shadow:0 0 0 2px var(--aj-surface),0 0 0 4px rgb(180 0 0 / .45)}
.aj-btn--ghost{--bg:transparent;--bd:transparent;--fg:var(--aj-text-2)}
.aj-btn--ghost:hover{--bg:var(--aj-surface-2);--bd:transparent;--fg:var(--aj-text)}
.aj-btn--ghost:active{--bg:var(--aj-surface-3);--bd:transparent}
.aj-btn--danger{--fg:var(--aj-danger);--bd:var(--aj-brand-200)}
.aj-btn--danger:hover{--bg:var(--aj-brand-50);--bd:var(--aj-brand-300)}
.aj-btn--danger:active{--bg:var(--aj-brand-100);--bd:var(--aj-brand-300)}
.aj-btn--link{--bg:transparent;--bd:transparent;--fg:var(--aj-brand);height:auto;padding:0;border:0;border-radius:2px;text-decoration:underline;text-decoration-color:transparent;text-underline-offset:3px}
.aj-btn--link:hover{--bg:transparent;--fg:var(--aj-brand-hover);text-decoration-color:currentColor}
.aj-btn--link:active{--bg:transparent;transform:none}
.aj-btn--sm{height:32px;padding:0 12px;gap:6px;border-radius:6px;font-size:13px}
.aj-btn--sm .aj-icon{width:16px;height:16px}
.aj-btn--lg{height:48px;padding:0 20px;font-size:15px}
.aj-btn--block{display:flex;width:100%}
.aj-btn--icon{width:40px;padding:0}
.aj-btn--icon.aj-btn--sm{width:32px}.aj-btn--icon.aj-btn--lg{width:48px}
.aj-btn--icon .aj-icon{margin:0}
.aj-btn:disabled,.aj-btn[aria-disabled=true]{opacity:.5;pointer-events:none}
.aj-btn[aria-busy=true]{color:transparent;pointer-events:none}
.aj-btn[aria-busy=true]::after{content:"";position:absolute;inset:0;width:16px;height:16px;margin:auto;border:2px solid var(--fg);border-right-color:transparent;border-radius:50%;animation:aj-spin .6s linear infinite}

/* 8 · Forms */
.aj-field{display:flex;flex-direction:column;gap:6px;min-width:0}
.aj-label{font-size:13px;font-weight:550;line-height:1.4;color:var(--aj-text-2)}
.aj-label__req{margin-left:3px;color:var(--aj-brand)}
.aj-label__opt{margin-left:4px;font-weight:400;color:var(--aj-muted)}
.aj-help{font-size:13px;line-height:1.45;color:var(--aj-muted)}
.aj-error{display:flex;align-items:flex-start;gap:6px;font-size:13px;line-height:1.45;color:var(--aj-danger)}
.aj-error .aj-icon{width:16px;height:16px;margin-top:1px}
.aj-input,.aj-select,.aj-textarea{display:block;width:100%;min-width:0;height:40px;padding:0 12px;border:1px solid var(--aj-border-strong);border-radius:8px;background-color:var(--aj-surface);color:var(--aj-text);font-size:16px;line-height:1.4;appearance:none;transition:var(--aj-tr)}
.aj-input::placeholder,.aj-textarea::placeholder{color:var(--aj-subtle);opacity:1}
.aj-input:hover,.aj-select:hover,.aj-textarea:hover{border-color:var(--aj-subtle)}
.aj-input:focus,.aj-select:focus,.aj-textarea:focus{outline:none;border-color:var(--aj-brand);box-shadow:var(--aj-focus-ring)}
.aj-input:disabled,.aj-select:disabled,.aj-textarea:disabled{background-color:var(--aj-surface-2);border-color:var(--aj-border);color:var(--aj-muted);cursor:not-allowed}
.aj-input[readonly],.aj-textarea[readonly]{background-color:var(--aj-surface-2)}
.aj-field--error :is(.aj-input,.aj-select,.aj-textarea),:is(.aj-input,.aj-select,.aj-textarea)[aria-invalid=true]{border-color:var(--aj-danger)}
.aj-select{padding-right:36px;background:var(--aj-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2378716C' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 16px;cursor:pointer}
.aj-select[multiple],.aj-select[size]:not([size="1"]){height:auto;padding:6px;background-image:none}
.aj-textarea{height:auto;min-height:96px;padding:10px 12px;line-height:1.5;resize:vertical}
.aj-input--sm{height:32px;font-size:13px;border-radius:6px}
.aj-input[type=file]{height:auto;padding:5px;font-size:13px;color:var(--aj-muted);cursor:pointer}
.aj-input[type=file]::file-selector-button{height:28px;margin-right:12px;padding:0 10px;border:1px solid var(--aj-border-strong);border-radius:6px;background:var(--aj-surface-2);color:var(--aj-text);font:inherit;font-weight:550;cursor:pointer}
.aj-input-group{display:flex;align-items:stretch;width:100%;min-width:0;border:1px solid var(--aj-border-strong);border-radius:8px;background:var(--aj-surface);transition:var(--aj-tr)}
.aj-input-group:hover{border-color:var(--aj-subtle)}
.aj-input-group:focus-within{border-color:var(--aj-brand);box-shadow:var(--aj-focus-ring)}
.aj-input-group > .aj-input{flex:1;height:38px;border:0;border-radius:inherit;background:transparent;box-shadow:none}
.aj-input-group__addon{display:flex;align-items:center;flex:none;padding:0 12px;color:var(--aj-muted);white-space:nowrap;-webkit-user-select:none;user-select:none}
.aj-input-group__addon:first-child{padding-right:0}.aj-input-group__addon:last-child{padding-left:0}
.aj-field--error .aj-input-group,.aj-input-group:has([aria-invalid=true]){border-color:var(--aj-danger)}
.aj-check{display:inline-flex;align-items:flex-start;gap:10px;line-height:1.45;cursor:pointer}
.aj-check input{flex:none;width:16px;height:16px;margin:2px 0 0;accent-color:var(--aj-brand);cursor:pointer}
.aj-check input:focus-visible{outline:2px solid var(--aj-brand);outline-offset:2px;box-shadow:none}
.aj-check:has(input:disabled){color:var(--aj-muted);cursor:not-allowed}
.aj-check__hint{display:block;font-size:13px;color:var(--aj-muted)}
.aj-choices{display:flex;flex-direction:column;gap:10px}
.aj-switch{display:inline-flex;align-items:center;gap:10px;cursor:pointer}
.aj-switch input{position:relative;flex:none;width:36px;height:20px;margin:0;border-radius:999px;background:var(--aj-border-strong);appearance:none;cursor:pointer;transition:var(--aj-tr)}
.aj-switch input::before{content:"";position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:50%;background:#fff;box-shadow:0 1px 2px rgb(28 25 23 / .25);transition:var(--aj-tr)}
.aj-switch input:hover{background:var(--aj-subtle)}
.aj-switch input:checked{background:var(--aj-brand)}
.aj-switch input:checked::before{transform:translateX(16px)}
.aj-switch input:disabled{opacity:.5;cursor:not-allowed}
.aj-form-grid{display:grid;gap:16px 20px;grid-template-columns:minmax(0,1fr)}
.aj-form-actions{display:flex;flex-wrap:wrap;gap:8px;padding-top:8px}
.aj-form-actions > .aj-btn{flex:1 1 auto}
@media (min-width:768px){
.aj-input,.aj-select,.aj-textarea{font-size:14px}
.aj-input--sm{font-size:13px}
.aj-form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.aj-form-grid > .aj-field--full,.aj-form-grid__full{grid-column:1 / -1}
.aj-form-actions{justify-content:flex-end}
.aj-form-actions > .aj-btn{flex:0 0 auto}}

/* 9 · Card */
.aj-card{display:flex;flex-direction:column;min-width:0;background:var(--aj-surface);border:1px solid var(--aj-border);border-radius:12px}
.aj-card__header{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px 12px;padding:14px 16px;border-bottom:1px solid var(--aj-divider)}
.aj-card__title{font-size:15px;font-weight:600;line-height:1.35;color:var(--aj-text)}
.aj-card__subtitle{font-size:13px;color:var(--aj-muted)}
.aj-card__body{flex:1;padding:16px}
.aj-card__body--flush{padding:0}
.aj-card__footer{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:8px;padding:12px 16px;border-top:1px solid var(--aj-divider);border-radius:0 0 11px 11px;background:var(--aj-surface-2)}
.aj-card > .aj-table-wrap,.aj-card__body--flush > .aj-table-wrap{border:0;border-radius:0}
.aj-card > .aj-table-wrap:first-child{border-radius:11px 11px 0 0}
.aj-card > .aj-table-wrap:last-child{border-bottom-left-radius:11px;border-bottom-right-radius:11px}
.aj-card--flat{background:var(--aj-surface-2);border-color:transparent}
.aj-card--interactive{cursor:pointer;transition:var(--aj-tr)}
.aj-card--interactive:hover{border-color:var(--aj-border-strong)}
.aj-card--interactive:focus-visible{border-color:var(--aj-brand)}
@media (min-width:768px){.aj-card__header{padding:16px 20px}.aj-card__body{padding:20px}.aj-card__footer{padding:12px 20px}}

/* 10 · Stat */
.aj-stat{position:relative;display:flex;flex-direction:column;gap:6px;min-width:0;padding:16px;background:var(--aj-surface);border:1px solid var(--aj-border);border-radius:12px}
.aj-stat__head{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:24px}
.aj-stat__label{font-size:12px;font-weight:600;line-height:1.4;letter-spacing:.06em;text-transform:uppercase;color:var(--aj-muted)}
.aj-stat__icon{display:grid;place-items:center;flex:none;width:32px;height:32px;margin:-4px -4px -4px 0;border-radius:8px;background:var(--aj-surface-2);color:var(--aj-text-2)}
.aj-stat__icon .aj-icon{width:18px;height:18px}
.aj-stat__value{font-size:22px;font-weight:650;line-height:1.15;letter-spacing:-.022em;font-variant-numeric:tabular-nums;color:var(--aj-text);overflow-wrap:anywhere}
.aj-stat__value .aj-money__cur{font-size:14px;font-weight:500;letter-spacing:0}
.aj-stat__foot{display:flex;align-items:center;flex-wrap:wrap;gap:6px 8px;font-size:13px;color:var(--aj-muted)}
.aj-stat__delta{display:inline-flex;align-items:center;gap:2px;font-weight:600;font-variant-numeric:tabular-nums}
.aj-stat__delta .aj-icon{width:14px;height:14px}
.aj-stat__delta--up{color:var(--aj-success)}.aj-stat__delta--down{color:var(--aj-danger)}
a.aj-stat{transition:var(--aj-tr)}
a.aj-stat:hover{border-color:var(--aj-border-strong)}
a.aj-stat:focus-visible{border-color:var(--aj-brand)}
@media (min-width:768px){.aj-stat{padding:20px}.aj-stat__value{font-size:28px}}

/* 11 · Table: the wrap scrolls sideways; edge shadows show only while content is hidden on that side */
.aj-table-wrap{position:relative;max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;border:1px solid var(--aj-border);border-radius:12px;scrollbar-width:thin;scrollbar-color:var(--aj-border-strong) transparent;background:linear-gradient(to right,var(--aj-surface) 30%,rgb(255 255 255 / 0)) left / 32px 100% no-repeat local,linear-gradient(to left,var(--aj-surface) 30%,rgb(255 255 255 / 0)) right / 32px 100% no-repeat local,radial-gradient(farthest-side at 0 50%,rgb(28 25 23 / .12),transparent) left / 10px 100% no-repeat scroll,radial-gradient(farthest-side at 100% 50%,rgb(28 25 23 / .12),transparent) right / 10px 100% no-repeat scroll,var(--aj-surface)}
.aj-table-wrap--scroll{max-height:min(70vh,640px);overflow:auto}
.aj-table{width:100%;border-collapse:separate;border-spacing:0;font-size:14px;line-height:1.4;font-variant-numeric:tabular-nums}
.aj-table th{height:40px;padding:0 16px;background:var(--aj-surface-2);border-bottom:1px solid var(--aj-border);color:var(--aj-muted);font-size:13px;font-weight:600;text-align:left;white-space:nowrap}
.aj-table td{height:44px;padding:10px 16px;border-bottom:1px solid var(--aj-divider);transition:var(--aj-tr)}
.aj-table tbody tr:last-child > td{border-bottom:0}
.aj-table tbody tr:hover > td{background:var(--aj-surface-2)}
.aj-table tbody tr.is-selected > td{background:var(--aj-brand-50)}
.aj-table .is-num{text-align:right;white-space:nowrap}
.aj-table .is-center{text-align:center}
.aj-table .is-actions{width:1%;text-align:right;white-space:nowrap}
.aj-table .is-muted{color:var(--aj-muted)}
.aj-table .is-sticky{position:sticky;left:0;z-index:1;background:var(--aj-surface);box-shadow:inset -1px 0 0 var(--aj-divider)}
.aj-table th.is-sticky{z-index:2;background:var(--aj-surface-2)}
.aj-table tfoot td{background:var(--aj-surface-2);border-top:1px solid var(--aj-border);border-bottom:0;font-weight:600}
.aj-table a:not([class]){font-weight:550;text-decoration:underline;text-decoration-color:transparent;text-underline-offset:3px}
.aj-table a:not([class]):hover{text-decoration-color:var(--aj-border-strong)}
.aj-table__sub{display:block;font-size:13px;font-weight:400;color:var(--aj-muted)}
.aj-table--compact th{height:36px;padding:0 12px}
.aj-table--compact td{height:36px;padding:6px 12px}
.aj-table--sticky thead th{position:sticky;top:0;z-index:2}
.aj-table--sticky thead th.is-sticky{z-index:3}
.aj-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-bottom:12px}
.aj-toolbar__search{flex:1 1 220px;max-width:360px}
@media (max-width:640px){
.aj-table--stack,.aj-table--stack tbody,.aj-table--stack tr,.aj-table--stack td{display:block;width:100%}
.aj-table--stack thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.aj-table-wrap:has(> .aj-table--stack),.aj-card:has(> .aj-table-wrap > .aj-table--stack){overflow:visible;border:0;border-radius:0;background:none}
.aj-table--stack tr{margin-bottom:12px;padding:4px 0;background:var(--aj-surface);border:1px solid var(--aj-border);border-radius:12px}
.aj-table--stack td{display:flex;align-items:baseline;justify-content:space-between;gap:16px;height:auto;padding:7px 14px;border:0;text-align:right}
.aj-table--stack td::before{content:attr(data-label);flex:none;max-width:48%;color:var(--aj-muted);font-size:13px;font-weight:500;text-align:left}
.aj-table--stack td:not([data-label])::before,.aj-table--stack td.is-primary::before{content:none}
.aj-table--stack td.is-primary{display:block;margin-bottom:4px;padding:10px 14px;border-bottom:1px solid var(--aj-divider);font-size:15px;font-weight:600;text-align:left}
.aj-table--stack td:empty{display:none}
.aj-table--stack tbody tr:hover > td{background:none}
.aj-table--stack .is-sticky{position:static;box-shadow:none}}

/* 12 · Semantic variants, shared by badge, alert and toast */
.aj-badge,.aj-alert,.aj-toast{--v-fg:var(--aj-text-2);--v-bg:var(--aj-surface-2);--v-bd:var(--aj-border)}
.aj-alert,.aj-toast{--v-fg:var(--aj-info);--v-bg:var(--aj-info-bg);--v-bd:var(--aj-info-border)}
.aj-badge--brand{--v-fg:var(--aj-brand);--v-bg:var(--aj-brand-50);--v-bd:var(--aj-brand-200)}
.aj-badge--success,.aj-alert--success,.aj-toast--success{--v-fg:var(--aj-success);--v-bg:var(--aj-success-bg);--v-bd:var(--aj-success-border)}
.aj-badge--warning,.aj-alert--warning,.aj-toast--warning{--v-fg:var(--aj-warning);--v-bg:var(--aj-warning-bg);--v-bd:var(--aj-warning-border)}
.aj-badge--info{--v-fg:var(--aj-info);--v-bg:var(--aj-info-bg);--v-bd:var(--aj-info-border)}
.aj-badge--danger,.aj-alert--danger,.aj-toast--danger{--v-fg:var(--aj-danger);--v-bg:var(--aj-danger-bg);--v-bd:var(--aj-danger-border)}
.aj-badge--violet{--v-fg:var(--aj-violet);--v-bg:var(--aj-violet-bg);--v-bd:var(--aj-violet-border)}
.aj-badge--teal{--v-fg:var(--aj-teal);--v-bg:var(--aj-teal-bg);--v-bd:var(--aj-teal-border)}
.aj-alert--neutral{--v-fg:var(--aj-muted);--v-bg:var(--aj-surface-2);--v-bd:var(--aj-border)}
.aj-badge{display:inline-flex;align-items:center;gap:6px;height:22px;padding:0 8px;border:1px solid var(--v-bd);border-radius:999px;background:var(--v-bg);color:var(--v-fg);font-size:12px;font-weight:550;line-height:1;white-space:nowrap;vertical-align:middle}
.aj-badge .aj-icon{width:12px;height:12px;margin-inline:-1px}
.aj-badge--dot::before{content:"";flex:none;width:6px;height:6px;border-radius:50%;background:currentColor}

/* 13 · Tabs and segmented control */
.aj-tabs{display:flex;gap:20px;overflow-x:auto;border-bottom:1px solid var(--aj-border);scrollbar-width:none}
.aj-tabs__item{position:relative;display:inline-flex;align-items:center;gap:8px;flex:none;height:40px;padding:0;border:0;background:none;color:var(--aj-muted);font-size:14px;font-weight:550;white-space:nowrap;cursor:pointer;transition:var(--aj-tr)}
.aj-tabs__item::after{content:"";position:absolute;inset:auto 0 -1px;height:2px;border-radius:2px 2px 0 0;transition:var(--aj-tr)}
.aj-tabs__item:hover{color:var(--aj-text)}
.aj-tabs__item:hover::after{background:var(--aj-border-strong)}
.aj-tabs__item:is(.is-active,[aria-current=page],[aria-selected=true]){color:var(--aj-brand)}
.aj-tabs__item:is(.is-active,[aria-current=page],[aria-selected=true])::after{background:var(--aj-brand)}
.aj-tabs__item:focus-visible{box-shadow:inset 0 0 0 2px rgb(180 0 0 / .3);border-radius:4px}
.aj-tabs__count{display:inline-grid;place-items:center;min-width:20px;height:18px;padding:0 6px;border-radius:999px;background:var(--aj-surface-3);color:var(--aj-text-2);font-size:11px;font-weight:600}
.aj-tabs__item:is(.is-active,[aria-current=page],[aria-selected=true]) .aj-tabs__count{background:var(--aj-brand-50);color:var(--aj-brand)}
.aj-segmented{display:inline-flex;align-items:center;gap:2px;max-width:100%;padding:3px;overflow-x:auto;border:1px solid var(--aj-border);border-radius:8px;background:var(--aj-surface-2);scrollbar-width:none;vertical-align:middle}
.aj-segmented__item{position:relative;display:inline-flex;align-items:center;justify-content:center;gap:6px;flex:none;height:28px;padding:0 12px;border:0;border-radius:6px;background:transparent;color:var(--aj-text-2);font-size:13px;font-weight:550;white-space:nowrap;cursor:pointer;transition:var(--aj-tr)}
.aj-segmented__item:hover{color:var(--aj-text);background:rgb(255 255 255 / .7)}
.aj-segmented__item:is(.is-active,[aria-current=page],[aria-pressed=true],[aria-checked=true]),.aj-segmented__item:has(input:checked){background:var(--aj-surface);color:var(--aj-text);box-shadow:0 0 0 1px var(--aj-border)}
.aj-segmented__item:focus-visible,.aj-segmented__item:has(input:focus-visible){box-shadow:var(--aj-focus-ring)}
.aj-segmented__item input{position:absolute;opacity:0;pointer-events:none}

/* 14 · Navigation: sidebar, nav, topbar, bottom nav, drawer */
.aj-sidebar{display:flex;flex-direction:column;width:var(--aj-sidebar-w);min-height:0;background:var(--aj-surface);border-right:1px solid var(--aj-border)}
.aj-sidebar__brand{display:flex;align-items:center;justify-content:space-between;gap:8px;flex:none;height:var(--aj-header-h);padding:0 12px 0 20px;border-bottom:1px solid var(--aj-divider)}
.aj-sidebar__logo{display:flex;align-items:center;height:40px;border-radius:6px}
.aj-sidebar__logo img{width:auto;height:22px}
.aj-sidebar__body{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:8px 0 16px;scrollbar-width:thin;scrollbar-color:var(--aj-border-strong) transparent}
.aj-sidebar__foot{display:flex;align-items:center;gap:10px;flex:none;padding:12px 16px;border-top:1px solid var(--aj-divider)}
.aj-sidebar__user{flex:1;min-width:0;line-height:1.3}
.aj-sidebar__user strong{display:block;overflow:hidden;font-size:13px;text-overflow:ellipsis;white-space:nowrap}
.aj-sidebar__user span{display:block;font-size:12px;color:var(--aj-muted);font-variant-numeric:tabular-nums}
.aj-nav{display:flex;flex-direction:column}
.aj-nav__group{display:flex;flex-direction:column;gap:1px;padding-block:6px}
.aj-nav__group-label{padding:10px 20px 6px;font-size:11px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--aj-muted)}
.aj-nav__item{position:relative;display:flex;align-items:center;gap:12px;height:36px;margin:0 8px;padding:0 12px;border-radius:6px;color:var(--aj-text-2);font-weight:500;transition:var(--aj-tr)}
.aj-nav__item:hover{background:var(--aj-surface-2);color:var(--aj-text)}
.aj-nav__icon{width:18px;height:18px;color:var(--aj-muted);transition:var(--aj-tr)}
.aj-nav__item:hover .aj-nav__icon{color:var(--aj-text-2)}
.aj-nav__label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.aj-nav__badge{display:inline-grid;place-items:center;min-width:20px;height:20px;padding:0 6px;border-radius:999px;background:var(--aj-surface-3);color:var(--aj-text-2);font-size:11px;font-weight:600}
.aj-nav__ext{width:14px;height:14px;color:var(--aj-subtle)}
/* signature 3: active = crimson text + 2px crimson bar on the leading edge */
.aj-nav__item.is-active{color:var(--aj-brand);font-weight:600}
.aj-nav__item.is-active::before{content:"";position:absolute;left:-8px;top:8px;bottom:8px;width:2px;border-radius:0 2px 2px 0;background:var(--aj-brand)}
.aj-nav__item.is-active .aj-nav__icon{color:var(--aj-brand)}
.aj-nav__item.is-active .aj-nav__badge{background:var(--aj-brand-50);color:var(--aj-brand)}
.aj-topbar{position:sticky;top:var(--aj-rule);z-index:var(--aj-z-header);display:flex;align-items:center;gap:8px;height:var(--aj-header-h);padding:0 max(var(--aj-gutter),env(safe-area-inset-right)) 0 max(var(--aj-gutter),env(safe-area-inset-left));background:rgb(255 255 255 / .92);border-bottom:1px solid var(--aj-border);backdrop-filter:saturate(1.6) blur(10px)}
.aj-topbar__brand{display:flex;align-items:center;gap:8px;min-width:0;height:40px;font-size:15px;font-weight:650;letter-spacing:-.011em}
.aj-topbar__brand .aj-icon{width:24px;height:24px;color:var(--aj-brand)}
.aj-topbar__end{display:flex;align-items:center;gap:4px;margin-left:auto}
.aj-balance{display:inline-flex;align-items:center;gap:6px;height:32px;padding:0 10px;border:1px solid var(--aj-border);border-radius:999px;background:var(--aj-surface);font-size:13px;font-weight:600;transition:var(--aj-tr)}
.aj-balance .aj-icon{width:16px;height:16px;color:var(--aj-muted)}
.aj-balance:hover{border-color:var(--aj-border-strong);background:var(--aj-surface-2)}
.aj-user-btn{display:inline-flex;align-items:center;gap:8px;height:40px;padding:0 6px;border:0;border-radius:8px;background:none;font-weight:550;transition:var(--aj-tr)}
.aj-user-btn:hover{background:var(--aj-surface-2)}
.aj-user-btn > .aj-icon{width:16px;height:16px;color:var(--aj-muted)}
.aj-bottom-nav{position:fixed;inset:auto 0 0;z-index:var(--aj-z-header);display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);height:calc(var(--aj-bottom-nav-h) + env(safe-area-inset-bottom));padding:0 max(4px,env(safe-area-inset-right)) env(safe-area-inset-bottom) max(4px,env(safe-area-inset-left));background:rgb(255 255 255 / .94);border-top:1px solid var(--aj-border);backdrop-filter:saturate(1.6) blur(10px)}
.aj-bottom-nav__item{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:0;color:var(--aj-muted);font-size:11px;font-weight:550;letter-spacing:.01em;transition:var(--aj-tr)}
.aj-bottom-nav__item .aj-icon{width:22px;height:22px}
.aj-bottom-nav__label{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.aj-bottom-nav__item.is-active{color:var(--aj-brand)}
.aj-bottom-nav__item:focus-visible{box-shadow:inset 0 0 0 2px rgb(180 0 0 / .35);border-radius:8px}
.aj-drawer{position:fixed;top:0;bottom:0;left:0;z-index:var(--aj-z-drawer);display:flex;flex-direction:column;width:min(300px,86vw);background:var(--aj-surface);box-shadow:var(--aj-shadow-lg);transform:translateX(-100%);visibility:hidden;outline:none;transition:transform var(--aj-dur-slow) var(--aj-ease),visibility 0s linear var(--aj-dur-slow)}
.aj-drawer--end{left:auto;right:0;transform:translateX(100%)}
.aj-drawer.is-open{transform:none;visibility:visible;transition:transform var(--aj-dur-slow) var(--aj-ease)}
.aj-backdrop{position:fixed;inset:0;z-index:59;background:rgb(28 25 23 / .4);opacity:0;visibility:hidden;transition:opacity var(--aj-dur-slow) var(--aj-ease),visibility 0s linear var(--aj-dur-slow)}
.aj-backdrop.is-open{opacity:1;visibility:visible;transition:opacity var(--aj-dur-slow) var(--aj-ease)}
html.aj-scroll-lock,html.aj-scroll-lock body{overflow:hidden}
@media (min-width:1024px){.aj-bottom-nav{display:none}}

/* 15 · App shell (cabinet, seller, statistics): the sidebar is a drawer below 1024px */
.aj-app{min-height:calc(100dvh - var(--aj-rule))}
.aj-app__main{display:flex;flex-direction:column;min-width:0;min-height:calc(100dvh - var(--aj-rule))}
.aj-app__content{flex:1;width:100%;max-width:calc(var(--aj-container-wide) + 2 * var(--aj-gutter));margin-inline:auto;padding:20px max(var(--aj-gutter),env(safe-area-inset-right)) calc(var(--aj-bottom-nav-h) + env(safe-area-inset-bottom) + 32px) max(var(--aj-gutter),env(safe-area-inset-left))}
.aj-app__content:focus{outline:none}
.aj-app__content--narrow{max-width:calc(880px + 2 * var(--aj-gutter))}
.aj-app .aj-sidebar.aj-drawer{top:var(--aj-rule);width:min(var(--aj-sidebar-w),86vw)}
@media (min-width:1024px){
.aj-app .aj-sidebar.aj-drawer{width:var(--aj-sidebar-w);transform:none;visibility:visible;box-shadow:none;transition:none;z-index:var(--aj-z-header)}
.aj-app__main{margin-left:var(--aj-sidebar-w)}
.aj-app__content{padding:32px 32px 48px}
.aj-app .aj-backdrop,.aj-app__menu-btn,.aj-app__sidebar-close,.aj-topbar__brand{display:none}}

/* 16 · Public storefront: header, search, category chips, footer */
.aj-site{display:flex;flex-direction:column;min-height:calc(100dvh - var(--aj-rule))}
.aj-site__main{flex:1;min-width:0}
.aj-header{position:sticky;top:var(--aj-rule);z-index:var(--aj-z-header);background:rgb(255 255 255 / .94);border-bottom:1px solid var(--aj-border);backdrop-filter:saturate(1.6) blur(10px)}
.aj-header__bar{display:flex;flex-wrap:wrap;align-items:center;column-gap:12px}
.aj-header__logo{display:flex;align-items:center;flex:none;height:40px;border-radius:6px}
.aj-header__logo img{width:auto;height:22px}
.aj-header__nav{display:none;flex:none;gap:2px}
.aj-header__link{display:inline-flex;align-items:center;height:36px;padding:0 10px;border-radius:6px;color:var(--aj-text-2);font-weight:550;white-space:nowrap;transition:var(--aj-tr)}
.aj-header__link:hover{background:var(--aj-surface-2);color:var(--aj-text)}
.aj-header__link.is-active{color:var(--aj-brand)}
.aj-header__search{order:5;flex:1 0 100%;padding-bottom:12px}
.aj-header__actions{display:flex;align-items:center;gap:4px;min-height:var(--aj-header-h);margin-left:auto}
.aj-search{position:relative;display:flex;align-items:center;width:100%}
.aj-search__icon{position:absolute;left:12px;width:18px;height:18px;color:var(--aj-muted);pointer-events:none}
.aj-search__input{width:100%;height:40px;padding:0 12px 0 40px;border:1px solid transparent;border-radius:8px;background:var(--aj-surface-2);font-size:16px;appearance:none;transition:var(--aj-tr)}
.aj-search__input::placeholder{color:var(--aj-muted);opacity:1}
.aj-search__input:hover{background:var(--aj-surface-3)}
.aj-search__input:focus{outline:none;background:var(--aj-surface);border-color:var(--aj-brand);box-shadow:var(--aj-focus-ring)}
.aj-chips{display:flex;gap:8px;margin-inline:calc(-1 * var(--aj-gutter));padding:12px var(--aj-gutter);overflow-x:auto;scroll-padding-inline:var(--aj-gutter);scroll-snap-type:x proximity;scrollbar-width:none;mask-image:linear-gradient(to right,transparent,#000 var(--aj-gutter),#000 calc(100% - 32px),transparent)}
.aj-chip{display:inline-flex;align-items:center;gap:6px;flex:none;height:32px;padding:0 14px;border:1px solid var(--aj-border);border-radius:999px;background:var(--aj-surface);color:var(--aj-text-2);font-size:13px;font-weight:550;white-space:nowrap;scroll-snap-align:start;transition:var(--aj-tr)}
.aj-chip:hover{border-color:var(--aj-border-strong);color:var(--aj-text)}
.aj-chip.is-active{border-color:var(--aj-brand-200);background:var(--aj-brand-50);color:var(--aj-brand)}
.aj-footer{margin-top:48px;padding:40px 0 calc(24px + env(safe-area-inset-bottom));background:var(--aj-surface);border-top:1px solid var(--aj-border);color:var(--aj-text-2)}
.aj-footer__grid{display:grid;gap:32px;grid-template-columns:minmax(0,1fr)}
.aj-footer__brand img{width:auto;height:22px;margin-bottom:12px}
.aj-footer__about{max-width:38ch;color:var(--aj-muted)}
.aj-footer__title{margin-bottom:12px;font-size:12px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--aj-muted)}
.aj-footer__links{display:flex;flex-direction:column;align-items:flex-start;gap:8px}
.aj-footer__links a{display:inline-flex;align-items:center;gap:8px;transition:var(--aj-tr)}
.aj-footer__links a:hover{color:var(--aj-text)}
.aj-footer__links .aj-icon{width:16px;height:16px;color:var(--aj-muted)}
.aj-footer__bottom{display:flex;flex-wrap:wrap;justify-content:space-between;gap:12px;margin-top:32px;padding-top:20px;border-top:1px solid var(--aj-divider);font-size:13px;color:var(--aj-muted)}
@media (min-width:768px){
.aj-header__bar{flex-wrap:nowrap;height:var(--aj-header-h)}
.aj-header__search{order:0;flex:1 1 auto;max-width:520px;padding-bottom:0}
.aj-header__logo img{height:24px}
.aj-search__input{font-size:14px}
.aj-chips{margin-inline:0;padding-inline:0;mask-image:linear-gradient(to left,transparent,#000 32px)}
.aj-footer__grid{grid-template-columns:2fr 1fr 1fr 1fr}}
@media (min-width:1024px){.aj-header__nav{display:flex}}

/* 17 · Auth: brand panel (from 1024px) + form card (from 640px) */
.aj-auth{display:grid;grid-template-columns:minmax(0,1fr);min-height:calc(100dvh - var(--aj-rule))}
.aj-auth__aside{display:none}
.aj-auth__main{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:32px var(--aj-gutter) calc(32px + env(safe-area-inset-bottom))}
.aj-auth__logo{display:flex;margin-bottom:32px;border-radius:6px}
.aj-auth__logo img{width:auto;height:26px}
.aj-auth__card{width:100%;max-width:400px}
.aj-auth__header{margin-bottom:24px}
.aj-auth__title{font-size:22px;font-weight:650;line-height:1.2;letter-spacing:-.011em}
.aj-auth__subtitle{margin-top:6px;color:var(--aj-muted)}
.aj-auth__foot{width:100%;max-width:400px;margin-top:20px;text-align:center;color:var(--aj-muted)}
.aj-auth__seal{width:32px;height:32px;margin-bottom:24px;color:var(--aj-brand)}
.aj-auth__pitch{max-width:440px}
.aj-auth__legal{font-size:13px;color:var(--aj-muted)}
@media (min-width:640px){.aj-auth__card{padding:32px;background:var(--aj-surface);border:1px solid var(--aj-border);border-radius:16px}}
@media (min-width:1024px){
.aj-auth{grid-template-columns:minmax(0,5fr) minmax(0,7fr)}
.aj-auth__aside{display:flex;flex-direction:column;justify-content:space-between;gap:40px;padding:48px;background:var(--aj-surface);border-right:1px solid var(--aj-border)}
.aj-auth__aside .aj-auth__logo{margin-bottom:0}
.aj-auth__main > .aj-auth__logo{display:none}}

/* 18 · Commerce: product card, gallery, price, sticky buy bar */
.aj-product-grid{display:grid;gap:12px;grid-template-columns:repeat(2,minmax(0,1fr))}
.aj-product-card{position:relative;display:flex;flex-direction:column;min-width:0;overflow:hidden;background:var(--aj-surface);border:1px solid var(--aj-border);border-radius:12px;transition:var(--aj-tr)}
.aj-product-card:hover{border-color:var(--aj-border-strong)}
.aj-product-card:has(.aj-product-card__link:focus-visible){border-color:var(--aj-brand);box-shadow:var(--aj-focus-ring)}
.aj-product-card__media{position:relative;aspect-ratio:1;overflow:hidden;background:var(--aj-surface-2);border-bottom:1px solid var(--aj-divider)}
.aj-product-card__media img{width:100%;height:100%;object-fit:cover}
.aj-product-card__placeholder{display:grid;place-items:center;height:100%;color:var(--aj-border-strong)}
.aj-product-card__placeholder .aj-icon{width:40px;height:40px}
.aj-product-card__badge{position:absolute;top:8px;left:8px;z-index:1}
.aj-product-card__body{display:flex;flex:1;flex-direction:column;gap:4px;padding:10px 12px 12px}
.aj-product-card__title{display:-webkit-box;min-height:2.8em;overflow:hidden;font-weight:500;line-height:1.4;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2}
.aj-product-card__link::after{content:"";position:absolute;inset:0}
.aj-product-card__link:focus-visible{box-shadow:none}
.aj-product-card__price-row{display:flex;align-items:baseline;flex-wrap:wrap;gap:2px 8px;margin-top:auto;padding-top:6px}
.aj-product-card__price{font-size:16px;font-weight:600;letter-spacing:-.011em}
.aj-product-card__old-price{font-size:13px;color:var(--aj-muted);text-decoration:line-through}
.aj-product-card__meta{font-size:12px;color:var(--aj-muted)}
.aj-product-card__actions{position:relative;z-index:1;display:flex;gap:8px;padding:0 12px 12px}
.aj-gallery{display:flex;flex-direction:column;gap:12px;min-width:0}
.aj-gallery__track{display:flex;overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x mandatory;scroll-behavior:smooth;scrollbar-width:none;background:var(--aj-surface);border:1px solid var(--aj-border);border-radius:12px}
.aj-gallery__slide{flex:0 0 100%;aspect-ratio:1;scroll-snap-align:start;scroll-snap-stop:always}
.aj-gallery__slide img{width:100%;height:100%;object-fit:contain}
.aj-gallery__thumbs{display:flex;gap:8px;overflow-x:auto;scrollbar-width:none}
.aj-gallery__thumb{flex:none;width:64px;height:64px;padding:0;overflow:hidden;background:var(--aj-surface);border:1px solid var(--aj-border);border-radius:8px;opacity:.72;cursor:pointer;transition:var(--aj-tr)}
.aj-gallery__thumb img{width:100%;height:100%;object-fit:cover}
.aj-gallery__thumb:hover{opacity:1}
.aj-gallery__thumb.is-active{opacity:1;border-color:var(--aj-text);box-shadow:inset 0 0 0 1px var(--aj-text)}
.aj-gallery__thumb:focus-visible{box-shadow:var(--aj-focus-ring)}
.aj-price{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 12px}
.aj-price__value{font-size:28px;font-weight:700;line-height:1.1;letter-spacing:-.022em}
.aj-price__value .aj-money__cur{font-size:16px;font-weight:500;letter-spacing:0}
.aj-price__old{font-size:16px;color:var(--aj-muted);text-decoration:line-through}
.aj-buy-bar{position:fixed;inset:auto 0 0;z-index:var(--aj-z-header);display:flex;align-items:center;gap:12px;padding:12px max(16px,env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));background:var(--aj-surface);border-top:1px solid var(--aj-border);box-shadow:0 -8px 24px rgb(28 25 23 / .08)}
.aj-buy-bar__price{display:flex;flex-direction:column;min-width:0;line-height:1.2}
.aj-buy-bar__label{font-size:12px;color:var(--aj-muted)}
.aj-buy-bar__value{font-size:18px;font-weight:650;letter-spacing:-.011em;white-space:nowrap}
.aj-buy-bar .aj-btn{flex:1;height:48px;font-size:15px}
.aj-has-buy-bar{padding-bottom:calc(76px + env(safe-area-inset-bottom))}
@media (min-width:640px){.aj-product-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}}
@media (min-width:768px){.aj-product-card__body{padding:12px 16px 16px}.aj-product-card__title{font-size:15px}.aj-product-card__actions{padding:0 16px 16px}}
@media (min-width:1024px){.aj-product-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.aj-buy-bar{display:none}.aj-has-buy-bar{padding-bottom:0}}

/* 19 · Feedback: alert, toast, empty state, skeleton, spinner */
.aj-alert{display:flex;align-items:flex-start;gap:12px;padding:12px 14px;background:var(--v-bg);border:1px solid var(--v-bd);border-radius:8px;line-height:1.5}
.aj-alert > .aj-icon,.aj-toast > .aj-icon{width:18px;height:18px;margin-top:1px;color:var(--v-fg)}
.aj-alert__body{flex:1;min-width:0}
.aj-alert__title{font-weight:600}
.aj-alert__text{color:var(--aj-text-2)}
.aj-alert__close{margin:-6px -8px -6px 0}
.aj-toasts{position:fixed;left:12px;right:12px;bottom:calc(12px + env(safe-area-inset-bottom));z-index:var(--aj-z-toast);display:flex;flex-direction:column;gap:8px;pointer-events:none}
body:has(.aj-bottom-nav) .aj-toasts{bottom:calc(var(--aj-bottom-nav-h) + 12px + env(safe-area-inset-bottom))}
.aj-toast{display:flex;align-items:flex-start;gap:10px;padding:12px 8px 12px 14px;background:var(--aj-surface);border:1px solid var(--aj-border);border-radius:12px;box-shadow:var(--aj-shadow-lg);line-height:1.45;pointer-events:auto;animation:aj-toast-in var(--aj-dur-slow) var(--aj-ease) both}
.aj-toast__body{flex:1;min-width:0;overflow-wrap:anywhere}
.aj-toast__close{display:grid;place-items:center;flex:none;width:28px;height:28px;margin:-4px 0;padding:0;border:0;border-radius:6px;background:none;color:var(--aj-muted);transition:var(--aj-tr)}
.aj-toast__close:hover{background:var(--aj-surface-2);color:var(--aj-text)}
.aj-toast__close .aj-icon{width:16px;height:16px}
.aj-toast.is-leaving{animation:aj-toast-out 160ms var(--aj-ease) forwards}
.aj-empty{display:flex;flex-direction:column;align-items:center;gap:8px;max-width:440px;margin-inline:auto;padding:40px 20px;text-align:center}
.aj-empty__mark{display:grid;place-items:center;width:48px;height:48px;margin-bottom:8px;background:var(--aj-surface-2);border:1px solid var(--aj-border);border-radius:12px;color:var(--aj-muted)}
.aj-empty__mark .aj-icon{width:24px;height:24px}
/* signature 2: the arch glyph as the crimson seal */
.aj-empty__mark--seal{background:var(--aj-brand-50);border-color:var(--aj-brand-100);color:var(--aj-brand)}
.aj-empty__title{font-size:16px;font-weight:600;line-height:1.35}
.aj-empty__text{max-width:40ch;color:var(--aj-muted)}
.aj-empty__action{margin-top:12px}
.aj-empty--compact{padding:24px 16px}
.aj-skeleton{display:block;height:12px;border-radius:6px;background:linear-gradient(90deg,var(--aj-surface-2) 25%,var(--aj-surface-3) 50%,var(--aj-surface-2) 75%) 0 0 / 200% 100%;animation:aj-shimmer 1.4s ease-in-out infinite}
.aj-skeleton--title{height:20px;width:40%}.aj-skeleton--block{height:96px;border-radius:12px}.aj-skeleton--circle{width:32px;height:32px;border-radius:50%}
.aj-skeleton--w-25{width:25%}.aj-skeleton--w-50{width:50%}.aj-skeleton--w-75{width:75%}
.aj-spinner{display:inline-block;flex:none;width:16px;height:16px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;vertical-align:-3px;animation:aj-spin .6s linear infinite}
.aj-spinner--lg{width:24px;height:24px}
@media (min-width:768px){.aj-toasts{right:24px;left:auto;width:380px}}
@media (min-width:1024px){.aj-toasts,body:has(.aj-bottom-nav) .aj-toasts{bottom:calc(24px + env(safe-area-inset-bottom))}}

/* 20 · Overlays: <dialog class="aj-modal"> (bottom sheet below 640px), dropdown */
.aj-modal{width:min(560px,calc(100vw - 32px));max-width:none;max-height:calc(100dvh - 64px);margin:auto;padding:0;overflow:hidden;background:var(--aj-surface);border:1px solid var(--aj-border);border-radius:16px;box-shadow:var(--aj-shadow-lg);color:var(--aj-text)}
.aj-modal[open]{display:flex;flex-direction:column;animation:aj-modal-in 180ms var(--aj-ease)}
.aj-modal::backdrop{background:rgb(28 25 23 / .45);animation:aj-fade-in 180ms var(--aj-ease)}
.aj-modal--sm{width:min(400px,calc(100vw - 32px))}.aj-modal--lg{width:min(760px,calc(100vw - 32px))}
.aj-modal__header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex:none;padding:16px 20px;border-bottom:1px solid var(--aj-divider)}
.aj-modal__title{font-size:16px;font-weight:600;line-height:1.35;letter-spacing:-.011em}
.aj-modal__desc{margin-top:2px;font-size:13px;color:var(--aj-muted)}
.aj-modal__close{margin:-6px -8px -6px 0}
.aj-modal__body{flex:1 1 auto;padding:20px;overflow-y:auto;overscroll-behavior:contain}
.aj-modal__footer{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px;flex:none;padding:12px 20px;background:var(--aj-surface-2);border-top:1px solid var(--aj-divider)}
@media (max-width:640px){
.aj-modal{width:100%;max-width:100%;max-height:calc(100dvh - 24px);margin:auto 0 0;border-bottom:0;border-radius:16px 16px 0 0}
.aj-modal[open]{animation:aj-sheet-in var(--aj-dur-slow) var(--aj-ease)}
.aj-modal__footer{padding-bottom:calc(12px + env(safe-area-inset-bottom))}
.aj-modal__footer > .aj-btn{flex:1 1 auto}}
.aj-dropdown{position:relative;display:inline-flex}
.aj-dropdown__menu{position:absolute;top:calc(100% + 4px);left:0;z-index:30;min-width:200px;max-width:min(320px,calc(100vw - 24px));padding:4px;background:var(--aj-surface);border:1px solid var(--aj-border);border-radius:8px;box-shadow:var(--aj-shadow-md);animation:aj-pop-in 120ms var(--aj-ease)}
.aj-dropdown__menu--end{left:auto;right:0}
.aj-dropdown__menu--up{top:auto;bottom:calc(100% + 4px)}
.aj-dropdown__item{display:flex;align-items:center;gap:10px;width:100%;height:36px;padding:0 10px;border:0;border-radius:6px;background:none;color:var(--aj-text);font-weight:450;text-align:left;white-space:nowrap;cursor:pointer;transition:var(--aj-tr)}
.aj-dropdown__item .aj-icon{width:16px;height:16px;color:var(--aj-muted)}
.aj-dropdown__item:hover,.aj-dropdown__item:focus-visible{background:var(--aj-surface-2);box-shadow:none}
.aj-dropdown__item.is-active{color:var(--aj-brand);font-weight:550}
.aj-dropdown__item--danger,.aj-dropdown__item--danger .aj-icon{color:var(--aj-danger)}
.aj-dropdown__item--danger:hover,.aj-dropdown__item--danger:focus-visible{background:var(--aj-brand-50)}
.aj-dropdown__divider{height:1px;margin:4px -4px;border:0;background:var(--aj-divider)}
.aj-dropdown__label{padding:8px 10px 4px;font-size:11px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--aj-muted)}
.aj-dropdown__header{display:flex;align-items:center;gap:10px;margin:-4px -4px 4px;padding:12px;border-bottom:1px solid var(--aj-divider);line-height:1.3}
.aj-dropdown__header span{font-size:13px;color:var(--aj-muted)}

/* 21 · Data: pagination, page header, breadcrumbs, dl, list, copy, progress, avatar, divider */
.aj-pagination{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;padding-top:16px}
.aj-pagination__info{font-size:13px;color:var(--aj-muted);font-variant-numeric:tabular-nums}
.aj-pagination__list{display:flex;align-items:center;gap:4px}
.aj-pagination__link{display:inline-flex;align-items:center;justify-content:center;gap:4px;min-width:36px;height:36px;padding:0 10px;border:1px solid transparent;border-radius:8px;color:var(--aj-text-2);font-weight:550;font-variant-numeric:tabular-nums;transition:var(--aj-tr)}
.aj-pagination__link .aj-icon{width:16px;height:16px}
.aj-pagination__link:hover{background:var(--aj-surface-2);color:var(--aj-text)}
.aj-pagination__link--nav{background:var(--aj-surface);border-color:var(--aj-border-strong);color:var(--aj-text)}
.aj-pagination__link--nav:hover{border-color:var(--aj-subtle)}
.aj-pagination__link[aria-current=page]{background:var(--aj-brand-50);border-color:var(--aj-brand-200);color:var(--aj-brand)}
.aj-pagination__link[aria-disabled=true]{opacity:.45;pointer-events:none}
.aj-pagination__gap{min-width:20px;color:var(--aj-subtle);text-align:center}
.aj-pagination__label{display:none}
@media (max-width:639px){.aj-pagination__page:not(.is-current){display:none}}
@media (min-width:640px){.aj-pagination__label{display:inline}.aj-pagination__link--nav{padding:0 12px}}
.aj-page-header{display:flex;flex-direction:column;gap:12px;margin-bottom:20px}
.aj-page-header__row{display:flex;align-items:flex-end;justify-content:space-between;flex-wrap:wrap;gap:12px 24px}
.aj-page-header__text{display:flex;flex-direction:column;gap:4px;min-width:0}
.aj-page-header__subtitle{max-width:70ch;color:var(--aj-muted)}
.aj-page-header__actions{display:flex;flex-wrap:wrap;gap:8px}
.aj-page-header__back{display:inline-flex;align-items:center;gap:4px;align-self:flex-start;font-size:13px;font-weight:500;color:var(--aj-muted);transition:var(--aj-tr)}
.aj-page-header__back:hover{color:var(--aj-text)}
.aj-page-header__back .aj-icon{width:16px;height:16px}
@media (min-width:768px){.aj-page-header{margin-bottom:24px}}
.aj-breadcrumbs ol{display:flex;align-items:center;flex-wrap:wrap;gap:6px;padding:0;list-style:none;font-size:13px;color:var(--aj-muted)}
.aj-breadcrumbs li{display:inline-flex;align-items:center;gap:6px;min-width:0}
.aj-breadcrumbs li + li::before{content:"/";color:var(--aj-border-strong)}
.aj-breadcrumbs a{transition:var(--aj-tr)}
.aj-breadcrumbs a:hover{color:var(--aj-text)}
.aj-breadcrumbs [aria-current=page]{max-width:40ch;overflow:hidden;color:var(--aj-text-2);font-weight:500;text-overflow:ellipsis;white-space:nowrap}
.aj-dl__row{display:grid;gap:2px;padding:10px 0;border-bottom:1px solid var(--aj-divider)}
.aj-dl__row:first-child{padding-top:0}.aj-dl__row:last-child{padding-bottom:0;border-bottom:0}
.aj-dl dt{font-size:13px;color:var(--aj-muted)}
.aj-dl dd{font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
@media (min-width:640px){.aj-dl__row{grid-template-columns:minmax(120px,200px) minmax(0,1fr);gap:16px}}
.aj-list__item{display:flex;align-items:center;gap:12px;min-width:0;padding:12px 16px;border-bottom:1px solid var(--aj-divider)}
.aj-list__item:last-child{border-bottom:0}
a.aj-list__item{transition:var(--aj-tr)}
a.aj-list__item:hover{background:var(--aj-surface-2)}
a.aj-list__item:focus-visible{box-shadow:inset var(--aj-focus-ring)}
.aj-list__body{flex:1;min-width:0}
.aj-list__title{overflow:hidden;font-weight:550;text-overflow:ellipsis;white-space:nowrap}
.aj-list__meta{font-size:13px;color:var(--aj-muted)}
.aj-list__end{flex:none;text-align:right;font-variant-numeric:tabular-nums}
.aj-copy{display:flex;width:100%;min-width:0}
.aj-copy__input{flex:1;min-width:0;height:40px;padding:0 12px;border:1px solid var(--aj-border-strong);border-right:0;border-radius:8px 0 0 8px;background:var(--aj-surface-2);font-family:var(--aj-mono);font-size:13px;text-overflow:ellipsis}
.aj-copy__input:focus{position:relative;z-index:1;outline:none;border-color:var(--aj-brand);box-shadow:var(--aj-focus-ring)}
.aj-copy > .aj-btn{border-radius:0 8px 8px 0}
.aj-copied-icon,.is-copied .aj-copy-icon{display:none}
.is-copied .aj-copied-icon{display:inline-block;color:var(--aj-success)}
.aj-progress{display:block;width:100%;height:6px;overflow:hidden;border:0;border-radius:999px;background:var(--aj-surface-3);color:var(--aj-text-2);appearance:none}
.aj-progress::-webkit-progress-bar{background:var(--aj-surface-3)}
.aj-progress::-webkit-progress-value{background:currentColor;border-radius:999px}
.aj-progress::-moz-progress-bar{background:currentColor;border-radius:999px}
.aj-progress--brand{color:var(--aj-brand)}.aj-progress--success{color:var(--aj-success)}.aj-progress--warning{color:var(--aj-warning)}.aj-progress--danger{color:var(--aj-danger)}
.aj-avatar{display:inline-grid;place-items:center;flex:none;width:32px;height:32px;overflow:hidden;border-radius:50%;background:var(--aj-surface-3);color:var(--aj-text-2);font-size:12px;font-weight:600;letter-spacing:.02em;text-transform:uppercase;-webkit-user-select:none;user-select:none}
.aj-avatar img{width:100%;height:100%;object-fit:cover}
.aj-avatar--sm{width:24px;height:24px;font-size:10px}.aj-avatar--lg{width:40px;height:40px;font-size:13px}
.aj-divider{height:1px;margin:16px 0;border:0;background:var(--aj-divider)}
.aj-divider--vertical{width:1px;height:auto;align-self:stretch;margin:0 8px}

/* 22 · Charts: container for Chart.js (aj-charts.js adds the HTML tooltip and its styles) */
.aj-chart{position:relative;width:100%;height:260px}
.aj-chart--sm{height:180px}.aj-chart--lg{height:360px}
@media (min-width:768px){.aj-chart{height:300px}.aj-chart--lg{height:400px}}

/* 23 · Utilities (kept small on purpose) */
.aj-sr-only{position:absolute!important;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.aj-skip-link{position:fixed;top:8px;left:8px;z-index:100;padding:8px 12px;background:var(--aj-text);border-radius:8px;color:#fff;font-weight:600;transform:translateY(-200%)}
.aj-skip-link:focus{transform:none}
.aj-text-right{text-align:right}.aj-nowrap{white-space:nowrap}
.aj-truncate{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.aj-mt-0{margin-top:0}.aj-mt-2{margin-top:8px}.aj-mt-4{margin-top:16px}.aj-mt-6{margin-top:24px}.aj-mt-8{margin-top:32px}
.aj-mb-0{margin-bottom:0}.aj-mb-2{margin-bottom:8px}.aj-mb-4{margin-bottom:16px}.aj-mb-6{margin-bottom:24px}.aj-mb-8{margin-bottom:32px}
.aj-print-only{display:none}
@media (max-width:767.98px){.aj-hide-mobile{display:none!important}}
@media (min-width:768px){.aj-show-mobile{display:none!important}}

/* 24 · Motion: 140ms on color/background/border/opacity/transform (--aj-tr); reduced motion respected */
@keyframes aj-spin{to{transform:rotate(360deg)}}
@keyframes aj-shimmer{from{background-position:200% 0}to{background-position:-200% 0}}
@keyframes aj-fade-in{from{opacity:0}}
@keyframes aj-pop-in{from{opacity:0;transform:translateY(-4px)}}
@keyframes aj-modal-in{from{opacity:0;transform:translateY(8px) scale(.98)}}
@keyframes aj-sheet-in{from{transform:translateY(100%)}}
@keyframes aj-toast-in{from{opacity:0;transform:translateY(8px) scale(.98)}}
@keyframes aj-toast-out{to{opacity:0;transform:translateY(4px) scale(.98)}}
@media (prefers-reduced-motion:reduce){
.aj *,.aj ::before,.aj ::after,.aj ::backdrop{animation-duration:1ms!important;animation-iteration-count:1!important;transition-duration:1ms!important;scroll-behavior:auto!important}
.aj-spinner,.aj-icon--spin,.aj-btn[aria-busy=true]::after{animation-duration:1.6s!important;animation-iteration-count:infinite!important}
.aj-skeleton{animation:none!important}}

/* 25 · Print: chrome hidden, tables full width with repeated headers */
@media print{
.aj{padding-top:0;background:#fff;color:#000;font-size:11pt}
.aj::before,.aj-topbar,.aj-sidebar,.aj-bottom-nav,.aj-drawer,.aj-backdrop,.aj-toasts,.aj-header,.aj-footer,.aj-buy-bar,.aj-skip-link,.aj-pagination,.aj-page-header__actions,.aj-toolbar,.aj-btn,.aj-no-print{display:none!important}
.aj-print-only{display:block!important}
.aj-app__main{margin:0!important}
.aj-app__content{max-width:none;padding:0!important}
.aj-card,.aj-stat{break-inside:avoid;border-color:#bbb}
.aj-table-wrap{overflow:visible!important;background:none!important;border:1px solid #999;border-radius:0}
.aj-table{font-size:9.5pt}
.aj-table thead{display:table-header-group}
.aj-table tfoot{display:table-footer-group}
.aj-table tr{break-inside:avoid}
.aj-table th{background:#eee!important;color:#000;print-color-adjust:exact;-webkit-print-color-adjust:exact}
.aj-table th,.aj-table td{height:auto;padding:4pt 6pt;border-bottom:1px solid #bbb}
.aj-table tbody tr:hover > td{background:none}
.aj-table .is-sticky{position:static;box-shadow:none}
.aj-badge{background:none!important;border-color:#999;color:#000}}
