/* Skyburst Ops: the Skyburst dark theme, built for a phone first. */
@font-face { font-family: 'Sora'; src: url('/fonts/Sora-600.ttf') format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Sora'; src: url('/fonts/Sora-700.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Instrument Sans'; src: url('/fonts/InstrumentSans-400.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Instrument Sans'; src: url('/fonts/InstrumentSans-500.ttf') format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Instrument Sans'; src: url('/fonts/InstrumentSans-600.ttf') format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('/fonts/JetBrainsMono-500.ttf') format('truetype'); font-weight: 500; font-display: swap; }

:root {
  --bg: #04050A; --bg-2: #090B11; --surface: #0E1118; --surface-2: #141826;
  --ink: #EEF0FA; --ink-2: #C9CDE0; --muted: #8E94AE; --line: rgba(255, 255, 255, .09); --line-2: rgba(255, 255, 255, .18);
  --energy: #6C7BFF; --energy-2: #FF5FD2; --link: #A9B2FF; --ok: #3DD68C; --warn: #FFB547; --bad: #FF6B7A;
  --display: 'Sora', system-ui, sans-serif; --body: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif; --mono: 'JetBrains Mono', ui-monospace, monospace;
  --radius: 16px; --tab-h: 64px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; color: var(--ink); font: 16px/1.5 var(--body);
  background: radial-gradient(900px 420px at 85% -120px, rgba(108, 123, 255, .22), transparent 70%), radial-gradient(700px 360px at -10% -80px, rgba(255, 95, 210, .12), transparent 70%), var(--bg);
  background-attachment: fixed; padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 16px);
}
a { color: var(--link); }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.01em; line-height: 1.15; margin: 0; }
h1 { font-size: 1.45rem; } h2 { font-size: 1.1rem; } h3 { font-size: 1rem; }
.muted { color: var(--muted); } .small { font-size: .875rem; } .pad { padding: 16px; } .mono { font-family: var(--mono); font-size: .8rem; }
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; padding-top: max(12px, env(safe-area-inset-top));
  background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--display); font-weight: 600; }
.brand img { border-radius: 8px; } .brand b { background: linear-gradient(90deg, var(--energy), var(--energy-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.who { font-size: .8rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
main { max-width: 760px; margin: 0 auto; padding: 16px; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 4px 0 14px; flex-wrap: wrap; }

.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: grid; grid-template-columns: repeat(4, 1fr); height: calc(var(--tab-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
.tabs a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); text-decoration: none; font-size: .74rem; font-weight: 500; }
.tabs a .ico { font-size: 1.2rem; line-height: 1; }
.tabs a.on { color: var(--ink); } .tabs a.on .ico { color: var(--energy); text-shadow: 0 0 14px rgba(108, 123, 255, .8); }
.tabs em { position: absolute; top: 8px; left: 50%; margin-left: 10px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--energy-2); color: #fff; font: 600 .7rem/18px var(--body); font-style: normal; text-align: center; }
@media (min-width: 900px) { .tabs { left: 50%; right: auto; transform: translateX(-50%); bottom: 16px; width: 520px; border: 1px solid var(--line); border-radius: 18px; height: var(--tab-h); padding: 0; } }

.card { background: color-mix(in srgb, var(--surface) 90%, transparent); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin: 0 0 12px; }
.card.link { display: block; color: inherit; text-decoration: none; transition: border-color .15s; }
.card.link:hover, .card.link:focus-visible { border-color: var(--line-2); }
.card .row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.card .sum { color: var(--ink-2); font-size: .94rem; margin-top: 6px; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-top: 6px; font-size: .8rem; color: var(--muted); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font-size: .74rem; font-weight: 600; border: 1px solid var(--line-2); color: var(--ink-2); white-space: nowrap; }
.chip.stage-new { border-color: rgba(108, 123, 255, .6); color: #C4CAFF; } .chip.stage-contacted { border-color: rgba(108, 123, 255, .4); }
.chip.stage-won { border-color: rgba(61, 214, 140, .6); color: #9FF0C6; } .chip.stage-lost, .chip.stage-no_response { color: var(--muted); }
.chip.test { border-color: rgba(255, 181, 71, .7); color: var(--warn); } .chip.bad { border-color: rgba(255, 107, 122, .7); color: var(--bad); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin: 0 0 12px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips button { flex: none; }

label { display: block; font-size: .85rem; font-weight: 500; color: var(--ink-2); margin: 12px 0 6px; }
input, select, textarea { width: 100%; font: inherit; color: var(--ink); background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 11px 12px; }
textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
textarea.body { min-height: 300px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--energy); outline-offset: 1px; border-color: transparent; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; color: var(--ink-2); margin: 12px 0; }
.check input { width: 20px; height: 20px; flex: none; margin: 2px 0 0; accent-color: var(--energy); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 16px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--ink); font: 600 .95rem var(--body); text-decoration: none; cursor: pointer; }
.btn:hover { border-color: rgba(255, 255, 255, .3); }
.btn.primary { border: 0; background: linear-gradient(135deg, var(--energy), #8B5CFF 60%, var(--energy-2)); box-shadow: 0 6px 24px rgba(108, 123, 255, .35); color: #fff; }
.btn.danger { border-color: rgba(255, 107, 122, .5); color: var(--bad); background: transparent; }
.btn.ghost { background: transparent; } .btn.sm { min-height: 36px; padding: 6px 12px; font-size: .85rem; } .btn.on { border-color: var(--energy); color: #fff; background: rgba(108, 123, 255, .18); }
.btn[disabled] { opacity: .55; cursor: wait; }
.btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.btns.grow .btn { flex: 1 1 0; }
.contact-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 4px; }
.contact-btns .btn { flex-direction: column; gap: 2px; min-height: 58px; font-size: .8rem; } .contact-btns .btn span { font-size: 1.2rem; }
.contact-btns .btn.off { opacity: .35; pointer-events: none; }

dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 10px 0 0; font-size: .92rem; }
dl.facts dt { color: var(--muted); } dl.facts dd { margin: 0; word-break: break-word; }
.timeline { list-style: none; margin: 8px 0 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 14px 20px; border-left: 1px solid var(--line-2); margin-left: 6px; }
.timeline li::before { content: ''; position: absolute; left: -5px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--energy); box-shadow: 0 0 10px rgba(108, 123, 255, .8); }
.timeline li:last-child { border-left-color: transparent; }
.timeline .t { font-size: .76rem; color: var(--muted); } .timeline .d { font-size: .92rem; white-space: pre-wrap; word-break: break-word; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.stat { padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.stat b { display: block; font: 700 1.3rem var(--display); } .stat span { font-size: .74rem; color: var(--muted); }
.empty { text-align: center; padding: 34px 16px; color: var(--muted); }
.empty b { display: block; font: 600 1.05rem var(--display); color: var(--ink); margin-bottom: 6px; }
.warnbox { border: 1px solid rgba(255, 107, 122, .45); background: rgba(255, 107, 122, .07); border-radius: 12px; padding: 12px 14px; margin-top: 12px; font-size: .92rem; }
.note { border-left: 3px solid var(--energy); padding: 8px 12px; background: rgba(108, 123, 255, .08); border-radius: 0 10px 10px 0; font-size: .92rem; color: var(--ink-2); margin-top: 10px; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.toggle:last-of-type { border-bottom: 0; }
.toggle input { width: 46px; height: 26px; flex: none; appearance: none; border-radius: 13px; background: var(--line-2); position: relative; cursor: pointer; padding: 0; border: 0; transition: background .2s; }
.toggle input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left .2s; }
.toggle input:checked { background: var(--energy); } .toggle input:checked::after { left: 23px; }
.toast { position: fixed; left: 50%; bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 14px); transform: translateX(-50%); z-index: 20; max-width: calc(100vw - 32px); padding: 10px 16px; border-radius: 12px; background: #1B2033; border: 1px solid var(--line-2); box-shadow: 0 10px 30px rgba(0, 0, 0, .5); font-size: .92rem; }
.toast.bad { border-color: rgba(255, 107, 122, .6); }
.sep { height: 1px; background: var(--line); margin: 16px 0; border: 0; }
.back { display: inline-block; margin-bottom: 10px; font-size: .9rem; text-decoration: none; }
.login { max-width: 400px; margin: 8vh auto 0; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.err { color: var(--bad); } .subj { margin: 10px 0 0; } .pre { white-space: pre-wrap; }
.filters { display: flex; gap: 8px; margin-bottom: 12px; } .filters select { flex: 0 0 42%; }
a.stat { color: inherit; text-decoration: none; }
details.card summary { cursor: pointer; list-style: none; } details.card summary::-webkit-details-marker { display: none; } details.card summary::after { content: ' ▾'; color: var(--muted); }
