:root {
  --ink: #111418;
  --ink-2: #3a4049;
  --muted: #6b7280;
  --line: #e4e4de;
  --paper: #f6f6f1;
  --card: #ffffff;
  --lime: #c6f135;
  --lime-dark: #8fb515;
  --coral: #ff5b4a;
  --amber: #f5a524;
  --green: #18a058;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(17, 20, 24, .06), 0 4px 16px rgba(17, 20, 24, .05);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.5; font-size: 16px; }
a { color: inherit; }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 6vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.35rem, 3.5vw, 1.9rem); font-weight: 750; }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 1em; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; word-break: break-all; }

/* top bar */
.top { background: var(--ink); color: #fff; position: sticky; top: 0; z-index: 10; }
.top .wrap { display: flex; align-items: center; gap: 16px; min-height: 60px; flex-wrap: wrap; }
.logo { font-weight: 850; font-size: 1.25rem; text-decoration: none; letter-spacing: -0.03em; }
.logo span { background: var(--lime); color: var(--ink); padding: 0 6px; border-radius: 6px; margin-left: 1px; }
.nav { display: flex; gap: 6px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.nav a, .nav button { color: #d7dae0; text-decoration: none; padding: 10px 12px; border-radius: 10px; font: inherit; background: none; border: 0; cursor: pointer; min-height: 44px; }
.nav a:hover, .nav button:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.nav form { margin: 0; }

/* buttons and forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 12px; border: 2px solid var(--ink); background: var(--ink); color: #fff; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.btn:hover { filter: brightness(1.15); }
.btn.lime { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.danger { background: #fff; color: #b42318; border-color: #f2c2bd; }
.btn.small { min-height: 40px; padding: 0 14px; font-size: .92rem; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btns { display: flex; gap: 10px; flex-wrap: wrap; }
label { display: block; font-weight: 650; margin: 0 0 6px; }
.field { margin-bottom: 18px; }
.hint { color: var(--muted); font-size: .86rem; margin-top: 4px; font-weight: 400; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=date], input[type=number], select, textarea {
  width: 100%; font: inherit; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); min-height: 48px;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(198, 241, 53, .7); border-color: var(--ink); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.check input { width: 22px; height: 22px; margin-top: 2px; flex: 0 0 auto; accent-color: var(--ink); }
.money-input { position: relative; }
.money-input::before { content: "$"; position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.money-input input { padding-left: 28px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

/* surfaces */
main { padding: 32px 0 64px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); margin-bottom: 20px; }
.card h2:first-child, .card h3:first-child { margin-top: 0; }
.flash { background: #fffbe6; border: 1px solid #f3df92; padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; background: #eef0f2; color: var(--ink-2); white-space: nowrap; }
.pill.live, .pill.approved, .pill.paid, .pill.sent { background: #e3f6d0; color: #2f5d07; }
.pill.draft, .pill.tracking, .pill.scheduled, .pill.pending { background: #eef0f2; color: var(--ink-2); }
.pill.review, .pill.needs_views, .pill.counting, .pill.held, .pill.paused { background: #fff1d6; color: #8a5a00; }
.pill.rejected, .pill.failed { background: #ffe4e0; color: #a3271a; }
.pill.closed { background: #e8e8ff; color: #3b3b9a; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.stat b { display: block; font-size: 1.45rem; letter-spacing: -0.02em; }
.stat span { color: var(--muted); font-size: .85rem; }
.bar { height: 10px; background: #eceee8; border-radius: 99px; overflow: hidden; margin: 8px 0 4px; }
.bar i { display: block; height: 100%; background: var(--ink); }
.flags { margin: 6px 0 0; padding-left: 18px; color: #8a5a00; font-size: .9rem; }

/* tables become cards on phones */
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; }
td.num, th.num { text-align: right; white-space: nowrap; }

/* landing */
.hero { background: var(--ink); color: #fff; padding: 56px 0 64px; }
.hero h1 span { color: var(--lime); }
.hero p.lead { font-size: clamp(1.05rem, 2.4vw, 1.3rem); color: #c9cdd4; max-width: 640px; }
.hero .btns { margin-top: 24px; }
.hero .btn.ghost { color: #fff; border-color: #4a515c; }
.sides { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: -28px; }
.side { background: #fff; border-radius: var(--radius); padding: 26px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.side .tag { display: inline-block; font-weight: 800; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; background: var(--lime); padding: 3px 10px; border-radius: 8px; margin-bottom: 12px; }
.side ol { padding-left: 20px; margin: 0 0 18px; }
.side li { margin-bottom: 8px; }
.section { padding: 48px 0 8px; }
.numbers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.numbers div { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.numbers b { display: block; font-size: 1.6rem; letter-spacing: -0.03em; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin-bottom: 10px; }
.faq summary { font-weight: 700; cursor: pointer; min-height: 28px; }
.campaigns { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.camp { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; text-decoration: none; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow); }
.camp:hover { border-color: var(--ink); }
.camp .rate { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; }
.camp .meta { color: var(--muted); font-size: .9rem; }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); background: #fff; border: 1.5px dashed var(--line); border-radius: var(--radius); }
.foot { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: .9rem; }
.foot a { margin-right: 16px; }
.auth { max-width: 460px; margin: 0 auto; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: #eceee8; padding: 5px; border-radius: 12px; margin-bottom: 20px; }
.tabs a { text-align: center; padding: 10px; border-radius: 9px; text-decoration: none; font-weight: 700; color: var(--ink-2); min-height: 44px; }
.tabs a.on { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.summary-line { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.summary-line.total { font-weight: 800; border-bottom: 0; font-size: 1.1rem; }
.acct { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.acct:last-child { border-bottom: 0; }
code { background: #f0f1ec; padding: 2px 6px; border-radius: 6px; }
pre { background: var(--ink); color: #e7ebef; padding: 16px; border-radius: 12px; overflow-x: auto; font-size: .85rem; }

.pkg-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.pkg-card { display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 2px solid var(--line); border-radius: var(--radius); background: var(--card); cursor: pointer; min-height: 44px; }
.pkg-card input { position: absolute; opacity: 0; pointer-events: none; }
.pkg-card:has(input:checked) { border-color: var(--ink); box-shadow: 0 0 0 3px var(--lime); }
.pkg-card:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }
.pkg-name { font-weight: 700; }
.pkg-price { font-size: 1.3rem; }
.applicant { border-top: 1px solid var(--line); padding: 12px 0; }
.applicant:first-of-type { border-top: 0; }
@media (max-width: 760px) {
  .pkg-grid { grid-template-columns: 1fr 1fr; }
  .sides, .grid2, .grid3 { grid-template-columns: 1fr; }
  .stats, .numbers { grid-template-columns: 1fr 1fr; }
  .sides { margin-top: 20px; }
  .hero { padding: 36px 0 40px; }
  .card { padding: 18px; }
  .nav { margin-left: 0; width: 100%; justify-content: flex-start; padding-bottom: 6px; }
  .nav a, .nav button { padding: 10px 10px; }
  table.stack thead { display: none; }
  table.stack, table.stack tbody, table.stack tr, table.stack td { display: block; width: 100%; }
  table.stack tr { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; margin-bottom: 10px; background: #fff; }
  table.stack td { border: 0; padding: 4px 0; text-align: left; }
  table.stack td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-size: .85rem; }
  .btns .btn { flex: 1 1 auto; }
}
