/*
 * Appearance finish only: colors, borders, shadows and surface treatment.
 * Geometry, typography, content visibility and responsive behavior are owned by
 * the shared component styles. Never add theme-specific layout or size rules.
 * Each palette keeps independent light/dark colors; classic is unchanged.
 */
html[data-appearance]:not([data-appearance="classic"])[data-theme] {
  --p-edge:#ffffffdc; --p-sheen:#ffffff80; --p-input-inset:#18242406;
  --p-hover:color-mix(in srgb,var(--a-accent) 28%,var(--a-line)); --p-surface:linear-gradient(155deg,var(--p-sheen),transparent 52%),var(--a-surface); --p-card-shadow:0 2px 3px #14202003,0 10px 28px #14202006,inset 0 1px 0 var(--p-edge);
  --p-control-shadow:0 1px 2px #1018280b,inset 0 1px 0 #ffffff24; --p-button-top:color-mix(in srgb,var(--a-accent) 96%,white); --a-shadow:var(--p-card-shadow);
  --shadow-card:var(--p-card-shadow); --shadow-glass-sm:var(--p-card-shadow); --shadow-glass-md:var(--p-card-shadow);
  --chart-grid:color-mix(in srgb,var(--a-line) 66%,var(--a-surface)); --chart-text:var(--a-secondary); --chart-muted:var(--a-muted);
}
html[data-appearance]:not([data-appearance="classic"])[data-theme="dark"] {
  --p-edge:#ffffff11; --p-sheen:#ffffff05; --p-input-inset:#00000026;
  --p-card-shadow:0 2px 3px #00000012,0 12px 30px #00000012,inset 0 1px 0 var(--p-edge); --p-control-shadow:0 1px 3px #00000026,inset 0 1px 0 #ffffff24; --p-button-top:color-mix(in srgb,var(--a-accent) 90%,white);
}
html[data-appearance="atelier"]:not([data-appearance="classic"])[data-theme="light"] {
  --a-page:#f2f1eb; --a-surface:#fffefa; --a-soft:#e9eae3;
  --a-input:#fafaf5; --a-text:#252c28; --a-secondary:#565f59;
  --a-muted:#626b64; --a-line:#dddfd6; --a-accent:#355c49;
  --a-on-accent:#fffef8; --a-hero:#203e31; --a-on-hero:#f6f4e9;
  --a-re:#657c69; --a-st:#4a7a83; --a-gl:#a08045;
  --a-ca:#7d8390;
}
html[data-appearance="atelier"]:not([data-appearance="classic"])[data-theme="dark"] {
  --a-page:#101915; --a-surface:#19221d; --a-soft:#24312a;
  --a-input:#141d18; --a-text:#eeefe9; --a-secondary:#bac3bc;
  --a-muted:#97a69b; --a-line:#303d34; --a-accent:#b7cdbb;
  --a-on-accent:#203529; --a-hero:#244635; --a-on-hero:#f4f2e9;
  --a-re:#9ebba5; --a-st:#87b8c0; --a-gl:#c8af78;
  --a-ca:#a7afbf;
}
html[data-appearance="aura"]:not([data-appearance="classic"])[data-theme="light"] {
  --a-page:#eef1f7; --a-surface:#fcfdff; --a-soft:#e5eaf5;
  --a-input:#f7f9fd; --a-text:#28313f; --a-secondary:#546174;
  --a-muted:#5d697b; --a-line:#dce2ed; --a-accent:#4e62a2;
  --a-on-accent:#fff; --a-hero:#e7ecf8; --a-on-hero:#2b3c62;
  --a-re:#6b80b3; --a-st:#4b8290; --a-gl:#a27b50;
  --a-ca:#8877a3;
}
html[data-appearance="aura"]:not([data-appearance="classic"])[data-theme="dark"] {
  --a-page:#111723; --a-surface:#1a2333; --a-soft:#253149;
  --a-input:#141d2c; --a-text:#edf0f6; --a-secondary:#bdc7d8;
  --a-muted:#99a9c2; --a-line:#344158; --a-accent:#b3c5f3;
  --a-on-accent:#243653; --a-hero:#263654; --a-on-hero:#edf2fd;
  --a-re:#a3b8ef; --a-st:#86bdca; --a-gl:#cdb388;
  --a-ca:#b8a6d4;
}
html[data-appearance="index"]:not([data-appearance="classic"])[data-theme="light"] {
  --a-page:#f4f4f6; --a-surface:#fff; --a-soft:#ececf1;
  --a-input:#fafafd; --a-text:#272830; --a-secondary:#555761;
  --a-muted:#636572; --a-line:#dedfe7; --a-accent:#645494;
  --a-on-accent:#fff; --a-hero:#efedf6; --a-on-hero:#3f365b;
  --a-re:#786b9d; --a-st:#587d81; --a-gl:#977d51;
  --a-ca:#777f93;
}
html[data-appearance="index"]:not([data-appearance="classic"])[data-theme="dark"] {
  --a-page:#141519; --a-surface:#1d1f25; --a-soft:#272932;
  --a-input:#17191f; --a-text:#eeeef2; --a-secondary:#c2c3ce;
  --a-muted:#a1a3b4; --a-line:#343641; --a-accent:#bcb0df;
  --a-on-accent:#31273f; --a-hero:#292635; --a-on-hero:#e8e3f4;
  --a-re:#b9abda; --a-st:#95bfc1; --a-gl:#cbb791;
  --a-ca:#acb3c8;
}
html[data-appearance="garden"]:not([data-appearance="classic"])[data-theme="light"] {
  --a-page:#eef1e8; --a-surface:#fffef8; --a-soft:#e3eadc;
  --a-input:#f8faf3; --a-text:#29312a; --a-secondary:#586252;
  --a-muted:#606b57; --a-line:#d9e0cf; --a-accent:#426847;
  --a-on-accent:#fffff7; --a-hero:#dce9c5; --a-on-hero:#2b442a;
  --a-re:#6e8654; --a-st:#568372; --a-gl:#9b8150;
  --a-ca:#848878;
}
html[data-appearance="garden"]:not([data-appearance="classic"])[data-theme="dark"] {
  --a-page:#142019; --a-surface:#1e2b22; --a-soft:#2b3b2c;
  --a-input:#18251d; --a-text:#eff1e8; --a-secondary:#c2cabc;
  --a-muted:#a1b096; --a-line:#394a35; --a-accent:#bdd0a8;
  --a-on-accent:#293c28; --a-hero:#c4d5ad; --a-on-hero:#263c25;
  --a-re:#acc591; --a-st:#93c5af; --a-gl:#ccb987;
  --a-ca:#b3bca7;
}
html[data-appearance="edition"]:not([data-appearance="classic"])[data-theme="light"] {
  --a-page:#f6f4ee; --a-surface:#fffdf7; --a-soft:#eae7df;
  --a-input:#fcfaf5; --a-text:#2e2d29; --a-secondary:#5a5952;
  --a-muted:#68665e; --a-line:#d7d3c8; --a-accent:#a14536;
  --a-on-accent:#fffdf8; --a-hero:#f6f4ee; --a-on-hero:#2e2d29;
  --a-re:#6b7a70; --a-st:#a36b5c; --a-gl:#99824c;
  --a-ca:#82838c;
}
html[data-appearance="edition"]:not([data-appearance="classic"])[data-theme="dark"] {
  --a-page:#1c1c19; --a-surface:#262620; --a-soft:#32332b;
  --a-input:#22221d; --a-text:#f0eee5; --a-secondary:#c9c6b9;
  --a-muted:#aaa99b; --a-line:#424337; --a-accent:#e2a18f;
  --a-on-accent:#3a2822; --a-hero:#1c1c19; --a-on-hero:#f0eee5;
  --a-re:#acbcb0; --a-st:#d4a293; --a-gl:#c8b582;
  --a-ca:#b8b8c7;
}
html[data-appearance]:not([data-appearance="classic"])[data-theme] :is(.metric-card .value,.stat-value,.asset-hub-card strong,.subscription-price,.subscription-summary strong) { text-shadow:none; }
html[data-appearance]:not([data-appearance="classic"])[data-theme] :is(.card,.metric-card:not(.metric-hero),.stat-card,.income-card,.annual-total-card,.monthly-total-card,.index-card,.news-card,.subscription-card,.subscription-list-row,.asset-hub-card) { background:var(--p-surface)!important; border-top-color:color-mix(in srgb,var(--a-line) 72%,var(--p-edge)); box-shadow:var(--p-card-shadow); transition:border-color .18s ease,box-shadow .18s ease,background-color .18s ease; }
html[data-appearance]:not([data-appearance="classic"])[data-theme] :is(.card,.metric-card,.stat-card,.income-card,.annual-total-card,.news-card,.index-card):hover { box-shadow:var(--p-card-shadow); }
html[data-appearance]:not([data-appearance="classic"])[data-theme] :is(.asset-hub-card,.subscription-card):hover { border-color:var(--p-hover); box-shadow:var(--p-card-shadow); }
html[data-appearance]:not([data-appearance="classic"])[data-theme] .metrics-grid .metric-hero { background:linear-gradient(145deg,#ffffff09,transparent 68%),var(--a-hero)!important; box-shadow:0 10px 30px #0000000a,inset 0 1px 0 #ffffff16; }
html[data-appearance]:not([data-appearance="classic"])[data-theme] .metrics-grid .metric-hero .value { -webkit-text-fill-color:currentColor; text-shadow:none; }
html[data-appearance]:not([data-appearance="classic"])[data-theme] .metrics-grid .metric-hero :is(.label,.sub) { opacity:.85; }
html[data-appearance]:not([data-appearance="classic"])[data-theme] .btn { box-shadow:var(--p-control-shadow); transition:border-color .16s ease,box-shadow .16s ease,background-color .16s ease,transform .12s ease; }
html[data-appearance]:not([data-appearance="classic"])[data-theme] .btn-primary { background:linear-gradient(180deg,var(--p-button-top),var(--a-accent)); border-color:color-mix(in srgb,var(--a-accent) 82%,var(--a-on-accent)); }
html[data-appearance]:not([data-appearance="classic"])[data-theme] :is(.btn-outline,.btn-edit,.btn-del) { background:linear-gradient(180deg,var(--p-sheen),transparent),var(--a-surface); }
html[data-appearance]:not([data-appearance="classic"])[data-theme] :is(.btn,.modal-close):hover { filter:none; box-shadow:var(--p-control-shadow); }
html[data-appearance]:not([data-appearance="classic"])[data-theme] .btn-primary:hover { box-shadow:var(--p-control-shadow),0 0 0 3px color-mix(in srgb,var(--a-accent) 10%,transparent); }
html[data-appearance]:not([data-appearance="classic"])[data-theme] :is(.btn,.tab-btn,.asset-sub-btn,.subscription-sub-btn,.income-sub-btn,.skill-sub-btn):disabled { box-shadow:none; opacity:.5; }
html[data-appearance]:not([data-appearance="classic"])[data-theme] :is(.asset-sub-nav,.subscription-sub-nav,.income-sub-nav,.skill-sub-nav) { box-shadow:inset 0 1px 2px var(--p-input-inset); }
html[data-appearance]:not([data-appearance="classic"])[data-theme] :is(.asset-sub-btn,.subscription-sub-btn,.income-sub-btn,.skill-sub-btn).active { color:var(--a-text); box-shadow:0 1px 3px #0000000b,inset 0 1px 0 var(--p-edge); }
html[data-appearance]:not([data-appearance="classic"])[data-theme] :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),select,textarea) { box-shadow:inset 0 1px 2px var(--p-input-inset); transition:border-color .16s ease,box-shadow .16s ease; }
html[data-appearance]:not([data-appearance="classic"])[data-theme] :is(input,select,textarea):focus { box-shadow:0 0 0 3px color-mix(in srgb,var(--a-accent) 12%,transparent),inset 0 1px 2px var(--p-input-inset); }
html[data-appearance]:not([data-appearance="classic"])[data-theme] :is(.asset-table,.summary-table,.rebalance-table,.data-table,.log-table) th { border-bottom-color:var(--a-line); }
html[data-appearance]:not([data-appearance="classic"])[data-theme] :is(.asset-table,.summary-table,.rebalance-table,.data-table,.log-table) td { border-bottom-color:color-mix(in srgb,var(--a-line) 65%,transparent); }
html[data-appearance]:not([data-appearance="classic"])[data-theme] :is(.asset-table,.summary-table,.rebalance-table,.data-table,.log-table) tr:hover td { background:color-mix(in srgb,var(--a-accent) 4%,var(--a-surface)); }
html[data-appearance]:not([data-appearance="classic"])[data-theme] :is(.asset-hub-card-icon,.subscription-icon) { border-color:color-mix(in srgb,var(--a-accent) 15%,var(--a-line)); background:linear-gradient(145deg,var(--p-sheen),transparent),var(--a-soft); box-shadow:inset 0 1px 0 var(--p-edge); color:var(--a-secondary); }
html[data-appearance]:not([data-appearance="classic"])[data-theme] :is(.modal,.modal-content,.auth-panel,.stock-lock-panel) { background:var(--p-surface)!important; border-top-color:color-mix(in srgb,var(--a-line) 55%,var(--p-edge)); box-shadow:0 28px 90px #00000035,inset 0 1px 0 var(--p-edge); }
html[data-appearance]:not([data-appearance="classic"])[data-theme] .modal-header { background:transparent; }
html[data-appearance]:not([data-appearance="classic"])[data-theme] .modal-footer { background:color-mix(in srgb,var(--a-soft) 45%,var(--a-surface)); }
html[data-appearance="atelier"]:not([data-appearance="classic"])[data-theme] .header { border-top-color:var(--a-accent); box-shadow:0 3px 16px #00000003; }
html[data-appearance="atelier"]:not([data-appearance="classic"])[data-theme] .metrics-grid .metric-hero { background:radial-gradient(ellipse at 0 0,#b7cbaa12,transparent 65%),linear-gradient(150deg,#ffffff04,transparent),var(--a-hero)!important; }
html[data-appearance="atelier"]:not([data-appearance="classic"])[data-theme] .logo-mark { border-color:color-mix(in srgb,var(--a-accent) 70%,var(--a-on-accent)); box-shadow:var(--p-control-shadow); }
html[data-appearance="aura"]:not([data-appearance="classic"])[data-theme] .tab-nav { box-shadow:0 7px 22px #31456709,inset 0 1px 0 var(--p-edge); }
html[data-appearance="aura"]:not([data-appearance="classic"])[data-theme] .metrics-grid .metric-hero { background:radial-gradient(ellipse at 50% -60%,#ffffff25,transparent 75%),linear-gradient(120deg,#7997e60a,transparent 40%,#a79cd909),var(--a-hero)!important; border-color:color-mix(in srgb,var(--a-accent) 17%,var(--a-line)); }
html[data-appearance="index"]:not([data-appearance="classic"])[data-theme] { --p-card-shadow:0 1px 2px #00000005,inset 0 1px 0 var(--p-edge); }
html[data-appearance="index"]:not([data-appearance="classic"])[data-theme] .header { background:linear-gradient(180deg,var(--p-sheen),transparent 20%),var(--a-surface); }
html[data-appearance="index"]:not([data-appearance="classic"])[data-theme] .metrics-grid .metric-hero { border-color:color-mix(in srgb,var(--a-accent) 27%,var(--a-line)); box-shadow:inset 0 2px 0 var(--a-accent),var(--p-card-shadow); }
html[data-appearance="index"]:not([data-appearance="classic"])[data-theme] .tab-btn.active { box-shadow:0 1px 3px #00000009,inset 0 0 0 1px var(--a-line); }
html[data-appearance="garden"]:not([data-appearance="classic"])[data-theme] .metric-card:not(.metric-hero) { border-color:var(--a-line); }
html[data-appearance="garden"]:not([data-appearance="classic"])[data-theme] .metrics-grid .metric-hero { background:radial-gradient(ellipse at 90% 0,#ffffff28,transparent 65%),var(--a-hero)!important; box-shadow:inset 0 1px 0 #ffffff40,0 8px 28px #142b1708; }
html[data-appearance="edition"]:not([data-appearance="classic"])[data-theme] { --p-card-shadow:none; }
html[data-appearance="edition"]:not([data-appearance="classic"])[data-theme] .page-heading { border-bottom-color:var(--a-line); }
html[data-appearance="edition"]:not([data-appearance="classic"])[data-theme] .metrics-grid .metric-card,
html[data-appearance="edition"]:not([data-appearance="classic"])[data-theme] .tab-page .card,
html[data-appearance="edition"]:not([data-appearance="classic"])[data-theme] .asset-hub-card,
html[data-appearance="edition"]:not([data-appearance="classic"])[data-theme] .subscription-card { background:transparent!important; box-shadow:none; }
html[data-appearance="edition"]:not([data-appearance="classic"])[data-theme] .metrics-grid .metric-hero { border-bottom-color:var(--a-line); }

/* 2026 component finish: five quiet materials share the same component geometry.
 * Keep a single edge per control and reserve elevation for floating dialogs.
 * Liquid has its own optical finish; classic never enters these selectors. */
html:is([data-appearance="atelier"],[data-appearance="aura"],[data-appearance="index"],[data-appearance="garden"],[data-appearance="edition"]):not([data-appearance="classic"])[data-theme] {
  --p-card-shadow:0 2px 8px #14202004;
  --p-control-shadow:inset 0 1px 0 var(--p-edge);
  --p-edge:#ffffff70;
  --p-sheen:#ffffff35;
  --p-surface:linear-gradient(165deg,var(--p-sheen),transparent 65%),var(--a-surface);
  --p-selected:color-mix(in srgb,var(--a-accent) 11%,var(--a-surface));
}
html:is([data-appearance="atelier"],[data-appearance="aura"],[data-appearance="index"],[data-appearance="garden"],[data-appearance="edition"]):not([data-appearance="classic"])[data-theme="dark"] {
  --p-edge:#ffffff08; --p-sheen:#ffffff03;
  --p-card-shadow:0 2px 8px #00000008;
  --p-selected:color-mix(in srgb,var(--a-accent) 13%,var(--a-surface));
}
/* Unpaint the legacy dark image scrim: content now sits on a palette surface. */
html:is([data-appearance="atelier"],[data-appearance="aura"],[data-appearance="index"],[data-appearance="garden"],[data-appearance="edition"]):not([data-appearance="classic"])[data-theme] .tab-page::before {
  background:transparent; backdrop-filter:none; -webkit-backdrop-filter:none;
}
html:is([data-appearance="atelier"],[data-appearance="aura"],[data-appearance="index"],[data-appearance="garden"],[data-appearance="edition"]):not([data-appearance="classic"])[data-theme] .header {
  background:var(--a-surface); border-color:var(--a-line); box-shadow:none;
  backdrop-filter:none; -webkit-backdrop-filter:none;
}
html:is([data-appearance="atelier"],[data-appearance="aura"],[data-appearance="index"],[data-appearance="garden"],[data-appearance="edition"]):not([data-appearance="classic"])[data-theme] .tab-nav {
  background:transparent; border-color:transparent; box-shadow:none;
}
html:is([data-appearance="atelier"],[data-appearance="aura"],[data-appearance="index"],[data-appearance="garden"],[data-appearance="edition"]):not([data-appearance="classic"])[data-theme] :is(.tab-btn,.asset-sub-btn,.subscription-sub-btn,.income-sub-btn,.skill-sub-btn) {
  background:transparent!important; color:var(--a-secondary); border-color:transparent; box-shadow:none; text-shadow:none;
}
html:is([data-appearance="atelier"],[data-appearance="aura"],[data-appearance="index"],[data-appearance="garden"],[data-appearance="edition"]):not([data-appearance="classic"])[data-theme] :is(.tab-btn,.asset-sub-btn,.subscription-sub-btn,.income-sub-btn,.skill-sub-btn):hover {
  background:var(--a-soft)!important; color:var(--a-text); border-color:transparent; box-shadow:none;
}
html:is([data-appearance="atelier"],[data-appearance="aura"],[data-appearance="index"],[data-appearance="garden"],[data-appearance="edition"]):not([data-appearance="classic"])[data-theme] :is(.tab-btn,.asset-sub-btn,.subscription-sub-btn,.income-sub-btn,.skill-sub-btn).active {
  background:var(--p-selected)!important; color:var(--a-accent); border-color:transparent; box-shadow:none;
}
html:is([data-appearance="atelier"],[data-appearance="aura"],[data-appearance="index"],[data-appearance="garden"],[data-appearance="edition"]):not([data-appearance="classic"])[data-theme] :is(.asset-sub-nav,.subscription-sub-nav,.income-sub-nav,.skill-sub-nav) {
  background:color-mix(in srgb,var(--a-soft) 40%,var(--a-surface))!important;
  border-color:var(--a-line); box-shadow:none;
}
html:is([data-appearance="atelier"],[data-appearance="aura"],[data-appearance="index"],[data-appearance="garden"],[data-appearance="edition"]):not([data-appearance="classic"])[data-theme] :is(.btn-outline,.btn-edit,.btn-del,.session-badge,.session-button) {
  background:var(--a-surface); border-color:var(--a-line); box-shadow:none;
}
html:is([data-appearance="atelier"],[data-appearance="aura"],[data-appearance="index"],[data-appearance="garden"],[data-appearance="edition"]):not([data-appearance="classic"])[data-theme] :is(.btn-outline,.btn-edit,.btn-del,.session-button):hover {
  background:var(--a-soft); border-color:var(--p-hover); box-shadow:none;
}
html:is([data-appearance="atelier"],[data-appearance="aura"],[data-appearance="index"],[data-appearance="garden"],[data-appearance="edition"]):not([data-appearance="classic"])[data-theme] :is(.asset-hub-summary>div,.product-card,.prepaid-card,.prepaid-list-row,.consumption-list-row) {
  background:var(--p-surface); border-color:var(--a-line); box-shadow:var(--p-card-shadow);
}
/* Mineral, porcelain, graphite, ceramic and paper stay distinct through material,
 * never by assigning each theme a different button size or corner shape. */
html[data-appearance="atelier"]:not([data-appearance="classic"])[data-theme] {
  --p-surface:linear-gradient(145deg,var(--p-sheen),transparent 48%),var(--a-surface);
}
html[data-appearance="aura"]:not([data-appearance="classic"])[data-theme] {
  --p-surface:linear-gradient(165deg,color-mix(in srgb,var(--a-surface) 94%,var(--a-accent)),var(--a-surface) 65%);
  --p-selected:color-mix(in srgb,var(--a-accent) 14%,var(--a-surface));
}
html[data-appearance="index"]:not([data-appearance="classic"])[data-theme] {
  --p-surface:var(--a-surface); --p-card-shadow:none; --p-control-shadow:none;
}
html[data-appearance="garden"]:not([data-appearance="classic"])[data-theme] {
  --p-surface:linear-gradient(175deg,var(--a-surface),color-mix(in srgb,var(--a-surface) 94%,var(--a-accent)));
}
html[data-appearance="edition"]:not([data-appearance="classic"])[data-theme] {
  --p-surface:var(--a-surface); --p-card-shadow:none; --p-control-shadow:none;
  --p-button-top:var(--a-accent);
}
/* Warm paper uses visible sheets instead of the previous transparent cards. */
html[data-appearance="edition"]:not([data-appearance="classic"])[data-theme] .metrics-grid .metric-card,
html[data-appearance="edition"]:not([data-appearance="classic"])[data-theme] .tab-page .card,
html[data-appearance="edition"]:not([data-appearance="classic"])[data-theme] :is(.asset-hub-card,.subscription-card) {
  background:var(--a-surface)!important; border-color:var(--a-line); box-shadow:none;
}
html[data-appearance="edition"]:not([data-appearance="classic"])[data-theme] .metrics-grid .metric-hero {
  background:color-mix(in srgb,var(--a-accent) 7%,var(--a-surface))!important;
}
html:is([data-appearance="atelier"],[data-appearance="aura"],[data-appearance="index"],[data-appearance="garden"],[data-appearance="edition"]):not([data-appearance="classic"])[data-theme] :is(.prepaid-card.prepaid-urgent,.prepaid-list-row.prepaid-urgent) {
  border-color:color-mix(in srgb,var(--color-warning) 65%,var(--a-line));
}
