:root {
  --ink: #10151c;
  --ink-soft: #4a5567;
  --paper: #ffffff;
  --bg: #f6f7fb;
  --line: #e2e6ee;
  --brand: #2454ff;
  --brand-dark: #1638b8;
  --brand-ink: #eef2ff;
  --good: #0a8f5b;
  --good-bg: #e7f8ef;
  --warn: #a9690a;
  --warn-bg: #fdf0dd;
  --bad: #c22b3f;
  --bad-bg: #fdeaec;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 21, 28, 0.04), 0 8px 24px rgba(16, 21, 28, 0.06);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Roboto, Helvetica, Arial, sans-serif;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 0.5em; letter-spacing: -0.01em; }
p { margin: 0 0 1em; color: var(--ink-soft); }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--ink); }
.brand .mark {
  width: 28px; height: 28px; border-radius: 7px;
  background: linear-gradient(135deg, var(--brand), #6b8cff);
  display: inline-flex; align-items: center; justify-content: center;
  color: white; font-weight: 800; font-size: 14px;
}
.nav { display: flex; gap: 24px; align-items: center; }
.nav a { color: var(--ink-soft); font-weight: 500; font-size: 14.5px; }
.nav a:hover { color: var(--ink); text-decoration: none; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 32px; }
.container-narrow { max-width: 720px; margin: 0 auto; padding: 0 32px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 8px; font-weight: 600; font-size: 14.5px;
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: transform 0.05s ease, filter 0.15s ease;
}
.btn:hover { text-decoration: none; filter: brightness(1.04); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: white; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-secondary { background: var(--paper); color: var(--ink); border-color: var(--line); }
.btn-danger { background: var(--bad); color: white; }
.btn-ghost { background: transparent; color: var(--ink-soft); border-color: var(--line); }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 12px; font-size: 13px; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

.hero { padding: 88px 0 64px; text-align: center; }
.hero h1 { font-size: 46px; max-width: 760px; margin: 0 auto 18px; }
.hero .lede { font-size: 19px; max-width: 620px; margin: 0 auto 32px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; margin-bottom: 20px; }
.hero-note { font-size: 13.5px; color: #8d97a8; }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--brand-ink); color: var(--brand-dark);
  padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 600;
  margin-bottom: 20px;
}

.section { padding: 64px 0; }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 40px; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }

.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
}
.card h3 { font-size: 17px; }
.feature-icon {
  width: 40px; height: 40px; border-radius: 9px; background: var(--brand-ink);
  display: flex; align-items: center; justify-content: center; font-size: 19px; margin-bottom: 14px;
}

.pricing-card { display: flex; flex-direction: column; }
.pricing-card .price { font-size: 36px; font-weight: 800; margin: 10px 0 2px; }
.pricing-card .price small { font-size: 14px; font-weight: 500; color: var(--ink-soft); }
.pricing-card.featured { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ink), var(--shadow); }
.pricing-card ul { list-style: none; padding: 0; margin: 18px 0; flex: 1; }
.pricing-card li { padding: 6px 0; font-size: 14.5px; color: var(--ink-soft); display: flex; gap: 8px; }
.pricing-card li::before { content: '✓'; color: var(--good); font-weight: 700; }

.steps { display: flex; flex-direction: column; gap: 0; }
.step { display: flex; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.step:last-child { border-bottom: none; }
.step-num {
  width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: white;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex-shrink: 0;
}

footer.site-footer { border-top: 1px solid var(--line); padding: 36px 0; color: #8d97a8; font-size: 13.5px; text-align: center; margin-top: 40px; }
footer.site-footer a { color: #8d97a8; margin: 0 10px; }

.app-shell { display: flex; min-height: calc(100vh - 65px); }
.app-sidebar {
  width: 220px; background: var(--paper); border-right: 1px solid var(--line);
  padding: 24px 16px; flex-shrink: 0;
}
.app-sidebar a {
  display: block; padding: 9px 12px; border-radius: 7px; color: var(--ink-soft);
  font-weight: 500; font-size: 14.5px; margin-bottom: 2px;
}
.app-sidebar a:hover, .app-sidebar a.active { background: var(--brand-ink); color: var(--brand-dark); text-decoration: none; }
.app-main { flex: 1; padding: 32px; max-width: 980px; }

.page-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 24px; gap: 16px; }

.flash { padding: 12px 16px; border-radius: 8px; margin-bottom: 20px; font-size: 14.5px; }
.flash-success { background: var(--good-bg); color: var(--good); }
.flash-error { background: var(--bad-bg); color: var(--bad); }
.flash-info { background: var(--brand-ink); color: var(--brand-dark); }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; }
.badge-low, .badge-kept, .badge-low2fa { background: var(--good-bg); color: var(--good); }
.badge-medium, .badge-reassigned, .badge-pending { background: var(--warn-bg); color: var(--warn); }
.badge-high, .badge-revoked { background: var(--bad-bg); color: var(--bad); }
.badge-closed { background: #e9eaf0; color: #555c6b; }
.badge-active { background: var(--brand-ink); color: var(--brand-dark); }
.badge-draft { background: #e9eaf0; color: #555c6b; }

table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th { text-align: left; color: var(--ink-soft); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: 0.03em; padding: 10px 12px; border-bottom: 1px solid var(--line); }
td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: none; }

.form-group { margin-bottom: 18px; }
label { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password], textarea, select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 14.5px; font-family: inherit; background: var(--paper); color: var(--ink);
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ink); }
.hint { font-size: 12.5px; color: #8d97a8; margin-top: 5px; }
fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; margin: 0 0 16px; }
legend { font-weight: 600; font-size: 13.5px; padding: 0 4px; }
.radio-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.radio-row input { width: auto; }

.wizard-progress { display: flex; gap: 8px; margin-bottom: 32px; }
.wizard-progress .dot { flex: 1; height: 4px; border-radius: 4px; background: var(--line); }
.wizard-progress .dot.done { background: var(--brand); }
.wizard-progress .dot.current { background: var(--brand); opacity: 0.5; }

.stat-row { display: flex; gap: 16px; margin-bottom: 24px; }
.stat { flex: 1; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.stat .num { font-size: 28px; font-weight: 800; }
.stat .label { font-size: 13px; color: var(--ink-soft); }

.link-box {
  background: #0d1117; color: #c9d1d9; padding: 14px 16px; border-radius: 8px;
  font-family: 'SF Mono', Menlo, Consolas, monospace; font-size: 13px; word-break: break-all; margin: 14px 0;
}

.empty-state { text-align: center; padding: 60px 20px; color: var(--ink-soft); }

.chain-link { display: flex; align-items: center; gap: 10px; font-family: Menlo, Consolas, monospace; font-size: 12px; padding: 8px 0; }
.chain-ok { color: var(--good); }
.chain-bad { color: var(--bad); }

@media print {
  .site-header, .app-sidebar, .no-print, footer.site-footer { display: none !important; }
  .app-main { max-width: none; padding: 0; }
  body { background: white; }
  .card { box-shadow: none; }
}

.faq-item { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq-item h4 { margin-bottom: 6px; }

code { background: #eef0f4; padding: 2px 6px; border-radius: 4px; font-size: 13px; }
