/* BackupProof site: paper and ink, one receipt. */
:root {
  --ink: #0e1a33;
  --ink-2: #16264a;
  --paper: #f6f8fc;
  --surface: #ffffff;
  --text: #17203a;
  --muted: #56607a;
  --line: #d9dfec;
  --accent: #3d6bff;
  --accent-ink: #2a52d6;
  --accent-soft: #8fb0ff;
  --ok: #1f9d6b;
  --mark-check: #0e1a33;
  --focus: #3d6bff;
  --sans: "Segoe UI Variable Text", "Segoe UI", -apple-system, "SF Pro Text", system-ui, "Helvetica Neue", Arial, sans-serif;
  --display: "Segoe UI Variable Display", "Segoe UI", -apple-system, "SF Pro Display", system-ui, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
  --wrap: 1120px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0b1428;
    --surface: #111d38;
    --text: #e6ecfa;
    --muted: #a3b0cc;
    --line: #22325a;
    --accent: #8fb0ff;
    --accent-ink: #b3c9ff;
    --ok: #3cc58f;
    --focus: #8fb0ff;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 17px/1.6 var(--sans);
  text-rendering: optimizeLegibility;
}
a { color: var(--accent-ink); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
img, svg { display: block; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.narrow > * { max-width: 760px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 10; background: var(--surface); color: var(--text); padding: 10px 14px; border-radius: 8px; }
.skip:focus { top: 12px; }

h1, h2, h3 { font-family: var(--display); line-height: 1.1; text-wrap: balance; margin: 0; }
h2 { font-size: clamp(28px, 3.4vw, 40px); letter-spacing: -0.02em; font-weight: 700; }
h3 { font-size: 20px; letter-spacing: -0.01em; font-weight: 650; }
p { margin: 0 0 1em; text-wrap: pretty; }

/* ---------------------------------------------------------------- top bar */
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--ink) 92%, transparent); backdrop-filter: blur(10px); color: #e6ecfa; }
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font: 700 21px/1 var(--display); letter-spacing: -0.02em; }
.brand b { color: var(--accent-soft); font-weight: 700; }
.mark { width: 26px; height: 32px; color: var(--accent-soft); }
.top nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 22px; margin: 0; padding: 0; }
.top nav a { color: #c9d4ee; text-decoration: none; font-size: 15px; padding: 6px 0; }
.top nav a:hover { color: #fff; }
.top nav .gh { color: #fff; border: 1px solid #3a4f80; border-radius: 999px; padding: 6px 14px; }
.top nav .gh:hover { border-color: var(--accent-soft); }
.top nav .demo { color: var(--accent-soft); font-weight: 600; }
.top nav .demo:hover { color: #fff; }

/* ---------------------------------------------------------------- hero */
.hero { background: var(--ink); color: #e6ecfa; padding: 72px 0 96px; position: relative; overflow: hidden; }
.hero::after { /* a faint ledger grid, like ruled paper */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(to bottom, rgba(143, 176, 255, .06) 1px, transparent 1px);
  background-size: 100% 32px;
  mask-image: linear-gradient(to bottom, transparent, #000 30%, #000 70%, transparent);
}
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 64px; align-items: center; position: relative; z-index: 1; }
.hero h1 { font-size: clamp(44px, 7vw, 84px); letter-spacing: -0.045em; font-weight: 800; color: #fff; margin-bottom: 24px; }
.lede { font-size: clamp(18px, 1.6vw, 20px); color: #c3cee8; max-width: 34em; margin-bottom: 32px; }
.hero-links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 16px 0 0; font-size: 15px; color: #94a3c4; }
.hero-links a { color: #dbe5ff; }

/* install boxes */
.install-box label { display: block; font-size: 14px; color: #94a3c4; margin-bottom: 8px; }
.cmd { display: flex; align-items: stretch; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.hero .cmd { border-color: #2c4170; background: #08122a; }
.cmd-text { flex: 1; min-width: 0; border: 0; background: transparent; color: inherit; font: 14.5px/1.4 var(--mono); padding: 14px 16px; text-overflow: ellipsis; }
.hero .cmd-text { color: #e6ecfa; }
.cmd-text:focus-visible { outline-offset: -3px; }
.copy { flex: none; border: 0; border-left: 1px solid var(--line); background: var(--accent); color: #fff; font: 600 15px var(--sans); padding: 0 20px; cursor: pointer; touch-action: manipulation; }
.hero .copy { border-left-color: #2c4170; }
.copy:hover { filter: brightness(1.08); }
.copy[data-done] { background: var(--ok); }
@media (prefers-color-scheme: dark) { .copy { color: #0b1428; } }

/* ---------------------------------------------------------------- the receipt */
.receipt { margin: 0; }
.receipt-paper {
  background: #fbfcff; color: #18223b; border-radius: 6px 6px 0 0;
  padding: 28px 28px 24px; font-size: 15px;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .55), 0 2px 0 rgba(255, 255, 255, .4) inset;
  transform: rotate(-1.2deg);
  /* torn, perforated bottom edge */
  -webkit-mask: radial-gradient(circle 7px at 50% 100%, transparent 98%, #000) bottom / 20px 100% repeat-x, linear-gradient(#000, #000) top / 100% calc(100% - 6px) no-repeat;
          mask: radial-gradient(circle 7px at 50% 100%, transparent 98%, #000) bottom / 20px 100% repeat-x, linear-gradient(#000, #000) top / 100% calc(100% - 6px) no-repeat;
  padding-bottom: 34px;
}
.r-head { display: flex; justify-content: space-between; font: 700 19px var(--display); letter-spacing: -0.01em; margin-bottom: 4px; }
.r-head span:last-child { font: 500 15px var(--mono); color: #4a5878; align-self: center; }
.r-meta { color: #5a6684; font-size: 14px; border-bottom: 1px dashed #c9d2e6; padding-bottom: 14px; margin-bottom: 14px; }
.r-checks { list-style: none; margin: 0 0 14px; padding: 0; }
.r-checks li { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.ok { flex: none; width: 18px; height: 18px; border-radius: 50%; background: var(--ok); position: relative; display: inline-block; vertical-align: -3px; }
.ok::after { content: ""; position: absolute; left: 6px; top: 3px; width: 5px; height: 9px; border: solid #fff; border-width: 0 2.2px 2.2px 0; transform: rotate(45deg); }
.receipt .ok { background: #1f9d6b; }
.r-total { display: flex; justify-content: space-between; font-variant-numeric: tabular-nums; border-top: 1px dashed #c9d2e6; padding-top: 12px; margin-bottom: 18px; font-weight: 600; }
.r-seal { display: flex; gap: 14px; align-items: center; background: #eef3ff; border: 1px solid #c9d7ff; border-radius: 10px; padding: 12px 14px; }
.r-seal svg { width: 34px; height: 41px; color: #3d6bff; flex: none; }
.r-seal div { display: grid; line-height: 1.35; }
.r-seal strong { font: 700 16px var(--display); }
.r-seal span { font-size: 13.5px; color: #4a5878; }
.receipt figcaption { color: #94a3c4; font-size: 14px; margin-top: 22px; max-width: 30em; }

/* One orchestrated moment: the checks print onto the receipt. */
@media (prefers-reduced-motion: no-preference) {
  .r-checks li, .r-total, .r-seal { animation: print .45s ease-out both; }
  .r-checks li:nth-child(1) { animation-delay: .35s; }
  .r-checks li:nth-child(2) { animation-delay: .6s; }
  .r-checks li:nth-child(3) { animation-delay: .85s; }
  .r-checks li:nth-child(4) { animation-delay: 1.1s; }
  .r-checks li:nth-child(5) { animation-delay: 1.35s; }
  .r-total { animation-delay: 1.6s; }
  .r-seal { animation: stamp .5s cubic-bezier(.2, 1.4, .4, 1) 1.95s both; }
}
@keyframes print { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes stamp { from { opacity: 0; transform: scale(1.12); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- sections */
section:not(.hero) { padding: 96px 0; }
.problem { background: var(--surface); border-bottom: 1px solid var(--line); }
.problem h2 { margin-bottom: 20px; }
.problem p { font-size: 19px; color: var(--muted); }
.tested { color: var(--ok); white-space: nowrap; }
.tested::before { content: "✓ "; }

.how h2, .features h2, .install h2 { margin-bottom: 40px; }
.chain { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; position: relative; }
.chain::before { /* the chain that links the steps */
  content: ""; position: absolute; left: 22px; right: 22px; top: 22px; height: 0;
  border-top: 2px dashed color-mix(in srgb, var(--accent) 55%, transparent);
}
.chain li { counter-increment: step; position: relative; }
.chain li::before {
  content: counter(step); display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--accent); color: var(--accent-ink);
  font: 700 18px var(--display); margin-bottom: 18px; position: relative;
}
.chain h3 { margin-bottom: 8px; }
.chain p { color: var(--muted); font-size: 16px; margin: 0; }

.features { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.spec { margin: 0 0 64px; border-top: 1px solid var(--line); }
.spec > div { display: grid; grid-template-columns: 220px 1fr; gap: 24px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.spec dt { font: 650 18px var(--display); letter-spacing: -0.01em; }
.spec dd { margin: 0; color: var(--muted); max-width: 60ch; }

.compare { width: 100%; border-collapse: collapse; font-size: 16px; }
.compare caption { text-align: left; font: 700 22px var(--display); letter-spacing: -0.01em; padding-bottom: 16px; }
.compare th, .compare td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare thead th { font-size: 14px; color: var(--muted); font-weight: 600; }
.compare tbody th { font-weight: 600; }
.compare td { color: var(--muted); }
.compare td:last-child { color: var(--text); font-weight: 600; background: color-mix(in srgb, var(--accent) 7%, transparent); }
.compare .ok { margin-right: 8px; }
.compare-note { color: var(--muted); font-size: 15px; margin-top: 16px; max-width: 70ch; }

.auditors-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center; }
.auditors h2 { margin-bottom: 20px; }
.auditors p { color: var(--muted); }
.terminal { margin: 0; background: #0a1226; color: #d4def5; border-radius: 12px; padding: 22px 24px; font: 14px/1.7 var(--mono); overflow-x: auto; overscroll-behavior-x: contain; border: 1px solid #1d2c52; white-space: pre; }
.t-prompt { color: #6f84b3; user-select: none; }
.t-ok { color: #3cc58f; font-weight: 700; }

.install { background: var(--surface); border-top: 1px solid var(--line); }
.install .sub { color: var(--muted); max-width: 60ch; margin: -24px 0 36px; }
.install-list { display: grid; gap: 28px; }
.install-item h3 { margin-bottom: 6px; font-size: 18px; }
.install-item p { color: var(--muted); font-size: 15px; margin-bottom: 8px; }
.after { margin-top: 32px; color: var(--muted); max-width: 70ch; }
.script-note { font-size: 15px; color: var(--muted); margin-top: 8px; }

.faq { border-top: 1px solid var(--line); }
.faq h2 { margin-bottom: 28px; }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; font: 600 18px var(--display); padding: 16px 0; list-style-position: outside; }
.faq summary:hover { color: var(--accent-ink); }
.faq details p { color: var(--muted); max-width: 70ch; }

/* ---------------------------------------------------------------- footer */
.foot { background: var(--ink); color: #a7b4d2; padding: 64px 0 40px; font-size: 15px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px 32px; }
.foot-brand p { max-width: 30ch; }
.brand.small { font-size: 18px; margin: 0 0 14px; }
.foot h2 { font: 600 14px var(--sans); color: #fff; letter-spacing: 0; margin: 4px 0 14px; }
.foot ul { list-style: none; display: grid; gap: 10px; margin: 0; padding: 0; }
.foot a { color: #dbe5ff; text-decoration: none; }
.foot a:hover { color: #fff; text-decoration: underline; }
.foot-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 20px; }
.foot .foot-btn { border: 1px solid #3a4f80; border-radius: 999px; padding: 8px 16px; color: #fff; }
.foot .foot-btn:hover { border-color: var(--accent-soft); text-decoration: none; }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 48px; padding-top: 22px; border-top: 1px solid #22325a; }
.foot-bottom a { text-decoration: underline; text-underline-offset: 3px; }
.fine { font-size: 14px; margin: 0; }

/* ---------------------------------------------------------------- doc pages */
.top nav a[aria-current="page"] { color: #fff; box-shadow: inset 0 -2px 0 var(--accent-soft); }
.doc { padding: 56px 0 96px; }
.doc-grid { display: grid; grid-template-columns: minmax(0, 1fr) 220px; grid-template-areas: "head ." "body toc"; gap: 0 64px; }
.doc-head { grid-area: head; padding-bottom: 32px; margin-bottom: 40px; border-bottom: 1px solid var(--line); }
.doc-head h1 { font-size: clamp(36px, 5vw, 56px); letter-spacing: -0.035em; font-weight: 800; margin-bottom: 16px; }
.doc-lede { font-size: clamp(18px, 1.6vw, 20px); color: var(--muted); max-width: 40em; margin: 0; }
.toc { grid-area: toc; align-self: start; position: sticky; top: 96px; font-size: 14.5px; border-left: 2px solid var(--line); padding-left: 18px; }
.toc-title { font-weight: 600; color: var(--text); margin-bottom: 10px; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--accent-ink); text-decoration: underline; }
.prose { grid-area: body; min-width: 0; max-width: 72ch; }
.prose h2 { font-size: clamp(24px, 2.6vw, 30px); margin: 56px 0 16px; scroll-margin-top: 88px; }
.prose > h2:first-child, .prose > pre:first-child + h2 { margin-top: 0; }
.prose > pre:first-child { margin-bottom: 48px; }
.prose h3 { font-size: 18px; margin: 28px 0 10px; scroll-margin-top: 88px; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin-bottom: 8px; }
.prose li::marker { color: var(--muted); }
.prose code { font: 0.88em var(--mono); background: color-mix(in srgb, var(--accent) 9%, transparent); border-radius: 5px; padding: 0.12em 0.36em; overflow-wrap: anywhere; }
.prose .terminal code { background: none; padding: 0; font: inherit; overflow-wrap: normal; }
.prose .terminal { margin: 0 0 1.3em; }
.prose .cmd { margin-bottom: 1em; }
.prose h3 + .cmd { margin-top: 0; }
.diagram { font-size: 12.5px; line-height: 1.55; }
.table-wrap { overflow-x: auto; overscroll-behavior-x: contain; margin: 0 0 1.4em; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 15.5px; }
.table-wrap th, .table-wrap td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.table-wrap tr:last-child > * { border-bottom: 0; }
.table-wrap thead th { font-size: 14px; font-weight: 600; color: var(--muted); background: color-mix(in srgb, var(--line) 35%, transparent); }
.table-wrap tbody th { font-weight: 600; white-space: nowrap; }
.table-wrap td { color: var(--muted); }
.downloads td a { font-family: var(--mono); font-size: 14px; }
.callout { border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line)); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); border-radius: 12px; padding: 16px 20px; margin: 0 0 1.4em; }
.callout p { margin: 0; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 10px; vertical-align: 1px; }
.ok-dot { background: var(--ok); } .idle-dot { background: #8a94ab; } .warn-dot { background: #d99a1e; } .bad-dot { background: #d64545; }
.release-date { font: 500 15px var(--sans); color: var(--muted); letter-spacing: 0; margin-left: 10px; }
.not-found { padding: 96px 0 140px; }
.not-found .doc-head { border: 0; margin: 0; }
.nf-links { list-style: none; display: flex; flex-wrap: wrap; gap: 12px 28px; padding: 0; margin: 0; font-size: 17px; }

/* ---------------------------------------------------------------- small screens */
@media (max-width: 900px) {
  .hero-grid, .auditors-grid { grid-template-columns: 1fr; gap: 48px; }
  .doc-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "toc" "body"; }
  .toc { position: static; margin-bottom: 40px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
  .receipt-paper { transform: none; }
  .chain { grid-template-columns: 1fr 1fr; }
  .chain::before { display: none; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .top nav ul { gap: 2px 16px; }
  .top nav li:nth-child(1), .top nav li:nth-child(3), .top nav li:nth-child(4) { display: none; }
  .hero { padding: 48px 0 64px; }
  section:not(.hero) { padding: 64px 0; }
  .chain { grid-template-columns: 1fr; }
  .spec > div { grid-template-columns: 1fr; gap: 6px; }
  .compare { font-size: 14.5px; }
  .compare th, .compare td { padding: 12px 8px; }
  .compare thead th:nth-child(2), .compare tbody td:nth-child(2) { display: none; }
  .receipt-paper { padding: 22px 18px 32px; }
  .copy { padding: 0 14px; }
  .doc { padding: 40px 0 72px; }
  .table-wrap th, .table-wrap td { padding: 10px 12px; }
  .table-wrap tbody th { white-space: normal; }
}
@media (pointer: coarse) { .copy { min-width: 64px; } }
.button { display: inline-block; background: var(--accent); color: #fff; text-decoration: none; font-weight: 600; border-radius: 999px; padding: 12px 22px; }
.button:hover { filter: brightness(1.08); }
@media (prefers-color-scheme: dark) { .button { color: #0e1a33; } }
