/* Tovrik Platform Atlas — Level-1 product page styles (extends atlas.css). */

.topbar .home {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 5px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  white-space: nowrap;
}
.topbar .home:hover { background: var(--bg); color: var(--ink); }
.topbar h1#p-title {
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.topbar h1#p-title .ppill {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: #fff;
  padding: 2px 8px;
  border-radius: 999px;
}

.surface-nav { display: flex; gap: 4px; }
.surface-nav a {
  font-size: 12px;
  font-family: var(--mono);
  color: var(--ink-soft);
  text-decoration: none;
  padding: 4px 9px;
  border-radius: 7px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.surface-nav a:hover { background: var(--bg); }
.surface-nav a.cur { border-color: var(--line-strong); background: var(--bg); color: var(--ink); font-weight: 600; }
.surface-nav a .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }

/* ── Layout: scrolling document with a sticky sub-graph rail ──────────── */
.pmain { display: block; height: calc(100vh - 57px); overflow-y: auto; }
.ploading { padding: 60px; text-align: center; color: var(--ink-faint); }

.pwrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 26px 28px 80px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
}

/* hero */
.phero { }
.phero .psub { color: var(--ink-soft); font-size: 14px; margin: 2px 0 12px; }
.phero .stamps { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.stamp {
  font-family: var(--mono);
  font-size: 11px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 3px 9px;
  color: var(--ink-soft);
}
.stamp b { color: var(--ink); font-weight: 600; }
.stamp.bench { background: #f5f3ff; border-color: #ddd6fe; color: #6d28d9; }
.stamp.verified { background: #ecfdf5; border-color: #a7f3d0; color: #047857; }
.verdict {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink);
  background: linear-gradient(180deg, var(--bg), #fff);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  padding: 13px 16px;
}
.verdict .vlabel { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--ink-faint); margin-bottom: 5px; font-weight: 700; }

/* roll-up counts */
.pcounts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pcounts .c { font-family: var(--mono); font-size: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 6px 11px; }
.pcounts .c b { font-size: 15px; color: var(--ink); }
.pcounts .c span { color: var(--ink-faint); margin-left: 5px; }

/* generic card section */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.card > h2 {
  margin: 0;
  padding: 14px 18px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-faint);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 8px;
}
.card > h2 .hcount { color: var(--ink-faint); font-weight: 500; font-family: var(--mono); }
.card .body { padding: 16px 18px; }

/* narrative */
.narrative p { margin: 0 0 11px; line-height: 1.62; color: var(--ink); font-size: 14px; }
.narrative p:last-child { margin-bottom: 0; }

/* invariants */
.invs { display: grid; gap: 9px; }
.inv { display: flex; gap: 10px; align-items: flex-start; }
.inv .n {
  flex-shrink: 0;
  width: 26px; height: 26px; border-radius: 7px;
  background: var(--accent); color: #fff;
  display: grid; place-items: center;
  font-family: var(--mono); font-size: 12px; font-weight: 700;
}
.inv .t { font-size: 13px; line-height: 1.5; color: var(--ink); }

/* sub-graph */
.subgraph-card .body { padding: 0; }
#subgraph { width: 100%; height: 440px; background:
  radial-gradient(circle at 1px 1px, #e8ebef 1px, transparent 0) 0 0 / 22px 22px, var(--bg);
  border-bottom: 1px solid var(--line);
}
.sg-legend { display: flex; flex-wrap: wrap; gap: 12px; padding: 10px 18px; font-size: 11px; color: var(--ink-soft); }
.sg-legend .li { display: flex; align-items: center; gap: 6px; }
.sg-legend .sw { width: 12px; height: 12px; border-radius: 3px; }
.sg-legend .ln { width: 22px; border-top: 2px solid var(--line-strong); }
.sg-legend .ln.mesh { border-top-style: dashed; border-color: var(--accent); }
.sg-legend .ln.sb { border-color: #1a1d23; }
.sg-legend .ln.store { border-top-style: dotted; border-color: var(--ink-faint); }

/* scorecard */
.score-cols { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
@media (max-width: 900px) { .score-cols { grid-template-columns: 1fr; } }
.scol h3 {
  margin: 0 0 9px;
  font-size: 12px;
  display: flex; align-items: center; gap: 7px;
}
.scol h3 .tally { font-family: var(--mono); font-size: 11px; color: var(--ink-faint); font-weight: 500; }
.scol.strengths h3 { color: #047857; }
.scol.shipped h3 { color: var(--accent); }
.scol.gaps h3 { color: #b45309; }
.sitem {
  font-size: 12.5px;
  line-height: 1.5;
  padding: 9px 11px;
  border-radius: 8px;
  border: 1px solid var(--line);
  margin-bottom: 8px;
}
.scol.strengths .sitem { background: #f0fdf4; border-color: #bbf7d0; }
.scol.shipped .sitem { background: #eff6ff; border-color: #bfdbfe; }
.scol.gaps .sitem { background: #fffbeb; border-color: #fde68a; }
.sitem .cite { display: block; margin-top: 5px; font-family: var(--mono); font-size: 10.5px; color: var(--ink-faint); word-break: break-word; }
.sev {
  display: inline-block;
  font-family: var(--mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  margin-right: 6px;
  vertical-align: 1px;
}
.sev.critical { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.sev.high { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
.sev.medium { background: #fefce8; color: #a16207; border: 1px solid #fde68a; }
.sev.low { background: #f8fafc; color: #64748b; border: 1px solid #e2e8f0; }
.shipped-tag {
  display: inline-block; font-family: var(--mono); font-size: 9.5px; font-weight: 700;
  color: #047857; background: #ecfdf5; border: 1px solid #a7f3d0; border-radius: 4px;
  padding: 1px 6px; margin-right: 6px; vertical-align: 1px;
}

/* tables */
.ptable { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ptable th, .ptable td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.ptable th { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-faint); font-weight: 600; }
.ptable td.mono, .ptable td .mono { font-family: var(--mono); }
.ptable tr:last-child td { border-bottom: 0; }
.ptable .chips { gap: 4px; }
.ptable .chip { font-size: 10.5px; padding: 1px 6px; }
.envdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }
.envdot.on { background: var(--ok); }
.envdot.off { background: var(--line-strong); }
.frozen-chip { font-family: var(--mono); font-size: 9.5px; color: #b45309; background: #fff7ed; border: 1px solid #fed7aa; border-radius: 4px; padding: 1px 5px; }
.live-cell .dot { width: 8px; height: 8px; }

/* boundary cross-links */
.boundary { display: grid; gap: 7px; }
.bedge {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--bg); cursor: pointer; text-decoration: none; color: inherit;
}
.bedge:hover { border-color: var(--accent); background: #fff; }
.bedge .dir { font-family: var(--mono); font-size: 11px; color: var(--ink-faint); width: 64px; flex-shrink: 0; }
.bedge .bind { font-family: var(--mono); color: var(--ink); }
.bedge .peer { font-family: var(--mono); color: var(--accent); margin-left: auto; }
.bedge .pdot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.bedge.nolink { cursor: default; }
.bedge.nolink:hover { border-color: var(--line); background: var(--bg); }

.pfoot { font-size: 11px; color: var(--ink-faint); text-align: center; padding: 6px 0 0; }
.pfoot code { font-family: var(--mono); }
.pfoot a { color: var(--accent); }
