/* xflo, the flow of your website
   Shared stylesheet. Loaded by every page as /css/xflo.css */

:root {
  --black: #000000;
  --panel: #0a0a0a;
  --panel-2: #111111;
  --line: #242424;
  --line-soft: #1a1a1a;
  --fg: #ededed;
  --fg-dim: #a1a1a1;
  --fg-mute: #6d6d6d;
  --accent: #4d9fff;
  --accent-2: #a06bff;
  --ok: #3fb950;
  --warn: #d29922;
  --err: #f85149;

  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Inter,
    Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", "JetBrains Mono", Menlo,
    Consolas, monospace;

  --r-sm: 5px;
  --r: 8px;
  --r-lg: 12px;
  --wrap: 1080px;
  --nav-h: 60px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--black);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { color: #fff; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

code, kbd, pre, .mono { font-family: var(--mono); letter-spacing: 0; }

h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.03em; line-height: 1.15; }
h1 { font-size: clamp(34px, 6vw, 60px); }
h2 { font-size: clamp(22px, 3vw, 30px); }
h3 { font-size: 17px; letter-spacing: -0.02em; }
p { margin: 0 0 14px; color: var(--fg-dim); max-width: 66ch; }

hr { border: 0; border-top: 1px solid var(--line-soft); margin: 40px 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 760px; }
.stack > * + * { margin-top: 14px; }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.dim { color: var(--fg-dim); }
.mute { color: var(--fg-mute); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.center { text-align: center; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hidden { display: none !important; }

/* ---------- navigation ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: saturate(160%) blur(12px);
}
.nav .wrap { display: flex; align-items: center; gap: 22px; }

.brand { display: flex; align-items: baseline; gap: 2px; font-size: 17px; font-weight: 600; letter-spacing: -0.05em; }
.brand span { color: var(--fg-mute); font-weight: 400; }

.nav-links { display: flex; align-items: center; gap: 20px; font-size: 14px; margin-left: 8px; }
.nav-links a { color: var(--fg-dim); }
.nav-links a:hover { color: var(--fg); }
.nav-links a[aria-current="page"] { color: var(--fg); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }

.avatar {
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--panel-2); border: 1px solid var(--line);
  font-size: 11px; font-weight: 600; color: var(--fg-dim);
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--fg);
  font: inherit; font-size: 14px; font-weight: 500;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, opacity 120ms ease;
  white-space: nowrap;
}
.btn:hover { background: var(--panel-2); border-color: #3a3a3a; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: #fff; color: #000; border-color: #fff; font-weight: 600; }
.btn-primary:hover { background: #d8d8d8; border-color: #d8d8d8; }
.btn-danger { color: var(--err); border-color: #3d1d1d; }
.btn-danger:hover { background: #1a0f0f; border-color: #5a2626; }
.btn-lg { height: 44px; padding: 0 20px; font-size: 15px; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-ghost { border-color: transparent; color: var(--fg-dim); }
.btn-ghost:hover { color: var(--fg); border-color: var(--line); }

/* ---------- forms ---------- */

label.field { display: block; }
.label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; color: var(--fg-dim); }
.hint { font-size: 12.5px; color: var(--fg-mute); margin-top: 6px; }

input[type="text"], input[type="password"], input[type="email"], select, textarea {
  width: 100%;
  height: 38px;
  padding: 0 11px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--fg);
  font: inherit; font-size: 14px;
  transition: border-color 120ms ease;
}
textarea { height: auto; padding: 10px 11px; line-height: 1.55; resize: vertical; font-family: var(--mono); font-size: 13px; }
input::placeholder, textarea::placeholder { color: #555; }
input:focus, select:focus, textarea:focus { outline: none; border-color: #4a4a4a; }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(77, 159, 255, 0.18); }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #777 50%), linear-gradient(135deg, #777 50%, transparent 50%); background-position: right 15px center, right 10px center; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 32px; }

/* ---------- cards & panels ---------- */

.card {
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  background: var(--panel);
}
.card-pad { padding: 20px; }
.card-head { padding: 18px 20px; border-bottom: 1px solid var(--line-soft); }
.card-body { padding: 20px; }
.card-foot {
  padding: 13px 20px;
  border-top: 1px solid var(--line-soft);
  background: #060606;
  border-radius: 0 0 var(--r) var(--r);
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
}

.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }

/* ---------- page shell ---------- */

.page { padding: 34px 0 90px; }
.page-head { margin-bottom: 24px; }
.page-head h1 { font-size: clamp(24px, 3.4vw, 30px); }
.page-head p { margin: 8px 0 0; }

.crumbs { font-size: 13px; color: var(--fg-mute); margin-bottom: 10px; font-family: var(--mono); }
.crumbs a:hover { color: var(--fg); }

/* ---------- badges / status ---------- */

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  height: 22px; padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 100px;
  font-size: 12px; color: var(--fg-dim);
  background: var(--panel-2);
}
.badge.live { color: var(--ok); border-color: #17351f; background: #0b1a0f; }
.badge.idle { color: var(--warn); border-color: #3a2f12; background: #17130a; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ---------- lists ---------- */

.list { border: 1px solid var(--line-soft); border-radius: var(--r); overflow: hidden; }
.list-item { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line-soft); background: var(--panel); }
.list-item:last-child { border-bottom: 0; }
.list-item:hover { background: var(--panel-2); }

.empty { padding: 52px 24px; text-align: center; border: 1px dashed var(--line); border-radius: var(--r); background: #050505; }
.empty h3 { margin-bottom: 6px; }
.empty p { margin: 0 auto 18px; color: var(--fg-mute); max-width: 42ch; }

/* ---------- code ---------- */

pre {
  margin: 0;
  padding: 14px 16px;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  overflow-x: auto;
  font-size: 12.5px;
  line-height: 1.65;
  color: #cfcfcf;
}
pre .k { color: var(--accent); }
pre .s { color: #7ee787; }
pre .c { color: #5c5c5c; }
code.inline { background: var(--panel-2); border: 1px solid var(--line-soft); border-radius: 4px; padding: 1px 5px; font-size: 12.5px; color: #d5d5d5; }

/* ---------- hero: the signature element ---------- */

.hero { padding: 92px 0 76px; position: relative; overflow: hidden; }
.hero h1 { max-width: 15ch; }
.hero .lede { font-size: 17px; margin-top: 18px; max-width: 52ch; }

.flowbar {
  margin-top: 38px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, #0d0d0d, #060606);
  padding: 6px;
  max-width: 560px;
  position: relative;
}
.flowbar-inner { display: flex; align-items: center; gap: 0; background: var(--black); border-radius: 9px; padding: 5px 6px 5px 14px; }
.flowbar input {
  border: 0; background: transparent; height: 42px; padding: 0;
  font-family: var(--mono); font-size: 17px; letter-spacing: -0.02em;
  flex: 1; min-width: 0;
}
.flowbar input:focus, .flowbar input:focus-visible { border: 0; box-shadow: none; outline: none; }
.flowbar .suffix { font-family: var(--mono); font-size: 17px; color: var(--fg-mute); padding-right: 10px; }
.flowbar .btn { height: 34px; }

/* the one animated moment on the site: the flow line under the hero input */
.flowline { height: 1px; margin: 0 12px; background: var(--line); position: relative; overflow: hidden; border-radius: 1px; }
.flowline::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, var(--accent), var(--accent-2), transparent);
  transform: translateX(-100%);
  animation: flow 3.6s cubic-bezier(0.45, 0, 0.15, 1) infinite;
}
@keyframes flow { to { transform: translateX(100%); } }

.availability { margin-top: 12px; min-height: 20px; font-size: 13.5px; font-family: var(--mono); color: var(--fg-mute); }
.availability.ok { color: var(--ok); }
.availability.no { color: var(--err); }

/* ---------- steps (a real sequence, so numbered) ---------- */

.steps { counter-reset: s; display: grid; gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); border-radius: var(--r); overflow: hidden; }
.step { background: var(--panel); padding: 22px; counter-increment: s; }
.step::before {
  content: counter(s);
  display: grid; place-items: center;
  width: 22px; height: 22px; margin-bottom: 12px;
  border: 1px solid var(--line); border-radius: 50%;
  font-family: var(--mono); font-size: 11px; color: var(--fg-dim);
}
.step h3 { margin-bottom: 6px; }
.step p { margin: 0; font-size: 14px; }
.step p + p { margin-top: 8px; }

/* ---------- dropzone ---------- */

.drop {
  border: 1px dashed #333;
  border-radius: var(--r);
  background: #050505;
  padding: 44px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease;
}
.drop:hover { border-color: #4a4a4a; background: var(--panel); }
.drop.over { border-color: var(--accent); background: rgba(77, 159, 255, 0.05); }
.drop h3 { margin-bottom: 6px; }
.drop p { margin: 0 auto; color: var(--fg-mute); font-size: 13.5px; }

.filerow { display: flex; align-items: center; gap: 12px; padding: 9px 14px; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; }
.filerow:last-child { border-bottom: 0; }
.filerow .path { font-family: var(--mono); font-size: 13px; }
.filerow .size { color: var(--fg-mute); font-size: 12px; font-variant-numeric: tabular-nums; }
.filerow .state { margin-left: auto; font-size: 12px; color: var(--fg-mute); font-family: var(--mono); }
.filerow .state.done { color: var(--ok); }
.filerow .state.fail { color: var(--err); }

.progress { height: 2px; background: var(--line-soft); border-radius: 2px; overflow: hidden; }
.progress > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width 200ms ease; }

/* ---------- log ---------- */

.log { font-family: var(--mono); font-size: 12.5px; line-height: 1.75; color: var(--fg-dim); max-height: 240px; overflow-y: auto; }
.log div { display: flex; gap: 10px; }
.log .t { color: #4a4a4a; flex: none; }
.log .ok { color: var(--ok); }
.log .err { color: var(--err); }

/* ---------- table ---------- */

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-weight: 500; color: var(--fg-mute); font-size: 12.5px; padding: 10px 18px; border-bottom: 1px solid var(--line-soft); }
td { padding: 13px 18px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }

/* ---------- toast ---------- */

.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: flex; flex-direction: column; gap: 8px; max-width: min(360px, calc(100vw - 36px)); }
.toast {
  border: 1px solid var(--line); background: #0d0d0d; border-radius: var(--r);
  padding: 12px 14px; font-size: 13.5px; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7);
  animation: toast-in 160ms ease-out;
}
.toast.err { border-color: #4a2020; }
.toast.ok { border-color: #1d3d26; }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } }

/* ---------- alert ---------- */

.alert { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 11px 13px; font-size: 13.5px; background: var(--panel); }
.alert.err { border-color: #40201f; background: #140b0b; color: #ffb3ae; }
.alert.ok { border-color: #1d3d26; background: #0a1610; color: #9be6ab; }
.alert.warn { border-color: #3a2f12; background: #14110a; color: #e5c77a; }

/* ---------- footer ---------- */

.foot { border-top: 1px solid var(--line-soft); padding: 34px 0; margin-top: 60px; }
.foot .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; font-size: 13px; color: var(--fg-mute); }
.foot a { color: var(--fg-mute); }
.foot a:hover { color: var(--fg); }
.foot nav { display: flex; gap: 18px; flex-wrap: wrap; }

/* ---------- tabs ---------- */

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line-soft); margin-bottom: 20px; }
.tab { background: none; border: 0; border-bottom: 2px solid transparent; color: var(--fg-mute); font: inherit; font-size: 14px; padding: 8px 10px; cursor: pointer; margin-bottom: -1px; }
.tab:hover { color: var(--fg); }
.tab[aria-selected="true"] { color: var(--fg); border-bottom-color: #fff; }

/* ---------- modal ---------- */

.modal-back { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(3px); z-index: 150; display: grid; place-items: center; padding: 20px; }
.modal { width: 100%; max-width: 420px; border: 1px solid var(--line); background: #0b0b0b; border-radius: var(--r-lg); }

/* ---------- responsive ---------- */

@media (max-width: 420px) {
  .brand span { display: none; }
  .nav-links { font-size: 13px; gap: 12px; }
}

@media (max-width: 720px) {
  /* Keep the links reachable on a phone by scrolling them, not hiding them. */
  .nav .wrap { gap: 12px; padding: 0 16px; }
  .nav-links { gap: 14px; font-size: 13.5px; margin-left: 0; overflow-x: auto; scrollbar-width: none; }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a { white-space: nowrap; }
  .hero { padding: 60px 0 50px; }
  .flowbar-inner { flex-wrap: wrap; padding: 10px; }
  .flowbar input { font-size: 16px; }
  .foot .wrap { flex-direction: column; }
  td, th { padding: 11px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .flowline::after { transform: none; opacity: 0.5; }
}

/* ---------- suffix box (input glued to a fixed domain) ---------- */

.suffix-box {
  height: 38px;
  display: flex;
  align-items: center;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-left: 0;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  color: var(--fg-mute);
  font-size: 13px;
  background: var(--panel-2);
  white-space: nowrap;
}

/* ---------- tabs sitting inside a card header ---------- */

.card-head .tabs { margin: 0; border-bottom: 0; }
.card-head .tabs .tab { padding: 4px 10px 6px; }

/* ---------- disclosure ---------- */

details > summary { list-style: none; padding: 2px 0; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: "+ "; color: var(--fg-mute); }
details[open] > summary::before { content: "\2212 "; }
details > summary:hover { color: var(--fg); }
