:root {
  color-scheme: light;
  --bg: #f4f6f9;
  --panel: #ffffff;
  --ink: #172033;
  --muted: #667085;
  --line: #dfe5ef;
  --blue: #1f5eff;
  --gold: #d99a25;
  --green: #14a36f;
  --yellow: #d99511;
  --red: #d54545;
  --soft: #eef4ff;
  --shadow: 0 12px 32px rgba(16, 24, 40, .08);
  font-family: "Segoe UI Variable", "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}

a { color: inherit; text-decoration: none; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 14px clamp(16px, 4vw, 54px);
  background: rgba(255, 255, 255, .92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 900; font-size: 22px; }
.brand span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(145deg, #15110b, #342718);
  color: #f3c778;
  letter-spacing: 0;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12), 0 10px 24px rgba(54,38,18,.22);
}
.topbar nav { display: flex; gap: 8px; color: var(--muted); font-weight: 850; }
.topbar nav a {
  padding: 9px 12px;
  border-radius: 999px;
}
.topbar nav a:hover { background: rgba(34,88,244,.08); color: var(--ink); }
main { width: min(1240px, calc(100% - 32px)); margin: 0 auto 48px; }
.hero {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(360px, .7fr);
  gap: 18px;
  align-items: center;
  padding: 26px 0 14px;
}
.eyebrow {
  margin: 0 0 10px;
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(32px, 4vw, 48px); line-height: 1.02; margin-bottom: 14px; letter-spacing: 0; }
h2 { font-size: clamp(23px, 2.2vw, 32px); line-height: 1.12; margin-bottom: 8px; }
h3 { font-size: 20px; margin-bottom: 8px; }
.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 760px;
}
.hero-pills span {
  padding: 9px 12px;
  border: 1px solid rgba(181,132,47,.24);
  border-radius: 999px;
  background: rgba(255,255,255,.62);
  color: #4d402e;
  font-weight: 900;
}
.scan-card, .report-section, .summary, .pricing, .integrations, .notice, .tracking-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.scan-card { padding: 18px; }
label { display: block; margin-bottom: 10px; font-weight: 900; color: #33435b; }
.scan-row { display: flex; gap: 10px; }
input {
  width: 100%;
  border: 1px solid #cbd5e5;
  border-radius: 9px;
  padding: 12px 14px;
  font: inherit;
  font-weight: 700;
  color: var(--ink);
  background: #fff;
}
button, .ghost {
  border: 0;
  border-radius: 9px;
  padding: 12px 15px;
  background: linear-gradient(135deg, #2258f4, #0f35b7);
  color: #fff;
  font-weight: 900;
  font-size: 15px;
  cursor: pointer;
  white-space: nowrap;
}
.ghost {
  display: inline-flex;
  align-items: center;
  background: #fff;
  color: var(--blue);
  border: 1px solid var(--line);
  box-shadow: 0 8px 18px rgba(34,88,244,.08);
}
.scan-card p, .section-head p, .plan p, .integration-grid span, .feature-grid span { color: var(--muted); line-height: 1.5; }
.notice { padding: 18px 22px; margin: 18px 0; }
.notice.good { border-color: #b7efd5; background: #f0fff8; }
.notice.bad { border-color: #ffc6c6; background: #fff3f3; }
.summary {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 22px;
  margin: 24px 0;
}
.score {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #eef3fb;
  color: var(--ink);
  font-weight: 950;
}
.score span { font-size: 42px; }
.score small { margin-top: -28px; color: var(--muted); }
.score.good { background: #dcffee; color: #097a48; }
.score.warn { background: #fff4cf; color: #9b6900; }
.score.bad { background: #ffe2e2; color: #9e1f1f; }
.summary .ghost { margin-left: auto; }
.quick-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}
.quick {
  padding: 16px;
  border-radius: 14px;
  background: rgba(255,255,255,.72);
  border: 1px solid var(--line);
}
.quick span { display: block; color: var(--muted); font-size: 13px; font-weight: 800; }
.quick b { display: block; margin-top: 6px; font-size: 20px; overflow-wrap: anywhere; }
.quick.good { border-color: #bcefd8; }
.quick.warn { border-color: #ffe0a3; }
.quick.bad { border-color: #ffc6c6; }
.toc {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 12px 0 18px;
}
.toc b, .toc a {
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.74);
  border: 1px solid var(--line);
  font-size: 14px;
  font-weight: 900;
}
.toc a { color: var(--blue); }
.report-section { padding: 18px; margin: 14px 0; scroll-margin-top: 82px; }
.compact-home { padding: 16px; }
.metric-list { display: grid; gap: 8px; }
.metric-row {
  display: grid;
  grid-template-columns: 22px minmax(190px, .8fr) minmax(220px, 1fr) minmax(180px, 1fr);
  gap: 14px;
  align-items: start;
  padding: 10px 8px;
  border-bottom: 1px solid #edf1f7;
}
.metric-row:last-child { border-bottom: 0; }
.dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  margin-top: 4px;
  background: #aab4c3;
}
.metric-row.good .dot { background: var(--green); }
.metric-row.warn .dot { background: var(--yellow); }
.metric-row.bad .dot { background: var(--red); }
.metric-name { font-weight: 850; }
.metric-value { overflow-wrap: anywhere; }
.metric-details { color: var(--muted); font-size: 14px; line-height: 1.45; }
.metric-row.locked .metric-value::after {
  content: " API";
  display: inline-block;
  margin-left: 8px;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--blue);
  font-size: 11px;
  font-weight: 900;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span {
  padding: 9px 11px;
  background: #eef6ff;
  color: #23405f;
  border-radius: 999px;
  font-weight: 800;
}
.feature-grid, .integration-grid, .plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.feature-grid article, .integration-grid article, .plan {
  padding: 18px;
  border-radius: 14px;
  background: rgba(255,255,255,.64);
  border: 1px solid var(--line);
}
.feature-grid b, .integration-grid b { display: block; margin-bottom: 6px; }
.pricing, .integrations, .tracking-panel { padding: 18px; margin-top: 16px; }
.plan b { display: block; font-size: 34px; margin-bottom: 8px; }
.plan form { display: grid; gap: 10px; }
.history { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.history a {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 12px;
  background: #f9fbff;
  border: 1px solid var(--line);
  border-radius: 12px;
}
footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto 32px;
  color: var(--muted);
  font-weight: 700;
}

.tool-catalog {
  margin-top: 16px;
  padding: 18px;
  border-radius: 14px;
  background: linear-gradient(145deg, #111827, #243044);
  color: #fff7e8;
  box-shadow: 0 28px 80px rgba(23,18,12,.22);
}
.tool-catalog .eyebrow { color: #f3c778; }
.tool-catalog .section-head p { color: rgba(255,247,232,.68); }
.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.tool-group {
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  background: rgba(255,255,255,.06);
  overflow: hidden;
}
.compact-home .tool-group {
  background: #fff;
  border-color: var(--line);
}
.tool-group summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  padding: 14px 16px;
  font-weight: 950;
  list-style: none;
}
.tool-group summary::-webkit-details-marker { display: none; }
.tool-group summary b {
  min-width: 34px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(243,199,120,.18);
  color: #f3c778;
}
.compact-home .tool-group summary b {
  background: #f4ead7;
  color: #7a5417;
}
.tool-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 0 14px 14px;
}
.tool-tags span {
  padding: 7px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,.1);
  color: rgba(255,247,232,.9);
  font-size: 13px;
  font-weight: 750;
}
.compact-home .tool-tags span {
  background: #f7f2ea;
  color: #4e463b;
}
.admin-hero { padding: 26px 0 14px; }
.admin-hero h1 { margin-bottom: 10px; }
.admin-login { max-width: 520px; }
.admin-login form { display: grid; gap: 12px; }
.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.admin-stats { margin-top: 16px; }

.auth-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.tracking-panel .section-head,
.pricing .section-head,
.integrations .section-head,
.report-section .section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 12px;
}
.section-head h2 { margin-bottom: 0; }
.section-head p:not(.eyebrow) { max-width: 560px; margin-bottom: 0; }
.track-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-bottom: 12px;
}
.locked-note, .project-empty {
  padding: 12px 14px;
  border-radius: 10px;
  background: #f7f9fc;
  border: 1px dashed var(--line);
  color: var(--muted);
  font-weight: 750;
}
.project-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.project-list a {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f9fbff;
}
.project-list span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}
.compact-integrations .integration-grid article {
  padding: 13px;
}
.compact-integrations .integration-grid span {
  font-size: 13px;
}
.compact-hero h1 { font-size: clamp(30px, 3.4vw, 44px); }
.article-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 28px;
}
.article-card {
  display: grid;
  gap: 8px;
  min-height: 112px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(16,24,40,.05);
}
.article-card b { line-height: 1.15; }
.article-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}
.article-layout { width: min(920px, calc(100% - 32px)); }
.article-page {
  margin: 24px 0 42px;
  padding: 26px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.article-page h1 { font-size: clamp(30px, 4vw, 46px); }
.article-page h2 { margin-top: 26px; font-size: 26px; }
.lead { font-size: 18px; line-height: 1.55; color: #344054; }
.article-page p, .article-page li { line-height: 1.65; }
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
  background: #fff;
}
caption {
  text-align: left;
  padding: 8px 0;
  color: var(--muted);
  font-weight: 800;
}
th, td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
th { background: #f2f6fc; }
.callout {
  padding: 13px 15px;
  border-left: 4px solid var(--blue);
  background: #f5f8ff;
  border-radius: 10px;
}
details {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin: 10px 0;
  background: #fbfcff;
}
summary { cursor: pointer; font-weight: 900; }
.article-cta { margin-top: 24px; }

@media (max-width: 900px) {
  .topbar { align-items: flex-start; flex-direction: column; }
  .topbar nav { width: 100%; overflow-x: auto; padding-bottom: 4px; }
  .hero { grid-template-columns: 1fr; padding-top: 24px; }
  .scan-row, .summary { flex-direction: column; align-items: stretch; }
  .summary .ghost { margin-left: 0; justify-content: center; }
  .quick-grid, .feature-grid, .integration-grid, .plans, .history, .tool-grid, .auth-grid, .project-list, .article-grid { grid-template-columns: 1fr; }
  .track-form { grid-template-columns: 1fr; }
  .tracking-panel .section-head,
  .pricing .section-head,
  .integrations .section-head,
  .report-section .section-head { display: block; }
  .metric-row {
    grid-template-columns: 18px 1fr;
    gap: 8px 10px;
  }
  .metric-value, .metric-details { grid-column: 2; }
  footer { flex-direction: column; }
}

.scan-progress {
  display: none;
  position: relative;
  margin-top: 12px;
  height: 38px;
  border: 1px solid rgba(34,88,244,.16);
  border-radius: 10px;
  background: #f6f8fc;
  overflow: hidden;
}
.scan-progress i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 42%;
  background: linear-gradient(90deg, #1747d8, #33d69f, #f3c778);
  animation: scanSweep 1.05s ease-in-out infinite;
}
.scan-progress span {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  height: 100%;
  color: #18263a;
  font-weight: 900;
  font-size: 13px;
}
.scan-card.is-loading .scan-progress,
body.is-scanning .scan-progress { display: block; }
.scan-loader {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(246,248,252,.72);
  backdrop-filter: blur(10px);
}
body.is-scanning .scan-loader { display: flex; }
.scan-loader-card {
  width: min(520px, 100%);
  padding: 22px;
  border-radius: 16px;
  background: rgba(255,255,255,.96);
  border: 1px solid var(--line);
  box-shadow: 0 24px 70px rgba(20,32,52,.18);
}
.scan-loader-card b { display: block; font-size: 20px; margin-bottom: 12px; }
.scan-loader-card span { display: block; margin-top: 10px; color: var(--muted); font-weight: 800; }
.scan-loader-bar {
  height: 12px;
  border-radius: 999px;
  background: #e9eef8;
  overflow: hidden;
}
.scan-loader-bar i {
  display: block;
  width: 46%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2258f4, #19c98b, #f3c778);
  animation: scanSweep 1.05s ease-in-out infinite;
}
.not-found { min-height: 70vh; display: grid; place-items: center; }
@keyframes scanSweep {
  0% { transform: translateX(-110%); }
  55% { transform: translateX(80%); }
  100% { transform: translateX(240%); }
}
