/* Shared brand tokens. Keep theme decisions here; legacy aliases inherit them. */
:root,html[data-theme="light"] {
 --bg:#f4f7fb!important;--surface:#ffffff!important;--surface-2:#eef3f9;--ink:#142b45!important;--muted:#55677e!important;--line:#e2e9f2!important;
 --accent:#0a7d83!important;--accent-hover:#086a70!important;--accent-ink:#ffffff!important;--accent-soft:#e6f4f4!important;
 --radius-card:10px;--radius-input:8px;--brand-font:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;color-scheme:light;
}
html[data-theme="dark"]:root {
 --bg:#0e1a22!important;--surface:#16242e!important;--surface-2:#1d2e3a;--ink:#e9f1f7!important;--muted:#a9bcca!important;--line:#2a3d4b!important;
 --accent:#2fb3ad!important;--accent-hover:#45c6c0!important;--accent-ink:#08120f!important;--accent-soft:#14323a!important;color-scheme:dark;
}
/* Public marketing pages stay light regardless of device preference. */
html:has(body.site-portal){--bg:#f4f7fb!important;--surface:#fff!important;--surface-2:#eef3f9;--ink:#142b45!important;--muted:#55677e!important;--line:#e2e9f2!important;--accent:#0a7d83!important;--accent-hover:#086a70!important;--accent-ink:#fff!important;--accent-soft:#e6f4f4!important;color-scheme:light}
html body{--ui-bg:var(--bg);--ui-surface:var(--surface);--ui-ink:var(--ink);--ui-muted:var(--muted);--ui-line:var(--line);--ui-accent:var(--accent);--green:var(--accent);--border:var(--line);background:var(--bg)!important;color:var(--ink)!important;font-family:var(--brand-font)!important;font-size:15px;line-height:1.7}
html body :is(button,input,select,textarea){font-family:var(--brand-font)}
html body :is(.panel,.metric,.stat,.feature,.card,.mock,.mock-card,.steps article,.faq-contents,.version-card,.version-features article,.account-menu,.management-menu,.profile-menu-panel,.quick-expense-popover,dialog){border-radius:var(--radius-card)!important;border-color:var(--line)!important}
/* Keep the sidebar ID outside :is(): its specificity must not override accent cards. */
html body #sidebar,
html body :is(.panel,.metric,.stat,.feature,.card,.steps article,.faq-contents,.version-card,.version-features article,.account-menu,.management-menu,.profile-menu-panel,.quick-expense-popover,dialog){background:var(--surface)!important;color:var(--ink)!important}
html body :is(button,.button,input,select,textarea,.period-picker){border-radius:var(--radius-input)!important}
html body :is(.avatar,.management-avatar,.profile-photo-preview){border-radius:50%!important}
html body :is(.badge,.tag,.category-pill){border-radius:6px!important;background:var(--accent-soft);color:var(--accent)}
html body :is(h1,h2,h3,h4,.table-title,.table-amount,.metric>strong,.stat strong,.profile-menu-head strong){color:var(--ink)!important}
html body h2{font-size:30px;font-weight:750;line-height:1.2}
html body :is(.panel h3,.feature h3,.steps h3){font-size:17px;font-weight:650;line-height:1.35}
html body :is(p,label,legend,small,.muted,.caption,.breadcrumb,.breadcrumb span,.heading p,.stat label,.metric-top,.metric-detail,.panel-caption,.section-kicker,.trend-key,.trend-plot,.empty,.workspace-note,.account-menu-title,.management-menu-title,.profile-menu-head span,footer,.brand-version){color:var(--muted)!important;opacity:1}
html body :is(.metric-detail,.panel-caption,.section-kicker,.trend-key,small,label,.breadcrumb,footer){font-size:13px;line-height:1.5}
html body :is(.eyebrow){font-size:11px;font-weight:650;line-height:1.4;letter-spacing:1.6px;color:var(--accent)!important}
html body :is(a,.text-action,.link){color:var(--accent)}
html body :is(.primary,button.primary,.button,.metric-primary,.stat.feature){background:var(--accent)!important;border-color:var(--accent)!important;color:var(--accent-ink)!important}
html body :is(.metric-primary,.stat.feature) :is(strong,small,p,label,.metric-top,.metric-detail,i){color:var(--accent-ink)!important}
html body :is(.primary,.button):hover:not(:disabled){background:var(--accent-hover)!important;border-color:var(--accent-hover)!important}
html body :is(.secondary,button.secondary,.row-action,input,select,textarea,.period-picker,.quick-expense-card){background:var(--surface-2)!important;color:var(--ink)!important;border-color:var(--line)!important}
html body :is(.secondary,.row-action,.quick-expense-card):hover{background:var(--accent-soft)!important;color:var(--accent)!important}
html body :is(button,input,select,textarea,a):focus-visible{outline:2px solid var(--accent)!important;outline-offset:3px}
html body :is(.panel-head,header,footer,.task,.expense-tabs,.share-picker,.profile-menu-head,.avatar-menu-group,.actions,.proof-strip>div){border-color:var(--line)!important}
html body :is(th){background:var(--surface-2)!important;color:var(--muted)!important;border-color:var(--line)!important;font-size:13px}
html body :is(td){background:var(--surface)!important;color:var(--ink)!important;border-color:var(--line)!important;font-size:13px}
html body tbody tr:hover td{background:var(--surface-2)!important}
html body :is(.note,.workflow-review,.metric-top i,.task-icon,.quick-blue,.quick-teal,.quick-purple,.attention-blue,.attention-violet,.attention-amber,.version-symbol,.guide-step){background:var(--accent-soft)!important;color:var(--accent)!important}
html body #sidebar :is(.brand,.nav-group summary,.nav-section-count,#nav button,#nav button i){color:var(--muted)!important}
html body #sidebar .brand{color:var(--ink)!important}
html body #sidebar #nav button:is(.active,:hover),html body #sidebar #nav button.active i,html body .mobile-nav button[aria-current=page],html body .expense-tabs button:is(.selected,[aria-selected=true]){background:var(--accent-soft)!important;color:var(--accent)!important;border-color:var(--accent)!important}
html body :is(.account-menu,.management-menu,.profile-menu-panel) button{color:var(--ink)!important}
html body :is(.account-menu,.management-menu,.profile-menu-panel) button:hover{background:var(--accent-soft)!important}
html body .brand-version{color:var(--muted)!important;font-size:10px}
html body :is(.avatar,.management-avatar,.header-right .demo){background:var(--accent-soft)!important;color:var(--accent)!important;border-color:var(--line)!important}
html body #sidebar :is(.user p,.aside-bottom p),html body .header-right #header-date{color:var(--muted)!important}
html body .brand b{background:var(--accent)!important;color:var(--accent-ink)!important}
html body .trend-key i{background:var(--accent)!important}
html body .trend-plot svg [stroke="#377cf6"]{stroke:var(--accent)!important}
html body .trend-plot svg stop[stop-color="#377cf6"]{stop-color:var(--accent)!important}
html body .metric-compact{min-height:72px!important;padding:12px 18px!important;display:grid;grid-template-columns:auto 1fr;column-gap:16px;align-items:center}
html body .metric-compact>strong{grid-column:1;grid-row:1/3;margin:0;font-size:28px}
html body .metric-compact .metric-top{grid-column:2;grid-row:1;justify-content:flex-start}
html body .metric-compact .metric-top i{display:none}
html body .metric-compact .metric-detail{grid-column:2;grid-row:2}
html body .quick-expense-card{border-radius:var(--radius-input)!important}
html body .quick-expense-more{margin-top:10px}
html body .quick-expense-more summary{cursor:pointer;color:var(--accent);padding:8px 0;font-weight:650}
html body.site-portal .hero h1{font-size:clamp(34px,4.8vw,60px);font-weight:800;line-height:1.08}
html body.site-portal .hero p{font-size:15px;line-height:1.7}
html body.site-portal .mock{background:var(--surface)!important;transform:none;border:1px solid var(--line)}
html body.site-portal .mock-card{background:var(--surface-2)!important}
html body.site-portal .mock-top{color:var(--muted)}
html body.site-portal .mock-metrics strong{font-size:26px}
html body.site-portal .cta-panel{background:var(--surface)!important;color:var(--ink)!important;border:1px solid var(--line);border-radius:var(--radius-card)}
html body.site-portal .trust-strip{list-style:none;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;padding:18px 0;margin:0 0 24px;border-block:1px solid var(--line);font-size:13px;color:var(--muted)}
html body.site-portal .trust-strip li{display:flex;gap:8px;align-items:center}
html body.site-portal .trust-strip li:before{content:'✓';color:var(--accent);font-weight:700}
html body.site-portal #ucretsiz{display:grid;grid-template-columns:1fr 1fr;gap:32px;align-items:start}
html body.site-portal .included-card{padding:24px;border:1px solid var(--line);border-radius:var(--radius-card);background:var(--surface)}
html body.site-portal .included-card ul{padding:0;list-style:none;line-height:2}
html body.site-portal .feature-more{grid-column:1/-1}
html body.site-portal .feature-more>summary{display:none}
html body.site-portal .marketing-footer h2{font-size:17px}
@media(max-width:640px){
 html body.site-portal .hero{grid-template-columns:1fr;padding:28px 0;gap:22px}
 html body.site-portal .hero h1{margin:12px 0}
 html body.site-portal .hero .mock{transform:none;padding:16px}
 html body.site-portal .hero .mock-card{padding:12px}
 html body.site-portal .hero .actions{margin-top:18px}
 html body.site-portal .trust-strip{grid-template-columns:1fr 1fr;font-size:12px;gap:12px}
 html body.site-portal .feature{padding:18px;min-height:0}
 html body.site-portal .feature p{font-size:13.5px;line-height:1.7}
 html body.site-portal .features{gap:12px}
 html body.site-portal .feature-more>summary{display:list-item;padding:12px;cursor:pointer;color:var(--accent)}
 html body.site-portal .feature-more:not([open])>.features{display:none}
 html body.site-portal .section{padding:28px 0}
 html body.site-portal .section-head{margin-bottom:20px}
 html body.site-portal .steps{gap:12px}
 html body.site-portal .steps article{padding:18px}
 html body.site-portal .steps p{font-size:13.5px;line-height:1.7}
 html body.site-portal .proof-strip{margin-bottom:24px;padding:10px}
 html body.site-portal .proof-strip>div{padding:8px}
 html body.site-portal #ucretsiz{grid-template-columns:1fr;gap:16px}
 html body.site-portal .included-card{padding:18px}
 html body.site-portal .cta-panel{padding:22px;margin:20px 0 28px}
 html body.site-portal .marketing-footer{padding-top:24px}
 html body.site-portal .problem-strip{font-size:15px;padding:16px;margin-bottom:18px}
 html body .metric-compact{grid-template-columns:auto 1fr;column-gap:10px;padding:10px!important}
}
@media(min-width:641px){html body.site-portal .feature-more:not([open])>.features{display:grid}}
@media print{html body{background:white!important;color:black!important}}
/* Body-level legacy variables must not shadow the shared theme tokens. */
html body{--bg:inherit!important;--surface:inherit!important;--surface-2:inherit!important;--ink:inherit!important;--muted:inherit!important;--line:inherit!important;--accent:inherit!important;--accent-hover:inherit!important;--accent-ink:inherit!important;--accent-soft:inherit!important}
@media(max-width:640px){
 html body.site-portal .hero .mock-top{margin-bottom:10px}
 html body.site-portal .mock-card{margin-bottom:8px;padding:10px!important}
 html body.site-portal .mock-row{margin-top:8px;padding-top:8px}
 html body.site-portal .mock-metrics{margin-top:8px;padding:0}
 html body.site-portal .mock-metrics>div{padding:8px}
 html body.site-portal .mock-metrics strong{font-size:22px}
 html body.site-portal .proof-strip{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;padding:8px}
 html body.site-portal .proof-strip>div{border-bottom:0;border-right:1px solid var(--line);padding:4px}
 html body.site-portal .proof-strip strong{font-size:12px}
 html body.site-portal .proof-strip span{font-size:11px}
 html body.site-portal .feature{display:grid;grid-template-columns:28px 1fr;column-gap:10px;padding:16px}
 html body.site-portal .feature .num{grid-row:1/3;align-self:start;padding:3px}
 html body.site-portal .feature h3{margin:0}
 html body.site-portal .feature p{margin:6px 0 0;grid-column:2}
 html body.site-portal .section h2{margin:10px 0}
 html body.site-portal .section-head>p{margin:10px 0}
 html body.site-portal .steps article{padding:14px}
 html body.site-portal .steps h3{margin:0}
 html body.site-portal .steps p{margin:7px 0 0}
 html body.site-portal .included-card h3{margin:0}
 html body.site-portal .included-card ul{display:grid;grid-template-columns:1fr 1fr;gap:4px 8px;font-size:13px;line-height:1.6;margin:10px 0 0}
 html body.site-portal .cta-panel h2{margin:0 0 12px}
 html body.site-portal .marketing-footer .copyright{margin-top:20px;padding-top:16px}
}
html:root body{--accent:inherit!important;--accent-hover:inherit!important;--accent-ink:inherit!important;--accent-soft:inherit!important}
@media(max-width:640px){html body.site-portal .section{padding:20px 0}html body.site-portal .hero{gap:16px;padding:22px 0}html body.site-portal .proof-strip{margin-bottom:16px}html body.site-portal .cta-panel{margin:12px 0 16px}html body.site-portal .copyright{margin-top:12px;padding-top:12px}}

/* Responsive disclosure remains operable without JavaScript. */
html body.site-portal .feature-toggle,html body.site-portal .feature-toggle-label{display:none}
@media(max-width:640px){
 html body.site-portal .feature-toggle{display:block;position:absolute;width:1px;height:1px;opacity:0}
 html body.site-portal .feature-toggle-label{display:block;padding:12px;cursor:pointer;color:var(--accent)!important}
 html body.site-portal .feature-toggle:focus-visible+.feature-toggle-label{outline:2px solid var(--accent);outline-offset:2px}
 html body.site-portal .feature-toggle:not(:checked)~.features{display:none}
 html body.site-portal .feature-toggle:checked~.features{display:grid}
 html body.site-portal .section{padding:18px 0}
}
html body .row-action.danger,html body button.danger{background:#fff1f2!important;color:#a51832!important;border-color:#a51832!important}
html[data-theme="dark"] body .row-action.danger,html[data-theme="dark"] body button.danger{background:#381d26!important;color:#ffacbd!important;border-color:#ffacbd!important}
html[data-theme] body :is(.secondary,button.secondary,.row-action,input,select,textarea,.period-picker,.quick-expense-card){background:var(--surface-2)!important;color:var(--ink)!important;border-color:var(--line)!important}
html[data-theme] body :is(.secondary,.row-action,.quick-expense-card):hover{background:var(--accent-soft)!important;color:var(--accent)!important}
html[data-theme] body :is(.text-action,a,.link){color:var(--accent)}
html[data-theme] body .row-action.danger,html[data-theme] body button.danger{background:#fff1f2!important;color:#a51832!important;border-color:#a51832!important}
html[data-theme="dark"] body .row-action.danger,html[data-theme="dark"] body button.danger{background:#381d26!important;color:#ffacbd!important;border-color:#ffacbd!important}

/* Accent-card icons need their own surface as well as their foreground. */
html[data-theme] body .metric-primary .metric-top i{background:transparent!important;color:inherit!important}

/* Preserve readable amounts while the sidebar is visible on tablet widths. */
@media(min-width:651px) and (max-width:980px){
 html body .metric-grid-finance{grid-template-columns:repeat(2,minmax(0,1fr))}
 html body .metric-grid-finance>.metric{grid-column:span 1}
 html body .metric-grid-finance>.metric:nth-child(3){grid-column:span 2}
 html body .metric-grid-finance>.metric:nth-child(n+4){grid-column:span 1}
}

/* Compact secondary overview metrics; financial cards retain their hierarchy. */
html body .metric-grid>.metric:not(.metric-link){height:68px;min-height:0;padding:12px 18px;display:grid;grid-template-columns:auto 1fr;align-items:center;gap:14px}
html body .metric-grid>.metric:not(.metric-link)>strong{font-size:24px;line-height:1;grid-column:1;grid-row:1;margin:0}
html body .metric-grid>.metric:not(.metric-link)>.metric-top{grid-column:2;grid-row:1;min-width:0;margin:0;font-size:14px}
html body .metric-grid>.metric:not(.metric-link) .metric-detail,html body .metric-grid>.metric:not(.metric-link) .metric-top i{display:none}
@media(max-width:640px){body.site-portal .hero{grid-template-columns:1fr}html body .metric-grid>.metric:not(.metric-link){padding:10px;gap:9px}}

.loading-skeleton{min-height:140px;padding:24px;border-radius:10px;background:linear-gradient(90deg,var(--surface-2),var(--surface),var(--surface-2));background-size:200% 100%;animation:asm-skeleton 1.5s infinite}@keyframes asm-skeleton{to{background-position:-200% 0}}@media(prefers-reduced-motion:reduce){.loading-skeleton{animation:none}}

.product-gallery-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}.product-gallery-grid figure{margin:0;min-width:0}.product-gallery-grid img{display:block;width:100%;height:auto;border:1px solid var(--line);border-radius:16px}.product-gallery-grid figcaption{padding:12px 0;font-weight:650}@media(max-width:640px){.product-gallery-grid{grid-template-columns:1fr}}

.legal-table{overflow-x:auto}.legal-table table{width:100%;border-collapse:collapse}.legal-table th,.legal-table td{text-align:left;padding:12px;border:1px solid var(--line)}
