/* ── Result page specific styles ────────────────────────────────────────── */

/* ── Page hero ───────────────────────────────────────────────────────────── */
.result-page-hero {
  padding: 32px 0 0;
}

/* ── Tool badge ──────────────────────────────────────────────────────────── */
.result-tool-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-lg);
  font-size: var(--fs-2xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: var(--accent-glow-12);
  border: 1px solid var(--accent-glow-25);
  color: var(--accent);
  margin-bottom: 16px;
}

/* ── Meta card ───────────────────────────────────────────────────────────── */
.result-meta-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.result-meta-url {
  font-family: var(--mono);
  font-size: var(--fs-14);
  color: var(--accent);
  word-break: break-all;
  font-weight: 500;
}
.result-meta-url a {
  color: inherit;
  text-decoration: none;
}
.result-meta-url a:hover {
  text-decoration: underline;
}
.result-meta-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.result-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-xs);
  color: var(--muted2);
}
.result-meta-item strong {
  color: var(--text);
  font-weight: 500;
}

/* ── Share bar ───────────────────────────────────────────────────────────── */
.result-share-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 16px 20px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 24px;
}
.result-share-label {
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin-right: 4px;
}
.result-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-xs);
  font-size: 12.5px;
  font-weight: 500;
  font-family: var(--sans);
  cursor: pointer;
  transition: all .2s;
  border: 1px solid var(--border2);
  background: var(--surface);
  color: var(--muted2);
  text-decoration: none;
}
.result-share-btn:hover {
  color: var(--text);
  border-color: var(--accent);
  background: var(--accent-glow-08);
}
.result-share-btn.copy-link-btn {
  background: var(--accent-glow-08);
  border-color: var(--accent-glow-30);
  color: var(--accent);
}
.result-share-btn.copy-link-btn:hover {
  background: var(--accent-glow-15);
}
.result-share-btn.telegram-btn {
  background: var(--border0);
  border-color: var(--accent-glow-25);
  color: var(--cyan);
}
.result-share-btn.telegram-btn:hover {
  background: var(--accent-glow-12);
  border-color: var(--accent-glow-30);
}
.result-share-url-input {
  flex: 1;
  min-width: 200px;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-xs);
  padding: 8px 12px;
  color: var(--muted2);
  font-family: var(--mono);
  font-size: var(--fs-xs);
  outline: none;
  cursor: text;
}
.result-share-url-input:focus {
  border-color: var(--accent);
}

/* ── Action buttons ──────────────────────────────────────────────────────── */
.result-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.result-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  font-family: var(--sans);
  text-decoration: none;
  transition: all .2s;
  border: 1px solid transparent;
}
.result-action-btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: var(--white);
  border-color: transparent;
}
.result-action-btn.primary:hover {
  opacity: .88;
}
.result-action-btn.secondary {
  background: var(--surface2);
  border-color: var(--border2);
  color: var(--muted2);
}
.result-action-btn.secondary:hover {
  color: var(--text);
  border-color: var(--accent);
}

/* ── Result data section ─────────────────────────────────────────────────── */
.result-data-section {
  margin-bottom: 32px;
}
.result-data-section h2 {
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin-bottom: 12px;
}

/* ── JSON viewer card ────────────────────────────────────────────────────── */
.json-result-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.json-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
}
.json-result-header span {
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
}
.json-result-pre {
  padding: 16px 20px;
  margin: 0;
  font-family: var(--mono);
  font-size: var(--fs-xs);
  line-height: 1.65;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 600px;
  overflow-y: auto;
  background: transparent;
}

/* ── Views counter ───────────────────────────────────────────────────────── */
.result-views {
  font-size: var(--fs-2xs);
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .result-meta-card {
    padding: 16px;
  }
  .result-share-bar {
    padding: 12px 14px;
  }
  .result-share-url-input {
    min-width: 100%;
  }
  .result-actions {
    flex-direction: column;
  }
  .result-action-btn {
    justify-content: center;
  }
}

/* ── Bot help popover (robots result panel) ─────────────────────────────── */
.bot-help-btn {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--border);
  border: 1px solid var(--border2);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 1;
  padding: 0;
  transition: background .15s, color .15s, border-color .15s;
}
.bot-help-btn:hover {
  background: var(--accent-glow-20);
  color: var(--accent);
  border-color: var(--accent);
}
.bot-popover {
  position: fixed;
  z-index: var(--z-tooltip);
  background: var(--surface3, var(--surface2));
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 8px 32px var(--black-60), 0 2px 8px var(--black-30);
  width: 300px;
}
.bot-pop-close {
  position: absolute;
  top: 10px; right: 12px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  padding: 2px;
  transition: color .15s;
}
.bot-pop-close:hover { color: var(--text); }
.bot-pop-title {
  font-weight: 700;
  font-size: var(--fs-14);
  margin-bottom: 6px;
  padding-right: 24px;
  color: var(--text);
}
.bot-pop-ua {
  font-family: var(--mono);
  font-size: var(--fs-2xs);
  background: var(--accent-glow-12);
  padding: 1px 6px;
  border-radius: var(--radius-xs);
  font-weight: 400;
  color: var(--accent);
}
.bot-pop-hint-lbl {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--muted);
  margin-bottom: 6px;
  font-weight: 600;
}
.bot-pop-code {
  margin: 0;
  padding: 10px 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--mono);
  font-size: var(--fs-2xs);
  color: var(--text);
  white-space: pre;
  line-height: 1.6;
  overflow-x: auto;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Result page utility classes — replaces inline styles
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Flex ──────────────────────────────────────────────────────────────── */
.r-flex          { display: flex; align-items: center; gap: 10px; }
.r-flex-md       { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.r-flex-lg       { display: flex; align-items: center; gap: 20px; margin-bottom: 20px; flex-wrap: wrap; }
.r-flex-wrap     { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.r-flex-wrap6    { display: flex; flex-wrap: wrap; gap: 6px; }
.r-flex-between  { display: flex; align-items: center; justify-content: space-between; }
.r-flex-center   { display: flex; align-items: center; justify-content: center; }
.r-flex-col      { display: flex; flex-direction: column; gap: 8px; }
.r-flex-grow     { flex: 1; min-width: 0; }
.r-flex-grow-200 { flex: 1; min-width: 200px; }
.r-flex-shrink0  { flex-shrink: 0; }

/* ── Grid ──────────────────────────────────────────────────────────────── */
.r-grid-3   { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.r-grid-2   { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.r-grid-140 { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 16px; }
.r-grid-180 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.r-grid-260 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin-bottom: 16px; }

/* ── Typography ────────────────────────────────────────────────────────── */
.r-text-xxl  { font-size: 64px; font-weight: 700; font-family: var(--mono); line-height: 1; margin-bottom: 8px; }
.r-text-xl   { font-size: 56px; font-weight: 800; font-family: var(--mono); line-height: 1; }
.r-text-28   { font-size: 28px; font-weight: 800; }
.r-text-28b  { font-size: 28px; font-weight: 700; margin-top: 4px; }
.r-text-24   { font-size: 24px; margin-bottom: 4px; }
.r-text-18   { font-size: 18px; }
.r-text-18b  { font-size: 18px; font-weight: 600; margin-bottom: 12px; }
.r-text-18bd { font-size: 18px; font-weight: 700; }
.r-text-16   { font-size: 16px; margin-bottom: 12px; }
.r-text-14   { font-size: var(--fs-14); }
.r-text-14b  { font-size: var(--fs-14); font-weight: 600; }
.r-text-14mb { font-size: var(--fs-14); font-weight: 600; margin-bottom: 2px; }
.r-text-13   { font-size: var(--fs-sm); }
.r-text-13b  { font-size: var(--fs-sm); font-weight: 600; }
.r-text-12   { font-size: var(--fs-xs); }
.r-text-12b  { font-size: var(--fs-xs); font-weight: 500; }
.r-text-11   { font-size: var(--fs-2xs); }
.r-mono      { font-family: var(--mono); }
.r-mono-13   { font-family: var(--mono); font-size: var(--fs-sm); }
.r-mono-12   { font-family: var(--mono); font-size: var(--fs-xs); }
.r-ellipsis  { font-size: var(--fs-sm); font-family: var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r-nowrap    { white-space: nowrap; }
.r-break-all { word-break: break-all; }
.r-pre-wrap  { white-space: pre-wrap; }

/* ── Colors ────────────────────────────────────────────────────────────── */
.r-accent    { color: var(--accent); }
.r-accent-b  { color: var(--accent); font-weight: 600; }
.r-green     { color: var(--green); }
.r-green-b   { color: var(--green); font-weight: 800; font-size: 28px; }
.r-red       { color: var(--red); }
.r-red-b     { color: var(--red); font-weight: 800; font-size: 28px; }
.r-muted     { color: var(--muted); }
.r-muted2    { color: var(--muted2); }
.r-muted2-sm { color: var(--muted2); font-size: var(--fs-sm); }
.r-muted2-xs { color: var(--muted2); font-size: var(--fs-xs); }
.r-text-c    { color: var(--text); }
.r-yellow    { color: var(--yellow); }

/* ── Spacing ───────────────────────────────────────────────────────────── */
.r-mb4  { margin-bottom: 4px; }
.r-mb8  { margin-bottom: 8px; }
.r-mb12 { margin-bottom: 12px; }
.r-mb16 { margin-bottom: 16px; }
.r-mb20 { margin-bottom: 20px; }
.r-mt4  { margin-top: 4px; }
.r-mt8  { margin-top: 8px; }
.r-mt10 { margin-top: 10px; }
.r-mt12 { margin-top: 12px; }
.r-mt16 { margin-top: 16px; }
.r-ml-auto { margin-left: auto; }
.r-p8   { padding: 8px; }
.r-p12  { padding: 12px; }
.r-p14  { padding: 14px; }
.r-p20  { padding: 20px; }
.r-px16 { padding-left: 16px; padding-right: 16px; }
.r-py8  { padding-top: 8px; padding-bottom: 8px; }
.r-p-sm { padding: 8px 12px; }
.r-p-md { padding: 12px 16px; }
.r-p-lg { padding: 14px 16px; }

/* ── Borders ───────────────────────────────────────────────────────────── */
.r-border-b  { border-bottom: 1px solid var(--border); }
.r-border-t  { border-top: 1px solid var(--border); }

/* ── Cards / Containers ────────────────────────────────────────────────── */
.r-card         { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.r-card-center  { text-align: center; padding: 14px 20px; flex: 1; }
.r-card-center-lg { text-align: center; padding: 20px 32px; flex: 0 0 auto; }
.r-card-nopad   { padding: 0; overflow: hidden; }
.r-card-nopad-mb { padding: 0; margin-bottom: 12px; overflow: hidden; }
.r-section-empty { text-align: center; padding: 60px 20px; }

/* ── Code blocks ───────────────────────────────────────────────────────── */
.r-pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  font-size: var(--fs-xs);
  font-family: var(--mono);
  overflow-x: auto;
  white-space: pre-wrap;
  margin-top: 8px;
  color: var(--text);
  line-height: 1.6;
}
.r-pre-v2 {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: var(--fs-xs);
  font-family: var(--mono);
  overflow-x: auto;
  white-space: pre-wrap;
  margin-bottom: 10px;
  color: var(--text);
  line-height: 1.6;
}

/* ── Tables ────────────────────────────────────────────────────────────── */
.r-table       { width: 100%; border-collapse: collapse; }
.r-th          { text-align: left; padding: 8px 12px; color: var(--muted); font-size: var(--fs-xs); }
.r-th-w140     { text-align: left; padding: 8px 12px; color: var(--muted); font-size: var(--fs-xs); width: 140px; }
.r-th-w120     { text-align: left; padding: 6px 12px; color: var(--muted); font-size: var(--fs-xs); width: 120px; }
.r-td          { padding: 8px 12px; }
.r-td-center   { padding: 8px 12px; text-align: center; }
.r-td-mono     { padding: 8px 12px; font-family: var(--mono); font-size: var(--fs-sm); }
.r-td-mono-sm  { padding: 8px 12px; font-family: var(--mono); font-size: var(--fs-xs); color: var(--muted2); word-break: break-all; }
.r-td-muted    { padding: 8px 12px; color: var(--muted); font-size: var(--fs-xs); width: 80px; }
.r-tr          { border-top: 1px solid var(--border); }

/* ── Row items ─────────────────────────────────────────────────────────── */
.r-row         { padding: 0 16px; border-bottom: 1px solid var(--border); }
.r-row-md      { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.r-row-flex    { padding: 10px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: flex-start; gap: 10px; }
.r-row-flex-c  { padding: 8px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 8px; }
.r-row-mono    { padding: 8px 16px; border-bottom: 1px solid var(--border); font-family: var(--mono); font-size: var(--fs-sm); }
.r-row-header  { padding: 12px 16px; font-weight: 600; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.r-row-header--danger  { color: var(--red); }
.r-row-header--warning { color: var(--yellow, var(--orange)); }

/* ── Badges / Dots ─────────────────────────────────────────────────────── */
.r-dot         { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; }
.r-dot-green   { background: var(--success); }
.r-dot-yellow  { background: var(--yellow); }
.r-dot-muted   { background: var(--border2); border: 1px solid var(--border); }
.r-badge       { display: inline-block; margin: 2px 4px 2px 0; padding: var(--badge-padding-sm); background: var(--accent-glow-10); border-radius: var(--radius-xs); font-size: var(--fs-xs); font-family: var(--mono); }
.r-tag-red     { display: inline-flex; align-items: center; gap: 4px; padding: var(--badge-padding-md); border-radius: var(--radius-xs); font-size: var(--fs-xs); font-weight: 600; color: var(--red); background: var(--status-fail-bg); }
.r-tag-mono-red { display: inline-flex; align-items: center; gap: 4px; padding: var(--badge-padding-md); border-radius: var(--radius-xs); font-family: var(--mono); font-weight: 700; font-size: var(--fs-14); color: var(--red); background: var(--status-fail-bg); }
.r-step-num    { min-width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--surface); font-size: var(--fs-xs); font-weight: 700; color: var(--muted); flex-shrink: 0; }
.r-step-num--err { background: var(--status-fail-bg); color: var(--red); }

/* ── Buttons / Links ───────────────────────────────────────────────────── */
.r-btn-hero    { display: inline-flex; align-items: center; gap: 6px; padding: 10px 24px; background: linear-gradient(135deg, var(--accent), var(--accent2)); color: var(--white); border-radius: var(--radius-sm); font-weight: 600; font-size: var(--fs-14); text-decoration: none; }
.r-clickable   { cursor: pointer; font-size: var(--fs-14); font-weight: 600; list-style: none; display: flex; align-items: center; gap: 8px; }
.r-clickable--accent { color: var(--accent); }
.r-clickable--red    { color: var(--red); }
.r-clickable--yellow { color: var(--yellow); }
.r-cursor-label { cursor: pointer; color: var(--muted2); padding: 2px 0; user-select: none; font-size: var(--fs-sm); }

/* ── Progress bars ─────────────────────────────────────────────────────── */
.r-progress-wrap { flex: 1; height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.r-progress-fill { height: 100%; background: var(--accent); border-radius: 2px; }

/* ── Misc ──────────────────────────────────────────────────────────────── */
.r-tc           { text-align: center; }
.r-w100         { width: 100%; }
.r-min70        { min-width: 70px; color: var(--muted2); }
.r-min72        { min-width: 72px; display: inline-block; }
.r-float-right  { float: right; font-size: var(--fs-2xs); color: var(--muted); display: flex; gap: 12px; align-items: center; }
.r-list-indent  { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.r-indent-note  { padding: 0 16px 8px 56px; font-size: var(--fs-xs); }
.r-indent-mono  { padding: 0 16px 10px 56px; font-size: var(--fs-xs); color: var(--red); font-family: var(--mono); }
.r-warn-card    { border-color: var(--status-warn-border); }
.r-err-card     { border-color: var(--status-fail-border); }
.r-result-header-pad { padding: 14px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .r-grid-3, .r-grid-140, .r-grid-180, .r-grid-260 { grid-template-columns: 1fr; }
  .r-text-xxl { font-size: 48px; }
  .r-text-xl  { font-size: 42px; }
  .r-text-28, .r-text-28b { font-size: 22px; }
  .r-card-center-lg { padding: 14px 20px; }
}
@media (max-width: 480px) {
  .r-grid-2 { grid-template-columns: 1fr; }
  .r-text-xxl { font-size: 36px; }
  .r-text-xl  { font-size: 30px; }
  .r-flex-md, .r-flex-lg { gap: 8px; margin-bottom: 12px; }
}

/* Viral footer — appears at the bottom of every shared /result/<id>
   page. Per PRODUCT-AUDIT-2026-04-27 cross-cut #2: each shared result
   = one Enterno.io impression for the recipient, with two UTM-tagged
   paths back into the funnel (recheck + zero-click monitor). */
.shared-viral-footer {
  margin: 40px auto 24px;
  max-width: 720px;
  padding: 28px 28px 24px;
  background: linear-gradient(135deg, rgba(91, 138, 248, 0.10), rgba(124, 96, 245, 0.05));
  border: 1px solid rgba(91, 138, 248, 0.22);
  border-radius: var(--radius, 12px);
  text-align: center;
}
.shared-viral-footer__brand {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  margin-bottom: 6px;
  font-size: 13px;
}
.shared-viral-footer__poweredby { color: var(--muted2, #94a3b8); }
.shared-viral-footer__logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}
.shared-viral-footer__logo span { color: var(--accent, #5b8af8); }
.shared-viral-footer__logo:hover { color: var(--accent); }
.shared-viral-footer__lede {
  margin: 0 auto 18px;
  max-width: 520px;
  color: var(--muted2, #94a3b8);
  font-size: 14px;
  line-height: 1.55;
}
.shared-viral-footer__actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.shared-viral-footer__btn {
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.15s, transform 0.15s, color 0.15s;
}
.shared-viral-footer__btn--primary { background: var(--cta-blue, #3a5fc4); color: var(--white, #fff); }
.shared-viral-footer__btn--primary:hover {
  background: var(--cta-blue-hover, #2e4fa8);
  transform: translateY(-1px);
  color: var(--white, #fff);
}
.shared-viral-footer__btn--secondary {
  background: transparent;
  color: var(--cyan, #22d3ee);
  border: 1px solid rgba(34, 211, 238, 0.35);
}
.shared-viral-footer__btn--secondary:hover {
  background: rgba(34, 211, 238, 0.06);
  color: var(--cyan);
}
.shared-viral-footer__btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
@media (max-width: 600px) {
  .shared-viral-footer { padding: 20px 16px 18px; margin: 28px auto 16px; }
  .shared-viral-footer__btn { width: 100%; justify-content: center; }
  .shared-viral-footer__actions { width: 100%; }
}
