/* Home catalogue bento (Nov 30 2026). Each tile is a small window into its
   panel: a labelled screen on top, name, price and line below. Business OS
   keeps its orange slab with the six role cards, lit one at a time.
   Selectors start with :root .hcl .cg so they outrank pro.css. */

:root .hcl .bento.cg {
  --scr: #f4f4f5;
  --scr-line: rgb(12 12 13 / .06);
  --cg-ease: cubic-bezier(.32, .72, 0, 1);
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: auto;
  gap: 12px;
}
:root.dark .hcl .cg { --scr: #0f0f10; --scr-line: rgb(255 255 255 / .05); }

/* ---------- every tile ---------- */
:root .hcl .cg .tile { padding: 6px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); box-shadow: none; transform: none; transition: border-color .4s var(--cg-ease); }
:root .hcl .cg .tile:hover { transform: none; box-shadow: none; border-color: var(--line-2); }
:root .hcl .cg .cg-txt { display: flex; flex-direction: column; padding: 18px 18px 18px; }
:root .hcl .cg .tile-name { font: 600 19px/1.15 var(--f-display); letter-spacing: -.025em; color: var(--ink); }
:root .hcl .cg .tile-pr { font: 400 13px/1 var(--f-body); color: var(--ink-3); }
:root .hcl .cg .tile-pr b { font: 600 14px/1 var(--f-body); color: var(--ink); }
:root .hcl .cg .tile-copy { margin-top: 8px; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
:root .hcl .cg .tile-go { margin-top: 14px; font: 500 13.5px/1 var(--f-body); color: var(--ink); }
:root .hcl .cg .tile-go::after { display: inline-block; content: "\2192"; margin-left: 6px; color: var(--accent); transition: transform .45s var(--cg-ease); }
:root .hcl .cg .tile:hover .tile-go::after { transform: translateX(3px); }
:root .hcl .cg .tile-go:hover { text-decoration: none; }

/* the screen */
:root .hcl .cg .cg-scr { flex: none; position: relative; display: flex; flex-direction: column; justify-content: flex-start; gap: 0; min-height: 188px; margin: 0; padding: 16px 16px 18px; border-radius: 12px; background: var(--scr); box-shadow: inset 0 0 0 1px var(--scr-line); overflow: hidden; }
:root .hcl .cg .cg-cap { font: 500 12px/1.35 var(--f-body); letter-spacing: 0; color: var(--ink-3); }
:root .hcl .cg .cg-cap + * { margin-top: auto; padding-top: 18px; }
:root .hcl .cg .viz .big { display: block; font: 600 46px/1 var(--f-display); letter-spacing: -.05em; color: var(--ink); font-variant-numeric: tabular-nums; }
:root .hcl .cg .viz .big small { margin-left: 6px; font: 500 13px/1 var(--f-body); letter-spacing: 0; color: var(--ink-3); }
:root .hcl .cg .viz .big + * { margin-top: 14px; }

/* web: load time bars, before grey, after orange */
:root .hcl .cg .viz .bars { height: 38px; gap: 3px; }
:root .hcl .cg .viz .bars i { border-radius: 2px; background: color-mix(in srgb, var(--ink) 16%, transparent); }
:root .hcl .cg .viz .bars i:nth-child(n+9) { background: var(--accent); }

/* mail */
:root .hcl .cg .viz .checks i { height: 28px; padding: 0 10px; font: 500 12px/1 var(--f-mono); }

/* runtime: the screen is a terminal in both themes */
:root .hcl .cg .tile--term { background: var(--surface); color: var(--ink); border-color: var(--line); }
:root .hcl .cg .tile--term .tile-copy { color: var(--ink-2); }
:root .hcl .cg .tile--term .tile-pr { color: var(--ink-3); }
:root .hcl .cg .tile--term .tile-pr b, :root .hcl .cg .tile--term .tile-go { color: var(--ink); }
:root .hcl .cg .tile--term .tile-go::after { color: var(--accent); }
:root .hcl .cg .viz-runtime { background: #0c0c0d; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .06); }
:root .hcl .cg .viz-runtime .cg-cap { color: #85858b; }
:root .hcl .cg .viz .logs { gap: 7px; }
:root .hcl .cg .viz .logs i { font: 400 12px/1.4 var(--f-mono); color: #9a9aa0; }
:root .hcl .cg .viz .logs i.ok { color: #7ee2a8; }

/* database: same query, two bars, no track */
:root .hcl .cg .viz .hbars { display: flex; flex-direction: column; gap: 12px; padding: 0; }
:root .hcl .cg .viz .hbars i { position: static; display: grid; grid-template-columns: 50px minmax(0, 1fr) 52px; align-items: center; gap: 10px; width: auto; height: auto; min-width: 0; background: none; border-radius: 0; }
:root .hcl .cg .viz .hbars i::before { content: ""; grid-column: 2; grid-row: 1; width: var(--w); min-width: 5px; height: 18px; border-radius: 4px; background: color-mix(in srgb, var(--ink) 22%, transparent); transform-origin: 0 50%; }
:root .hcl .cg .viz .hbars i:last-child::before { background: var(--accent); }
:root .hcl .cg .viz .hbars u { grid-column: 1; grid-row: 1; text-decoration: none; font: 500 12.5px/1 var(--f-body); color: var(--ink-2); }
:root .hcl .cg .viz .hbars em { position: static; translate: none; grid-column: 3; grid-row: 1; text-align: right; font: 500 12.5px/1 var(--f-mono); color: var(--ink); }

/* self-hosted apps: what's installed and its state */
:root .hcl .cg .viz .apps { display: flex; flex-direction: column; flex-wrap: nowrap; gap: 0; }
:root .hcl .cg .viz .apps i { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-radius: 0; background: none; border-top: 1px solid var(--scr-line); font: 500 13px/1 var(--f-body); color: var(--ink); }
:root .hcl .cg .viz .apps i:first-child { border-top: 0; }
:root .hcl .cg .viz .apps em { font: 500 12px/1 var(--f-mono); color: var(--ink-3); }
:root .hcl .cg .viz .apps em.up { color: var(--accent); }

/* game: players online */
:root .hcl .cg .viz .dots { grid-template-columns: repeat(10, 12px); gap: 7px; }
:root .hcl .cg .viz .dots i { width: 12px; height: 12px; background: color-mix(in srgb, var(--ink) 12%, transparent); }
:root .hcl .cg .viz .dots i.on { background: var(--ok); }

/* storage: one segmented bar and its key */
:root .hcl .cg .viz .store { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
:root .hcl .cg .viz .store .seg { display: flex; gap: 3px; height: 12px; padding: 0; border-radius: 3px; background: color-mix(in srgb, var(--ink) 7%, transparent); }
:root .hcl .cg .viz .store .seg i { display: block; flex: none; width: var(--w); height: 100%; border-radius: 3px; background: var(--accent); overflow: visible; }
:root .hcl .cg .viz .store .seg i::after { content: none; }
:root .hcl .cg .viz .store .seg i:nth-child(2) { background: color-mix(in srgb, var(--ink) 55%, transparent); }
:root .hcl .cg .viz .store .seg i:nth-child(3) { background: color-mix(in srgb, var(--ink) 25%, transparent); }
:root .hcl .cg .viz .store .key { display: flex; gap: 16px; flex-wrap: wrap; }
:root .hcl .cg .viz .store em { display: inline-flex; align-items: center; gap: 7px; font: 500 12px/1 var(--f-mono); color: var(--ink-2); }
:root .hcl .cg .viz .store em::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); }
:root .hcl .cg .viz .store em:nth-child(2)::before { background: color-mix(in srgb, var(--ink) 55%, transparent); }
:root .hcl .cg .viz .store em:nth-child(3)::before { background: color-mix(in srgb, var(--ink) 25%, transparent); }

/* voice */
:root .hcl .cg .viz .wave { height: 72px; gap: 3px; }
:root .hcl .cg .viz .wave i { background: color-mix(in srgb, var(--ink) 72%, transparent); }
:root .hcl .cg .viz .wave i:nth-child(4n) { background: var(--accent); }

/* ---------- wide tiles: words left, screen right ---------- */
:root .hcl .cg .tile--wide { grid-column: span 2; display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 6px; }
:root .hcl .cg .tile--wide .cg-scr { grid-column: 2; grid-row: 1; flex-direction: column; align-items: stretch; justify-content: flex-start; min-height: 176px; }
:root .hcl .cg .tile--wide .cg-txt { grid-column: 1; grid-row: 1; justify-content: flex-end; padding: 20px 18px 18px 20px; }
:root .hcl .cg .tile--wide .tile-top { flex-direction: column; align-items: flex-start; gap: 8px; }
:root .hcl .cg .tile--wide .viz .wave, :root .hcl .cg .tile--wide .viz .apps { flex: none; width: auto; }

/* ---------- Business OS: the team working through a day ---------- */
:root .hcl .cg .tile--os { grid-column: span 2; grid-row: span 2; padding: 32px; border-radius: 18px; border-color: transparent; background: var(--accent); color: var(--on-accent); }
:root .hcl .cg .tile--os:hover { border-color: transparent; }
:root .hcl .cg .tile--os .tile-name { font: 600 clamp(34px, 3.2vw, 48px)/1 var(--f-display); letter-spacing: -.045em; color: var(--on-accent); }
:root .hcl .cg .tile--os .tile-pr { color: rgb(23 18 15 / .65); font-size: 14px; }
:root .hcl .cg .tile--os .tile-pr b { color: var(--on-accent); font-size: 16px; }
:root .hcl .cg .tile--os .tile-copy { max-width: 40ch; margin-top: 12px; font-size: 15.5px; color: rgb(23 18 15 / .8); }
:root .hcl .cg .tile--os .tile-go { margin-top: 22px; font-size: 14.5px; color: var(--on-accent); }
:root .hcl .cg .tile--os .tile-go::after { color: var(--on-accent); }

:root .hcl .cg .tile--os .cg-team { flex: 1; display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 8px; margin: 32px 0 0; }
:root .hcl .cg .tile--os .cg-team i { position: relative; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto 1fr; align-items: start; gap: 0 8px; min-height: 0; padding: 16px 16px 20px; border: 1px solid rgb(23 18 15 / .2); border-radius: 12px; background: transparent; color: var(--on-accent); overflow: hidden; transition: background .45s var(--cg-ease), border-color .45s var(--cg-ease), color .45s var(--cg-ease); }
:root .hcl .cg .tile--os .cg-team b { font: 500 12.5px/1 var(--f-mono); color: rgb(23 18 15 / .62); transition: color .45s var(--cg-ease); }
:root .hcl .cg .tile--os .cg-team s { justify-self: end; text-decoration: none; font: 500 12px/1 var(--f-body); color: rgb(23 18 15 / .62); opacity: 0; transition: opacity .45s var(--cg-ease), color .45s var(--cg-ease); }
:root .hcl .cg .tile--os .cg-team s::before { content: "\2713"; margin-right: 5px; }
:root .hcl .cg .tile--os .cg-team span { grid-column: 1 / -1; align-self: end; display: block; padding-top: 28px; font: 500 16px/1.25 var(--f-body); letter-spacing: -.015em; color: inherit; white-space: normal; }
:root .hcl .cg .tile--os .cg-team i.done { background: rgb(23 18 15 / .07); border-color: rgb(23 18 15 / .14); }
:root .hcl .cg .tile--os .cg-team i.done s { opacity: 1; }
:root .hcl .cg .tile--os .cg-team i.on { background: #17120f; border-color: #17120f; color: #f4f1ee; }
:root .hcl .cg .tile--os .cg-team i.on b { color: var(--accent); }
:root .hcl .cg .tile--os .cg-team i.on span { color: #fff; }
:root .hcl .cg .tile--os .cg-team i::after { content: ""; position: absolute; left: 16px; right: 16px; bottom: 9px; height: 2px; border-radius: 2px; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; opacity: 0; }
:root .hcl .cg .tile--os .cg-team i.on::after { opacity: 1; animation: cg-turn 1.9s linear forwards; }
@keyframes cg-turn { to { transform: scaleX(1); } }

@media (prefers-reduced-motion: reduce) {
  :root .hcl .cg .tile-go::after { transition: none; }
}

/* ---------- smaller screens ---------- */
@media (max-width: 1100px) {
  :root .hcl .bento.cg { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  :root .hcl .cg .tile--os { grid-row: span 1; }
}
@media (max-width: 760px) {
  :root .hcl .cg .tile--wide { display: flex; flex-direction: column; }
  :root .hcl .cg .tile--wide .cg-scr { min-height: 188px; }
  :root .hcl .cg .tile--wide .cg-txt { padding: 18px; }
  :root .hcl .cg .tile--wide .tile-top { flex-direction: row; align-items: baseline; justify-content: space-between; }
}
@media (max-width: 600px) {
  :root .hcl .bento.cg { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  :root .hcl .cg .tile, :root .hcl .cg .tile--os, :root .hcl .cg .tile--wide { grid-column: span 1; }
  :root .hcl .cg .tile { padding: 5px; }
  :root .hcl .cg .tile--os { padding: 22px; }
  :root .hcl .cg .tile--os .tile-name { font-size: 34px; }
  :root .hcl .cg .tile--os .cg-team { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 20px; }
  :root .hcl .cg .tile--os .cg-team i { padding: 12px 12px 16px; }
  :root .hcl .cg .tile--os .cg-team span { display: block; padding-top: 18px; font-size: 14px; }
  :root .hcl .cg .tile--os .cg-team s { display: none; }
  :root .hcl .cg .cg-scr { min-height: 164px; }
  :root .hcl .cg .viz .big { font-size: 40px; }
  :root .hcl .cg .viz .dots { grid-template-columns: repeat(10, minmax(0, 12px)); }
}
