:root {
  --bg-top: #efe3d0;
  --bg-bottom: #dce9e4;
  --panel: rgba(255, 251, 245, 0.88);
  --panel-strong: #fffdf9;
  --border: rgba(79, 64, 47, 0.14);
  --text: #2f2924;
  --muted: #6b6157;
  --accent: #0f766e;
  --accent-soft: rgba(15, 118, 110, 0.12);
  --answer: #eef9f5;
  --danger: #b42318;
  --warn: #b45309;
  --shadow: 0 18px 40px rgba(44, 35, 25, 0.09);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.75), transparent 38%),
    radial-gradient(circle at bottom right, rgba(15, 118, 110, 0.16), transparent 30%),
    linear-gradient(160deg, var(--bg-top), var(--bg-bottom));
}

.shell {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 42px;
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.hero-actions {
  display: grid;
  justify-items: end;
  gap: 10px;
}

.viewer-capture-button {
  border: 0;
  border-radius: 999px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #0f766e, #115e59);
  color: #fff;
  font: 700 13px/1 "Segoe UI", Arial, sans-serif;
  box-shadow: 0 16px 28px rgba(15, 118, 110, 0.24);
  cursor: pointer;
  transition: transform 0.18s ease, opacity 0.18s ease, box-shadow 0.18s ease;
}

.viewer-capture-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(15, 118, 110, 0.3);
}

.viewer-capture-button:disabled {
  opacity: 0.88;
  cursor: wait;
  transform: none;
}

.viewer-capture-status {
  margin: 0;
  max-width: 240px;
  text-align: right;
  color: var(--muted);
  font: 500 11px/1.45 "Segoe UI", Arial, sans-serif;
}

.eyebrow {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
  color: var(--muted);
}

h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 0.98;
}

.meta {
  margin: 12px 0 0;
  font-size: 14px;
  color: var(--muted);
}

.connection-pill {
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

.connection-pill.warn {
  color: var(--warn);
}

.connection-pill.error {
  color: var(--danger);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.stat-card,
.page-card {
  background: var(--panel);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.stat-card {
  padding: 16px 18px;
}

.stat-label {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.stat-card strong {
  font-size: 28px;
}

.feed {
  display: grid;
  gap: 18px;
}

.answer-card {
  padding: 18px;
  background: var(--panel);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.answer-card-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.answer-title {
  margin: 0;
  font-size: 24px;
}

.answer-link {
  margin-top: 6px;
  display: inline-block;
  font-size: 13px;
  color: var(--accent);
  word-break: break-word;
}

.answer-badge {
  white-space: nowrap;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.62);
  border-radius: 999px;
  animation: fadeUp 0.35s ease;
}

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

.block {
  padding: 14px;
  border-radius: 18px;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.6;
  font-size: 15px;
}

.answer {
  background: var(--answer);
}

.answer.error {
  background: rgba(180, 35, 24, 0.08);
}

.screenshot-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.52), rgba(255, 255, 255, 0)),
    var(--panel);
}

.media-link {
  display: block;
  text-decoration: none;
}

.screenshot-image {
  display: block;
  width: 100%;
  border-radius: 18px;
  border: 1px solid rgba(79, 64, 47, 0.14);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 24px rgba(44, 35, 25, 0.08);
}

.entry-meta {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.empty-state {
  border: 1px dashed rgba(79, 64, 47, 0.28);
  border-radius: 22px;
  padding: 28px 20px;
  background: rgba(255, 255, 255, 0.58);
  text-align: center;
  color: var(--muted);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 780px) {
  .shell {
    width: min(100% - 18px, 1160px);
    padding-top: 18px;
  }

  .hero,
  .answer-card-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-actions {
    justify-items: start;
  }

  .viewer-capture-status {
    text-align: left;
  }

  .stats {
    grid-template-columns: 1fr;
  }
}
