/* Siftaway website. One stylesheet, no framework, no web fonts, no trackers. */

:root {
  --bg: #ffffff;
  --bg-soft: #f5f7f6;
  --bg-sunk: #eef1f0;
  --panel: #ffffff;
  --line: #e1e6e4;
  --line-soft: #edf0ef;
  --text: #12171a;
  --text-2: #3d464b;
  --text-3: #5d686e;
  --brand: #2c7f73;
  --brand-ink: #1f6258;
  --brand-soft: rgba(44, 127, 115, 0.1);
  --accent: #2f6df6;
  --ok: #17864a;
  --warn: #9a6200;
  --danger: #c8342b;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 12px 32px rgba(16, 24, 40, 0.08);
  --radius: 12px;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", Roboto, Helvetica, Arial, sans-serif;
  --wrap: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111416;
    --bg-soft: #171b1d;
    --bg-sunk: #1d2224;
    --panel: #191d20;
    --line: #2b3236;
    --line-soft: #22282b;
    --text: #f1f4f5;
    --text-2: #c5cdd1;
    --text-3: #98a3a9;
    --brand: #58b9aa;
    --brand-ink: #7fd0c3;
    --brand-soft: rgba(88, 185, 170, 0.14);
    --accent: #6c9bff;
    --ok: #4acb86;
    --warn: #e2b25c;
    --danger: #ff7b72;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--brand-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand); }
code, kbd, pre { font-family: var(--mono); font-size: 0.9em; }
code { background: var(--bg-sunk); padding: 0.1em 0.38em; border-radius: 5px; overflow-wrap: anywhere; }
pre { background: var(--bg-sunk); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; overflow-x: auto; line-height: 1.5; }
pre code { background: none; padding: 0; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.015em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.25rem); font-weight: 750; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.5rem, 2.8vw, 2.05rem); font-weight: 700; }
h3 { font-size: 1.08rem; font-weight: 650; }
p { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }
.narrow { max-width: 760px; }
.muted { color: var(--text-3); }
.small { font-size: 0.875rem; }
.center { text-align: center; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; background: var(--panel); padding: 8px 12px; border-radius: 8px; z-index: 50; }

/* ---- Header ---------------------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line-soft); }
.site-header .wrap { display: flex; align-items: center; gap: 22px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.05rem; color: var(--text); text-decoration: none; letter-spacing: -0.01em; }
.brand img { width: 28px; height: 28px; border-radius: 7px; }
.nav { display: flex; gap: 20px; margin-left: 10px; flex: 1; }
.nav a { color: var(--text-2); text-decoration: none; font-size: 0.94rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
.header-actions { display: flex; align-items: center; gap: 14px; }
.lang { font-size: 0.88rem; color: var(--text-3); text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px; }
.lang:hover { color: var(--text); border-color: var(--text-3); }
@media (max-width: 760px) {
  .nav { display: none; }
  .site-header .wrap { justify-content: space-between; }
}

/* ---- Buttons --------------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 10px; border: 1px solid transparent; font: 600 0.98rem var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-ink); color: #fff; }
@media (prefers-color-scheme: dark) { .btn-primary, .btn-primary:hover { color: #0c1513; } }
.btn-secondary { background: var(--panel); color: var(--text); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--text-3); color: var(--text); }
.btn-small { height: 34px; padding: 0 14px; font-size: 0.9rem; border-radius: 8px; }
.btn[disabled], .btn.is-disabled { opacity: 0.55; cursor: not-allowed; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---- Hero ------------------------------------------------------------------ */
.hero { padding: 72px 0 40px; }
.hero .lede { font-size: clamp(1.08rem, 1.7vw, 1.28rem); color: var(--text-2); max-width: 44rem; margin-bottom: 1.6rem; }
.hero .facts { margin-top: 16px; color: var(--text-3); font-size: 0.9rem; }
.eyebrow { display: inline-block; font-size: 0.82rem; font-weight: 650; letter-spacing: 0.04em; text-transform: uppercase; color: var(--brand-ink); background: var(--brand-soft); padding: 4px 10px; border-radius: 999px; margin-bottom: 18px; }

/* ---- App window mock (real DOM, sample data) -------------------------------- */
.mock { margin: 44px auto 0; max-width: 980px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); box-shadow: var(--shadow); overflow: hidden; font-size: 13px; line-height: 1.45; }
.mock-bar { display: flex; align-items: center; gap: 14px; height: 44px; padding: 0 14px; background: var(--bg-sunk); border-bottom: 1px solid var(--line); }
.dots { display: flex; gap: 7px; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: #d5d9dc; display: block; }
@media (prefers-color-scheme: dark) { .dots i { background: #3a4247; } }
.tabs { display: flex; gap: 4px; }
.tabs span { padding: 5px 12px; border-radius: 7px; color: var(--text-3); }
.tabs .on { background: var(--panel); color: var(--text); font-weight: 600; box-shadow: 0 0 0 1px var(--line); }
.mock-chip { margin-left: auto; color: var(--text-3); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; font-size: 12px; }
.mock-head { display: flex; align-items: baseline; gap: 12px; padding: 18px 20px 8px; }
.mock-head b { font-size: 26px; letter-spacing: -0.02em; }
.mock-rows { padding: 4px 8px 8px; }
.row { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: start; padding: 9px 12px; border-radius: 9px; }
.row + .row { border-top: 1px solid var(--line-soft); }
.row .path { font-family: var(--mono); font-size: 12.5px; color: var(--text); overflow-wrap: anywhere; }
.row .why { color: var(--text-3); margin-top: 2px; }
.row .size { font-variant-numeric: tabular-nums; color: var(--text-2); white-space: nowrap; }
.box { width: 16px; height: 16px; border-radius: 4px; background: var(--brand); margin-top: 2px; position: relative; }
.box::after { content: ""; position: absolute; left: 5px; top: 2px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.box.off { background: transparent; border: 1.5px dashed var(--text-3); }
.box.off::after { display: none; }
.row.kid { padding-left: 40px; }
.row.blocked .path { color: var(--text-3); }
.tag { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--line); color: var(--text-3); margin-left: 6px; vertical-align: 1px; }
.tag.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.tag.no { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.mock-foot { display: flex; align-items: center; gap: 14px; padding: 12px 20px; border-top: 1px solid var(--line); background: var(--bg-soft); }
.mock-foot .go { margin-left: auto; background: var(--brand); color: #fff; padding: 7px 14px; border-radius: 8px; font-weight: 600; }
.caption { text-align: center; color: var(--text-3); font-size: 0.82rem; margin-top: 12px; }
@media (max-width: 640px) { .tabs span:not(.on), .mock-chip { display: none; } .row { grid-template-columns: 22px 1fr; } .row .size { grid-column: 2; } }

/* ---- Sections -------------------------------------------------------------- */
section { padding: 64px 0; }
section.tint { background: var(--bg-soft); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.section-head { max-width: 46rem; margin-bottom: 34px; }
.section-head p { color: var(--text-2); font-size: 1.06rem; }
.grid { display: grid; gap: 18px; }
.grid.c3 { grid-template-columns: repeat(3, 1fr); }
.grid.c2 { grid-template-columns: repeat(2, 1fr); }
.grid.c4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid.c3, .grid.c4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid.c3, .grid.c2, .grid.c4 { grid-template-columns: 1fr; } }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card h3 { margin-bottom: 0.4em; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card p { color: var(--text-2); font-size: 0.97rem; }
.icon { width: 36px; height: 36px; border-radius: 9px; background: var(--brand-soft); color: var(--brand-ink); display: grid; place-items: center; margin-bottom: 14px; font-weight: 700; }
.icon svg { width: 20px; height: 20px; }
ul.clean { list-style: none; padding: 0; margin: 0 0 1em; }
ul.clean li { padding-left: 1.5em; position: relative; margin-bottom: 0.45em; color: var(--text-2); }
ul.clean li::before { content: ""; position: absolute; left: 0.2em; top: 0.55em; width: 0.42em; height: 0.42em; border-radius: 50%; background: var(--brand); }
ul.clean.no li::before { background: var(--danger); }

/* ---- Ledger ---------------------------------------------------------------- */
.ledger { font-family: var(--mono); font-size: 0.95rem; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 20px; }
.ledger div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; }
.ledger div + div { border-top: 1px dashed var(--line); }
.ledger .zero b { color: var(--warn); }
.ledger span { color: var(--text-2); }

/* ---- Tables ---------------------------------------------------------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
thead th { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-3); background: var(--bg-soft); font-weight: 650; }
tbody tr:last-child td { border-bottom: 0; }
td.yes { color: var(--ok); font-weight: 600; }
td.no { color: var(--text-3); }
td code { white-space: normal; }

/* ---- Pricing --------------------------------------------------------------- */
.plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; align-items: stretch; }
@media (max-width: 980px) { .plans { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .plans { grid-template-columns: 1fr; } }
.plan { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.plan h3 { font-size: 1rem; color: var(--text-2); margin-bottom: 10px; }
.price { font-size: 2.2rem; font-weight: 750; letter-spacing: -0.03em; line-height: 1; }
.price small { font-size: 0.9rem; font-weight: 500; color: var(--text-3); letter-spacing: 0; margin-left: 4px; }
.plan .sub { color: var(--text-3); font-size: 0.9rem; margin: 10px 0 16px; min-height: 2.9em; }
.plan ul { flex: 1; }
.plan .btn { width: 100%; margin-top: 8px; }
.plan-note { margin-top: 18px; color: var(--text-3); font-size: 0.92rem; }

/* ---- FAQ ------------------------------------------------------------------- */
details { border-bottom: 1px solid var(--line); padding: 14px 0; }
details summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; color: var(--text-3); font-weight: 400; }
details[open] summary::after { content: "–"; }
details p, details ul { color: var(--text-2); margin: 10px 0 0; }

/* ---- Prose (docs, legal, guides) ------------------------------------------- */
.page-head { padding: 56px 0 8px; }
.page-head p.lede { color: var(--text-2); font-size: 1.12rem; max-width: 44rem; }
.prose { padding: 16px 0 72px; }
.prose h2 { margin-top: 2.2em; font-size: 1.45rem; }
.prose h3 { margin-top: 1.7em; }
.prose ul, .prose ol { padding-left: 1.3em; color: var(--text-2); }
.prose li { margin-bottom: 0.4em; }
.prose p { color: var(--text-2); }
.prose .table-wrap { margin: 1.2em 0; }
.note { border: 1px solid var(--line); border-left: 3px solid var(--brand); background: var(--bg-soft); border-radius: 8px; padding: 14px 16px; margin: 1.2em 0; color: var(--text-2); }
.note.warn { border-left-color: var(--warn); }
.note p:last-child { margin-bottom: 0; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.toc a { display: inline-block; border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: 0.88rem; text-decoration: none; color: var(--text-2); }

/* ---- Forms ----------------------------------------------------------------- */
.form { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
label { display: block; font-weight: 600; font-size: 0.93rem; margin: 0 0 6px; }
.field { margin-bottom: 18px; }
.field .hint { color: var(--text-3); font-size: 0.86rem; margin-top: 6px; }
input[type="text"], input[type="email"], textarea { width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); color: var(--text); font: 0.98rem var(--sans); }
input.mono, textarea.mono { font-family: var(--mono); font-size: 0.9rem; }
textarea { height: auto; min-height: 96px; padding: 10px 12px; resize: vertical; }
input:focus, textarea:focus, .btn:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 620px) { .choices { grid-template-columns: 1fr; } }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice span { display: block; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.choice span b { display: block; }
.choice span i { font-style: normal; color: var(--text-3); font-size: 0.88rem; }
.choice input:checked + span { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); background: var(--brand-soft); }
.choice input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.status { margin-top: 14px; font-size: 0.93rem; }
.status.err { color: var(--danger); }
.status.ok { color: var(--ok); }
.license-out { font-family: var(--mono); font-size: 0.82rem; word-break: break-all; background: var(--bg-sunk); border: 1px solid var(--line); border-radius: 9px; padding: 12px; margin: 10px 0; }
[hidden] { display: none !important; }

/* ---- Footer ---------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 48px; color: var(--text-3); font-size: 0.92rem; background: var(--bg-soft); }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 28px; }
@media (max-width: 760px) { .site-footer .cols { grid-template-columns: 1fr 1fr; } }
.site-footer h4 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-2); margin: 0 0 10px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 7px; }
.site-footer a { color: var(--text-3); text-decoration: none; }
.site-footer a:hover { color: var(--text); }
.fine { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 0.84rem; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
