/* Workspace catalogue + detail pages. Loaded after /assets/site.css.
   The workspace uses a cool, neutral base and one colour per genre/category,
   so the screenshots carry the page. The brand orange is kept to the logo. */
:root {
  --ws-bg: #0a0b0d;
  --ws-surface: #121418;
  --ws-surface-2: #181b20;
  --ws-line: rgba(220, 230, 255, .08);
  --ws-line-2: rgba(220, 230, 255, .16);
  --ws-text: #f3f5f8;
  --ws-muted: #a4acb9;
  --ws-faint: #7d8593;
  --hue: #8ab4ff;
}
body.ws { background: var(--ws-bg); color: var(--ws-text); }
body.ws .site-header { background: rgba(10,11,13,.78); border-bottom-color: var(--ws-line); }
body.ws .nav { border-color: var(--ws-line); }
body.ws .btn-primary { background: #f3f5f8; color: #0a0b0d; }
body.ws .btn-primary:hover { background: #fff; }
body.ws .btn-ghost { border-color: var(--ws-line-2); }
body.ws :focus-visible { outline-color: var(--hue); }
body.ws ::selection { background: var(--hue); color: #0a0b0d; }

/* ---------- listing hero ---------- */
.cat-hero { position: relative; overflow: hidden; padding: 56px 0 32px; border-bottom: 1px solid var(--ws-line); }
.cat-hero .mosaic { position: absolute; inset: -40px -10% auto; height: 420px; display: grid; grid-template-columns: repeat(8, 1fr); gap: 10px; opacity: .16; transform: rotate(-6deg); pointer-events: none; z-index: 0;
  -webkit-mask-image: linear-gradient(90deg, transparent 30%, #000 75%), linear-gradient(180deg, #000 20%, transparent 95%); mask-image: linear-gradient(90deg, transparent 30%, #000 75%); }
.cat-hero .mosaic img { width: 100%; aspect-ratio: 16/11; object-fit: cover; border-radius: 10px; }
.cat-hero .wrap { position: relative; z-index: 1; }
.cat-hero h1 { font-size: clamp(40px, 8vw, 80px); letter-spacing: -.045em; line-height: .95; margin: 16px 0 14px; }
.cat-hero p.lede { color: var(--ws-muted); font-size: clamp(16px, 2vw, 19px); max-width: 52ch; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ws-faint); }
.crumbs a { color: var(--ws-muted); display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
.crumbs a:hover { color: var(--ws-text); }
.crumbs span { display: inline-flex; align-items: center; min-height: 44px; }

.toolbar { position: sticky; top: 68px; z-index: 20; background: rgba(10,11,13,.86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--ws-line); }
.toolbar .wrap { display: flex; flex-direction: column; gap: 12px; padding-top: 14px; padding-bottom: 14px; }
.search { position: relative; max-width: 520px; width: 100%; }
.search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--ws-faint); pointer-events: none; }
.search input { width: 100%; min-height: 48px; border-radius: 14px; border: 1px solid var(--ws-line-2); background: var(--ws-surface); color: var(--ws-text); font: inherit; font-size: 16px; padding: 0 16px 0 46px; transition: border-color .2s, box-shadow .2s; }
.search input:focus { outline: none; border-color: var(--hue); box-shadow: 0 0 0 4px color-mix(in srgb, var(--hue) 22%, transparent); }
.chips-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--gutter) * -1); padding: 2px var(--gutter); }
.chips-row::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--ws-line-2); background: transparent; color: var(--ws-muted); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; transition: all .2s; }
.chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--c, #fff); }
.chip:hover { color: var(--ws-text); border-color: rgba(220,230,255,.3); }
.chip[aria-pressed="true"] { background: var(--ws-text); color: #0a0b0d; border-color: var(--ws-text); }
.chip small { font-size: 12px; opacity: .6; font-variant-numeric: tabular-nums; }
@media (min-width: 900px) { .toolbar .wrap { flex-direction: row; align-items: center; } .chips-row { margin: 0; padding: 2px 0; flex-wrap: wrap; overflow: visible; } }

/* ---------- featured row ---------- */
.featured { display: grid; gap: 16px; margin: 32px 0 8px; }
.feat { position: relative; display: block; border-radius: 22px; overflow: hidden; aspect-ratio: 16/10; border: 1px solid var(--ws-line); background: #000; isolation: isolate; }
.feat img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); z-index: -1; }
.feat::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(5,6,8,.92)); z-index: -1; }
.feat:hover img { transform: scale(1.05); }
.feat .meta { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px; display: grid; gap: 6px; }
.feat h3 { font-size: clamp(24px, 3vw, 34px); letter-spacing: -.03em; }
.feat p { color: #c9d0db; font-size: 15px; max-width: 42ch; }
.feat .play { position: absolute; right: 18px; top: 18px; }
@media (min-width: 800px) { .featured { grid-template-columns: 1.4fr 1fr; grid-template-rows: 1fr 1fr; } .featured .feat:first-child { grid-row: 1 / 3; aspect-ratio: auto; min-height: 440px; } .featured .feat:not(:first-child) { aspect-ratio: auto; min-height: 210px; } }

/* ---------- grid ---------- */
.cat-section { padding: 32px 0 96px; }
.count-line { color: var(--ws-faint); font-size: 14px; margin: 24px 0 16px; }
.ws-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 760px) { .ws-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } }
@media (min-width: 1100px) { .ws-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tile-card { position: relative; display: flex; flex-direction: column; min-width: 0; border-radius: 18px; overflow: hidden; background: var(--ws-surface); border: 1px solid var(--ws-line);
  transition: transform .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease); }
.tile-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--c) 55%, transparent); box-shadow: 0 24px 48px -28px color-mix(in srgb, var(--c) 70%, transparent); }
.tile-card .shot { position: relative; aspect-ratio: 16/10; overflow: hidden; background: linear-gradient(135deg, color-mix(in srgb, var(--c) 30%, #111), #0b0c0f); }
.tile-card .shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.tile-card:hover .shot img { transform: scale(1.06); }
.tile-card .shot .go { position: absolute; right: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 12px; border-radius: 999px; background: rgba(255,255,255,.94); color: #0a0b0d; font-size: 12px; font-weight: 700; opacity: 0; transform: translateY(6px); transition: all .3s var(--ease); }
.tile-card:hover .go, .tile-card:focus-visible .go { opacity: 1; transform: none; }
.tile-card .tc-body { padding: 12px 14px 14px; display: grid; gap: 4px; }
.tile-card h3 { font-size: 16px; letter-spacing: -.015em; line-height: 1.25; }
.tile-card p { color: var(--ws-muted); font-size: 13px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.genre { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--c); }
.genre::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.tile-card .building { position: absolute; left: 10px; top: 10px; font-size: 11px; padding: 3px 10px; border-radius: 999px; background: rgba(0,0,0,.7); color: var(--ws-muted); }
@media (min-width: 760px) { .tile-card h3 { font-size: 18px; } .tile-card p { font-size: 14px; } .tile-card .tc-body { padding: 16px 18px 18px; gap: 6px; } }
@media (max-width: 599px) { .tile-card p { display: none; } }
.empty { padding: 64px 0; text-align: center; color: var(--ws-muted); }

/* ---------- workspace footer ---------- */
body.ws .site-footer { background: var(--ws-bg); border-top-color: var(--ws-line); }

/* ---------- detail pages (games and tools) ---------- */
.d-hero { position: relative; overflow: hidden; isolation: isolate; border-bottom: 1px solid var(--ws-line); }
.d-hero .bg { position: absolute; inset: -40px; z-index: -2; background-size: cover; background-position: center; filter: blur(36px) saturate(1.3) brightness(.45); transform: scale(1.1); }
.d-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(10,11,13,.35), var(--ws-bg) 96%); }
.d-hero .wrap { display: grid; gap: 24px; padding-top: 28px; padding-bottom: 32px; align-items: center; }
.d-hero h1 { font-size: clamp(36px, 6.4vw, 64px); letter-spacing: -.045em; line-height: 1; margin: 12px 0 12px; }
.d-hero .lede { color: #c9d0db; font-size: clamp(16px, 1.8vw, 19px); max-width: 52ch; }
.d-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.d-tags span { font-size: 12px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--ws-line-2); color: var(--ws-muted); background: rgba(255,255,255,.03); }
.d-tags span.g { color: var(--hue); border-color: color-mix(in srgb, var(--hue) 45%, transparent); }
.d-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.d-shot { display: none; border-radius: 18px; overflow: hidden; border: 1px solid var(--ws-line-2); box-shadow: 0 40px 80px -40px rgba(0,0,0,.9); aspect-ratio: 16/10; background: #000; }
.d-shot img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 900px) { .d-hero .wrap { grid-template-columns: 1.1fr .9fr; padding-top: 40px; padding-bottom: 48px; } .d-shot { display: block; } }
.d-how { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin: 28px 0 0; }
.d-how li { padding: 16px 18px; border-radius: 14px; background: var(--ws-surface); border: 1px solid var(--ws-line); font-size: 14px; color: var(--ws-muted); }
.d-how b { display: block; color: var(--ws-text); font-family: var(--font-display); font-size: 15px; margin-bottom: 2px; }
.d-stage { padding: 28px 0 24px; }
.d-stage-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.d-stage-head h2 { font-size: 20px; letter-spacing: -.02em; }
.d-more { padding: 24px 0 88px; }
.d-more h2 { font-size: clamp(24px, 3vw, 32px); letter-spacing: -.03em; margin-bottom: 18px; }

body[data-kind="tools"] .feat::after{display:none}
body[data-kind="tools"] .feat img{object-position:left top}
body[data-kind="tools"] .feat .play{top:auto;bottom:18px}
