/* Harness only: the fake browser and the mock pages. Popup styling lives in extension/popup.css. */
* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: #e9e4dc;
  color: #2b2118;
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
}

.harness {
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px 20px 40px;
}

.intro { margin: 0 0 16px; max-width: 70ch; color: #5a4c3e; }
.intro h1 { margin: 0 0 4px; font: 600 22px Georgia, serif; color: #2b2118; }

.browser {
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 12px 40px rgba(43, 33, 24, 0.18);
}

.titlebar {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 8px 10px 0;
  background: #d6d0c7;
}
.dots { display: flex; gap: 6px; padding: 0 6px 10px; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: #b7afa3; }

.tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.tab {
  flex: 0 0 auto;
  padding: 7px 14px;
  border: 0;
  border-radius: 8px 8px 0 0;
  background: transparent;
  color: #4a4036;
  font: 13px system-ui, sans-serif;
  cursor: pointer;
  white-space: nowrap;
}
.tab:hover { background: rgba(255, 255, 255, 0.4); }
.tab[aria-selected="true"] { background: #f3f0eb; color: #1d1712; }

.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  background: #f3f0eb;
  border-bottom: 1px solid #ddd6cb;
}
.nav-btn {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: none;
  color: #6c6156;
  font-size: 15px;
  cursor: pointer;
}
.nav-btn:hover { background: #e3ddd4; }
.nav-btn:disabled { opacity: 0.4; cursor: default; background: none; }

.urlbar {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: #fff;
  font: 13px ui-monospace, Menlo, Consolas, monospace;
  color: #4a4036;
}
.urlbar #url { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lock { flex: none; width: 12px; height: 12px; color: #3f7d58; }

.ext-btn {
  position: relative;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: none;
  cursor: pointer;
}
.ext-btn:hover, .ext-btn[aria-expanded="true"] { background: #e3ddd4; }
.ext-btn svg { width: 20px; height: 20px; vertical-align: middle; }
.ext-badge {
  position: absolute;
  right: 0;
  bottom: 1px;
  min-width: 15px;
  padding: 0 3px;
  border-radius: 4px;
  background: #d9572b;
  color: #fff;
  font: 700 10px/15px system-ui, sans-serif;
}
.ext-badge[data-verdict="unclear"] { background: #b98a1e; }

.viewport { position: relative; min-height: 620px; background: #fff; }

.loading {
  position: absolute;
  inset: 0 auto auto 0;
  height: 2px;
  width: 0;
  background: #3b82f6;
}
.loading.is-on { animation: load 0.9s ease-out forwards; }
@keyframes load { to { width: 100%; } }

/* The mock site. Each sample site sets --site-accent. */
.page { --site-accent: #333; }
.site-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 16px 28px;
  background: var(--site-accent);
  color: #fff;
}
.site-head strong { font: 600 20px Georgia, serif; }
.site-head nav { font-size: 13px; opacity: 0.85; }
.site-body { max-width: 62ch; padding: 24px 28px 90px; }
.site-body h2 { margin: 0 0 6px; font: 600 26px/1.2 Georgia, serif; }
.site-body .dek { margin-top: 0; color: #6b6158; font-size: 16px; }
.site-banner {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 28px;
  background: #f6f4f0;
  border-top: 1px solid #e2ddd5;
  font-size: 13px;
  color: #555;
}

/* Simulated content-script notice: matches what content.js injects. */
.notice {
  position: absolute;
  right: 16px;
  bottom: 58px;
  max-width: 300px;
  padding: 10px 34px 10px 12px;
  border-left: 4px solid #d9572b;
  border-radius: 8px;
  background: #2b2118;
  color: #f6efe3;
  font: 13px/1.4 system-ui, sans-serif;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
}
.notice b { color: #ffb38f; }
.notice button {
  position: absolute;
  top: 6px;
  right: 6px;
  border: 0;
  background: none;
  color: inherit;
  font-size: 16px;
  cursor: pointer;
}

.popup-panel {
  position: absolute;
  top: 6px;
  right: 10px;
  z-index: 5;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.28);
}

.footnote { margin-top: 14px; font-size: 13px; color: #6b5d4f; max-width: 80ch; }
.footnote code { font-size: 12px; }

@media (max-width: 640px) {
  .harness { padding: 12px 8px; }
  .dots { display: none; }
  .nav-btn:not(#reload) { display: none; }
  .site-head, .site-body { padding-left: 16px; padding-right: 16px; }
  .popup-panel { left: 4px; right: 4px; }
  .popup-panel .gpcw-popup { width: 100%; }
}
