/* TopVuln — Dark theme, teal accent (Western tech/security aesthetic) */
:root {
  --bg: #181d2d;
  --surface: #1e2433;
  --surface-elevated: #252d40;
  --text: #f0f4f8;
  --text-muted: #94a3b8;
  --primary: #00d4ff;
  --primary-hover: #33ddff;
  --primary-dim: rgba(0, 212, 255, 0.15);
  --border: #2d3648;
  --radius: 10px;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  --font-sans: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
}

/* Cookie notice bar (ePrivacy: inform users) */
.cookie-notice {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.5rem;
  background: var(--surface-elevated);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.2);
  z-index: 1000;
}
.cookie-notice p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.cookie-notice a {
  color: var(--primary);
  text-decoration: underline;
}
.cookie-notice-btn {
  flex-shrink: 0;
  padding: 0.4rem 1rem;
  font-size: 0.9rem;
  background: var(--primary);
  color: var(--bg);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
}
.cookie-notice-btn:hover {
  background: var(--primary-hover);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}

.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 1rem 1.5rem 2rem;
}

header {
  text-align: center;
  padding: 0.75rem 0 1rem;
}

header h1 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 0.25rem 0;
  letter-spacing: -0.02em;
  color: var(--primary);
}

header .tagline {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
}
.card a:not(.btn) {
  color: var(--primary);
  text-decoration: none;
}
.card a:not(.btn):hover {
  text-decoration: underline;
}

.card h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
  color: var(--primary);
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.form-group input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  background: var(--surface-elevated);
  color: var(--text);
}

.form-group input::placeholder {
  color: var(--text-muted);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-dim);
}

.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  resize: vertical;
  min-height: 120px;
  background: var(--surface-elevated);
  color: var(--text);
}

.form-group textarea::placeholder {
  color: var(--text-muted);
}

.agree-terms-row {
  margin-bottom: 1rem;
  text-align: left;
}

.agree-terms-row .agree-terms-label {
  display: inline-flex !important;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-weight: normal;
  margin: 0 !important;
  color: var(--text-muted);
  width: fit-content;
}

.agree-terms-row .agree-terms-label span {
  white-space: nowrap;
}

.agree-terms-label a {
  color: var(--primary);
  text-decoration: none;
}

.agree-terms-label a:hover {
  text-decoration: underline;
}

.form-tip {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0 0 1rem 0;
  line-height: 1.5;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.05s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--primary);
  color: var(--bg);
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-secondary {
  background: var(--surface-elevated);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--border);
  color: var(--text);
}

.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.alert-success {
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.alert-error {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.pricing {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 1rem 0;
  font-size: 1.1rem;
}

.pricing .price {
  font-weight: 700;
  color: var(--primary);
}

.footer-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 0.5rem;
}

.footer-nav a {
  color: var(--primary);
  text-decoration: none;
}

.footer-nav a:hover {
  text-decoration: underline;
}

.footer-sep {
  color: var(--border);
  user-select: none;
  padding: 0 0.1rem;
}

button.footer-contact-trigger {
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  font-size: 0.875rem;
  color: var(--primary);
  cursor: pointer;
  text-decoration: none;
}

button.footer-contact-trigger:hover {
  text-decoration: underline;
}

.footer-contact-dialog .modal-body p {
  margin: 0 0 1rem 0;
}

.footer-contact-dialog .modal-body p:last-of-type {
  margin-bottom: 0;
}

.footer-contact-tip {
  padding-top: 0.75rem;
  margin-top: 0.75rem !important;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.footer-contact-modal-body a {
  color: var(--primary);
}

#subscribe-form .actions,
#feedback-form .actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Paid trial buttons on one row; free + cancel on the next row together */
#subscribe-form .actions:has([data-payment]) .actions-free-row {
  flex-basis: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-start;
}

/* Home: hero intro */
.hero-desc {
  color: var(--text-muted);
  margin: 0 0 1rem 0;
}

.hero-desc strong {
  color: var(--text);
}

.hero-list {
  margin: 1rem 0;
  padding-left: 1.25rem;
  color: var(--text-muted);
}

.hero-list li {
  margin-bottom: 0.35rem;
}

/* Homepage: moderate vertical rhythm (between default and ultra-tight) */
.home-page {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.home-page > .card {
  padding: 1.2rem 1.25rem;
}

.home-page > .card > h2 {
  margin-bottom: 0.7rem;
  font-size: 1.2rem;
}

.home-page .hero-desc {
  margin-bottom: 0.75rem;
  line-height: 1.55;
}

.home-page .hero-list {
  margin: 0.65rem 0;
  padding-left: 1.15rem;
}

.home-page .hero-list li {
  margin-bottom: 0.28rem;
  line-height: 1.45;
}

.home-page .pricing {
  margin: 0.6rem 0 0.15rem;
  font-size: 1.05rem;
}

.home-page .feature-grid {
  margin-top: 0;
  margin-bottom: 0;
  gap: 0.85rem;
}

.home-page .feature-card {
  padding: 1rem 1.1rem;
}

.home-page .feature-card h3 {
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}

.home-page .feature-card p {
  line-height: 1.5;
}

.home-page #subscribe-email .form-group {
  margin-bottom: 0.95rem;
}

.home-page #subscribe-email .agree-terms-row {
  margin-bottom: 0.9rem;
}

/* Feature grid (2x2 on larger screens) */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.25rem;
  margin-bottom: 1.25rem;
}

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

.feature-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  color: var(--primary);
}

.feature-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

/* Payment notice modal (Stripe / PayPal vs free email referral) */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1100;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(2px);
}
.modal-overlay.is-open {
  display: flex;
}
.modal-dialog {
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}
.modal-dialog h3 {
  margin: 0 0 1rem 0;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
}
.modal-body p {
  margin: 0 0 0.85rem 0;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.55;
}
.modal-body p:last-child {
  margin-bottom: 0;
}
.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
  justify-content: flex-end;
}
.modal-actions .btn {
  margin: 0;
}

@media (max-width: 520px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }
}

/* CVE detail (/cve/CVE-...) */
.cve-detail .cve-breadcrumb {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.cve-breadcrumb-sep {
  margin: 0 0.35rem;
  opacity: 0.7;
}
.cve-detail .cve-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 0.75rem 0;
  color: var(--text);
  line-height: 1.35;
}
.cve-id-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1rem 0;
  font-size: 0.9rem;
}
.cve-id-badge {
  font-family: ui-monospace, monospace;
  font-weight: 600;
  color: var(--primary);
}
.cve-severity {
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
}
.cve-severity--critical {
  color: #fecaca;
  border-color: #7f1d1d;
  background: rgba(127, 29, 29, 0.35);
}
.cve-severity--high {
  color: #fed7aa;
  border-color: #9a3412;
  background: rgba(154, 52, 18, 0.3);
}
.cve-severity--medium {
  color: #fef08a;
  border-color: #854d0e;
}
.cve-severity--low {
  color: #bbf7d0;
  border-color: #166534;
}
.cve-flag {
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--primary-dim);
  color: var(--primary);
}
.cve-flag--kev {
  background: rgba(220, 38, 38, 0.25);
  color: #fecaca;
}
.cve-meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 1rem;
  font-size: 0.9rem;
  margin: 0 0 1.25rem 0;
}
.cve-meta dt {
  margin: 0;
  color: var(--text-muted);
  font-weight: 500;
}
.cve-meta dd {
  margin: 0;
}
.cve-section-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 1rem 0 0.5rem 0;
  color: var(--primary);
}
.cve-description {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text-muted);
  margin: 0 0 1rem 0;
}
.cve-cpe {
  font-size: 0.8rem;
  line-height: 1.45;
  max-height: 12rem;
  overflow: auto;
  padding: 0.75rem;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 0 0 1rem 0;
  white-space: pre-wrap;
  word-break: break-all;
}
.cve-external {
  font-size: 0.95rem;
  margin: 0 0 1rem 0;
}
.cve-detail .card-inner,
.daily-page .card-inner {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}
.cve-detail .card-inner {
  margin-top: 0.5rem;
}
.daily-page .card-inner {
  margin-top: 1.5rem;
}
.cve-detail .card-inner p,
.daily-page .card-inner p {
  margin: 0 0 0.5rem 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text-muted);
}
.cve-detail .card-inner p:last-child,
.daily-page .card-inner p:last-child {
  margin-bottom: 0;
}
.cve-disclaimer {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 1rem 0 0 0;
  line-height: 1.45;
}

/* Daily digest CVE list (/daily) */
.daily-page .daily-date {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0 0 1rem 0;
}
.daily-page .daily-intro {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0 0 1rem 0;
  line-height: 1.5;
}
.daily-page .daily-mask-note {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: -0.25rem 0 0.85rem 0;
  line-height: 1.45;
}
.daily-page .daily-empty {
  color: var(--text-muted);
  margin: 0 0 1.25rem 0;
  line-height: 1.5;
}
.daily-cve-list {
  list-style: none;
  margin: 0 0 1.5rem 0;
  padding: 0;
}
.daily-cve-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-family: ui-monospace, monospace;
  font-size: 1rem;
}
.daily-cve-list li:last-child {
  border-bottom: none;
}

@media (max-width: 480px) {
  .container { padding: 1rem; }
  header { padding: 1.5rem 0 1rem; }
  header h1 { font-size: 1.65rem; }
  .card { padding: 1.25rem; }
  .home-page > .card {
    padding: 1.15rem 1.2rem;
  }
  .agree-terms-row .agree-terms-label span {
    white-space: normal;
  }
}
