:root {
  /* Paleta — ClickBus Design System (colors_and_type.css) */
  --bg: #f9f9f9;
  --surface: #ffffff;
  --surface-2: #f5f5f5;
  --border: #e9e9e9;
  --text: #1a1a1a;
  --text-muted: #767676;

  --brand: #8629cc;
  --brand-2: #a528ff;
  --brand-soft: #f8f0ff;

  /* Feedback — cada estado tem um tom "ink" (texto sobre fundo claro),
     um tom "strong" (pontos/barras/anéis) e um "light" (borda de alerta) */
  --good: #397239;
  --good-strong: #55b254;
  --good-light: #92d191;
  --good-bg: #d1edd1;

  --warn: #cc7b00;
  --warn-strong: #ff9a00;
  --warn-light: #ffd799;
  --warn-bg: #fff5e6;

  --bad: #ba1300;
  --bad-strong: #e31600;
  --bad-light: #ffbeb7;
  --bad-bg: #ffefed;

  --neutral: #22448b;
  --neutral-strong: #4b6db6;
  --neutral-light: #aec1eb;
  --neutral-bg: #ebf0fa;

  --code-bg: #1a1a1a;
  --code-text: #f5f5f5;

  --shadow: 0 3px 6px 0.16px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 4px 8px 0.32px rgba(0, 0, 0, 0.08);
  --radius: 12px;
  --font-display: "Noto Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: "Noto Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Roboto Mono", "Fira Code", Menlo, Monaco, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.4;
  overflow-x: hidden;
}

.page {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 20px 64px;
}

.hero {
  background: var(--surface);
  padding: 48px 20px 72px;
  color: var(--text);
  text-align: center;
}

.hero-full {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-bottom: 48px;
}

.user-bar {
  position: absolute;
  top: 20px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.user-bar a {
  color: var(--brand);
  text-decoration: none;
  font-weight: 600;
}

.user-bar a:hover {
  text-decoration: underline;
}

.results-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 22px 20px 64px;
  color: var(--text);
}

.results-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 880px;
  margin: 0 auto 32px;
}

.results-topbar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark-sm {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

.results-topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.results-topbar-user {
  font-size: 12.5px;
  color: var(--text-muted);
}

.results-nav-btn {
  border: 1px solid var(--brand);
  background: transparent;
  color: var(--brand);
  font-weight: 600;
  font-size: 13.5px;
  padding: 8px 18px;
  border-radius: 9999px;
  text-decoration: none;
  transition: background 0.12s ease;
}

.results-nav-btn:hover {
  background: var(--brand-soft);
}

.results-header-main {
  max-width: 880px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}

.results-header-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.results-header-target {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
  word-break: break-word;
  line-height: 1.15;
}

.results-header-timestamp {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.results-header-timestamp::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
  flex-shrink: 0;
}

.results-header-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.results-header-score-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.verdict-badge {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 6px 18px;
  border-radius: 9999px;
}

.verdict-badge.good {
  background: var(--good-bg);
  border: 1px solid var(--good-light);
  color: var(--good);
}

.verdict-badge.warn {
  background: var(--warn-bg);
  border: 1px solid var(--warn-light);
  color: var(--warn);
}

.verdict-badge.bad {
  background: var(--bad-bg);
  border: 1px solid var(--bad-light);
  color: var(--bad);
}

.risk-banner {
  background: var(--bad-bg);
  border: 1px solid var(--bad-light);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.risk-banner-text {
  color: var(--bad);
  font-size: 13.5px;
  font-weight: 600;
}

.help-btn {
  border: none;
  background: var(--bad-strong);
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  padding: 8px 16px;
  border-radius: 9999px;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background 0.12s ease;
  flex-shrink: 0;
}

.help-btn:hover:not(:disabled) {
  background: var(--bad);
}

.help-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.help-result {
  font-size: 13px;
  font-weight: 600;
  color: var(--good);
}

.help-result.error {
  color: var(--bad);
}

.score-ring-lg {
  width: 152px;
  height: 152px;
  box-shadow: var(--shadow-hover);
}

.score-ring-lg .score-ring-inner {
  width: 120px;
  height: 120px;
}

.score-ring-lg .grade {
  font-size: 36px;
}

.score-ring-lg .total {
  font-size: 13px;
}

.hero .brand-mark {
  width: 40px;
  height: 40px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
}

.hero h1 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hero .tagline {
  margin: 0 0 28px;
  color: var(--text-muted);
  font-size: 15px;
}

.search-form {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 6px;
  border-radius: 9999px;
  box-shadow: var(--shadow);
}

.search-form input[type="text"] {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  padding: 12px 16px;
  font-size: 15px;
  color: var(--text);
}

.search-form input[type="text"]::placeholder {
  color: var(--text-muted);
}

.search-form button {
  border: none;
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  padding: 12px 22px;
  border-radius: 9999px;
  cursor: pointer;
  transition: background 0.12s ease, transform 0.12s ease, box-shadow 0.12s ease;
}

.search-form button:hover { background: var(--brand-2); transform: translateY(-1px); box-shadow: var(--shadow-hover); }
.search-form button:active { transform: translateY(0); }

.google-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 9999px;
  padding: 12px 22px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: box-shadow 0.12s ease, border-color 0.12s ease;
}

.google-btn:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-hover);
}

.oauth-warning {
  max-width: 420px;
  margin: 0 auto;
  font-size: 13px;
  color: var(--warn);
  background: var(--warn-bg);
  border: 1px solid var(--warn-light);
  border-radius: var(--radius);
  padding: 14px 18px;
}

.oauth-warning code {
  font-family: var(--font-mono);
  background: var(--surface);
  padding: 1px 5px;
  border-radius: 4px;
}

.content {
  margin-top: 24px;
}

.alert {
  background: var(--bad-bg);
  color: var(--bad);
  border: 1px solid var(--bad-light);
  border-radius: var(--radius);
  padding: 16px 20px;
  font-size: 14px;
  box-shadow: var(--shadow);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 20px;
}

.summary-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
}

.summary-target {
  flex: 1;
  min-width: 200px;
}

.summary-target .label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brand);
  margin-bottom: 4px;
}

.summary-target .value {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  word-break: break-word;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 12.5px;
  font-weight: 500;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-mono);
}

.numbered-list {
  display: flex;
  flex-direction: column;
}

.numbered-list-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 9px 0;
  border-top: 1px solid var(--border);
  font-size: 13.5px;
}

.numbered-list-item:first-child {
  border-top: none;
}

.numbered-list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
}

.numbered-list-detail {
  padding-left: 36px;
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-muted);
}

.numbered-list-index {
  flex-shrink: 0;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 9999px;
  background: var(--surface-2);
  color: var(--brand);
  font-weight: 700;
  font-size: 12px;
  font-family: var(--font-body);
  display: flex;
  align-items: center;
  justify-content: center;
}

.score-ring {
  --pct: 0;
  --ring-color: var(--neutral-strong);
  width: 108px;
  height: 108px;
  border-radius: 50%;
  background: conic-gradient(var(--ring-color) calc(var(--pct) * 1%), var(--surface-2) 0);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.score-ring.good { --ring-color: var(--good-strong); }
.score-ring.warn { --ring-color: var(--warn-strong); }
.score-ring.bad { --ring-color: var(--bad-strong); }

.score-ring-inner {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.score-ring-inner .grade {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  color: var(--text);
}

.score-ring-inner .total {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 40px 0 16px;
  padding-left: 14px;
  border-left: 4px solid var(--brand);
  line-height: 1.3;
}

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

.check-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

.check-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-dot.good { background: var(--good-strong); }
.status-dot.warn { background: var(--warn-strong); }
.status-dot.bad { background: var(--bad-strong); }
.status-dot.neutral { background: var(--neutral-strong); }

.check-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.005em;
}

.badge {
  margin-left: auto;
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 9999px;
}

.badge.good { background: var(--good-bg); color: var(--good); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.neutral { background: var(--neutral-bg); color: var(--neutral); }

.check-card p {
  margin: 4px 0;
  font-size: 13.5px;
  color: var(--text-muted);
}

.record-box {
  margin-top: 10px;
  background: var(--code-bg);
  color: var(--code-text);
  font-family: var(--font-mono);
  font-size: 12.5px;
  padding: 10px 12px;
  border-radius: 8px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

table.mx-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

table.mx-table td {
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}

table.mx-table td:first-child {
  color: var(--text-muted);
  width: 60px;
}

table.kv-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

table.kv-table td {
  padding: 7px 10px 7px 0;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  word-break: break-word;
}

table.kv-table td:first-child {
  color: var(--text-muted);
  width: 190px;
  flex-shrink: 0;
}

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

a:hover {
  text-decoration: none;
}

.query-section {
  margin-bottom: 20px;
}

.query-btn {
  border: 1px solid var(--brand);
  background: transparent;
  color: var(--brand);
  font-weight: 600;
  font-size: 13.5px;
  padding: 9px 18px;
  border-radius: 9999px;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background 0.12s ease, color 0.12s ease;
}

.query-btn:hover:not(:disabled) {
  background: var(--brand-soft);
}

.query-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.query-result {
  margin-top: 14px;
}

.query-result:empty {
  margin-top: 0;
}

.query-result .loading {
  color: var(--text-muted);
  font-size: 13px;
}

.cve-entry {
  padding: 10px 0;
  border-top: 1px solid var(--border);
}

.cve-entry:first-child {
  border-top: none;
}

.cve-entry p {
  font-size: 13px;
  margin: 6px 0 0;
  color: var(--text);
}

.score-breakdown {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.score-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.score-row .score-label {
  width: 190px;
  flex-shrink: 0;
  font-size: 13.5px;
  font-weight: 600;
}

.score-row .bar-track {
  flex: 1;
  height: 8px;
  border-radius: 9999px;
  background: var(--surface-2);
  overflow: hidden;
}

.score-row .bar-fill {
  height: 100%;
  border-radius: 9999px;
}

.bar-fill.good { background: var(--good-strong); }
.bar-fill.warn { background: var(--warn-strong); }
.bar-fill.bad { background: var(--bad-strong); }
.bar-fill.neutral { background: var(--neutral-strong); }

.score-row .score-points {
  width: 56px;
  text-align: right;
  font-size: 12.5px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.score-note {
  margin: 4px 0 0 202px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.note-banner {
  background: var(--neutral-bg);
  border: 1px solid var(--neutral-light);
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: 13.5px;
  color: var(--neutral);
  margin-bottom: 20px;
}

.selector-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.chip {
  font-size: 11.5px;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.chip.found {
  background: var(--good-bg);
  color: var(--good);
  font-weight: 600;
}

.empty-state {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  padding: 40px 20px;
}

footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 12.5px;
  margin-top: 40px;
}
