:root {
  --bg: #f8fafc;
  --card: #ffffff;
  --ink: #0f172a;
  --muted: #475569;
  --line: #e2e8f0;
  --brand: #059669;
  --brand-dark: #047857;
  --brand-soft: #ecfdf5;
  --accent: #2563eb;
  --warn: #d97706;
  --danger: #dc2626;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
}
a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 1140px; margin: 0 auto; padding: 0 18px; }

/* Header */
.site-header {
  background: #0f172a;
  color: #f8fafc;
  border-bottom: 1px solid rgba(255,255,255,.08);
  position: sticky;
  top: 0;
  z-index: 50;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 62px;
  flex-wrap: wrap;
  padding: 8px 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 800;
  font-size: 1.12rem;
  letter-spacing: -.01em;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, #10b981, #059669);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-weight: 900;
  font-size: .92rem;
  color: #fff;
  box-shadow: 0 4px 12px rgba(16,185,129,.35);
}
.brand small {
  display: block;
  font-size: .7rem;
  font-weight: 500;
  color: #94a3b8;
  line-height: 1.1;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.nav-links a {
  color: #cbd5e1;
  padding: 7px 11px;
  border-radius: 8px;
  font-size: .9rem;
  font-weight: 600;
  transition: all .15s;
}
.nav-links a:hover, .nav-links a.active {
  color: #fff;
  background: rgba(255,255,255,.1);
  text-decoration: none;
}
.nav-cta {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff !important;
  padding: 8px 15px;
  border-radius: 999px;
  font-size: .88rem;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(16,185,129,.35);
  white-space: nowrap;
}
.nav-cta:hover { filter: brightness(1.06); text-decoration: none; }

/* Hero */
.hero {
  background: radial-gradient(900px 320px at 15% 0%, rgba(16,185,129,.12), transparent 65%), #ffffff;
  border-bottom: 1px solid var(--line);
  padding: 28px 0 24px;
}
.trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  border: 1px solid #a7f3d0;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
}
.hero h1 {
  margin: 10px 0 8px;
  font-size: clamp(1.5rem, 2.8vw, 2.15rem);
  line-height: 1.25;
  letter-spacing: -.02em;
}
.hero p {
  margin: 0;
  color: var(--muted);
  max-width: 760px;
  font-size: .98rem;
}

/* Main Workspace Card */
.workspace { padding: 24px 0 36px; }
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 4px 20px rgba(15,23,42,.035);
  margin-bottom: 18px;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.panel-title { font-weight: 800; font-size: 1.05rem; margin: 0; }
textarea.code-input, input.code-input {
  width: 100%;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  padding: 13px 14px;
  font-family: var(--mono);
  font-size: .92rem;
  color: var(--ink);
  background: #f8fafc;
  transition: border-color .15s, background .15s;
}
textarea.code-input:focus, input.code-input:focus {
  outline: none;
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(16,185,129,.14);
}
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; align-items: center; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  font-size: .9rem;
  cursor: pointer;
  transition: all .15s;
}
.btn:hover { border-color: #94a3b8; background: #f1f5f9; text-decoration: none; }
.btn-primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn-sm { padding: 5px 10px; font-size: .8rem; border-radius: 7px; }

/* 2FA Result Table */
.totp-single-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  background: linear-gradient(135deg, #064e3b, #0f172a);
  color: #fff;
  padding: 20px 24px;
  border-radius: 14px;
  margin-top: 16px;
}
.totp-digits {
  font-family: var(--mono);
  font-size: clamp(2rem, 4.5vw, 2.85rem);
  font-weight: 900;
  letter-spacing: .12em;
  color: #6ee7b7;
  cursor: pointer;
  user-select: all;
}
.totp-ring-box {
  display: flex;
  align-items: center;
  gap: 12px;
}
.totp-table-wrap { overflow-x: auto; margin-top: 14px; }
table.totp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
}
table.totp-table th {
  text-align: left;
  padding: 10px 12px;
  background: #f1f5f9;
  color: #334155;
  font-weight: 700;
  border-bottom: 1px solid var(--line);
}
table.totp-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.copy-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--mono);
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 4px 9px;
  border-radius: 7px;
  cursor: pointer;
  font-size: .84rem;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.copy-chip:hover { border-color: var(--brand); background: var(--brand-soft); }
.code-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--brand-dark);
  background: var(--brand-soft);
  border: 1.5px solid #6ee7b7;
  padding: 5px 13px;
  border-radius: 9px;
  cursor: pointer;
}
.code-pill.expiring {
  color: var(--danger);
  background: #fef2f2;
  border-color: #fca5a5;
}

/* Promo Conversion Strip */
.promo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
  margin: 22px 0;
}
.promo-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: 12px;
  padding: 15px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  transition: transform .15s, box-shadow .15s;
}
.promo-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(15,23,42,.07);
  text-decoration: none;
}
.promo-card .tag {
  font-size: .74rem;
  font-weight: 800;
  color: var(--brand-dark);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.promo-card h3 { margin: 0; font-size: 1rem; color: var(--ink); }
.promo-card p { margin: 0; font-size: .85rem; color: var(--muted); }
.promo-card .go { font-size: .85rem; font-weight: 700; color: var(--brand-dark); }

/* SEO Content & Guides */
.prose h2 { font-size: 1.3rem; margin-top: 26px; margin-bottom: 10px; color: var(--ink); }
.prose h3 { font-size: 1.08rem; margin-top: 18px; margin-bottom: 6px; }
.prose p, .prose li { color: #334155; font-size: .95rem; }
.prose ul, .prose ol { padding-left: 20px; }
.faq-item {
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 13px 16px;
  background: #fff;
  margin-bottom: 10px;
}
.faq-item summary { font-weight: 700; cursor: pointer; color: var(--ink); }
.faq-item p { margin: 8px 0 0; color: var(--muted); font-size: .92rem; }

.guide-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 14px;
}
.guide-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.guide-card h3 { margin: 0; font-size: 1rem; line-height: 1.4; }
.guide-card p { margin: 0; font-size: .86rem; color: var(--muted); }

/* Toast */
#toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0f172a;
  color: #fff;
  padding: 12px 18px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(15,23,42,.28);
  font-size: .9rem;
  z-index: 999;
  display: none;
  max-width: 360px;
  border-left: 4px solid #10b981;
}

/* Footer */
.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 34px 0 28px;
  margin-top: 40px;
  font-size: .88rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 22px;
  margin-bottom: 22px;
}
.site-footer h4 { color: #fff; margin: 0 0 10px; font-size: .95rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 7px; }
.site-footer a { color: #cbd5e1; }
.site-footer a:hover { color: #6ee7b7; }
@media (max-width: 640px) {
  .totp-single-hero { padding: 16px; }
}