/* Börse: cool stone ground, company colours carry identity, emerald/brick carry direction. */

@font-face {
	font-family: "Bricolage";
	src: url("fonts/bricolage-grotesque-latin-standard-normal.woff2") format("woff2-variations");
	font-weight: 200 800;
	font-stretch: 75% 100%;
	font-display: swap;
	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: "Bricolage";
	src: url("fonts/bricolage-grotesque-latin-ext-standard-normal.woff2") format("woff2-variations");
	font-weight: 200 800;
	font-stretch: 75% 100%;
	font-display: swap;
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+A720-A7FF;
}
@font-face {
	font-family: "Instrument";
	src: url("fonts/instrument-sans-latin-standard-normal.woff2") format("woff2-variations");
	font-weight: 400 700;
	font-stretch: 75% 100%;
	font-display: swap;
	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: "Instrument";
	src: url("fonts/instrument-sans-latin-ext-standard-normal.woff2") format("woff2-variations");
	font-weight: 400 700;
	font-stretch: 75% 100%;
	font-display: swap;
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+A720-A7FF;
}

:root {
	--ground: #e6ebe5;
	--surface: #f6f8f5;
	--raised: #ffffff;
	--ink: #13221b;
	--muted: #56675e;
	--faint: #8a998f;
	--line: #cdd7cf;
	--line-soft: #dde4de;
	--up: #0f7a53;
	--up-soft: #d7ede2;
	--down: #b0402c;
	--down-soft: #f4dfd9;
	--gold: #a97a1f;
	--focus: #1f6fd1;

	--c-FARMER: #b98a12;
	--c-MINER: #3d5f92;
	--c-LUMBERJACK: #5f7a25;
	--c-FISHER: #117681;
	--c-MYSTERY: #7346a8;

	--display: "Bricolage", ui-sans-serif, system-ui, sans-serif;
	--text: "Instrument", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

	--step--1: 0.8125rem;
	--step-0: 1rem;
	--step-1: 1.25rem;
	--step-2: 1.5625rem;
	--step-3: 2.4414rem;
	--step-4: clamp(2.6rem, 6.4vw, 4.8rem);

	--gutter: clamp(1rem, 4vw, 2.5rem);
	--wide: 76rem;
	color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
	:root {
		--ground: #0f1814;
		--surface: #15201b;
		--raised: #1b2822;
		--ink: #e5ece7;
		--muted: #9eaea5;
		--faint: #6d7f75;
		--line: #2b3a33;
		--line-soft: #22302a;
		--up: #3cc58c;
		--up-soft: #173528;
		--down: #ef7a62;
		--down-soft: #3a211b;
		--gold: #d9ad53;
		--focus: #7fb2ff;

		--c-FARMER: #e1b33c;
		--c-MINER: #7f9fd3;
		--c-LUMBERJACK: #9bbb55;
		--c-FISHER: #4bbcc6;
		--c-MYSTERY: #b48ae6;
	}
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	background: var(--ground);
	color: var(--ink);
	font-family: var(--text);
	font-size: var(--step-0);
	line-height: 1.5;
	font-variant-numeric: tabular-nums;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
main:focus { outline: none; }

h1, h2, h3 { font-family: var(--display); line-height: 1.05; margin: 0; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }

.wrap { width: 100%; max-width: var(--wide); margin-inline: auto; padding-inline: var(--gutter); }

/* ------------------------------------------------------------ top bar */

.topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	width: 100%;
	max-width: var(--wide);
	margin-inline: auto;
	padding: 1.1rem var(--gutter) 0;
}
.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.brand-mark { width: 2rem; height: 2rem; color: var(--up); }
.brand-name { font-family: var(--display); font-weight: 700; font-size: var(--step-1); font-stretch: 85%; }
.live { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--muted); font-size: var(--step--1); }
.live-dot { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--faint); }
.live[data-state="ok"] .live-dot { background: var(--up); box-shadow: 0 0 0 0 var(--up); }
.live[data-state="ok"].pulse .live-dot { animation: ping 1.2s ease-out 1; }
.live[data-state="stale"] .live-dot { background: var(--down); }

@keyframes ping {
	from { box-shadow: 0 0 0 0 color-mix(in srgb, var(--up) 60%, transparent); }
	to { box-shadow: 0 0 0 0.6rem transparent; }
}

main { flex: 1; }

/* ------------------------------------------------------------ hero */

.hero { padding-block: clamp(1.8rem, 6vw, 4rem) clamp(1.6rem, 4vw, 2.6rem); }
.hero-title {
	font-size: var(--step-4);
	font-stretch: 78%;
	font-weight: 750;
	max-width: 18ch;
	letter-spacing: -0.02em;
}
.hero-title .figure { color: var(--up); white-space: nowrap; }
.hero-title .figure.is-down { color: var(--down); }
.hero-lead { margin-top: 1rem; max-width: 52ch; color: var(--muted); font-size: var(--step-1); line-height: 1.4; }

/* The market share bar: the one bold element of the page */
.market { margin-top: clamp(1.8rem, 5vw, 2.8rem); }
.market-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0.2rem 1rem; margin-bottom: 0.6rem; }
.market-head h2 { font-size: var(--step-1); font-stretch: 90%; }
.market-head p { color: var(--muted); font-size: var(--step--1); }
.bar {
	position: relative;
	display: flex;
	height: clamp(3.2rem, 9vw, 4.6rem);
	border-radius: 1.1rem;
	overflow: hidden;
	background: var(--line-soft);
}
.bar-seg {
	position: relative;
	display: flex;
	align-items: flex-end;
	padding: 0.45rem 0.6rem;
	min-width: 0;
	color: #fff;
	font-weight: 650;
	font-size: var(--step--1);
	white-space: nowrap;
	overflow: hidden;
	transition: flex-basis 0.8s cubic-bezier(.2,.7,.2,1);
}
.bar-seg + .bar-seg { box-shadow: inset 2px 0 0 var(--ground); }
.bar-seg span { text-shadow: 0 1px 2px rgb(0 0 0 / 0.25); }
/* Before the first sales: equal, pale segments with the company marks */
.bar.is-quiet .bar-seg {
	align-items: center;
	justify-content: center;
	gap: 0.45rem;
	color: var(--ink);
	background: color-mix(in srgb, var(--brand) 22%, var(--raised));
}
.bar.is-quiet .bar-seg span { text-shadow: none; }
.bar.is-quiet .company-mark { width: 2rem; height: 2rem; flex: none; border-radius: 0.6rem; }
.bar.is-quiet .company-mark svg { width: 1.25rem; height: 1.25rem; }
@media (max-width: 34rem) { .bar.is-quiet .seg-label { display: none; } }
@media (prefers-color-scheme: dark) {
	.bar-seg { color: #0f1814; }
	.bar-seg span { text-shadow: none; }
	.bar-seg + .bar-seg { box-shadow: inset 2px 0 0 var(--ground); }
}
.bar-fair {
	position: absolute;
	top: -0.35rem;
	bottom: -0.35rem;
	width: 0;
	border-left: 2px dashed color-mix(in srgb, var(--ink) 55%, transparent);
	pointer-events: none;
}
.bar-legend { display: flex; flex-wrap: wrap; gap: 0.35rem 1.2rem; margin-top: 0.7rem; color: var(--muted); font-size: var(--step--1); }
.bar-legend .fair-key { display: inline-flex; align-items: center; gap: 0.45rem; }
.bar-legend .fair-key::before { content: ""; width: 0; height: 0.95rem; border-left: 2px dashed currentColor; }

/* ------------------------------------------------------------ sections */

.section { padding-block: clamp(1.8rem, 5vw, 3.2rem); }
.section + .section { border-top: 1px solid var(--line); }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.6rem 1.2rem; margin-bottom: 1.3rem; }
.section-head h2 { font-size: var(--step-3); font-stretch: 82%; }
.section-head p { color: var(--muted); max-width: 46ch; }

/* ------------------------------------------------------------ companies */

.companies { display: grid; grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr)); gap: 1rem; }
.company {
	position: relative;
	display: grid;
	grid-template-rows: auto auto 1fr auto;
	gap: 0.9rem;
	padding: 1.15rem 1.15rem 1rem;
	border-radius: 1.4rem;
	background: var(--raised);
	border: 1px solid var(--line-soft);
	text-decoration: none;
	color: inherit;
	overflow: hidden;
	isolation: isolate;
}
.company::before {
	content: "";
	position: absolute;
	inset: 0 0 auto 0;
	height: 0.4rem;
	background: var(--brand);
}
.company:hover { border-color: color-mix(in srgb, var(--brand) 55%, var(--line)); }
.company-id { display: flex; align-items: center; gap: 0.75rem; }
.company-mark {
	flex: none;
	display: grid;
	place-items: center;
	width: 2.75rem;
	height: 2.75rem;
	border-radius: 0.9rem;
	background: color-mix(in srgb, var(--brand) 16%, transparent);
	color: var(--brand);
}
.company-mark svg { width: 1.7rem; height: 1.7rem; }
.company-mark .mark-eye { fill: var(--raised); }
.company-name { font-family: var(--display); font-size: var(--step-1); font-weight: 700; font-stretch: 88%; line-height: 1.1; }
.company-sub { color: var(--muted); font-size: var(--step--1); }
.ticker { font-weight: 650; color: var(--brand); letter-spacing: 0.02em; }
.company-quote { display: flex; align-items: baseline; gap: 0.6rem; }
.quote {
	font-family: var(--display);
	font-size: clamp(2.4rem, 5vw, 3rem);
	font-weight: 750;
	font-stretch: 75%;
	line-height: 0.95;
	letter-spacing: -0.02em;
}
.chip {
	display: inline-flex;
	align-items: center;
	padding: 0.2rem 0.6rem;
	border-radius: 999px;
	font-size: var(--step--1);
	font-weight: 650;
	white-space: nowrap;
}
.chip.is-up { background: var(--up-soft); color: var(--up); }
.chip.is-down { background: var(--down-soft); color: var(--down); }
.chip.is-flat { background: var(--line-soft); color: var(--muted); }
.firm-quote .chip { margin-right: 0.35rem; }
.company-spark { height: 3rem; }
.company-foot { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: var(--step--1); padding-top: 0.75rem; border-top: 1px solid var(--line-soft); }
.company-foot .go { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.company.is-mystery {
	grid-column: 1 / -1;
	grid-template-rows: auto;
	grid-template-columns: minmax(14rem, 1fr) minmax(0, 1.4fr) minmax(0, 1.6fr);
	align-items: center;
	gap: 1rem 2rem;
	background: color-mix(in srgb, var(--brand) 8%, var(--raised));
}
.company.is-mystery .company-foot { grid-column: 1 / -1; }
.mystery-text { color: var(--muted); max-width: 38ch; }
.mystery-goods { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem 1.2rem; }
.mystery-goods li { display: flex; justify-content: space-between; gap: 0.6rem; border-bottom: 1px solid var(--line-soft); padding-bottom: 0.35rem; font-size: var(--step--1); }
.mystery-goods span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
@media (max-width: 52rem) {
	.company.is-mystery { grid-template-columns: 1fr; }
	.mystery-goods { grid-template-columns: 1fr; }
}

.trend { display: inline-flex; align-items: center; gap: 0.25rem; font-weight: 650; font-size: var(--step--1); }
.trend svg { width: 0.7rem; height: 0.7rem; }
.is-up { color: var(--up); }
.is-down { color: var(--down); }
.is-flat { color: var(--muted); }

/* ------------------------------------------------------------ movers */

.movers { display: grid; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); gap: 1rem 2.5rem; }
.movers h3 { font-size: var(--step-1); font-stretch: 90%; margin-bottom: 0.4rem; }
.mover-list { list-style: none; margin: 0; padding: 0; }
.mover {
	display: grid;
	grid-template-columns: 0.55rem 1fr auto auto;
	align-items: center;
	gap: 0.75rem;
	padding: 0.7rem 0;
	border-bottom: 1px solid var(--line-soft);
}
.mover button, .row-button { all: unset; cursor: pointer; display: contents; }
.dot { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--brand); }
.mover-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mover-name small { display: block; color: var(--muted); font-weight: 400; font-size: var(--step--1); }
.price { font-weight: 650; text-align: right; }
.pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 4.4rem;
	padding: 0.2rem 0.55rem;
	border-radius: 999px;
	font-size: var(--step--1);
	font-weight: 700;
}
.pill.is-up { background: var(--up-soft); }
.pill.is-down { background: var(--down-soft); }
.pill.is-flat { background: var(--line-soft); }

/* ------------------------------------------------------------ sellers */

.tabs { display: inline-flex; padding: 0.25rem; border-radius: 999px; background: var(--line-soft); }
.tabs button {
	appearance: none;
	border: 0;
	background: transparent;
	color: var(--muted);
	font: inherit;
	font-weight: 600;
	font-size: var(--step--1);
	padding: 0.45rem 0.95rem;
	border-radius: 999px;
	cursor: pointer;
}
.tabs button[aria-selected="true"] { background: var(--raised); color: var(--ink); box-shadow: 0 1px 2px rgb(0 0 0 / 0.08); }

.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 0.8rem; margin-bottom: 1.4rem; }
.place {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 0.45rem;
	padding: 1.1rem 0.6rem 0.9rem;
	border-radius: 1.3rem 1.3rem 0.5rem 0.5rem;
	background: var(--raised);
	border: 1px solid var(--line-soft);
	min-width: 0;
}
.place-1 { order: 2; padding-top: 1.6rem; background: color-mix(in srgb, var(--gold) 12%, var(--raised)); border-color: color-mix(in srgb, var(--gold) 40%, var(--line)); }
.place-2 { order: 1; }
.place-3 { order: 3; }
.place .rank { font-family: var(--display); font-weight: 750; font-stretch: 75%; font-size: var(--step-2); color: var(--muted); line-height: 1; }
.place-1 .rank { color: var(--gold); }
.place .who { font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.place .amount { font-family: var(--display); font-weight: 700; font-stretch: 80%; font-size: var(--step-1); }
.place .meta { color: var(--muted); font-size: var(--step--1); }

.avatar { display: grid; place-items: center; border-radius: 30%; color: #fff; font-family: var(--display); font-weight: 750; font-stretch: 80%; }
.avatar-lg { width: 3.4rem; height: 3.4rem; font-size: 1.4rem; }
.place-1 .avatar-lg { width: 4.2rem; height: 4.2rem; font-size: 1.75rem; }
.avatar-sm { width: 2.2rem; height: 2.2rem; font-size: 0.95rem; }

.rank-list { list-style: none; margin: 0; padding: 0; }
.rank-row { display: grid; grid-template-columns: 1.8rem auto 1fr auto; align-items: center; gap: 0.8rem; padding: 0.6rem 0; border-bottom: 1px solid var(--line-soft); }
.rank-row .n { color: var(--muted); font-weight: 600; text-align: right; }
.rank-row .who { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-row .who small { display: block; color: var(--muted); font-weight: 400; font-size: var(--step--1); }

/* Empty podium before the first sale */
.podium.is-empty .place { background: transparent; border-style: dashed; border-color: var(--line); }
.podium.is-empty .place-1 { background: color-mix(in srgb, var(--gold) 6%, transparent); }
.podium.is-empty .who { color: var(--muted); font-weight: 600; }
.avatar-free { background: transparent; color: var(--muted); border: 2px dashed var(--line); }
.empty-note { color: var(--muted); max-width: 52ch; }

/* ------------------------------------------------------------ today */

.today { display: grid; grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr)); gap: 1.4rem 2rem; }
.fact .value { font-family: var(--display); font-size: var(--step-3); font-weight: 750; font-stretch: 78%; line-height: 1; }
.fact .what { color: var(--muted); margin-top: 0.35rem; }

/* ------------------------------------------------------------ assortments */

.assort-tabs {
	display: flex;
	gap: 0.5rem;
	overflow-x: auto;
	scrollbar-width: none;
	padding-bottom: 0.2rem;
	margin-bottom: 1rem;
}
.assort-tabs::-webkit-scrollbar { display: none; }
.assort-tabs button {
	appearance: none;
	flex: none;
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	padding: 0.35rem 0.9rem 0.35rem 0.35rem;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: transparent;
	color: var(--ink);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}
.assort-tabs .company-mark { width: 2rem; height: 2rem; border-radius: 999px; }
.assort-tabs .company-mark svg { width: 1.2rem; height: 1.2rem; }
.assort-tabs button[aria-selected="true"] {
	border-color: var(--brand);
	background: color-mix(in srgb, var(--brand) 14%, var(--raised));
}
.assort-tabs button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.assort-panel {
	border-radius: 1.3rem;
	background: var(--raised);
	border: 1px solid var(--line-soft);
	border-top: 4px solid var(--brand);
	padding: 1.1rem clamp(1rem, 3vw, 1.6rem) 0.6rem;
}
.assort-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0.3rem 1rem; margin-bottom: 0.4rem; }
.assort-head p { color: var(--muted); }
.assort-head strong { color: var(--ink); }
.assort-head a { color: var(--ink); font-weight: 600; font-size: var(--step--1); }

.goods {
	list-style: none;
	margin: 0;
	padding: 0;
	columns: 3 17rem;
	column-gap: 2.2rem;
}
.good { break-inside: avoid; border-bottom: 1px solid var(--line-soft); }
.good-line {
	all: unset;
	box-sizing: border-box;
	display: flex;
	align-items: baseline;
	gap: 0.6rem;
	width: 100%;
	padding: 0.55rem 0;
	cursor: pointer;
}
.good-line:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 0.3rem; }
@media (hover: hover) {
	.good-line:hover .good-name { text-decoration: underline; text-underline-offset: 0.2em; }
}
.good-name { flex: 1; min-width: 0; font-weight: 600; }
.good-name small { margin-left: 0.45rem; color: var(--muted); font-weight: 400; font-size: var(--step--1); }
.good-price { font-variant-numeric: tabular-nums; white-space: nowrap; }
.dev { font-size: var(--step--1); font-weight: 650; font-variant-numeric: tabular-nums; }
.dev.is-up { color: var(--up); }
.dev.is-down { color: var(--down); }
.good-group summary { list-style: none; }
.good-group summary::-webkit-details-marker { display: none; }
.good-group summary .good-name::before {
	content: "";
	display: inline-block;
	width: 0.45rem;
	height: 0.45rem;
	margin-right: 0.55rem;
	border-right: 2px solid var(--muted);
	border-bottom: 2px solid var(--muted);
	transform: translateY(-0.15rem) rotate(-45deg);
	transition: transform 0.15s;
}
.good-group[open] summary .good-name::before { transform: translateY(-0.25rem) rotate(45deg); }
.good-members { list-style: none; margin: 0 0 0.4rem; padding: 0 0 0 1rem; border-left: 2px solid color-mix(in srgb, var(--brand) 45%, transparent); }
.good-members .good:last-child { border-bottom: 0; }
.good-members .good-name { font-weight: 500; }

/* First steps while nobody sells */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.2rem 2rem; }
.step { display: grid; grid-template-columns: auto 1fr; gap: 0.9rem; align-items: start; }
.step-n {
	display: grid;
	place-items: center;
	width: 2.4rem;
	height: 2.4rem;
	border-radius: 0.8rem;
	background: var(--ink);
	color: var(--ground);
	font-family: var(--display);
	font-weight: 750;
	font-size: var(--step-1);
}
.step h3 { font-size: var(--step-1); font-stretch: 90%; margin-bottom: 0.3rem; }
.step p { color: var(--muted); max-width: 40ch; }
.step code { font-family: inherit; font-weight: 700; color: var(--ink); background: var(--raised); border: 1px solid var(--line-soft); border-radius: 0.4rem; padding: 0.05rem 0.4rem; }
.mover .per { color: var(--muted); font-size: var(--step--1); min-width: 4.5rem; text-align: right; }

.explain { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1.4rem 2.5rem; }
.explain h3 { font-size: var(--step-1); font-stretch: 90%; margin-bottom: 0.4rem; }
.explain p { color: var(--muted); max-width: 42ch; }

/* ------------------------------------------------------------ company page */

.back { display: inline-flex; margin-top: 1.4rem; color: var(--muted); font-weight: 600; text-decoration: none; }
.back:hover { color: var(--ink); text-decoration: underline; }
.firm-head { padding-block: 1.2rem 1.6rem; display: grid; grid-template-columns: 1fr; gap: 1.4rem; }
.firm-id { display: flex; align-items: center; gap: 1rem; }
.firm-id .company-mark { width: 4rem; height: 4rem; border-radius: 1.2rem; }
.firm-id .company-mark svg { width: 2.4rem; height: 2.4rem; }
.firm-title { font-size: var(--step-3); font-stretch: 80%; }
.firm-sub { color: var(--muted); margin-top: 0.25rem; }
.firm-board {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 1.2rem;
	padding: 1.2rem;
	border-radius: 1.5rem;
	background: var(--raised);
	border: 1px solid var(--line-soft);
	border-top: 0.4rem solid var(--brand);
}
.firm-quote .quote { font-size: clamp(3rem, 9vw, 4.6rem); }
.firm-quote p { color: var(--muted); margin-top: 0.4rem; max-width: 40ch; }
.firm-chart { min-height: 9rem; }
.firm-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.8rem; border-top: 1px solid var(--line-soft); padding-top: 1rem; }
.firm-facts .value { font-family: var(--display); font-weight: 750; font-stretch: 80%; font-size: var(--step-2); line-height: 1.05; }
.firm-facts .what { color: var(--muted); font-size: var(--step--1); }

@media (min-width: 52rem) {
	.firm-board { grid-template-columns: minmax(15rem, 0.8fr) minmax(0, 1.6fr); }
	.firm-facts { grid-column: 1 / -1; }
}

.toolbar { display: flex; flex-wrap: wrap; gap: 0.7rem; align-items: center; margin-bottom: 0.8rem; }
.search {
	flex: 1 1 14rem;
	min-width: 0;
	font: inherit;
	color: var(--ink);
	background: var(--raised);
	border: 1px solid var(--line);
	border-radius: 0.9rem;
	padding: 0.65rem 0.9rem;
}
.search::placeholder { color: var(--faint); }
.select {
	font: inherit;
	color: var(--ink);
	background: var(--raised);
	border: 1px solid var(--line);
	border-radius: 0.9rem;
	padding: 0.65rem 0.9rem;
}

.goods { width: 100%; border-collapse: collapse; }
.goods th {
	text-align: left;
	color: var(--muted);
	font-weight: 600;
	font-size: var(--step--1);
	padding: 0.55rem 0.6rem;
	border-bottom: 1px solid var(--line);
}
.goods td { padding: 0.75rem 0.6rem; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.goods tbody tr { cursor: pointer; }
.goods tbody tr:hover td { background: color-mix(in srgb, var(--brand) 6%, transparent); }
.goods .num { text-align: right; white-space: nowrap; }
.goods .good { font-weight: 600; }
.goods .good small, .goods .stack { display: block; color: var(--muted); font-weight: 400; font-size: var(--step--1); }
.goods .spark-cell { width: 7.5rem; }
.goods .spark-cell svg { width: 7.5rem; height: 1.9rem; display: block; }
.empty { color: var(--muted); padding: 1.5rem 0; }

@media (max-width: 40rem) {
	.goods .hide-sm { display: none; }
	.goods td, .goods th { padding-inline: 0.35rem; }
	.goods .spark-cell { width: 4.6rem; }
	.goods .spark-cell svg { width: 4.6rem; }
	.podium { gap: 0.45rem; }
	.place { padding-inline: 0.35rem; }
	.place .meta { display: none; }
}

/* ------------------------------------------------------------ item sheet */

.sheet {
	border: 0;
	padding: 0;
	width: min(40rem, 100vw);
	max-height: 92vh;
	border-radius: 1.6rem;
	background: var(--surface);
	color: var(--ink);
	box-shadow: 0 30px 80px rgb(0 0 0 / 0.35);
}
.sheet::backdrop { background: rgb(10 20 15 / 0.45); }
.sheet-inner { padding: 1.4rem; display: grid; gap: 1.1rem; }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.sheet-head h2 { font-size: var(--step-2); font-stretch: 85%; }
.sheet-head p { color: var(--muted); }
.close {
	appearance: none;
	border: 1px solid var(--line);
	background: var(--raised);
	color: var(--ink);
	font: inherit;
	font-weight: 600;
	border-radius: 999px;
	padding: 0.4rem 0.9rem;
	cursor: pointer;
}
.sheet-price { display: flex; align-items: baseline; gap: 0.8rem; flex-wrap: wrap; }
.sheet-chart svg { width: 100%; height: auto; display: block; }
.sheet-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.8rem; }
.sheet-facts .value { font-weight: 700; font-size: var(--step-1); }
.sheet-facts .what { color: var(--muted); font-size: var(--step--1); }

@media (max-width: 40rem) {
	.sheet { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 1.6rem 1.6rem 0 0; max-height: 88vh; }
}

/* ------------------------------------------------------------ charts */

.chart-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-area { opacity: 0.14; }
.chart-axis { fill: var(--faint); font-size: 11px; font-family: var(--text); }
.chart-grid { stroke: var(--line-soft); stroke-width: 1; }
.chart-base { stroke: var(--faint); stroke-width: 1; stroke-dasharray: 3 4; }
.chart-bar { fill: var(--line); }

/* ------------------------------------------------------------ misc */

.notice { margin: 3rem auto; max-width: 40ch; text-align: center; color: var(--muted); }
.skeleton { color: var(--muted); padding-block: 4rem; }
.footer { width: 100%; max-width: var(--wide); margin: 2rem auto 0; padding: 1.4rem var(--gutter) 2.4rem; border-top: 1px solid var(--line); color: var(--muted); font-size: var(--step--1); }

.changed { animation: flash 1.4s ease-out 1; }
@keyframes flash {
	from { background: color-mix(in srgb, var(--gold) 30%, transparent); }
	to { background: transparent; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; }
}
