/* ReplyPilot: the one stylesheet.
   Look: the nodbon set only. Black ink, white, grey-green neutrals, a light green for "active / waiting" and a dark green for text on it.
   The lime dot of the logo is the only bright accent; amber and red are kept for warnings. Light and dark: the bare :root is light, dark redefines tokens only. */

:root {
  --f: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --f-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --f-mark: "Manrope", system-ui, sans-serif;
  --bg: #FFFFFF; --bg2: #F6F8F5; --surface: #FFFFFF; --surface-2: #FAFBF9; --side: #F6F8F5; --hover: #ECF0EA;
  --ink: #0D1B2A; --ink-2: #44505C; --ink-3: #77828E;
  --line: #E3E8E1; --line-2: #D0D7CE;
  --g-soft: #EAF6DC; --g-lime: #C6F36B; --g-ink: #1B6A3D; --g-strong: #2E9A62; --g-wash: #F4FAEC;
  --nav-on: #DCEFC3; --nav-on-ink: #14502E; --nav-on-line: rgba(27, 106, 61, .18);
  --cta: #0D1B2A; --cta-2: #1C2E42; --cta-ink: #FFFFFF;
  --amber: #9A5F0C; --amber-soft: #FCEFD3; --amber-line: #E4B25A;
  --red: #C93C3C; --red-soft: #FBE9E9;
  --tile: #0D1B2A;
  --scrim: rgba(13, 27, 42, .4);
  --shadow: 0 1px 2px rgba(13, 27, 42, .05), 0 10px 26px -14px rgba(13, 27, 42, .18);
  --shadow-lg: 0 2px 4px rgba(13, 27, 42, .05), 0 30px 60px -28px rgba(13, 27, 42, .4);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0A0F14; --bg2: #0D141B; --surface: #101820; --surface-2: #131D26; --side: #0C1218; --hover: #17222C;
    --ink: #EDF1F5; --ink-2: #A9B4C0; --ink-3: #74818E;
    --line: #1C2731; --line-2: #2A3641;
    --g-soft: rgba(198, 243, 107, .1); --g-ink: #C6F36B; --g-strong: #58D08E; --g-wash: rgba(198, 243, 107, .05);
    --nav-on: rgba(198, 243, 107, .13); --nav-on-ink: #C6F36B; --nav-on-line: rgba(198, 243, 107, .22);
    --cta: #C6F36B; --cta-2: #D5F889; --cta-ink: #0D1B2A;
    --amber: #F0B65A; --amber-soft: rgba(240, 182, 90, .13); --amber-line: #B5832F;
    --red: #FF7B7B; --red-soft: rgba(255, 123, 123, .12);
    --tile: #16222E; --scrim: rgba(0, 0, 0, .6);
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 26px -14px rgba(0, 0, 0, .7);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, .3), 0 30px 60px -28px rgba(0, 0, 0, .85);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0A0F14; --bg2: #0D141B; --surface: #101820; --surface-2: #131D26; --side: #0C1218; --hover: #17222C;
  --ink: #EDF1F5; --ink-2: #A9B4C0; --ink-3: #74818E;
  --line: #1C2731; --line-2: #2A3641;
  --g-soft: rgba(198, 243, 107, .1); --g-ink: #C6F36B; --g-strong: #58D08E; --g-wash: rgba(198, 243, 107, .05);
  --nav-on: rgba(198, 243, 107, .13); --nav-on-ink: #C6F36B; --nav-on-line: rgba(198, 243, 107, .22);
  --cta: #C6F36B; --cta-2: #D5F889; --cta-ink: #0D1B2A;
  --amber: #F0B65A; --amber-soft: rgba(240, 182, 90, .13); --amber-line: #B5832F;
  --red: #FF7B7B; --red-soft: rgba(255, 123, 123, .12);
  --tile: #16222E; --scrim: rgba(0, 0, 0, .6);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 26px -14px rgba(0, 0, 0, .7);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, .3), 0 30px 60px -28px rgba(0, 0, 0, .85);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { height: 100%; }
body { height: 100%; margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f); font-size: 14.5px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
body.app-body { overflow: hidden; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.025em; text-wrap: balance; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--g-strong); outline-offset: 2px; border-radius: 8px; }
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
svg.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

/* people: round pictures (the Slack photo when there is one, the initials when not) */
.pf { display: inline-grid; place-items: center; border-radius: 50%; overflow: hidden; flex: none; vertical-align: middle; background: var(--g-soft); color: var(--g-ink); font-weight: 600; box-shadow: 0 0 0 1px rgba(13, 27, 42, .08); }
.pf img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ---------- shell ---------- */
.app { display: grid; grid-template-columns: 262px minmax(0, 1fr); height: 100%; }
body.min .app { grid-template-columns: 76px minmax(0, 1fr); }
.side { display: flex; flex-direction: column; min-height: 0; background: var(--side); border-right: 1px solid var(--line); padding: 16px 12px 12px; overflow-y: auto; scrollbar-width: none; }
.side::-webkit-scrollbar { display: none; }
.brand { display: flex; align-items: center; gap: 11px; padding: 2px 6px 16px; text-decoration: none; color: var(--ink); }
.tile { width: 36px; height: 36px; border-radius: 11px; background: var(--tile); display: grid; place-items: center; flex: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.tile svg { width: 25px; height: 25px; }
.brand .bt { min-width: 0; }
.brand b { display: block; font-family: var(--f-mark); font-weight: 800; font-size: 19px; letter-spacing: -.045em; line-height: 1.1; }
.brand small { display: block; font-family: var(--f-mono); font-size: 10.5px; color: var(--ink-3); letter-spacing: .03em; margin-top: 2px; }
.nl { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); padding: 14px 10px 5px; }
.nav a { display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px; border-radius: 11px; text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: 14.5px; line-height: 1; white-space: nowrap; margin-bottom: 2px; transition: background .15s, color .15s; }
.nav a svg.i { width: 19px; height: 19px; color: var(--ink-3); }
.nav a span { overflow: hidden; text-overflow: ellipsis; }
.nav a:hover { background: var(--hover); color: var(--ink); }
.nav a:hover svg.i { color: var(--ink-2); }
.nav a.on { background: var(--nav-on); color: var(--nav-on-ink); font-weight: 600; box-shadow: inset 0 0 0 1px var(--nav-on-line); }
.nav a.on svg.i { color: var(--nav-on-ink); }
.nav a .n { margin-left: auto; font-family: var(--f-mono); font-size: 11.5px; min-width: 22px; text-align: center; padding: 1px 7px; border-radius: 999px; background: var(--cta); color: var(--cta-ink); font-weight: 500; }
.sfoot { margin-top: auto; display: grid; gap: 10px; padding-top: 14px; }
.health { border: 1px solid var(--line); border-radius: 13px; background: var(--surface); padding: 11px 13px; display: grid; gap: 8px; font-size: 13px; }
.health div { display: flex; align-items: center; gap: 9px; color: var(--ink-2); }
.health div span:last-child { margin-left: auto; font-family: var(--f-mono); font-size: 11.5px; color: var(--ink-3); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--g-strong); box-shadow: 0 0 0 3px var(--g-soft); flex: none; }
.dot.amber { background: var(--amber-line); box-shadow: 0 0 0 3px var(--amber-soft); }
.dot.off { background: var(--ink-3); box-shadow: 0 0 0 3px var(--bg2); }
.acct { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 13px; background: var(--surface); border: 1px solid var(--line); }
.acct b { display: block; font-size: 13.5px; font-weight: 600; line-height: 1.25; }
.acct small { font-size: 12px; color: var(--ink-3); }
.acct-link { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; text-decoration: none; color: inherit; border-radius: 9px; }
.acct-link:hover b { text-decoration: underline; }
.acct form { margin-left: auto; }
.pwrap { position: relative; display: block; }
.pwrap .input { padding-right: 62px; }
.pwrap .reveal { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); height: 28px; padding: 0 10px; border: 0; border-radius: 8px; background: none; color: var(--ink-3); font-size: 12.5px; font-weight: 500; }
.pwrap .reveal:hover { background: var(--hover); color: var(--ink); }
.acct .out { width: 30px; height: 30px; border-radius: 8px; border: 0; background: none; color: var(--ink-3); display: grid; place-items: center; }
.acct .out:hover { background: var(--hover); color: var(--ink); }
body.min .brand .bt, body.min .nl, body.min .nav a span, body.min .nav a .n, body.min .health, body.min .acct .tx, body.min .acct form { display: none; }
body.min .brand { justify-content: center; padding-inline: 0; }
body.min .nav a { justify-content: center; padding: 0; }
body.min .acct { justify-content: center; padding: 6px; }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; height: 100%; }
.mtop { flex: none; display: flex; align-items: center; gap: 10px; height: 60px; padding: 0 22px; background: var(--bg); border-bottom: 1px solid var(--line); }
.mtop h2 { font-size: 16px; letter-spacing: -.015em; }
.mtop .menu { display: none; }
.tr { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.mode { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border-radius: 999px; font-size: 12.5px; font-weight: 500; background: var(--g-soft); color: var(--g-ink); white-space: nowrap; }
.mode.off { background: var(--amber-soft); color: var(--amber); }
.ib { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); display: grid; place-items: center; }
.ib:hover { color: var(--ink); border-color: var(--ink-3); }
.page { flex: 1; min-height: 0; overflow: auto; background: var(--bg2); }
.page.fixed { overflow: hidden; display: flex; flex-direction: column; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 26px 28px 56px; }
.ph { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.ph h1 { font-size: 27px; line-height: 1.15; }
.ph p { color: var(--ink-2); margin-top: 6px; max-width: 64ch; }
.kick { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; }
.stack { display: grid; gap: 18px; min-width: 0; }

/* ---------- parts ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 15px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font-weight: 500; font-size: 14px; white-space: nowrap; text-decoration: none; }
.btn:hover { border-color: var(--ink-3); }
.btn svg.i { width: 16px; height: 16px; }
.btn.go { background: var(--cta); border-color: var(--cta); color: var(--cta-ink); font-weight: 600; }
.btn.go:hover { background: var(--cta-2); border-color: var(--cta-2); }
.btn.ghost { border-color: transparent; background: none; color: var(--ink-2); }
.btn.ghost:hover { background: var(--hover); color: var(--ink); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; background: var(--bg2); color: var(--ink-2); border: 1px solid var(--line); }
.chip.ok { background: var(--g-soft); color: var(--g-ink); border-color: transparent; }
.chip.warn { background: var(--amber-soft); color: var(--amber); border-color: transparent; }
.chip.bad { background: var(--red-soft); color: var(--red); border-color: transparent; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.card > .hd { display: flex; align-items: center; gap: 10px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.card > .hd h2 { font-size: 15px; }
.card > .hd .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.card > .bd { padding: 18px; }
.input, .select { height: 40px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); padding: 0 12px; min-width: 0; width: 100%; }
.select { padding-right: 28px; }
.sel { height: 32px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--surface); padding: 0 26px 0 10px; font-size: 13px; color: var(--ink); }
.input:focus, .select:focus, .sel:focus, textarea:focus { outline: none; border-color: var(--ink-3); box-shadow: 0 0 0 3px var(--g-soft); }
.field { display: grid; gap: 5px; font-size: 13px; color: var(--ink-2); }
.field .err { color: var(--red); font-size: 12.5px; }
.formgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; align-items: end; }
.sw { position: relative; width: 44px; height: 26px; border-radius: 999px; border: 0; background: var(--line-2); transition: background .2s; flex: none; }
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s; }
.sw[aria-checked="true"] { background: var(--g-strong); }
.sw[aria-checked="true"]::after { transform: translateX(18px); }
.sw[disabled] { opacity: .5; cursor: not-allowed; }
.lcell { display: flex; align-items: center; gap: 11px; min-width: 0; }
.lcell b { display: block; font-weight: 600; line-height: 1.3; }
.lcell small { display: block; color: var(--ink-3); font-size: 12.5px; line-height: 1.3; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-family: var(--f-mono); font-size: 11px; font-weight: 500; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); padding: 11px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface-2); }
.table td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.scroll-x { overflow-x: auto; }
.empty { padding: 44px 22px; text-align: center; color: var(--ink-3); font-size: 14px; display: grid; gap: 6px; justify-items: center; }
.empty .ico { width: 48px; height: 48px; border-radius: 14px; background: var(--g-soft); color: var(--g-ink); display: grid; place-items: center; margin-bottom: 6px; }
.empty .ico svg.i { width: 24px; height: 24px; }
.empty b { color: var(--ink); font-size: 16px; font-weight: 600; }
.empty p { max-width: 52ch; }
.tog { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 16px 18px; border-top: 1px solid var(--line); }
.card > .hd + .tog { border-top: 0; }
.tog b { display: block; font-size: 14.5px; font-weight: 600; }
.tog p { font-size: 13.5px; color: var(--ink-2); margin-top: 2px; max-width: 60ch; }
.warnbox { margin: 0 18px 16px; padding: 10px 12px; border-radius: 11px; background: var(--amber-soft); color: var(--amber); font-size: 13px; }
.flash { padding: 11px 14px; border-radius: 12px; margin-bottom: 16px; font-size: 14px; background: var(--g-soft); color: var(--g-ink); }
.flash.bad { background: var(--red-soft); color: var(--red); }
.toast { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%) translateY(20px); opacity: 0; z-index: 95; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-size: 14px; box-shadow: var(--shadow-lg); transition: opacity .2s, transform .2s; max-width: calc(100% - 32px); pointer-events: none; }
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* the next steps, shown on the pages whose work is built later */
.steps { display: grid; gap: 10px; text-align: left; margin-top: 10px; width: min(520px, 100%); }
.steps li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; align-items: start; font-size: 13.5px; color: var(--ink-2); }
.steps li i { width: 26px; height: 26px; border-radius: 50%; background: var(--bg2); border: 1px solid var(--line); display: grid; place-items: center; font-style: normal; font-family: var(--f-mono); font-size: 12px; color: var(--ink-3); }

/* ---------- connections and the playbook ---------- */
.conns { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; align-items: start; }
.cn { overflow: hidden; }
.cn .top { display: flex; align-items: center; gap: 13px; padding: 18px 18px 12px; }
.cn .lg { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--g-soft); color: var(--g-ink); flex: none; }
.cn .top b { display: block; font-size: 15.5px; }
.cn .top small { color: var(--ink-3); font-size: 12.5px; display: block; }
.cn .top .chip { margin-left: auto; }
.cn .fl { display: grid; gap: 9px; padding: 0 18px 4px; }
.field2 { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 10px; font-size: 13px; align-items: center; }
.field2 > span:first-child { color: var(--ink-3); }
.field2 code, .res code, .addr code { font-family: var(--f-mono); font-size: 12px; background: var(--bg2); padding: 3px 7px; border-radius: 7px; overflow-wrap: anywhere; border: 1px solid var(--line); }
.addr { display: flex; align-items: center; gap: 6px; min-width: 0; }
.addr code { min-width: 0; }
.res { padding: 8px 18px 12px; font-size: 13px; color: var(--ink-2); min-height: 20px; }
.res.bad { color: var(--red); }
.res .muted { font-size: 12px; }
.cn .ft { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 12px 18px; border-top: 1px solid var(--line); background: var(--surface-2); min-height: 56px; }
details.edit { border-top: 1px solid var(--line); }
details.edit > summary { list-style: none; cursor: pointer; padding: 12px 18px; font-size: 13.5px; font-weight: 600; color: var(--g-ink); display: flex; align-items: center; gap: 8px; }
details.edit > summary::-webkit-details-marker { display: none; }
details.edit > summary::before { content: "+"; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: var(--g-soft); font-weight: 600; }
details.edit[open] > summary::before { content: "\2212"; }
details.edit > form { display: grid; gap: 14px; padding: 4px 18px 18px; }
.hint { font-size: 12px; color: var(--ink-3); }
.row2 { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.textarea { width: 100%; min-height: 130px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); padding: 10px 12px; line-height: 1.5; resize: vertical; }
.btn.danger:hover { color: var(--red); }
.srcs { border-top: 1px solid var(--line); }
.src2 { padding: 14px 18px; border-bottom: 1px solid var(--line); }
.src2 .row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.src2 .acts { display: flex; align-items: flex-start; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
details.mini > summary { list-style: none; cursor: pointer; height: 32px; display: inline-flex; align-items: center; padding: 0 12px; border-radius: 9px; font-size: 13px; font-weight: 500; color: var(--ink-2); }
details.mini > summary::-webkit-details-marker { display: none; }
details.mini > summary:hover { background: var(--hover); color: var(--ink); }
details.mini[open] { flex-basis: 100%; }
details.mini > pre { margin: 6px 0 0; padding: 12px; border-radius: 10px; background: var(--bg2); border: 1px solid var(--line); font-family: var(--f-mono); font-size: 12px; line-height: 1.55; white-space: pre-wrap; max-height: 260px; overflow: auto; }
details.mini > form { display: grid; gap: 12px; margin-top: 8px; padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); }

/* ---------- sign in ---------- */
.guest { min-height: 100%; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(900px 500px at 50% -10%, var(--g-soft), transparent 70%), var(--bg2); }
.login { width: min(400px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-lg); padding: 28px 26px 24px; display: grid; gap: 16px; }
.login .brand { padding: 0; }
.login h1 { font-size: 22px; }
.login p { color: var(--ink-2); }
.login .btn { width: 100%; height: 44px; }

/* ---------- smaller screens ---------- */
@media (max-width: 899px) {
  .app, body.min .app { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; inset: 0 auto 0 0; width: min(288px, 86vw); z-index: 70; transform: translateX(-100%); transition: transform .25s; box-shadow: var(--shadow-lg); }
  body.navopen .side { transform: none; }
  body.navopen::after { content: ""; position: fixed; inset: 0; background: var(--scrim); z-index: 65; }
  body.min .brand .bt, body.min .nl, body.min .nav a span, body.min .nav a .n, body.min .health, body.min .acct .tx, body.min .acct form { display: revert; }
  .mtop { padding: 0 14px; height: 56px; }
  .mtop .menu { display: grid; }
  #minBtn, .mode { display: none; }
  .wrap { padding: 20px 16px 48px; }
  .ph h1 { font-size: 23px; }
}
@media (max-height: 780px) {
  .sfoot .health { display: none; }
  .nav a { height: 38px; }
  .nl { padding-top: 10px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
