/* Shared identity. Layouts stay with their modules; these tokens own the
   typography, surfaces, controls and brand size throughout SilberMarket. */
:root {
 --sm-font:system-ui,-apple-system,"Segoe UI",sans-serif;
 --sm-brand:#075740; --sm-on-brand:#fff; --sm-ink:#173f32;
 --sm-muted:#566b60; --sm-border:#d6e0d4; --sm-paper:#f5f7f2;
 --sm-panel:#fff; --sm-soft:#eaf1e3; --sm-lime:#d8f199;
 --sm-focus:#a76a09; --sm-radius:14px; --sm-control-radius:9px;
 --sm-page:1280px; --sm-logo-width:240px; --sm-text:15px;
 --brand:var(--sm-brand); --green:var(--sm-brand); --ink:var(--sm-ink);
 --line:var(--sm-border); --border:var(--sm-border); --paper:var(--sm-paper);
 --card:var(--sm-panel); --surface:var(--sm-panel); --soft:var(--sm-soft);
 --muted:var(--sm-muted); --bg:var(--sm-paper); --bg-2:var(--sm-soft);
 --panel:var(--sm-panel); --text:var(--sm-ink); --accent:var(--sm-brand);
 --accent-2:#8b692a; --font:var(--sm-font); --radius:var(--sm-radius);
}
html:root[data-theme=dark] {
 color-scheme:dark; --sm-brand:#91dfb7; --sm-on-brand:#102c20;
 --sm-ink:#edf5ed; --sm-muted:#becdc1; --sm-border:#3e5446;
 --sm-paper:#112119; --sm-panel:#1a2e23; --sm-soft:#243e2d;
 --sm-focus:#e9bf65;
}
html:root body[data-sm-surface] {
 font-family:var(--sm-font)!important; font-size:var(--sm-text)!important;
 line-height:1.55; color:var(--sm-ink); background:var(--sm-paper);
 -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
}
html:root body[data-sm-surface] :is(button,input,select,textarea,h1,h2,h3,h4) {font-family:var(--sm-font)!important}
html:root body[data-sm-surface] h1 {font-size:clamp(27px,2.8vw,36px)!important;line-height:1.15!important;letter-spacing:-.035em!important;font-weight:700}
html:root body[data-sm-surface] h2 {font-size:22px!important;line-height:1.25!important;letter-spacing:-.025em}
html:root body[data-sm-surface] h3 {font-size:17px!important;line-height:1.35!important}
html:root body[data-sm-surface] :is(.eyebrow,.commerce-eyebrow,.dispatch-eyebrow,.silber-eyebrow,.info-kicker,.home-kicker) {font-family:var(--sm-font);font-weight:700;letter-spacing:.1em}
html:root body[data-sm-surface] a {text-underline-offset:3px}
html:root body[data-sm-surface] :is(a,button,input,select,textarea,summary):focus-visible {outline:3px solid var(--sm-focus)!important;outline-offset:3px}
html:root body[data-sm-surface] :is(button,.button,.btn,.commerce-button,.dispatch-button,.auth-button) {
 font-family:var(--sm-font)!important;font-size:14px!important;font-weight:600;
 line-height:1.35;border-radius:var(--sm-control-radius)!important;min-height:42px;
}
html:root body[data-sm-surface] :is(.button,.btn,.commerce-button,.dispatch-button,.auth-button) {padding:11px 16px!important;text-decoration:none}
html:root body[data-sm-surface] :is(button,.button,.btn,.dispatch-button,.auth-button,.commerce-button):where(:not(.danger,.btn-danger,.error,.warn)) {
 background-color:var(--sm-panel)!important;color:var(--sm-ink)!important;border-color:var(--sm-border)!important;
}
html:root body[data-sm-surface] :is(.primary,.btn-primary,.auth-button,.commerce-button,.silber-primary,.cart-preview) {
 background:var(--sm-brand)!important;color:var(--sm-on-brand)!important;border-color:var(--sm-brand)!important;
}
html:root body[data-sm-surface] :is(.secondary,.btn-secondary) {background:var(--sm-panel)!important;color:var(--sm-brand)!important;border-color:var(--sm-border)!important}
html:root body[data-sm-surface] :is(input,select,textarea):not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=range]) {
 font-family:var(--sm-font)!important;font-size:14px!important;border-radius:var(--sm-control-radius)!important;
 border-color:var(--sm-border);background-color:var(--sm-panel);color:var(--sm-ink);min-height:44px;
}
html:root body[data-sm-surface] :is(.card,.auth-card,.account-card,.info-card,.panel-section,.supplier-public-info,.seller-tile,.dispatch-empty,.dispatch-help,.app-card,.login-card,.purchase-document) {
 background-color:var(--sm-panel);color:var(--sm-ink);border-color:var(--sm-border);border-radius:var(--sm-radius)!important;box-shadow:none;
}
html:root body[data-sm-surface] dialog {font-family:var(--sm-font);color:var(--sm-ink);background:var(--sm-panel);border:1px solid var(--sm-border);border-radius:18px}
html:root body[data-sm-surface] dialog::backdrop {background:#09271db3}
html:root body[data-sm-surface] :is(.muted,.dispatch-muted,.small-note,.auth-card p,.info-card p) {color:var(--sm-muted)}

/* One full wordmark, in its natural proportion. Never apply to product images. */
html:root body[data-sm-surface] :is(header,.sm-brand,.sidebar-brand,.login-brand) img.sm-logo {
 display:block;width:var(--sm-logo-width)!important;max-width:100%!important;
 height:auto!important;max-height:none!important;aspect-ratio:1140/296;
 object-fit:contain!important;object-position:center;background:#fff;border-radius:5px;
}
html:root body[data-sm-surface] .sm-brand {display:inline-flex;align-items:center;flex:none;width:var(--sm-logo-width);max-width:100%;text-decoration:none}
html:root body[data-sm-surface] .sm-site-header {
 box-sizing:border-box;background:var(--sm-panel)!important;color:var(--sm-ink)!important;
 border-bottom:1px solid var(--sm-border);min-height:94px;height:auto;
 padding:14px max(24px,calc((100vw - 1280px)/2));gap:24px;
}
html:root body[data-sm-surface] .sm-site-header a:not(.button):not(.commerce-button) {color:var(--sm-brand)}
html:root body[data-sm-surface] .sm-site-header :is(small,p) {color:var(--sm-muted)}
html:root body[data-sm-surface] .sm-site-header>nav {font-family:var(--sm-font)!important;font-size:14px}
html:root body[data-sm-surface] .sm-simple-header {display:flex;justify-content:space-between;align-items:center}
html:root body[data-sm-surface] .sm-site-header :is(.brand,.app-brand) {width:var(--sm-logo-width)!important;max-width:none!important;flex-basis:var(--sm-logo-width)!important}
html:root body[data-sm-surface] .sm-site-header.app-header {display:block;padding:0;min-height:0}
html:root body[data-sm-surface] .app-header .app-top {padding:14px 24px;min-height:94px}
html:root body[data-sm-surface] .app-brand>strong {display:none}
html:root body[data-sm-surface] .sm-site-header.top #connection {border-color:var(--sm-border);background:var(--sm-soft);color:var(--sm-brand)}
html:root body[data-sm-surface] .silber-assistant-header {min-height:94px;flex:none}
html:root body[data-sm-surface] .dispatch-brand {width:var(--sm-logo-width);height:auto;background:none}
html:root body[data-sm-surface] .dispatch-brand picture {display:block}
html:root body[data-sm-surface] .dispatch-header h1 {font-size:24px!important}
html:root body[data-sm-surface] .dispatch-header #connection-state {margin-left:auto}
html:root body[data-sm-surface] .legal-header {display:flex;align-items:center;justify-content:space-between}

/* A common hierarchy, with room for the commercial message and compact work. */
html:root body[data-sm-surface=marketing] {--sm-text:16px}
html:root body[data-sm-surface=marketing] :is(.hero h1,.commerce-pitch h1) {font-size:clamp(44px,6.4vw,88px)!important;line-height:1.03!important;letter-spacing:-.055em!important}
html:root body[data-sm-surface=marketing] :is(.section h2,.offer h2,.final-cta h2) {font-size:clamp(30px,4vw,52px)!important;line-height:1.14!important;letter-spacing:-.04em!important}
html:root body[data-sm-surface=marketing] .hero {background:#143f32;color:#fff}
html:root body[data-sm-surface=marketing] .hero-copy :is(h1,p) {color:#fff!important}
html:root body[data-sm-surface=marketing] .hero-copy :is(.eyebrow,em) {color:var(--sm-lime)!important}
html:root body[data-sm-surface=marketing] .hero-copy :is(.lead,.hero-facts) {color:#d1dfd1!important}
html:root body[data-sm-surface=marketing] :is(.lime,.offer .lime) {background:var(--sm-lime)!important;color:#143f32!important;border-color:var(--sm-lime)!important}
html:root body[data-sm-surface=marketing] .ghost {color:#fff!important;background:transparent!important;border-color:#90aa99!important}
html:root body[data-sm-surface=marketing] .commerce-pitch>p {font-size:16px;line-height:1.65;max-width:520px}
html:root body[data-sm-surface=marketing] .commerce-pitch .commerce-actions>a:last-child {font-size:14px}
html:root body[data-sm-surface=marketing] .commerce-fine {font-size:12px}
html:root body[data-sm-surface=marketing] .commerce-flow h2 {font-size:18px!important}
html:root body[data-sm-surface=marketing] .commerce-flow p {font-size:14px}
html:root body[data-sm-surface=auth] .auth-intro h1 {font-size:clamp(30px,3.5vw,42px)!important}
html:root body[data-sm-surface=auth] .auth-intro p {font-size:15px;line-height:1.6}
html:root body[data-sm-surface=auth] .auth-card h2 {font-size:24px!important}
html:root body[data-sm-surface=content] {--sm-text:16px}
html:root body[data-sm-surface=content] :is(.guide h1,.calculator h1,.info-main>h1) {font-size:clamp(34px,4.8vw,58px)!important}
html:root body[data-sm-surface=content] .guide article h2 {font-size:28px!important}
html:root body[data-sm-surface=app] :is(.overview-heading h2,.account-main>h1,.panel-main>h1) {font-size:28px!important}
html:root body[data-sm-surface] :is(.profile-tabs button,.module-tabs button,#tabs button,.views button)[aria-pressed=true],
html:root body[data-sm-surface] .profile-tabs button[aria-selected=true] {background:var(--sm-brand)!important;color:var(--sm-on-brand)!important;border-color:var(--sm-brand)!important}
html:root body[data-sm-surface] :is(.store-channel-navigation,.channel-navigation,.channel-switch) {background:var(--sm-panel);border-color:var(--sm-border)}
html:root body[data-sm-surface] :is(.store-channel-navigation,.channel-navigation,.channel-switch) a[aria-current=page] {background:var(--sm-soft);color:var(--sm-brand)}

/* Admin uses the same palette and type scale, including its saved dark theme. */
html:root body[data-sm-surface=admin] :is(.sidebar,.topbar,.admin-mobile-tabs,.panel,.card,.login-card) {background:var(--sm-panel);color:var(--sm-ink);border-color:var(--sm-border)}
html:root body[data-sm-surface=admin] .sidebar-brand {padding:0 5px}
html:root body[data-sm-surface=admin] .sidebar-brand img.sm-logo {width:218px!important}
html:root body[data-sm-surface=admin] .sidebar-brand span {font-size:12px;margin-top:10px;color:var(--sm-muted)}
html:root body[data-sm-surface=admin] #admin-navigation .admin-nav-link[aria-current=page] {background:var(--sm-soft);color:var(--sm-brand);border-color:var(--sm-border)}
html:root body[data-sm-surface=admin] :is(.admin-nav-group.is-current>summary,.admin-mobile-tabs .active) {color:var(--sm-brand);background:var(--sm-soft)}
html:root body[data-sm-surface=admin] .login-brand img.sm-logo {margin:0 auto 24px}
html:root body[data-sm-surface=admin] .topbar h1 {font-size:26px!important}
html:root[data-theme=dark] body[data-sm-surface] :is(.market-app,.dispatch-tools,.dispatch-map-section,.dispatch-summary>article,.inventory,.overview-stats>article,.overview-actions>button,.purchase-line,.product-stage,.stage-top,.resource-grid>a,.day-section,.resources,.connections article,.calculator form,.calculator .result,.catalogue-pick,.catalogue-pick label,.catalogue-pick input,.auth-intro,.apps-download,.app-card,.product-page,.catalogue,.categories li) {background-color:var(--sm-panel);color:var(--sm-ink);border-color:var(--sm-border)}
html:root[data-theme=dark] body[data-sm-surface] :is(.hero:after) {background:var(--sm-paper)}
html:root[data-theme=dark] body[data-sm-surface] :is(.feature-grid p,.day-grid p,.ecosystem p,.resource-grid p,.stage-caption p,.faq p,.start p,.intro>p,.hero-facts,.small-note,.guide p,.guide li) {color:var(--sm-muted)}
html:root[data-theme=dark] body[data-sm-surface=marketing] .offer {background:#143f32;color:#fff}
html:root[data-theme=dark] body[data-sm-surface] .dispatch-nav {background:var(--sm-panel);border-color:var(--sm-border)}
html:root[data-theme=dark] body[data-sm-surface=shop] #catalogue :is(aside,article) {background:var(--sm-panel);color:var(--sm-ink);border-color:var(--sm-border)}

@media(min-width:1000px) {
 html:root body[data-sm-surface].has-shop-tabs>.header {grid-template-columns:var(--sm-logo-width) minmax(180px,1fr) auto auto auto!important}
 html:root body[data-sm-surface] .app-header .app-top {grid-template-columns:var(--sm-logo-width) minmax(180px,1fr) auto auto auto}
 html:root body[data-sm-surface] .app-header .app-brand {width:var(--sm-logo-width)!important}
 html:root body[data-sm-surface] :is(.header .brand,.app-brand) img.sm-logo {width:var(--sm-logo-width)!important}
 html:root body[data-sm-surface] .sm-site-header.top {padding-inline:4vw}
}
@media(min-width:701px) and (max-width:1100px) {html:root {--sm-logo-width:210px}}
@media(max-width:700px) {
 html:root {--sm-logo-width:160px}
 html:root body[data-sm-surface] .sm-site-header {min-height:76px;padding:12px 16px;gap:12px;flex-wrap:wrap}
 html:root body[data-sm-surface] .sm-site-header>nav {font-size:13px;gap:12px;min-width:0}
 html:root body[data-sm-surface] .sm-site-header>nav .button {padding:10px 12px!important}
 html:root body[data-sm-surface] .sm-site-header>nav a {overflow-wrap:anywhere}
 html:root body[data-sm-surface] .app-header .app-top {padding:12px 16px;min-height:76px}
 html:root body[data-sm-surface] :is(.button,.btn,.commerce-button,.dispatch-button,.auth-button) {min-height:44px!important}
 html:root body[data-sm-surface] :is(input,select,textarea):not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=range]) {font-size:16px!important}
 html:root body[data-sm-surface] :is(.header,.app-header) :is(.brand,.app-brand) {flex-basis:var(--sm-logo-width)!important;max-width:none!important}
 html:root body[data-sm-surface] .dispatch-brand {width:50px}
 html:root body[data-sm-surface] .dispatch-brand img.sm-logo {width:50px!important;aspect-ratio:1;background:none}
 html:root body[data-sm-surface] .dispatch-header h1 {font-size:22px!important}
 html:root body[data-sm-surface] .dispatch-header #connection-state {font-size:12px}
 html:root body[data-sm-surface=marketing] :is(.hero h1,.commerce-pitch h1) {font-size:clamp(40px,10vw,60px)!important}
 html:root body[data-sm-surface=marketing] .commerce-flow {grid-template-columns:1fr;gap:16px}
 html:root body[data-sm-surface=marketing] .commerce-flow p {font-size:13px}
 html:root body[data-sm-surface=admin] .sidebar-brand img.sm-logo {width:218px!important}
 html:root body[data-sm-surface] .sm-site-header.silber-assistant-header {flex-wrap:nowrap}
 html:root body[data-sm-surface] .silber-assistant-header nav {font-size:12px;gap:10px}
 html:root body[data-sm-surface] .sm-site-header.top>div {min-width:110px}
}
@media print {
 html:root body[data-sm-surface] {color:#111!important;background:#fff!important}
 html:root body[data-sm-surface] .sm-simple-header {display:none!important}
 html:root body[data-sm-surface] #ticket-print {font-family:monospace!important;color:#111!important;background:#fff!important}
}
