:root {
  --bg: #f6f7f9;
  --panel: #fff;
  --border: #dfe3e8;
  --text: #1c2430;
  --muted: #667085;
  --accent: #2f6fde;
  --bad: #c0392b;
  --good: #1f8a4c;
  --lp-hero: linear-gradient(160deg, #eaf1ff 0%, #f6f7f9 60%);
  --lp-alt: #eef1f5;
  --lp-glow: rgb(47 111 222 / 0.14);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15181d;
    --panel: #1d2128;
    --border: #2f353f;
    --text: #e6e9ee;
    --muted: #98a2b3;
    --accent: #6c9cf0;
    --lp-hero: linear-gradient(160deg, #142036 0%, #15181d 60%);
    --lp-alt: #191d23;
    --lp-glow: rgb(108 156 240 / 0.18);
  }
}
* {
  box-sizing: border-box;
}
/* Elements styled with display (labels, dialogs' rows) must still hide. */
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  font: 14px/1.45 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
.top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
}
.spacer {
  flex: 1;
}
main {
  padding: 20px;
  max-width: 1100px;
  margin: 0 auto;
}
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
}
.narrow {
  max-width: 380px;
  margin: 40px auto;
}
h1 {
  font-size: 20px;
  margin: 0 0 16px;
}
h2 {
  font-size: 17px;
  margin: 0 0 12px;
}
h3 {
  font-size: 15px;
  margin: 24px 0 8px;
}
label {
  display: block;
  margin-bottom: 12px;
  font-weight: 600;
  font-size: 13px;
}
label input,
label select,
label textarea,
.bar input,
.grid input,
.grid select {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  font-weight: 400;
}
.grid input,
.grid select {
  margin-top: 0;
}
.btn {
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 6px;
  padding: 7px 14px;
  cursor: pointer;
}
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn.ghost {
  background: transparent;
}
.btn.small {
  padding: 3px 10px;
  font-size: 12px;
}
.hint {
  color: var(--muted);
  font-size: 12.5px;
}
.error {
  color: var(--bad);
}
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
  overflow-x: auto;
}
.tabs button {
  border: 0;
  background: none;
  padding: 8px 14px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  color: var(--muted);
}
.tabs button.active {
  color: var(--text);
  border-bottom-color: var(--accent);
  font-weight: 600;
}
.bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.bar input {
  max-width: 300px;
  margin: 0;
}
.grid {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.grid th,
.grid td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.grid th {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}
.right {
  text-align: right;
  white-space: nowrap;
}
.badge {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 11.5px;
}
dialog {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text);
  width: min(560px, calc(100vw - 32px));
  padding: 20px;
}
dialog::backdrop {
  background: rgb(0 0 0 / 0.35);
}
fieldset {
  border: 1px solid var(--border);
  border-radius: 8px;
  margin: 0 0 12px;
  padding: 10px 12px 0;
}
legend {
  font-weight: 600;
  font-size: 13px;
}
.row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.row label {
  flex: 1 1 100px;
}
.row .grow {
  flex: 3 1 160px;
}
.actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}
.result {
  margin: 8px 0;
  padding: 10px;
  border: 1px solid var(--good);
  border-radius: 6px;
}
.result input {
  width: 100%;
  margin-top: 6px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
}
.plans,
.stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.plan,
.stat {
  flex: 1 1 160px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
}
.plan.current {
  border-color: var(--accent);
  border-width: 2px;
}
.plan h3 {
  margin: 0 0 6px;
}
.price,
.num {
  font-size: 22px;
  font-weight: 600;
}
.pricing {
  max-width: 760px;
  margin: 0 auto 40px;
}
.notice {
  padding: 10px 12px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--panel);
}
.pay {
  white-space: pre-wrap;
  padding: 12px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: var(--panel);
  margin: 8px 0;
}
.plan ul {
  margin: 8px 0;
  padding-left: 18px;
}
.plan .btn {
  margin-top: 8px;
}
.expired {
  color: var(--bad);
}
.table-scroll {
  overflow-x: auto;
}
.pricing-grid input[type='text'],
.pricing-grid input[type='number'],
.pricing-grid select {
  min-width: 70px;
}
.pricing-grid input[type='checkbox'] {
  width: auto;
}
#pay-text {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
}
.grid input[type='date'] {
  min-width: 130px;
}
.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--bg);
  padding: 8px 16px;
  border-radius: 8px;
}
.toast.bad {
  background: var(--bad);
  color: #fff;
}
@media (max-width: 640px) {
  main {
    padding: 12px;
  }
  .grid th:nth-child(5),
  .grid td:nth-child(5) {
    display: none;
  }
}
@media (max-width: 640px) {
  .grid {
    display: block;
    overflow-x: auto;
  }
  #who {
    display: none;
  }
}

.lang-picker {
  padding: 4px 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel);
}

.btn.lg {
  padding: 11px 22px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 8px;
}
.btn.wide {
  display: block;
  width: 100%;
}
a.btn {
  display: inline-block;
  text-decoration: none;
  color: inherit;
}
.center {
  text-align: center;
}

/* ---- homepage (signed out) ---- */

.lp-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}
.lp-nav {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.lp-nav-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 60px;
}
.lp-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
  text-decoration: none;
  scroll-margin-top: 80px;
}
.lp-logo {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background:
    radial-gradient(circle at 30% 30%, #fff 0 3px, transparent 4px),
    radial-gradient(circle at 70% 70%, #fff 0 3px, transparent 4px),
    linear-gradient(135deg, #4f8bff, #2f6fde 55%, #1b4fb0);
}
.lp-links {
  display: flex;
  gap: 22px;
  margin-left: 24px;
}
.lp-links a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
}
.lp-links a:hover {
  color: var(--text);
}
.lp-hero {
  background: var(--lp-hero);
  padding: 72px 0 64px;
  overflow: hidden;
}
.lp-hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 48px;
  align-items: center;
}
.lp-eyebrow {
  display: inline-block;
  margin: 0 0 14px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--lp-glow);
  color: var(--accent);
  font-weight: 600;
  font-size: 13px;
}
.lp-hero h1 {
  font-size: clamp(32px, 4.4vw, 50px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
}
.lp-lead {
  font-size: 17px;
  color: var(--muted);
  max-width: 540px;
  margin: 0 0 26px;
}
.lp-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.lp-note {
  color: var(--muted);
  font-size: 13px;
  margin: 14px 0 0;
}
.lp-mock {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 24px 60px -20px rgb(16 32 64 / 0.35), 0 0 0 8px var(--lp-glow);
  overflow: hidden;
  font-size: 12.5px;
}
.lp-mock-bar {
  display: flex;
  gap: 6px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.lp-mock-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
}
.lp-mock-body {
  display: grid;
  grid-template-columns: 130px 1fr;
}
.lp-mock-side {
  border-right: 1px solid var(--border);
  padding: 10px 8px;
}
.lp-mock-side div {
  display: flex;
  justify-content: space-between;
  padding: 6px 8px;
  border-radius: 6px;
  color: var(--muted);
}
.lp-mock-side div.on {
  background: var(--lp-glow);
  color: var(--accent);
  font-weight: 600;
}
.lp-mock-table {
  width: 100%;
  border-collapse: collapse;
}
.lp-mock-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.lp-mock-table td:nth-child(2) {
  color: var(--muted);
  font-family: ui-monospace, Consolas, monospace;
}
.lp-mock-table .cc {
  display: inline-block;
  margin-right: 6px;
  padding: 0 5px;
  border-radius: 4px;
  background: var(--bg);
  border: 1px solid var(--border);
  font-style: normal;
  font-size: 10.5px;
  font-family: inherit;
}
.lp-mock-table span {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 11.5px;
}
.lp-mock-table span.run {
  border-color: var(--good);
  color: var(--good);
}
.lp-strip {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--panel);
}
.lp-strip-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  padding-top: 16px;
  padding-bottom: 16px;
  color: var(--muted);
  font-weight: 500;
}
.lp-strip-inner span::before {
  content: '✓';
  color: var(--good);
  margin-right: 6px;
  font-weight: 700;
}
.lp-section {
  padding: 72px 0;
  scroll-margin-top: 60px;
}
.lp-alt {
  background: var(--lp-alt);
}
.lp-section h2,
.lp-final h2 {
  font-size: clamp(24px, 3vw, 32px);
  letter-spacing: -0.01em;
  text-align: center;
  margin: 0 0 10px;
}
.lp-sub {
  text-align: center;
  color: var(--muted);
  font-size: 16px;
  margin: 0 auto 40px;
  max-width: 620px;
}
.lp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.lp-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
  transition: border-color 0.15s, transform 0.15s;
}
.lp-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.lp-card svg {
  width: 40px;
  height: 40px;
  padding: 8px;
  border-radius: 10px;
  background: var(--lp-glow);
  stroke: var(--accent);
  stroke-width: 1.7;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.lp-card h3 {
  margin: 14px 0 6px;
  font-size: 16px;
}
.lp-card p {
  margin: 0;
  color: var(--muted);
}
.lp-steps {
  list-style: none;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding: 0;
  margin: 36px 0 0;
}
.lp-steps li {
  counter-increment: step;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
}
.lp-steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}
.lp-steps b {
  display: block;
  font-size: 16px;
  margin-bottom: 4px;
}
.lp-steps span {
  color: var(--muted);
}
.lp-plans {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
}
.lp-plans .plan {
  position: relative;
  flex: 0 1 320px;
  padding: 28px 24px 24px;
  border-radius: 14px;
}
.lp-plans .plan h3 {
  font-size: 18px;
}
.lp-plans .price {
  font-size: 36px;
  font-weight: 700;
  margin: 6px 0 4px;
}
.lp-plans .price .hint {
  font-size: 14px;
  font-weight: 500;
  margin-left: 4px;
}
.lp-plans .plan ul {
  list-style: none;
  padding: 0;
  margin: 16px 0 20px;
}
.lp-plans .plan li {
  padding: 5px 0;
}
.lp-plans .plan li::before {
  content: '✓';
  color: var(--good);
  font-weight: 700;
  margin-right: 8px;
}
.plan.featured {
  border: 2px solid var(--accent);
  box-shadow: 0 18px 40px -18px var(--accent);
}
.ribbon {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.lp-faq {
  max-width: 760px;
}
.lp-faq h2 {
  margin-bottom: 28px;
}
.lp-faq details {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 10px;
}
.lp-faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
}
.lp-faq details p {
  margin: 10px 0 0;
  color: var(--muted);
}
.lp-final {
  padding: 72px 0;
  text-align: center;
  background: linear-gradient(135deg, #2f6fde, #1b4fb0);
  color: #fff;
}
.lp-final h2 {
  margin-bottom: 22px;
}
.lp-final .btn.primary {
  background: #fff;
  border-color: #fff;
  color: #1b4fb0;
}
.lp-footer {
  padding: 24px 0;
  color: var(--muted);
  font-size: 13px;
}
.lp-footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
}
.auth-dialog {
  width: min(400px, calc(100vw - 32px));
  padding: 28px;
  border-radius: 14px;
}
.auth-dialog h2 {
  font-size: 20px;
  margin-bottom: 18px;
}
.auth-dialog form {
  position: relative;
}
.dialog-x {
  position: absolute;
  top: -16px;
  right: -14px;
  border: 0;
  background: none;
  font-size: 22px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 8px;
}
.site-settings {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0 12px;
}
@media (max-width: 900px) {
  .lp-hero-inner {
    grid-template-columns: 1fr;
  }
  .lp-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .lp-links a:not([data-nav]) {
    display: none;
  }
  .lp-links {
    margin-left: 8px;
    gap: 14px;
  }
}
@media (max-width: 640px) {
  .lp-wrap {
    padding: 0 16px;
  }
  .lp-nav-inner {
    gap: 8px;
  }
  .lp-nav .btn.primary {
    display: none;
  }
  .lp-brand .brand-name {
    display: none;
  }
  .lp-hero {
    padding: 44px 0 40px;
  }
  .lp-grid,
  .lp-steps {
    grid-template-columns: 1fr;
  }
  .lp-mock-body {
    grid-template-columns: 1fr;
  }
  .lp-mock-side {
    display: none;
  }
  .lp-mock-table td:nth-child(2) {
    display: none;
  }
  .lp-section,
  .lp-final {
    padding: 52px 0;
  }
}
.auth-dialog a {
  color: var(--accent);
}

/* ---- website: download and pricing pages ---- */

.lp-links a.on {
  color: var(--accent);
}
.lp-hero-small {
  padding: 64px 0 56px;
}
.lp-hero-small h1 {
  margin-bottom: 14px;
}
.lp-center {
  margin-left: auto;
  margin-right: auto;
  max-width: 620px;
}
.lp-center-flex {
  justify-content: center;
}
.lp-page-title {
  font-size: clamp(30px, 4vw, 42px);
  letter-spacing: -0.02em;
  text-align: center;
  margin: 0 0 10px;
}
.lp-doc {
  max-width: 860px;
}
.lp-doc .notice {
  margin: 20px 0 0;
  color: var(--muted);
}
.lp-left {
  text-align: left !important;
  margin-top: 48px !important;
}
.lp-install {
  list-style: none;
  counter-reset: step;
  margin: 28px 0 0;
  padding: 0;
}
.lp-install li {
  counter-increment: step;
  position: relative;
  padding: 0 0 22px 52px;
  border-left: 2px solid var(--border);
  margin-left: 16px;
}
.lp-install li:last-child {
  border-left-color: transparent;
  padding-bottom: 0;
}
.lp-install li::before {
  content: counter(step);
  position: absolute;
  left: -17px;
  top: -4px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}
.lp-install b {
  display: block;
  font-size: 16px;
  margin-bottom: 4px;
}
.lp-install span {
  display: block;
  color: var(--muted);
}
.lp-install .lp-copy {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.lp-copy code {
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font-size: 13px;
  word-break: break-all;
}
.lp-table {
  margin-top: 12px;
}
.lp-table th {
  width: 34%;
  text-transform: none;
  font-size: 13.5px;
  color: var(--text);
}
.lp-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 12px;
}
.lp-two > div {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}
.lp-two h3 {
  margin: 0 0 6px;
}
.lp-two p {
  margin: 0;
  color: var(--muted);
}
.lp-more {
  display: inline-block;
  margin-top: 24px;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}
.lp-compare-box {
  max-width: 860px;
  margin: 28px auto 0;
}
.lp-compare th,
.lp-compare td {
  text-align: center;
  padding: 12px 14px;
}
.lp-compare thead th {
  font-size: 15px;
  text-transform: none;
  color: var(--text);
}
.lp-compare tbody th {
  text-align: left;
  text-transform: none;
  font-size: 13.5px;
  color: var(--text);
  font-weight: 500;
}
.lp-compare .yes {
  color: var(--good);
  font-weight: 700;
}
.lp-compare .no {
  color: var(--muted);
}
.lp-steps-4 {
  grid-template-columns: repeat(4, 1fr);
}
.lp-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}
.lp-footer-links a {
  color: var(--muted);
  text-decoration: none;
}
.lp-footer-links a:hover {
  color: var(--text);
}
@media (max-width: 900px) {
  .lp-steps-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  .lp-steps-4,
  .lp-two {
    grid-template-columns: 1fr;
  }
  .lp-compare tbody th {
    min-width: 150px;
  }
}
.lp-nav .btn {
  white-space: nowrap;
}
.serial {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}
