:root {
  --bg: #f4f6fa; --card: #fff; --line: #e2e7ef; --soft: #f1f4f9;
  --text: #14213d; --muted: #5b6782;
  --accent: #2563eb; --accent-dark: #1d4fd0; --accent-bg: #e8f0fe;
  --ok: #157a3c; --ok-bg: #e6f5eb; --warn: #9a5b06; --warn-bg: #fdf3e2; --err: #b42318; --err-bg: #fdecea;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 "Nunito Sans", system-ui, sans-serif; }
a { color: var(--accent); }
.wrap { max-width: 880px; margin: 0 auto; padding: 0 20px; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
h1 { font-size: 30px; line-height: 1.2; margin: 0 0 10px; }
h2 { font-size: 19px; margin: 0; }
p { margin: 0 0 12px; }

.top { background: var(--card); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 24px; min-height: 60px; flex-wrap: wrap; }
.brand { font-size: 20px; font-weight: 700; color: var(--text); text-decoration: none; }
.brand span { color: var(--accent); }
.top nav { display: flex; gap: 18px; }
.top nav a { color: var(--muted); text-decoration: none; font-size: 15px; padding: 18px 0; border-bottom: 2px solid transparent; }
.top nav a.on { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.who { margin-left: auto; display: flex; align-items: center; gap: 14px; font-size: 14px; color: var(--muted); }
.who form { margin: 0; }
main.wrap { padding-top: 26px; padding-bottom: 40px; }
.foot { color: var(--muted); font-size: 13px; padding-bottom: 30px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 22px 24px; margin-bottom: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }

.btn, button { font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; border-radius: 10px; padding: 9px 16px;
  border: 1px solid var(--line); background: var(--card); color: var(--text); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.btn:hover, button:hover { border-color: #c8d1df; }
.btn.primary, button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover, button.primary:hover { background: var(--accent-dark); }
.btn.small, button.small { padding: 6px 12px; font-size: 14px; }
button.link { border: 0; background: none; color: var(--accent); padding: 0; font-weight: 400; font-size: 14px; }
button:disabled { opacity: .55; cursor: default; }

label { display: block; font-size: 14px; font-weight: 600; margin: 0 0 6px; }
input, select { font: inherit; font-size: 15px; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--text); }
input:focus, select:focus { outline: 2px solid var(--accent-bg); border-color: var(--accent); }
.field { margin-bottom: 14px; }
.row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.row > .grow { flex: 1; min-width: 160px; }

.note { border-radius: 12px; padding: 12px 16px; font-size: 15px; margin-bottom: 16px; }
.note.ok { background: var(--ok-bg); color: var(--ok); }
.note.err { background: var(--err-bg); color: var(--err); }
.note.warn { background: var(--warn-bg); color: var(--warn); }

.home-name { font-family: var(--mono); font-size: 28px; font-weight: 600; margin: 2px 0 8px; word-break: break-all; }
.status { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.status.ok { color: var(--ok); } .status.waiting { color: var(--accent); } .status.quiet { color: var(--warn); }
.status i { font-size: 19px; }

.flow { display: flex; align-items: flex-end; margin: 26px 0 6px; }
.flow .node { width: 100px; flex: none; text-align: center; font-size: 13px; color: var(--muted); }
.flow .node.mid { width: 150px; }
.flow .circ { width: 54px; height: 54px; border-radius: 50%; margin: 0 auto 8px; display: flex; align-items: center; justify-content: center; font-size: 25px; background: var(--soft); color: var(--muted); }
.flow .mid .circ { background: var(--accent-bg); color: var(--accent); }
.flow .end .circ { background: var(--ok-bg); color: var(--ok); }
.flow .line { flex: 1; border-top: 2px dashed #c9d2e0; margin-bottom: 38px; }
.flow-note { text-align: center; font-size: 13px; color: var(--muted); margin: 10px 0 0; }

.list { margin: 0; padding: 0; list-style: none; }
.list li { display: flex; align-items: center; gap: 14px; padding: 13px 0; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; }
.ico { width: 40px; height: 40px; border-radius: 11px; background: var(--soft); color: var(--muted); display: flex; align-items: center; justify-content: center; font-size: 20px; flex: none; }
.ico.blue { background: var(--accent-bg); color: var(--accent); }
.grow { flex: 1; min-width: 0; }
.sub { font-family: var(--mono); font-size: 13px; color: var(--muted); word-break: break-all; }
.tag-ok { color: var(--ok); font-size: 14px; } .tag-wait { color: var(--warn); font-size: 14px; }
.list form { margin: 0; }

details.add { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 14px; }
details.add summary { cursor: pointer; color: var(--accent); font-weight: 600; list-style: none; }
details.add summary::-webkit-details-marker { display: none; }
details.add[open] summary { margin-bottom: 14px; }
.joined { display: flex; align-items: stretch; }
.joined input { border-radius: 10px 0 0 10px; }
.joined select { border-radius: 0 10px 10px 0; border-left: 0; width: auto; max-width: 55%; background: var(--soft); }

.offers { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-top: 16px; }
.offer { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.offer .name { font-family: var(--mono); font-weight: 600; word-break: break-all; }
.offer .price { color: var(--muted); font-size: 14px; margin: 2px 0 12px; }
.offer form, .offer button { width: 100%; margin: 0; justify-content: center; }
.offer.gone { background: var(--soft); }
.offer.gone .name { color: var(--muted); font-weight: 400; }

.code { font-family: var(--mono); font-size: 14px; background: var(--soft); border-radius: 10px; padding: 12px 14px; white-space: pre-wrap; word-break: break-all; margin: 0 0 10px; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 16px; }
.tabs a { font-size: 14px; padding: 7px 12px; border-radius: 9px; border: 1px solid var(--line); color: var(--text); text-decoration: none; }
.tabs a.on { border-color: var(--accent); color: var(--accent); background: var(--accent-bg); font-weight: 600; }
.key { font-family: var(--mono); font-size: 17px; background: var(--warn-bg); color: var(--warn); border-radius: 10px; padding: 12px 14px; word-break: break-all; margin: 8px 0; }

table.log { width: 100%; border-collapse: collapse; font-size: 14px; }
table.log td, table.log th { text-align: left; padding: 8px 6px; border-top: 1px solid var(--line); }
table.log th { color: var(--muted); font-weight: 600; border-top: 0; }

.hero { padding: 26px 0 8px; }
.hero h1 { font-size: 40px; max-width: 620px; }
.hero p { font-size: 18px; color: var(--muted); max-width: 600px; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.plan { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px; }
.plan.best { border: 2px solid var(--accent); }
.plan .cost { font-size: 26px; font-weight: 700; margin: 4px 0 10px; }
.plan .cost span { font-size: 15px; font-weight: 400; color: var(--muted); }
.plan ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 15px; }
.auth { max-width: 420px; margin: 20px auto; }

@media (max-width: 600px) {
  h1, .hero h1 { font-size: 28px; }
  .home-name { font-size: 22px; }
  .card { padding: 18px; }
  .flow .node { width: 74px; } .flow .node.mid { width: 110px; }
  .flow .mid .mono { font-size: 11px; }
  .who span { display: none; }
}
