/* dbproof.dev's styles, shared by the landing page and the tool pages. */
:root {
  --bg: #07090d;
  --surface: #0d1117;
  --surface-2: #151b23;
  --border: #262c36;
  --text: #e6edf3;
  --muted: #8b949e;
  --teal: #5fe3d1;
  --teal-2: #1cb0ab;
  --danger: #f85149;
  --warning: #d29922;
  --success: #3fb950;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif;
  --display: "Sora", var(--sans);
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
@font-face { font-family: "Sora"; font-weight: 700; font-display: swap; src: url(/fonts/sora-700.woff2) format("woff2"); }
h1, h2 { font-family: var(--display); text-wrap: balance; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
code, pre { font-family: var(--mono); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .wrap { padding: 0 32px; } }

/* Navigation */
nav { position: sticky; top: 0; z-index: 10; background: rgb(7 9 13 / 0.8); backdrop-filter: blur(12px); border-bottom: 1px solid rgb(38 44 54 / 0.6); }
nav .wrap { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { display: flex; align-items: center; gap: 7px; font: 700 18px var(--display); letter-spacing: -0.02em; text-decoration: none; }
/* The logo is about 1.7 times the name's cap height, centred on it. */
.brand img { width: 22px; height: 22px; }
/* Trimmed to its capitals, so centring lines them up with the logo. */
.brand span { text-box: trim-both cap alphabetic; }
.links { display: none; gap: 24px; margin-left: auto; font-size: 14px; color: var(--muted); }
.links a { padding: 11px 0; text-decoration: none; }
.links a:hover { color: var(--text); }
@media (min-width: 768px) { .links { display: flex; } }
.button { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 8px; font-size: 15px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.button.primary { background: var(--teal); color: #04120f; }
.button.primary:hover { background: #8af0e1; }
.button.secondary { border: 1px solid var(--border); color: var(--text); }
.button.secondary:hover { background: var(--surface-2); }
nav .button { position: relative; height: 34px; padding: 0 14px; font-size: 14px; margin-left: auto; }
/* The header's buttons and links look small but take taps 44px tall. */
nav .button::after { content: ""; position: absolute; inset: -5px 0; }
@media (min-width: 768px) { nav .button { margin-left: 0; } }

/* Hero */
.hero { position: relative; padding: 72px 0 32px; text-align: center; overflow: hidden; }
.hero-grid { position: relative; display: grid; align-items: center; }
/* The logo as ASCII art, drawn by the script at the end of the page. */
.ascii { display: none; user-select: none; }
.ascii pre { grid-area: 1 / 1; margin: 0; font: 8px/8px var(--mono); letter-spacing: 0.04em; }
.ascii-barrel { color: var(--teal); opacity: 0.4; }
.ascii-check { color: #e6fffb; opacity: 0.85; }
@media (min-width: 1000px) {
  .hero { text-align: left; }
  .hero-grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr); gap: 24px; }
  /* Narrower than its column: the logo beside it overhangs to the left. */
  .hero h1 { font-size: 48px; max-width: 620px; }
  .hero .sub { max-width: 600px; }
  .hero .sub, .hero h1 { margin-left: 0; }
  .hero .ctas { justify-content: flex-start; }
  .ascii { display: grid; justify-self: end; }
}
.hero::before { content: ""; position: absolute; inset: auto 0 0 0; height: 700px; background: radial-gradient(ellipse at center, rgb(28 176 171 / 0.22), transparent 62%); pointer-events: none; }
.pill { display: inline-block; padding: 4px 14px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); color: var(--muted); font-size: 13px; text-wrap: balance; }
.pill b { color: var(--teal); font-weight: 600; }
.pill a { text-underline-offset: 3px; text-decoration-color: rgb(139 148 158 / 0.5); }
.pill a:hover { color: var(--text); }
h1 { margin: 24px auto 0; max-width: 880px; font-size: clamp(32px, 6vw, 56px); line-height: 1.08; letter-spacing: -0.03em; word-spacing: 0.08em; }
h1 em { font-style: normal; background: linear-gradient(90deg, var(--teal), #a5f3e8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sub { margin: 20px auto 0; max-width: 680px; color: var(--muted); font-size: clamp(17px, 2.2vw, 20px); }
.ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 32px; }

/* The pull request mock */
.pr { position: relative; margin: 56px 0 0; text-align: left; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); box-shadow: 0 30px 80px rgb(0 0 0 / 0.55); overflow: hidden; }
.pr-head { padding: 16px 20px; border-bottom: 1px solid var(--border); }
.pr-title { font-size: 20px; font-weight: 600; }
.pr-title span { color: var(--muted); font-weight: 400; }
.pr-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; color: var(--muted); font-size: 14px; }
.state { padding: 2px 10px; border-radius: 999px; background: #238636; color: #fff; font-size: 13px; font-weight: 600; }
.branch { padding: 1px 6px; border-radius: 6px; background: rgb(56 139 253 / 0.15); color: #79c0ff; font: 12px var(--mono); }
.comment { margin: 20px; border: 1px solid var(--border); border-radius: 8px; }
.comment-head { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-bottom: 1px solid var(--border); background: var(--surface-2); color: var(--muted); font-size: 14px; border-radius: 8px 8px 0 0; }
.comment-head img { width: 20px; height: 20px; }
.comment-head b { color: var(--text); }
.bot { padding: 0 6px; border: 1px solid var(--border); border-radius: 999px; font-size: 12px; }
.comment-body { padding: 14px; font-size: 15px; }
.comment-body p { margin: 0 0 12px; }
.findings { display: grid; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; font-size: 14px; }
.finding { display: grid; grid-template-columns: 76px 1fr; gap: 4px 12px; padding: 10px 12px; border-top: 1px solid var(--border); }
.finding:first-child { border-top: 0; }
.finding .where { grid-column: 2; color: var(--muted); font: 12.5px var(--mono); overflow-wrap: anywhere; }
@media (min-width: 720px) { .finding { grid-template-columns: 76px 1fr auto; } .finding .where { grid-column: 3; text-align: right; white-space: nowrap; } }
.sev { font: 600 12.5px var(--mono); }
.sev.error { color: var(--danger); }
.sev.warning { color: var(--warning); }
.sev.drift { color: var(--teal); }
.details { display: inline-block; margin-top: 12px; color: #4493f8; font-size: 14px; text-decoration: none; }
.checks { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 20px 20px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; }
.checks .x { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; }
.checks .name { font-weight: 600; }
.checks .result { color: var(--muted); }
.checks .required { margin-left: auto; padding: 0 8px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); font-size: 12px; }

/* Promises under the hero */
.promises { display: grid; gap: 16px; margin: 48px 0 0; padding: 0; list-style: none; }
@media (min-width: 720px) { .promises { grid-template-columns: repeat(3, 1fr); } }
.promises li { padding: 14px 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--muted); text-align: left; }
.promises b { display: block; color: var(--text); }

/* Sections */
section { padding: 88px 0 0; }
.eyebrow { color: var(--teal); font: 600 13px var(--mono); letter-spacing: 0.04em; text-transform: uppercase; }
h2 { margin: 10px 0 0; max-width: 760px; font-size: clamp(24px, 3.4vw, 34px); line-height: 1.2; letter-spacing: -0.02em; }
/* Paragraphs stop at about 70 characters a line: 54ch, since ch is the
   width of a zero, wider than the average letter. */
.lead { max-width: 54ch; margin: 14px 0 0; color: var(--muted); font-size: 18px; }

.rules { display: grid; gap: 16px; margin-top: 36px; }
@media (min-width: 640px) { .rules { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .rules { grid-template-columns: repeat(3, 1fr); } }
.rule { padding: 18px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.rule .sev { display: block; }
.rule h3 { margin: 4px 0 0; font-size: 16px; }
.rule p { margin: 6px 0 0; color: var(--muted); }

.steps { display: grid; gap: 16px; margin-top: 36px; counter-reset: step; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 22px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: rgb(95 227 209 / 0.12); color: var(--teal); font: 600 14px var(--mono); }
.step h3 { margin: 0; font-size: 18px; }
.step p { margin: 0; color: var(--muted); }
.integration p { max-width: 54ch; margin: 24px 0 12px; color: var(--muted); }
pre.snippet { margin: 0; padding: 12px 14px; overflow-x: auto; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: #c9d1d9; font-size: 12.5px; line-height: 1.55; }
.k { color: #ff7b72; } .s { color: #a5d6ff; } .c { color: var(--muted); }

.features { display: grid; gap: 64px; margin-top: 44px; }
.feature { display: grid; gap: 24px; align-items: center; }
@media (min-width: 900px) {
  .feature { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 48px; }
  .feature.reverse { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
  .feature.reverse .feature-text { order: 2; }
}
.feature h3 { margin: 0; font-size: 22px; letter-spacing: -0.01em; }
.feature p { margin: 10px 0 0; color: var(--muted); font-size: 16.5px; }
.feature img { display: block; width: 100%; height: auto; border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 24px 64px rgb(0 0 0 / 0.5); }

.reads { display: grid; gap: 16px; margin-top: 36px; }
@media (min-width: 800px) { .reads { grid-template-columns: 1fr 1fr; } }
.panel { padding: 22px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.panel h3 { margin: 0 0 12px; font-size: 17px; }
.panel ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; color: var(--muted); }
.panel li { display: flex; gap: 10px; }
.panel li::before { flex: none; font-weight: 700; }
.yes li::before { content: "✓"; color: var(--success); }
.no li::before { content: "✕"; color: var(--danger); }
.panel li b { color: var(--text); font-weight: 600; }
.note { max-width: 54ch; margin-top: 16px; color: var(--muted); }
.note a { color: var(--teal); }

.callout { display: grid; gap: 8px; margin-top: 88px; padding: 32px; border: 1px solid var(--border); border-radius: 16px; background: linear-gradient(135deg, rgb(28 176 171 / 0.12), transparent 60%), var(--surface); }
.callout h2 { margin: 0; }
.callout p { margin: 0; max-width: 54ch; color: var(--muted); font-size: 18px; }

.faq { margin-top: 28px; border-top: 1px solid var(--border); }
details { border-bottom: 1px solid var(--border); }
summary { cursor: pointer; padding: 18px 0; font-size: 17px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--muted); font-weight: 400; }
details[open] summary::after { content: "−"; }
details p { margin: 0 0 18px; max-width: 54ch; color: var(--muted); }

.final { padding: 96px 0; text-align: center; }
.final h2 { margin: 0 auto; }
.final .lead { margin: 14px auto 0; }

footer { border-top: 1px solid var(--border); color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 0 24px; padding-top: 16px; padding-bottom: 28px; }
footer a { padding: 11px 0; text-decoration: none; }
footer a:hover { color: var(--text); }
footer .copy { margin-left: auto; }

/* Tool pages */
p code, li code, summary code { padding: 1px 5px; border-radius: 5px; background: var(--surface-2); font-size: 0.9em; }
.tool-links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 20px; color: var(--muted); font-size: 15px; }
.tool-links a { color: var(--teal); }
/* Tool pages have no logo beside the hero, so it stays centred. */
@media (min-width: 1000px) {
  .hero.tool { text-align: center; }
  .hero.tool h1, .hero.tool .sub { margin-left: auto; }
  .hero.tool .ctas { justify-content: center; }
}
