/* ================================================================
   CSS Cog: newplayer_ref.css
   Author:   Steven J. Cook (Shinra.Engineer)
   Date:     2026-04-16
   Time:     23:50 UTC
   Revision: 2.0.0
             - Full overhaul. Card-grid layout matching the home
               screen, detail panel with smooth show/hide, example
               scenario blocks, status chips, affinity tags, split
               layouts, discipline grid, flavor grid.
   Model:    Claude Opus 4.6
   Chat:     Abyssal Engine Web App Development
   ================================================================ */

/* =====================================================
   WRAPPER + HEADER
   ===================================================== */
.npr-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1em;
  color: var(--text-primary);
}

.npr-header {
  text-align: center;
  margin-bottom: 1.5em;
  padding-bottom: 1em;
  border-bottom: 1px solid var(--border-thin);
}
.npr-header h2 {
  font-family: var(--font-display);
  font-size: 1.8em;
  color: var(--accent-amber);
  letter-spacing: 0.05em;
  margin: 0 0 0.3em;
}
.npr-subtitle {
  color: var(--text-secondary);
  font-size: 0.95em;
  margin: 0 0 0.6em;
}
.npr-credit {
  font-size: 0.85em;
  color: var(--text-muted);
  margin: 0;
  font-style: italic;
}
.npr-credit i { color: var(--accent-amber); margin-right: 0.3em; }
.npr-credit a {
  color: var(--accent-blue);
  text-decoration: none;
  border-bottom: 1px dashed rgba(88, 101, 242, 0.4);
}
.npr-credit a:hover {
  color: var(--accent-amber);
  border-bottom-color: var(--accent-amber);
}

/* =====================================================
   SEARCH BAR
   ===================================================== */
.npr-search-wrap {
  position: relative;
  max-width: 420px;
  margin: 0.8em auto 1.2em;
}
.npr-search-icon {
  position: absolute;
  left: 0.9em;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-faint);
  font-size: 0.85em;
  pointer-events: none;
}
.npr-search {
  width: 100%;
  padding: 0.55em 0.9em 0.55em 2.3em;
  background: var(--bg-darkest);
  border: 1px solid var(--border-thin);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9em;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}
.npr-search::placeholder {
  color: var(--text-faint);
  font-style: italic;
}
.npr-search:focus {
  border-color: var(--accent-amber);
  box-shadow: 0 0 0 2px rgba(240, 178, 50, 0.15);
}

/* =====================================================
   CARD GRID
   ===================================================== */
.npr-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1em;
  margin-bottom: 2em;
}

.npr-card {
  display: flex;
  align-items: center;
  gap: 0.8em;
  padding: 1em 1.1em;
  background: var(--bg-dark);
  border: 1px solid var(--border-thin);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.18s ease;
  box-shadow: var(--shadow-low);
  position: relative;
  overflow: hidden;
}
.npr-card:hover {
  border-color: var(--accent-amber);
  box-shadow: var(--shadow-med);
  transform: translateY(-1px);
}
.npr-card:hover .npr-card-arrow { transform: translateX(3px); color: var(--accent-amber); }

.npr-card-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--bg-darkest);
  color: var(--accent-amber);
  font-size: 1.3em;
  flex-shrink: 0;
}
.npr-card-icon img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.npr-card-body {
  flex: 1;
  min-width: 0;
}
.npr-card-title {
  font-family: var(--font-display);
  font-size: 1em;
  color: var(--text-primary);
  margin: 0 0 0.2em;
  letter-spacing: 0.03em;
}
.npr-card-tagline {
  font-size: 0.78em;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.4;
}

.npr-card-arrow {
  color: var(--text-faint);
  font-size: 0.85em;
  transition: all 0.18s ease;
  flex-shrink: 0;
}

/* =====================================================
   MODAL (appended to body when a card is opened)
   ===================================================== */
.npr-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 2em 1em;
  animation: nprFadeIn 0.2s ease;
}
body.npr-modal-open { overflow: hidden; }

/* Nested modal (modal-inside-modal) sits above the parent */
.npr-nested-overlay {
  z-index: 10001;
  background: rgba(0, 0, 0, 0.75);
}
.npr-nested-modal {
  max-width: 780px;
}

/* "However..." cross-reference link */
.npr-however {
  text-align: center;
  margin: 1.2em 0 0;
  font-style: italic;
}
.npr-however a {
  color: var(--accent-amber);
  text-decoration: none;
  border-bottom: 1px dashed rgba(240, 178, 50, 0.4);
  font-size: 0.95em;
  transition: color 0.15s;
}
.npr-however a:hover {
  color: var(--text-primary);
  border-bottom-color: var(--text-primary);
}

.npr-modal {
  background: var(--bg-main, #1e1f22);
  background: var(--bg-dark, #1e1f22);
  border: 1px solid var(--border-thin);
  border-radius: var(--radius-md);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  width: 100%;
  max-width: 820px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: nprModalRise 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes nprModalRise {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.npr-modal-header {
  display: flex;
  align-items: center;
  gap: 0.8em;
  padding: 0.9em 1.1em;
  background: var(--bg-dark, #1e1f22);
  border-bottom: 1px solid var(--border-thin);
  flex-shrink: 0;
}
.npr-modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.7em;
  flex: 1;
  min-width: 0;
}
.npr-modal-title-wrap h2 {
  font-family: var(--font-display);
  color: var(--accent-amber);
  font-size: 1.4em;
  letter-spacing: 0.04em;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.npr-modal-close {
  background: var(--bg-darkest);
  border: 1px solid var(--border-thin);
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
  font-size: 0.95em;
}
.npr-modal-close:hover {
  background: var(--accent-red);
  color: #fff;
  border-color: var(--accent-red);
}

.npr-detail-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-darkest);
  border: 1px solid var(--accent-amber);
  border-radius: var(--radius-sm);
  color: var(--accent-amber);
  font-size: 1.35em;
  flex-shrink: 0;
}
.npr-detail-icon img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.npr-modal-body {
  padding: 1.2em 1.5em 1.5em;
  background: var(--bg-dark, #1e1f22);
  overflow-y: auto;
  flex: 1;
}

/* The content wrapper that topic renderers fill */
.npr-detail-content {
  font-size: 0.93em;
  line-height: 1.6;
  color: var(--text-primary);
}
.npr-detail-content p { margin: 0 0 0.9em; }
.npr-detail-content h4 {
  font-family: var(--font-display);
  color: var(--accent-amber);
  font-size: 1em;
  margin: 1.2em 0 0.5em;
  letter-spacing: 0.04em;
}
.npr-detail-content ul,
.npr-detail-content ol {
  margin: 0 0 1em;
  padding-left: 1.4em;
}
.npr-detail-content li { margin-bottom: 0.3em; }

@keyframes nprFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.npr-ordered { counter-reset: npr-step; list-style: none; padding-left: 0; }
.npr-ordered li {
  counter-increment: npr-step;
  padding-left: 2em;
  position: relative;
  margin-bottom: 0.5em;
}
.npr-ordered li::before {
  content: counter(npr-step);
  position: absolute;
  left: 0;
  top: 0;
  width: 1.5em;
  height: 1.5em;
  background: var(--accent-amber);
  color: #000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.8em;
  font-family: var(--font-code);
}

/* =====================================================
   EXAMPLE SCENARIO BLOCK
   ===================================================== */
.npr-example {
  margin: 1em 0;
  padding: 0.8em 1em;
  background: rgba(88, 101, 242, 0.06);
  border-left: 3px solid var(--accent-blue);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.npr-example-label {
  font-family: var(--font-display);
  font-size: 0.8em;
  color: var(--accent-blue);
  letter-spacing: 0.08em;
  margin-bottom: 0.4em;
  text-transform: uppercase;
}
.npr-example-label i { margin-right: 0.3em; }
.npr-example-body {
  font-size: 0.9em;
  color: var(--text-secondary);
}
.npr-example-body p { margin: 0 0 0.5em; }
.npr-example-body p:last-child { margin-bottom: 0; }
.npr-example-body em { color: var(--text-primary); }

/* =====================================================
   TABLES
   ===================================================== */
.npr-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.6em 0 1em;
  font-size: 0.9em;
}
.npr-table th {
  text-align: left;
  padding: 0.5em 0.7em;
  background: var(--bg-darkest);
  color: var(--accent-amber);
  font-family: var(--font-display);
  font-size: 0.85em;
  letter-spacing: 0.04em;
  border-bottom: 2px solid var(--accent-amber);
}
.npr-table td {
  padding: 0.5em 0.7em;
  border-bottom: 1px solid var(--border-thin);
  vertical-align: top;
}
.npr-table tr:last-child td { border-bottom: none; }
.npr-table tr:nth-child(even) td { background: rgba(255, 255, 255, 0.02); }

/* =====================================================
   STATUS CHIPS
   ===================================================== */
.npr-status {
  display: inline-block;
  padding: 0.15em 0.55em;
  border-radius: 3px;
  font-size: 0.82em;
  font-weight: 700;
  color: #fff;
}
.npr-dazed    { background: #f0b232; color: #000; }
.npr-enraged  { background: #cc3340; }
.npr-poisoned { background: #7b2d8b; }
.npr-shaken   { background: #5865f2; }
.npr-slow     { background: #00b4d8; color: #000; }
.npr-weak     { background: #886622; }

/* =====================================================
   SPLIT LAYOUT (two-column info)
   ===================================================== */
.npr-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1em;
  margin: 1em 0;
}
.npr-split > div {
  padding: 0.8em 1em;
  background: var(--bg-darkest);
  border: 1px solid var(--border-thin);
  border-radius: var(--radius-sm);
}
.npr-split h4 { margin-top: 0; }

/* =====================================================
   BOND GRID (pairings)
   ===================================================== */
.npr-bond-grid {
  display: flex;
  flex-direction: column;
  gap: 0.4em;
  margin: 0.8em 0;
}
.npr-bond-pair {
  display: flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.45em 0.8em;
  background: var(--bg-darkest);
  border: 1px solid var(--border-thin);
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 0.9em;
}
.npr-bond-pos { color: var(--accent-green); font-weight: 700; }
.npr-bond-neg { color: var(--accent-red); font-weight: 700; }
.npr-bond-divider { color: var(--text-faint); font-style: italic; font-size: 0.85em; }

/* =====================================================
   AFFINITY GRID
   ===================================================== */
.npr-affinity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.6em;
  margin: 0.8em 0;
}
.npr-affinity {
  padding: 0.7em 0.9em;
  background: var(--bg-darkest);
  border: 1px solid var(--border-thin);
  border-radius: var(--radius-sm);
  text-align: center;
}
.npr-affinity strong {
  display: block;
  font-family: var(--font-display);
  margin: 0.3em 0 0.2em;
}
.npr-affinity p {
  font-size: 0.8em;
  color: var(--text-secondary);
  margin: 0;
}
.npr-affinity-tag {
  display: inline-block;
  padding: 0.2em 0.6em;
  border-radius: 3px;
  font-family: var(--font-code);
  font-weight: 800;
  font-size: 0.85em;
  color: #fff;
}
.npr-vu { background: var(--accent-red); }
.npr-rs { background: var(--accent-blue); }
.npr-im { background: var(--text-faint); color: #000; }
.npr-ab { background: var(--accent-green); color: #000; }

/* =====================================================
   FLAVOR GRID
   ===================================================== */
.npr-flavor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.7em;
  margin: 0.8em 0;
}
.npr-flavor {
  padding: 0.8em 1em;
  background: var(--bg-darkest);
  border: 1px solid var(--border-thin);
  border-left: 3px solid var(--accent-amber);
  border-radius: var(--radius-sm);
}
.npr-flavor h4 {
  margin: 0 0 0.3em;
  color: var(--accent-amber);
  font-family: var(--font-display);
  font-size: 0.95em;
}
.npr-flavor p {
  font-size: 0.85em;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

/* =====================================================
   PILLAR LIST
   ===================================================== */
.npr-pillar-list {
  list-style: none;
  padding: 0;
  margin: 0.6em 0 1em;
}
.npr-pillar-list li {
  padding: 0.5em 0.8em;
  background: var(--bg-darkest);
  border-left: 3px solid var(--accent-amber);
  margin-bottom: 0.3em;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.9em;
}

/* =====================================================
   DISCIPLINE GRID
   ===================================================== */
.npr-discipline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.6em;
  margin: 0.8em 0;
}
.npr-discipline {
  padding: 0.7em 0.9em;
  background: var(--bg-darkest);
  border: 1px solid var(--border-thin);
  border-left: 3px solid var(--accent-blue);
  border-radius: var(--radius-sm);
}
.npr-discipline h4 {
  margin: 0 0 0.3em;
  color: var(--accent-blue);
  font-size: 0.95em;
  font-family: var(--font-display);
}
.npr-discipline p {
  font-size: 0.82em;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

/* =====================================================
   ZERO-HP GRID
   ===================================================== */
.npr-zerohp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1em;
  margin: 0.8em 0;
}
.npr-zerohp-grid > div {
  padding: 0.8em 1em;
  background: var(--bg-darkest);
  border: 1px solid var(--border-thin);
  border-radius: var(--radius-sm);
}
.npr-zerohp-grid h4 { margin-top: 0; }
.npr-zerohp-grid ul {
  padding-left: 1.2em;
  margin: 0.4em 0 0;
}

/* =====================================================
   FAQ
   ===================================================== */
.npr-faq-item {
  padding: 0.8em 1em;
  background: var(--bg-darkest);
  border: 1px solid var(--border-thin);
  border-left: 3px solid var(--accent-blue);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 0.6em;
}
.npr-faq-q {
  font-family: var(--font-display);
  color: var(--accent-blue);
  font-size: 0.95em;
  margin: 0 0 0.4em;
  letter-spacing: 0.03em;
}
.npr-faq-a {
  font-size: 0.88em;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

/* =====================================================
   FOOTER
   ===================================================== */
.npr-footer {
  margin-top: 2em;
  padding: 1.1em 1em 0.8em;
  border-top: 1px solid var(--border-thin);
  text-align: center;
  background: var(--bg-darkest);
  border-radius: var(--radius-sm);
}
.npr-footer p {
  margin: 0 auto 0.5em;
  max-width: 820px;
  line-height: 1.5;
}
.npr-footer-requires {
  font-size: 0.85em;
  color: var(--text-secondary);
}
.npr-footer-requires strong { color: var(--accent-amber); }

.npr-footer-attribution {
  font-size: 0.75em;
  color: var(--text-faint);
  font-style: italic;
  letter-spacing: 0.01em;
}
.npr-footer-attribution a {
  color: var(--accent-amber);
  text-decoration: none;
  border-bottom: 1px dashed rgba(240, 178, 50, 0.4);
  font-style: normal;
}
.npr-footer-attribution a:hover { border-bottom-color: var(--accent-amber); }

.npr-footer-ai {
  font-size: 0.7em;
  color: var(--text-faint);
  margin-bottom: 0 !important;
}
.npr-footer a {
  color: var(--accent-amber);
  text-decoration: none;
  border-bottom: 1px dashed rgba(240, 178, 50, 0.4);
}
.npr-footer a:hover { border-bottom-color: var(--accent-amber); }

/* =====================================================
   INLINE SVG DIAGRAMS (inside FAQ answers)
   ===================================================== */
.npr-diagram {
  margin: 0.8em 0 0.3em;
  padding: 0.7em 0.8em 0.5em;
  background: var(--bg-darkest);
  border: 1px solid var(--border-thin);
  border-radius: var(--radius-sm);
  text-align: center;
}
.npr-diagram svg {
  width: 100%;
  max-width: 620px;
  height: auto;
  display: block;
  margin: 0 auto;
}
.npr-diagram-caption {
  font-size: 0.78em;
  color: var(--text-faint);
  font-style: italic;
  margin: 0.4em 0 0;
  letter-spacing: 0.02em;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 768px) {
  .npr-card-grid { grid-template-columns: 1fr; }
  .npr-split { grid-template-columns: 1fr; }
  .npr-zerohp-grid { grid-template-columns: 1fr; }
  .npr-modal-overlay { padding: 0.5em; }
  .npr-modal { max-height: 94vh; }
  .npr-modal-body { padding: 0.9em 1em 1.2em; }
  .npr-modal-title-wrap h2 { font-size: 1.15em; }
  .npr-detail-icon { width: 38px; height: 38px; font-size: 1.1em; }
  .npr-detail-icon img { width: 24px; height: 24px; }
}

/* Inline code */
.npr-detail-content code {
  font-family: var(--font-code);
  background: var(--bg-darkest);
  padding: 0.1em 0.4em;
  border-radius: 3px;
  font-size: 0.88em;
  color: var(--accent-amber);
  border: 1px solid var(--border-thin);
}
