/*!
Slabacus / Laurel Vega
Copyright (c) 2026 Matthew Gilham. All rights reserved.
SPDX-License-Identifier: LicenseRef-LaurelVega-Proprietary
See SLABACUS-LICENSE.txt. Authorised owner maintenance is permitted.
Third-party material retains its own ownership and licence terms.
*/

@font-face { font-family: Manrope; src: url('./fonts/manrope-500.ttf'); font-weight: 500; font-display: swap; }
@font-face { font-family: Manrope; src: url('./fonts/manrope-600.ttf'); font-weight: 600; font-display: swap; }
@font-face { font-family: Manrope; src: url('./fonts/manrope-700.ttf'); font-weight: 700; font-display: swap; }
@font-face { font-family: Manrope; src: url('./fonts/manrope-800.ttf'); font-weight: 800; font-display: swap; }

.signed-in {
  font-family: Manrope, "Segoe UI", sans-serif;
  font-weight: 600;
  background: linear-gradient(150deg,#121826,#152936);
  --surface: #1b2637;
  --field: #111827;
  --border: #3a485d;
  --muted: #aebbd0;
  --accent: #74d7e2;
  --green: #56ed9f;
  --loss: #ff7899;
  --summary-notes: #e4c5a8;
  --gold: #ffbd67;
  --table: linear-gradient(115deg,#151c2c,#192738);
  --rail: linear-gradient(155deg,#192635,#16363e);
  --category: #192131;
  --header: linear-gradient(100deg,#202838,#191f2c);
  --accent-button: linear-gradient(145deg,#594026,#382b22);
  --summary-edge: #8567b6;
  --summary-paint: linear-gradient(120deg,#223344,#1b2434 65%,#171c2e);
}
.signed-in[data-palette=light] {
  color-scheme: light;
  color: #171f30;
  background: linear-gradient(150deg,#f3f5f9,#eaf0f5);
  --surface: #fff;
  --field: #f1f3f8;
  --border: #cbd3df;
  --muted: #46536a;
  --accent: #166b96;
  --green: #16794d;
  --loss: #ad3157;
  --summary-notes: #374156;
  --gold: #875411;
  --table: #fff;
  --rail: linear-gradient(150deg,#dfeaf2,#d7e6ef);
  --category: #f4deb4;
  --header: linear-gradient(100deg,#f1f3f8,#f8f9fc);
  --accent-button: linear-gradient(145deg,#f0d59b,#f8e8c8);
  --summary-edge: #d5dbe6;
  --summary-paint: #fff;
}
.signed-in[data-palette=custom] {
  --accent: #95f0ef;
  --rail: linear-gradient(155deg,#1d4550,#423350);
  --category: #282941;
  --header: linear-gradient(115deg,#602741,#182f50);
  --summary-edge: #d881b7;
}
.signed-in .masthead { background: var(--header); }
.signed-in .masthead-content { width: min(100% - 1rem,112rem); min-height: 3.4rem; gap: clamp(.4rem,1.25vw,1rem); justify-content: center; }
.signed-in .brand strong { font-size: clamp(1.1rem,2.15vw,1.85rem); }
.signed-in .account-controls { display: none; }
.workspace-tools { display: flex; align-items: center; flex: 0 1 56rem; gap: clamp(.4rem,1.25vw,1rem); }
.workspace-search { display: flex; align-items: center; width: 100%; max-width: 32rem; min-width: 5rem; padding-inline: .6rem; border: 1px solid color-mix(in srgb,var(--accent) 42%,var(--border)); border-radius: .4rem; background: var(--surface); }
.workspace-search input { flex: 1; min-width: 0; border: 0; background: transparent; padding: .34rem .45rem; min-height: 2.05rem; }
.workspace-search kbd { font: inherit; font-size: .72rem; color: var(--muted); white-space: nowrap; }
.workspace-search svg { flex: none; width: 1rem; height: 1rem; }
.workspace-controls { display: flex; align-items: center; flex: none; gap: .4rem; }
.workspace-controls button { min-height: 2.15rem; padding: .28rem .6rem; border-radius: .4rem; white-space: nowrap; }
.workspace-controls .add-asset { width: 2.15rem; padding: 0; color: #9bffcf; background: #184235; border-color: #41977c; font-size: 1.2rem; }
.workspace-controls .primary { background: linear-gradient(135deg,#f5df9e,#dfbc68); border-color: #b98e3d; color: #30230c; }
.scale-icon { color: var(--accent); }
.signed-in main { width: min(100% - 1.25rem,112rem); max-width: none; padding-block: .75rem 1.5rem; }
#collection { display: grid; grid-template-columns: clamp(10.25rem,14vw,13rem) minmax(0,1fr); gap: .7rem; font-size: var(--workspace-size,1rem); }
.workspace-rail { align-self: start; min-width: 0; border: 1px solid color-mix(in srgb,var(--accent) 47%,var(--border)); border-radius: .65rem; overflow: hidden; }
.workspace-nav, .workspace-categories { padding: .65rem; }
.workspace-nav { background: var(--rail); }
.workspace-categories { background: var(--category); border-top: 1px solid var(--border); }
.workspace-rail h2 { margin: .4rem .3rem .55rem; color: var(--summary-notes); font-size: .73em; letter-spacing: .11em; text-transform: uppercase; }
#workspace-nav, #workspace-categories { display: grid; gap: .24rem; }
#workspace-nav button { display: flex; align-items: center; gap: .62em; padding: .45rem .55rem; border: 1px solid transparent; border-radius: .4rem; color: inherit; background: transparent; text-align: left; }
#workspace-nav button svg { flex: none; width: 1.14em; height: 1.14em; color: var(--accent); }
#workspace-nav button[aria-current=page] { background: linear-gradient(125deg,var(--category),var(--surface)) padding-box,linear-gradient(125deg,var(--accent),var(--summary-edge)) border-box; box-shadow: 0 0 .7rem color-mix(in srgb,var(--accent) 16%,transparent); }
#workspace-categories button { width: 100%; min-height: 1.85rem; padding: .28rem .72rem; border: 1px solid color-mix(in srgb,var(--gold) 30%,var(--border)); border-radius: 2rem; background: var(--category); color: inherit; text-align: left; font-size: .86em; overflow-wrap: anywhere; }
#workspace-categories button[aria-pressed=true] { color: var(--gold); background: var(--accent-button); border-color: var(--gold); }
.workspace-primary { min-width: 0; }
.signed-in .collection-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: .55rem; gap: .55rem; }
.signed-in .collection-header h1 { font-size: clamp(1.65em,2.65vw,2.35em); line-height: 1.14; font-weight: 800; }
.signed-in[data-palette=dark] .collection-header h1 { text-shadow: 0 0 15px #74d7e25e; }
.collection-share { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; min-height: 0; padding: 0; color: #07252e; background: #58e8df; border-color: #9afaf2; box-shadow: 0 0 .65rem #58e8df50; }
.collection-share svg { width: 1.1rem; height: 1.1rem; }
.collection-dashboard { display: grid; grid-template-columns: 2fr minmax(14rem,1fr); gap: .45rem; margin-bottom: .55rem; }
.collection-summary { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: .45rem; }
.collection-summary button,.collection-abacus { background: var(--summary-paint) padding-box,linear-gradient(125deg,var(--accent),var(--summary-edge)) border-box; border: 1px solid transparent; border-radius: .7rem; color: inherit; }
.collection-summary button { display: grid; align-content: center; justify-items: start; gap: .28rem; min-height: 6.5rem; padding: .6rem; text-align: left; }
.collection-summary span { color: var(--muted); font-size: .79em; line-height: 1.22; }
.collection-summary strong { font-size: clamp(1.02em,1.65vw,1.7em); line-height: 1.2; font-weight: 800; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.collection-summary small { color: var(--summary-notes); font-size: .69em; line-height: 1.26; }
.collection-abacus { min-width: 0; padding: .46rem .55rem; }
.gain { color: var(--green); }
.loss { color: var(--loss); }
.collection-table-scroll { overflow: auto; max-width: 100%; border: 1px solid var(--border); border-radius: .65rem; background: var(--table); }
.collection-table { width: 100%; min-width: 57em; border-collapse: collapse; table-layout: fixed; }
.collection-table th,.collection-table td { padding-inline: .45em; }
.collection-table thead { background: var(--field); color: var(--muted); }
.collection-table th { font-size: .77em; padding-block: .12rem; font-weight: 700; text-align: left; line-height: 1.12; }
.collection-table th button { display: inline-flex; align-items: center; gap: .22rem; width: auto; min-height: 0; padding: .17rem 0; border: 0; color: inherit; background: transparent; font: inherit; text-align: inherit; }
.collection-table th svg { flex: none; width: 1.13em; height: 1.13em; }
.collection-table th.market-group { text-align: center; background: color-mix(in srgb,var(--accent) 8%,transparent); border-bottom: 1px solid var(--border); }
.collection-table td { padding-block: .22rem; border-top: 1px solid color-mix(in srgb,var(--border) 80%,transparent); font-size: .86em; }
.collection-table .col-asset { width: 24%; }
.collection-table .col-quantity { width: 5%; }
.collection-table .col-paid { width: 10%; }
.collection-table .col-value { width: 11%; }
.collection-table .col-actions { width: 10%; }
.collection-table .col-trend { width: 13%; }
.collection-table .col-market { width: 9%; }
.collection-table .numeric { text-align: right; font-variant-numeric: tabular-nums; }
.collection-table .numeric strong { font-size: 1.08em; }
.collection-table .numeric small { display: block; color: var(--muted); font-size: .78em; min-height: 1.1em; }
.collection-table .market { text-align: center; }
.identity { display: flex; gap: .45rem; align-items: center; }
.asset-thumbnail { width: 2.65em; height: 3.65em; flex: none; display: grid; place-items: center; object-fit: contain; border: 1px solid var(--border); border-radius: .25rem; background: var(--field); color: var(--muted); }
.identity-name { display: block; color: inherit; padding: 0; text-align: left; border: 0; background: transparent; min-height: 0; font-weight: 800; line-height: 1.24; }
.identity-name:hover { text-decoration: underline; }
.asset-category-mark { display: flex; align-items: baseline; gap: .28rem; color: var(--muted); font-size: .8em; line-height: 1.2; padding-top: .16em; }
.asset-category-mark i { width: .46rem; height: .46rem; flex: none; border-radius: 50%; background: #a876ed; }
.asset-category-mark[data-tone="1"] i { background: #56b7bb; }
.asset-category-mark[data-tone="2"] i { background: #e5a060; }
.row-actions { display: flex; align-items: center; gap: .19rem; }
.row-actions button { display: grid; place-items: center; width: 1.58rem; height: 1.7rem; min-height: 0; padding: 0; border-radius: .32rem; }
.row-actions button svg { width: 1.05rem; height: 1.05rem; }
.row-actions [data-action=value] { color: #ffbd67; background: #433021; border-color: #92704b; }
.row-actions [data-action=exclude] { color: #c798ff; background: #30253d; border-color: #78618c; }
.row-actions [data-action=exclude][aria-pressed=true] { color: #23133a; background: #c798ff; }
.row-actions [data-action=market] { color: #83e2f3; background: #203743; border-color: #4e7d8b; }
.collection-foot { display: flex; justify-content: space-between; align-items: center; margin-top: .45rem; }
.collection-foot button { min-height: 1.9rem; padding: .22rem .52rem; font-size: .76em; }
#collection-status:empty { display: none; }
.collection-overview-panel { border: 1px solid var(--border); border-radius: .6rem; padding: .8rem; background: var(--surface); }
.collection-overview-panel p, .collection-overview-panel h2 { margin-bottom: .6rem; }
.collection-overview-panel .quiet,.collection-overview-panel .primary { display: inline-flex; align-items: center; }
#workspace-detail > :is(.quiet,.collection-overview-panel) { margin-bottom: .65rem; }
.asset-detail-overview { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; gap: 1rem; margin-bottom: 1.1rem; }
.asset-detail-overview .detail-photo { width: 100%; height: auto; aspect-ratio: 4 / 5; max-height: 34rem; border: 1px solid var(--border); border-radius: .6rem; }
.asset-detail-facts { display: grid; gap: .55rem; }
.asset-detail-facts > div:not(.actions) { display: grid; grid-template-columns: minmax(8rem,.65fr) minmax(0,1fr); align-items: baseline; gap: .35rem; padding-bottom: .27rem; border-bottom: 1px solid var(--border); }
.asset-detail-facts span { color: var(--muted); }
.asset-detail-facts strong { overflow-wrap: anywhere; }
.asset-value-chart { margin-top: .35rem; padding: .7rem; border: 1px solid var(--border); border-radius: .6rem; background: var(--field); }
.asset-value-chart h2 { margin: 0 0 .45rem; font-size: .92rem; text-transform: uppercase; letter-spacing: .08em; }
.asset-value-chart-body { display: grid; gap: .35rem; color: var(--muted); }
.asset-value-chart-body strong { color: var(--green); font-size: 1.15rem; }
.asset-value-chart-body svg { display: block; width: 100%; height: 8.5rem; color: var(--green); background: linear-gradient(to bottom,transparent 32%,var(--border) 33%,transparent 34%,transparent 65%,var(--border) 66%,transparent 67%); }
.asset-value-chart-body small { color: var(--muted); }
.trend-cell svg { display: block; width: 100%; max-width: 6rem; height: 1.1rem; }
.trend-cell small { display: block; color: var(--muted); font-size: .7em; }
.signed-in[data-palette=light] .primary { color: #39270b; background: #f0d59b; border-color: #ba9b5c; }
.signed-in[data-palette=light] [data-error=true] { color: #ad3157; }
.workspace-search input { margin-bottom: 0; }
.history-tiles { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,14rem),1fr)); gap: .45rem; }
.history-tiles button { display: flex; align-items: center; gap: .5rem; padding: .5rem; text-align: left; }
.history-tiles small { display: block; color: var(--muted); }
.asset-history-figure { margin-block: .6rem; }
.asset-history-figure svg { display: block; width: 100%; height: 8rem; color: var(--green); }
.asset-history-figure small { display: block; color: var(--muted); overflow-wrap: anywhere; }
.history-table { width: 100%; border-collapse: collapse; }
.history-table :is(th,td) { text-align: left; padding: .34rem .45rem; border-bottom: 1px solid var(--border); }
#workspace-dialog-content { display: grid; gap: .65rem; margin-bottom: .8rem; }
.welcome-intro { margin: 0 0 .25rem; color: var(--muted); font-size: 1.05rem; }
.welcome-map { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: .65rem; margin: .4rem 0; }
.welcome-step { min-width: 0; padding: .9rem; border: 1px solid var(--border); border-radius: .85rem; background: color-mix(in srgb,var(--panel) 88%,var(--accent)); }
.welcome-step-icon { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; margin-bottom: .65rem; border-radius: .7rem; background: var(--accent); color: #071822; font-size: 1.35rem; font-weight: 800; }
.welcome-step strong { display: block; margin-bottom: .35rem; font-size: 1rem; }
.welcome-step p { margin: 0; color: var(--muted); font-size: .78rem; line-height: 1.45; }
.welcome-start { justify-self: start; margin-top: .25rem; }
.workspace-link { color: var(--accent); }

@media (max-width: 75rem) {
  .collection-dashboard { grid-template-columns: minmax(0,1fr); }
  .collection-abacus { display: grid; justify-items: center; }
}
@media (max-width: 45rem) {
  .welcome-map { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .welcome-step:last-child { grid-column: 1 / -1; }
}
@media (max-width: 42rem) {
  #collection { grid-template-columns: minmax(0,1fr); gap: .5rem; }
  .workspace-rail { grid-row: 1; }
  .workspace-nav,.workspace-categories { padding: .32rem .4rem; }
  .workspace-rail h2 { margin: .15rem .2rem .25rem; }
  #workspace-nav,#workspace-categories { display: flex; flex-wrap: wrap; gap: .13rem .33rem; }
  #workspace-nav button,#workspace-categories button { width: auto; min-height: 1.9rem; padding: .25rem .38rem; font-size: .72em; }
  #workspace-nav button { gap: .23em; }
  .signed-in .masthead-content { min-height: 2.9rem; }
  .signed-in .brand strong,.workspace-search kbd { display: none; }
  .signed-in .brand svg { width: 1.45rem; height: 1.45rem; }
  .workspace-tools { flex-wrap: wrap; gap: .3rem; padding-block: .35rem; }
  .workspace-search { min-width: 7rem; flex: 1 1 7rem; }
  .workspace-search input { font-size: 1rem; }
  .workspace-controls { gap: .25rem; }
  .workspace-controls button { min-height: 1.9rem; padding: .22rem .38rem; font-size: .72rem; }
  .workspace-controls .add-asset { width: 1.9rem; font-size: 1rem; }
  #value-all { display: none; }
  .collection-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .collection-summary button { min-height: 4.15rem; padding: .42rem .6rem; }
  .collection-summary strong { font-size: 1.16em; }
  .collection-table td { padding-block: .25rem; }
  .asset-detail-overview { grid-template-columns: minmax(0,1fr); }
  .asset-detail-overview .detail-photo { max-height: 22rem; }
}
