/* QIVE: its own look. A left rail instead of a top bar, instrument-panel surfaces with corner brackets and square edges,
   Space Grotesk and JetBrains Mono, numbered sections, a full-screen hero, and the hive demo laid out as three lanes.
   Loaded last, so it wins over qive.css and fx.css. */
:root {
  --head: "Space Grotesk", "DM Sans", system-ui, sans-serif;
  --sans: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --rail: 92px;
  --r: 4px;
  --teal: #22e0d0;
  --edge: rgba(110, 215, 225, .2);
}
body { font-family: var(--sans); font-size: 15.5px; }
h1, h2, h3, .brand, .hud b, .stats b { font-family: var(--head); }
h1, h2 { font-weight: 600; letter-spacing: -.035em; }

/* ---- layout: the rail, the top-right controls, the content shifted over ---- */
.top, .sheet, .burger { display: none !important; }
#view { margin-left: var(--rail); }
.rail { position: fixed; z-index: 50; left: 0; top: 0; bottom: 0; width: var(--rail); display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 24px 0; border-right: 1px solid var(--edge); background: linear-gradient(180deg, rgba(3, 5, 12, .86), rgba(3, 5, 12, .62)); backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3); }
.rail .brand img { width: 42px; height: 42px; display: block; filter: drop-shadow(0 0 18px rgba(34, 224, 208, .45)); transition: transform .5s var(--ease), filter .3s; }
.rail .brand:hover img { transform: rotate(60deg) scale(1.1); filter: drop-shadow(0 0 26px rgba(138, 92, 255, .7)); }
.rail-nav { display: flex; flex-direction: column; align-items: center; gap: 34px; }
.rail-nav a { writing-mode: vertical-rl; transform: rotate(180deg); font: 500 12px var(--mono); letter-spacing: .3em; text-transform: uppercase; color: var(--mute); padding: 4px 0; position: relative; transition: color .2s; }
.rail-nav a:hover { color: var(--ink); }
.rail-nav a.on { color: var(--teal); }
.rail-nav a.on::after { content: ""; position: absolute; left: -14px; top: 50%; width: 5px; height: 5px; background: var(--teal); box-shadow: 0 0 12px var(--teal); transform: translateY(-50%) rotate(45deg); }
.rail-end { display: grid; gap: 8px; }
.ib { width: 40px; height: 40px; border-radius: 3px; background: transparent; border: 1px solid var(--edge); }
.ib:hover { border-color: var(--teal); background: rgba(34, 224, 208, .08); }
.topbar { position: fixed; z-index: 50; top: 20px; right: 28px; display: flex; gap: 10px; align-items: center; }
.btn-wallet { height: 40px; border-radius: 3px; background: rgba(3, 5, 12, .7); border: 1px solid var(--edge); font: 500 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; backdrop-filter: blur(12px); }
.btn-wallet:hover { border-color: var(--teal); }
.wrap { width: min(1240px, calc(100% - 96px)); }
.foot { background: rgba(3, 4, 10, .72); border-top: 1px solid var(--edge); }

/* ---- type and small parts ---- */
.sec-h { max-width: none; margin-bottom: 34px; padding-top: 22px; border-top: 1px solid var(--edge); position: relative; }
.wrap { counter-reset: sec; }
.sec { counter-increment: sec; padding: 78px 0; }
.sec .sec-h::before { content: counter(sec, decimal-leading-zero); display: block; font: 500 12px var(--mono); letter-spacing: .3em; color: var(--teal); margin-bottom: 14px; }
.sec-h::after { content: ""; position: absolute; left: 0; top: -1px; width: 64px; height: 2px; background: var(--grad); }
.sec-h h2 { font-size: clamp(30px, 3.8vw, 50px); max-width: 18ch; }
.sec-h p { max-width: 60ch; }
.pg { padding-top: 96px; }
.tag, .chip, .seg, .seg button, .kicker, .search, .fp, .drop, .status, .metric, .diagram, pre.qasm, details.more, .tick-in, input[type=text], input[type=url], input[type=number], input[type=password], textarea, input:not([type]) { border-radius: 3px; }
.tag { font: 500 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; background: rgba(34, 224, 208, .1); color: #7ff0e6; border: 1px solid rgba(34, 224, 208, .25); }
.chip { font-family: var(--mono); font-size: 12.5px; letter-spacing: .04em; }
.seg button, .top-links a { border-radius: 2px; }
.seg button { font-family: var(--mono); font-size: 12.5px; letter-spacing: .04em; }
.seg button.on, .fp.on, .chip.on { background: rgba(34, 224, 208, .1); border-color: var(--teal); color: #d8fff9; box-shadow: none; }

/* ---- buttons: square with a cut corner ---- */
.btn { border-radius: 0; height: 46px; padding: 0 26px; font: 600 12.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: #03120f; text-shadow: none; box-shadow: none; clip-path: polygon(0 0, calc(100% - 13px) 0, 100% 13px, 100% 100%, 13px 100%, 0 calc(100% - 13px)); background: var(--grad); }
.btn:hover { filter: brightness(1.12); box-shadow: none; transform: translateY(-1px); }
.btn.sm { height: 40px; padding: 0 20px; font-size: 11.5px; clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px)); }
.btn.lg { height: 54px; padding: 0 32px; font-size: 13px; }
.btn.ghost { clip-path: none; border-radius: 0; background: transparent; color: var(--ink); border: 1px solid rgba(160, 220, 230, .32); backdrop-filter: none; }
.btn.ghost:hover { border-color: var(--teal); color: var(--teal); background: rgba(34, 224, 208, .06); filter: none; }

/* ---- panels: square, thin edge, corner brackets ---- */
.card { border-radius: 4px; border: 1px solid var(--edge); background: linear-gradient(180deg, rgba(9, 12, 26, .8), rgba(4, 6, 15, .82)); backdrop-filter: blur(12px) saturate(1.2); -webkit-backdrop-filter: blur(12px) saturate(1.2); }
.card::after { inset: -1px; padding: 0; border-radius: 0; opacity: .9; -webkit-mask: none; mask: none; --c: #22e0d0; background:
  linear-gradient(var(--c), var(--c)) 0 0 / 18px 1px no-repeat, linear-gradient(var(--c), var(--c)) 0 0 / 1px 18px no-repeat,
  linear-gradient(var(--c), var(--c)) 100% 0 / 18px 1px no-repeat, linear-gradient(var(--c), var(--c)) 100% 0 / 1px 18px no-repeat,
  linear-gradient(var(--c), var(--c)) 0 100% / 18px 1px no-repeat, linear-gradient(var(--c), var(--c)) 0 100% / 1px 18px no-repeat,
  linear-gradient(var(--c), var(--c)) 100% 100% / 18px 1px no-repeat, linear-gradient(var(--c), var(--c)) 100% 100% / 1px 18px no-repeat; }
.card:hover { box-shadow: 0 0 60px rgba(34, 224, 208, .1); border-color: rgba(34, 224, 208, .4); }
.card:hover::after { --c: #8a5cff; opacity: 1; }
.focus-card .ic, .focus-card:nth-child(even) .ic { border-radius: 3px; }
.step::before { border-radius: 3px; font-family: var(--mono); }

/* ---- hero: full screen, wide light type, side label, stats along the bottom ---- */
.hx { position: relative; min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto; padding: 84px 0 0; }
.hx-top { display: flex; justify-content: space-between; font: 500 12px var(--mono); letter-spacing: .3em; text-transform: uppercase; color: var(--mute); padding-bottom: 14px; border-bottom: 1px solid var(--edge); }
.hx-main { align-self: center; max-width: 780px; padding: 40px 0; }
.hx-title { font: 500 clamp(40px, 6.6vw, 104px)/1.02 var(--head); letter-spacing: .01em; text-shadow: 0 0 80px rgba(34, 224, 208, .18); }
.hx-title .grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; display: block; font-family: var(--mono); font-weight: 500; letter-spacing: .02em; }
.hx-dash { display: none; }
.hx-copy { margin: 28px 0 0; max-width: 54ch; font: 400 15px/1.8 var(--mono); color: #aeb9d8; }
.hx .cta { margin-top: 34px; display: flex; gap: 14px; flex-wrap: wrap; }
.hx-side { position: absolute; right: 0; top: 46%; font: 400 12px/2 var(--mono); letter-spacing: .3em; text-transform: uppercase; color: #8e9bbf; text-align: right; }
.hx-side i { display: block; width: 26px; height: 1px; background: var(--mute); margin: 8px 0 0 auto; }
.hud { margin: 0; border: 0; border-top: 1px solid var(--edge); border-radius: 0; background: transparent; backdrop-filter: none; gap: 0; }
.hud > div { background: transparent; padding: 24px 28px 26px 0; border-right: 1px solid var(--edge); }
.hud > div + div { padding-left: 28px; }
.hud > div:last-child { border-right: 0; }
.hud b { font-weight: 500; font-size: clamp(30px, 3.2vw, 46px); }
.hx .hud { margin-top: 10px; }

/* ---- the hive demo: three lanes, one under the other ---- */
.swarm { display: grid; gap: 22px; padding: 0; }
.lanes { display: grid; border-top: 1px solid var(--edge); }
.lane { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 36px; padding: 30px 0; border-bottom: 1px solid var(--edge); position: relative; opacity: .32; transform: none; transition: opacity .7s var(--ease); }
.lane.on { opacity: 1; }
.lane::before { content: ""; position: absolute; left: 0; top: 0; height: 2px; width: 0; background: var(--grad); transition: width 1.1s var(--ease); }
.lane.on::before { width: 100%; }
.lane-l { display: grid; align-content: start; gap: 8px; }
.lane-l em { font: 500 12px var(--mono); letter-spacing: .3em; color: var(--teal); font-style: normal; }
.lane-l b { font: 600 clamp(24px, 2.6vw, 34px) var(--head); letter-spacing: -.03em; }
.lane-l span { font: 400 12.5px var(--mono); color: var(--mute); letter-spacing: .04em; }
.lane-b { min-width: 0; display: grid; gap: 14px; align-content: start; }
.lane .diagram { overflow-x: auto; max-width: 100%; transform: none; width: auto; margin: 0; }
.lane .lane-b > p { margin: 0; color: #aeb9d8; font: 400 13.5px/1.7 var(--mono); }
.lane .gbars { max-width: 640px; }
.lane .gb b { width: 0; }
.lane.on .gb b { width: var(--w); }
.lane .checks { max-width: 640px; }
.lane .checks li { opacity: 0; transform: translateX(-8px); transition: opacity .4s var(--ease), transform .4s var(--ease); }
.lane.on .checks li { opacity: 1; transform: none; }
.lane.on .checks li:nth-child(2) { transition-delay: .25s; } .lane.on .checks li:nth-child(3) { transition-delay: .5s; } .lane.on .checks li:nth-child(4) { transition-delay: .75s; } .lane.on .checks li:nth-child(5) { transition-delay: 1s; }
.lane .verdict { margin-top: 4px; border-radius: 0; font: 600 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; justify-self: start; }
.lane.on .verdict { opacity: 1; }
.checks li { font: 400 13px var(--mono); }
.checks li i { border-radius: 2px; }

/* ---- the trail on a run ---- */
.trail-row i, .st-h i { border-radius: 3px; font-family: var(--mono); }
.trail-row b { font-family: var(--head); }
.trail-row p { font: 400 13px/1.7 var(--mono); }
.marquee span { border-radius: 0; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }

/* ---- small screens: the rail becomes a bottom bar ---- */
@media (max-width: 860px) {
  :root { --rail: 0px; }
  #view { margin-left: 0; padding-bottom: 74px; }
  .rail { top: auto; width: auto; right: 0; bottom: 0; height: 62px; flex-direction: row; padding: 0 18px; border-right: 0; border-top: 1px solid var(--edge); }
  .rail .brand img { width: 34px; height: 34px; }
  .rail-nav { flex-direction: row; gap: 22px; }
  .rail-nav a { writing-mode: horizontal-tb; transform: none; font-size: 11px; letter-spacing: .2em; }
  .rail-nav a.on::after { left: 50%; top: auto; bottom: -10px; transform: translateX(-50%) rotate(45deg); }
  .rail-end { display: none; }
  .topbar { top: 12px; right: 12px; gap: 8px; }
  .topbar .top-cta { display: none; }
  .wrap { width: calc(100% - 32px); }
  .hx { min-height: auto; padding-top: 70px; }
  .hx-main { padding-top: 250px; }
  .hx-side { display: none; }
  .hud { grid-template-columns: 1fr 1fr; }
  .hud > div { padding: 18px 14px 18px 0; border-bottom: 1px solid var(--edge); }
  .hud > div + div { padding-left: 14px; }
  .lane { grid-template-columns: 1fr; gap: 14px; }
  .sec { padding: 56px 0; }
  .pg { padding-top: 70px; }
  .toasts { bottom: 80px; }
}
