/* ═══════════════════════════════════════════════════════════════
   Presend free tools — public, no-signup pages.
   Same Pagerly tokens as dashboard.css, but these pages are marketing
   surfaces with their own layout, so they don't inherit the app shell.
   ═══════════════════════════════════════════════════════════════ */
:root {
  --primary: hsl(216 100% 48%);
  --primary-hover: hsl(216 100% 42%);
  --primary-soft: hsl(216 100% 48% / 0.08);
  --secondary: hsl(247 28% 12%);
  --success: #21c45d;
  --success-soft: rgb(33 196 93 / 0.1);
  --destructive: hsl(0 84% 60%);
  --destructive-soft: hsl(0 84% 60% / 0.09);
  --warn: hsl(38 92% 50%);
  --warn-soft: hsl(38 92% 50% / 0.12);
  --background: #fff;
  --muted: hsl(210 40% 96.1%);
  --muted-foreground: hsl(215 16% 47%);
  --border: hsl(214 32% 91.4%);
  --accent-pink: hsl(340 72% 67%);
  --radius: 0.5rem;
  --radius-lg: 0.75rem;
  --shadow-sm: 0 1px 2px hsl(247 28% 12% / 0.05);
  --shadow: 0 1px 3px hsl(247 28% 12% / 0.05), 0 4px 16px hsl(247 28% 12% / 0.06);
  --shadow-lg: 0 12px 40px hsl(247 28% 12% / 0.14);
  --font: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --t: 300ms ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font); font-weight: 500; font-size: 14px;
  color: var(--secondary); background: var(--background);
  -webkit-font-smoothing: antialiased; line-height: 1.55;
}
button, input, textarea { font-family: var(--font); }
.hidden { display: none !important; }
a { color: var(--primary); }

/* ── Logo (shared with the dashboard) ── */
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; letter-spacing: -0.3px; color: var(--secondary); text-decoration: none; }
.logo .mark {
  width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center;
  background: var(--accent-pink); box-shadow: 0 4px 12px hsl(340 72% 67% / 0.35); flex: 0 0 28px;
}
.logo .mark svg { width: 15px; height: 15px; }
.logo .mark path { stroke: #fff; stroke-width: 3; fill: none; stroke-linecap: round; stroke-linejoin: round; }

/* ── Shell ── */
.wrap { width: min(880px, 92vw); margin: 0 auto; }
header.top {
  position: sticky; top: 0; z-index: 20; background: hsl(0 0% 100% / 0.86);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--border);
}
header.top .wrap { display: flex; align-items: center; gap: 16px; height: 62px; }
header.top nav { margin-left: auto; display: flex; align-items: center; gap: 20px; }
header.top nav a { color: var(--muted-foreground); text-decoration: none; font-size: 13.5px; font-weight: 600; transition: color var(--t); }
header.top nav a:hover { color: var(--secondary); }

.hero {
  padding: 56px 0 34px; text-align: center;
  background:
    radial-gradient(700px 420px at 85% -20%, hsl(216 100% 48% / 0.07), transparent 60%),
    radial-gradient(600px 380px at 0% 120%, hsl(340 72% 67% / 0.06), transparent 55%);
}
.hero h1 { font-size: clamp(27px, 4.6vw, 38px); font-weight: 700; letter-spacing: -0.9px; line-height: 1.15; }
.hero .sub { color: var(--muted-foreground); font-size: 15.5px; margin: 14px auto 0; max-width: 60ch; }
.pill-badges { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 22px; }
.badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600;
  padding: 5px 11px; border-radius: 999px; background: var(--muted); color: var(--muted-foreground);
}
.badge svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.badge.ok { background: var(--success-soft); color: #14853f; }

main { padding-bottom: 72px; }

/* ── Cards ── */
.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: 22px;
}
.card + .card { margin-top: 18px; }
.card h2 { font-size: 16px; font-weight: 700; letter-spacing: -0.3px; }
.card h2 + p { color: var(--muted-foreground); font-size: 13.5px; margin-top: 6px; }

/* ── Editor ── */
.field, textarea.field {
  width: 100%; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 11px 13px; font-size: 14px; font-weight: 500; color: var(--secondary);
  background: #fff; transition: border-color var(--t), box-shadow var(--t); outline: none;
}
.field:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
textarea.field { min-height: 210px; resize: vertical; line-height: 1.6; }
.field-row { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; margin-bottom: 12px; }
.field-row label, .lbl { display: block; font-size: 12px; font-weight: 600; color: var(--muted-foreground); margin-bottom: 6px; }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.actions .spacer { margin-left: auto; }
.counter { font-size: 12px; color: var(--muted-foreground); }

.btn {
  border: 1px solid transparent; border-radius: var(--radius); font-weight: 600; font-size: 13.5px;
  padding: 10px 18px; cursor: pointer; transition: all var(--t); background: var(--muted); color: var(--secondary);
}
.btn:hover { background: hsl(210 40% 92%); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 4px 14px hsl(216 100% 48% / 0.25); }
.btn-primary:hover { background: var(--primary-hover); box-shadow: 0 6px 18px hsl(216 100% 48% / 0.32); }
.btn-ghost { background: transparent; border-color: var(--border); }
.btn-ghost:hover { background: var(--muted); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Verdict ── */
.verdict {
  display: flex; align-items: flex-start; gap: 13px; padding: 15px 17px;
  border-radius: var(--radius); border: 1px solid var(--border); background: var(--muted);
}
.verdict .dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; flex: 0 0 10px; background: var(--muted-foreground); }
.verdict .vt { display: block; font-weight: 700; font-size: 15px; letter-spacing: -0.2px; }
.verdict .vd { display: block; color: var(--muted-foreground); font-size: 13.5px; margin-top: 3px; }
.verdict.is-clean { background: var(--success-soft); border-color: hsl(142 71% 45% / 0.25); }
.verdict.is-clean .dot { background: var(--success); }
.verdict.is-warn { background: var(--warn-soft); border-color: hsl(38 92% 50% / 0.3); }
.verdict.is-warn .dot { background: var(--warn); }
.verdict.is-risk { background: var(--destructive-soft); border-color: hsl(0 84% 60% / 0.25); }
.verdict.is-risk .dot { background: var(--destructive); }

/* ── Findings ── */
.findings { list-style: none; margin-top: 16px; display: flex; flex-direction: column; gap: 9px; }
.finding {
  display: flex; gap: 11px; padding: 12px 14px; border: 1px solid var(--border);
  border-radius: var(--radius); background: #fff;
}
.finding .lvl {
  flex: 0 0 auto; font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px; margin-top: 1px; height: fit-content;
}
.lvl.risk { background: var(--destructive-soft); color: hsl(0 72% 45%); }
.lvl.warn { background: var(--warn-soft); color: hsl(32 81% 38%); }
.lvl.info { background: var(--primary-soft); color: var(--primary); }
.finding .ft { display: block; font-weight: 600; font-size: 13.5px; }
.finding .fd { display: block; color: var(--muted-foreground); font-size: 13px; margin-top: 2px; overflow-wrap: anywhere; }

/* ── Highlighted preview ── */
.preview {
  margin-top: 16px; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; background: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere;
  font-size: 13.5px; line-height: 1.75; max-height: 340px; overflow-y: auto;
}
.preview mark { background: var(--warn-soft); box-shadow: inset 0 -2px 0 hsl(38 92% 50% / 0.55); color: inherit; padding: 1px 0; border-radius: 2px; }
.preview mark.risk { background: var(--destructive-soft); box-shadow: inset 0 -2px 0 hsl(0 84% 60% / 0.5); }
.sec-title { font-size: 12px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted-foreground); margin: 20px 0 8px; }

/* ── Tool index grid ── */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); margin-top: 26px; }
a.tool-card {
  display: flex; flex-direction: column; gap: 9px; text-decoration: none; color: inherit;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); padding: 20px; transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}
a.tool-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: hsl(216 100% 48% / 0.35); }
a.tool-card .ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--primary-soft); }
a.tool-card .ic svg { width: 17px; height: 17px; fill: none; stroke: var(--primary); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
a.tool-card h3 { font-size: 14.5px; font-weight: 700; letter-spacing: -0.2px; }
a.tool-card p { color: var(--muted-foreground); font-size: 13px; }

/* ── Cross-sell / CTA ── */
.cta {
  margin-top: 34px; text-align: center; padding: 30px 24px;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: linear-gradient(180deg, hsl(216 100% 48% / 0.05), hsl(340 72% 67% / 0.04));
}
.cta h2 { font-size: 19px; font-weight: 700; letter-spacing: -0.4px; }
.cta p { color: var(--muted-foreground); font-size: 14px; margin: 9px auto 18px; max-width: 54ch; }
.cta .btn-primary { text-decoration: none; display: inline-block; }

.more { margin-top: 30px; }
.more .sec-title { margin-top: 0; }
.more-links { display: flex; flex-wrap: wrap; gap: 10px; }
.more-links a {
  text-decoration: none; font-size: 13px; font-weight: 600; color: var(--secondary);
  border: 1px solid var(--border); border-radius: 999px; padding: 7px 14px; transition: all var(--t); background: #fff;
}
.more-links a:hover { border-color: hsl(216 100% 48% / 0.4); color: var(--primary); }

footer.foot { border-top: 1px solid var(--border); padding: 26px 0 40px; color: var(--muted-foreground); font-size: 12.5px; }
footer.foot .wrap { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; }
footer.foot a { color: var(--muted-foreground); text-decoration: none; }
footer.foot a:hover { color: var(--secondary); }
footer.foot .spacer { margin-left: auto; }

.engine-error {
  margin: 20px 0; padding: 14px 16px; border-radius: var(--radius);
  background: var(--destructive-soft); border: 1px solid hsl(0 84% 60% / 0.25);
  color: hsl(0 72% 40%); font-size: 13.5px;
}
.engine-error code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }

@media (max-width: 640px) {
  .field-row { grid-template-columns: 1fr; }
  .hero { padding: 40px 0 26px; }
  header.top nav { gap: 14px; }
  header.top nav a { font-size: 12.5px; }
}
@media (max-width: 520px) {
  /* Three links wrap to two lines and the bar doubles in height. The dashboard
     is the one a first-time visitor has no use for, so it's the one that goes. */
  header.top nav a[href="/dashboard.html"] { display: none; }
  .logo { font-size: 15.5px; }
}
