/* The Horizon screens on the page. They are rebuilt in HTML with invented data and keep the
   product's own look: its dark theme, colours and fonts (dashboard/public/css/tokens.css and
   dashboard.css in the Horizon source), scaled down to fit a plate. Nothing here is page layout;
   that is site.css with the ACIDRIPP tokens. */
@font-face { font-family: "DM Sans"; font-weight: 400; font-display: swap; src: url("/hz-fonts/dm-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "DM Sans"; font-weight: 500; font-display: swap; src: url("/hz-fonts/dm-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "DM Sans"; font-weight: 600; font-display: swap; src: url("/hz-fonts/dm-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "DM Sans"; font-weight: 700; font-display: swap; src: url("/hz-fonts/dm-sans-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Syne"; font-weight: 800; font-display: swap; src: url("/hz-fonts/syne-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 400; font-display: swap; src: url("/hz-fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 700; font-display: swap; src: url("/hz-fonts/jetbrains-mono-latin-700-normal.woff2") format("woff2"); }

.hz {
  --bg: #0a0a0f; --surface: #12121a; --surface2: #1a1a25; --surface3: #222233; --border: #2a2a3a; --border2: #3a3a4a;
  --text: #e0e0e8; --text2: #8888a0; --text3: #707088; --accent: #dc2626; --accent2: #ef4444;
  --green: #22c55e; --amber: #f59e0b; --blue: #3b82f6; --purple: #7c3aed; --orange: #f97316;
  --f-body: "DM Sans", system-ui, sans-serif; --f-display: "Syne", sans-serif; --f-mono: "JetBrains Mono", ui-monospace, monospace;
  container-type: inline-size; position: relative; overflow: hidden;
  border-radius: 14px; border: 1px solid var(--border); background: var(--bg); color: var(--text);
  font: 400 11px/1.45 var(--f-body); text-align: left; color-scheme: dark;
}
.hz *, .hz *::before, .hz *::after { box-sizing: border-box; }
.hz :where(p, h4, h5, ul, ol, dl) { margin: 0; padding: 0; }
.hz ul, .hz ol { list-style: none; }
.hz b { font-weight: 600; color: var(--text); }
.hz .mono { font-family: var(--f-mono); font-size: 0.92em; }

/* Sidebar */
.hz-side { display: none; flex-direction: column; background: var(--surface); border-right: 1px solid var(--border); }
.hz-brand { padding: 14px 12px 10px; border-bottom: 1px solid var(--border); font: 800 9px/1.25 var(--f-display); letter-spacing: 0.02em; }
.hz-brand span { display: block; color: var(--accent); }
.hz-nav { padding: 8px 5px; display: grid; gap: 1px; }
.hz-nav li { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 6px; color: var(--text2); font-weight: 500; font-size: 10.5px; border-left: 2px solid transparent; }
.hz-nav i { font-style: normal; width: 13px; text-align: center; font-size: 10px; }
.hz-nav li.on { background: var(--surface2); color: var(--text); border-left-color: var(--accent); }
.hz-sidefoot { margin-top: auto; padding: 8px 12px; border-top: 1px solid var(--border); font: 400 8px/1 var(--f-mono); color: var(--text3); }
.hz-frame { display: grid; grid-template-columns: minmax(0, 1fr); }
@container (min-width: 600px) { .hz-frame { grid-template-columns: 128px minmax(0, 1fr); } .hz-side { display: flex; } }

/* Top bar and tabs */
.hz-main { min-width: 0; display: flex; flex-direction: column; }
.hz-top { display: flex; align-items: center; gap: 8px; padding: 7px 12px; background: var(--surface); border-bottom: 1px solid var(--border); }
.hz-search { flex: 1; max-width: 250px; display: flex; align-items: center; gap: 6px; padding: 5px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface2); color: var(--text3); font-size: 10px; white-space: nowrap; overflow: hidden; }
.hz-kbd { margin-left: auto; font: 400 8px/1 var(--f-mono); padding: 2px 4px; border: 1px solid var(--border); border-radius: 3px; }
.hz-top-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.hz-fresh { font: 400 8.5px/1 var(--f-mono); color: var(--text3); display: none; }
.hz-tbtn { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface2); color: var(--text2); font-size: 10px; white-space: nowrap; }
.hz-tbtn.lit { color: var(--text); border-color: var(--purple); box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.25); }
.hz-avatar { width: 20px; height: 20px; border-radius: 50%; background: var(--purple); color: #fff; font: 700 8px/20px var(--f-body); text-align: center; flex: none; }
.hz-who { display: none; font-size: 10px; font-weight: 600; white-space: nowrap; }
.hz-role { font: 400 8px/1 var(--f-mono); padding: 2px 4px; border-radius: 3px; background: rgba(124, 58, 237, 0.15); color: #a78bfa; margin-left: 4px; }
@container (min-width: 520px) { .hz-fresh, .hz-who { display: inline; } }
.hz-tabs { display: flex; gap: 2px; padding: 5px 12px 0; background: var(--surface); border-bottom: 1px solid var(--border); overflow: hidden; }
.hz-tabs span { padding: 5px 9px; font-size: 10px; color: var(--text3); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.hz-tabs span.on { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }

/* Content */
.hz-content { padding: 14px 12px 16px; display: grid; gap: 10px; align-content: start; min-width: 0; }
@container (min-width: 520px) { .hz-content { padding: 16px 16px 18px; } }
.hz-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 8px; }
.hz-head h4 { font: 800 15px/1.2 var(--f-display); color: var(--text); }
.hz-desc { font-size: 10.5px; color: var(--text2); margin-top: -4px; max-width: 60ch; }
.hz-grid { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@container (min-width: 520px) { .hz-grid.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .hz-grid.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.hz-grid.g1 { grid-template-columns: 1fr; }
.hz-split { display: grid; gap: 8px; }
@container (min-width: 560px) { .hz-split { grid-template-columns: 1.15fr 0.85fr; } .hz-split.even { grid-template-columns: 1fr 1fr; } }
.hz-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 11px 12px; min-width: 0; }
.hz-card.approval { border-left: 3px solid var(--amber); }
.hz-card.done { border-left: 3px solid var(--green); }
.hz-title { font: 700 10px/1.3 var(--f-display); color: var(--text2); margin-bottom: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.hz-title .hz-tag, .hz-title .hz-badge { margin-left: auto; }
.hz-stat { font: 700 21px/1 var(--f-mono); color: var(--text); letter-spacing: -0.02em; }
.hz-stat.green { color: var(--green); } .hz-stat.red { color: var(--accent2); } .hz-stat.amber { color: var(--amber); } .hz-stat.blue { color: var(--blue); }
.hz-stat small { font-size: 0.5em; font-weight: 400; color: var(--text3); margin-left: 3px; }
.hz-label { font-size: 9.5px; color: var(--text3); margin-top: 4px; }

.hz-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 5px; flex: none; background: var(--text3); }
.hz-dot.on { background: var(--green); box-shadow: 0 0 5px rgba(34, 197, 94, 0.45); }
.hz-dot.warn { background: var(--amber); } .hz-dot.off { background: var(--accent); }
.hz-tag { display: inline-block; padding: 1px 6px; border-radius: 4px; font: 700 8.5px/1.5 var(--f-mono); white-space: nowrap; background: rgba(255, 255, 255, 0.06); color: var(--text3); }
.hz-tag.green { background: rgba(34, 197, 94, 0.12); color: var(--green); } .hz-tag.red { background: rgba(220, 38, 38, 0.14); color: var(--accent2); }
.hz-tag.amber { background: rgba(245, 158, 11, 0.12); color: var(--amber); } .hz-tag.blue { background: rgba(59, 130, 246, 0.12); color: #60a5fa; }
.hz-tag.purple { background: rgba(124, 58, 237, 0.16); color: #a78bfa; } .hz-tag.orange { background: rgba(249, 115, 22, 0.14); color: var(--orange); }
.hz-badge { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; border-radius: 99px; font-size: 9px; font-weight: 600; white-space: nowrap; border: 1px solid transparent; background: rgba(255, 255, 255, 0.06); color: var(--text2); }
.hz-badge.healthy { background: rgba(34, 197, 94, 0.14); color: var(--green); border-color: rgba(34, 197, 94, 0.3); }
.hz-badge.warning { background: rgba(234, 179, 8, 0.14); color: #eab308; border-color: rgba(234, 179, 8, 0.3); }
.hz-badge.critical { background: rgba(220, 38, 38, 0.14); color: var(--accent2); border-color: rgba(220, 38, 38, 0.3); }
.hz-badge.info { background: rgba(59, 130, 246, 0.14); color: #60a5fa; border-color: rgba(59, 130, 246, 0.3); }

.hz-gauge { margin: 5px 0; }
.hz-bar { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.hz-fill { display: block; height: 100%; border-radius: 3px; background: var(--green); transition: width 0.7s ease; }
.hz-fill.amber { background: var(--amber); } .hz-fill.red { background: var(--accent); } .hz-fill.blue { background: var(--blue); }
.hz-glabels { display: flex; justify-content: space-between; font: 400 8.5px/1.3 var(--f-mono); color: var(--text3); margin-top: 3px; }
.w5 { width: 5%; } .w10 { width: 10%; } .w15 { width: 15%; } .w20 { width: 20%; } .w25 { width: 25%; } .w30 { width: 30%; } .w35 { width: 35%; } .w40 { width: 40%; } .w45 { width: 45%; } .w50 { width: 50%; }
.w55 { width: 55%; } .w60 { width: 60%; } .w65 { width: 65%; } .w70 { width: 70%; } .w75 { width: 75%; } .w80 { width: 80%; } .w85 { width: 85%; } .w90 { width: 90%; } .w95 { width: 95%; } .w100 { width: 100%; }

.hz-btn { display: inline-flex; align-items: center; justify-content: center; padding: 5px 10px; border-radius: 5px; font-size: 9.5px; font-weight: 600; border: 1px solid var(--border); background: var(--surface2); color: var(--text2); white-space: nowrap; transition: transform 0.12s, filter 0.12s; }
.hz-btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.hz-btn.danger { border-color: rgba(220, 38, 38, 0.3); color: var(--accent2); background: rgba(220, 38, 38, 0.08); }
.hz-btn.pressed { transform: scale(0.94); filter: brightness(1.35); }
.hz-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

.hz-table { width: 100%; border-collapse: collapse; }
.hz-table th { text-align: left; padding: 5px 7px; font: 700 8px/1.3 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text3); border-bottom: 1px solid var(--border); white-space: nowrap; }
.hz-table td { padding: 5px 7px; font-size: 10px; border-bottom: 1px solid rgba(42, 42, 58, 0.45); color: var(--text2); vertical-align: middle; }
.hz-table td:first-child { color: var(--text); font-weight: 500; }
.hz-table tr:last-child td { border-bottom: 0; }
.hz-table .r { text-align: right; }
.hz .hide-n { display: none; }
@container (min-width: 520px) { .hz .hide-n { display: table-cell; } .hz span.hide-n, .hz div.hide-n { display: revert; } }

.hz-alert { font-size: 10px; padding: 5px 8px; margin-top: 4px; background: rgba(0, 0, 0, 0.25); border-radius: 5px; border-left: 3px solid var(--accent); color: var(--text2); }
.hz-alert.amber { border-left-color: var(--amber); } .hz-alert.blue { border-left-color: var(--blue); } .hz-alert.green { border-left-color: var(--green); }
.hz-why { background: var(--surface2); border: 1px solid var(--border); border-radius: 6px; padding: 7px 9px; font-size: 10px; line-height: 1.5; color: var(--text2); }
.hz-ai { background: var(--surface2); border-radius: 8px; padding: 9px 10px; font-size: 10.5px; line-height: 1.55; color: var(--text); }
.hz-ai .hz-ai-label { font: 700 8px/1 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; color: #a78bfa; margin-bottom: 5px; display: block; }
.hz-kv { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; font-size: 10px; }
.hz-kv dt { color: var(--text3); } .hz-kv dd { margin: 0; color: var(--text); min-width: 0; overflow-wrap: anywhere; }
.hz-list { display: grid; gap: 4px; font-size: 10px; color: var(--text2); }
.hz-list li { display: flex; align-items: center; gap: 6px; min-width: 0; }
.hz-list .end { margin-left: auto; white-space: nowrap; font: 400 9px/1 var(--f-mono); color: var(--text3); }
.hz-input { flex: 1; min-width: 0; min-height: 26px; padding: 5px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); color: var(--text); font-size: 10.5px; display: flex; align-items: center; }
.hz-input .ph { color: var(--text3); }
.hz .typing::after { content: ""; display: inline-block; width: 1px; height: 1.1em; margin-left: 1px; background: var(--text); vertical-align: -0.15em; }

/* The assistant drawer (the Assistant button in the top bar) */
.hz-drawer { background: var(--surface); border-left: 1px solid var(--border); display: flex; flex-direction: column; min-width: 0; }
.hz-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.hz-drawer-head h5 { font: 800 13px/1.2 var(--f-display); }
.hz-chat { padding: 12px; display: grid; gap: 9px; align-content: start; flex: 1; }
.hz-msg { max-width: 94%; }
.hz-msg.user { margin-left: auto; }
.hz-msg-label { font-size: 8px; color: var(--text3); margin-bottom: 3px; }
.hz-msg.user .hz-msg-label { text-align: right; }
.hz-msg-body { background: var(--surface2); padding: 8px 10px; border-radius: 8px; font-size: 10.5px; line-height: 1.55; color: var(--text); }
.hz-msg.user .hz-msg-body { background: rgba(220, 38, 38, 0.12); }
.hz-msg-body p + p { margin-top: 6px; }
.hz-msg-body ul { margin-top: 5px; display: grid; gap: 3px; color: var(--text2); }
.hz-msg-body ul li { padding-left: 10px; position: relative; }
.hz-msg-body ul li::before { content: ""; position: absolute; left: 0; top: 0.65em; width: 5px; height: 1px; background: var(--text3); }
.hz-tools { display: flex; flex-wrap: wrap; gap: 4px; }
.hz-tool { font: 400 8.5px/1.6 var(--f-mono); padding: 0 6px; border-radius: 4px; border: 1px solid var(--border); color: var(--text3); white-space: nowrap; }
.hz-tool::before { content: ""; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--green); margin-right: 5px; vertical-align: 0.05em; }
.hz-inputrow { display: flex; gap: 6px; padding: 10px 12px; border-top: 1px solid var(--border); }
.hz-with-drawer { display: grid; }
@container (min-width: 600px) { .hz-with-drawer { grid-template-columns: 0.8fr 1.2fr; } .hz-with-drawer > .hz-content { opacity: 0.55; } }
.hz-with-drawer > .hz-content { display: none; }
@container (min-width: 600px) { .hz-with-drawer > .hz-content { display: grid; } }

/* A terminal: the customer's own AI working through Horizon's tool server */
.hz-term { background: #07070b; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; font: 400 9.5px/1.7 var(--f-mono); color: var(--text2); min-width: 0; overflow: hidden; }
.hz-term p { white-space: pre-wrap; overflow-wrap: anywhere; }
.hz-term .you { color: var(--text); } .hz-term .you::before { content: "> "; color: var(--accent2); }
.hz-term .call { color: #a78bfa; } .hz-term .ok { color: var(--green); } .hz-term .hold { color: var(--amber); } .hz-term .say { color: var(--text); }
.hz-term-bar { display: flex; align-items: center; gap: 5px; margin: -2px 0 7px; font-size: 8.5px; color: var(--text3); }
.hz-term-bar i { width: 7px; height: 7px; border-radius: 50%; background: var(--border2); }

/* Network map of discovered things */
.hz-map { display: grid; gap: 6px; }
.hz-map-row { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.hz-node { display: inline-flex; align-items: center; padding: 3px 7px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface2); font: 400 9px/1.4 var(--f-mono); color: var(--text); white-space: nowrap; }
.hz-node.host { border-color: rgba(59, 130, 246, 0.5); } .hz-node.net { border-color: rgba(124, 58, 237, 0.5); } .hz-node.store { border-color: rgba(245, 158, 11, 0.5); }
.hz-map-label { font: 700 8px/1 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text3); width: 100%; margin-top: 2px; }

/* Steps: in a playing scene each waits for its turn. Space is always kept, so nothing jumps. */
.hz.anim [data-step] { opacity: 0; transform: translateY(4px); transition: opacity 0.28s ease, transform 0.28s ease; }
.hz.anim [data-step].on { opacity: 1; transform: none; }
.hz.anim .hz-fill[data-step] { opacity: 1; transform: none; }
.hz.anim .hz-fill[data-step]:not(.on) { width: 0; }
.hz.anim [data-count][data-step], .hz.anim [data-type][data-step] { transform: none; }
.hz.anim [data-type]:empty::before { content: "\200b"; }
.hz.anim [data-shown][data-step] { opacity: 1; transform: none; }
.hz [data-until] { display: none; }
.hz.anim [data-until].on { display: revert; }
.hz.anim [data-swap]:not(.on) { display: none; }
@media (prefers-reduced-motion: reduce) { .hz-fill, .hz-btn { transition: none; } }
.hz-table td.mono { white-space: nowrap; }
