:root {
  --bg: #000;
  --panel: #0f0f10;
  --border: #2a2a2f;
  --text: #fff;
  --muted: #9ca3af;
  --accent: #a855f7;
  --accent-soft: rgba(168, 85, 247, 0.1);
  --radius-xl: 1rem;
  --radius-lg: 0.75rem;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Inter, Ubuntu,
    Cantarell, "Noto Sans", Helvetica, Arial, sans-serif;
  --link: #fbbf24;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* ---------- Page shell ---------- */

/* --- Viewer page isolation (prevents home.css conflicts) --- */
body { 
  display: block !important; 
}

.viewer-page{
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

/* If your header is sticky, add breathing room */
.viewer-page{
  padding-top: 28px;
}

/* Ensure the grid consumes the available width */
.viewer-page .viewer-grid{
  width: 100%;
  margin: 0;
  justify-content: stretch;
}

/* If viewer-grid is a CSS grid, make it responsive and prevent “squish” */
@media (min-width: 900px){
  .viewer-page .viewer-grid{
    grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
    gap: 22px;
  }
}


body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 20%, rgba(168, 85, 247, 0.12) 0%, transparent 60%),
    radial-gradient(circle at 80% 80%, rgba(59, 130, 246, 0.12) 0%, transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 2rem 1rem 4rem;
}

.wrap {
  width: 100%;
  max-width: 1100px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); /* desktop: 2 cols */
  gap: 1.5rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.9);
  padding: 1.5rem 1.75rem 1.75rem;
}

/* ---------- Top navigation ---------- */

.topnav {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.logo-full {
  height: 28px;
  display: block;
}

.logo-mark {
  display: none; /* we only use the full wordmark now */
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.backLink {
  display: inline-block;
  font-size: 0.9rem;
  color: var(--link);
  text-decoration: none;
  font-weight: 600;
}

.backLink:hover {
  text-decoration: underline;
}

/* ---------- Layout columns ---------- */

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

.mediaCard {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.mediaCard img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

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

/* ---------- Title & description ---------- */

#itemTitle {
  font-size: 1.4rem;
  line-height: 1.2;
  margin: 0;
  font-weight: 650;
}

.item-subtitle {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 0.25rem;
  margin-bottom: 0.5rem;
}

.item-desc {
  font-size: 0.9rem;
  color: var(--muted);
}

.item-desc p {
  margin: 0 0 0.5rem;
}

.item-desc a {
  color: var(--link);
}

/* ---------- Pills row (grade / cert) ---------- */

.pillRow {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.pill {
  padding: 0.55rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  background: rgba(15, 15, 18, 0.9);
}

.pill-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 0.1rem;
}

.pill-value {
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Sections & tables ---------- */

.section {
  margin-top: 0.5rem;
}

.sectionTitle {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.detailsTable {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.detailsTable tr + tr td {
  padding-top: 0.25rem;
}

.detailsTable td {
  padding: 0.05rem 0;
  vertical-align: top;
}

.detailsTable td.label {
  width: 36%;
  color: var(--muted);
  font-weight: 600;
  padding-right: 0.75rem;
}

.detailsTable td.value {
  color: #fff;
  font-weight: 500;
  word-break: break-word;
}

.detailsTable a {
  color: var(--link);
  text-decoration: none;
}

.detailsTable a:hover {
  text-decoration: underline;
}

/* Traits */

.traits {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.trait {
  background: #0c0f14;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 0.45rem 0.55rem;
}

.trait .k {
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.1rem;
}

.trait .v {
  font-size: 0.85rem;
}

/* Tag / badges */

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.tag-soft {
  background: var(--accent-soft);
  color: var(--accent);
}

/* ---------- Report panel ---------- */

.report-panel {
  margin: 0.75rem 0 1rem;
  padding: 0.25rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: #0b0b0d;
  display: none; /* shown once a report is successfully loaded */
}

.report-grid {
  display: grid;
  grid-template-columns: 40% 60%;
  gap: 0.35rem 0.75rem;
  font-size: 0.9rem;
}

.report-grid .label {
  color: var(--muted);
}

.report-grid .value {
  color: #fff;
  font-weight: 600;
  word-break: break-word;
}

.report-sublist {
  margin: 0.25rem 0 0;
  padding-left: 1rem;
  font-weight: 600;
}

.report-muted {
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 0.5rem;
}

/* ---------- Error box ---------- */

.errorBox {
  display: none;
  max-width: 360px;
  background: #1a1a1a;
  border-radius: 10px;
  border: 1px solid #4b1111;
  color: #fff;
  padding: 0.9rem 1rem;
  margin-top: 1rem;
  text-align: left;
}

.errorBox h2 {
  margin: 0 0 0.35rem;
  color: #ff8080;
  font-size: 0.95rem;
}

.errorBox p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ---------- Footer ---------- */

footer {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 0.75rem;
}

/* ---------- Description folding (Visual / Condition / Provenance) ---------- */

.desc-block {
  margin-bottom: 0.4rem;
  border-radius: 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #050609;
}

.desc-block > summary {
  cursor: pointer;
  list-style: none;
  padding: 0.4rem 0.6rem;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.desc-block > summary::-webkit-details-marker {
  display: none;
}

.desc-block summary span.label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.desc-block summary span.chevron {
  font-size: 0.9rem;
}

.desc-block .body {
  padding: 0.35rem 0.6rem 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.desc-block .body p {
  margin: 0.1rem 0;
}

/* Hide redundant Attributes row on small screens if you still have it */
.row-attributes {
  /* comment this out if you decide you want that row back */
  display: none;
}

/* ---------- Responsive ---------- */

/* Tablet & below: stack columns */
@media (max-width: 900px) {
  .wrap {
    grid-template-columns: minmax(0, 1fr); /* one column */
  }

  .leftColumn,
  .metaBlock {
    grid-column: 1 / -1;
  }
}

/* Phone: tighten everything and keep stacked order you like */
@media (max-width: 640px) {
  body {
    padding: 1.25rem 0.75rem 2.5rem;
  }

  .wrap {
    padding: 1.1rem 1.2rem 1.3rem;
    border-radius: 0.9rem;
  }

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

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

  .section {
    margin-top: 0.6rem;
  }

  .detailsTable td.label {
    width: 40%;
  }

  /* keep content order: image → title/pills/desc → traits/details → NFT */
  .leftColumn {
    order: 1;
  }

  .metaBlock {
    order: 2;
  }

  .mediaCard {
    margin-bottom: 0.9rem;
  }
}

/* -------- Owner area under image (desktop) -------- */

.ownerArea {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ownerArea-title {
  margin: 0;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.ownerCard {
  border-radius: 0.9rem;
  background: #f9fafb;
  color: #111827;
  padding: 0.8rem 0.9rem;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.ownerCard-secondary {
  background: #f3f4f6;
}

.ownerCard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.ownerCard-title {
  font-size: 0.9rem;
  font-weight: 600;
}

.ownerBtn {
  font-size: 0.8rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #111827;
  cursor: not-allowed; /* until wired up */
}

.ownerCard-body {
  font-size: 0.85rem;
}

.ownerCard-note {
  margin: 0.25rem 0 0;
  font-size: 0.8rem;
  color: #4b5563;
}

/* Make report-panel look like the white card instead of dark panel */
.ownerCard.report-panel {
  padding-top: 0.7rem;
}

.ownerCard.report-panel .sectionTitle {
  display: none; /* we have "Grading Report" in the ownerCard-header */
}

/* Override report-grid colors when inside owner card */
.ownerCard.report-panel .report-grid .label {
  color: #6b7280;
}

.ownerCard.report-panel .report-grid .value {
  color: #111827;
}

.ownerCard.report-panel .report-muted {
  color: #6b7280;
}
/* Owner Stories Styling */
.ownerCard {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  padding: 1.5rem;
  margin-top: 1rem;
  font-family: 'Inter', system-ui, sans-serif;
  color: #111;
}

.ownerCard-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #1c1c1e;
}

/* Each owner story entry */
.owner-entry {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 1rem;
}

.owner-entry:last-child {
  border-bottom: none;
}

/* Avatar circle with initial (like “C”) */
.owner-avatar {
  background-color: #e4e4e7;
  color: #333;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1rem;
}

/* Comment body */
.owner-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
}

/* Wallet/address link */
.owner-body a {
  color: #a259ff; /* your purple accent */
  text-decoration: none;
  font-weight: 600;
}

.owner-body a:hover {
  text-decoration: underline;
}

/* Timestamp smaller & lighter */
.owner-date {
  font-size: 0.85rem;
  color: #666;
  margin: 0.25rem 0 0.5rem;
}
 /* ---------- Owner Stories / comments ---------- */

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

/* One entry */
.comment-card {
  display: flex;
  flex-direction: column;
  padding: 0.6rem 0;
  border-bottom: 1px solid #e5e7eb;
}

.comment-card:last-child {
  border-bottom: none;
}

/* header: avatar + name + date */
.comment-header {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.25rem;
}

/* circular avatar with “C” or “#” */
.comment-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #111827;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
  /* viewer-pointer.js sets --bg to a per-owner color; use it if present */
  background-color: var(--bg, var(--accent-soft));
}

/* name / actor */
.comment-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: #111827;
}

/* date on its own line, smaller */
.comment-time {
  margin-left: auto;
  font-size: 0.8rem;
  color: #6b7280;
}

/* body text */
.comment-body {
  font-size: 0.9rem;
  color: #111827;
  margin-top: 0.1rem;
  white-space: pre-line;
}

/* address links in purple accent */
.comment-body a,
.comment-name a {
  color: #a855f7;
  text-decoration: none;
  font-weight: 600;
}

.comment-body a:hover,
.comment-name a:hover {
  text-decoration: underline;
}

.report-table td { white-space: normal; word-break: break-word; }
.comment .time { font-size: 12px; opacity: .75; margin-top: 4px; }
.comment .addr a { color: #7a5cff; text-decoration: none; }
.comment .avatar { width: 28px; height: 28px; border-radius: 50%; background:#111; color:#fff; display:flex; align-items:center; justify-content:center; font-weight:700; margin-right:8px; }
.comment { display:flex; gap:10px; padding:10px 0; border-bottom:1px solid rgba(255,255,255,.08); }

/* --- CERTIFIQ REPORT TABLE IMPROVEMENTS --- */
.report-panel {
  margin-top: 1.5rem;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 1rem 1rem;
  line-height: 1.6;
}

.report-meta {
  font-size: 0.6rem;
  text-decoration: uppercase;
  color: #aaa;
  margin-bottom: 0.5rem;
  letter-spacing: 0.02em;
  padding-left: 12px;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5rem;
}

.report-table th,
.report-table td {
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.report-table th {
  color: #d8d8d8;
  font-weight: 600;
  font-size: 0.95rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.report-table td {
  color: #eaeaea;
  font-size: 0.95rem;
  line-height: 1.5;
  white-space: normal;
  word-break: break-word;
}

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

.report-table tr:hover td {
  background: rgba(255, 255, 255, 0.03);
  transition: background 0.2s ease;
}
.report-loaded-from { display: none !important; }

/* === Desktop Layout (Default) === */
.viewer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr; /* two columns */
  grid-template-areas:
    "media meta"
    "report meta"
    "disc  meta";
  gap: 24px;
  align-items: start;
}

/* Assign grid areas */
.mediaCard {
  grid-area: media;
}
.metaBlock {
  grid-area: meta;
}
#report {
  grid-area: report;
}
.disclaimer-section {
  grid-area: disc;
}

/* === Mobile Layout (Stacked) === */
@media (max-width: 768px) {
  .viewer-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "media"
      "meta"
      "report"
      "disc";
  }

  .mediaCard,
  .metaBlock,
  #report,
  .disclaimer-section {
    margin: 0 0 20px 0;
  }
}

/* ---- Container: center page and cap width on desktop ---- */
#viewer.wrap {
  max-width: 1200px;          /* tweak: 1100–1280 work well */
  margin-inline: auto;
  padding: 24px;              /* keep your existing padding if you prefer */
}

/* ---- Desktop grid: left rail ~360–420px, right fills ---- */
.viewer-grid {
  display: grid;
  grid-template-columns: minmax(340px, 420px) minmax(0, 1fr);
  grid-template-areas:
    "media  meta"
    "report meta"
    "disc   meta";
  gap: 24px;
  align-items: start;
}

/* Make the image scale cleanly inside the left rail */
.mediaCard img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: inherit; /* if your card has rounded corners */
}

/* ---- Mobile: keep your stacked order (1 → 2 → 3 → 4) ---- */
@media (max-width: 768px) {
  #viewer.wrap { max-width: none; padding: 16px; }  /* optional tighter padding */
  .viewer-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "media"
      "meta"
      "report"
      "disc";
  }
  .mediaCard,
  .metaBlock,
  #report,
  .disclaimer-section { margin: 0 0 20px 0; }
}

/* Make the right column (meta) fill the available space */
.viewer-grid .metaBlock {
  width: 100%;
  max-width: none;        /* override any previous caps */
  min-width: 0;           /* allow content to shrink in grid */
  justify-self: stretch;  /* ensure it spans the full grid track */
}

/* Ensure common inner blocks don't re-cap width */
.metaBlock > * {
  width: 100%;
  max-width: none;
}

/* Tables, traits, sections inside meta should stretch */
.metaBlock .detailsTable,
.metaBlock .traits,
.metaBlock .section,
.metaBlock .item-desc {
  width: 100%;
  max-width: none;
}

/* (Optional) If any old rule used a fixed width, force override */
@media (min-width: 769px) {
  .metaBlock, 
  .metaBlock *[style*="max-width"],
  .metaBlock *[style*="width"] {
    max-width: none !important;
  }
}

/* 1) Make the page wrapper a single column so the content can span full width */
.wrap {
  grid-template-columns: 1fr !important;
}

/* 2) Ensure the viewer grid spans the full wrapper (defensive, in case .wrap changes later) */
.viewer-grid {
  grid-column: 1 / -1 !important;
}

/* 3) Desktop/tablet: true 50/50 columns inside the viewer grid */
@media (min-width: 769px) {
  .viewer-grid {
    grid-template-columns: 1fr 1fr !important;  /* equal columns */
    grid-template-areas:
      "media  meta"
      "report meta"
      "disc   meta";
  }
}

/* 4) Make sure the right column can actually stretch */
.viewer-grid .metaBlock {
  min-width: 0;
  width: 100%;
  max-width: none;
  justify-self: stretch;
}

/* Always show description content, remove dropdown behavior */
.metaBlock details {
  display: block;
}

.metaBlock details summary {
  cursor: default;
  list-style: none;
  pointer-events: none;
}

.metaBlock details[open] summary::after,
.metaBlock details summary::after {
  content: none;
}

.metaBlock details[open] > div,
.metaBlock details > div {
  display: block !important;
}

/* Static description sections (replacing dropdowns) */
.desc-static { 
  margin-top: 0.75rem;
}

.desc-static .sectionTitle {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.desc-static .item-desc { 
  font-size: 0.95rem;
  color: var(--muted);
}

/* Optional: if any old dropdown CSS was forcing chevrons/click behavior */
.desc-block, .desc-block * { all: unset; } /* only if you still see leftover styles */

/* Desktop/tablet: keep 50/50 columns, but make report & disclaimer full width */
@media (min-width: 769px) {
  .viewer-grid {
    grid-template-columns: 1fr 1fr; /* 50/50 */
    grid-template-areas:
      "media  meta"
      "report report"
      "disc   disc";
  }

  #report {
    grid-column: 1 / -1;   /* defensive: span both columns */
  }

  .disclaimer-section {
    grid-column: 1 / -1;   /* full width too */
  }
}
.final-verdict {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.95rem;
  color: var(--muted);
}

/* Tighter grading table on mobile so "Centering" stays on one line */
@media (max-width: 600px) {
  .report-panel .report-table th,
  .report-panel .report-table td {
    /* keep vertical padding, just reduce left/right */
    padding-left: 8px;
    padding-right: 8px;
  }

  /* Don't let the subgrade names break onto two lines */
  .report-panel .report-table td:first-child {
    white-space: nowrap;
  }
}

/* ───────────────────────────────────────────────
   CertifiQ – Enhanced Policy Table Styling
   Improves readability while matching viewer.css
   ─────────────────────────────────────────────── */

.policy-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 12px;
  font-size: 0.9rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  overflow: hidden;
}

/* Header */
.policy-table thead {
  background: rgba(255,255,255,0.06);
}

.policy-table thead th {
  padding: 12px 14px;
  text-align: left;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Data rows */
.policy-table tbody tr {
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: background 0.2s ease;
}

.policy-table tbody tr:last-child {
  border-bottom: none;
}

.policy-table tbody td {
  padding: 14px;
  line-height: 1.45;
  vertical-align: top;
  color: var(--text);
}

/* Improve readability by aligning the “short” cells tighter */
.policy-table tbody td:first-child,
.policy-table tbody td:nth-child(4) {
  white-space: nowrap;
  font-weight: 600;
  color: #dce3ff;
}

/* Hover highlight */
.policy-table tbody tr:hover {
  background: rgba(255,255,255,0.05);
}

/* Keep code elements visually clean */
.policy-table code {
  color: var(--accent);
  font-size: 0.8rem;
}

/* Mobile responsiveness */
@media (max-width: 640px) {
  .policy-table thead {
    display: none;
  }

  .policy-table tbody tr {
    display: block;
    padding: 10px 0;
  }

  .policy-table tbody td {
    display: flex;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px dotted rgba(255,255,255,0.08);
  }

  .policy-table tbody td:last-child {
    border-bottom: none;
  }

  .policy-table tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--muted);
    margin-right: 12px;
    text-transform: uppercase;
    font-size: 0.7rem;
  }
}

/* Layout improvements for policy content */
.policy-wrapper {
  max-width: 66%;     /* 2/3 width */
  margin-left: 0;     /* left aligned under title */
  padding-left: 24px; /* match text indentation */
}

@media (max-width: 900px) {
  .policy-wrapper {
    max-width: 100%;
    padding-left: 12px;
  }
}

.policy-wrapper p {
  line-height: 1.55;
}

.auth-panel {
  margin-top: 16px;
}

.auth-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.auth-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  background: rgba(80, 200, 120, 0.12);
  border: 1px solid rgba(80, 200, 120, 0.4);
}

.auth-meta {
  font-size: 0.8rem;
  opacity: 0.8;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.2fr);
  gap: 16px;
  margin-top: 8px;
}

@media (max-width: 768px) {
  .auth-layout {
    grid-template-columns: 1fr;
  }
}

.auth-subtitle {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.8;
  margin-bottom: 6px;
}

.auth-checklist,
.auth-flags {
  list-style: none;
  margin: 0;
  padding: 0;
}

.auth-check {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  font-size: 0.85rem;
}

.auth-check-icon {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
}

.auth-check-pass .auth-check-icon {
  border: 1px solid rgba(80, 200, 120, 0.8);
}

.auth-check-fail .auth-check-icon {
  border: 1px solid rgba(220, 120, 80, 0.8);
}

.auth-check-pass .auth-check-label {
  opacity: 0.9;
}

.auth-check-fail .auth-check-label {
  color: #c4573b;
}

.auth-check-status {
  font-size: 0.75rem;
  opacity: 0.65;
}

.auth-flag-on,
.auth-flag-off {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 6px;
  padding: 2px 0;
  font-size: 0.8rem;
}

.auth-flag-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  margin-top: 2px;
}

.auth-flag-on .auth-flag-dot {
  background: #c4573b;
}

.auth-flag-off .auth-flag-dot {
  background: #4caf50;
  opacity: 0.7;
}

.auth-evidence-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.auth-evidence-table th,
.auth-evidence-table td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 4px 6px;
  vertical-align: top;
}

.ev-support-yes {
  color: #4caf50;
}

.ev-support-no {
  color: #c4573b;
}

.auth-notes {
  margin-top: 12px;
  font-size: 0.8rem;
}

.muted {
  opacity: 0.7;
  font-size: 0.8rem;
}

.auth-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-start;
  margin-top: 8px;
}

.auth-card {
  flex: 1 1 280px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
}

@media (max-width: 768px) {
  .auth-layout {
    flex-direction: column;
  }
}

/* Desktop/tablet: normal table */
.auth-evidence-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.auth-evidence-table th,
.auth-evidence-table td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 4px 6px;
  vertical-align: top;
  text-align: left;
}

/* Mobile: stack each evidence row as a mini card */
@media (max-width: 768px) {
  .auth-evidence-table {
    border-collapse: separate;
    border-spacing: 0;
  }

  .auth-evidence-table thead {
    display: none;
  }

  .auth-evidence-table,
  .auth-evidence-table tbody,
  .auth-evidence-table tr,
  .auth-evidence-table td {
    display: block;
    width: 100%;
  }

  .auth-evidence-table tr {
    margin-bottom: 12px;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
  }

  .auth-evidence-table td {
    padding: 2px 0;
    border-bottom: none;
  }

  .auth-evidence-table td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.6;
    margin-bottom: 1px;
  }

  /* Slight extra spacing above the big paragraph */
  .auth-evidence-table td[data-label="Observation"] {
    margin-top: 4px;
  }
}

/* PREMIUM OWNER-ONLY SECTION */
.owner-only-section {
  background: linear-gradient(135deg, rgba(142, 95, 255, 0.10), rgba(0, 230, 220, 0.10));
  border: 1px solid rgba(142, 95, 255, 0.25);
  box-shadow: 0 0 18px rgba(142, 95, 255, 0.15);
  backdrop-filter: blur(4px);
}

/* Make inner cards transparent so the gradient shows through */
.owner-only-section .card {
  background: rgba(0, 0, 0, 0.2) !important;
  border: 1px solid rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(4px);
}

.owner-only-section .auth-card {
  background: rgba(0, 0, 0, 0.25) !important;
}

.owner-only-section table {
  background: transparent;
}

.owner-only-section .report-loaded-from {
  opacity: 0.7;
}
/* ------------------------------------------------------- */
/* PREMIUM OWNER-ONLY SECTION                               */
/* ------------------------------------------------------- */

.owner-only-section {
  margin: 32px 0; /* EXTRA breathing room top/bottom */
  padding: 28px 24px; /* Extra interior breathing room */
  border-radius: 18px;

  /* Gradient */
  background: linear-gradient(
    135deg,
    rgba(155, 80, 255, 0.18),
    rgba(0, 255, 210, 0.12)
  );

  /* Neon glow border */
  border: 1.5px solid rgba(120, 60, 255, 0.35);
  box-shadow:
    0 0 22px rgba(120, 60, 255, 0.25),
    0 0 18px rgba(0, 255, 210, 0.20);
  
  backdrop-filter: blur(6px);
}

/* Make inner grading + authenticity cards slightly translucent
   so the premium gradient shows THROUGH them */
.owner-only-section .card {
  background: rgba(0, 0, 0, 0.35) !important;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 24px;
}

/* Auth sub-cards inside the authenticity panel */
.owner-only-section .auth-card {
  background: rgba(0, 0, 0, 0.25) !important;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  padding: 18px;
}

/* Evidence table mini-cards in mobile view */
@media (max-width: 768px) {
  .owner-only-section {
    padding: 20px 14px;
    margin: 20px 0;
  }

  .owner-only-section .card {
    padding: 18px;
  }

  .auth-evidence-table tr {
    margin-bottom: 14px !important;
    padding: 10px 12px !important;
    border-radius: 12px !important;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(0, 0, 0, 0.35);
  }
}
----------

/* Subtle neon pulse on the outer border */
@keyframes ownerNeonPulse {
  0% {
    box-shadow:
      0 0 18px rgba(130, 70, 255, 0.30),
      0 0 14px rgba(0, 255, 210, 0.22);
    border-color: rgba(140, 90, 255, 0.75);
  }
  50% {
    box-shadow:
      0 0 30px rgba(180, 120, 255, 0.50),
      0 0 26px rgba(0, 255, 210, 0.40);
    border-color: rgba(180, 130, 255, 0.95);
  }
  100% {
    box-shadow:
      0 0 18px rgba(130, 70, 255, 0.30),
      0 0 14px rgba(0, 255, 210, 0.22);
    border-color: rgba(140, 90, 255, 0.75);
  }
}

.owner-only-section {
  animation: ownerNeonPulse 8s ease-in-out infinite;
}

/* Submitted images block under hero image */
.submitted-section {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.submitted-section .sectionTitle {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.submitted-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.submitted-item {}

.submitted-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.submitted-thumb {
  width: 32px;
  height: 48px;
  border-radius: 6px;
  background-size: cover;
  background-position: center;
  background-color: #111;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.submitted-meta {
  display: flex;
  flex-direction: column;
}

.submitted-label {
  font-size: 0.85rem;
}

.submitted-tag {
  font-size: 0.7rem;
  opacity: 0.7;
}

.submitted-disclaimer {
  margin-top: 10px;
  font-size: 0.7rem;
  opacity: 0.75;
  line-height: 1.4;
}

/* Mobile: a bit more room */
@media (max-width: 768px) {
  .submitted-section {
    padding: 12px 12px;
  }
}

/* Brand link color – golden yellow */
:root {
  --link-gold: #ffc94a;  /* tweak if you have a specific hex */
}

/* Base link styles */
a {
  color: var(--link-gold);
  text-decoration: none;
}

a:visited {
  color: var(--link-gold);
}

a:hover,
a:focus {
  color: var(--link-gold);
  text-decoration: underline;
}

/* Optional: inside the viewer specifically */
.wrap a {
  color: var(--link-gold);
}

.submitted-link {
  color: var(--link-gold);
}

.submitted-link:hover .submitted-thumb {
  transform: translateY(-1px);
  box-shadow: 0 0 10px rgba(255, 201, 74, 0.5);
}

.viewer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.1fr);
  grid-template-areas:
    "media main"
    "submitted main"
    "report report";
  gap: 24px;
}

.mediaCard {
  grid-area: media;
}

.metaBlock {
  grid-area: main;
}

.owner-only-section {
  grid-area: report;
}

/* NEW: put the submitted card under the main image, left column */
.submitted-section {
  grid-area: submitted;
}

@media (max-width: 900px) {
  .viewer-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "media"
      "submitted"
      "main"
      "report";
  }
}

.doc-button-row {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.doc-pill-btn {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  color: #020617;
  background: linear-gradient(135deg, #22d3ee, var(--accent));
  box-shadow: 0 8px 20px rgba(0,0,0,0.55);
}

.doc-pill-btn:hover {
  filter: brightness(1.1);
}

.doc-pill-btn a {
  color: white;
}

/* DOC transfer page layout: single centered column */
.doc-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);  /* always one column */
  gap: 1.25rem;
  align-items: flex-start;
  max-width: 720px;      /* keeps content readable on desktop */
  margin: 0 auto;        /* centers the stack */
}

/* no extra media query needed – one column at all sizes */


#viewer.doc-page.wrap {
  max-width: 900px;
  margin-inline: auto;
  padding: 16px 12px 24px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  row-gap: 1.25rem;
}

@media (min-width: 768px) {
  #viewer.doc-page.wrap {
    padding: 24px 16px 28px;
  }
}

/* ===== Viewer layout hard reset (kills the blank grid gaps) ===== */

.wrap#viewer{
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}

/* Make the grid “content-driven” instead of “row-slot driven” */
.viewer-grid{
  display: grid;
  grid-template-columns: minmax(0, 460px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  grid-auto-rows: min-content;
}

/* Explicit placement: no more mystery gaps */
.viewer-grid > .mediaCard{ grid-column: 1; grid-row: 1; }
.viewer-grid > #submittedSection{ grid-column: 1; grid-row: 2; }
.viewer-grid > .metaBlock{ grid-column: 2; grid-row: 1 / span 2; }
.viewer-grid > #report{ grid-column: 1 / -1; grid-row: 3; }

/* Prevent any “min-height: ___px” from inflating empty blocks */
.mediaCard,
#submittedSection,
.metaBlock,
#report,
.section,
.card{
  min-height: 0 !important;
  height: auto !important;
}

/* Mobile: stack */
@media (max-width: 900px){
  .viewer-grid{ grid-template-columns: 1fr; }
  .viewer-grid > .mediaCard,
  .viewer-grid > #submittedSection,
  .viewer-grid > .metaBlock,
  .viewer-grid > #report{
    grid-column: 1;
    grid-row: auto;
  }
}

/* =========================================================
   FINAL VIEWER LAYOUT (single source of truth)
   ========================================================= */

/* Stop body-flex from centering/squeezing the page */
body{
  display: block !important;
  padding: 0 !important;
}

/* Your viewer wrapper should NOT be a 2-col grid anymore */
#viewer.wrap{
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px 64px;
  background: transparent;            /* let your global bg show */
  border: none;
  border-radius: 0;
  box-shadow: none;
  display: block !important;
}

/* The ONLY grid: viewer-grid */
#viewer .viewer-grid{
  display: grid !important;
  grid-template-columns: minmax(0, 460px) minmax(0, 1fr) !important;
  grid-template-areas:
    "media     main"
    "submitted main"
    "report    report" !important;
  gap: 18px !important;
  align-items: start !important;
}

/* Assign areas */
#viewer .mediaCard{ grid-area: media; }
#viewer .metaBlock{ grid-area: main; }

/* IMPORTANT: your HTML uses id="submittedSection" (not .submitted-section) */
#viewer #submittedSection{ grid-area: submitted; }

/* Your owner-only/report section: in your HTML this is #report OR .owner-only-section.
   Make both span full width. */
#viewer #report,
#viewer .owner-only-section{
  grid-area: report;
  width: 100%;
}

/* Kill artificial empty space */
#viewer .mediaCard{ aspect-ratio: auto !important; } /* remove fixed square */
#viewer .mediaCard img{ height: auto !important; }
#viewer .section,
#viewer .card,
#viewer .metaBlock,
#viewer #submittedSection,
#viewer #report,
#viewer .owner-only-section{
  min-height: 0 !important;
  height: auto !important;
  margin: 0 !important;
}

/* Tighten common vertical gaps inside the right column */
#viewer .metaBlock{ gap: 12px !important; }
#viewer .section{ margin-top: 10px !important; }

/* Mobile */
@media (max-width: 900px){
  #viewer .viewer-grid{
    grid-template-columns: 1fr !important;
    grid-template-areas:
      "media"
      "submitted"
      "main"
      "report" !important;
  }
}



