/* PixelSqueeze — zero-dependency stylesheet */

:root {
  --bg: #0b0d10;
  --bg-soft: #0f1217;
  --panel: #14181e;
  --panel-2: #1a1f27;
  --line: #232a33;
  --line-soft: #1c222a;
  --text: #e8ecf1;
  --muted: #96a2b4;
  --muted-2: #6d798a;
  --accent: #34d399;
  --accent-strong: #10b981;
  --accent-soft: rgba(52, 211, 153, 0.12);
  --blue: #60a5fa;
  --warn: #fbbf24;
  --radius: 14px;
  --radius-sm: 9px;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 420px at 12% -8%, rgba(52, 211, 153, 0.10), transparent 60%),
    radial-gradient(700px 380px at 92% 4%, rgba(96, 165, 250, 0.08), transparent 60%);
  z-index: 0;
}

.wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(11, 13, 16, 0.82);
  border-bottom: 1px solid var(--line-soft);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  height: 62px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.brand svg { display: block; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
  font-size: 14.5px;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
}

.nav-links a:hover { color: var(--text); }
.nav-links a[aria-current="page"] { color: var(--text); }

/* ---------- typography ---------- */

h1, h2, h3 { letter-spacing: -0.02em; line-height: 1.2; }

h1 {
  font-size: clamp(30px, 5vw, 46px);
  margin: 0 0 14px;
  font-weight: 680;
}

h2 {
  font-size: clamp(21px, 3vw, 27px);
  margin: 0 0 12px;
  font-weight: 640;
}

h3 { font-size: 17px; margin: 0 0 8px; font-weight: 620; }

p { margin: 0 0 14px; }

a { color: var(--accent); }

.lead { font-size: 17.5px; color: var(--muted); max-width: 62ch; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 13px; color: var(--muted-2); }
.mono { font-family: var(--mono); }

/* ---------- layout blocks ---------- */

.hero { padding: 64px 0 26px; }

.section { padding: 34px 0; }
.section-head { margin-bottom: 20px; }

.card {
  background: linear-gradient(180deg, var(--panel), var(--bg-soft));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-size: 15px;
  font-weight: 560;
  padding: 10px 17px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  transition: transform .06s ease, background .15s ease, border-color .15s ease;
}

.btn:hover { background: #212832; border-color: #2f3944; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent-strong);
  color: #06281d;
  font-weight: 640;
}

.btn-primary:hover { background: #46e0a8; border-color: #46e0a8; }

.btn-ghost { background: transparent; }
.btn-sm { padding: 6px 11px; font-size: 13.5px; }

/* ---------- dropzone ---------- */

.drop {
  border: 1.5px dashed #2c3641;
  border-radius: var(--radius);
  background: rgba(20, 24, 30, 0.6);
  padding: 44px 22px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}

.drop:hover { border-color: #3a4652; }
.drop.is-over { border-color: var(--accent); background: var(--accent-soft); }
.drop-title { font-size: 17px; font-weight: 600; margin-bottom: 6px; }
.drop-sub { font-size: 14px; color: var(--muted); }

/* ---------- controls ---------- */

.controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 13px; color: var(--muted); font-weight: 560; }

select, input[type="email"], input[type="text"] {
  font: inherit;
  font-size: 15px;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
  width: 100%;
}

select:focus, input:focus { outline: 2px solid rgba(52, 211, 153, .35); outline-offset: 1px; }

input[type="range"] { width: 100%; accent-color: var(--accent); }

.range-row { display: flex; align-items: center; gap: 10px; }
.range-val { font-family: var(--mono); font-size: 13px; color: var(--muted); min-width: 34px; }

/* ---------- summary + table ---------- */

.summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  margin-top: 18px;
}

.stat { display: flex; align-items: baseline; gap: 7px; }
.stat-num { font-family: var(--mono); font-size: 19px; font-weight: 620; }
.stat-num.good { color: var(--accent); }
.stat-label { font-size: 13px; color: var(--muted); }
.summary .spacer { margin-left: auto; }

.table-scroll { overflow-x: auto; margin-top: 14px; }

table.results {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

table.results th, table.results td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-soft);
  white-space: nowrap;
}

table.results th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted-2);
  font-weight: 600;
}

table.results td.num { font-family: var(--mono); }
table.results td.name { max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
table.results tr.err td { color: var(--warn); }

.pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-family: var(--mono);
  background: var(--accent-soft);
  color: var(--accent);
}

.pill.warn { background: rgba(251, 191, 36, .12); color: var(--warn); }
.pill.flat { background: rgba(150, 162, 180, .12); color: var(--muted); }

.status { margin-top: 12px; font-size: 14px; color: var(--muted); min-height: 20px; }
.status.bad { color: var(--warn); }

/* ---------- upsell ---------- */

.upsell {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #2b4a3d;
  background: linear-gradient(120deg, rgba(52, 211, 153, .10), rgba(96, 165, 250, .06));
  border-radius: var(--radius);
  padding: 20px;
}

.upsell h3 { margin-bottom: 4px; }
.upsell p { margin: 0; color: var(--muted); font-size: 14.5px; max-width: 56ch; }

/* ---------- pricing ---------- */

.tier { display: flex; flex-direction: column; gap: 14px; position: relative; }
.tier.featured { border-color: #2b4a3d; box-shadow: 0 0 0 1px rgba(52, 211, 153, .15); }
.tier .price { font-family: var(--mono); font-size: 34px; font-weight: 640; letter-spacing: -0.02em; }
.tier .price span { font-size: 14px; color: var(--muted); font-weight: 400; }
.tier ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; font-size: 14.5px; }
.tier li { display: flex; gap: 9px; align-items: flex-start; color: #cfd7e2; }
.tier li::before { content: "✓"; color: var(--accent); font-size: 13px; line-height: 1.6; }
.tier li.no { color: var(--muted-2); }
.tier li.no::before { content: "—"; color: var(--muted-2); }
.tier .foot { margin-top: auto; }

.badge {
  position: absolute;
  top: -11px;
  left: 18px;
  font-size: 11.5px;
  letter-spacing: .05em;
  text-transform: uppercase;
  background: var(--accent);
  color: #06281d;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
}

/* ---------- code ---------- */

pre {
  background: #0d1014;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 15px 16px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
  color: #cbd5e1;
  margin: 0 0 14px;
}

code { font-family: var(--mono); font-size: .92em; }
.inline-code {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 6px;
  color: #d6dde8;
}

/* ---------- article ---------- */

.prose { max-width: 72ch; }
.prose h2 { margin-top: 30px; }
.prose h3 { margin-top: 22px; }
.prose ul, .prose ol { padding-left: 22px; color: #cfd7e2; }
.prose li { margin-bottom: 7px; }

/* ---------- faq ---------- */

details {
  border-bottom: 1px solid var(--line-soft);
  padding: 14px 0;
}

details summary {
  cursor: pointer;
  font-weight: 580;
  font-size: 15.5px;
  list-style: none;
}

details summary::-webkit-details-marker { display: none; }
details summary::before { content: "+ "; color: var(--accent); font-family: var(--mono); }
details[open] summary::before { content: "– "; }
details p { margin: 10px 0 0; color: var(--muted); font-size: 14.5px; }

/* ---------- modal ---------- */

.modal-back {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(5, 7, 9, .72);
  backdrop-filter: blur(3px);
}

.modal-back.open { display: flex; }

.modal {
  width: 100%;
  max-width: 430px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}

.modal h3 { font-size: 19px; }
.modal form { display: flex; flex-direction: column; gap: 11px; margin-top: 14px; }
.modal-actions { display: flex; gap: 10px; align-items: center; }

/* ---------- footer ---------- */

footer {
  margin-top: 46px;
  border-top: 1px solid var(--line-soft);
  padding: 26px 0 44px;
  font-size: 14px;
  color: var(--muted-2);
}

footer a { color: var(--muted); text-decoration: none; margin-right: 18px; }
footer a:hover { color: var(--text); }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (max-width: 640px) {
  .nav-links { gap: 14px; font-size: 14px; }
  .nav-links a.hide-sm { display: none; }
  .hero { padding: 40px 0 18px; }
  .drop { padding: 32px 16px; }
}
