/* CertMonitor - Modern Responsive Stylesheet */
:root {
  --bg-main: #090d16;
  --bg-card: #0f172a;
  --bg-card-subtle: #131c33;
  --bg-surface: #131c33;
  --bg-input: #1a243b;
  --border-color: #24324f;
  --border-focus: #3b82f6;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --color-danger: #ef4444;
  
  --success-bg: #064e3b;
  --success-border: #059669;
  --success-text: #34d399;
  --success-glow: rgba(16, 185, 129, 0.2);
  
  --warning-bg: #78350f;
  --warning-border: #d97706;
  --warning-text: #fbbf24;
  --warning-glow: rgba(245, 158, 11, 0.2);
  
  --danger-bg: #881337;
  --danger-border: #e11d48;
  --danger-text: #f43f5e;
  --danger-glow: rgba(244, 63, 94, 0.2);
  
  --info-bg: #1e293b;
  --info-border: #475569;
  --info-text: #cbd5e1;
  
  --primary-accent: #10b981;
  --primary-hover: #059669;
  --primary-active: #047857;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 9999px;
  
  --shadow-card: 0 4px 20px -2px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px -5px var(--success-glow);
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
}

pre {
  max-width: 100%;
  overflow-x: auto;
}

code {
  font-family: var(--font-mono);
  overflow-wrap: anywhere;
  word-break: break-all;
  max-width: 100%;
}

/* Container */
.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header & Nav */
header {
  border-bottom: 1px solid var(--border-color);
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.brand-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-badge {
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  color: var(--primary-accent);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
}

.nav-links {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

.nav-link:hover {
  color: var(--text-main);
}

.nav-btn {
  background: var(--primary-accent);
  color: #042f2e;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background 0.15s ease;
}

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

/* Hero Section */
.hero {
  padding: 3rem 0 2rem;
  text-align: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--primary-accent);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-pill);
  margin-bottom: 1.25rem;
}

.hero-title {
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.hero-title span {
  background: linear-gradient(135deg, #34d399 0%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: clamp(1rem, 2vw, 1.15rem);
  max-width: 680px;
  margin: 0 auto 2rem;
}

/* Search Box */
.search-card {
  max-width: 660px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 0.5rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-card:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.search-form {
  display: flex;
  gap: 0.5rem;
}

.search-input-wrap {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 0.9rem;
  color: var(--text-dim);
  pointer-events: none;
}

.search-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid transparent;
  color: var(--text-main);
  font-size: 1rem;
  padding: 0.8rem 1rem 0.8rem 2.5rem;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  outline: none;
}

.search-input::placeholder {
  color: var(--text-dim);
}

.search-btn {
  background: var(--primary-accent);
  color: #042f2e;
  border: none;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0 1.5rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: background 0.15s ease;
  white-space: nowrap;
}

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

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

.search-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* Sample Pills */
.sample-bar {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.sample-label {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-right: 0.25rem;
}

.sample-pill {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.15s ease;
}

.sample-pill:hover {
  background: var(--bg-card-subtle);
  color: var(--text-main);
  border-color: #3b82f6;
}

.sample-pill.warning-sample:hover {
  border-color: var(--danger-border);
  color: var(--danger-text);
}

/* Results Section */
.results-section {
  padding: 2rem 0;
}

.result-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.result-target {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.result-host {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-main);
  word-break: break-all;
}

.result-timestamp {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid var(--border-color, #334155);
  color: var(--text-muted, #94a3b8);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-pill, 9999px);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  text-decoration: none;
}

.share-btn:hover {
  background: rgba(16, 185, 129, 0.12);
  border-color: #10b981;
  color: #10b981;
}

.share-btn.copied {
  background: rgba(16, 185, 129, 0.2);
  border-color: #10b981;
  color: #34d399;
}

.share-status {
  margin-top: 0.6rem;
  font-size: 0.82rem;
  color: var(--text-muted, #94a3b8);
  overflow-wrap: anywhere;
}

.share-status a {
  color: #34d399;
}

.share-status small {
  font-size: 0.75rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-family: var(--font-mono);
  text-transform: uppercase;
}

.badge-success {
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  color: var(--success-text);
}

.badge-warning {
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  color: var(--warning-text);
}

.badge-danger {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: var(--danger-text);
}

.badge-info {
  background: var(--info-bg);
  border: 1px solid var(--info-border);
  color: var(--info-text);
}

/* Grid of Cards */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.status-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.status-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.card-title-group {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.card-icon-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
}

.card-subtitle {
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* Countdown Highlight */
.countdown-banner {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 1.25rem;
  text-align: center;
}

.countdown-banner.level-success {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(6, 78, 59, 0.25);
}

.countdown-banner.level-warning {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(120, 53, 15, 0.25);
}

.countdown-banner.level-danger {
  border-color: rgba(244, 63, 94, 0.4);
  background: rgba(136, 19, 55, 0.3);
}

/* Urgent Certificate Expiry & Downtime Callout */
.cert-expiry-callout {
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  transition: all 0.2s ease-in-out;
}

.cert-expiry-callout.is-hidden {
  display: none !important;
}

.cert-expiry-callout.is-expiring {
  background: rgba(120, 53, 15, 0.28);
  border: 1px solid var(--warning-border);
  box-shadow: 0 0 15px -3px var(--warning-glow);
}

.cert-expiry-callout.is-expired {
  background: rgba(136, 19, 55, 0.32);
  border: 1px solid var(--danger-border);
  box-shadow: 0 0 15px -3px var(--danger-glow);
}

.cert-expiry-callout-content {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.cert-expiry-callout-icon {
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.cert-expiry-callout.is-expiring .cert-expiry-callout-icon {
  color: var(--warning-text);
}

.cert-expiry-callout.is-expired .cert-expiry-callout-icon {
  color: var(--danger-text);
}

.cert-expiry-callout-text {
  flex: 1 1 auto;
  min-width: 0;
}

.cert-expiry-callout-title {
  font-weight: 700;
  font-size: 0.98rem;
  margin-bottom: 0.25rem;
  line-height: 1.35;
}

.cert-expiry-callout.is-expiring .cert-expiry-callout-title {
  color: var(--warning-text);
}

.cert-expiry-callout.is-expired .cert-expiry-callout-title {
  color: #fda4af;
}

.cert-expiry-days-count {
  font-weight: 800;
  text-decoration: underline;
}

.cert-expiry-callout-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0;
}

.cert-expiry-callout-action {
  display: flex;
  align-items: center;
}

.cert-expiry-callout-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: none;
  transition: all 0.15s ease-in-out;
  width: 100%;
}

.cert-expiry-callout.is-expiring .cert-expiry-callout-btn {
  background: #d97706;
  color: #ffffff;
}
.cert-expiry-callout.is-expiring .cert-expiry-callout-btn:hover {
  background: #b45309;
}

.cert-expiry-callout.is-expired .cert-expiry-callout-btn {
  background: #e11d48;
  color: #ffffff;
}
.cert-expiry-callout.is-expired .cert-expiry-callout-btn:hover {
  background: #be123c;
}

.countdown-value {
  font-size: 2.2rem;
  font-weight: 800;
  font-family: var(--font-mono);
  line-height: 1.1;
  margin-bottom: 0.2rem;
}

.countdown-value.level-success { color: var(--success-text); }
.countdown-value.level-warning { color: var(--warning-text); }
.countdown-value.level-danger { color: var(--danger-text); }
.countdown-value.level-info { color: var(--info-text); }

.countdown-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Meta Data List */
.data-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-bottom: 1.25rem;
  flex: 1;
}

.data-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  font-size: 0.88rem;
  gap: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
}

.data-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.data-label {
  color: var(--text-dim);
  font-weight: 500;
  min-width: 100px;
}

.data-val {
  color: var(--text-main);
  text-align: right;
  font-weight: 500;
  word-break: break-word;
}

.data-val.mono {
  font-family: var(--font-mono);
  font-size: 0.84rem;
}

.badge-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
}

/* SAN Tags */
.san-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
  max-width: 280px;
}

.san-tag {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
}

.san-tag.match {
  border-color: rgba(16, 185, 129, 0.5);
  color: var(--success-text);
  background: rgba(6, 78, 59, 0.3);
}

/* Timeline Comparison */
.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.timeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.timeline-bars {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.timeline-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.timeline-item-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
}

.timeline-progress-bg {
  height: 10px;
  background: var(--bg-card-subtle);
  border-radius: var(--radius-pill);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.timeline-progress-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  transition: width 0.6s ease;
}

.fill-success { background: linear-gradient(90deg, #10b981, #34d399); }
.fill-warning { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.fill-danger { background: linear-gradient(90deg, #f43f5e, #fb7185); }
.fill-info { background: #64748b; }

/* Policy Notice Callout */
.policy-callout {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--border-focus);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.policy-callout-icon {
  color: var(--border-focus);
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.policy-callout-text h4 {
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.policy-callout-text p {
  font-size: 0.84rem;
  color: var(--text-muted);
}

/* CTA: 24/7 Monitoring Section */
.cta-section {
  background: linear-gradient(180deg, #0f172a 0%, #111e38 100%);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: var(--radius-lg);
  padding: 2.5rem 1.5rem;
  margin-bottom: 2.5rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.cta-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 2rem;
}

.cta-pill {
  display: inline-block;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #60a5fa;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cta-title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.cta-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.cta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  align-items: center;
}

.cta-features {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cta-feature-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.cta-feature-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.15);
  color: var(--primary-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.cta-feature-text strong {
  display: block;
  font-size: 0.92rem;
  color: var(--text-main);
  margin-bottom: 0.15rem;
}

.cta-feature-text span {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.cta-action-card {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.plan-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}

.plan-box {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  background: var(--bg-card);
}

.plan-box.plan-active {
  border-color: var(--success-border);
}

.plan-name {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.plan-price {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-main);
}

.plan-price span {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
}

.plan-detail {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.manage-link-box {
  display: block;
  margin: 0.5rem 0;
  padding: 0.5rem;
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  font-family: monospace;
  font-size: 0.75rem;
  word-break: break-all;
  color: var(--text-main);
}

.pricing-box {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}

.pricing-amount {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-main);
}

.pricing-freq {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.pricing-note {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-bottom: 1.25rem;
}

.monitor-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  text-align: left;
}

.form-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-input, .form-select {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.75rem;
  color: var(--text-main);
  font-size: 0.88rem;
  outline: none;
}

.form-input:focus, .form-select:focus {
  border-color: var(--border-focus);
}

.cta-submit-btn {
  background: #2563eb;
  color: #fff;
  border: none;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  transition: background 0.15s ease;
}

.cta-submit-btn:hover {
  background: #1d4ed8;
}

.cta-feedback {
  margin-top: 0.75rem;
  font-size: 0.82rem;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  display: none;
}

.cta-feedback.show {
  display: block;
}

.cta-feedback.info {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.cta-feedback.success {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.cta-feedback.danger {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* 24/7 Monitoring Live Dashboard & Scheduler Elements */
.monitor-dashboard {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.monitor-dash-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.scheduler-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.monitor-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.stat-card {
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
}

.stat-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.monitor-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.monitor-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: left;
}

.monitor-table th {
  background: var(--bg-card-alt);
  padding: 0.75rem 1rem;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border-color);
}

.monitor-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
  vertical-align: middle;
}

.monitor-table tr:last-child td {
  border-bottom: none;
}

.action-btn-sm {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--bg-card-alt);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.action-btn-sm:hover {
  background: var(--border-color);
  color: #fff;
}

.btn-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.btn-secondary {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: var(--bg-card-alt);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.7rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

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

.btn-secondary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Privacy Guarantee Banner */
.privacy-banner {
  background: var(--bg-card);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2.5rem;
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.privacy-banner-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: rgba(16, 185, 129, 0.15);
  color: var(--primary-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.privacy-banner-content h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: var(--text-main);
}

.privacy-banner-content p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.privacy-badge-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.privacy-pill {
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill);
}

/* Footer */
footer {
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  background: #070a12;
  padding: 2rem 0;
  font-size: 0.82rem;
  color: var(--text-dim);
}

.footer-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

.footer-link {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-link:hover {
  color: var(--text-main);
}

/* Spinner */
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(4, 47, 46, 0.3);
  border-top-color: #042f2e;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .brand-badge {
    display: none;
  }

  .nav-links {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
    max-width: 100%;
  }

  .nav-link {
    font-size: 0.8rem;
  }

  .nav-btn {
    white-space: nowrap;
    padding: 0.35rem 0.65rem;
    font-size: 0.8rem;
  }

  @media (max-width: 640px) {
    .nav-links .nav-link:not(:first-child) {
      display: none;
    }
  }

  .hero {
    padding: 1.5rem 0 1rem;
  }
  
  .search-form {
    flex-direction: column;
  }
  
  .search-btn {
    padding: 0.8rem;
    width: 100%;
  }
  
  .result-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .cards-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1.25rem;
  }

  .status-card {
    padding: 1.1rem;
  }

  .countdown-banner {
    padding: 0.85rem 1rem;
  }
  
  .data-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    padding: 0.4rem 0;
  }
  
  .data-val {
    text-align: left;
  }
  
  .san-list {
    justify-content: flex-start;
    max-width: 100%;
  }
  
  .cta-section {
    padding: 1.25rem 0.9rem;
    margin-bottom: 1.5rem;
  }

  .privacy-banner {
    padding: 1.1rem;
    margin-bottom: 1.5rem;
  }
  
  .footer-wrap {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Utility text classes */
.text-xs { font-size: 0.78rem; line-height: 1.45; }
.text-muted { color: var(--text-muted); }

textarea.form-input {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  resize: vertical;
  min-height: 4.5rem;
}

.cta-submit-btn:disabled,
.cta-submit-btn:disabled:hover {
  background: var(--bg-surface);
  color: var(--text-muted);
  border: 1px dashed var(--border-color);
  box-shadow: none;
  cursor: not-allowed;
  opacity: 1;
}

/* Newer certificate in CT but not deployed: a calm notice, not an alarm */
.newer-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-left: 3px solid var(--info-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}
.newer-card[hidden] { display: none; }
.newer-title { font-size: 1.02rem; font-weight: 700; margin-bottom: 0.6rem; }
.newer-text { font-size: 0.92rem; color: var(--text-main); line-height: 1.55; margin-bottom: 0.6rem; }
.newer-text a, .newer-monitor a { color: inherit; text-decoration: underline; }
.newer-host { font-family: var(--font-mono); font-size: 0.86rem; word-break: break-all; }
.newer-monitor { font-size: 0.84rem; color: var(--text-muted); }
.renewal-line { font-size: 0.86rem; line-height: 1.45; margin: 0.4rem 0 0; color: var(--text-muted); }
.renewal-line[hidden] { display: none; }
.renewal-line.level-warning { color: var(--warning-text); font-weight: 600; }
.newer-dates { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0.5rem; margin: 0 0 0.75rem; }
.newer-date { border: 1px solid var(--border-color); border-radius: var(--radius-md, 6px); padding: 0.5rem 0.75rem; }
.newer-date dt { font-size: 0.78rem; color: var(--text-muted); }
.newer-date dd { margin: 0.1rem 0 0; font-size: 0.98rem; font-weight: 700; font-variant-numeric: tabular-nums; }

/* Certificate Chain Section */
.chain-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-card);
}

.chain-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.chain-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  color: var(--text-main);
}

.chain-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 48rem;
}

.chain-summary-box {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-card-subtle);
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.chain-summary-box.level-success {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(6, 78, 59, 0.25);
  color: var(--success-text);
}

.chain-summary-box.level-warning {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(120, 53, 15, 0.25);
  color: var(--warning-text);
}

.chain-summary-box.level-danger {
  border-color: rgba(244, 63, 94, 0.4);
  background: rgba(136, 19, 55, 0.3);
  color: var(--danger-text);
}

.chain-summary-box.level-info {
  color: var(--info-text);
}

.chain-flow {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.chain-node {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.25rem;
  transition: border-color 0.2s ease;
}

.chain-node.node-server {
  border-left: 4px solid var(--primary-accent);
}

.chain-node.node-intermediate {
  border-left: 4px solid #60a5fa;
}

.chain-node.node-root {
  border-left: 4px solid #a78bfa;
}

.chain-node.node-missing_intermediate {
  border: 2px dashed var(--color-danger);
  background: rgba(136, 19, 55, 0.2);
}

.chain-node.status-unreachable {
  opacity: 0.7;
  border-left: 4px solid var(--text-dim);
}

.chain-node-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}

.node-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.node-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
}

.node-server .node-icon {
  color: var(--primary-accent);
  background: rgba(16, 185, 129, 0.15);
}

.node-intermediate .node-icon {
  color: #60a5fa;
  background: rgba(96, 165, 250, 0.15);
}

.node-root .node-icon {
  color: #a78bfa;
  background: rgba(167, 139, 250, 0.15);
}

.node-missing_intermediate .node-icon {
  color: var(--danger-text);
  background: rgba(244, 63, 94, 0.2);
}

.node-role {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: var(--text-dim);
}

.node-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
  word-break: break-all;
}

.chain-node-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.6rem 1.25rem;
  font-size: 0.86rem;
}

.node-meta-row {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.meta-k {
  color: var(--text-dim);
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.meta-v {
  color: var(--text-main);
  word-break: break-all;
}

.chain-connector {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.6rem 0;
}

.connector-line {
  flex: 1;
  max-width: 60px;
  height: 1px;
  background: var(--border-color);
}

.connector-label {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-dim);
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.chain-missing-alert {
  background: rgba(136, 19, 55, 0.35);
  border: 1px solid rgba(244, 63, 94, 0.4);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  margin-top: 0.5rem;
}

.missing-alert-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--danger-text);
  margin-bottom: 0.4rem;
}

.missing-alert-desc {
  font-size: 0.85rem;
  color: var(--text-main);
  line-height: 1.45;
  margin-bottom: 0.6rem;
}

.missing-alert-fix {
  font-size: 0.83rem;
  color: #fca5a5;
  background: rgba(0, 0, 0, 0.25);
  border-left: 3px solid var(--danger-text);
  padding: 0.4rem 0.6rem;
  border-radius: 2px;
}

@media (max-width: 768px) {
  .chain-head {
    flex-direction: column;
  }
  .chain-node-grid {
    grid-template-columns: 1fr;
  }
}

/* Certificate Transparency card */
.ct-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2rem;
}
.ct-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; }
.ct-title { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.3rem; }
.ct-sub { font-size: 0.85rem; color: var(--text-muted); max-width: 46rem; }
.ct-head .badge { flex-shrink: 0; }
.ct-message {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-card-subtle);
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}
.ct-message.level-success { border-color: rgba(16, 185, 129, 0.4); background: rgba(6, 78, 59, 0.25); color: var(--success-text); }
.ct-message.level-warning { border-color: rgba(245, 158, 11, 0.4); background: rgba(120, 53, 15, 0.25); color: var(--warning-text); }
.ct-message.level-danger { border-color: rgba(244, 63, 94, 0.4); background: rgba(136, 19, 55, 0.3); color: var(--danger-text); }
.ct-message.level-info { color: var(--info-text); }
.ct-note { font-size: 0.83rem; color: var(--text-muted); margin-bottom: 0.75rem; }
.ct-table-wrap { overflow-x: auto; margin-bottom: 0.75rem; }
.ct-table { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
.ct-caption { text-align: left; font-size: 0.8rem; color: var(--text-dim); padding-bottom: 0.5rem; }
.ct-table th { text-align: left; font-weight: 600; color: var(--text-dim); padding: 0.4rem 0.6rem; border-bottom: 1px solid var(--border-color); white-space: nowrap; }
.ct-table td { padding: 0.45rem 0.6rem; border-bottom: 1px dashed rgba(255, 255, 255, 0.06); vertical-align: top; }
.ct-table td:nth-child(1), .ct-table td:nth-child(2) { white-space: nowrap; }
.ct-table td.font-mono { font-size: 0.74rem; word-break: break-all; }
.ct-table td a { color: inherit; text-decoration: underline dotted; }
.ct-table tr.is-served td { background: rgba(6, 78, 59, 0.22); }
.ct-key, .ct-served {
  display: inline-block; font-family: var(--font-mono); font-size: 0.68rem; padding: 0.05rem 0.35rem;
  border-radius: var(--radius-sm); border: 1px solid var(--border-color); color: var(--text-muted);
}
.ct-served { border-color: rgba(16, 185, 129, 0.5); color: var(--success-text); white-space: nowrap; }
.ct-scts { font-size: 0.83rem; margin-bottom: 0.75rem; }
.ct-scts-head { color: var(--text-muted); margin-bottom: 0.35rem; }
.ct-scts ul { list-style: none; padding: 0; margin: 0; }
.ct-scts li { padding: 0.2rem 0; overflow-wrap: anywhere; }
.ct-sct-mark { font-weight: 600; margin-right: 0.15rem; }
.ct-sct-time { color: var(--text-muted); white-space: nowrap; }
.ct-source { font-size: 0.78rem; color: var(--text-dim); }
.ct-source a { color: var(--text-muted); }

@media (max-width: 768px) {
  .ct-head { flex-direction: column; }
  .ct-table thead { display: none; }
  .ct-table caption { display: block; width: 100%; }
  .ct-table tr.is-served { background: rgba(6, 78, 59, 0.22); }
  .ct-table tr.is-served td { background: none; }
  .ct-table td:nth-child(1), .ct-table td:nth-child(2) { display: inline-block; width: auto; margin-right: 0.75rem; }
  .ct-table, .ct-table tbody, .ct-table tr, .ct-table td { display: block; width: 100%; }
  .ct-table tr { border-bottom: 1px solid var(--border-color); padding: 0.4rem 0; }
  .ct-table td { border: none; padding: 0.15rem 0.2rem; white-space: normal !important; }
  .ct-table td::before { content: attr(data-label) ": "; color: var(--text-dim); font-family: var(--font-sans, inherit); }
}

/* Share panel: shows the link-preview card a shared /audit/<host>/ URL unfurls with */
.share-card {
  display: grid;
  grid-template-columns: minmax(0, 300px) 1fr;
  gap: 1.25rem;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg, 14px);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.share-card-img {
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 630;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-card-subtle);
}

.share-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.share-card-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
}

.share-card-text code {
  color: var(--text-main);
  overflow-wrap: anywhere;
}

.share-btn-lg {
  font-size: 0.88rem;
  padding: 0.5rem 1rem;
}

.footer-build {
  width: 100%;
  font-size: 0.72rem;
  color: var(--text-dim);
  font-family: ui-monospace, monospace;
}

@media (max-width: 640px) {
  .share-card {
    grid-template-columns: 1fr;
  }
}

/* Result header and card parts used by templates/index.html */
.target-info { display: flex; flex-direction: column; gap: 0.45rem; min-width: 0; }
.target-host-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.port-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  padding: 0.15rem 0.55rem;
}
.result-timestamp { display: flex; align-items: center; gap: 0.35rem; }
.target-quick-stats { display: flex; gap: 0.75rem; }
.quick-stat-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.6rem 0.9rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 110px;
}
.stat-num { font-family: var(--font-mono); font-size: 1.4rem; font-weight: 800; color: var(--text-main); line-height: 1.2; }
.stat-txt { font-size: 0.72rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.04em; }

.card-header-left { display: flex; align-items: flex-start; gap: 0.75rem; }
.card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.icon-tls { background: rgba(16, 185, 129, 0.12); color: var(--primary-accent); }
.icon-rdap { background: rgba(59, 130, 246, 0.12); color: #60a5fa; }
.card-title { font-size: 1.1rem; font-weight: 700; color: var(--text-main); }

.countdown-label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  margin-bottom: 0.25rem;
}
.countdown-hours { margin-top: 0.4rem; font-size: 0.8rem; color: var(--text-muted); }
.hours-num { font-family: var(--font-mono); font-weight: 700; color: var(--text-main); margin-right: 0.25rem; }
.data-val.highlight { font-weight: 700; }
.font-normal { font-weight: 400; }

.cta-feature-icon { width: 34px; height: 34px; }
.cta-feature-text h4 { font-size: 0.95rem; color: var(--text-main); margin-bottom: 0.2rem; }
.cta-feature-text p { font-size: 0.85rem; color: var(--text-muted); }

@media (max-width: 640px) {
  .target-quick-stats { width: 100%; }
  .quick-stat-box { flex: 1; min-width: 0; }
}

/* [hidden] must win over the display rules of buttons and cards it is set on */
[hidden] { display: none !important; }

.check-error {
  max-width: 660px;
  margin: 0.75rem auto 0;
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--danger-border);
  border-radius: var(--radius-md);
  background: rgba(136, 19, 55, 0.25);
  color: var(--danger-text);
  font-size: 0.88rem;
  text-align: left;
}

/* RDAP: why a registry gave no expiry date */
.rdap-note {
  margin-top: 1rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--info-border);
  border-left: 4px solid var(--border-focus);
  border-radius: var(--radius-sm);
  background: var(--bg-card-subtle);
  color: var(--info-text);
  font-size: 0.84rem;
  line-height: 1.55;
}
.rdap-note strong { color: var(--text-main); }

/* Factual comparison with UptimeRobot */
.compare-card {
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}
.compare-title { font-size: 1.3rem; font-weight: 800; margin-bottom: 0.5rem; }
.compare-intro, .compare-foot { font-size: 0.9rem; color: var(--text-muted); line-height: 1.6; }
.compare-intro { margin-bottom: 1rem; }
.compare-foot { margin-top: 1rem; }
.compare-foot strong { color: var(--text-main); }
.compare-foot a, .compare-table td a { color: inherit; text-decoration: underline; }
.compare-table-wrap { overflow-x: auto; max-width: 100%; width: 100%; }
.compare-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; line-height: 1.5; }
.compare-table th, .compare-table td { text-align: left; vertical-align: top; padding: 0.6rem 0.7rem; border-bottom: 1px solid var(--border-color); }
.compare-table thead th { color: var(--text-dim); font-weight: 600; white-space: nowrap; }
.compare-table tbody th { font-weight: 600; color: var(--text-main); width: 24%; }
.compare-table td { color: var(--info-text); width: 38%; }
.cmp-yes { color: var(--success-text); font-weight: 700; }
.cmp-no { color: var(--text-muted); font-weight: 700; }

@media (max-width: 768px) {
  .compare-card { padding: 1.1rem; }
  .compare-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .compare-table { min-width: 520px; font-size: 0.82rem; }
  .compare-table thead th { font-size: 0.8rem; padding: 0.4rem 0.5rem; }
  .compare-table tbody th, .compare-table td { padding: 0.5rem 0.5rem; }
}

/* Link from the single check to the list check (/list) */
.list-hint {
  margin-top: 0.85rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.list-hint a {
  color: var(--primary-accent);
  font-weight: 600;
}

/* README badge box: badge preview plus Markdown and HTML snippets with copy buttons */
.badge-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg, 14px);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}
.badge-card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem; margin-bottom: 0.4rem; }
.badge-card-head .share-card-title { margin-bottom: 0; }
.badge-card-head img { display: block; height: 20px; }
.badge-snippet { margin-top: 0.7rem; }
.badge-tier { margin: 0.9rem 0 0; font-size: 0.85rem; color: var(--text-muted); }
.badge-tier a { color: var(--primary-accent); text-decoration: underline; }
.badge-tier a:hover, .badge-tier a:focus-visible { color: var(--success-text); }
.badge-snippet-head { display: flex; align-items: center; justify-content: space-between; font-size: 0.78rem; color: var(--text-dim); margin-bottom: 0.3rem; }
.badge-snippet pre {
  margin: 0;
  padding: 0.6rem 0.75rem;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.78rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--text-main);
}
.copy-btn {
  font: inherit;
  font-size: 0.78rem;
  padding: 0.25rem 0.75rem;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: var(--bg-card-subtle);
  color: var(--text-main);
  cursor: pointer;
}
.copy-btn:hover:not(:disabled) { border-color: var(--text-dim); }
.copy-btn:disabled { opacity: 0.7; cursor: default; }
#badge-status { margin-top: 0.6rem; }

/* Contact link in the cancellation/refund line under the paid button: accent green on the card, 7.0:1 */
.cancel-refund-line a { color: var(--primary-accent); text-decoration: underline; }
.cancel-refund-line a:hover, .cancel-refund-line a:focus-visible { color: var(--success-text); }

/* "Send test alert" next to the monitoring / checkout form */
.test-alert-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin-bottom: 0.25rem; }
.test-alert-row .btn-secondary { flex: 0 0 auto; }
.test-alert-result { flex: 1 1 12rem; min-width: 0; overflow-wrap: anywhere; color: var(--text-muted); }
.test-alert-result.ok { color: var(--success-text); }
.test-alert-result.err { color: var(--danger-text); }

.footer-privacy {
  display: block;
  margin-top: 0.35rem;
}

/* Contextual Monitoring CTA Banner */
.contextual-cta-banner {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.contextual-cta-info {
  flex: 1 1 auto;
}

.contextual-cta-heading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.contextual-cta-heading svg {
  color: var(--primary-accent);
  flex-shrink: 0;
}

.contextual-cta-sub {
  font-size: 0.88rem;
  color: var(--text-dim);
  margin: 0;
  line-height: 1.45;
}

.contextual-cta-action {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
}

.contextual-cta-btn {
  background: #2563eb;
  color: #fff;
  border: none;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.contextual-cta-btn:hover:not(:disabled) {
  background: #1d4ed8;
}

.contextual-cta-btn:disabled {
  background: var(--bg-surface);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  cursor: not-allowed;
  opacity: 0.8;
}

.contextual-free-link-wrap {
  display: block;
}

.contextual-free-link {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: underline;
  cursor: pointer;
  transition: color 0.15s ease;
}

.contextual-free-link:hover {
  color: var(--primary-accent);
}

/* Terminal check snippet on the web audit card */
.terminal-check-snippet {
  margin-top: 0.75rem;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.45rem 0.65rem;
  max-width: 34rem;
}

.terminal-check-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.terminal-check-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-dim);
}

.terminal-check-snippet pre {
  margin: 0;
  padding: 0.35rem 0.6rem;
  background: var(--bg-body, #0a0e17);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.78rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--primary-accent, #38ef7d);
}

@media (max-width: 768px) {
  .contextual-cta-banner {
    flex-direction: column;
    align-items: stretch;
  }
  .contextual-cta-action {
    align-items: stretch;
  }
  .contextual-cta-btn {
    width: 100%;
    justify-content: center;
  }
  .contextual-free-link-wrap {
    text-align: center;
  }
}

/* Says whether the hostnames in the monitor form fit the free plan or need Pro (app.js updatePlanFit) */
.plan-fit {
  margin: 0.6rem 0 0;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--success-border);
  background: rgba(16, 185, 129, 0.08);
  color: var(--text-main);
  font-size: 0.875rem;
  line-height: 1.5;
}

.plan-fit[hidden] {
  display: none;
}

.plan-fit.fit-pro,
.plan-fit.fit-over {
  border-color: var(--warning-border);
  background: rgba(245, 158, 11, 0.08);
}
