/* asicprofit theme: the live site's tokens (shadcn/Tailwind: primary hsl(152.3 100% 38.4%) = #00c469, Inter, radius .75rem,
   gray-950 text, orange-600 page titles, green profit cells). Only light polish on top: sticky header, steadier spacing,
   visible keyboard focus. Change colours or layout only after asking. */
:root {
  --background: 0 0% 100%;
  --foreground: 224 71.4% 4.1%;
  --muted: 220 14.3% 95.9%;
  --muted-foreground: 220 8.9% 46.1%;
  --border: 220 13% 91%;
  --input: 220 13% 91%;
  --field-border: 220 13% 78%;   /* form fields: a step darker than --input so empty fields are visible */
  --card: 0 0% 100%;
  --primary: 152.3 100% 38.4%;
  --primary-foreground: 210 20% 98%;
  --destructive: 0 84.2% 60.2%;
  --radius: .75rem;
  --title: #ea580c;              /* orange-600 page titles */
  --gray-50: #f9fafb; --gray-100: #f3f4f6; --gray-200: #e5e7eb; --gray-300: #d1d5db; --gray-500: #6b7280; --gray-700: #374151;
  --green-300: #86efac; --green-400: #4ade80; --green-500: #22c55e; --green-600: #16a34a; --green-700: #15803d;
  --amber-500: #f59e0b; --red-500: #ef4444; --red-100: #fee2e2; --amber-100: #fef3c7; --green-100: #dcfce7;
  --font: "Inter", "Inter Fallback", system-ui, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --wrap: 1600px;   /* owner 16 Oct: wider on desktop (was 1336) */
  color-scheme: light;
}
:root[data-theme="dark"] {
  --background: 224 71% 4%;
  --foreground: 213 31% 91%;
  --muted: 223 47% 11%;
  --muted-foreground: 215.4 16.3% 56.9%;
  --border: 216 34% 17%;
  --input: 216 34% 17%;
  --field-border: 216 25% 28%;
  --card: 224 71% 4%;
  --gray-50: #0b1222; --gray-100: #111a2e; --gray-200: #1d283a; --gray-300: #2a3850; --gray-500: #94a3b8; --gray-700: #cbd5e1;
  --red-100: #3b1414; --amber-100: #3a2a0b; --green-100: #0f2d1c;
  color-scheme: dark;
}
/* light is the default, as on the live site; dark only when the visitor switches to it */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* an element with the hidden attribute stays hidden even when a class gives it display:flex/grid (Show more buttons, tiles) */
[hidden] { display: none !important; }
body { margin: 0; background: hsl(var(--background)); color: hsl(var(--foreground)); font: 400 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
a:hover { color: hsl(var(--primary)); }
p a, .prose a, .link { color: hsl(var(--primary)); }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid hsl(var(--primary)); outline-offset: 2px; border-radius: 4px; }
button, input, select, textarea { font: inherit; color: inherit; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.muted { color: hsl(var(--muted-foreground)); }
.small { font-size: 13px; }
.mono { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- header ---------- */
.topbar { border-bottom: 1px solid hsl(var(--border)); }
.topbar .wrap { display: flex; justify-content: flex-end; gap: 14px; padding-top: 6px; padding-bottom: 6px; }
.topbar a { color: hsl(var(--foreground)); display: inline-flex; padding: 8px; margin: -8px; }   /* 32 px tap area, same look */
.topbar svg { width: 16px; height: 16px; }
.hdr { position: sticky; top: 0; z-index: 40; background: hsl(var(--background) / .9); backdrop-filter: blur(12px); border-bottom: 2px solid hsl(var(--border)); }
.hdr .wrap { display: flex; align-items: center; gap: 16px; height: 64px; }
.logo { display: inline-flex; color: hsl(var(--foreground)); flex: none; }
.logo svg { width: 130px; height: auto; }
.nav { display: flex; gap: 2px; padding: 4px 8px; border: 1px solid hsl(var(--border)); border-radius: 9999px; margin-left: 24px; }
.nav a, .nav summary { padding: 6px 8px; font-weight: 500; font-size: 14px; border-radius: 9999px; cursor: pointer; white-space: nowrap; }
.nav a[aria-current="page"] { color: hsl(var(--primary)); }
.nav details { position: relative; }
.nav summary { list-style: none; display: inline-flex; align-items: center; gap: 4px; }
.nav summary::-webkit-details-marker { display: none; }
.nav summary::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); }
.nav .menu { position: absolute; top: calc(100% + 8px); left: 0; min-width: 190px; background: hsl(var(--background)); border: 1px solid hsl(var(--border)); border-radius: var(--radius); box-shadow: 0 10px 30px rgba(0,0,0,.08); padding: 6px; display: grid; }
.nav .menu a { border-radius: 8px; padding: 8px 10px; }
.nav .menu a:hover { background: hsl(var(--muted)); }
.nav .menu .menu-sep { border: 0; border-top: 2px solid hsl(var(--primary)); margin: 6px 10px; }
.ctl { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.ctl select, .ctl input { height: 36px; border: 1px solid hsl(var(--input)); border-radius: 8px; background: transparent; padding: 0 10px; font-size: 14px; }
.ctl input { width: 92px; }
.ctl .unit { font-size: 15px; }
.ctl svg { width: 20px; height: 20px; flex: none; }
.ctl .desk { display: contents; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 16px; border-radius: 8px; border: 1px solid hsl(var(--input)); background: hsl(var(--background)); font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; }
.btn:hover { background: hsl(var(--muted)); color: inherit; }
.btn.primary { background: hsl(var(--primary)); border-color: hsl(var(--primary)); color: #fff; }
.btn.primary:hover { filter: brightness(.95); color: #fff; }
.btn.danger { color: var(--red-500); }
.btn.small { height: 30px; padding: 0 10px; font-size: 13px; }
.btn.lg { height: 44px; padding: 0 22px; font-size: 15px; }
.icon-btn { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid hsl(var(--input)); border-radius: 8px; background: transparent; cursor: pointer; }
.burger { display: none; }

/* ---------- page ---------- */
main { min-height: 60vh; }
.head { padding: 48px 0 20px; }
h1.title { color: var(--title); font-weight: 400; font-size: 32px; line-height: 1.2; margin: 0 0 18px; letter-spacing: -.01em; }
.lead { font-size: 16px; margin: 0; }
.lead + .muted { margin: 2px 0 0; }
h2 { font-size: 20px; font-weight: 600; margin: 0 0 14px; }
h3 { font-size: 16px; font-weight: 600; margin: 0 0 10px; }
.section { padding: 28px 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { border: 1px solid hsl(var(--border)); border-radius: var(--radius); background: hsl(var(--card)); padding: 20px; }
.card.flat { padding: 0; overflow: hidden; }
.crumbs { font-size: 14px; color: hsl(var(--muted-foreground)); margin: 24px 0 0; display: flex; gap: 6px; flex-wrap: wrap; }
.crumbs a:hover { color: hsl(var(--primary)); }
.empty { color: hsl(var(--muted-foreground)); padding: 24px; text-align: center; }
.notice { border: 1px solid hsl(var(--border)); background: var(--gray-50); border-radius: var(--radius); padding: 14px 16px; font-size: 14px; }
.notice.warn { background: var(--amber-100); border-color: transparent; }
.notice.ok { background: var(--green-100); border-color: transparent; }
.notice.bad { background: var(--red-100); border-color: transparent; }

/* search + coin chips (as on the live homepage) */
.searchrow { display: flex; align-items: center; gap: 12px; margin: 22px 0 18px; }
.searchrow svg { width: 22px; height: 22px; flex: none; }
.input { height: 36px; border: 1px solid hsl(var(--input)); border-radius: 8px; padding: 0 12px; background: transparent; width: 100%; max-width: 288px; font-size: 14px; }
textarea.input { height: auto; padding: 10px 12px; max-width: none; }
.reset { margin-left: auto; width: 40px; height: 40px; border-radius: 8px; border: 0; background: var(--red-500); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.chips { display: flex; flex-wrap: wrap; gap: 14px 16px; margin-bottom: 20px; }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border: 1px solid var(--gray-300); border-radius: 6px; font-size: 16px; font-weight: 400; cursor: pointer; background: transparent; }
.chip img { width: 22px; height: 22px; border-radius: 50%; }
.chip[aria-pressed="true"] { background: var(--green-100); border-color: var(--green-600); color: var(--green-700); }
.adv { margin: 0 0 18px; }
.adv summary { font-weight: 600; font-size: 16px; cursor: pointer; display: inline-flex; gap: 8px; align-items: center; }
.adv .fields { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 12px; align-items: end; }
.adv label { display: grid; gap: 4px; font-size: 13px; color: hsl(var(--muted-foreground)); }
.adv input, .adv select { height: 34px; border: 1px solid hsl(var(--input)); border-radius: 8px; padding: 0 10px; background: transparent; width: 120px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }

/* ---------- tables ---------- */
.tablewrap { overflow-x: auto; border-radius: 6px; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
.t th { background: var(--gray-50); text-align: left; font-weight: 500; color: hsl(var(--muted-foreground)); padding: 8px 8px; white-space: nowrap; border-bottom: 1px solid var(--gray-200); }
.t th[data-sort] { cursor: pointer; user-select: none; }
.t th[data-sort]::after { content: " ⇅"; opacity: .55; }
.t th[aria-sort="descending"]::after { content: " ↓"; opacity: 1; }
.t th[aria-sort="ascending"]::after { content: " ↑"; opacity: 1; }
.t th a.srt, .srtbar a.srt { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.t th a.srt:hover, .srtbar a.srt:hover { color: hsl(var(--foreground)); }
.t th a.srt i, .srtbar a.srt i { font-style: normal; opacity: .4; font-size: 12px; }
.t th[aria-sort] a.srt { color: hsl(var(--foreground)); } .t th[aria-sort] a.srt i, .srtbar a.srt.on i { opacity: 1; }
.t th.num a.srt { flex-direction: row-reverse; }
.t th:has(> a.srt)::after { content: none; }
.srtbar { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin: 4px 0 8px; }
.srtbar a.srt.on { color: hsl(var(--foreground)); font-weight: 600; }
.t td { padding: 5px 8px; border-bottom: 1px solid var(--gray-200); white-space: nowrap; }   /* thinner rows (16 Oct) */
.t tbody tr:hover td { background: var(--gray-50); }
.t td.model { white-space: normal; min-width: 260px; }
.t td.model img { width: 20px; height: 20px; object-fit: contain; display: inline-block; vertical-align: middle; margin-right: 8px; }
.t td.num, .t th.num { text-align: right; font-variant-numeric: tabular-nums; }
/* profit cell: solid green the way the live site shows it, lighter down the ranking, red when negative */
.t td.profit { text-align: center; font-weight: 600; color: #111827; background: var(--green-400); min-width: 150px; }
.t td.profit.p1 { background: var(--green-500); }
.t td.profit.p2 { background: var(--green-400); }
.t td.profit.p3 { background: var(--green-300); }
.t td.profit.p4 { background: color-mix(in srgb, var(--green-300) 50%, transparent); }
.t td.profit.neg { background: var(--red-100); color: var(--red-500); }
.t tbody tr:hover td.profit { filter: brightness(.97); }
.t .rel-new { color: var(--green-500); }
.t .rel-mid { color: var(--amber-500); }
.t .coins img { width: 18px; height: 18px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }
.more { display: flex; justify-content: center; padding: 18px; }
.more[hidden] { display: none; }

/* ---------- miner page ---------- */
.hero { display: grid; grid-template-columns: 340px 1fr; gap: 28px; align-items: start; }
.hero .pic { border: 1px solid hsl(var(--border)); border-radius: var(--radius); padding: 18px; background: #fff; display: flex; align-items: center; justify-content: center; aspect-ratio: 4/3; }
.hero .pic img { max-height: 100%; object-fit: contain; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.kpi { border: 1px solid hsl(var(--border)); border-radius: var(--radius); padding: 14px 16px; }
.kpi .v { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.kpi .l { font-size: 13px; color: hsl(var(--muted-foreground)); }
.kpi.good .v { color: var(--green-600); }
.kpi.bad .v { color: var(--red-500); }
.split { height: 8px; border-radius: 9999px; background: var(--red-100); overflow: hidden; margin: 14px 0 4px; }
.split > span { display: block; height: 100%; background: var(--green-500); }
.specs { display: grid; grid-template-columns: 1fr 1fr; }
.specs div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--gray-200); font-size: 14px; }
.specs div > span:first-child { color: hsl(var(--muted-foreground)); }
.specs div:nth-child(odd) { margin-right: 24px; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 9999px; background: var(--gray-100); color: var(--gray-700); white-space: nowrap; }
.badge.ok { background: var(--green-100); color: var(--green-700); }
.badge.warn { background: var(--amber-100); color: #92400e; }
.badge.bad { background: var(--red-100); color: var(--red-500); }
.seller { display: flex; align-items: center; gap: 10px; }
.seller img { width: 28px; height: 28px; object-fit: contain; border-radius: 6px; background: #fff; border: 1px solid var(--gray-200); }
.cta { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; border: 1px dashed var(--green-600); background: var(--green-100); border-radius: var(--radius); padding: 18px 20px; }
.cta b { font-size: 16px; }
.coinlist { display: flex; flex-wrap: wrap; gap: 10px; }
.chart { width: 100%; height: 220px; display: block; }
.chart .grid { stroke: var(--gray-200); }
.chart .line { fill: none; stroke: var(--green-500); stroke-width: 2; }
.chart .line2 { fill: none; stroke: var(--amber-500); stroke-width: 2; }
.chart .area { fill: color-mix(in srgb, var(--green-400) 45%, transparent); }
.chart text { font-size: 11px; fill: hsl(var(--muted-foreground)); }

/* calculator */
.calc { display: grid; grid-template-columns: 340px 1fr; gap: 24px; align-items: start; }
.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 6px; font-size: 14px; font-weight: 500; }
.form .row { display: flex; gap: 8px; }
.form input, .form select, .form textarea { height: 38px; border: 1px solid hsl(var(--field-border, var(--input))); border-radius: 8px; padding: 0 12px; background: transparent; width: 100%; }
.form textarea { height: auto; padding: 10px 12px; min-height: 90px; }
.form .hint { font-size: 12px; font-weight: 400; color: hsl(var(--muted-foreground)); }
.form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.periods { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }

/* hosting */
.tabs { display: inline-flex; gap: 4px; padding: 4px; background: hsl(var(--muted)); border-radius: 10px; margin-bottom: 18px; }
.tabs a, .tabs button { padding: 6px 14px; border-radius: 8px; font-weight: 500; font-size: 14px; border: 0; background: transparent; cursor: pointer; }
.tabs [aria-current="true"], .tabs [aria-selected="true"] { background: hsl(var(--background)); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.pcard { display: grid; gap: 12px; }
.pcard .top { display: flex; align-items: center; gap: 12px; }
.pcard .top img { width: 44px; height: 44px; object-fit: contain; border-radius: 8px; border: 1px solid var(--gray-200); background: #fff; }
.meter { height: 6px; background: var(--gray-200); border-radius: 9999px; overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--green-500); }
#map { min-height: 200px; border-radius: var(--radius); border: 1px solid hsl(var(--border)); }
/* our own world map (/static/map.js + /static/world-map.json): sea, land, hosting countries, brand pins */
.wm { position: relative; overflow: hidden; background: hsl(var(--primary) / .05); touch-action: none; user-select: none; }
.wm-svg { display: block; width: 100%; height: auto; cursor: grab; }
.wm-svg:active { cursor: grabbing; }
.wm-land path { fill: var(--gray-200); stroke: hsl(var(--background)); stroke-width: .7; vector-effect: non-scaling-stroke; transition: fill .15s; }
.wm-land path.on { fill: hsl(var(--primary) / .28); }
.wm-land path:hover { fill: var(--gray-300, #d1d5db); }
.wm-land path.on:hover { fill: hsl(var(--primary) / .4); }
.wm-pin { cursor: pointer; outline: none; }
.wm-halo { fill: hsl(var(--primary) / .22); }
.wm-dot { fill: hsl(var(--primary)); stroke: hsl(var(--background)); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.wm-pin:hover .wm-halo, .wm-pin:focus-visible .wm-halo, .wm-pin.sel .wm-halo { fill: hsl(var(--primary) / .4); }
.wm-pin:focus-visible .wm-dot { stroke: hsl(var(--foreground)); }
.wm-n { fill: hsl(var(--primary-foreground)); font-weight: 700; pointer-events: none; }
.wm-ctl { position: absolute; top: 10px; left: 10px; display: grid; border: 1px solid hsl(var(--border)); border-radius: 8px; overflow: hidden; background: hsl(var(--background)); box-shadow: 0 1px 3px rgb(0 0 0 / .08); }
.wm-ctl button { width: 32px; height: 32px; border: 0; background: none; color: hsl(var(--foreground)); font: 600 16px/1 inherit; cursor: pointer; }
.wm-ctl button + button { border-top: 1px solid hsl(var(--border)); }
.wm-ctl button:hover { background: var(--gray-50); }
.wm-credit { position: absolute; right: 8px; bottom: 6px; font-size: 11px; color: hsl(var(--muted-foreground)); }
.wm-card { position: absolute; z-index: 3; width: min(280px, calc(100% - 16px)); max-height: calc(100% - 16px); overflow: auto; padding: 10px 12px; background: hsl(var(--background)); border: 1px solid hsl(var(--border)); border-radius: 10px; box-shadow: 0 10px 30px rgb(0 0 0 / .14); }
.wm-row { display: grid; gap: 2px; padding: 8px 24px 8px 0; color: inherit; text-decoration: none; }
.wm-row + .wm-row { border-top: 1px solid hsl(var(--border)); }
.wm-row span { font-size: 13px; color: hsl(var(--muted-foreground)); }
.wm-row:hover b { color: hsl(var(--primary)); }
.wm-x { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border: 0; border-radius: 50%; background: var(--gray-50); color: inherit; cursor: pointer; }

/* blog / prose */
.prose { max-width: 760px; font-size: 16px; line-height: 1.7; }
.prose h2 { font-size: 22px; margin: 30px 0 10px; }
.prose h3 { font-size: 18px; margin: 24px 0 8px; }
.prose img { border-radius: var(--radius); }
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.post { display: grid; gap: 8px; }
.post .date { font-size: 13px; color: hsl(var(--muted-foreground)); }
.post b { font-size: 17px; }
/* question lists on calculator pages: same look as the FAQ page (card, +/− icon) */
details.faq { border: 1px solid var(--gray-200); border-radius: 12px; padding: 0 16px; background: hsl(var(--background)); transition: border-color .2s; }
details.faq + details.faq { margin-top: 8px; }
details.faq[open] { border-color: hsl(var(--primary) / .45); }
details.faq summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 14px 0; font-weight: 600; cursor: pointer; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; flex: none; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--gray-50); border: 1px solid var(--gray-200); font-weight: 500; }
details.faq[open] summary::after { content: "−"; background: hsl(var(--primary)); border-color: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }
details.faq > :not(summary) { margin-top: 0; padding-bottom: 14px; }

/* account + admin forms */
.panel { display: grid; grid-template-columns: 220px 1fr; gap: 28px; align-items: start; padding: 28px 0 60px; }
.side { display: grid; gap: 2px; position: sticky; top: 90px; }
.side a { padding: 8px 12px; border-radius: 8px; font-weight: 500; font-size: 14px; }
.side a[aria-current="page"] { background: hsl(var(--muted)); color: hsl(var(--primary)); }
.steps { display: grid; gap: 10px; counter-reset: s; padding: 0; margin: 0; list-style: none; }
.steps li { counter-increment: s; display: flex; gap: 12px; align-items: flex-start; }
.steps li::before { content: counter(s); width: 26px; height: 26px; border-radius: 50%; background: var(--green-100); color: var(--green-700); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: none; font-size: 13px; }
.steps li.done::before { content: "✓"; background: var(--green-500); color: #fff; }

/* ---------- footer ---------- */
.ftr { border-top: 1px solid hsl(var(--border)); margin-top: 60px; padding: 40px 0; font-size: 14px; }
.ftr .wrap { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 24px; }
.ftr h2 { margin: 0 0 10px; font-size: 15px; font-weight: 600; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 8px 14px; border-radius: 8px; background: hsl(var(--foreground)); color: hsl(var(--background)); text-decoration: none; }
.skip:focus { top: 12px; }
main:focus { outline: none; }
.ftr ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ftr .logo svg { width: 120px; }
.ftr p { color: hsl(var(--muted-foreground)); margin: 10px 0; max-width: 300px; }

/* compare tray */
.tray { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); background: hsl(var(--foreground)); color: hsl(var(--background)); border-radius: 9999px; padding: 8px 8px 8px 18px; display: none; align-items: center; gap: 12px; z-index: 50; box-shadow: 0 10px 30px rgba(0,0,0,.2); font-size: 14px; }
.tray.on { display: flex; }
.tray #trayN { white-space: nowrap; }
.tray .btn:not(.primary) { background: transparent; color: inherit; border-color: rgb(255 255 255 / .35); }   /* "Clear" on the dark pill (was white on white) */

/* ---------- small screens ---------- */
@media (max-width: 1100px) {
  .nav, .ctl .desk { display: none; }
  .burger { display: inline-flex; margin-left: auto; }
  /* open menu: one panel under the logo row: settings (currency, power price, language, theme), then the navigation */
  .hdr.open { max-height: 100dvh; overflow-y: auto; }
  .hdr.open .wrap { flex-wrap: wrap; height: auto; min-height: 64px; row-gap: 0; padding-bottom: 12px; }
  .hdr.open .logo { height: 64px; display: flex; align-items: center; }
  .hdr.open .ctl { display: contents; }
  .hdr.open .ctl > .btn { order: 1; margin-left: auto; }
  .hdr.open .burger { order: 2; margin-left: 8px; }
  .hdr.open .ctl .desk { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; order: 3; flex-basis: 100%; padding: 12px 0; border-top: 1px solid hsl(var(--border)); }
  .hdr.open .ctl .desk select, .hdr.open .ctl .desk input { height: 40px; }
  .hdr.open .nav { display: grid; order: 4; flex-basis: 100%; margin: 0; padding: 4px 0 0; border: 0; border-radius: 0; background: none; gap: 2px; }
  .hdr.open .nav > a, .hdr.open .nav summary { padding: 10px 4px; font-size: 16px; }
  .hdr.open .nav .menu { position: static; box-shadow: none; border: 0; padding: 0 0 6px 12px; min-width: 0; background: none; }
  .hero, .calc, .grid2 { grid-template-columns: minmax(0, 1fr); }
  .grid3, .posts { grid-template-columns: 1fr 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .ftr .wrap { grid-template-columns: 1fr 1fr; }
  .panel { grid-template-columns: minmax(0, 1fr); }   /* not 1fr: the side menu strip would widen the page instead of scrolling */
  .side { position: static; display: flex; overflow-x: auto; min-width: 0; scrollbar-width: thin; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .head { padding: 28px 0 12px; }
  h1.title { font-size: 26px; }
  .grid3, .posts, .specs, .periods { grid-template-columns: 1fr; }
  .specs div:nth-child(odd) { margin-right: 0; }
  .chips { gap: 8px; }
  .chip { font-size: 14px; height: 34px; }
  /* lists on phones (16 Oct): compact two-line rows inside the card instead of a tall card per row.
     Line 1: the name, and the headline figure on the right (.profit, or .lead where there is no profit).
     Line 2: the small figures, then .price on the right (.buy after it). Labels show only on cells marked .lbl
     (e.g. ROI's "111 days"); self-explanatory values (25 TH/s, 3,400 W, a date, an algorithm) go without. */
  table.t.cards thead { display: none; }
  table.t.cards, table.t.cards tbody { display: block; }
  table.t.cards tr { display: flex; flex-wrap: wrap; align-items: center; column-gap: 8px; row-gap: 2px; padding: 7px 12px; border-bottom: 1px solid var(--gray-200); }
  table.t.cards tbody tr:last-child { border-bottom: 0; }
  table.t.cards tr[hidden] { display: none; }   /* "Load more" rows: the flex display above must not undo [hidden] */
  table.t.cards tr::after { content: ""; order: 2; flex-basis: 100%; height: 0; }   /* ends line 1 */
  table.t.cards td { order: 3; display: inline-flex; align-items: baseline; gap: 4px; border: 0; padding: 0; min-width: 0; font-size: 12.5px; line-height: 1.35; white-space: nowrap; text-align: left; color: hsl(var(--muted-foreground)); font-variant-numeric: tabular-nums; }
  table.t.cards td.lbl::before { content: attr(data-l); font-size: 12px; opacity: .85; }
  table.t.cards td.model { order: 0; flex: 1 1 0; display: flex; align-items: center; gap: 8px; white-space: normal; font-size: 15px; font-weight: 600; line-height: 1.25; color: hsl(var(--foreground)); }
  table.t.cards td.model img { width: 20px; height: 20px; flex: none; object-fit: contain; }
  table.t.cards td.profit, table.t.cards td.lead { order: 1; flex: none; font-size: 14px; font-weight: 700; }
  table.t.cards td.profit { padding: 3px 8px; border-radius: 7px; color: #111827; }   /* dark text on the green tiers, as on desktop */
  table.t.cards td.profit.neg { color: var(--red-500); }
  table.t.cards td.lead { color: hsl(var(--foreground)); }
  table.t.cards td.price { order: 4; margin-left: auto; font-size: 14px; font-weight: 700; color: hsl(var(--foreground)); }
  table.t.cards td.model { font-size: 14.5px; }
  table.t.cards td.buy { order: 5; }
  table.t.cards td.buy:empty { display: none; }
  table.t.cards td.hide-m { display: none; }
  .ftr .wrap { grid-template-columns: 1fr; }
}

/* admin filter bar: search + dropdowns that apply on change */
.fbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin: 6px 0 16px; padding: 12px; border: 1px solid hsl(var(--border)); border-radius: var(--radius); background: var(--gray-50); }
.fbar .input { max-width: 260px; height: 34px; background: hsl(var(--background)); }
.fbar .fsel { display: grid; gap: 3px; font-size: 12px; color: hsl(var(--muted-foreground)); }
.fbar select { height: 34px; border: 1px solid hsl(var(--input)); border-radius: 8px; padding: 0 8px; background: hsl(var(--background)); font-size: 13px; min-width: 130px; }
.fbar .fsel.on select { border-color: hsl(var(--primary)); box-shadow: 0 0 0 2px color-mix(in srgb, hsl(var(--primary)) 20%, transparent); }
.fbar .fcount { margin-left: auto; align-self: center; }
.tabsline { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 14px; }
.tabsline a { padding: 6px 12px; border-radius: 9999px; border: 1px solid var(--gray-300); font-size: 13px; font-weight: 500; }
.tabsline a[aria-current="true"] { background: hsl(var(--foreground)); color: hsl(var(--background)); border-color: hsl(var(--foreground)); }

/* admin blog editor */
.pe-toolbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 6px; }
.pe-cover { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.pe-cover-img { width: 220px; aspect-ratio: 16 / 9; border: 1px dashed var(--gray-300); border-radius: 10px; display: grid; place-items: center; overflow: hidden; background: var(--gray-50); }
.pe-cover-img img { width: 100%; height: 100%; object-fit: cover; }

/* admin lists: filter tiles, selection, bulk bar, pager, detail panel, notes, timeline, alerts */
.admin-main { min-width: 0; }
.ktiles { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); margin: 4px 0 14px; }
.ktiles a.kpi { transition: border-color .15s, background .15s; }
.ktiles a.kpi:hover { border-color: var(--gray-300); background: var(--gray-50); }
.ktiles .kpi.on { border-color: hsl(var(--primary)); box-shadow: inset 0 0 0 1px hsl(var(--primary)); }
.ktiles .kpi.on .l { color: hsl(var(--primary)); }
table.rows tbody tr[data-detail] { cursor: pointer; }
table.rows tbody tr[data-detail]:hover { background: var(--gray-50); }
table.rows tbody tr.sel-on { background: var(--amber-100); }
th.sel, td.sel { width: 34px; padding-right: 0; }
.bulkbar { position: sticky; top: 72px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 10px; padding: 10px 12px;
  border-radius: var(--radius); background: hsl(var(--foreground)); color: hsl(var(--background)); }
.bulkbar[hidden] { display: none; }
.bulkbar b { margin-right: 6px; font-size: 14px; }
.bulkbar .btn:not(.danger) { color: hsl(var(--foreground)); background: hsl(var(--background)); }
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.pager-nav { display: inline-flex; align-items: center; gap: 8px; }
dialog.dpanel { width: min(720px, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0 0 0 auto; padding: 22px 24px 40px; border: 0;
  border-left: 1px solid hsl(var(--border)); background: hsl(var(--background)); color: hsl(var(--foreground)); overflow-y: auto; box-shadow: -12px 0 40px rgb(0 0 0 / .18); }
dialog.dpanel::backdrop { background: rgb(0 0 0 / .35); }
dialog.dpanel .x { position: sticky; top: 0; float: right; width: 34px; height: 34px; border-radius: 9999px; border: 1px solid hsl(var(--border)); background: hsl(var(--background)); font-size: 20px; line-height: 1; cursor: pointer; color: inherit; }
dialog.dpanel h3 { font-size: 15px; margin: 22px 0 8px; }
.dhead h2 { margin: 0 40px 4px 0; font-size: 20px; }
.dlinks, .dact { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0; }
.dkv { grid-template-columns: 1fr 1fr; margin: 12px 0; }
.dform { margin: 12px 0; }
.dform .row { display: flex; gap: 6px; margin-top: 4px; }
.dlist { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 14px; }
.dnote { margin-top: 22px; padding: 12px; border-radius: var(--radius); background: var(--amber-100); }
.dnote textarea { width: 100%; margin-top: 6px; border-radius: 8px; border: 1px solid var(--gray-300); padding: 8px; font: inherit; background: hsl(var(--background)); color: inherit; }
.dtime ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid hsl(var(--border)); }
.dtime li { padding: 4px 0 8px 12px; font-size: 14px; }
.badge[hidden] { display: none; }
.alerts { display: flex; flex-wrap: wrap; gap: 8px; }
.alerts:not(:empty) { margin-bottom: 14px; }
.chip-alert { padding: 4px 12px; border-radius: 9999px; background: var(--amber-100); color: #92400e; font-size: 13px; font-weight: 600; }
.chip-alert:hover { text-decoration: underline; }
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 60; padding: 12px 16px; border-radius: var(--radius); background: hsl(var(--foreground)); color: hsl(var(--background)); font-weight: 500; box-shadow: 0 8px 24px rgb(0 0 0 / .25); }
@media (max-width: 640px) { .dkv { grid-template-columns: 1fr; } dialog.dpanel { padding: 18px 16px 32px; } }

/* required fields */
.req { color: var(--red-500); font-weight: 600; margin-left: 2px; }
.form input:focus-visible, .form select:focus-visible, .form textarea:focus-visible { outline: 2px solid hsl(var(--primary)); outline-offset: 0; border-color: transparent; }
.form fieldset { border: 1px solid hsl(var(--border)); border-radius: var(--radius); padding: 14px 16px 16px; display: grid; gap: 14px; margin: 0; }
.form legend { font-weight: 600; padding: 0 6px; }

/* miner page: electricity price right next to the numbers */
.elec-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 16px 0 0; padding: 12px 14px; border: 1px solid hsl(var(--border)); border-radius: var(--radius); background: var(--gray-50); }
.elec-inline .lab { font-weight: 600; font-size: 14px; }
.elec-inline .box { display: inline-flex; align-items: center; gap: 6px; }
.elec-inline input { width: 110px; height: 38px; border: 1px solid hsl(var(--field-border, var(--input))); border-radius: 8px; padding: 0 10px; font: inherit; font-weight: 600; background: hsl(var(--background)); color: inherit; }
.elec-inline .unit { font-size: 14px; color: hsl(var(--muted-foreground)); }

/* admin panel: collapsible action forms (hold, contact) */
.dbox { margin: 10px 0; }
.dbox > summary { list-style: none; display: inline-flex; cursor: pointer; }
.dbox > summary::-webkit-details-marker { display: none; }
.dbox[open] > summary { background: hsl(var(--muted)); }

/* vendor account: messages from us as a pop-up */
.npop-back { position: fixed; inset: 0; z-index: 80; background: rgb(0 0 0 / .45); display: grid; place-items: center; padding: 16px; }
.npop { width: min(560px, 100%); max-height: 85vh; overflow-y: auto; padding: 22px 24px; box-shadow: 0 20px 60px rgb(0 0 0 / .3); background: hsl(var(--background)); }
.npop h2 { margin: 0 0 12px; font-size: 20px; }
.npop-item { border-top: 1px solid hsl(var(--border)); padding: 14px 0 4px; }
.npop-item h3 { margin: 0 0 6px; font-size: 16px; }
.npop-item.hold h3 { color: #92400e; }
.npop-item .row { display: flex; gap: 8px; flex-wrap: wrap; }

/* where am I: admin / my account / admin inside a vendor's account */
.zone { font-size: 13px; line-height: 1.4; }
.zone .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; padding-top: 8px; padding-bottom: 8px; }
.zone b { text-transform: uppercase; letter-spacing: .06em; font-size: 12px; }
.zone a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.zone .zr { margin-left: auto; display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
.zone .zu { opacity: .75; }
.zone-admin { background: hsl(var(--foreground)); color: hsl(var(--background)); }
.zone-acc { background: var(--gray-50); border-bottom: 1px solid hsl(var(--border)); color: hsl(var(--foreground)); }
.zone-acc b { color: hsl(var(--primary)); }
.zone-as { background: var(--red-100); color: var(--red-500); border-bottom: 2px solid var(--red-500); }
/* admin sidebar in the admin colours, so the panel never looks like a vendor's account */
body.z-admin .side { background: hsl(var(--foreground)); border-radius: var(--radius); padding: 8px; }
body.z-admin .side a { color: hsl(var(--background)); opacity: .85; }
body.z-admin .side a:hover { opacity: 1; }
body.z-admin .side a[aria-current="page"] { background: hsl(var(--background) / .14); color: hsl(var(--background)); opacity: 1; }
body.z-admin .side p { color: hsl(var(--background)); opacity: .6; }
body.z-as-admin .panel { outline: 2px dashed var(--red-500); outline-offset: 10px; border-radius: 4px; }
/* staff on public pages */
.staff-pill { position: fixed; left: 16px; bottom: 16px; z-index: 50; display: inline-flex; gap: 8px; align-items: center; padding: 8px 14px; border-radius: 9999px;
  background: hsl(var(--foreground)); color: hsl(var(--background)); font-size: 13px; font-weight: 600; box-shadow: 0 6px 20px rgb(0 0 0 / .25); }
.staff-pill span { font-weight: 400; opacity: .7; }
@media (max-width: 640px) { .zone .zr { margin-left: 0; } .staff-pill { bottom: 74px; } }
.zone-as { font-size: 14px; }
.zone-as .wrap { padding-top: 12px; padding-bottom: 12px; }
.zone-as b { font-size: 13px; }

/* miner page: other batches from the same seller */
.more-opts { margin-top: 4px; font-size: 13px; }
.more-opts summary { cursor: pointer; color: hsl(var(--primary)); font-weight: 600; width: fit-content; }
.more-opts ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.more-opts li { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }

.help-dot { display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; border: 1px solid currentColor; font-size: 10px; font-weight: 700; opacity: .6; cursor: help; vertical-align: 1px; }

/* signed-in identity in the header */
.ubadge { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 9999px; white-space: nowrap; }
.ubadge.seller { background: var(--green-100); color: var(--green-700); }
.ubadge.ver { background: var(--gray-100); color: var(--gray-700); }
.ubadge.staff { background: hsl(var(--foreground)); color: hsl(var(--background)); text-transform: capitalize; }
.acct { position: relative; }
.acct > summary { list-style: none; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px 0 4px; border: 1px solid hsl(var(--border)); border-radius: 9999px; cursor: pointer; background: hsl(var(--background)); max-width: 280px; }
.acct > summary::-webkit-details-marker { display: none; }
.acct > summary:hover, .acct[open] > summary { border-color: hsl(var(--primary)); }
.acct .av { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: hsl(var(--primary)); color: #fff; font-weight: 700; font-size: 14px; flex: none; }
.acct-n { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 120px; }
.acct-menu { position: absolute; right: 0; top: calc(100% + 8px); width: 280px; background: hsl(var(--background)); border: 1px solid hsl(var(--border)); border-radius: var(--radius); box-shadow: 0 14px 40px rgb(0 0 0 / .14); z-index: 60; overflow: hidden; }
.acct-head { display: grid; gap: 2px; padding: 14px 16px; border-bottom: 1px solid hsl(var(--border)); }
.acct-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.acct-sec { display: grid; padding: 6px; border-bottom: 1px solid hsl(var(--border)); margin: 0; }
.acct-sec:last-child { border-bottom: 0; }
.acct-sec .lbl { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: hsl(var(--muted-foreground)); padding: 6px 10px 2px; }
.acct-sec a, .acct-sec button { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 8px; font-size: 14px; color: inherit; background: none; border: 0; font: inherit; font-size: 14px; text-align: left; cursor: pointer; width: 100%; }
.acct-sec a:hover, .acct-sec button:hover { background: hsl(var(--muted)); }
.acct-sec em { font-style: normal; font-size: 12px; color: hsl(var(--muted-foreground)); }
.acct-sec em.on { color: var(--green-700); font-weight: 600; }
.zone .zn { font-weight: 600; }
.zone .zs { opacity: .75; }
@media (max-width: 1100px) {
  .acct-n, .acct > summary .ubadge { display: none; }
  .acct > summary { padding: 0 4px; }
  .hdr.open .ctl > .acct { order: 1; margin-left: auto; }
}

/* admin → widgets: daily loads (bars) with clicks overlaid */
.wbars { display: flex; align-items: flex-end; gap: 3px; height: 110px; padding: 8px; border: 1px solid var(--gray-200); border-radius: 8px; }
.wbars span { flex: 1; height: 100%; position: relative; display: flex; align-items: flex-end; justify-content: center; }
.wbars i { display: block; width: 100%; min-height: 1px; background: var(--gray-200); border-radius: 3px 3px 0 0; }
.wbars b { position: absolute; bottom: 0; width: 45%; background: hsl(var(--primary)); border-radius: 3px 3px 0 0; }
.wkey { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: -1px; margin-left: 6px; }
.wkey.l { background: var(--gray-200); } .wkey.c { background: hsl(var(--primary)); }

/* admin → channels */
.subtabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--gray-200); margin: 4px 0 18px; }
.subtabs a { padding: 8px 14px; color: hsl(var(--muted-foreground)); text-decoration: none; font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.subtabs a:hover { color: hsl(var(--foreground)); }
.subtabs a[aria-current="page"] { color: hsl(var(--foreground)); border-bottom-color: hsl(var(--primary)); }
.chgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.chgrid .card h2 { font-size: 16px; margin: 0 0 8px; }
.chempty { display: flex; flex-direction: column; gap: 6px; justify-content: center; min-height: 200px; padding: 0 12px; border: 1px dashed var(--gray-200); border-radius: 8px; }
.lc-wrap { position: relative; }
.lc { width: 100%; height: auto; display: block; overflow: visible; }
.lc-grid { stroke: var(--gray-200); stroke-width: 1; }
.lc-ax { fill: hsl(var(--muted-foreground)); font-size: 11px; }
.lc-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.lc-cross { stroke: hsl(var(--muted-foreground)); stroke-width: 1; stroke-dasharray: 3 3; }
.lc-dot { stroke: hsl(var(--background)); stroke-width: 2; }
.lc-tip { position: absolute; top: 4px; min-width: 160px; padding: 8px 10px; background: hsl(var(--background)); border: 1px solid var(--gray-200); border-radius: 8px; box-shadow: 0 4px 16px rgb(0 0 0 / .12); font-size: 12px; pointer-events: none; z-index: 2; }
.lc-tip div { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.lc-tip div span { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 600; }
.lc-tip i, .lc-chip i, .pchip i, .chname i, i.dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: none; }
.lc-legend { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.lc-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; font-size: 12px; border: 1px solid var(--gray-200); border-radius: 999px; background: none; color: inherit; cursor: pointer; }
.lc-chip[aria-pressed="false"] { opacity: .45; }
.lc-table summary { cursor: pointer; color: hsl(var(--muted-foreground)); margin-top: 8px; }
.chcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.chcard { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px; text-align: left; border: 1px solid var(--gray-200); border-radius: 10px; background: hsl(var(--background)); color: inherit; font: inherit; cursor: pointer; }
.chcard:hover { border-color: hsl(var(--primary)); }
.chname { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.chbig { font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; margin-top: 4px; }
.pchip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; margin: 2px 8px 2px 0; }
.qpost { display: flex; gap: 10px; align-items: flex-start; }
.qpost img, .qnoimg { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; flex: none; }
.qnoimg { display: grid; place-items: center; background: var(--gray-50); border: 1px solid var(--gray-200); color: hsl(var(--muted-foreground)); font-size: 13px; }
.spplat { display: flex; flex-wrap: wrap; gap: 6px 16px; border: 1px solid var(--gray-200); border-radius: 8px; padding: 10px 12px; margin: 0; }
.spplat legend { padding: 0 4px; font-size: 14px; }
.spplat i.dot { margin-right: 2px; }
#spCount .over { color: var(--red-500); font-weight: 600; }
.flabel { display: block; font-size: 14px; margin-bottom: 6px; }
.spimgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 8px; }
.spimg { display: flex; flex-direction: column; gap: 6px; }
.spimg img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; border: 1px solid var(--gray-200); }
.spprev { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.spcard { border: 1px solid var(--gray-200); border-radius: 10px; padding: 10px 12px; }
.spcard p { white-space: pre-line; font-size: 13px; margin: 6px 0; overflow-wrap: anywhere; }
.sphand { display: flex; flex-direction: column; gap: 8px; }
.sprow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px 0; border-bottom: 1px solid var(--gray-200); }
.sprow > span:first-child { display: inline-flex; align-items: center; gap: 6px; min-width: 100px; font-weight: 500; }
@media (max-width: 900px) { .chgrid { grid-template-columns: 1fr; } }
.qbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 20px 0 12px; }
.qbar-act { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0; }
.qbar-act select { width: auto; max-width: 340px; }
.form .spplat label.check { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; font-weight: 400; margin: 0; }
.form .spplat input[type="checkbox"], .spimg input[type="checkbox"] { width: auto; height: auto; flex: none; margin: 0; }
.form .spimg label.check { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; }
.spcard i.dot, .sprow i.dot { margin-right: 6px; vertical-align: -1px; }

/* admin sidebar: sections with sub-pages fold out (open on the section you're in) */
.side .sgroup summary { list-style: none; display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; border-radius: 8px; font-weight: 500; font-size: 14px; cursor: pointer; }
.side .sgroup summary::-webkit-details-marker { display: none; }
.side .sgroup summary::after { content: ""; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform .15s; margin-right: 2px; }
.side .sgroup[open] summary::after { transform: rotate(45deg); }
.side .ssub { display: grid; gap: 2px; margin: 2px 0 4px 12px; padding-left: 8px; border-left: 1px solid currentColor; border-left-color: hsl(var(--muted-foreground) / .35); }
.side .ssub a { padding: 6px 10px; font-size: 13px; }
body.z-admin .side .sgroup summary { color: hsl(var(--background)); opacity: .85; }
body.z-admin .side .sgroup summary:hover, body.z-admin .side .sgroup summary.on { opacity: 1; }
body.z-admin .side .ssub { border-left-color: hsl(var(--background) / .25); }
@media (max-width: 900px) { .side .sgroup { flex: none; } .side .ssub { margin-left: 0; } }

/* admin → FAQ: questions fold open into their editor */
.afaq-h { font-size: 15px; margin: 22px 0 8px; }
.afaq { border: 1px solid var(--gray-200); border-radius: 10px; background: hsl(var(--background)); }
.afaq + .afaq { margin-top: 6px; }
.afaq summary { list-style: none; display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; cursor: pointer; font-weight: 500; }
.afaq summary::-webkit-details-marker { display: none; }
.afaq[open] { border-color: hsl(var(--primary) / .45); }
.afaq-body { padding: 0 14px 14px; }
.afaq-new { margin: 12px 0 4px; border-style: dashed; }
.afaq-new summary { color: hsl(var(--primary)); font-weight: 600; }
/* map picker in location forms */
.wm-field { border: 1px solid var(--gray-200); border-radius: 10px; padding: 12px; margin: 0; display: grid; gap: 10px; }
.wm-field legend { padding: 0 4px; font-size: 14px; font-weight: 500; }
.wm-pickbox { border-radius: 8px; border: 1px solid hsl(var(--border)); min-height: 120px; }
.wm-pickbox .wm-svg { cursor: crosshair; }
.wm-pick .wm-dot { fill: hsl(var(--primary)); stroke: hsl(var(--background)); stroke-width: 2; vector-effect: non-scaling-stroke; }
.wm-pick .wm-halo { fill: hsl(var(--primary) / .25); }
.wm:not(.wm-pickbox) .wm-land path.on { cursor: pointer; }
.wm-land path.sel { fill: hsl(var(--primary) / .55); }

/* the language menu lists every language in its own script: the system font shows them, so pages don't download
   Inter's Cyrillic, Greek and extended-Latin files (~145 KB) just for this menu */
#lang, #lang option { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
/* phones: the miner list's coin filters become one swipeable row instead of filling the first screen */
@media (max-width: 640px) {
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: -16px; padding-right: 16px; -webkit-overflow-scrolling: touch; }
  .chips::-webkit-scrollbar { display: none; }
  .chips .chip { flex: none; }
}
.wm-hit { fill: transparent; }
/* form needs a correction: pop-up over the page (layout.js errorPopup) */
dialog.err-pop { width: min(460px, calc(100vw - 32px)); padding: 22px 24px; border: 1px solid hsl(var(--border)); border-radius: 14px; background: hsl(var(--background)); color: hsl(var(--foreground)); box-shadow: 0 24px 60px rgb(0 0 0 / .25); }
dialog.err-pop::backdrop { background: rgb(0 0 0 / .4); }
dialog.err-pop h2 { margin: 0 0 8px; font-size: 18px; color: var(--red-500); }
dialog.err-pop p { margin: 0 0 18px; line-height: 1.55; }
dialog.err-pop form { display: flex; justify-content: flex-end; }
/* company type: tick all that apply (a store can also host, a manufacturer can also sell) */
.form fieldset.kinds { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.form fieldset.kinds legend { width: 100%; padding: 0; margin-bottom: 6px; font-size: 14px; font-weight: 500; }
.form fieldset.kinds legend .hint { font-weight: 400; }
/* account side menu: Vendor profile dropdown (Profile, Miners for sale, Hosting offers); app.js opens and closes it */
.side .side-sum { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 8px 12px; border: 0; border-radius: 8px; background: none; color: inherit; font: inherit; font-weight: 500; font-size: 14px; text-align: left; cursor: pointer; }
.side .side-sum::after { content: "▾"; font-size: 12px; color: hsl(var(--muted-foreground)); transition: transform .15s; }
.side .side-group:not(.open) .side-sum::after { transform: rotate(-90deg); }
.side .side-sum:hover { background: hsl(var(--muted)); }
.side .side-items { display: none; gap: 2px; }
.side .side-group.open .side-items { display: grid; }
.side a.sub { display: block; padding: 6px 12px 6px 24px; font-size: 14px; font-weight: 400; }
.side .side-co { display: block; padding: 4px 12px 2px 24px; font-size: 12px; font-weight: 600; color: hsl(var(--muted-foreground)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* phones and tablets: the side menu is one scrolling row of tabs, so the dropdown's pages become tabs in that row */
@media (max-width: 1100px) { .side .side-group, .side .side-group .side-items, .side .side-group.open .side-items { display: contents; } .side .side-sum, .side .side-co { display: none; }
  .side a.sub { padding: 8px 12px; white-space: nowrap; font-weight: 500; } .side a { white-space: nowrap; } }
/* vendor profile images */
.form fieldset.co-imgs { border: 1px solid hsl(var(--border)); border-radius: var(--radius); padding: 12px 14px 14px; display: grid; gap: 12px; }
.form fieldset.co-imgs legend { padding: 0 6px; font-size: 14px; font-weight: 600; }
.co-img { display: grid; gap: 8px; align-content: start; }
.co-img-l { font-size: 14px; font-weight: 500; }
.co-img-p { display: grid; place-items: center; border: 1px dashed hsl(var(--border)); border-radius: 10px; background: var(--gray-50); color: hsl(var(--muted-foreground)); font-size: 12px; object-fit: contain; }
.co-img-logo { width: 96px; height: 96px; }
.co-img-header { width: 100%; aspect-ratio: 4 / 1; object-fit: cover; }
/* a vendor's header image on its public page */
.co-banner { margin: 16px 0 4px; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 1; max-height: 260px; background: var(--gray-50); }
.co-banner img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* public company pages (store, hosting provider): logo, name and the action buttons in one row */
.co-head { padding-top: 20px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.co-head .co-logo { border-radius: 12px; border: 1px solid var(--gray-200); background: #fff; object-fit: contain; }
.co-head .co-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.seller b a { color: inherit; text-decoration: none; } .seller b a:hover { color: hsl(var(--primary)); text-decoration: underline; }
/* miner page KPIs: what the figure is based on, under its label */
.kpi .l .kpi-sub { display: block; margin-top: 2px; font-size: 12px; color: hsl(var(--muted-foreground)); }
/* /compare: a card per miner, the spec table with the best value per row in green, then each miner's store listings */
/* ---------- compare: the "Compare" toggle and the sheet that slides up from the tray ---------- */
.cmp-tog { position: relative; display: inline-flex; align-items: center; cursor: pointer; user-select: none; font-size: 12px; font-weight: 600; line-height: 1; padding: 4px 9px; border: 1px solid hsl(var(--border)); border-radius: 9999px; color: hsl(var(--muted-foreground)); background: hsl(var(--background)); white-space: nowrap; transition: border-color .15s, color .15s, background .15s; }
.cmp-tog:hover { border-color: hsl(var(--primary)); color: hsl(var(--primary)); }
.cmp-tog input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.cmp-tog .on, .cmp-tog input:checked ~ .off { display: none; }
.cmp-tog input:checked ~ .on { display: inline; }
.cmp-tog:has(input:checked) { background: var(--green-100); border-color: var(--green-600); color: var(--green-700); }
.cmp-tog:has(input:focus-visible) { outline: 2px solid hsl(var(--primary)); outline-offset: 2px; }
.t th.cmp-th { font-size: 12px; white-space: nowrap; }
.cmp-hint { margin: 0; color: hsl(var(--muted-foreground)); }
.head .cmp-tog { align-self: center; }

/* the sheet: a sticky header (title, electricity price, ×) over a scrolling body, capped and centred */
.cmp-sheet { --cmp-win: var(--green-700); --cmp-stripe: var(--gray-50); position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; max-height: min(88vh, 940px); display: flex; flex-direction: column; background: hsl(var(--background)); border-top: 1px solid hsl(var(--border)); border-radius: 18px 18px 0 0; box-shadow: 0 -18px 50px rgb(0 0 0 / .18), 0 0 0 100vmax rgb(0 0 0 / .32); animation: cmp-up .22s ease-out; }   /* the second shadow dims the page behind */
:root[data-theme="dark"] .cmp-sheet { --cmp-win: var(--green-400); --cmp-stripe: var(--gray-100); }
.cmp-sheet[hidden] { display: none; }
@keyframes cmp-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .cmp-sheet { animation: none; } }
.cmp-sheet-h { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 20px; max-width: 1308px; width: 100%; margin: 0 auto; padding: 14px 24px 12px; }
.cmp-sheet::before { content: ""; position: absolute; top: 6px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: var(--gray-300); }   /* the "drawer" handle */
.cmp-sheet-h { border-bottom: 1px solid hsl(var(--border)); }
.cmp-sheet-h h2 { margin: 0; font-size: 19px; }
.cmp-sheet-h h2 .muted { color: hsl(var(--muted-foreground)); font-weight: 500; }
.cmp-elec { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; margin-left: auto; color: hsl(var(--foreground)); }
.cmp-elec input { width: 80px; height: 34px; padding: 0 10px; border: 1px solid hsl(var(--field-border, var(--input))); border-radius: 8px; background: hsl(var(--background)); color: hsl(var(--foreground)); font: inherit; font-weight: 600; }
.cmp-unit { color: hsl(var(--muted-foreground)); font-size: 13px; }
.cmp-close { width: 36px; height: 36px; display: grid; place-items: center; flex: none; border: 1px solid hsl(var(--border)); border-radius: 9999px; background: hsl(var(--background)); color: hsl(var(--foreground)); font-size: 22px; line-height: 1; cursor: pointer; }
.cmp-close:hover { background: var(--gray-100); }
.cmp-sheet-b { overflow: auto; padding: 12px 24px 20px; overscroll-behavior: contain; }
.cmp-sheet-b[aria-busy="true"] { opacity: .5; }
.cmp-inner { max-width: 1260px; margin: 0 auto; }   /* the label column + four 270px miner columns, centred */
.cmp-scroll { overflow-x: auto; }

/* the table: a fixed label column and fixed-width miner columns, striped rows, values at full contrast */
.cmp-t { width: max-content; margin: 0 auto; border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: 15px; font-variant-numeric: tabular-nums; color: hsl(var(--foreground)); }
.cmp-t col.cmp-lc { width: 170px; }
.cmp-t col.cmp-mc { width: 270px; }
.cmp-t th, .cmp-t td { padding: 10px 14px; border-bottom: 1px solid hsl(var(--border)); text-align: left; vertical-align: middle; }
.cmp-t tbody tr:nth-child(even) > * { background: var(--cmp-stripe); }
.cmp-t th[scope="row"], .cmp-corner { position: sticky; left: 0; z-index: 1; background: hsl(var(--background)); font-size: 13px; font-weight: 600; color: hsl(var(--muted-foreground)); }
.cmp-t thead th { vertical-align: top; border-bottom: 2px solid hsl(var(--border)); }
.cmp-head { position: relative; text-align: center !important; font-weight: 400; }
.cmp-x { position: absolute; top: 4px; right: 4px; width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 9999px; background: none; color: hsl(var(--muted-foreground)); font-size: 20px; cursor: pointer; }
.cmp-x:hover { background: var(--gray-100); color: hsl(var(--foreground)); }
.cmp-pic { display: block; }
.cmp-pic img { display: block; width: 160px; max-width: 100%; height: 110px; object-fit: contain; margin: 4px auto 10px; }
.cmp-name { display: block; font-size: 15px; font-weight: 700; line-height: 1.3; color: hsl(var(--foreground)); text-decoration: none; }
.cmp-name:hover { color: hsl(var(--primary)); }
.cmp-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin-top: 6px; min-height: 22px; }
/* the best value in a row: a green pill, dark enough to read in light and dark mode */
.cmp-win { display: inline-block; padding: 2px 9px; margin: -2px -9px; border-radius: 9999px; background: var(--green-100); color: var(--cmp-win); font-weight: 800; }
.cmp-win b { font-weight: inherit; }

/* where to buy: one line per seller (name, stock, price button) */
.cmp-offers ul { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 6px; }
.cmp-offers li { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cmp-seller { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 600; }
.cmp-offers .badge { flex: none; font-size: 11px; }
.cmp-offers .price-cta { flex: none; padding: 3px 10px; }
.cmp-offers .price-cta b { font-size: 14px; }
.cmp-note { margin: 12px 0 0; color: hsl(var(--muted-foreground)); }

/* the "Add a miner" column and the empty sheet: a search over the ranking */
.cmp-addcol { vertical-align: middle !important; background: var(--cmp-stripe); }
.cmp-addcell { background: none !important; }
.cmp-search { position: relative; display: grid; gap: 8px; text-align: left; }
.cmp-search label { font-size: 15px; font-weight: 700; color: hsl(var(--foreground)); }
.cmp-search label::before { content: "+ "; color: hsl(var(--primary)); }
.cmp-search input { width: 100%; height: 40px; padding: 0 12px; border: 1px solid hsl(var(--field-border, var(--input))); border-radius: 10px; background: hsl(var(--background)); color: hsl(var(--foreground)); font: inherit; font-size: 15px; }
.cmp-search input:focus { outline: 2px solid hsl(var(--primary)); outline-offset: 1px; }
.cmp-hits { position: absolute; top: 100%; left: 0; right: 0; z-index: 3; margin: 4px 0 0; padding: 4px; list-style: none; max-height: 280px; overflow: auto; background: hsl(var(--background)); border: 1px solid hsl(var(--border)); border-radius: 10px; box-shadow: 0 12px 30px rgb(0 0 0 / .14); }
.cmp-hits[hidden] { display: none; }
.cmp-hits button { display: block; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: none; color: hsl(var(--foreground)); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.cmp-hits button:hover, .cmp-hits button[aria-selected="true"] { background: var(--green-100); color: var(--cmp-win); }
.cmp-empty { max-width: 460px; padding: 28px 0 40px; text-align: center; }
.cmp-empty p { margin: 0 0 16px; font-size: 15px; color: hsl(var(--muted-foreground)); }
/* the empty sheet is short and its body scrolls (clips anything absolute): there the list is part of the flow and the
   sheet grows to fit it, up to its max height */
.cmp-empty .cmp-hits { position: static; max-height: none; text-align: left; }

@media (max-width: 640px) {
  .cmp-hint { display: none; }   /* phone rows have no compare toggle (it is on the miner page) */
  .cmp-sheet { max-height: 92vh; border-radius: 14px 14px 0 0; }
  .cmp-sheet-h { padding: 14px 14px 10px; gap: 8px 12px; }
  .cmp-sheet-h h2 { font-size: 17px; }
  .cmp-close { order: 2; margin-left: auto; }
  .cmp-elec { order: 3; margin-left: 0; flex-basis: 100%; }
  .cmp-sheet-b { padding: 0 0 16px; }
  .cmp-inner { max-width: none; }
  .cmp-t { font-size: 14px; }
  .cmp-t col.cmp-lc { width: 88px; }
  .cmp-t col.cmp-mc { width: 156px; }   /* about two miners visible next to the labels at 412px */
  .cmp-t th, .cmp-t td { padding: 9px 10px; }
  .cmp-t th[scope="row"], .cmp-corner { font-size: 12px; padding-left: 14px; }
  .cmp-pic img { width: 110px; height: 80px; }
  .cmp-name { font-size: 14px; }
  .cmp-offers li { flex-wrap: wrap; row-gap: 2px; }
  .cmp-offers .cmp-seller { flex-basis: 100%; }
  .cmp-note, .cmp-empty { padding-left: 14px; padding-right: 14px; }
}
/* /vendors: company directory */
.vend-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin: 4px 0 16px; }
.vend-bar .input { max-width: 320px; }
.vend-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.vend-chips button { padding: 6px 12px; border-radius: 999px; border: 1px solid hsl(var(--border)); background: none; color: inherit; font: inherit; font-size: 13px; cursor: pointer; }
.vend-chips button b { font-weight: 500; opacity: .6; }
.vend-chips button[aria-pressed="true"] { background: hsl(var(--foreground)); color: hsl(var(--background)); border-color: hsl(var(--foreground)); }
.vend-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.vend-card { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; color: inherit; text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.vend-card[hidden] { display: none; }
.vend-card:hover { border-color: hsl(var(--primary) / .5); box-shadow: 0 4px 14px rgb(0 0 0 / .06); }
.vend-top { display: flex; gap: 12px; align-items: center; }
.vend-top img, .vend-ini { flex: none; width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--gray-200); background: #fff; object-fit: contain; }
.vend-ini { display: grid; place-items: center; font-size: 13px; font-weight: 700; color: hsl(var(--muted-foreground)); background: var(--gray-50); }
.vend-types { display: flex; flex-wrap: wrap; gap: 4px; }
.vend-desc { margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vend-foot { margin-top: auto; color: hsl(var(--primary)); font-weight: 600; }
/* vendor profile of a company that sells and hosts: jump links to both sections */
.co-jump { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.co-jump a { padding: 6px 12px; border: 1px solid hsl(var(--border)); border-radius: 999px; color: inherit; text-decoration: none; font-weight: 500; }
.co-jump a:hover { border-color: hsl(var(--primary)); color: hsl(var(--primary)); }
#miners, #sites { scroll-margin-top: 90px; }
/* tick boxes in forms (offers, hosting locations, company type, admin): a normal 16 px box, never the 38 px text-field
   style, and a labelled one is a pill toggle that turns green when on */
.form input[type="checkbox"], .form input[type="radio"] { width: 16px; height: 16px; padding: 0; margin: 0; flex: none; border-radius: 4px; accent-color: hsl(var(--primary)); cursor: pointer; }
.form label.check { display: inline-flex; flex-direction: row; align-items: center; gap: 8px; width: fit-content; margin: 0; padding: 8px 14px; border: 1px solid hsl(var(--border)); border-radius: 999px; font-size: 14px; font-weight: 500; cursor: pointer; transition: border-color .15s, background .15s, color .15s; }
.form label.check:hover { border-color: hsl(var(--primary) / .5); }
.form label.check:has(input:checked) { border-color: hsl(var(--primary)); background: hsl(var(--primary) / .08); color: hsl(var(--primary)); }
.form label.check:has(input:focus-visible) { outline: 2px solid hsl(var(--primary)); outline-offset: 2px; }
.form label.check.small { padding: 5px 11px; font-size: 13px; }
/* offer form: the pre-order shipping months (shown only for a pre-order) */
.form fieldset.batch { border: 0; margin: 0; padding: 0; display: grid; gap: 6px; }
.form fieldset.batch[hidden] { display: none; }
.form fieldset.batch legend { padding: 0; margin-bottom: 6px; font-size: 14px; font-weight: 500; }
.form fieldset.batch legend .hint { font-weight: 400; }


/* back to top (long pages, after scrolling) */
.to-top { position: fixed; right: 20px; bottom: 20px; z-index: 55; width: 44px; height: 44px; border-radius: 9999px; display: grid; place-items: center; cursor: pointer;
  border: 1px solid hsl(var(--border, 0 0% 85%)); background: hsl(var(--background)); color: hsl(var(--foreground)); box-shadow: 0 6px 20px rgb(0 0 0 / .18); transition: transform .15s, background .15s; }
.to-top:hover { transform: translateY(-2px); background: hsl(var(--primary)); color: hsl(var(--primary-foreground, 0 0% 100%)); border-color: hsl(var(--primary)); }
.to-top:focus-visible { outline: 2px solid hsl(var(--primary)); outline-offset: 2px; }
.to-top[hidden] { display: none; }
@media (max-width: 640px) { .to-top { right: 14px; bottom: 14px; width: 42px; height: 42px; } }
@media print { .to-top { display: none; } }
/* while Inter loads, Arial scaled to Inter's metrics stands in, so the text doesn't jump when the real font arrives (less layout shift) */
@font-face { font-family: "Inter Fallback"; src: local("Arial"), local("Helvetica"); ascent-override: 90.44%; descent-override: 22.52%; line-gap-override: 0%; size-adjust: 107.12%; }

/* phones: a table placed straight in a card (admin dashboard: activity log, widget embeds) scrolls inside the card
   instead of widening the whole page */
/* phones: a table inside a card stays a real full-width table (display:block shrank it to its content and left an
   empty strip on the right, owner 17 Oct); a table wider than the card scrolls inside the card instead */
@media (max-width: 900px) { .card { min-width: 0; } .card:has(> table.t) { overflow-x: auto; } .card > table.t { width: 100%; } }

/* social links in the footer too (on phones the bar above the header is hidden) */
.ftr-soc { display: flex; gap: 14px; margin: 12px 0; }
.ftr-soc a { color: hsl(var(--foreground)); display: inline-flex; padding: 6px; margin: -6px; }
.ftr-soc svg { width: 18px; height: 18px; }

/* phones (16 Oct): tighter page heads and sections, hosting cards with the figures side by side and the description
   cut to two lines, a two-column footer. Owner: "not compact whatsoever, shitton of scrolling". */
@media (max-width: 640px) {
  .topbar { display: none; }
  .head { padding: 18px 0 8px; }
  h1.title { font-size: 24px; margin: 0 0 8px; }
  .lead { font-size: 15px; }
  .section { padding: 18px 0; }
  .crumbs { margin-top: 12px; font-size: 13px; }
  .searchrow { margin: 14px 0 12px; }
  .kpis { gap: 8px; }
  .kpi { padding: 9px 12px; }
  .kpi .v { font-size: 18px; }
  .kpi .l { font-size: 12px; }
  .grid3 { gap: 10px; }
  .pcard { gap: 8px; padding: 12px 14px; }
  .pcard .top { gap: 10px; }
  .pcard .top img { width: 36px; height: 36px; }
  .pcard .specs { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 6px 10px; }
  .pcard .specs div { flex-direction: column; justify-content: flex-start; gap: 0; margin: 0; padding: 0; border: 0; font-size: 13.5px; }
  .pcard .specs div > span:first-child { font-size: 11.5px; }
  .pcard > p { margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .cta { padding: 14px 16px; }
  .ftr { margin-top: 32px; padding: 24px 0; }
  .ftr .wrap { grid-template-columns: 1fr 1fr; gap: 18px 16px; }
  .ftr .wrap > div:first-child { grid-column: 1 / -1; }
  .ftr p { margin: 6px 0; }
}

/* phones: long texts cut to five lines with a "Show more" button (app.js); hosting locations two to a row;
   a tighter vendor header */
.clamp-btn { display: none; }
@media (max-width: 640px) {
  .clamp:not(.open) { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
  .clamp-btn { display: inline-block; margin-top: 6px; padding: 0; border: 0; background: none; color: hsl(var(--primary)); font: inherit; font-weight: 600; cursor: pointer; }
  .grid2 > .card { padding: 14px 16px; }
  .grid2 > .card h2 { font-size: 17px; margin-bottom: 8px; }
  .co-head { gap: 10px 12px; padding-top: 12px; }
  .co-head .co-logo { width: 52px; height: 52px; }
  .co-head h1.title { font-size: 22px; }
  .co-head .co-actions { margin-left: 0; }
  .co-head .co-actions .btn { height: 34px; padding: 0 12px; font-size: 14px; }
  .co-jump { margin-top: 10px; }
  .co-jump a { padding: 5px 10px; font-size: 13px; }
  .locs { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 8px; }
  .locs .pcard { padding: 10px 12px; gap: 6px; font-size: 13px; align-content: start; }
  .locs .pcard .top { gap: 8px; align-items: flex-start; }
  .locs .pcard .top img { width: 28px; height: 28px; }
  .locs .pcard .top b { font-size: 14.5px; line-height: 1.25; }
  .locs .pcard .top .small { font-size: 12px; }
  .locs .pcard .specs { grid-template-columns: 1fr !important; gap: 2px; }
  .locs .pcard .specs div { flex-direction: row; flex-wrap: wrap; justify-content: space-between; gap: 0 6px; font-size: 12.5px; }
  .locs .pcard .specs div > span:first-child { font-size: 12px; }
  .locs .pcard .specs div:first-child > span:first-child { display: none; }   /* the rate needs no label: "$0.047 /kWh" */
  .locs .pcard .specs div:first-child { font-size: 13px; }
  .locs .pcard .specs div:first-child b { font-size: 17px; color: var(--green-600); }
  .locs .pcard > .small { margin-top: -3px; font-size: 11.5px; }
  .locs .pcard > p { font-size: 12px; }
}

/* phones: miner page photo shorter, specification lists two to a row with the label above the value */
@media (max-width: 640px) {
  .hero { gap: 14px; }
  .hero .pic { aspect-ratio: auto; height: 180px; padding: 10px; }
  .specs { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 14px; }
  .specs div { flex-direction: column; justify-content: flex-start; gap: 0; padding: 7px 0; font-size: 13.5px; }
  .specs div > span:first-child { font-size: 12px; }
  .notice { padding: 10px 12px; font-size: 13.5px; }
}
@media (max-width: 640px) {
  /* "Where to buy" rows: seller and price on line 1; country, stock, ROI and the Buy button on line 2 */
  table.t.cards.offers td.buy { margin-left: auto; }
  table.t.cards.offers td.lead { flex-direction: column; align-items: flex-end; gap: 0; }
  table.t.cards.offers td.lead .small { font-size: 11.5px; font-weight: 400; }
  table.t.cards.offers .seller { gap: 8px; }
  table.t.cards.offers .seller img { width: 24px; height: 24px; }
  table.t.cards.offers .seller .badge { font-size: 11px; }
}

/* best price as a button to the sellers (miner rows): orange so it stands out next to the green profit column */
.price-cta { display: inline-flex; align-items: baseline; gap: 8px; padding: 2px 10px; line-height: 1.3; border-radius: 8px; color: #fff; text-decoration: none; white-space: nowrap;
  background: linear-gradient(180deg, #f97316, #ea580c); box-shadow: 0 2px 8px -3px rgb(234 88 12 / .7); transition: transform .12s, box-shadow .12s, filter .12s; }
.t td.price { padding-top: 3px; padding-bottom: 3px; }
.price-cta b { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.price-cta span { font-size: 12px; font-weight: 600; opacity: .92; }
.price-cta:hover { color: #fff; transform: translateY(-1px); filter: brightness(1.06); box-shadow: 0 8px 18px -6px rgb(234 88 12 / .75); }
.price-cta:focus-visible { outline: 2px solid #ea580c; outline-offset: 2px; }
.price-cta.ghost { background: none; color: #ea580c; box-shadow: inset 0 0 0 1.5px #ea580c; }
.price-cta.ghost:hover { background: #fff7ed; color: #c2410c; }
@media (max-width: 640px) { .price-cta { padding: 4px 10px; gap: 6px; } .price-cta b { font-size: 14px; } .price-cta span { font-size: 11.5px; } }

/* /miners: the count, and on phones a "Sort by" menu (the column headers are hidden there) */
.rank-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rank-bar #count { margin: 0; }
.msort { display: none; align-items: center; gap: 6px; color: hsl(var(--muted-foreground)); }
.msort select { height: 32px; border: 1px solid hsl(var(--input)); border-radius: 8px; padding: 0 8px; background: hsl(var(--background)); color: hsl(var(--foreground)); font: inherit; font-size: 13px; }
@media (max-width: 640px) { .msort { display: inline-flex; } .rank-bar { margin: 4px 0 8px; } }

/* desktop under 1400 px: the signed-in header (name + Verified/Superadmin badge in the account button) was wider than the
   screen at 1280 px. The button shows just the initial there; name and badges are in its dropdown. */
@media (max-width: 1400px) {
  .acct > summary .acct-n, .acct > summary .ubadge { display: none; }
  .acct > summary { padding: 0 4px; }
}
/* 1101–1200 px (just above the burger menu): a little more room so the signed-in header never scrolls sideways */
@media (min-width: 1101px) and (max-width: 1200px) {
  .hdr .wrap { gap: 10px; }
  .ctl { gap: 6px; }
  .ctl input { width: 64px; }
  .ctl select { padding: 0 6px; }
}

/* line charts (lib/chart.js): the SVG stretches to the card, the axis labels are HTML beside and under it so they never
   stretch; stretches without data are dashed. Phones skip the miner price chart (owner: hide graphs on mobile). */
.chart-box { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; margin-bottom: 4px; }
.chart-y { position: relative; height: var(--ch); min-width: 40px; }
.chart-y > span { position: absolute; right: 0; transform: translateY(-50%); font-size: 11px; line-height: 1; color: hsl(var(--muted-foreground)); white-space: nowrap; font-variant-numeric: tabular-nums; }
.chart-plot { position: relative; min-width: 0; padding-bottom: 22px; }
.chart-box .chart { height: var(--ch); overflow: visible; }
.chart-x { position: relative; }
.chart-x > span { position: absolute; top: 6px; transform: translateX(-50%); font-size: 11px; color: hsl(var(--muted-foreground)); white-space: nowrap; }
.chart-x > span.s { transform: none; }
.chart-x > span.e { transform: translateX(-100%); }
.chart .gap { stroke-dasharray: 4 5; opacity: .75; }
@media (max-width: 640px) { .chart-sec { display: none; } }

/* miner rows on phones, minimal (owner 16 Oct: "minimal look, one large button"): name on top, then profit as green text
   with ROI and hashrate; one big price button on the right spanning both lines. Applies to rows with the price button
   (ranking, homepage top 10, brand/algorithm pages); other lists keep the two-line flex rows above. */
.price-cta.none { background: none; box-shadow: none; color: hsl(var(--muted-foreground)); }
@media (max-width: 640px) {
  table.t.cards tr:has(.price-cta) { display: block; position: relative; min-height: 64px; padding: 10px 140px 10px 12px; }
  table.t.cards tr:has(.price-cta)::after { content: none; }
  table.t.cards tr:has(.price-cta) td { display: inline; margin-right: 8px; font-size: 13px; }
  table.t.cards tr:has(.price-cta) td.hide-m { display: none; }
  table.t.cards tr:has(.price-cta) td.model { display: flex; margin: 0 0 3px; font-size: 15px; }
  table.t.cards tr:has(.price-cta) td.profit { padding: 0; background: none !important; color: var(--green-600); font-size: 13.5px; font-weight: 700; border-radius: 0; }
  table.t.cards tr:has(.price-cta) td.profit.neg { color: var(--red-500); }
  table.t.cards tr:has(.price-cta) td.price { position: absolute; top: 50%; right: 12px; margin: 0; transform: translateY(-50%); }
  table.t.cards tr:has(.price-cta) .price-cta { flex-direction: column; align-items: center; justify-content: center; gap: 1px; width: 120px; min-height: 46px; padding: 6px 8px; border-radius: 10px; }
  table.t.cards tr:has(.price-cta) .price-cta b { font-size: 15px; }
  table.t.cards tr:has(.price-cta) .price-cta span { font-size: 11.5px; }
}
@media (max-width: 640px) {
  /* one line under the name: profit and ROI only (hashrate is on the miner page) */
  table.t.cards tr:has(.price-cta) td:not(.model):not(.profit):not(.lbl):not(.price) { display: none; }
  table.t.cards tr:has(.price-cta) td.lbl::before { margin-right: 3px; }
  table.t.cards tr:has(.price-cta) td { white-space: nowrap; }
}
@media (max-width: 640px) { table.t.cards tr:has(.price-cta) td.model { white-space: normal; } }   /* long names wrap instead of running under the button */
@media (max-width: 640px) { table.t.cards tr:has(.price-cta) td.model img { display: none; } }   /* maker wordmarks are unreadable at 20 px: the name gets the room */

/* offer button: orange like the price button. Desktop shows only "View offer →" (the price has its own column); on phones
   offer rows get the same minimal layout as miner rows: one big button with the price on top, beside the name and figures */
.btn.offer-cta { background: linear-gradient(180deg, #f97316, #ea580c); border-color: transparent; color: #fff; box-shadow: 0 2px 8px -3px rgb(234 88 12 / .7); }
.btn.offer-cta:hover { color: #fff; filter: brightness(1.06); }
.offer-cta .oc-p { display: none; }
@media (max-width: 640px) {
  table.t.cards tr:has(.offer-cta) { display: block; position: relative; min-height: 64px; padding: 10px 140px 10px 12px; }
  table.t.cards tr:has(.offer-cta)::after { content: none; }
  table.t.cards tr:has(.offer-cta) td { display: inline; margin-right: 8px; font-size: 13px; }
  table.t.cards tr:has(.offer-cta) td:not(.model):not(.profit):not(.lbl):not(.keep):not(.buy) { display: none; }
  table.t.cards tr:has(.offer-cta) td.model { display: flex; margin: 0 0 3px; font-size: 15px; white-space: normal; }
  table.t.cards tr:has(.offer-cta) td.profit { padding: 0; background: none !important; color: var(--green-600); font-size: 13.5px; font-weight: 700; }
  table.t.cards tr:has(.offer-cta) td.profit.neg { color: var(--red-500); }
  table.t.cards tr:has(.offer-cta) td.lbl::before { margin-right: 3px; }
  table.t.cards tr:has(.offer-cta) td.keep .badge { font-size: 11.5px; padding: 1px 7px; }
  table.t.cards tr:has(.offer-cta) td.keep .small { display: inline; margin-left: 4px; }
  table.t.cards tr:has(.offer-cta) td.buy { position: absolute; top: 50%; right: 12px; margin: 0; transform: translateY(-50%); }
  table.t.cards tr:has(.offer-cta) .offer-cta { flex-direction: column; gap: 1px; width: 120px; height: auto; min-height: 46px; padding: 6px 8px; border-radius: 10px; }
  table.t.cards tr:has(.offer-cta) .offer-cta .oc-p { display: block; font-size: 15px; font-weight: 800; }
  table.t.cards tr:has(.offer-cta) .offer-cta span { font-size: 11.5px; font-weight: 600; }
}
@media (max-width: 640px) { table.t.cards tr:has(.offer-cta) td.keep .badge.ok { display: none; } }   /* "In stock" is the normal case: badge only for pre-order / out of stock */
/* an offer without a shop link: on the vendor's own page a plain price box on phones (nothing on desktop, the price has its column) */
.offer-cta.static { display: none; cursor: default; }
@media (max-width: 640px) { table.t.cards tr:has(.offer-cta) .offer-cta.static { display: inline-flex; filter: saturate(.6); } }

/* phone menu (owner 16 Oct: "too tall, switchers on the left, centre please"): the settings in one centred row,
   the four sections as a centred 2 x 2 grid; an opened section takes the full width under it */
@media (max-width: 1100px) {
  .hdr.open .ctl .desk { justify-content: center; gap: 6px; padding: 10px 0; }
  .hdr.open .ctl .desk select, .hdr.open .ctl .desk input { height: 36px; font-size: 14px; }
  .hdr.open .ctl .desk input { width: 64px; padding: 0 8px; }
  .hdr.open .ctl .desk select { padding: 0 6px; }
  .hdr.open .ctl .desk .unit { margin-left: -2px; font-size: 13px; }
  .hdr.open .ctl .desk > svg:first-of-type { display: none; }
  .hdr.open .ctl .desk .icon-btn { width: 36px; height: 36px; }
  .hdr.open .nav { grid-template-columns: 1fr 1fr; gap: 6px; padding: 6px 0 0; }
  .hdr.open .nav > a, .hdr.open .nav > details > summary { display: flex; align-items: center; justify-content: center; gap: 4px; min-height: 42px; padding: 8px; border: 1px solid hsl(var(--border)); border-radius: 10px; font-size: 15px; text-align: center; }
  .hdr.open .nav > details[open] { grid-column: 1 / -1; }
  .hdr.open .nav > details[open] > summary { border-color: hsl(var(--primary)); }
  .hdr.open .nav .menu { padding: 6px 4px 4px; text-align: center; }
}

/* /miners cooling chips (a second, lighter chip row) and the cooling links in the Marketplace menu */
.chips.cool { margin-top: 8px; align-items: center; }
.chips.cool .chip { height: 32px; font-size: 13.5px; }
.chips-l { font-size: 13px; font-weight: 600; color: hsl(var(--muted-foreground)); margin-right: 2px; }
.menu .menu-sub { display: grid; margin: -2px 0 4px; padding-left: 12px; border-left: 2px solid hsl(var(--border)); }
.menu .menu-sub a { font-size: 13.5px; padding-top: 5px; padding-bottom: 5px; color: hsl(var(--muted-foreground)); }
.menu .menu-sub a:hover { color: hsl(var(--primary)); }
@media (max-width: 640px) { .chips.cool { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } .chips.cool .chip { flex: none; } }

/* Marketplace mega menu (desktop): ASIC miners first (title, sort orders + cooling, by coin), featured miner on the
   right, GPUs / CPUs / compare / hosting / vendors / partners in a quieter strip below */
.nav .menu.mega { display: grid; grid-template-columns: 210px 210px 270px; grid-template-rows: auto 1fr auto; gap: 0; padding: 18px 8px 16px 14px; min-width: 0; border-radius: 16px; box-shadow: 0 24px 60px -20px rgb(0 0 0 / .3); }
.mega .mg-col { display: flex; flex-direction: column; gap: 1px; padding: 0 14px 0 6px; grid-row: 2; }
.mega .mg-col + .mg-col, .mega .mg-feat { border-left: 1px solid hsl(var(--border)); padding-left: 16px; }
.mega a.mg-title { grid-column: 1 / 3; grid-row: 1; justify-content: flex-start; gap: 8px; padding: 0 10px 14px 16px; font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.mega a.mg-title span { color: hsl(var(--primary)); transition: transform .15s; }
.mega a.mg-title:hover { background: none; color: hsl(var(--primary)); }
.mega a.mg-title:hover span { transform: translateX(3px); }
.mega .mg-feat { grid-column: 3; grid-row: 1 / 4; }
.mega .mg-more { grid-column: 1 / 3; grid-row: 3; display: flex; flex-wrap: wrap; gap: 0 2px; margin: 14px 14px 0 6px; padding-top: 10px; border-top: 1px solid hsl(var(--border)); }
.mega .mg-more a { padding: 5px 10px; font-size: 13px; color: hsl(var(--muted-foreground)); }
.mega .mg-more a:hover { color: hsl(var(--foreground)); }
.mega .mg-h { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: hsl(var(--muted-foreground)); padding: 0 10px 8px; }
.mega .mg-h2 { padding-top: 12px; }
.mega a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; font-size: 14px; }
.mega .mg-coin em { margin-left: auto; font-style: normal; font-size: 12px; color: hsl(var(--muted-foreground)); }
.mega .mg-ic { display: inline-flex; flex: none; }
.mega .mg-ic img, .mega .mg-ic i { width: 20px; height: 20px; border-radius: 50%; }
.mega .mg-ic img + img { margin-left: -6px; box-shadow: 0 0 0 2px hsl(var(--background)); }
.mega .mg-ic i { display: grid; place-items: center; background: hsl(var(--muted)); font-style: normal; font-size: 11px; font-weight: 700; }
.mega .mg-card { display: flex; flex-direction: column; align-items: stretch; gap: 4px; padding: 0 !important; border: 1px solid hsl(var(--border)); border-radius: 14px; overflow: hidden; background: hsl(var(--card)); }
.mega .mg-card:hover { background: hsl(var(--card)) !important; border-color: hsl(var(--primary)); box-shadow: 0 10px 28px -14px rgb(0 0 0 / .3); }
.mega .mg-img { position: relative; display: grid; place-items: center; height: 128px; background: linear-gradient(160deg, var(--green-100), hsl(var(--card)) 75%); }
.mega .mg-img img { max-height: 112px; max-width: 80%; object-fit: contain; }
.mega .mg-badge { position: absolute; top: 10px; left: 10px; font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: hsl(var(--primary)); color: #fff; }
.mega .mg-name { padding: 8px 14px 0; font-size: 15px; line-height: 1.25; }
.mega .mg-spec { padding: 0 14px; font-size: 12.5px; color: hsl(var(--muted-foreground)); }
.mega .mg-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 6px 14px 0; }
.mega .mg-price { font-size: 20px; font-weight: 800; }
.mega .mg-profit { font-size: 13px; font-weight: 700; color: var(--green-600); }
.mega .mg-btn { margin: 10px 14px 14px; padding: 10px; border-radius: 10px; text-align: center; font-weight: 700; color: #fff; background: linear-gradient(180deg, #f97316, #ea580c); box-shadow: 0 2px 8px -3px rgb(234 88 12 / .7); }
/* phone menu: coins as a 2-up grid, shop links, no featured card (keeps the menu short) */
@media (max-width: 1100px) {
  .hdr.open .nav .menu.mega { display: flex; flex-direction: column; padding: 6px 4px 4px; }
  .hdr.open .mega .mg-col { padding: 0; border: 0 !important; }
  .hdr.open .mega .mg-col { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px; }
  .hdr.open .mega .mg-col .mg-h { grid-column: 1 / -1; }
  .hdr.open .mega a.mg-title { padding: 8px 6px 2px; font-size: 16px; }
  /* phones (owner 17 Oct): the other sections (GPUs, CPUs, compare, hosting, vendors, partners) come FIRST, as clear
     buttons two to a row, so nobody has to scroll past the ASIC options to find them; the ASIC options follow */
  .hdr.open .mega .mg-more { order: -1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 6px 0 4px; padding: 0 0 12px; border-top: 0; border-bottom: 1px solid hsl(var(--border)); }
  .hdr.open .mega .mg-more a { justify-content: center; text-align: center; min-height: 44px; padding: 8px 10px; border: 1px solid hsl(var(--border)); border-radius: 10px; background: hsl(var(--card));
    font-size: 15px; font-weight: 600; color: hsl(var(--foreground)); }
  .hdr.open .mega .mg-more a:active { border-color: hsl(var(--primary)); }
  .hdr.open .mega .mg-h { padding: 12px 6px 4px; text-align: left; color: hsl(var(--foreground)); opacity: .7; }
  .hdr.open .mega a { justify-content: flex-start; padding: 7px 6px; }
  .hdr.open .mega .mg-feat { display: none; }
}
.price-cta.none { font-size: 12px; font-weight: 500; white-space: normal; text-align: center; line-height: 1.3; }

/* admin › Widgets › Previews & embed codes */
.wbox-b { display: grid; grid-template-columns: minmax(0, 480px) minmax(0, 1fr); gap: 20px; margin-top: 14px; align-items: start; }
.wbox-prev { background: var(--gray-50); border: 1px dashed hsl(var(--border)); border-radius: 14px; padding: 12px; }
.wbox-prev iframe { display: block; width: 100%; border: 0; background: transparent; }
.wbox[data-w="list"] .wbox-b { grid-template-columns: minmax(0, 1fr); }
.wbox-code textarea { width: 100%; font: 12.5px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; padding: 10px 12px; border: 1px solid hsl(var(--border)); border-radius: 10px; background: var(--gray-50); color: hsl(var(--foreground)); resize: vertical; }
@media (max-width: 900px) { .wbox-b { grid-template-columns: minmax(0, 1fr); } }

/* ---------- main menu (owner 17 Oct: "navigation unclear, hard to read"): each section with an icon and, in the phone
   menu, one line saying what is inside; the section of the current page is marked in green ---------- */
.nav > a, .nav summary { display: inline-flex; align-items: center; gap: 7px; font-size: 14.5px; font-weight: 600; color: hsl(var(--foreground)); }
.nav .nv-ic { display: inline-grid; place-items: center; color: hsl(var(--muted-foreground)); }
.nav .nv-ic svg { width: 17px; height: 17px; }
.nav .nv-t { display: inline-flex; flex-direction: column; line-height: 1.15; }
.nav .nv-t b { font-weight: inherit; }
.nav .nv-t small { display: none; }
.nav > a[aria-current], .nav summary[aria-current] { background: var(--green-100); color: var(--green-700); }
.nav [aria-current] .nv-ic { color: inherit; }
:root[data-theme="dark"] .nav > a[aria-current], :root[data-theme="dark"] .nav summary[aria-current] { color: var(--green-400); }
@media (max-width: 1100px) {
  .hdr.open .nav { gap: 8px; }
  .hdr.open .nav > a, .hdr.open .nav > details > summary { justify-content: flex-start; text-align: left; gap: 10px; min-height: 64px; padding: 10px 12px; border: 1px solid hsl(var(--border)); border-radius: 12px; background: hsl(var(--card)); box-shadow: 0 1px 2px rgb(0 0 0 / .05); }
  .hdr.open .nav summary::after { margin-left: auto; flex: none; }
  .hdr.open .nav .nv-ic { flex: none; width: 36px; height: 36px; border-radius: 10px; background: hsl(var(--muted)); color: hsl(var(--primary)); }
  .hdr.open .nav .nv-ic svg { width: 20px; height: 20px; }
  .hdr.open .nav .nv-t { min-width: 0; }
  .hdr.open .nav .nv-t b { font-size: 15px; font-weight: 700; color: hsl(var(--foreground)); }
  .hdr.open .nav .nv-t small { display: block; margin-top: 3px; font-size: 12px; font-weight: 500; line-height: 1.25; color: hsl(var(--muted-foreground)); white-space: normal; }
  .hdr.open .nav [aria-current] { border-color: var(--green-600); background: var(--green-100); }
  .hdr.open .nav [aria-current] .nv-ic { background: hsl(var(--primary)); color: #fff; }
  .hdr.open .nav > details[open] > summary { border-color: hsl(var(--primary)); box-shadow: 0 0 0 1px hsl(var(--primary)); }
  .hdr.open .nav .menu { text-align: left; padding: 8px 6px 4px; }
}
/* mid-size desktops: the full header only fits without the section icons (they come back from 1366px; the phone menu keeps them) */
@media (min-width: 1101px) and (max-width: 1365px) {
  .nav { margin-left: 10px; padding: 4px 6px; }
  .nav .nv-ic { display: none; }
  .nav > a, .nav summary { font-size: 14px; padding: 6px 7px; }
}
@media (min-width: 1101px) and (max-width: 1180px) {
  .hdr .wrap { gap: 10px; }
  .nav { margin-left: 4px; padding: 4px 4px; }
  .nav > a, .nav summary { font-size: 13.5px; padding: 6px 5px; gap: 4px; }
}

/* account: listings file import (offers / hosting pages) */
.imp-card { margin: 0 0 14px; }
.imp-card > summary { cursor: pointer; list-style: revert; }
.imp-card[open] > summary { margin-bottom: 8px; }
.imp-report { margin: 0 0 14px; }
.imp-report td { vertical-align: top; }
.imp-err { color: #b91c1c; font-size: 13px; margin-top: 4px; max-width: 520px; }
:root[data-theme="dark"] .imp-err { color: #fca5a5; }
/* ---------- GPU/CPU rig calculator (/gpus/calculator, /cpus/calculator) ---------- */
.rig-grid { align-items: start; }
.rig-in h2 { margin-top: 0; }
.rig-rows { display: grid; gap: 8px; margin-bottom: 10px; }
.rig-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid hsl(var(--border)); border-radius: 10px; }
.rig-name { flex: 1 1 auto; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rig-n { width: 64px; height: 34px; padding: 0 8px; border: 1px solid hsl(var(--field-border, var(--input))); border-radius: 8px; background: hsl(var(--background)); color: hsl(var(--foreground)); font: inherit; }
.rig-x { width: 30px; height: 30px; border: 0; border-radius: 9999px; background: none; color: hsl(var(--muted-foreground)); font-size: 20px; cursor: pointer; }
.rig-x:hover { background: var(--gray-100); color: hsl(var(--foreground)); }
.rig-add .input { width: 100%; }
.rig-set { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.rig-set label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; }
.rig-u { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; color: hsl(var(--muted-foreground)); }
.rig-u input { width: 90px; height: 36px; padding: 0 10px; border: 1px solid hsl(var(--field-border, var(--input))); border-radius: 8px; background: hsl(var(--background)); color: hsl(var(--foreground)); font: inherit; }
.rig-out .kpis { margin: 0; }
.rig-k { white-space: nowrap; }
.dev-calc { margin-left: auto; }
@media (max-width: 640px) { .rig-set { grid-template-columns: 1fr; } }

/* ---------- Tools & partners (/partners, /partners/{slug}) ---------- */
.pt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-top: 16px; }
.pt-card { display: flex; flex-direction: column; gap: 10px; padding: 16px; }
.pt-card[hidden] { display: none; }
.pt-top { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.pt-top b { display: block; font-size: 16px; margin-bottom: 4px; }
.pt-top:hover b { color: hsl(var(--primary)); }
.pt-logo { flex: none; border-radius: 12px; object-fit: contain; background: var(--gray-50); }
.pt-ini { display: grid; place-items: center; width: 48px; height: 48px; font-weight: 800; color: hsl(var(--primary)); background: var(--green-100); }
.pt-head .pt-ini { width: 72px; height: 72px; font-size: 22px; }
.pt-desc { margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pt-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; }

/* hosting location cards: the button to the provider's offer sits at the bottom, cards in a row line up */
.locs .pcard { grid-template-rows: auto auto 1fr auto; }
.pcard .loc-cta { justify-self: stretch; align-self: end; height: 46px; font-size: 15px; font-weight: 700; border-radius: 10px; margin-top: 4px; }   /* owner: big enough to see at a glance */

/* vendor page: search and filters over the miners for sale */
.vfilter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0 0 12px; }
.vfilter .input { flex: 1 1 240px; max-width: 360px; }
.vfilter select { height: 40px; padding: 0 10px; border: 1px solid hsl(var(--input)); border-radius: 8px; background: hsl(var(--background)); color: hsl(var(--foreground)); font: inherit; font-size: 14px; }
@media (max-width: 640px) { .vfilter .input { max-width: none; flex-basis: 100%; } .vfilter select { flex: 1 1 45%; } }

/* 404: what the visitor probably wanted, a search, the main sections, today's top miners */
.nf { max-width: 760px; padding-top: 40px; padding-bottom: 40px; }
.nf-head { text-align: center; }
.nf-code { font-size: 96px; line-height: 1; font-weight: 800; letter-spacing: -.04em; color: hsl(var(--primary)); opacity: .9; margin-bottom: 4px; }
.nf-head .lead { margin: 8px auto 20px; max-width: 520px; }
.nf-search { display: flex; gap: 8px; max-width: 520px; margin: 0 auto; }
.nf-search .input { flex: 1; height: 46px; font-size: 16px; }
.nf-search .btn { height: 46px; padding: 0 20px; font-size: 18px; }
.nf-box { margin-top: 28px; }
.nf-box h2 { font-size: 17px; margin: 0 0 8px; }
.nf-list { display: grid; border: 1px solid hsl(var(--border)); border-radius: 12px; overflow: hidden; }
.nf-item { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; color: hsl(var(--foreground)); font-size: 15px; }
.nf-item + .nf-item { border-top: 1px solid hsl(var(--border)); }
.nf-item:hover { background: hsl(var(--muted)); color: hsl(var(--primary)); }
.nf-item b { white-space: nowrap; color: var(--green-600); }
.nf-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 28px; }
.nf-links .btn { height: 42px; font-size: 14px; }
@media (max-width: 640px) { .nf { padding-top: 24px; } .nf-code { font-size: 72px; } .nf-links .btn { flex: 1 1 45%; } }

/* admin: miner / GPU / CPU photo in the record panel */
.mi-photo { display: flex; gap: 16px; align-items: center; margin-bottom: 8px; }
.mi-photo-img { width: 180px; height: 135px; object-fit: contain; border: 1px solid hsl(var(--border)); border-radius: 10px; background: #fff; flex: none; }
@media (max-width: 640px) { .mi-photo { flex-direction: column; align-items: flex-start; } }

/* public ranking tables (miners, GPUs, CPUs, a shop's offers) on desktop: a little more room per row (owner 17 Oct:
   "too compact"); admin tables and the phone cards keep their own spacing */
@media (min-width: 901px) {
  table.t.cards td { padding-top: 9px; padding-bottom: 9px; }
  table.t.cards th { padding-top: 10px; padding-bottom: 10px; }
}

/* sign-in: "Continue with Google" and the "or" divider */
.gbtn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; margin-top: 20px; background: #fff; color: #1f1f1f; border: 1px solid #dadce0; font-weight: 600; }
.gbtn:hover { background: #f8f9fa; border-color: #c6c9cc; }
.gbtn svg { flex: none; }
.auth-or { display: flex; align-items: center; gap: 12px; margin: 18px 0 0; color: var(--gray-500, #6b7280); font-size: 13px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: hsl(var(--border)); }
.auth-or + .form { margin-top: 18px !important; }
:root[data-theme="dark"] .gbtn { background: #131314; color: #e3e3e3; border-color: #8e918f; }
