/* «Обзор» and the page of a coin (resources/views/hold/page.blade.php, coin.blade.php). Plain CSS on Filament's colour
   variables (--primary-*, --gray-*): no build step, light and dark themes follow Filament's switch. Phone first; wider
   grids from 640 px. */

/* The brand of the sidebar and the sign-in page (resources/views/hold/brand.blade.php). */
.hd-brand { display: inline-flex; align-items: center; gap: 9px; height: 100%; font-size: 1.2rem; font-weight: 750; letter-spacing: -.01em; color: var(--gray-950); }
.dark .hd-brand { color: #fff; }
.hd-brand img { width: 1.75rem; height: 1.75rem; border-radius: 8px; }

.hd {
    --hd-card: #fff;
    --hd-border: var(--gray-200);
    --hd-soft: var(--gray-100);
    --hd-text: var(--gray-950);
    --hd-muted: var(--gray-500);
    --hd-accent: var(--primary-600);
    --hd-up: #15803d;
    --hd-down: #dc2626;
    --hd-warn: #b45309;
    --hd-avg: #7c3aed;
    display: flex; flex-direction: column; gap: 14px;
    color: var(--hd-text);
    font-variant-numeric: tabular-nums;
}
.dark .hd {
    --hd-card: var(--gray-900);
    --hd-border: color-mix(in oklab, var(--gray-700) 80%, transparent);
    --hd-soft: color-mix(in oklab, var(--gray-800) 80%, transparent);
    --hd-text: var(--gray-50);
    --hd-muted: var(--gray-400);
    --hd-accent: var(--primary-400);
    --hd-up: #4ade80;
    --hd-down: #f87171;
    --hd-warn: #fbbf24;
    --hd-avg: #a78bfa;
}
.hd-muted { color: var(--hd-muted); }
.hd-small { font-size: .8rem; line-height: 1.35; }
.hd .is-up { color: var(--hd-up); }
.hd .is-down { color: var(--hd-down); }
.hd-warn { color: var(--hd-warn); }
.hd-warn { font-size: .85rem; margin: 0; }

.hd-card { background: var(--hd-card); border: 1px solid var(--hd-border); border-radius: 16px; padding: 14px; min-width: 0; }
.hd-card h2 { font-size: 1.25rem; font-weight: 750; margin: 0; }
.hd-card h3 { font-size: 1rem; font-weight: 700; margin: 0 0 8px; }

/* The import state under the title (outside .hd: its own colours) and what the last one could not do. */
.hd-spin { display: inline-block; vertical-align: -2px; width: 14px; height: 14px; border-radius: 50%;
    border: 2px solid var(--gray-300); border-top-color: var(--primary-500); animation: hd-spin .8s linear infinite; }
@keyframes hd-spin { to { transform: rotate(360deg); } }
.hd-errors { margin: 0; padding: 8px 12px; border-radius: 12px; list-style: none; font-size: .85rem;
    background: color-mix(in oklab, var(--hd-down) 10%, transparent); color: var(--hd-down); }
.hd-errors li + li { margin-top: 4px; }

/* «Обзор»: a tile per coin, opening its page. */
.hd-tiles { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hd-tile { display: flex; flex-direction: column; gap: 2px; color: inherit; text-decoration: none; transition: border-color .15s; }
.hd-tile:hover, .hd-tile:focus-visible { border-color: var(--hd-accent); }
.hd-tile-coin { font-size: .85rem; font-weight: 700; color: var(--hd-muted); }
.hd-tile b { font-size: 1.35rem; font-weight: 750; letter-spacing: -.01em; overflow-wrap: anywhere; }
.hd-tile-avg { font-size: .95rem; }
@media (min-width: 640px) { .hd-tile b { font-size: 1.75rem; } .hd-tile { padding: 18px; } }

/* The page of a coin. */
.hd-coin header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.hd-back { font-size: .9rem; color: var(--hd-muted); text-decoration: none; }
.hd-back:hover { color: var(--hd-accent); }
.hd-price { font-size: 1.05rem; font-weight: 650; }
.hd-big { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.hd-big div { background: var(--hd-soft); border-radius: 12px; padding: 8px 10px; min-width: 0; }
.hd-big span { display: block; font-size: .72rem; color: var(--hd-muted); }
.hd-big b { display: block; font-size: .9rem; font-weight: 700; letter-spacing: -.01em; overflow-wrap: anywhere; }
@media (min-width: 400px) { .hd-big b { font-size: 1rem; } }
.hd-dl { margin: 0; display: grid; gap: 4px; font-size: .9rem; }
.hd-dl > div { display: flex; justify-content: space-between; gap: 10px; }
.hd-dl dt { color: var(--hd-muted); }
.hd-dl dd { margin: 0; text-align: right; font-weight: 600; }
.hd-dl small { color: var(--hd-muted); font-weight: 400; }
.hd-dl .is-diff dd { color: var(--hd-warn); }
.hd-dl.is-compact { font-size: .85rem; }
.hd-parts { margin: -2px 0 2px; text-align: right; font-size: .75rem; color: var(--hd-muted); }
.hd-why { margin: -2px 0 2px; font-size: .78rem; line-height: 1.35; color: var(--hd-muted); }
.hd-why a { text-decoration: underline; }
.hd-whatif { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--hd-border); font-size: .9rem; }
.hd-whatif input { width: 6.5em; padding: 4px 8px; border-radius: 8px; border: 1px solid var(--hd-border); background: var(--hd-soft); color: inherit; font: inherit; }
.hd-whatif small { color: var(--hd-muted); }

/* Per place. */
.hd-places { display: grid; gap: 12px; grid-template-columns: 1fr; }
.hd-row-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin-bottom: 4px; }
.hd-row-head h3 { margin: 0; }
.hd-row-head span { font-size: .8rem; color: var(--hd-muted); }
.hd-place .hd-small { margin: 10px 0 0; }

/* The chart. */
.hd-chart header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.hd-chart h3 { margin: 0; }
.hd-tabs { display: inline-flex; background: var(--hd-soft); border-radius: 10px; padding: 3px; }
.hd-tabs button { padding: 4px 14px; border-radius: 8px; font-size: .85rem; font-weight: 600; color: var(--hd-muted); }
.hd-tabs button.is-on { background: var(--hd-card); color: var(--hd-text); box-shadow: 0 1px 2px rgb(0 0 0 / .12); }
.hd-svg { width: 100%; height: auto; display: block; }
.hd-svg.is-desktop { display: none; }
@media (min-width: 640px) {
    .hd-svg.is-phone { display: none; }
    .hd-svg.is-desktop { display: block; }
}
.hd-grid { stroke: var(--hd-border); stroke-width: 1; vector-effect: non-scaling-stroke; }
.hd-axis { fill: var(--hd-muted); font-size: 11px; }
.hd-line-price { fill: none; stroke: var(--gray-400); stroke-width: 1.6; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.hd-line-avg { fill: none; stroke: var(--hd-avg); stroke-width: 2; stroke-dasharray: 6 4; vector-effect: non-scaling-stroke; }
.hd-buy path { fill: var(--hd-up); }
.hd-sell path { fill: var(--hd-down); }
.hd-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 6px 0 0; font-size: .78rem; color: var(--hd-muted); }
.hd-legend span { display: inline-block; margin-right: -6px; }
.hd-key-price, .hd-key-avg { width: 16px; height: 0; border-top: 2px solid var(--gray-400); }
.hd-key-avg { border-top: 2px dashed var(--hd-avg); }
.hd-key-buy { color: var(--hd-up); }
.hd-key-sell { color: var(--hd-down); }

@media (min-width: 640px) {
    .hd-places { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
