:root {
  --deep-space-blue: #0b3954;
  --pale-sky: #bfd7ea;
  --vibrant-coral: #ff6663;
  --jungle-green: #57a773;
  --white: #fefffe;

  --fg: var(--deep-space-blue);
  --muted: #5b7487;
  --bg: var(--pale-sky);
  --card: var(--white);
  --border: #a8c4d9;
  --accent: var(--deep-space-blue);
  --accent-hover: #082a3d;
  --danger: var(--vibrant-coral);
  --danger-hover: #e85552;
  --ok: var(--jungle-green);
  --warn: #c47a2c;
}
* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; color: var(--fg);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 15px; line-height: 1.5;
}
body { display: flex; flex-direction: column; min-height: 100vh; }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 20px; }
.wrap-wide { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.topbar { background: var(--deep-space-blue); border-bottom: 3px solid var(--vibrant-coral); color: var(--white); }
.topbar .brand { color: var(--white); }
.topbar nav a { color: var(--pale-sky); }
.topbar nav a:hover { color: var(--white); }
.topbar .muted { color: var(--pale-sky); opacity: .75; }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; }
.brand { font-weight: 600; text-decoration: none; color: var(--fg); font-size: 17px; }
nav a { margin-left: 14px; text-decoration: none; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
main.wrap { padding-top: 24px; padding-bottom: 48px; flex: 1 0 auto; }
h1 { font-size: 24px; margin: 0 0 6px; }
h2 { font-size: 18px; margin: 24px 0 10px; }
p.lede { color: var(--muted); margin: 0 0 20px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 1px 2px rgba(11, 57, 84, 0.06);
}

.form-row { margin-bottom: 14px; display: flex; flex-direction: column; gap: 4px; }
.form-row label { font-weight: 500; font-size: 14px; }
.form-row input, .form-row select, .form-row textarea {
  font: inherit; padding: 8px 10px; border: 1px solid var(--border);
  border-radius: 6px; background: #fff;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent);
}
.form-row .hint { color: var(--muted); font-size: 12px; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.btn {
  display: inline-block; padding: 9px 16px; background: var(--accent); color: var(--white);
  border: 1px solid var(--accent); border-radius: 6px; cursor: pointer; font: inherit;
  text-decoration: none;
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--white); }
.btn-secondary { background: var(--white); color: var(--deep-space-blue); border-color: var(--deep-space-blue); }
.btn-secondary:hover { background: var(--pale-sky); color: var(--deep-space-blue); }
.btn-danger { background: var(--white); color: var(--vibrant-coral); border-color: var(--vibrant-coral); }
.btn-danger:hover { background: var(--vibrant-coral); color: var(--white); }

.flash { padding: 10px 14px; border-radius: 6px; margin-bottom: 12px; border: 1px solid; }
.flash-success { background: #e6f4ec; border-color: var(--jungle-green); color: #2f6b48; }
.flash-info    { background: var(--pale-sky); border-color: var(--deep-space-blue); color: var(--deep-space-blue); }
.flash-warn    { background: #fff3e0; border-color: #e2a76a; color: #7a4a1c; }
.flash-error   { background: #ffe9e8; border-color: var(--vibrant-coral); color: #8a2b2a; }

table.jobs { width: 100%; border-collapse: collapse; background: var(--white); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; table-layout: fixed; }
table.jobs th, table.jobs td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: 14px; vertical-align: middle; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
table.jobs th { background: var(--pale-sky); font-weight: 600; color: var(--deep-space-blue); text-transform: uppercase; font-size: 11px; letter-spacing: .04em; }
table.jobs tr:last-child td { border-bottom: none; }
table.jobs td.url { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }

table.jobs col.col-name     { width: 16%; }
table.jobs col.col-url      { width: 22%; }
table.jobs col.col-schedule { width: 11%; }
table.jobs col.col-status   { width: 10%; }
table.jobs col.col-runs     { width: 14%; }
table.jobs col.col-actions  { width: 27%; }

table.jobs td.runs { font-size: 12px; color: var(--muted); line-height: 1.35; white-space: normal; }
table.jobs td.runs .run-label { color: var(--deep-space-blue); font-weight: 500; }

table.jobs td.row-actions { text-align: right; white-space: nowrap; overflow: visible; text-overflow: clip; }
table.jobs td.row-actions .btn { padding: 5px 10px; font-size: 13px; margin-left: 4px; }
table.jobs td.row-actions .inline-form { margin: 0; }

.btn-sm { padding: 5px 10px; font-size: 13px; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 500; }
.badge-ok     { background: var(--jungle-green); color: var(--white); }
.badge-warn   { background: #ffe0b2; color: #7a4a1c; }
.badge-off    { background: var(--pale-sky); color: var(--deep-space-blue); }
.badge-error  { background: var(--vibrant-coral); color: var(--white); }

.inline-form { display: inline; }
.row-actions a, .row-actions button { margin-right: 6px; }

.hero {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 48px 40px;
  margin-bottom: 24px;
  text-align: center;
  box-shadow: 0 1px 2px rgba(11, 57, 84, 0.06);
}
.hero h1 { font-size: 36px; line-height: 1.15; margin: 0 0 12px; color: var(--deep-space-blue); }
.hero .lede { font-size: 17px; color: var(--muted); max-width: 620px; margin: 0 auto 24px; }
.hero .cta .btn { margin: 0 6px; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.features .feature {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
}
.features .feature h3 { margin: 0 0 8px; font-size: 16px; color: var(--deep-space-blue); }
.features .feature p  { margin: 0; color: var(--muted); font-size: 14px; }

.cta-panel { text-align: center; }
.cta-panel h2 { margin-top: 0; }

@media (max-width: 640px) {
  .features { grid-template-columns: 1fr; }
  .hero { padding: 32px 20px; }
  .hero h1 { font-size: 28px; }
  .plans { grid-template-columns: 1fr !important; }
}

/* Paywalled form block */
.paywall {
  position: relative;
  margin: 20px -4px 4px;
  border-radius: 8px;
}
.paywall-fields {
  filter: grayscale(1);
  opacity: .45;
  pointer-events: none;
  user-select: none;
  padding: 8px 4px;
}
.paywall-fields input,
.paywall-fields select,
.paywall-fields textarea { background: #f3f5f7; }
.paywall-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, rgba(191,215,234,0.35), rgba(191,215,234,0.7));
  border-radius: 8px;
  backdrop-filter: blur(1px);
}
.paywall-card {
  background: var(--white);
  border: 2px solid var(--vibrant-coral);
  border-radius: 10px;
  padding: 18px 22px;
  max-width: 380px;
  text-align: center;
  box-shadow: 0 6px 20px rgba(11, 57, 84, .15);
}
.paywall-card strong {
  display: inline-block;
  background: var(--vibrant-coral);
  color: var(--white);
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.paywall-card p { margin: 0 0 14px; font-size: 14px; color: var(--deep-space-blue); }

/* Pricing page */
.plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
  align-items: stretch;
}
.plans-2 {
  grid-template-columns: repeat(2, minmax(0, 320px));
  justify-content: center;
}
.plan .price-alt {
  margin: -8px 0 16px;
  font-size: 14px;
  color: var(--muted);
}
.plan .price-alt strong { color: var(--deep-space-blue); }
.plan {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  position: relative;
}
.plan h3 { margin: 0 0 6px; font-size: 18px; color: var(--deep-space-blue); }
.plan .price { font-size: 32px; font-weight: 700; color: var(--deep-space-blue); margin: 0 0 16px; }
.plan .price span { font-size: 14px; font-weight: 400; color: var(--muted); }
.plan ul { list-style: none; padding: 0; margin: 0 0 20px; flex: 1; }
.plan ul li { padding: 6px 0 6px 22px; position: relative; font-size: 14px; }
.plan ul li::before {
  content: "✓"; position: absolute; left: 0; top: 6px;
  color: var(--jungle-green); font-weight: 700;
}
.plan-highlight { border: 2px solid var(--vibrant-coral); box-shadow: 0 6px 20px rgba(11, 57, 84, .08); }
.plan-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--vibrant-coral); color: var(--white);
  padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em;
}

/* Footer */
.site-footer {
  margin-top: 48px;
  padding: 18px 0;
  border-top: 1px solid var(--border);
  background: var(--white);
}
.site-footer .footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.site-footer .footer-links a {
  margin-left: 16px;
  text-decoration: none;
  font-size: 14px;
}
.site-footer .footer-links a:hover { text-decoration: underline; }

/* Legal/long-form pages */
.legal { max-width: 760px; margin: 0 auto; }
.legal h1 { margin-bottom: 6px; }
.legal .updated { color: var(--muted); font-size: 13px; margin: 0 0 24px; }
.legal h2 { margin-top: 28px; font-size: 18px; color: var(--deep-space-blue); }
.legal h3 { margin-top: 20px; font-size: 15px; color: var(--deep-space-blue); }
.legal p, .legal li { font-size: 15px; line-height: 1.6; }
.legal ul { padding-left: 22px; }
.legal .notice {
  background: #fff6e4;
  border: 1px solid #e2a76a;
  color: #7a4a1c;
  padding: 12px 14px;
  border-radius: 6px;
  font-size: 14px;
  margin: 0 0 20px;
}
