/* ─────────────────────────────────────────────────────────────
   hook-grid.css — garrenwood.com Hook Grid

   Palette and type mirror hook-compare.css so the grid reads as the
   same tool family without importing its ~400 KB bundle. Every rule is
   scoped under #hook-grid-root; the surface is a shortcode dropped on
   an ordinary page and must not restyle the theme around it.

   Width breaks OUT of the theme's content column, by the same
   left:50% / translateX(-50%) trick #hook-compare-root uses. The first
   build stayed inside the column on the theory that a viewport-width
   block would break the page grid; on the real site that made the grid
   narrower than its own content and put a horizontal scrollbar under a
   matrix that had room to spare. A grid is the one surface where width
   IS the feature.
   ───────────────────────────────────────────────────────────── */

#hook-grid-root,
#hook-grid-root *,
#hook-grid-root *::before,
#hook-grid-root *::after { box-sizing: border-box; }

/* ── The page behind the tool ───────────────────────────────────
 *
 * These tools are a near-black slab, and the theme paints the page white
 * around them — a bright surround against a dark panel, which is the glare
 * you notice at the edges rather than in the tool.
 *
 * `--gwd-paper` is not a new colour: it is the ground every hook reference
 * and /mini/ page already paints, off the same `body:has()` idiom, in
 * assets/public/gw-hook-dossier.css. So this is as much a consistency fix as
 * a comfort one — the ground stops changing when a visitor moves from a hook
 * page to Compare.
 *
 * These surfaces are shortcodes on ordinary pages, so Public_Assets — which
 * gates the dossier skin on plugin TEMPLATE slugs — never loads it here. The
 * token used to carry a literal fallback for that. Since 3.0.173 this sheet
 * depends on the token sheet (gw-tokens.css, named by hc_grid_enqueue when it is
 * registered), so the token is always defined and the ground follows the theme.
 *
 * Scoped with :has() rather than set on body outright: hook-compare.css also
 * loads on the comparison CPT and its archive, and those are not this tool.
 * A browser without :has() keeps the white page and loses nothing else.
 */
body:has(#hook-grid-root) { background: var(--gwd-paper); }

/* theme: fixed-begin — THE HOOK GRID IS A DARK APP IN BOTH THEMES, like the Compare tool it mirrors
 * (its palette is the `--hg-*` properties below). What follows the theme is the page around it, painted
 * by the rule above and gw-theme.css; this stretch, to the end of the sheet, is exempt from the colour
 * ratchet as a region (tools/theme-colour-scan.php). */

#hook-grid-root {
    --hg-bg:         #1c1c1c;
    --hg-bg-mid:     #232323;
    --hg-bg-raised:  #2a2a2a;
    --hg-bg-hover:   #303030;
    --hg-bg-input:   #252525;

    --hg-text:       #e8e4dc;
    --hg-text-mid:   #a8a49c;
    --hg-text-faint: #888480;

    --hg-gold:       #c8a050;
    --hg-gold-light: #d4b468;
    --hg-gold-dim:   #3a2c14;

    --hg-border:     #303030;
    --hg-border-mid: #3e3e3e;
    --hg-border-hi:  #4e4a46;

    --hg-shadow:     0 2px 12px rgba(0,0,0,.5);
    --hg-shadow-lg:  0 6px 28px rgba(0,0,0,.7);
    --hg-radius:     3px;
    --hg-radius-lg:  6px;

    --hg-serif:  Georgia, 'Times New Roman', serif;
    --hg-mono:   'Courier New', Courier, monospace;
    --hg-ui:     system-ui, -apple-system, sans-serif;

    font-family: var(--hg-ui);
    color: var(--hg-text);
    background: var(--hg-bg);
    border: 1px solid var(--hg-border-mid);
    border-radius: var(--hg-radius-lg);
    overflow: hidden;

    /* Break out of the theme's narrow content column, centred at any width.
       Same values as #hook-compare-root so the two tools line up when they
       sit on sibling pages. position:relative is also what the expand
       overlay and the slide-over panel are positioned against. */
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    width: min(95vw, 1640px);
    max-width: 95vw;
}

/* ── Header ─────────────────────────────────────────────── */
#hook-grid-root .hg-head {
    display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
    padding: 16px 20px 14px;
    border-bottom: 1px solid var(--hg-border);
    background: linear-gradient(180deg, #202020, var(--hg-bg));
}
#hook-grid-root .hg-head h2 {
    margin: 0; font-family: var(--hg-serif); font-size: 21px;
    letter-spacing: .01em; font-weight: 600; color: var(--hg-text);
    border: 0; padding: 0; text-transform: none;
}
#hook-grid-root .hg-head .hg-sub { color: var(--hg-text-mid); font-size: 12.5px; }
#hook-grid-root .hg-spacer { flex: 1; }
/* ── Control bar ────────────────────────────────────────── */
#hook-grid-root .hg-controls {
    padding: 12px 20px; border-bottom: 1px solid var(--hg-border);
    background: var(--hg-bg-mid);
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px;
}
#hook-grid-root .hg-ctl { display: flex; align-items: center; gap: 7px; }
#hook-grid-root .hg-ctl > label {
    font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase;
    color: var(--hg-text-faint); font-weight: 600;
}
#hook-grid-root .hg-select,
#hook-grid-root .hg-search {
    background: var(--hg-bg-input); color: var(--hg-text);
    border: 1px solid var(--hg-border-mid); border-radius: var(--hg-radius);
    padding: 6px 9px; font-size: 13px; font-family: var(--hg-ui);
    max-width: 100%;
}
#hook-grid-root .hg-select:focus,
#hook-grid-root .hg-search:focus { outline: none; border-color: var(--hg-gold); }
#hook-grid-root .hg-search { min-width: 190px; }

#hook-grid-root .hg-swap {
    background: var(--hg-bg-raised); color: var(--hg-text-mid);
    border: 1px solid var(--hg-border-mid); border-radius: var(--hg-radius);
    padding: 6px 9px; cursor: pointer; font-size: 13px; line-height: 1;
}
#hook-grid-root .hg-swap:hover { color: var(--hg-gold); border-color: var(--hg-border-hi); }

/* segmented toggle */
#hook-grid-root .hg-seg {
    display: inline-flex; border: 1px solid var(--hg-border-mid);
    border-radius: var(--hg-radius); overflow: hidden;
}
#hook-grid-root .hg-seg button {
    background: var(--hg-bg-input); color: var(--hg-text-mid); border: 0;
    padding: 6px 12px; font-size: 12px; cursor: pointer; font-family: var(--hg-ui);
}
#hook-grid-root .hg-seg button + button { border-left: 1px solid var(--hg-border-mid); }
#hook-grid-root .hg-seg button[aria-pressed="true"] {
    background: var(--hg-gold-dim); color: var(--hg-gold-light); font-weight: 600;
}

#hook-grid-root .hg-check {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12.5px; color: var(--hg-text-mid); cursor: pointer;
}
#hook-grid-root .hg-check input { accent-color: var(--hg-gold); }

/* ── Chip pickers ───────────────────────────────────────── */
#hook-grid-root .hg-pickers { border-bottom: 1px solid var(--hg-border); background: var(--hg-bg); }
#hook-grid-root .hg-picker { display: flex; align-items: flex-start; gap: 10px; padding: 9px 20px; }
#hook-grid-root .hg-picker + .hg-picker { border-top: 1px solid #262626; }
#hook-grid-root .hg-picker > .hg-picker-label {
    flex: 0 0 108px; padding-top: 5px;
    font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase;
    color: var(--hg-text-faint); font-weight: 600;
}
#hook-grid-root .hg-chips { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }
#hook-grid-root .hg-chip {
    display: inline-flex; align-items: center; gap: 7px;
    background: var(--hg-bg-raised); border: 1px solid var(--hg-border-mid);
    border-radius: 999px; padding: 4px 6px 4px 11px; font-size: 12.5px;
    color: var(--hg-text);
}
#hook-grid-root .hg-chip .hg-chip-n {
    color: var(--hg-text-faint); font-size: 11px; font-family: var(--hg-mono);
}
#hook-grid-root .hg-chip button {
    background: none; border: 0; color: var(--hg-text-faint); cursor: pointer;
    font-size: 14px; line-height: 1; padding: 0 4px; border-radius: 999px;
}
#hook-grid-root .hg-chip button:hover { color: #e07a5f; }

/* presets */
#hook-grid-root .hg-presets { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; flex: 1; }
#hook-grid-root .hg-preset {
    background: var(--hg-bg-raised); border: 1px solid var(--hg-border-mid);
    color: var(--hg-text); border-radius: 999px; padding: 5px 13px;
    font-size: 12.5px; cursor: pointer; font-family: var(--hg-ui); white-space: nowrap;
}
#hook-grid-root .hg-preset:hover { border-color: var(--hg-border-hi); color: var(--hg-gold-light); }
#hook-grid-root .hg-preset.is-active {
    background: var(--hg-gold-dim); border-color: rgba(200,160,80,.5);
    color: var(--hg-gold-light); font-weight: 600;
}
#hook-grid-root .hg-preset-hint {
    flex: 1 1 240px; min-width: 200px; padding-left: 4px;
    font-size: 11.5px; color: var(--hg-text-faint); line-height: 1.4;
}
#hook-grid-root .hg-picker.hg-picker-presets { background: #202020; border-bottom: 1px solid #262626; }

#hook-grid-root .hg-add { position: relative; }
#hook-grid-root .hg-add > button {
    background: transparent; border: 1px dashed var(--hg-border-hi);
    color: var(--hg-text-mid); border-radius: 999px; padding: 4px 12px;
    font-size: 12.5px; cursor: pointer; font-family: var(--hg-ui);
}
#hook-grid-root .hg-add > button:hover { color: var(--hg-gold); border-color: var(--hg-gold); }
#hook-grid-root .hg-menu {
    position: absolute; z-index: 40; top: calc(100% + 6px); left: 0;
    min-width: 230px; max-height: 320px; overflow-y: auto;
    background: var(--hg-bg-raised); border: 1px solid var(--hg-border-hi);
    border-radius: var(--hg-radius); box-shadow: var(--hg-shadow-lg); padding: 5px;
}
#hook-grid-root .hg-menu[hidden] { display: none; }
#hook-grid-root .hg-menu button {
    display: flex; justify-content: space-between; gap: 14px; width: 100%;
    background: none; border: 0; color: var(--hg-text); text-align: left;
    padding: 6px 9px; font-size: 13px; cursor: pointer; border-radius: 2px;
    font-family: var(--hg-ui);
}
#hook-grid-root .hg-menu button:hover { background: var(--hg-bg-hover); color: var(--hg-gold-light); }
#hook-grid-root .hg-menu button span {
    color: var(--hg-text-faint); font-family: var(--hg-mono); font-size: 11px;
}
#hook-grid-root .hg-menu .hg-menu-empty {
    color: var(--hg-text-faint); font-size: 12px; padding: 8px 9px;
}

/* ── Grid ───────────────────────────────────────────────── */
/* Sticky headers and a capped scroll box are not decoration: a grid whose
   axis labels scroll away is not a grid — you cannot say what a cell means. */
#hook-grid-root .hg-scroll { overflow: auto; max-height: 74vh; }
#hook-grid-root table.hg-grid {
    border-collapse: separate; border-spacing: 0; width: 100%; margin: 0;
}

#hook-grid-root table.hg-grid th,
#hook-grid-root table.hg-grid td {
    border-right: 1px solid var(--hg-border);
    border-bottom: 1px solid var(--hg-border);
    padding: 0;
}
#hook-grid-root table.hg-grid thead th {
    position: sticky; top: 0; z-index: 20;
    background: #262626; color: var(--hg-text);
    font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase;
    font-weight: 700; padding: 11px 12px; text-align: center;
    min-width: 132px; white-space: nowrap;
}
#hook-grid-root table.hg-grid thead th .hg-colmeta {
    display: block; font-size: 10px; letter-spacing: .04em;
    text-transform: none; color: var(--hg-text-faint);
    font-family: var(--hg-mono); font-weight: 400; margin-top: 3px;
}
#hook-grid-root table.hg-grid thead th.hg-corner {
    left: 0; z-index: 30; text-align: left; min-width: 150px;
    background: #2b2b2b; color: var(--hg-gold);
}
#hook-grid-root table.hg-grid tbody th {
    position: sticky; left: 0; z-index: 10;
    background: #262626; text-align: left; padding: 10px 12px;
    font-size: 12.5px; font-weight: 600; min-width: 150px;
    border-right: 1px solid var(--hg-border-hi);
}
#hook-grid-root table.hg-grid tbody th .hg-rowmeta {
    display: block; font-size: 10px; color: var(--hg-text-faint);
    font-family: var(--hg-mono); font-weight: 400; margin-top: 3px;
}
#hook-grid-root table.hg-grid tbody td { height: 74px; }
#hook-grid-root table.hg-grid tbody tr.hg-row-all th {
    background-image: linear-gradient(rgba(200,160,80,.06), rgba(200,160,80,.06));
}
#hook-grid-root table.hg-grid tbody tr.hg-row-all .hg-cell {
    background-image: linear-gradient(rgba(200,160,80,.05), rgba(200,160,80,.05));
}

/* ── Cells ──────────────────────────────────────────────── */
#hook-grid-root .hg-cell {
    position: relative; min-height: 74px; height: 100%;
    padding: 9px 10px;
    display: flex; flex-direction: column; gap: 6px;
    background: var(--hg-bg);
    transition: background .12s;
}
#hook-grid-root .hg-cell.is-empty { background: #191919; }
#hook-grid-root .hg-cell:not(.is-empty):hover { background: var(--hg-bg-hover); }

#hook-grid-root .hg-count {
    position: relative; z-index: 2;
    font-family: var(--hg-mono); font-size: 17px; font-weight: 700;
    color: var(--hg-gold-light); line-height: 1;
}
#hook-grid-root .hg-na { color: #565452; font-style: italic; }
#hook-grid-root .hg-count .hg-count-sub {
    font-size: 10px; color: var(--hg-text-faint); font-weight: 400; margin-left: 5px;
}
#hook-grid-root .hg-cell.is-empty .hg-count {
    color: #3a3a3a; font-weight: 400; font-size: 13px;
}

#hook-grid-root .hg-codes { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: 4px; }
#hook-grid-root .hg-code {
    font-family: var(--hg-mono); font-size: 11px; letter-spacing: .01em;
    background: var(--hg-bg-raised); border: 1px solid var(--hg-border-mid);
    border-radius: 2px; padding: 2px 5px; color: var(--hg-text-mid);
}
#hook-grid-root .hg-code.is-spec {
    border-style: dashed; color: var(--hg-gold); border-color: var(--hg-gold-dim);
}
#hook-grid-root .hg-more { font-size: 10.5px; color: var(--hg-text-faint); align-self: center; }

/* heat mode */
#hook-grid-root .hg-cell.mode-heat { align-items: center; justify-content: center; padding: 14px 10px; }
#hook-grid-root .hg-cell.mode-heat .hg-count { font-size: 21px; }
#hook-grid-root .hg-heatfill {
    position: absolute; inset: 0; background: var(--hg-gold); pointer-events: none;
}

/* magnifier */
#hook-grid-root .hg-zoom {
    position: absolute; top: 6px; right: 6px; z-index: 3;
    width: 24px; height: 24px; border-radius: 3px;
    background: rgba(42,42,42,.9); border: 1px solid var(--hg-border-mid);
    color: var(--hg-text-mid); cursor: pointer;
    display: grid; place-items: center; padding: 0;
    opacity: 0; transition: opacity .12s, color .12s, border-color .12s;
}
#hook-grid-root .hg-cell:hover .hg-zoom,
#hook-grid-root .hg-zoom:focus-visible { opacity: 1; }
#hook-grid-root .hg-zoom:hover { color: var(--hg-gold); border-color: var(--hg-gold); }
#hook-grid-root .hg-zoom svg { width: 13px; height: 13px; }

/* ── Expanded cell overlay ──────────────────────────────── */
#hook-grid-root .hg-expand {
    position: absolute; inset: 0; z-index: 60;
    background: rgba(16,16,16,.96);
    display: flex; flex-direction: column;
    animation: hg-fade .14s ease-out;
}
#hook-grid-root .hg-expand[hidden] { display: none; }
@keyframes hg-fade { from { opacity: 0; } to { opacity: 1; } }

#hook-grid-root .hg-expand-head {
    display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
    padding: 15px 20px; border-bottom: 1px solid var(--hg-border-mid);
    background: var(--hg-bg-mid);
}
#hook-grid-root .hg-expand-head h3 {
    margin: 0; font-family: var(--hg-serif); font-size: 18px; font-weight: 600;
    color: var(--hg-text); border: 0; padding: 0; text-transform: none; letter-spacing: 0;
}
#hook-grid-root .hg-expand-head h3 em { font-style: normal; color: var(--hg-gold); }
#hook-grid-root .hg-expand-head .hg-sub { color: var(--hg-text-mid); font-size: 12.5px; }
/* Print sits beside Reset view because both act on the whole view rather than
   configuring it — the bar reads configuration on the left, actions on the
   right. Quieter than Reset: it is the rarer of the two. */
/* Shown only while a date-bounded preset is active. It is a control rather
   than a caption because a filter the reader cannot see the edge of, and
   cannot switch off, is indistinguishable from missing data. */
#hook-grid-root .hg-era {
    display: inline-flex; align-items: center; gap: 4px;
    background: var(--hg-gold-dim); border: 1px solid rgba(200,160,80,.4);
    color: var(--hg-gold-light); border-radius: 999px;
    padding: 4px 5px 4px 11px; font-size: 12.5px;
}
#hook-grid-root .hg-era[hidden] { display: none; }
#hook-grid-root .hg-era button {
    background: none; border: 0; color: var(--hg-gold-light); cursor: pointer;
    font-size: 14px; line-height: 1; padding: 0 4px; border-radius: 999px;
}
#hook-grid-root .hg-era button:hover { color: #e07a5f; }

#hook-grid-root .hg-print {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--hg-bg-raised); border: 1px solid var(--hg-border-mid);
    color: var(--hg-text-mid); border-radius: var(--hg-radius);
    padding: 5px 11px; font-size: 12.5px; cursor: pointer; font-family: var(--hg-ui);
}
#hook-grid-root .hg-print:hover:not(:disabled) { color: var(--hg-gold); border-color: var(--hg-gold); }
#hook-grid-root .hg-print:disabled { opacity: .7; cursor: default; }
#hook-grid-root .hg-print svg { width: 14px; height: 14px; flex: 0 0 auto; }

#hook-grid-root .hg-close {
    background: var(--hg-bg-raised); border: 1px solid var(--hg-border-mid);
    color: var(--hg-text-mid); border-radius: var(--hg-radius);
    padding: 5px 11px; font-size: 12.5px; cursor: pointer; font-family: var(--hg-ui);
}
#hook-grid-root .hg-close:hover { color: var(--hg-gold); border-color: var(--hg-gold); }

#hook-grid-root .hg-expand-body { overflow-y: auto; padding: 16px 20px 26px; }
#hook-grid-root .hg-tiles {
    display: grid; gap: 10px;
    grid-template-columns: repeat(auto-fill, minmax(228px, 1fr));
}
#hook-grid-root .hg-tile {
    background: var(--hg-bg-mid); border: 1px solid var(--hg-border-mid);
    border-radius: var(--hg-radius); padding: 10px 11px 9px;
    cursor: pointer; text-align: left; font-family: var(--hg-ui);
    display: flex; flex-direction: column; gap: 5px;
    transition: border-color .12s, background .12s, transform .12s;
}
#hook-grid-root .hg-tile:hover {
    border-color: var(--hg-gold); background: var(--hg-bg-raised); transform: translateY(-1px);
}
#hook-grid-root .hg-tile.is-active {
    border-color: var(--hg-gold); box-shadow: inset 0 0 0 1px var(--hg-gold-dim);
}
/* The JS pins the svg's own inline height (fitSvg) because the shared loader
   writes height:auto inline and inline wins. These keep the box reserved so
   the tile does not reflow as each silhouette lands, and clip anything that
   ever escapes rather than letting it ride over the model code. */
#hook-grid-root .hg-tile-svg { height: 50px; display: block; overflow: hidden; }
#hook-grid-root .hg-tile-svg svg { width: 100%; height: 50px; display: block; }
#hook-grid-root .hg-tile-code {
    font-family: var(--hg-mono); font-size: 13px; font-weight: 700; color: var(--hg-text);
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
#hook-grid-root .hg-tile-name { font-size: 11.5px; color: var(--hg-text-mid); line-height: 1.3; }
#hook-grid-root .hg-tile-spec {
    font-size: 10.5px; color: var(--hg-text-faint); font-family: var(--hg-mono); line-height: 1.4;
}
#hook-grid-root .hg-tag {
    font-size: 9px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700;
    padding: 2px 6px; border-radius: 2px; white-space: nowrap;
}
#hook-grid-root .hg-tag.cat {
    color: #8fbf9f; background: rgba(143,191,159,.1); border: 1px solid rgba(143,191,159,.25);
}
#hook-grid-root .hg-tag.spec {
    color: var(--hg-gold); background: rgba(200,160,80,.1); border: 1px solid var(--hg-gold-dim);
}

/* ── Slide-over detail panel ────────────────────────────── */
/* The grid stays mounted behind it on purpose: the comparison being made is
   BETWEEN hooks in the cell, and any pattern that unmounts or reflows the
   cell breaks that. */
#hook-grid-root .hg-panel {
    position: absolute; top: 0; right: 0; bottom: 0; z-index: 80;
    width: min(430px, 92%);
    background: var(--hg-bg-mid); border-left: 1px solid var(--hg-border-hi);
    box-shadow: var(--hg-shadow-lg);
    display: flex; flex-direction: column;
    transform: translateX(100%);
    /* visibility rather than display:none, and rather than the hidden
       attribute: both of those skip the close transition, so the panel
       vanished instead of sliding out. The zero-duration visibility step is
       delayed by the length of the slide on the way out and immediate on the
       way in, which keeps the closed panel out of the tab order and out of
       the accessibility tree without costing the animation. */
    visibility: hidden;
    transition: transform .18s ease-out, visibility 0s linear .18s;
}
#hook-grid-root .hg-panel.is-open {
    transform: translateX(0);
    visibility: visible;
    transition: transform .18s ease-out, visibility 0s linear 0s;
}
@media (prefers-reduced-motion: reduce) {
    #hook-grid-root .hg-panel,
    #hook-grid-root .hg-panel.is-open { transition: none; }
    #hook-grid-root .hg-expand { animation: none; }
}

#hook-grid-root .hg-panel-head {
    padding: 15px 18px 13px; border-bottom: 1px solid var(--hg-border-mid);
    display: flex; align-items: flex-start; gap: 10px;
}
#hook-grid-root .hg-panel-head .hg-panel-title { flex: 1; }
#hook-grid-root .hg-panel-head h3 {
    margin: 0 0 3px; font-family: var(--hg-mono); font-size: 17px; font-weight: 700;
    color: var(--hg-gold-light); letter-spacing: .01em;
    border: 0; padding: 0; text-transform: none;
}
#hook-grid-root .hg-panel-head .hg-panel-mfr { font-size: 12.5px; color: var(--hg-text-mid); }
#hook-grid-root .hg-panel-body { overflow-y: auto; padding: 0 18px 22px; flex: 1; }

/* media block */
#hook-grid-root .hg-media { margin: 14px 0 18px; }
#hook-grid-root .hg-media-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
#hook-grid-root .hg-media-bar .hg-seg button { padding: 5px 11px; font-size: 11.5px; }
#hook-grid-root .hg-media-bar .hg-media-count {
    margin-left: auto; font-size: 10.5px; color: var(--hg-text-faint); font-family: var(--hg-mono);
}
#hook-grid-root .hg-stage {
    background: #121212; border: 1px solid var(--hg-border);
    border-radius: var(--hg-radius); overflow: hidden;
}
#hook-grid-root .hg-stage svg { width: 100%; display: block; }
#hook-grid-root .hg-stage.is-svg { background: #151515; padding: 10px; min-height: 138px; }
#hook-grid-root .hg-stage.is-svg svg { max-height: 118px; height: auto; }

#hook-grid-root .hg-stage img {
    width: 100%; height: auto; display: block; max-height: 260px; object-fit: contain;
    background: #0e0e0e;
}
#hook-grid-root .hg-thumbs { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
#hook-grid-root .hg-thumb {
    flex: 0 0 auto; width: 62px; height: 46px; padding: 0; cursor: pointer;
    background: #121212; border: 1px solid var(--hg-border-mid);
    border-radius: 2px; overflow: hidden; line-height: 0;
}
#hook-grid-root .hg-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
#hook-grid-root .hg-thumb:hover { border-color: var(--hg-border-hi); }
#hook-grid-root .hg-thumb.is-active { border-color: var(--hg-gold); box-shadow: 0 0 0 1px var(--hg-gold-dim); }

#hook-grid-root .hg-panel-cap {
    font-size: 10.5px; color: var(--hg-text-faint); margin: 8px 2px 0;
    display: flex; justify-content: space-between; gap: 10px;
}
#hook-grid-root .hg-panel-cap em { font-style: normal; color: var(--hg-text-mid); }

#hook-grid-root .hg-media-empty {
    padding: 22px 16px; text-align: center; color: var(--hg-text-faint);
    font-size: 12px; line-height: 1.5;
}
#hook-grid-root .hg-media-empty strong {
    display: block; color: var(--hg-text-mid); font-weight: 600; margin-bottom: 4px;
}

#hook-grid-root .hg-panel h4 {
    margin: 18px 0 8px; font-size: 10.5px; letter-spacing: .1em;
    text-transform: uppercase; color: var(--hg-gold); font-weight: 700;
    border-bottom: 1px solid var(--hg-border); padding-bottom: 5px;
}
#hook-grid-root table.hg-spec { width: 100%; border-collapse: collapse; font-size: 12.5px; margin: 0; }
#hook-grid-root table.hg-spec th,
#hook-grid-root table.hg-spec td {
    text-align: left; padding: 5px 0; border-bottom: 1px solid #262626; vertical-align: top;
}
#hook-grid-root table.hg-spec th {
    color: var(--hg-text-faint); font-weight: 400; width: 45%;
    position: static; background: none; text-transform: none; letter-spacing: 0; font-size: 12.5px;
}
#hook-grid-root table.hg-spec td { color: var(--hg-text); }
#hook-grid-root table.hg-spec td.hg-na { color: #565452; font-style: italic; }

#hook-grid-root .hg-pills { display: flex; flex-wrap: wrap; gap: 5px; }
#hook-grid-root .hg-pill {
    font-size: 11px; padding: 3px 8px; border-radius: 999px;
    background: var(--hg-gold-dim); color: var(--hg-gold-light);
    border: 1px solid rgba(200,160,80,.28);
}
#hook-grid-root .hg-sizes { font-family: var(--hg-mono); font-size: 12.5px; color: var(--hg-text); }

#hook-grid-root .hg-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 20px; }
#hook-grid-root .hg-btn {
    flex: 1 1 auto; text-align: center;
    background: var(--hg-bg-raised); border: 1px solid var(--hg-border-mid);
    color: var(--hg-text); border-radius: var(--hg-radius);
    padding: 8px 12px; font-size: 12.5px; cursor: pointer; font-family: var(--hg-ui);
    text-decoration: none;
}
#hook-grid-root .hg-btn:hover { border-color: var(--hg-gold); color: var(--hg-gold-light); }
#hook-grid-root .hg-btn.primary {
    background: var(--hg-gold-dim); border-color: rgba(200,160,80,.4);
    color: var(--hg-gold-light); font-weight: 600;
}

/* ── Footer note ────────────────────────────────────────── */
#hook-grid-root .hg-foot {
    padding: 11px 20px; border-top: 1px solid var(--hg-border);
    background: var(--hg-bg-mid); color: var(--hg-text-faint);
    font-size: 11.5px; display: flex; gap: 18px; flex-wrap: wrap; align-items: center;
}
#hook-grid-root .hg-foot .hg-key { display: inline-flex; align-items: center; gap: 6px; }
#hook-grid-root .hg-swatch { width: 22px; height: 10px; border-radius: 2px; display: inline-block; }
#hook-grid-root .hg-foot .hg-caveat { color: var(--hg-gold); }

/* ── Loading / failure ──────────────────────────────────── */
#hook-grid-root .hg-status {
    padding: 40px 20px; text-align: center; color: var(--hg-text-mid);
    font-size: 13px; line-height: 1.6;
}
#hook-grid-root .hg-status strong { display: block; color: var(--hg-text); margin-bottom: 5px; }

/* theme: fixed-end */
