/* /systems/: full page width. A honeycomb of glossy system tiles (like the app's), or the plain list by category.
   Colours come from tokens.css; the tile is dark in both themes. */
:root { --tile-a: var(--panel-2); --tile-b: var(--bg); --tile-ink: var(--text); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) { --tile-a: color-mix(in srgb, var(--text) 80%, var(--bg)); --tile-b: var(--text); --tile-ink: var(--bg); } }
:root[data-theme="light"] { --tile-a: color-mix(in srgb, var(--text) 80%, var(--bg)); --tile-b: var(--text); --tile-ink: var(--bg); }

.sys-page { padding-top: 56px; padding-bottom: 96px; }
.sys-top { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(0, 1.25fr); gap: 48px; align-items: center; min-height: min(640px, calc(100vh - 160px)); }
.sys-text h1 { margin: 0; font-size: clamp(44px, 5.4vw, 72px); letter-spacing: -0.04em; line-height: 1; }
.sys-text .intro { margin: 18px 0 26px; max-width: 34ch; color: var(--text-2); font-size: 18px; line-height: 1.55; }
.sys-view { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; box-shadow: var(--ring); }
.sys-view button { font: 500 13px/1 var(--sans); color: var(--text-3); background: none; border: 0; border-radius: 999px; padding: 8px 15px; cursor: pointer; }
.sys-view button[aria-pressed="true"] { color: var(--text); background: var(--panel-2); }
.hive-name { margin: 40px 0 0; min-height: 3.4em; }
.hive-name b { display: block; font-size: 22px; font-weight: 500; letter-spacing: -0.01em; color: var(--text); }
.hive-name span { color: var(--text-3); font-size: 15px; }
.sys-page[data-view="list"] .sys-hive, .sys-page[data-view="list"] .hive-name { display: none; }
.sys-page[data-view="list"] .sys-top { min-height: 0; grid-template-columns: 1fr; }
.sys-page[data-view="hive"] .sys-all { display: none; }
.sys-all { margin-top: 32px; }
.sys-all h2 { font-size: 15px; font-weight: 500; color: var(--text-3); letter-spacing: 0; margin: 32px 0 10px; }

.hive { --step: 96px; --size: 80px; position: relative; height: calc(var(--step) * 3.5 + var(--size) + 24px); }
.hv { position: absolute; left: 50%; top: 50%; width: var(--size); height: var(--size); margin: calc(var(--size) / -2) 0 0 calc(var(--size) / -2); border-radius: 50%;
  background: linear-gradient(160deg, var(--tile-a), var(--tile-b) 70%); display: grid; place-items: center; text-decoration: none; isolation: isolate;
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--tile-ink) 16%, transparent), inset 0 0 0 1px color-mix(in srgb, var(--tile-ink) 7%, transparent), 0 10px 24px -12px rgba(0, 0, 0, .55);
  transform: translate(calc(var(--x) * var(--step)), calc(var(--y) * var(--step) * .87)) scale(var(--s, 1));
  transition: transform .2s var(--ease-out), box-shadow .2s; will-change: transform; }
.hv::before { content: ""; position: absolute; inset: 0; border-radius: 50%; z-index: -1; background: radial-gradient(120% 70% at 30% 0%, color-mix(in srgb, var(--tile-ink) 18%, transparent), transparent 55%); }
.hv i { width: 36%; height: 36%; background: var(--tile-ink); -webkit-mask: var(--logo) center / contain no-repeat; mask: var(--logo) center / contain no-repeat; opacity: .9; }
.hv:hover, .hv:focus-visible { z-index: 2; box-shadow: inset 0 1px 0 color-mix(in srgb, var(--tile-ink) 22%, transparent), inset 0 0 0 1px color-mix(in srgb, var(--tile-ink) 10%, transparent), 0 16px 34px -14px rgba(0, 0, 0, .7); }
.hv:hover i, .hv:focus-visible i { opacity: 1; }
.hv.soon i { opacity: .4; }
.hv:focus-visible { outline: 2px solid var(--line-3); outline-offset: 4px; }
@media (max-width: 900px) {
  .sys-top { grid-template-columns: 1fr; gap: 8px; min-height: 0; }
  .hive-name { margin-top: 24px; }
  .hive { --step: 70px; --size: 58px; }
}
@media (max-width: 420px) { .hive { --step: 62px; --size: 52px; } }
@media (prefers-reduced-motion: reduce) { .hv { transition: none; } }
