/* bot-msg brand. Palette sampled from the logo:
   navy ink #0B1150, royal blue #1F44E7, sky #0A8CFF, violet #6B38FF.
   --accent = Receive / primary (blue), --info = Send (violet). ok/warn/danger keep their meaning. */
:root {
  --bg: #f5f7fc;
  --bg-2: #eaeef8;
  --panel: #ffffff;
  --panel-2: #f7f9fe;
  --line: #dde3f0;
  --line-2: #c9d1e6;
  --text: #0b1150;
  --muted: #545d82;
  --faint: #8a92b2;
  --accent: #1f44e7;
  --accent-ink: #ffffff;
  --accent-soft: #e6ebff;
  --glow: rgba(31, 68, 231, 0.16);
  --sky: #0a8cff;
  --brand-gradient: linear-gradient(120deg, #1f44e7 0%, #0a8cff 55%, #6b38ff 100%);
  --danger: #d0342c;
  --danger-soft: #fde8e7;
  --warn: #a15c00;
  --warn-soft: #fff1dc;
  --ok: #13804a;
  --ok-soft: #e0f5e9;
  --info: #6b38ff;
  --info-soft: #efe9ff;
  --shadow: 0 1px 2px rgba(11, 17, 80, 0.06), 0 10px 28px rgba(11, 17, 80, 0.08);
  --radius: 12px;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Outfit", ui-sans-serif, system-ui, -apple-system, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #070b24;
    --bg-2: #0d1334;
    --panel: #0f1638;
    --panel-2: #131b44;
    --line: #1f2858;
    --line-2: #2c376f;
    --text: #eef1ff;
    --muted: #a4acd6;
    --faint: #6f78a8;
    --accent: #5b7cff;
    --accent-ink: #ffffff;
    --accent-soft: #18214f;
    --glow: rgba(91, 124, 255, 0.2);
    --sky: #3db5ff;
    --brand-gradient: linear-gradient(120deg, #4f6fff 0%, #3db5ff 55%, #9a7bff 100%);
    --danger: #ff6b61;
    --danger-soft: #3a1622;
    --warn: #ffb547;
    --warn-soft: #33260f;
    --ok: #4fd18b;
    --ok-soft: #10301f;
    --info: #9a7bff;
    --info-soft: #221a4d;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.45), 0 12px 32px rgba(0, 0, 0, 0.4);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #070b24;
  --bg-2: #0d1334;
  --panel: #0f1638;
  --panel-2: #131b44;
  --line: #1f2858;
  --line-2: #2c376f;
  --text: #eef1ff;
  --muted: #a4acd6;
  --faint: #6f78a8;
  --accent: #5b7cff;
  --accent-ink: #ffffff;
  --accent-soft: #18214f;
  --glow: rgba(91, 124, 255, 0.2);
  --sky: #3db5ff;
  --brand-gradient: linear-gradient(120deg, #4f6fff 0%, #3db5ff 55%, #9a7bff 100%);
  --danger: #ff6b61;
  --danger-soft: #3a1622;
  --warn: #ffb547;
  --warn-soft: #33260f;
  --ok: #4fd18b;
  --ok-soft: #10301f;
  --info: #9a7bff;
  --info-soft: #221a4d;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.45), 0 12px 32px rgba(0, 0, 0, 0.4);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
code, pre, kbd, .mono { font-family: var(--mono); font-size: 0.86em; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }

/* ---------- top bar ---------- */
.topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 14px clamp(16px, 4vw, 40px);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; letter-spacing: -0.02em; font-size: 18px; }
.brand-mark { width: 28px; height: 28px; flex: none; }
.brand .tld { color: var(--faint); font-weight: 500; }
.topbar nav { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.topbar nav a { text-decoration: none; color: var(--muted); padding: 6px 10px; border-radius: 8px; font-size: 14px; }
.topbar nav a:hover { color: var(--text); background: var(--bg-2); }

/* ---------- buttons & inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 14px; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--panel); cursor: pointer; font-size: 14px; font-weight: 500;
  white-space: nowrap; transition: background .12s, border-color .12s, transform .06s;
  text-decoration: none;
}
.btn:hover { background: var(--panel-2); border-color: var(--faint); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--bg-2); color: var(--text); }
.btn.danger { color: var(--danger); }
.btn.danger:hover { background: var(--danger-soft); border-color: var(--danger); }
.btn.sm { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.btn.icon { padding: 7px; }
.btn svg { width: 16px; height: 16px; flex: none; }

input[type="text"], input[type="number"], select, textarea {
  width: 100%; background: var(--panel); border: 1px solid var(--line-2);
  border-radius: 10px; padding: 9px 12px; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--glow); }
textarea { font-family: var(--mono); font-size: 13px; resize: vertical; min-height: 110px; }
label.field { display: grid; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 500; }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 11.5px; font-weight: 600;
  padding: 2px 8px; border-radius: 999px; border: 1px solid transparent;
  letter-spacing: .02em; white-space: nowrap;
}
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.bad { background: var(--danger-soft); color: var(--danger); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.info { background: var(--info-soft); color: var(--info); }
.pill.muted { background: var(--bg-2); color: var(--muted); }

.method { font-family: var(--mono); font-weight: 700; font-size: 11.5px; letter-spacing: .03em; min-width: 52px; text-align: center; padding: 2px 6px; border-radius: 6px; }
.m-GET { background: var(--info-soft); color: var(--info); }
.m-POST { background: var(--ok-soft); color: var(--ok); }
.m-PUT, .m-PATCH { background: var(--warn-soft); color: var(--warn); }
.m-DELETE { background: var(--danger-soft); color: var(--danger); }
.m-other { background: var(--bg-2); color: var(--muted); }

/* ---------- landing ---------- */
.hero {
  position: relative;
  padding: clamp(48px, 9vw, 110px) clamp(16px, 4vw, 40px) 56px;
  max-width: 1120px; margin: 0 auto;
}
.hero::before {
  content: ""; position: absolute; inset: -40px 0 auto; height: 520px; z-index: -1;
  background:
    radial-gradient(600px 260px at 18% 20%, var(--glow), transparent 70%),
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 100% 36px;
  mask-image: linear-gradient(to bottom, black 20%, transparent 90%);
  opacity: .9;
}
.eyebrow { font-family: var(--mono); font-size: 12.5px; color: var(--accent); letter-spacing: .08em; text-transform: uppercase; font-weight: 600; }
:root[data-theme="light"] .eyebrow, :root:not([data-theme]) .eyebrow { color: var(--accent); }
h1.display { font-size: clamp(38px, 6.4vw, 72px); line-height: 1.02; letter-spacing: -0.045em; margin: 14px 0 18px; font-weight: 700; max-width: 14ch; }
h1.display em { font-style: normal; color: var(--accent); }
.lede { font-size: clamp(16px, 1.8vw, 19px); color: var(--muted); max-width: 58ch; margin: 0 0 32px; }

.creator {
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow); padding: 18px; max-width: 760px;
}
.creator-row { display: flex; gap: 10px; align-items: stretch; flex-wrap: wrap; }
.url-input {
  flex: 1 1 360px; display: flex; align-items: center; min-width: 0;
  border: 1px solid var(--line-2); border-radius: 10px; background: var(--panel-2);
  font-family: var(--mono); font-size: 14px; overflow: hidden;
}
.url-input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--glow); }
.url-input .prefix { padding: 11px 0 11px 12px; color: var(--faint); white-space: nowrap; }
.url-input input { border: 0; background: transparent; box-shadow: none !important; padding: 11px 12px 11px 1px; font-family: var(--mono); font-size: 14px; min-width: 60px; }
.creator .hint { font-size: 13px; color: var(--faint); margin: 10px 2px 0; }
.creator .error { color: var(--danger); font-size: 13px; margin: 10px 2px 0; }

.recent { margin-top: 22px; max-width: 760px; }
.recent h3 { font-size: 13px; color: var(--muted); font-weight: 600; margin: 0 0 8px; text-transform: uppercase; letter-spacing: .06em; }
.recent ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.recent li a {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--panel); text-decoration: none; font-family: var(--mono); font-size: 13.5px;
}
.recent li a:hover { border-color: var(--accent); }
.recent li .when { margin-left: auto; color: var(--faint); font-family: var(--sans); font-size: 12.5px; }

section.band { max-width: 1120px; margin: 0 auto; padding: 56px clamp(16px, 4vw, 40px); }
section.band h2 { font-size: clamp(26px, 3.4vw, 36px); letter-spacing: -0.03em; margin: 0 0 10px; }
section.band > p.sub { color: var(--muted); margin: 0 0 32px; max-width: 62ch; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.step { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.step .n { font-family: var(--mono); color: var(--accent); font-weight: 700; font-size: 13px; }
.step h3 { margin: 6px 0 6px; font-size: 18px; letter-spacing: -0.01em; }
.step p { margin: 0; color: var(--muted); font-size: 14.5px; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.feature { background: var(--panel); padding: 22px; }
.feature h3 { margin: 0 0 6px; font-size: 16px; display: flex; gap: 10px; align-items: center; }
.feature h3 svg { width: 18px; height: 18px; color: var(--accent); flex: none; }
.feature p { margin: 0; color: var(--muted); font-size: 14px; }

.code {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 16px; overflow-x: auto; font-family: var(--mono); font-size: 13px; line-height: 1.6;
  white-space: pre; margin: 0; position: relative; tab-size: 2;
}
.code .c { color: var(--faint); }
.code-wrap { position: relative; }
.code-wrap .copy-btn { position: absolute; top: 8px; right: 8px; }

.api-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
@media (max-width: 860px) { .api-grid { grid-template-columns: minmax(0, 1fr); } }
.api-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.api-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.api-table td:first-child { font-family: var(--mono); white-space: nowrap; font-size: 12.5px; }
.api-table tr:last-child td { border-bottom: 0; }

footer.site { border-top: 1px solid var(--line); color: var(--faint); font-size: 13px; padding: 28px clamp(16px, 4vw, 40px); display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; max-width: 1120px; margin: 40px auto 0; }

/* ---------- dashboard ---------- */
body.dash { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.dash-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.inbox-name { font-family: var(--mono); font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 8px; min-width: 0; }
.live { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); font-family: var(--sans); font-weight: 500; }
.live .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.live.on .dot { background: var(--ok); box-shadow: 0 0 0 0 var(--ok); animation: pulse 2s infinite; }
.live.off .dot { background: var(--danger); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 60%, transparent); } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

.strip {
  display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 10px;
  padding: 12px clamp(16px, 2vw, 24px); border-bottom: 1px solid var(--line); background: var(--bg);
}
@media (max-width: 900px) { .strip { grid-template-columns: minmax(0, 1fr); } }
.cred { display: flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 6px 6px 6px 12px; min-width: 0; }
.cred .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--faint); font-weight: 600; white-space: nowrap; }
.cred .val { font-family: var(--mono); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.cred .val.accent { color: var(--accent); font-weight: 600; }

.panes { flex: 1; display: grid; grid-template-columns: 360px minmax(0, 1fr); min-height: 0; }
.list-pane { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; background: var(--bg); }
.list-tools { display: flex; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); align-items: center; }
.list-tools input { padding: 7px 10px; font-size: 13px; }
.list { overflow-y: auto; flex: 1; }
.item {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 10px; align-items: center;
  padding: 11px 14px; border-bottom: 1px solid var(--line); cursor: pointer; position: relative;
  background: none; border-left: 0; border-right: 0; border-top: 0; width: 100%; text-align: left;
}
.item:hover { background: var(--panel-2); }
.item.active { background: var(--panel); box-shadow: inset 3px 0 0 var(--accent); }
.item.fresh { animation: fresh 1.6s ease-out; }
@keyframes fresh { from { background: var(--accent-soft); } to { background: transparent; } }
.item .path { font-family: var(--mono); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .time { font-size: 12px; color: var(--faint); white-space: nowrap; }
.item .preview { grid-column: 2 / 4; font-family: var(--mono); font-size: 12px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .flags { grid-column: 1 / 2; grid-row: 2; display: flex; gap: 4px; }
.list-empty { padding: 28px 18px; color: var(--faint); font-size: 14px; text-align: center; }

.detail-pane { overflow-y: auto; min-height: 0; padding: clamp(16px, 2.4vw, 28px); }
.detail-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.detail-head .path { font-family: var(--mono); font-size: 16px; font-weight: 600; word-break: break-all; }
.detail-head .actions { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.meta-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 18px; }
.meta-grid > div { background: var(--panel); padding: 10px 14px; min-width: 0; }
.meta-grid .k { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--faint); font-weight: 600; }
.meta-grid .v { font-family: var(--mono); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; }
.tab { background: none; border: 0; padding: 9px 14px; cursor: pointer; color: var(--muted); font-size: 14px; font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--accent); }
.tab .count { font-family: var(--mono); font-size: 11px; color: var(--faint); margin-left: 4px; }

.kv { width: 100%; border-collapse: collapse; font-size: 13px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.kv td { padding: 7px 12px; border-bottom: 1px solid var(--line); vertical-align: top; font-family: var(--mono); word-break: break-all; }
.kv td:first-child { color: var(--muted); width: 32%; min-width: 120px; word-break: normal; overflow-wrap: anywhere; }
.kv tr:last-child td { border-bottom: 0; }

pre.body { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin: 0; font-family: var(--mono); font-size: 13px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; max-height: 70vh; overflow: auto; }
.j-key { color: var(--info); }
.j-str { color: var(--ok); }
.j-num { color: var(--warn); }
.j-lit { color: var(--danger); }
.note { font-size: 13px; color: var(--muted); margin: 10px 0 0; }
.callout { display: flex; gap: 10px; padding: 10px 14px; border-radius: 10px; font-size: 13.5px; margin-bottom: 14px; align-items: flex-start; }
.callout.ok { background: var(--ok-soft); color: var(--ok); }
.callout.bad { background: var(--danger-soft); color: var(--danger); }
.callout code { word-break: break-all; }

.waiting { max-width: 720px; margin: 4vh auto 0; }
.waiting h2 { letter-spacing: -0.02em; margin: 14px 0 6px; font-size: 26px; }
.waiting p { color: var(--muted); margin: 0 0 18px; }
.radar { width: 54px; height: 54px; border-radius: 50%; border: 2px solid var(--accent); position: relative; }
.radar::after { content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid var(--accent); animation: ping 1.8s cubic-bezier(0, 0, .2, 1) infinite; }
.radar::before { content: ""; position: absolute; inset: 16px; border-radius: 50%; background: var(--accent); }
@keyframes ping { 75%, 100% { transform: scale(1.9); opacity: 0; } }
.snip-tabs { display: flex; gap: 4px; margin-bottom: 8px; flex-wrap: wrap; }
.snip-tabs .btn.active { border-color: var(--accent); color: var(--text); background: var(--accent-soft); }

/* ---------- modal & toast ---------- */
dialog { border: 1px solid var(--line-2); border-radius: 16px; background: var(--panel); color: var(--text); padding: 0; width: min(560px, calc(100vw - 32px)); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(0, 0, 0, .45); backdrop-filter: blur(2px); }
dialog form { padding: 22px; display: grid; gap: 14px; }
dialog h2 { margin: 0; font-size: 20px; letter-spacing: -0.02em; }
dialog .row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
@media (max-width: 520px) { dialog .row { grid-template-columns: 1fr; } }
dialog .foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.switch { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.switch input { margin-top: 3px; accent-color: var(--accent); width: 16px; height: 16px; }
.switch b { display: block; font-size: 14px; }
.switch span { color: var(--muted); font-size: 13px; }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translate(-50%, 20px); background: var(--text); color: var(--bg); padding: 9px 16px; border-radius: 10px; font-size: 14px; opacity: 0; pointer-events: none; transition: all .2s; z-index: 100; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.gate { max-width: 460px; margin: 12vh auto; padding: 0 16px; }
.gate .creator { padding: 24px; }
.gate h2 { margin: 0 0 8px; }
.gate p { color: var(--muted); margin: 0 0 16px; }

.hide { display: none !important; }
.back-btn { display: none; }

@media (max-width: 820px) {
  .panes { grid-template-columns: minmax(0, 1fr); }
  .panes.showing-detail .list-pane { display: none; }
  .panes:not(.showing-detail) .detail-pane { display: none; }
  .back-btn { display: inline-flex; }
  .topbar nav .hide-sm { display: none; }
}

/* ---------- creator extras ---------- */
.url-input .suffix { padding-right: 12px; color: var(--faint); white-space: nowrap; user-select: none; }
@media (max-width: 520px) { .url-input .suffix { display: none; } }
.life-row { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; margin-top: 12px; }
.life-lbl { font-size: 13px; color: var(--muted); font-weight: 500; }
.life-row .hint { margin: 0; font-size: 13px; color: var(--faint); }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 10px; padding: 2px; background: var(--panel-2); }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span { display: block; padding: 5px 12px; border-radius: 8px; font-size: 13px; font-weight: 500; color: var(--muted); font-family: var(--mono); }
.seg input:checked + span { background: var(--accent); color: var(--accent-ink); }
.seg input:focus-visible + span { box-shadow: 0 0 0 3px var(--glow); }
.alt-link { margin: 14px 2px 0; font-size: 14px; color: var(--muted); }
.alt-link a { color: var(--text); font-weight: 600; text-decoration-color: var(--accent); text-underline-offset: 3px; }

/* ---------- live stats ---------- */
.stats { display: flex; flex-wrap: wrap; gap: 10px 36px; margin: 26px 2px 0; }
.stats div { display: flex; flex-direction: column-reverse; }
.stats dt { font-size: 12.5px; color: var(--faint); display: flex; align-items: center; gap: 6px; }
.stats dd { margin: 0; font-family: var(--mono); font-size: 24px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); display: inline-block; flex: none; animation: pulse 2s infinite; }
.small-h { font-size: 13px; color: var(--muted); font-weight: 600; margin: 0 0 8px; text-transform: uppercase; letter-spacing: .06em; }

/* ---------- anonymous activity notice ---------- */
.activity {
  position: fixed; left: 16px; bottom: 16px; z-index: 50; max-width: calc(100vw - 32px);
  display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow);
  font-size: 13.5px; color: var(--muted);
  opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .3s;
}
.activity.show { opacity: 1; transform: none; }
.activity-x { background: none; border: 0; color: var(--faint); cursor: pointer; font-size: 18px; line-height: 1; padding: 2px 8px; border-radius: 999px; }
.activity-x:hover { color: var(--text); background: var(--bg-2); }
@media (prefers-reduced-motion: reduce) { .activity { transition: none; transform: none; } .live-dot, .live.on .dot, .radar::after { animation: none; } }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 8px; max-width: 820px; }
.faq details { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 18px; }
.faq summary { cursor: pointer; padding: 14px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); color: var(--faint); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 16px; color: var(--muted); }

/* ---------- self-destruct timer ---------- */
.timer { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.timer + nav { margin-left: 0; }
.clock {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px 5px 8px; border-radius: 10px;
  border: 1px solid var(--line-2); background: var(--panel); font-size: 13px; color: var(--muted); white-space: nowrap;
}
.clock svg { width: 15px; height: 15px; }
.clock b { font-family: var(--mono); font-size: 14.5px; color: var(--text); font-variant-numeric: tabular-nums; }
.clock.warn { border-color: var(--warn); background: var(--warn-soft); color: var(--warn); }
.clock.warn b { color: var(--warn); }
.clock.crit { border-color: var(--danger); background: var(--danger-soft); color: var(--danger); animation: crit 1s steps(2, start) infinite; }
.clock.crit b { color: var(--danger); }
@keyframes crit { to { border-color: transparent; } }
.lifebar { height: 3px; background: var(--line); position: relative; flex: none; }
.lifebar i { position: absolute; inset: 0 auto 0 0; background: var(--accent); transition: width 1s linear; }
.lifebar.warn i { background: var(--warn); }
.lifebar.crit i { background: var(--danger); }
@media (max-width: 820px) { .clock .clock-lbl { display: none; } }

/* ---------- send (outbound tester) ---------- */
.send-page { max-width: 1180px; margin: 0 auto; padding: 32px clamp(16px, 4vw, 40px) 60px; }
.send-page h1 { font-size: clamp(28px, 4vw, 42px); letter-spacing: -0.035em; margin: 6px 0 8px; line-height: 1.1; }
.send-page > p.sub { color: var(--muted); margin: 0 0 22px; max-width: 70ch; }
.send-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 980px) { .send-grid { grid-template-columns: minmax(0, 1fr); } }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; box-shadow: var(--shadow); min-width: 0; }
.card h2 { font-size: 15px; margin: 0 0 12px; letter-spacing: -0.01em; display: flex; align-items: center; gap: 8px; }
.card h2 svg { width: 17px; height: 17px; color: var(--accent); flex: none; }
.band h2 svg, .small-h svg { width: 17px; height: 17px; }
.presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.presets .btn.active { border-color: var(--accent); background: var(--accent-soft); }
.target-row { display: flex; gap: 8px; }
.target-row select { width: auto; flex: none; font-family: var(--mono); font-weight: 700; font-size: 13px; }
.target-row input { font-family: var(--mono); font-size: 13.5px; }
.stack { display: grid; gap: 14px; margin-top: 14px; }
.hdr-rows { display: grid; gap: 6px; }
.hdr-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) auto; gap: 6px; }
.hdr-row input { font-family: var(--mono); font-size: 12.5px; padding: 7px 10px; }
.sign-box { border: 1px dashed var(--line-2); border-radius: 10px; padding: 12px; display: grid; gap: 10px; }
.sign-box .row3 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sign-box input, .sign-box select { font-size: 13px; padding: 7px 10px; }
.send-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 16px; }
.send-actions .note { margin: 0; }
.result-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.big-status { font-family: var(--mono); font-size: 22px; font-weight: 700; padding: 2px 12px; border-radius: 10px; }
.result-empty { color: var(--faint); font-size: 14px; padding: 30px 6px; text-align: center; }
.history { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.history button { width: 100%; display: flex; gap: 8px; align-items: center; background: none; border: 1px solid transparent; border-radius: 8px; padding: 6px 8px; cursor: pointer; text-align: left; font-size: 12.5px; }
.history button:hover { background: var(--panel-2); border-color: var(--line); }
.history .u { font-family: var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }

/* ---------- terms / prose ---------- */
.prose { max-width: 760px; margin: 0 auto; padding: 40px clamp(16px, 4vw, 40px) 20px; }
.prose h1 { font-size: clamp(30px, 4.4vw, 44px); letter-spacing: -0.035em; margin: 8px 0 12px; line-height: 1.1; }
.prose h2 { font-size: 19px; letter-spacing: -0.01em; margin: 30px 0 8px; }
.prose p, .prose li { color: var(--muted); }
.prose ul { padding-left: 20px; display: grid; gap: 6px; }
.prose a { color: var(--text); text-decoration-color: var(--accent); text-underline-offset: 3px; }
.lede-sm { font-size: 17px; color: var(--text) !important; padding: 14px 16px; border-left: 3px solid var(--accent); background: var(--panel); border-radius: 0 10px 10px 0; }
.consent { font-size: 12.5px; color: var(--faint); margin: 10px 2px 0; }
.consent a, footer.site a { color: inherit; text-underline-offset: 3px; }

/* ---------- v2 landing: navigation ---------- */
.mainnav a[data-icon] { display: inline-flex; align-items: center; gap: 6px; }
.mainnav a[data-icon] svg { width: 15px; height: 15px; }
.mainnav a[aria-current="page"] { color: var(--text); background: var(--bg-2); }
.topbar nav a.nav-cta { color: var(--accent-ink); margin-left: 4px; }
.topbar nav a.nav-cta:hover { color: var(--accent-ink); background: var(--accent); }
@media (max-width: 560px) { .nav-cta { display: none !important; } }
.btn.big { padding: 12px 18px; font-size: 15px; border-radius: 12px; }
.btn.big svg { width: 18px; height: 18px; }

/* ---------- v2 landing: the two modes ---------- */
.hero h1.display { max-width: none; }
.lede b { color: var(--text); font-weight: 600; }
.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 900px) { .duo { grid-template-columns: minmax(0, 1fr); } }
.mode {
  background: var(--panel); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
  padding: 22px; display: flex; flex-direction: column; gap: 14px; min-width: 0; position: relative; overflow: hidden;
}
.mode::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--accent); }
#send-quick::before { background: var(--info); }
.mode h2 { margin: 0; font-size: 23px; letter-spacing: -0.025em; line-height: 1.15; }
.mode > p { margin: 0; color: var(--muted); font-size: 14.5px; }
.mode .btn.big { align-self: flex-start; margin-top: auto; }
.mode .consent { margin: 0; }
.mode .life-row { margin-top: 0; }
.mode .url-input { flex: none; }
.mode-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mode-tag {
  display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11.5px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
}
:root[data-theme="light"] .mode-tag, :root:not([data-theme]) .mode-tag { color: var(--accent); }
.mode-tag svg { width: 13px; height: 13px; }
#send-quick .mode-tag, .track:nth-child(2) .mode-tag { background: var(--info-soft); color: var(--info); }
#send-quick .btn.primary { background: var(--info); border-color: var(--info); color: #fff; }
.mode-dir { font-family: var(--mono); font-size: 12px; color: var(--faint); }
.mode-dir b { color: var(--text); font-weight: 600; }
#quick-url { font-family: var(--mono); font-size: 13.5px; background: var(--panel-2); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips label { position: relative; }
.chips input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chips span { display: block; padding: 5px 11px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--muted); }
.chips label:hover span { border-color: var(--faint); color: var(--text); }
.chips input:checked + span { background: var(--info-soft); border-color: var(--info); color: var(--info); }
.chips input:focus-visible + span { box-shadow: 0 0 0 3px var(--glow); }

/* ---------- v2 landing: works-with strip ---------- */
.works-with {
  max-width: 1120px; margin: 0 auto; padding: 18px clamp(16px, 4vw, 40px);
  display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.ww-lbl { font-family: var(--mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); font-weight: 600; }
.works-with ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 22px; }
.works-with li { font-weight: 600; color: var(--muted); font-size: 15px; letter-spacing: -0.01em; }

/* ---------- v2 landing: use cases ---------- */
.cases { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.case {
  display: flex; flex-direction: column; gap: 8px; text-decoration: none; padding: 20px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .15s, transform .15s;
}
.case:hover { border-color: var(--accent); transform: translateY(-2px); }
.case h3 { margin: 4px 0 0; font-size: 17px; letter-spacing: -0.015em; line-height: 1.25; }
.case p { margin: 0; color: var(--muted); font-size: 14px; flex: 1; }
.case-go { font-size: 13.5px; font-weight: 600; color: var(--text); }
.case-tag { align-self: flex-start; font-family: var(--mono); font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; }
.case-tag.in { background: var(--accent-soft); color: var(--accent); }
.case-tag.out { background: var(--info-soft); color: var(--info); }
@media (prefers-reduced-motion: reduce) { .case, .case:hover { transition: none; transform: none; } }

/* ---------- v2 landing: two tracks ---------- */
.tracks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 760px) { .tracks { grid-template-columns: minmax(0, 1fr); } }
.track { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.steps-list { margin: 14px 0 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 12px; }
.steps-list li { counter-increment: s; position: relative; padding-left: 36px; color: var(--muted); font-size: 14.5px; }
.steps-list li::before { content: "0" counter(s); position: absolute; left: 0; top: 2px; font-family: var(--mono); font-weight: 700; color: var(--faint); font-size: 13px; }
.steps-list b { color: var(--text); }

/* ---------- v2 landing: closing CTA + footer nav ---------- */
.final-cta { text-align: center; }
section.band.final-cta > p.sub { margin-left: auto; margin-right: auto; }
.final-cta .cta-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.final-cta .btn:not(.primary) { border-color: var(--info); color: var(--info); }
.foot-nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.foot-nav a { text-decoration: none; color: var(--muted); }
.foot-nav a:hover { color: var(--text); }

/* The hidden attribute must win over any display rule. */
[hidden] { display: none !important; }

/* ---------- flow diagrams (HTML/CSS: crisp, themeable, stack on phones) ---------- */
.diagram { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 22px; box-shadow: var(--shadow); }
.diagram + .diagram { margin-top: 14px; }
.diagram-h { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 0 0 16px; }
.diagram-h b { font-size: 16px; letter-spacing: -0.01em; }
.diagram-h span { color: var(--muted); font-size: 14px; }
.diagram figcaption { color: var(--muted); font-size: 13.5px; margin-top: 14px; }
.flow { display: flex; align-items: stretch; --fwd: var(--accent); }
.flow.out { --fwd: var(--info); }
.flow-label:not(:first-child) { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line); }
.flow-label { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); font-weight: 700; margin-bottom: 8px; }
.node {
  flex: 1 1 0; min-width: 0; border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 10px;
  text-align: center; background: var(--panel-2); display: flex; flex-direction: column; justify-content: center; gap: 2px;
}
.node b { font-size: 14.5px; letter-spacing: -0.01em; }
.node small { color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.node.me { border-color: var(--fwd); box-shadow: 0 0 0 3px color-mix(in srgb, var(--fwd) 18%, transparent); background: var(--panel); }
.node.me b { color: var(--fwd); }
.link { flex: 0 0 150px; display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 0 10px; }
.lane { display: flex; flex-direction: column; align-items: center; gap: 3px; font-family: var(--mono); font-size: 11.5px; line-height: 1.3; text-align: center; }
.lane.fwd { color: var(--fwd); font-weight: 600; }
.lane.back { color: var(--muted); }
.lane.back em { order: 2; }
.lane em { font-style: normal; }
.arr { display: block; width: 100%; height: 2px; background: currentColor; position: relative; flex: none; }
.arr::after { content: ""; position: absolute; top: -4px; border: 5px solid transparent; }
.fwd .arr::after { right: -2px; border-left: 8px solid currentColor; border-right: 0; }
.back .arr::after { left: -2px; border-right: 8px solid currentColor; border-left: 0; }
.back .arr { opacity: .7; }
@media (max-width: 720px) {
  .flow { flex-direction: column; }
  .link { flex: none; flex-direction: row; justify-content: center; gap: 26px; padding: 10px 0; }
  .lane { flex-direction: row; gap: 8px; }
  .lane.back em { order: 0; }
  .arr { width: 2px; height: 30px; }
  .fwd .arr::after { right: auto; top: auto; bottom: -2px; left: -4px; border: 5px solid transparent; border-top: 8px solid currentColor; border-bottom: 0; }
  .back .arr::after { top: -2px; left: -4px; border: 5px solid transparent; border-bottom: 8px solid currentColor; border-top: 0; }
}
.concepts { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 20px; align-items: start; }
@media (max-width: 900px) { .concepts { grid-template-columns: minmax(0, 1fr); } }
.concept-notes { display: grid; gap: 12px; }
.concept-notes div { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.concept-notes h3 { margin: 0 0 4px; font-size: 16px; }
.concept-notes p { margin: 0; color: var(--muted); font-size: 14px; }
.track .diagram { box-shadow: none; padding: 14px; margin: 12px 0 4px; background: var(--panel-2); }
.track .node { background: var(--panel); }
.track .link { flex-basis: 128px; }

/* Tracks: full width each, so the flow diagrams get room; steps sit beside the diagram on wide screens. */
.tracks { grid-template-columns: minmax(0, 1fr); }
.track { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 4px 28px; align-items: center; }
.track .track-h { grid-column: 1 / -1; }
.track .diagram { margin: 8px 0 0; }
.track .steps-list { margin-top: 8px; }
@media (max-width: 900px) { .track { grid-template-columns: minmax(0, 1fr); } }

/* The API table's long, unbreakable routes pushed phones to a 556px layout. Stack rows instead. */
@media (max-width: 600px) {
  .api-table, .api-table tbody, .api-table tr, .api-table td { display: block; }
  .api-table tr { padding: 8px 0; border-bottom: 1px solid var(--line); }
  .api-table tr:last-child { border-bottom: 0; }
  .api-table td { border-bottom: 0; padding: 2px 0; }
  .api-table td:first-child { white-space: normal; overflow-wrap: anywhere; color: var(--text); font-weight: 600; }
}

/* Dashboard header on phones: identity on row 1, countdown + icon actions on row 2. */
@media (max-width: 820px) {
  .dash .topbar { flex-wrap: wrap; gap: 8px 10px; padding: 10px 16px; }
  .dash .topbar .hide-sm { display: none; }
  .dash .dash-head { flex: 1 1 auto; min-width: 0; flex-wrap: nowrap; }
  .dash .inbox-name { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .dash .live { flex: none; }
  .dash .timer { order: 3; margin-left: 0; }
  .dash #head-actions { order: 4; margin-left: auto; }
  .dash .strip { padding: 10px 16px; }
  .dash .cred { flex-wrap: wrap; }
}

/* Phone polish */
.brand { white-space: nowrap; }
@media (max-width: 720px) {
  .track .link { flex-basis: auto; } /* the desktop 128px width must not become a 128px height */
}
@media (max-width: 820px) {
  /* Dashboard credentials: label + buttons on one line, the full URL/secret wrapping underneath. */
  .dash .cred .lbl { order: 1; }
  .dash .cred .btn { order: 2; }
  .dash .cred .val + .btn { margin-left: auto; }
  .dash .cred .val { order: 3; flex: 1 1 100%; white-space: normal; overflow-wrap: anywhere; padding: 2px 0 4px; }
}
@media (max-width: 440px) {
  .topbar { gap: 8px; padding-left: 14px; padding-right: 14px; }
  .topbar nav { gap: 0; }
  .topbar nav a { padding: 6px 7px; }
  .mainnav a[data-icon] { gap: 5px; }
  .brand { gap: 8px; font-size: 17px; }
}

/* ================= Alignment pass =================
   Cards that sit side by side share row lines (CSS subgrid), so titles, texts,
   inputs, buttons and footers line up across cards by construction. */

/* Hero: 7 shared rows (tag, title, text, options, input, button, footer) */
.duo { grid-template-rows: repeat(7, auto); column-gap: 18px; row-gap: 0; }
.mode { display: grid; grid-row: span 7; grid-template-rows: subgrid; row-gap: 14px; align-items: start; }
.mode .btn.big { margin-top: 0; justify-self: start; align-self: end; }
.mode-opts { align-self: start; }
.opts-hint { margin: 8px 0 0; font-size: 13px; color: var(--faint); }
.mode .life-row { margin: 0; }
.mode-foot { align-self: end; }
.mode-foot .error { margin: 0 0 6px; }
.mode-foot .consent { margin: 0; }
@media (max-width: 900px) {
  .duo { display: flex; flex-direction: column; gap: 18px; }
  .mode { display: flex; flex-direction: column; }
}

/* Concepts: the two notes together are exactly as tall as the diagram */
.concepts { align-items: stretch; }
.concept-notes { grid-template-rows: 1fr 1fr; }
@media (max-width: 900px) { .concept-notes { grid-template-rows: none; } }

/* Use cases: 3 x 2, with tag / title / text / link rows shared across each row of cards */
.cases { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 14px; }
.case { display: grid; grid-row: span 4; grid-template-rows: subgrid; row-gap: 8px; align-content: start; }
.case p { flex: none; }
.case-go { align-self: end; }
@media (max-width: 900px) { .cases { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .cases { grid-template-columns: minmax(0, 1fr); } }

/* API docs: code block as tall as the table next to it */
.api-grid { align-items: stretch; }
.api-grid .code-wrap { display: flex; }
.api-grid .code-wrap .code { flex: 1; }

/* Send page: the response card follows you down the long form */
@media (min-width: 981px) { .send-grid > section.card { position: sticky; top: 84px; } }

/* ---- alignment pass, round 2 ---- */

/* 1. Both hero inputs exactly the same height */
#quick-url { padding: 11px 12px; font-size: 14px; line-height: 1.55; }

/* 2. Card tags and links hug their content inside grid cells */
.case-tag, .case-go { justify-self: start; }

/* 3. Tracks: diagram full width on top, the three steps as three equal columns below */
.track { display: block; }
.track .diagram { margin: 12px 0 0; }
.track .link { flex-basis: 170px; }
.track .steps-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 18px; }
@media (max-width: 900px) { .track .steps-list { grid-template-columns: minmax(0, 1fr); gap: 12px; } }

/* 4. Docs: table and code in matching boxes of equal height; code scrolls inside its box */
.api-grid > div:first-child { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 4px 14px; }
.api-grid .code-wrap, .api-grid .code { min-width: 0; }

/* 5. FAQ uses the same full content width as every other section */
.faq { max-width: none; }
/* Docs table: fixed columns that wrap, so it can never outgrow its box */
.api-table { table-layout: fixed; }
.api-table td:first-child { width: 46%; white-space: normal; overflow-wrap: anywhere; }
.api-table td { overflow-wrap: anywhere; }
.api-table code { overflow-wrap: anywhere; }
/* Docs: table and code stacked, both full width, so routes never wrap and code never scrolls */
.api-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
@media (min-width: 601px) { .api-table td:first-child { width: 38%; white-space: nowrap; } }

/* ---- Send page: same width, colour and rhythm as the rest of the site ---- */
.send-page { max-width: 1120px; }
.send-page .btn.primary { background: var(--info); border-color: var(--info); color: #fff; }
.send-page .presets .btn.active { border-color: var(--info); background: var(--info-soft); color: var(--info); }
.presets { display: grid; gap: 8px; }
.preset-row { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: start; gap: 10px; }
.preset-lbl { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); font-weight: 700; padding-top: 7px; }
.preset-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.send-foot { margin-top: 14px; display: grid; gap: 4px; }
.send-foot p { margin: 0; font-size: 12.5px; color: var(--faint); }
.send-foot a { color: inherit; }
.send-foot kbd { font-size: 11px; }

/* Hero Send card: nine preset chips as an even 3 x 3 grid */
.mode-opts.chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.mode-opts.chips label span { text-align: center; }
.nowrap { white-space: nowrap; }
/* Terms: same left edge as every other page, with a comfortable reading width */
.prose { max-width: 1120px; }
.prose > * { max-width: 760px; }
/* Dashboard meta cells: pills sit on the same line as plain values */
.meta-grid .v { display: flex; align-items: center; min-height: 21px; }
.meta-grid .v .pill { padding: 0 8px; line-height: 19px; }
/* Stacked (phone/tablet) hero cards: stretch rows full width, buttons back on the left */
@media (max-width: 900px) {
  .mode { align-items: stretch; }
  .mode .btn.big { align-self: flex-start; }
  .mode-foot, .mode-opts { align-self: stretch; }
}
@media (max-width: 480px) {
  .mode-opts.chips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- "Works with" logo marquee ---------- */
.works-with { flex-wrap: nowrap; gap: 20px; }
.ww-lbl { flex: none; }
.marquee {
  flex: 1 1 auto; min-width: 0; display: flex; overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}
.marquee-track {
  list-style: none; margin: 0; padding: 0 36px 0 0; flex: none;
  display: flex; align-items: center; gap: 36px;
  animation: marquee 70s linear infinite;
}
.marquee:hover .marquee-track, .marquee:focus-within .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-100%); } }
.marquee li { display: flex; align-items: center; gap: 9px; white-space: nowrap; color: var(--muted); font-weight: 600; font-size: 15px; letter-spacing: -0.01em; transition: color .15s; }
.marquee li:hover { color: var(--text); }
.marquee .logo { width: 22px; height: 22px; fill: currentColor; flex: none; }
.marquee .ww-more span { font-family: var(--mono); font-size: 13px; color: var(--faint); font-weight: 600; }
@media (max-width: 720px) {
  .works-with { flex-direction: column; align-items: flex-start; gap: 12px; }
  .marquee { width: 100%; }
}
/* No motion wanted: a calm, wrapped logo grid instead of a moving strip */
@media (prefers-reduced-motion: reduce) {
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .marquee-track { animation: none; flex-wrap: wrap; flex: 1 1 auto; gap: 14px 28px; padding: 0; }
  .marquee-track[aria-hidden="true"] { display: none; }
}
/* Dashboard meta cells: long values (content types, IPv6) wrap instead of being cut off */
.meta-grid .v { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }

/* ---------- email dialog ---------- */
.mail-dialog .mail-what { margin: 0; color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.mail-dialog input[type="email"], .mail-dialog .mail-code { width: 100%; background: var(--panel); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; font: inherit; }
.mail-dialog .mail-code { font-family: var(--mono); font-size: 20px; letter-spacing: 6px; }
.mail-dialog .error { margin: 0; }
.mail-dialog .consent { margin: 0; }
.result-actions { margin-left: auto; display: inline-flex; gap: 6px; }
/* Notice icons (signature valid/invalid, rejected 401) sized like every other icon */
.callout svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
/* Signature mismatch: received vs expected, one per line */
.sig-detail { display: grid; gap: 4px; min-width: 0; }
.sig-detail code { word-break: break-all; }
.sig-k { display: inline-block; min-width: 72px; font-weight: 600; }
.sig-hint { color: var(--muted); font-size: 12.5px; margin-top: 2px; }

/* ---------- tester: simple fields + advanced raw request ---------- */
.preset-hint { margin: 12px 0 0; }
.guided { display: grid; gap: 12px; margin-top: 14px; }
.guided .field > span:first-child { color: var(--text); font-weight: 600; font-size: 13px; }
.guided .req { color: var(--danger); }
.guided input, .guided select, .guided textarea { font-family: var(--mono); font-size: 13.5px; }
.field-row { display: flex; gap: 6px; align-items: center; }
.field-row input { flex: 1; min-width: 0; }
.tg-chats { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); font-weight: 400; }
.tg-chats:empty { display: none; }
.advanced { margin-top: 16px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; background: var(--panel-2); }
.advanced > summary { cursor: pointer; padding: 10px 0; font-size: 13.5px; font-weight: 600; color: var(--muted); display: flex; gap: 10px; align-items: baseline; list-style: none; }
.advanced > summary::-webkit-details-marker { display: none; }
.advanced > summary::before { content: "▸"; font-size: 11px; color: var(--faint); }
.advanced[open] > summary::before { content: "▾"; }
.advanced > summary small { font-family: var(--mono); font-weight: 400; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
.advanced[open] { padding-bottom: 12px; }
.advanced .note { margin: 0 0 10px; }
.callout.rotate { background: var(--warn-soft); color: var(--warn); margin: 14px 0 0; font-size: 13px; }
#result .callout.rotate { margin: 0 0 14px; }

/* ================= brand pass ================= */
/* Logo: swap the light/dark artwork with the theme (manual toggle included) */
.brand { gap: 6px; }
.brand-logo { height: 34px; width: auto; display: block; }
.brand-logo.dark { display: none; }
:root[data-theme="dark"] .brand-logo.light { display: none; }
:root[data-theme="dark"] .brand-logo.dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand-logo.light { display: none; }
  :root:not([data-theme="light"]) .brand-logo.dark { display: block; }
}
@media (max-width: 440px) { .brand-logo { height: 26px; } }

/* Signature gradient: headline accent, card edges, primary buttons */
h1.display em, .send-page h1 em {
  background: var(--brand-gradient); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.mode::before { background: var(--brand-gradient); }
#send-quick::before { background: linear-gradient(120deg, #0a8cff, #6b38ff); }
.hero::before {
  background:
    radial-gradient(640px 280px at 12% 18%, rgba(10, 140, 255, 0.14), transparent 70%),
    radial-gradient(520px 260px at 88% 8%, rgba(107, 56, 255, 0.12), transparent 70%),
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 100% 36px;
}
.btn.primary { background: var(--accent); border-color: var(--accent); }
.eyebrow { color: var(--accent) !important; }
.live-dot { background: var(--sky); }
body { font-feature-settings: "ss01"; }
h1, h2, h3, .display { letter-spacing: -0.025em; }

/* Every input type gets the same rounded field */
input[type="password"], input[type="email"], input[type="url"] {
  width: 100%; background: var(--panel); border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 12px; outline: none; font: inherit; color: inherit;
}
