/* ═══════════════════════════════════════════════════════════════════════════
   style.css — Is It Down Right Now?
   Layout: 2-column (main + sidebar) matching isitdownrightnow.com structure
   Design: Modern clean white, blue panels, Inter font
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── 1. Design Tokens ────────────────────────────────────────────────────── */
:root {
  /* Colors */
  --bg:             #f0f2f5;
  --bg-page:        #e8eaed;
  --white:          #ffffff;
  --border:         #d0d5dd;
  --border-light:   #e8ecf0;

  /* Panel headers */
  --blue:           #2d7dd2;
  --blue-dark:      #1a5fa8;
  --blue-light:     #e8f2fc;
  --red:            #c0392b;
  --red-light:      #fdecea;
  --green:          #27ae60;
  --green-light:    #e8f8ee;
  --yellow:         #d4a017;
  --yellow-light:   #fdf8e1;

  /* Status */
  --status-up:      #27ae60;
  --status-up-bg:   #e8f8ee;
  --status-down:    #c0392b;
  --status-down-bg: #fdecea;
  --status-warn:    #e67e22;
  --status-warn-bg: #fef5e7;

  /* Text */
  --text:           #1a1a2e;
  --text-2:         #2d3748;
  --text-muted:     #64748b;
  --text-light:     #94a3b8;
  --link:           #2d7dd2;

  /* Misc */
  --radius:         4px;
  --radius-md:      8px;
  --shadow:         0 1px 4px rgba(0,0,0,.10), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:      0 2px 8px rgba(0,0,0,.10);
  --font:           'Inter', system-ui, -apple-system, sans-serif;
  --transition:     0.18s ease;
}

/* ── 2. Reset ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; max-width: 100%; }

.container { max-width: 1040px; margin: 0 auto; padding: 0 16px; }

/* ── 3. Utilities ─────────────────────────────────────────────────────────── */
.hidden { display: none !important; }

.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  display: inline-block;
  vertical-align: middle;
  animation: spin .6s linear infinite;
}

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

.fade-in { animation: fadeIn .3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ── 4. Header ────────────────────────────────────────────────────────────── */
.site-header {
  background: var(--white);
  border-bottom: 2px solid var(--blue);
  padding: 10px 0;
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-img {
  height: 30px;
  width: 30px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}
.logo-arrows {
  display: flex;
  flex-direction: column;
  line-height: 1;
  font-size: .8rem;
}
.arrow-up   { color: #27ae60; font-size: 1rem; }
.arrow-down { color: #c0392b; font-size: 1rem; }
.logo-wordmark {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.02em;
}
.logo-gray { color: #666; font-weight: 400; }

.header-tagline {
  font-size: .9rem;
  font-weight: 400;
  color: var(--text-muted);
  border-left: 1px solid var(--border);
  padding-left: 20px;
  margin: 0;
}

/* ── 5. Page Layout (2-column) ───────────────────────────────────────────── */
.page-body { padding: 18px 0 40px; }

.page-layout {
  display: grid;
  grid-template-columns: 1fr 268px;
  gap: 18px;
  align-items: start;
}

/* ── 6. Panel Cards ──────────────────────────────────────────────────────── */
.panel-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  overflow: hidden;
}
.panel-card:last-child { margin-bottom: 0; }

.panel-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  font-size: .875rem;
  font-weight: 700;
  color: #fff;
  border-radius: var(--radius) var(--radius) 0 0;
}
.panel-icon { font-size: 1rem; }
.panel-blue   { background: linear-gradient(90deg, var(--blue) 0%, var(--blue-dark) 100%); }
.panel-red    { background: linear-gradient(90deg, var(--red) 0%, #a93226 100%); }
.panel-green  { background: linear-gradient(90deg, var(--green) 0%, #1e8449 100%); }
.panel-yellow { background: linear-gradient(90deg, var(--yellow) 0%, #b8860b 100%); }

.panel-body { padding: 16px 18px; }
.panel-body.compact { padding: 10px 14px; }

/* ── 7. Search Form ──────────────────────────────────────────────────────── */
.search-intro {
  color: var(--text-muted);
  font-size: .85rem;
  line-height: 1.65;
  margin-bottom: 14px;
}
.search-prompt {
  font-size: .875rem;
  margin-bottom: 10px;
  color: var(--text-2);
}
.search-form { width: 100%; }
.search-row {
  display: flex;
  gap: 0;
  border: 2px solid var(--blue);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(45,125,210,.15);
  transition: box-shadow var(--transition);
}
.search-row:focus-within {
  box-shadow: 0 0 0 3px rgba(45,125,210,.2), 0 2px 8px rgba(45,125,210,.15);
}
.search-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 11px 14px;
  font-family: var(--font);
  font-size: .95rem;
  color: var(--text);
  background: #fff;
}
.search-input::placeholder { color: #aaa; }
.search-btn {
  background: var(--blue);
  color: #fff;
  border: none;
  padding: 0 26px;
  font-family: var(--font);
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: .04em;
  transition: background var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}
.search-btn:hover { background: var(--blue-dark); }

/* ── 8. Top Websites Grid ────────────────────────────────────────────────── */
.top-websites-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 0;
}
.top-site-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: background var(--transition);
}
.top-site-item:nth-child(odd)  { border-right: 1px solid var(--border-light); }
.top-site-item:last-child,
.top-site-item:nth-last-child(2):nth-child(odd) { border-bottom: none; }
.top-site-item:hover { background: var(--blue-light); }

.status-dot {
  width: 12px; height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
  margin-top: 3px;
  transition: background var(--transition);
}
.dot-up      { background: var(--status-up); }
.dot-down    { background: var(--status-down); }
.dot-warn    { background: var(--status-warn); }
.dot-loading { background: #ccc; animation: pulse-bg 1.2s ease-in-out infinite; }

@keyframes pulse-bg {
  0%, 100% { background: #ccc; }
  50%       { background: #aaa; }
}

.top-site-info { display: flex; flex-direction: column; min-width: 0; }
.top-site-name  { font-weight: 700; font-size: .875rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-site-status { font-size: .78rem; color: var(--text-muted); }
.top-site-status .status-up-text   { color: var(--status-up); }
.top-site-status .status-down-text { color: var(--status-down); }

/* ── 9. Result Search Bar ────────────────────────────────────────────────── */
.result-search-bar { margin-bottom: 14px; }

/* ── 10. Status Card ─────────────────────────────────────────────────────── */
.status-card-body { padding: 16px 18px 10px; }

.status-layout {
  display: flex;
  gap: 20px;
  margin-bottom: 14px;
}

/* Screenshot box */
.site-screenshot-box {
  width: 130px;
  height: 100px;
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
  position: relative;
}
.site-screenshot-box img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.screenshot-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 6px;
  font-size: .72rem;
  color: var(--text-muted);
  text-align: center;
}
.screenshot-icon { font-size: 1.6rem; }

/* Status info table */
.status-info-table {
  flex: 1;
  border-collapse: collapse;
  font-size: .875rem;
}
.status-info-table tr { border-bottom: 1px solid var(--border-light); }
.status-info-table tr:last-child { border-bottom: none; }
.info-label {
  padding: 6px 14px 6px 0;
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
  vertical-align: top;
  width: 140px;
}
.info-value {
  padding: 6px 0;
  color: var(--text);
  font-weight: 500;
}

/* Verdict row */
.verdict-row {
  margin: 12px 0;
  font-size: .9rem;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
}
.verdict-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .78rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 3px;
  letter-spacing: .03em;
  white-space: nowrap;
  flex-shrink: 0;
}
.verdict-badge.up   { background: var(--status-up); color: #fff; }
.verdict-badge.down { background: var(--status-down); color: #fff; }
.verdict-text { color: var(--text-2); font-size: .875rem; }
.verdict-text strong { color: var(--text); }

/* Card action buttons */
.card-actions {
  display: flex;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
  flex-wrap: wrap;
}
.btn-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-comments { background: var(--blue);      color: #fff; }
.btn-comments:hover { background: var(--blue-dark); }
.btn-report   { background: #6c757d;            color: #fff; }
.btn-report:hover { background: #545b62; }
.btn-recheck  { background: var(--status-up);  color: #fff; }
.btn-recheck:hover { background: #1e8449; }
.btn-share    { background: #6f42c1;            color: #fff; }
.btn-share:hover { background: #5a32a3; }

/* ── 11. Down Forever Warning ────────────────────────────────────────────── */
.down-forever-box {
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-left: 4px solid #e67e22;
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: .875rem;
  color: #856404;
  margin-bottom: 16px;
  line-height: 1.6;
}

/* ── 12. History Chart (Blue Bars) ───────────────────────────────────────── */
.chart-wrap {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 12px 8px;
  margin-bottom: 12px;
  overflow-x: auto;
}

/* The chart itself */
.chart-canvas {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 120px;
  position: relative;
}

/* Y-axis labels */
.chart-y-axis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  padding-right: 6px;
  height: 120px;
  min-width: 40px;
}
.chart-y-label {
  font-size: .65rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Bar columns */
.chart-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  position: relative;
  cursor: pointer;
}
.chart-bar-col:hover .chart-tooltip { display: block; }

.chart-bar {
  width: 100%;
  min-width: 16px;
  border-radius: 2px 2px 0 0;
  transition: opacity .2s;
}
.chart-bar.bar-up   { background: linear-gradient(180deg, #5dade2 0%, var(--blue) 100%); }
.chart-bar.bar-down { background: linear-gradient(180deg, #ec7063 0%, var(--red) 100%); }
.chart-bar.bar-empty { background: #e0e0e0; }

.chart-bar-col:hover .chart-bar { opacity: .8; }

.chart-x-label {
  font-size: .6rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.3;
  white-space: nowrap;
}

/* Tooltip on hover */
.chart-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: #fff;
  font-size: .68rem;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
  z-index: 20;
  pointer-events: none;
}
.chart-tooltip::after {
  content: '';
  position: absolute;
  top: 100%; left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: var(--text);
}

.chart-title {
  text-align: center;
  font-size: .78rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 600;
}

.chart-desc {
  font-size: .8rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 16px;
}
.chart-loading-msg {
  color: var(--text-muted);
  font-size: .85rem;
  padding: 20px;
  text-align: center;
}

/* ── 13. History Table ───────────────────────────────────────────────────── */
.history-table-title {
  font-size: .82rem;
  font-weight: 700;
  color: var(--text-2);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.history-table-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 8px;
}
.history-col {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.history-col-header {
  display: grid;
  grid-template-columns: 100px 52px 1fr;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 5px 8px;
  font-size: .72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.history-row {
  display: grid;
  grid-template-columns: 100px 52px 1fr;
  padding: 5px 8px;
  border-bottom: 1px solid var(--border-light);
  font-size: .78rem;
  transition: background var(--transition);
  align-items: center;
}
.history-row:last-child { border-bottom: none; }
.history-row:hover { background: var(--blue-light); }
.history-row .row-date  { color: var(--text-2); font-weight: 500; }
.history-row .row-time  { color: var(--text-muted); }
.history-row .row-ping  { color: var(--text); font-weight: 600; }
.history-row .row-check { font-size: .9rem; }
.check-up   { color: var(--status-up); }
.check-down { color: var(--status-down); }

.timezone-note {
  font-size: .72rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 6px;
}

/* ── 14. Location Grid ───────────────────────────────────────────────────── */
.locations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.location-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  font-size: .8rem;
}
.loc-dot {
  width: 9px; height: 9px;
  border-radius: 2px;
  flex-shrink: 0;
}
.loc-dot.up   { background: var(--status-up); }
.loc-dot.down { background: var(--status-down); }
.loc-name { font-weight: 600; color: var(--text-2); flex: 1; }
.loc-ms   { font-size: .72rem; color: var(--text-muted); }

/* ── 15. Troubleshooting ─────────────────────────────────────────────────── */
.troubleshoot-section { font-size: .875rem; }
.troubleshoot-section h4 {
  font-size: .875rem;
  font-weight: 700;
  color: var(--text);
  margin: 16px 0 8px;
}
.troubleshoot-section h4:first-child { margin-top: 0; }
.troubleshoot-section p {
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 8px;
}
.troubleshoot-section ul {
  list-style: disc;
  padding-left: 20px;
  color: var(--text-muted);
  line-height: 1.75;
}
.troubleshoot-section li { margin-bottom: 4px; }
.troubleshoot-section code {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 5px;
  font-size: .82rem;
  font-family: 'Courier New', monospace;
  color: var(--text-2);
}

/* ── 16. Comments ────────────────────────────────────────────────────────── */
.comments-intro {
  font-size: .875rem;
  color: var(--text-muted);
  margin-bottom: 14px;
  line-height: 1.65;
}
.comment-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.comment-textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-family: var(--font);
  font-size: .875rem;
  color: var(--text);
  resize: vertical;
  transition: border-color var(--transition);
  background: var(--bg);
}
.comment-textarea:focus {
  outline: none;
  border-color: var(--blue);
  background: #fff;
}

/* ── 17. Bulk Checker ────────────────────────────────────────────────────── */
.bulk-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.bulk-textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-family: 'Courier New', monospace;
  font-size: .82rem;
  color: var(--text);
  background: var(--bg);
  resize: vertical;
  transition: border-color var(--transition);
}
.bulk-textarea:focus {
  outline: none;
  border-color: var(--blue);
  background: #fff;
}
.bulk-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.bulk-count {
  font-size: .78rem;
  color: var(--text-muted);
  margin-left: auto;
}
.bulk-results {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-height: 220px;
  overflow-y: auto;
  font-size: .82rem;
}
.bulk-placeholder {
  padding: 20px;
  text-align: center;
  color: var(--text-muted);
}
.bulk-result-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: background var(--transition);
}
.bulk-result-row:last-child { border-bottom: none; }
.bulk-result-row:hover { background: var(--blue-light); }
.bulk-result-domain { flex: 1; font-weight: 600; color: var(--text); font-size: .82rem; }
.bulk-result-ms     { font-size: .75rem; color: var(--text-muted); }
.bulk-badge {
  font-size: .68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 3px;
  white-space: nowrap;
}
.bulk-badge.up   { background: var(--status-up);   color: #fff; }
.bulk-badge.down { background: var(--status-down); color: #fff; }

/* ── 18. Sidebar ─────────────────────────────────────────────────────────── */
.sidebar-col .panel-card { margin-bottom: 14px; }

.sidebar-text {
  font-size: .82rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 8px;
}

.bookmarklet-link {
  display: inline-block;
  background: var(--blue);
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: var(--radius);
  margin-top: 6px;
  cursor: grab;
  user-select: none;
  transition: all var(--transition);
  text-decoration: none;
  border: 2px dashed rgba(255,255,255,.4);
}
.bookmarklet-link:hover {
  background: var(--blue-dark);
  transform: translateY(-1px);
  text-decoration: none;
}

.sidebar-list-body { padding: 6px 0; }
.sidebar-list-item {
  padding: 8px 14px;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: background var(--transition);
}
.sidebar-list-item:last-child { border-bottom: none; }
.sidebar-list-item:hover { background: var(--blue-light); }

.sidebar-item-name {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: .82rem;
  font-weight: 700;
  color: var(--link);
  margin-bottom: 2px;
}
.sidebar-item-name .sdot {
  width: 9px; height: 9px;
  border-radius: 2px;
  flex-shrink: 0;
}
.sdot.up   { background: var(--status-up); }
.sdot.down { background: var(--status-down); }
.sdot.warn { background: var(--status-warn); }

.sidebar-item-status {
  font-size: .75rem;
  color: var(--text-muted);
  padding-left: 16px;
}

.sidebar-loading {
  padding: 14px;
  text-align: center;
  color: var(--text-muted);
  font-size: .82rem;
}

/* ── 19. Toast ───────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--text);
  color: #fff;
  padding: 10px 22px;
  border-radius: 20px;
  font-size: .85rem;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  white-space: nowrap;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast.success { background: var(--status-up); }
.toast.error   { background: var(--status-down); }

/* ── 20. Footer ──────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 20px 0;
  text-align: center;
}
.footer-text {
  font-size: .8rem;
  color: var(--text-muted);
  max-width: 760px;
  margin: 0 auto 6px;
  line-height: 1.65;
}
.footer-copy {
  font-size: .75rem;
  color: #94a3b8;
}

/* ── 20b. SEO Content / FAQ ──────────────────────────────────────────────── */
.seo-content h2 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 18px 0 8px;
}
.seo-content h2:first-child { margin-top: 0; }
.seo-content h3 {
  font-size: .9rem;
  font-weight: 700;
  color: var(--text-2);
  margin: 14px 0 4px;
}
.seo-content p {
  font-size: .875rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 10px;
}
.seo-content .seo-list {
  list-style: disc;
  padding-left: 20px;
  color: var(--text-muted);
  font-size: .875rem;
  line-height: 1.75;
  margin-bottom: 10px;
}
.seo-content .seo-list li { margin-bottom: 4px; }
.seo-content strong { color: var(--text-2); }

/* ── 20c. Star Rating ────────────────────────────────────────────────────── */
.rating-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 10px 0 4px;
  padding: 10px 0;
  border-top: 1px solid var(--border-light);
}
.rating-label { font-size: .82rem; font-weight: 600; color: var(--text-2); }
.rating-stars { display: inline-flex; gap: 2px; }
.rating-stars .star {
  font-size: 1.25rem;
  line-height: 1;
  color: #d0d5dd;
  cursor: pointer;
  transition: color .12s, transform .12s;
}
.rating-stars .star:hover { transform: scale(1.15); }
.rating-stars .star.filled { color: #f5b301; }
.rating-summary { font-size: .78rem; color: var(--text-muted); }

/* ── 20d. Comments / Reports ─────────────────────────────────────────────── */
.comment-name-input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 12px;
  font-family: var(--font);
  font-size: .875rem;
  color: var(--text);
  background: var(--bg);
  transition: border-color var(--transition);
}
.comment-name-input:focus { outline: none; border-color: var(--blue); background: #fff; }

.comments-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 0 10px;
}
.comments-count { font-size: .75rem; color: var(--text-muted); }
.comments-list { display: flex; flex-direction: column; gap: 10px; }
.comments-empty {
  padding: 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: .82rem;
  background: var(--bg);
  border-radius: var(--radius);
}
.comment-item {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
}
.comment-avatar {
  width: 32px; height: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
  color: #fff;
  font-weight: 700;
  font-size: .9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.comment-body { flex: 1; min-width: 0; }
.comment-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 3px;
}
.comment-name { font-weight: 700; font-size: .82rem; color: var(--text); }
.comment-loc  { font-size: .72rem; color: var(--text-muted); }
.comment-time { font-size: .72rem; color: var(--text-light); margin-left: auto; }
.comment-text { font-size: .82rem; color: var(--text-2); line-height: 1.55; word-wrap: break-word; }

/* ── 20e. Related Sites ──────────────────────────────────────────────────── */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}
.related-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition);
}
.related-item:hover { background: var(--blue-light); }
.related-name { flex: 1; font-weight: 600; font-size: .82rem; color: var(--link); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.related-status { font-size: .72rem; color: var(--text-muted); }

/* ── 20f. Contact Form ───────────────────────────────────────────────────── */
.contact-form { display: flex; flex-direction: column; gap: 10px; max-width: 520px; }
.contact-input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-family: var(--font);
  font-size: .875rem;
  color: var(--text);
  background: var(--bg);
  transition: border-color var(--transition);
}
.contact-input:focus { outline: none; border-color: var(--blue); background: #fff; }
.contact-form .btn-action { align-self: flex-start; }
.contact-success {
  padding: 12px 16px;
  background: var(--status-up-bg);
  border: 1px solid var(--status-up);
  border-radius: var(--radius);
  color: #1e7e4b;
  font-size: .9rem;
}
.contact-error {
  padding: 8px 12px;
  background: var(--status-down-bg);
  border: 1px solid var(--status-down);
  border-radius: var(--radius);
  color: var(--status-down);
  font-size: .85rem;
  margin-bottom: 10px;
}

/* ── 20g. Footer Nav ─────────────────────────────────────────────────────── */
.footer-nav {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.footer-nav a {
  font-size: .82rem;
  font-weight: 600;
  color: var(--link);
}

/* ── 21. Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 820px) {
  .page-layout { grid-template-columns: 1fr; }
  .sidebar-col { order: -1; }
  .sidebar-col .panel-card { display: none; }
  .sidebar-col .panel-card:first-child { display: block; } /* show bookmarklet */
  .history-table-wrap { grid-template-columns: 1fr; }
  .bulk-layout { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .top-websites-grid { grid-template-columns: 1fr; }
  .top-site-item { border-right: none !important; }
  .header-tagline { display: none; }
  .status-layout { flex-direction: column; }
  .site-screenshot-box { width: 100%; height: 80px; }
  .locations-grid { grid-template-columns: 1fr 1fr; }
}
