/* One stylesheet for the public site, the owner's connections page and the admin overview. */
:root {
  --ink: #111311; --muted: #5d625b; --line: #d9ddd5; --soft: #f4f6f1; --bg: #fff;
  --lime: #c8f03c; --lime-ink: #2f3d00; --ok: #1f7a3d; --warn: #8a5a00; --bad: #a3271f;
  --radius: 14px; --wrap: 1040px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: Heebo, "Assistant", system-ui, -apple-system, "Segoe UI", sans-serif;
       color: var(--ink); background: var(--bg); font-size: 17px; line-height: 1.6; }
a { color: inherit; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 720px; }

header.top { border-bottom: 1px solid var(--line); }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { font-weight: 800; font-size: 22px; text-decoration: none; letter-spacing: -0.02em; direction: ltr; unicode-bidi: isolate; white-space: nowrap; }
.brand i { font-style: normal; background: var(--lime); color: var(--lime-ink); border-radius: 6px; padding: 0 6px; margin-left: 4px; display: inline-block; line-height: 1.35; }
nav.links { display: flex; gap: 18px; flex-wrap: wrap; font-size: 15px; }
nav.links a { text-decoration: none; color: var(--muted); }
nav.links a:hover { color: var(--ink); }

.btn { display: inline-block; font: inherit; font-weight: 700; padding: 11px 20px; border-radius: 10px; border: 0;
       background: var(--lime); color: var(--lime-ink); cursor: pointer; text-decoration: none; }
.btn:hover { filter: brightness(0.96); }
.btn:disabled { background: var(--soft); color: var(--muted); cursor: default; filter: none; }
.btn.ghost { background: none; border: 1px solid var(--line); color: var(--ink); font-weight: 500; }
.btn.small { padding: 6px 12px; font-size: 14px; }
.linkish { background: none; border: 0; padding: 0; font: inherit; font-size: 14px; color: var(--muted);
           text-decoration: underline; cursor: pointer; }

.hero { padding: 72px 0 56px; }
.hero h1 { font-size: clamp(34px, 6vw, 58px); line-height: 1.1; letter-spacing: -0.03em; margin: 0 0 18px; max-width: 14em; }
.hero p.lead { font-size: clamp(18px, 2.4vw, 22px); color: var(--muted); max-width: 34em; margin: 0 0 28px; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; }

section.block { padding: 56px 0; border-top: 1px solid var(--line); }
section.block.soft { background: var(--soft); }
section.block h2 { font-size: clamp(26px, 3.6vw, 36px); letter-spacing: -0.02em; margin: 0 0 8px; }
section.block p.sub { color: var(--muted); margin: 0 0 28px; max-width: 40em; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card h3 { margin: 0 0 6px; font-size: 19px; }
.card p { margin: 0; color: var(--muted); font-size: 16px; }
.step { font-weight: 800; color: var(--lime-ink); background: var(--lime); width: 32px; height: 32px; border-radius: 50%;
        display: inline-flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.chat { max-width: 420px; display: grid; gap: 8px; }
.bubble { padding: 10px 14px; border-radius: 16px; font-size: 16px; max-width: 85%; }
.bubble.in { background: var(--bg); border: 1px solid var(--line); justify-self: start; border-end-start-radius: 4px; }
.bubble.out { background: var(--lime); color: var(--lime-ink); justify-self: end; border-end-end-radius: 4px; }
.bubble.note { background: none; border: 1px dashed var(--line); color: var(--muted); font-size: 14px; justify-self: center; max-width: 100%; }
.two { display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: center; }

footer.bottom { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 15px; }
footer.bottom .wrap { display: flex; gap: 20px; flex-wrap: wrap; justify-content: space-between; }
footer.bottom nav { display: flex; gap: 16px; flex-wrap: wrap; }

article.doc { padding: 40px 0 64px; }
article.doc h1 { font-size: clamp(28px, 4vw, 38px); letter-spacing: -0.02em; margin: 0 0 12px; }
article.doc h2 { font-size: 21px; margin: 32px 0 8px; }
article.doc li { margin-bottom: 6px; }
.banner { background: #fff6dc; border: 1px solid #ecd58a; color: var(--warn); border-radius: 10px; padding: 10px 14px; font-size: 15px; margin: 0 0 20px; }

/* connections page and admin */
.page { padding-block: 28px 56px; }
.page h1 { font-size: 28px; letter-spacing: -0.02em; margin: 0 0 4px; }
.page p.sub { color: var(--muted); margin: 0 0 24px; }
.conn { display: grid; gap: 14px; }
.conn .card { display: grid; gap: 10px; }
.conn .head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.conn h2 { margin: 0; font-size: 20px; }
.pill { font-size: 13px; font-weight: 700; border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.pill.connected { background: #e2f4e7; color: var(--ok); }
.pill.ready { background: var(--soft); color: var(--muted); }
.pill.waiting { background: #fff6dc; color: var(--warn); }
.conn .actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.conn .detail { font-weight: 700; direction: ltr; unicode-bidi: isolate; }
.conn .msg { font-size: 15px; }
.conn .msg.ok { color: var(--ok); } .conn .msg.bad { color: var(--bad); }
.conn input[type=password], .conn input[type=text] { font: inherit; padding: 9px 12px; border: 1px solid var(--line);
       border-radius: 10px; min-width: 0; flex: 1 1 220px; direction: ltr; }
.conn input:placeholder-shown { direction: rtl; }
.code { font-family: ui-monospace, Menlo, monospace; font-size: 22px; letter-spacing: 0.12em; direction: ltr; unicode-bidi: isolate; }
.muted { color: var(--muted); }
.notice { border-radius: 10px; padding: 10px 14px; margin: 0 0 16px; font-size: 15px; }
.notice.ok { background: #e2f4e7; color: var(--ok); } .notice.bad { background: #fbe6e4; color: var(--bad); }
table.list { width: 100%; border-collapse: collapse; font-size: 15px; }
table.list th, table.list td { text-align: start; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list th { color: var(--muted); font-weight: 500; font-size: 14px; }
.scroll { overflow-x: auto; }
@media (max-width: 560px) { .hero { padding: 44px 0 36px; } section.block { padding: 40px 0; } nav.links { display: none; } }

/* finance page */
.num { direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; white-space: nowrap; }
nav.tabs { display: flex; gap: 6px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
nav.tabs a { padding: 8px 14px; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
nav.tabs a.on { color: var(--ink); font-weight: 700; border-bottom-color: var(--ink); }
.monthbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.monthbar .actions { display: flex; gap: 8px; }
.page > h2 { font-size: 20px; margin: 32px 0 12px; }
.page > h3 { font-size: 16px; margin: 20px 0 8px; }
.tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.tile { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.tile .label { color: var(--muted); font-size: 14px; }
.tile .value { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.3; }
.tile .hint { color: var(--muted); font-size: 13px; min-height: 1.4em; }
table.nums td:not(:first-child), table.nums th:not(:first-child) { text-align: end; }
table.nums tr:last-child th { border-top: 2px solid var(--ink); color: var(--ink); font-weight: 700; font-size: 15px; }
.chart { --series-1: #2a78d6; direction: ltr; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px 8px; }
.chart .peak { color: var(--muted); font-size: 12px; border-bottom: 1px dashed var(--line); padding-bottom: 2px; }
.chart .cols { display: flex; align-items: flex-end; gap: 2px; height: 160px; border-bottom: 1px solid var(--line); }
.chart .col { flex: 1 1 0; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end;
              position: relative; outline: none; }
.chart .bar { background: var(--series-1); border-radius: 4px 4px 0 0; min-height: 0; max-width: 18px; width: 100%; margin: 0 auto; }
.chart .col:hover, .chart .col:focus { background: var(--soft); }
.chart .tick { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); font-size: 12px; color: var(--muted); padding-top: 4px; }
.chart .cols { margin-bottom: 24px; }
.chart .tip { display: none; position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); background: var(--ink);
              color: #fff; font-size: 13px; padding: 4px 8px; border-radius: 6px; white-space: nowrap; z-index: 2; pointer-events: none; }
.chart .col:hover .tip, .chart .col:focus .tip { display: block; }
form.entry { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); align-items: end; }
form.entry label { display: grid; gap: 4px; font-size: 14px; color: var(--muted); }
form.entry label.wide { grid-column: span 2; }
form.entry input, form.entry select { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; min-width: 0; background: var(--bg); color: var(--ink); }
.small { font-size: 14px; }
td form { margin: 0; }
@media (max-width: 560px) { form.entry label.wide { grid-column: auto; } }

/* team map */
.pick { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 15px; }
.pick select { font: inherit; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); }
.mapbox { background: #0f1420; border-radius: var(--radius); padding: 8px; overflow-x: auto; }
.mapbox svg { display: block; width: 100%; min-width: 620px; direction: ltr; touch-action: none; user-select: none; }
.m-col { fill: #8b95a8; font-size: 13px; letter-spacing: .06em; }
.m-line { fill: none; stroke-width: 2.5; stroke-linecap: round; }
.m-line.on { stroke: #c8f03c; }
.m-line.changed { stroke: #5fd0ff; }
.m-line.fixed { stroke: #5b6578; stroke-width: 1.5; stroke-dasharray: 5 5; }
.m-line.removed { stroke: #e0705f; stroke-width: 1.5; stroke-dasharray: 2 6; cursor: pointer; }
.m-line.drag { stroke: #fff; stroke-dasharray: 6 5; opacity: .8; pointer-events: none; }
.m-line.active { stroke-width: 5; }
.m-line.dim { opacity: .22; }
.m-hit { fill: none; stroke: transparent; stroke-width: 18; cursor: pointer; }
.m-bot, .m-tool { cursor: pointer; outline: none; }
.m-bot circle { stroke: #0f1420; stroke-width: 3; }
.m-bot.sel circle, .m-bot:focus-visible circle { stroke: #fff; }
.m-initial { fill: #fff; font-size: 22px; font-weight: 700; pointer-events: none; }
.m-name { fill: #e6eaf2; font-size: 14px; font-weight: 600; pointer-events: none; }
.m-role { fill: #8b95a8; font-size: 12px; pointer-events: none; }
.m-tool rect { fill: #1b2333; stroke: #34405a; stroke-width: 1.5; }
.m-tool .m-icon { fill: none; stroke: #e6eaf2; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.m-tool.off rect { stroke-dasharray: 4 4; }
.m-tool.off .m-icon, .m-tool.off .m-name { opacity: .45; }
.m-tool.target rect, .m-tool:focus-visible rect { stroke: #c8f03c; }
.m-tool.blocked { opacity: .3; cursor: not-allowed; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg { display: inline-block; width: 22px; height: 0; border-top: 3px solid; }
.lg.on { border-color: #86a81b; } .lg.changed { border-color: #2a9fd0; }
.lg.removed { border-top: 2px dotted #c9503f; }
.lg.fixed { border-top: 2px dashed #5b6578; } .lg.off { width: 14px; height: 14px; border: 1.5px dashed #5b6578; border-radius: 4px; }
.mapdetail { margin-top: 18px; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: grid; gap: 10px; }
.mapdetail h2 { margin: 0; font-size: 19px; }
.mapdetail p { margin: 0; }
.mapdetail .actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
