/* Hive website: shared look for the landing page, sign-in and the app.
   Flat ink-on-paper with one loud yellow. No gradients, no soft shadows. */
:root {
  --bg: #f4f4ef;
  --surface: #ffffff;
  --surface-2: #e9e9e2;
  --ink: #0f0f0d;
  --ink-2: #2b2b27;
  --muted: #62625a;
  --line: #d3d3c9;
  --edge: #0f0f0d;
  --accent: #ffd012;
  --accent-ink: #6b5200;
  --accent-soft: #fff2ad;
  --ok: #1d7a43;
  --ok-soft: #dcf2e3;
  --bad: #b3261a;
  --bad-soft: #f9dedb;
  --shadow: 4px 4px 0 var(--edge);
  --radius: 6px;
  --sans: 'IBM Plex Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Bricolage Grotesque', 'IBM Plex Sans', ui-sans-serif, system-ui, sans-serif;
  --serif: var(--display); /* older pages ask for --serif; they get the display face */
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #10100e; --surface: #191916; --surface-2: #24241f; --ink: #f4f4ea; --ink-2: #d8d8cd; --muted: #9c9c90; --line: #35352e; --edge: #f4f4ea;
    --accent: #ffd012; --accent-ink: #ffdc4d; --accent-soft: #3b3206; --ok: #58c486; --ok-soft: #14281c; --bad: #f07f72; --bad-soft: #2f1613;
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #10100e; --surface: #191916; --surface-2: #24241f; --ink: #f4f4ea; --ink-2: #d8d8cd; --muted: #9c9c90; --line: #35352e; --edge: #f4f4ea;
  --accent: #ffd012; --accent-ink: #ffdc4d; --accent-soft: #3b3206; --ok: #58c486; --ok-soft: #14281c; --bad: #f07f72; --bad-soft: #2f1613;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--ink); text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { background: var(--accent); color: #0f0f0d; }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; margin: 0 0 0.5em; letter-spacing: -0.02em; }
p { margin: 0 0 1em; }
code, pre, kbd { font-family: var(--mono); font-size: 0.88em; }
kbd { border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; background: var(--surface); font-size: 12px; }
img, svg { max-width: 100%; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent); color: #0f0f0d; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* buttons and fields */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: var(--radius); border: 1.5px solid var(--edge); background: var(--surface); color: var(--ink); font: 500 15px var(--sans); cursor: pointer; text-decoration: none; white-space: nowrap; transition: transform 0.08s, box-shadow 0.08s, background 0.1s; }
.btn:hover { background: var(--surface-2); color: var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: none !important; }
.btn.primary { background: var(--ink); color: var(--bg); }
.btn.primary:hover { background: var(--ink-2); color: var(--bg); }
.btn.accent { background: var(--accent); color: #0f0f0d; font-weight: 600; box-shadow: 3px 3px 0 var(--edge); }
.btn.accent:hover { background: var(--accent); color: #0f0f0d; transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--edge); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.small { min-height: 32px; padding: 0 11px; font-size: 14px; }
.btn.danger { color: var(--bad); }
.btn[disabled] { opacity: 0.45; cursor: default; }
.input, textarea.input, select.input { width: 100%; min-height: 42px; padding: 9px 12px; border-radius: var(--radius); border: 1.5px solid var(--edge); background: var(--surface); color: var(--ink); font: 15px var(--sans); }
textarea.input { resize: vertical; line-height: 1.5; }
.input:focus { outline: none; box-shadow: 3px 3px 0 var(--accent); }
label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; }
.hint { font-size: 13px; color: var(--muted); }
.err { color: var(--bad); font-size: 14px; }
.ok-text { color: var(--ok); font-size: 14px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 1px 7px; border-radius: 4px; font: 500 12px var(--mono); background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.accent { background: var(--accent); color: #0f0f0d; }
.card { background: var(--surface); border: 1.5px solid var(--edge); border-radius: var(--radius); padding: 20px; }
.logo { display: inline-flex; align-items: center; gap: 9px; font: 700 20px var(--display); color: var(--ink); text-decoration: none; letter-spacing: -0.02em; }
.logo:hover { background: none; color: var(--ink); }
.logo svg { width: 26px; height: 26px; }
.logo svg path:first-child { stroke: var(--edge); stroke-width: 1.5; }

/* node canvas (flow.js) */
.flow { position: relative; overflow-x: auto; overflow-y: hidden; border: 1.5px solid var(--edge); border-radius: var(--radius); background-color: var(--bg); background-image: radial-gradient(var(--line) 1.2px, transparent 1.2px); background-size: 20px 20px; touch-action: pan-y; }
.flow-world { position: relative; transform-origin: 0 0; }
.flow-world svg { position: absolute; inset: 0; overflow: visible; pointer-events: none; }
.flow-wire .base { fill: none; stroke: var(--edge); stroke-width: 1.5; opacity: 0.35; }
.flow-wire .dash { fill: none; stroke: var(--edge); stroke-width: 2; stroke-dasharray: 3 13; stroke-linecap: round; animation: flow-run 1.1s linear infinite; }
.flow-wire.off .dash { display: none; } .flow-wire.off .base { stroke-dasharray: 4 5; opacity: 0.25; }
.flow-wire text { font: 500 10.5px var(--mono); fill: var(--muted); text-anchor: middle; paint-order: stroke; stroke: var(--bg); stroke-width: 5px; }
@keyframes flow-run { to { stroke-dashoffset: -16; } }
.flow-node { position: absolute; width: 152px; height: 58px; display: flex; align-items: center; gap: 9px; padding: 0 10px 0 12px; text-align: left; border: 1.5px solid var(--edge); border-radius: var(--radius); background: var(--surface); color: var(--ink); font: 14px var(--sans); cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.flow-node i { flex: none; width: 14px; height: 16px; background: var(--accent); outline: 1px solid var(--edge); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.flow-node b { display: block; font-weight: 600; line-height: 1.2; white-space: nowrap; }
.flow-node span { display: block; font: 11px var(--mono); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 108px; }
.flow-node u { position: absolute; right: -5px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: var(--surface); border: 1.5px solid var(--edge); }
.flow-node::before { content: ''; position: absolute; left: -5px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: var(--surface); border: 1.5px solid var(--edge); }
.flow-node.io { background: var(--ink); color: var(--bg); } .flow-node.io span { color: inherit; opacity: 0.7; } .flow-node.io i { outline-color: var(--bg); }
.flow-node.tool i { background: var(--ok); }
.flow-node:hover { box-shadow: 3px 3px 0 var(--edge); }
.flow-node.sel { box-shadow: 4px 4px 0 var(--accent); }
.flow-node.dragging { cursor: grabbing; box-shadow: 6px 6px 0 var(--edge); z-index: 2; }
.flow-node.off { border-style: dashed; background: var(--surface-2); } .flow-node.off i { background: var(--line); } .flow-node.off b { color: var(--muted); }
.flow-info { border: 1.5px solid var(--edge); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); background: var(--surface); padding: 14px 16px; min-height: 74px; margin-top: -2px; }
.flow-info h3 { font-size: 17px; margin: 0 0 4px; } .flow-info p { margin: 0; color: var(--ink-2); font-size: 15px; max-width: 60em; }
