/* Hexagon Collage — the page's own layout. Tokens, top bar, sections, buttons,
   fields and steps all come from ../style.css. */

.hx-head { padding-top: clamp(28px, 4vw, 48px); }
.hx-head .col-blurb a { color: var(--accent); }
.tnav a.is-on { box-shadow: inset 0 -2px 0 var(--accent); }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 13px; }
.hx-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.hx-fine { margin: 10px 0 0; font-size: 12.5px; line-height: 1.6; color: var(--fg-4); }
.hx-note { margin: 14px 0 0; font-size: 13px; color: var(--fg-3); min-height: 1.6em; }
.hx-h3 { font-size: 18px; font-weight: 700; }

/* ── adding pictures ─────────────────────────────────────── */
.hx-add { display: flex; flex-wrap: wrap; align-items: stretch; gap: 12px; }
.hx-drop { flex: 1 1 320px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 96px; padding: 16px; border: 1px dashed var(--line-hi); border-radius: var(--r-lg); background: var(--panel); cursor: pointer; transition: border-color .2s var(--ease), background .2s var(--ease); }
.hx-drop:hover, .hx-drop.is-over, .hx-drop:focus-within { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, transparent); }
.hx-drop span { font-size: 13px; color: var(--fg-4); }
.hx-drop input, .hx-open input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.hx-open { position: relative; align-self: center; }
.hx-open:focus-within { border-color: var(--accent); }

.hx-cards { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; }
.hx-card { position: relative; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); overflow: hidden; transition: border-color .2s var(--ease); }
.hx-card.is-on { border-color: var(--accent); }
.hx-card > button.hx-pick { display: block; padding: 0; border: 0; background: var(--well); cursor: pointer; }
.hx-card img { display: block; width: 100%; aspect-ratio: 220 / 190.5; object-fit: contain; padding: 10px; }
.hx-card-body { padding: 10px 12px 12px; display: grid; gap: 8px; }
.hx-card-name { display: flex; align-items: baseline; gap: 8px; font-size: 13.5px; font-weight: 600; min-width: 0; }
.hx-card-name b { font-family: var(--mono); color: var(--accent); }
.hx-card-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hx-card .tag.is-ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.hx-card .tag.is-bad { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.hx-card-tools { display: flex; gap: 4px; }
.hx-card-tools button, .hx-card-tools label { position: relative; flex: 1; min-height: 36px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--field); color: var(--fg-3); font: inherit; font-size: 12px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.hx-card-tools button:hover, .hx-card-tools label:hover { color: var(--fg); border-color: var(--line-hover); }
.hx-card-tools button:disabled { opacity: .35; cursor: default; }
.hx-card-tools input { position: absolute; opacity: 0; width: 1px; height: 1px; }

/* ── the editor ──────────────────────────────────────────── */
.hx-ed { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
.hx-ed > * { min-width: 0; }
.hx-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 14px; }
.hx-bar .seg { flex-wrap: wrap; }
.hx-bar .seg button { min-height: 36px; }
.hx-bar .field input[type="color"] { width: 36px; height: 26px; padding: 0; border: 0; background: none; cursor: pointer; }
.hx-busy { font-size: 12px; color: var(--fg-4); }
.hx-canvas-wrap { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--well); padding: clamp(10px, 2vw, 22px); }
.hx-main { display: block; width: 100%; max-width: calc(64vh * 224 / 194.5); margin-inline: auto; height: auto; touch-action: none; cursor: grab; }
.hx-main.is-brush { cursor: crosshair; }
.hx-main.is-final { cursor: default; }
.hx-trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.hx-trio figure { margin: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--well); padding: 6px; }
.hx-trio canvas { display: block; width: 100%; height: auto; }
.hx-trio figcaption { margin-top: 4px; font-size: 11px; text-align: center; color: var(--fg-4); text-transform: uppercase; letter-spacing: .1em; }
.hx-side { display: grid; gap: 14px; }
.hx-ctl { display: grid; gap: 6px; }
.hx-ctl label { display: flex; justify-content: space-between; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--fg-4); }
.hx-ctl output { font-family: var(--mono); letter-spacing: 0; text-transform: none; color: var(--fg-2); }
.hx-ctl input[type="range"] { width: 100%; accent-color: var(--accent); min-height: 28px; }
.hx-check { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; font-size: 13px; color: var(--fg-3); cursor: pointer; }
.hx-check input { accent-color: var(--accent); width: 16px; height: 16px; }
.hx-report { padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--well); font-size: 12.5px; line-height: 1.6; color: var(--fg-3); }
.hx-report b { color: var(--fg); }
.hx-report ul { margin: 6px 0 0; padding-left: 18px; color: var(--warn); }
.hx-report .bad { color: var(--warn); }
.hx-report .ok { color: var(--ok); }
.hx-approve { width: 100%; }
.hx-approve.is-done { background: var(--ok); }
.hx-key { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; }
.hx-bridge { background: #f97316; }
.hx-removed { background: #ef4444; opacity: .6; }

/* ── the wall ────────────────────────────────────────────── */
.hx-wall-wrap { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--well); padding: clamp(10px, 2vw, 22px); }
.hx-wall { display: block; width: 100%; height: auto; max-height: 70vh; }
.hx-wall .cell { fill: transparent; stroke: var(--fg-5); stroke-dasharray: 6 6; stroke-width: 1.5; cursor: pointer; }
.hx-wall .cell:hover, .hx-wall .cell:focus { stroke: var(--accent); outline: none; }
.hx-wall .pnl { cursor: pointer; }
.hx-wall .pnl:focus { outline: none; }
.hx-wall .pnl .ring { fill: none; stroke: transparent; stroke-width: 4; }
.hx-wall .pnl:hover .ring, .hx-wall .pnl:focus .ring { stroke: var(--line-hover); }
.hx-wall .pnl.is-sel .ring { stroke: var(--accent); }
.hx-wall .num { font-family: var(--mono); font-size: 16px; font-weight: 600; fill: var(--accent-ink); }
.hx-wall .num-bg { fill: var(--accent); }
.hx-size { margin: 14px 0 0; font-size: 12px; color: var(--fg-3); }
.hx-size b { color: var(--fg); }
.hx-get { margin-top: 22px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); }
.hx-get .btn:disabled { opacity: .45; cursor: not-allowed; }

@media (max-width: 1000px) {
  .hx-ed { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  /* style.css hides the nav here; this page has only these links, so keep them */
  .tnav { display: flex; margin-left: auto; }
  .tnav a { padding: 0 8px; font-size: 13px; }
  .tnav a:first-child, .tnav a:last-child { display: none; }
}
@media (max-width: 520px) {
  .hx-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hx-bar .seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; height: auto; }
  .hx-trio { gap: 6px; }
}
