/* nokey — cards, chips, TOC, FAQ, code */

/* ----- TOC ----- */
.toc {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 0 0 24px;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}
.toc__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.toc__head::-webkit-details-marker { display: none; }
.toc__title {
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.toc__chevron {
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--amber);
  border-bottom: 2px solid var(--amber);
  transform: rotate(45deg);
  transition: transform .18s;
  flex-shrink: 0;
}
.toc[open] .toc__chevron { transform: rotate(-135deg); }
.toc__list {
  margin: 0;
  padding: 10px 16px 14px 36px;
  list-style: decimal;
  border-top: 1px solid var(--line);
}
.toc__list li { margin: 6px 0; }
.toc__list a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px dotted var(--line);
}
.toc__list a:hover {
  color: var(--amber);
  border-bottom-color: var(--amber);
}

/* ----- Script card ----- */
.scard {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .15s;
  height: 100%;
  position: relative;
}
.scard:hover { border-color: var(--amber); }
.scard--flag { }
.scard__hairline {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--amber);
  z-index: 1;
}
.scard__featured {
  margin: 0;
  padding: 6px 14px;
  background: var(--amber-bg);
  color: var(--amber);
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
}
.scard__cover {
  aspect-ratio: 16 / 9;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.scard__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.scard__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px 16px;
  flex: 1;
}
.scard__games {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.scard__title {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.3;
}
.scard__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.scard__desc {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.scard__features {
  margin: 0;
  padding-left: 1.15em;
  color: var(--ink-soft);
  font-size: 0.86rem;
}
.scard__features li { margin-bottom: 3px; }
.scard__fill { flex: 1; min-height: 4px; }
.scard__title a {
  color: var(--ink);
  text-decoration: none;
}
.scard__title a:hover { color: var(--amber); }
.scard__acts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.scard__more,
.scard__dl {
  flex: 1 1 auto;
  text-align: center;
  min-width: 0;
}
.scard__cover {
  display: block;
  text-decoration: none;
}

/* ----- Single script page ----- */
.crumbs {
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin: 0 0 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  align-items: center;
}
.crumbs a {
  color: var(--ink-soft);
  text-decoration: none;
}
.crumbs a:hover { color: var(--amber); }
.crumbs__sep { opacity: 0.5; }

.single-script__cover {
  margin: 0 0 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
}
.single-script__cover img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.single-script__sub {
  margin: -0.3em 0 0.8em;
  color: var(--ink-soft);
  font-size: 1.02rem;
}

.meta-table {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 0 0 18px;
  overflow: hidden;
}
.meta-table__row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}
.meta-table__row:last-child { border-bottom: 0; }
.meta-table__k { color: var(--ink-soft); }
.meta-table__v { color: var(--ink); margin: 0; }
@media (max-width: 520px) {
  .meta-table__row { grid-template-columns: 1fr; gap: 2px; }
}

/* ----- Chips ----- */
.chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--bg);
  color: var(--ink-soft);
  border: 1px solid var(--line);
}
.chip--keyless {
  background: var(--amber-bg);
  color: var(--ok);
  border-color: transparent;
}
.chip--ok {
  color: var(--ok);
  border-color: rgba(52, 211, 153, 0.25);
  background: rgba(52, 211, 153, 0.08);
}
.chip--warn {
  color: var(--warn);
  border-color: rgba(251, 191, 36, 0.25);
  background: rgba(251, 191, 36, 0.08);
}
.chip--game {
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ink-soft);
}

/* ----- FAQ ----- */
.qa {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  padding: 0;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}
.qa summary {
  cursor: pointer;
  padding: 12px 14px;
  font-weight: 500;
  list-style: none;
  color: var(--ink);
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: '+';
  float: right;
  color: var(--amber);
  font-weight: 600;
}
.qa[open] summary::after { content: '−'; }
.qa p {
  margin: 0;
  padding: 0 14px 14px;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* ----- Code ----- */
.code {
  background: var(--code-bg);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin: 12px 0 16px;
  border: 1px solid var(--line);
}
.code__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
}
.code__label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.code__copy {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
}
.code__copy:hover {
  border-color: var(--amber);
  color: var(--amber);
}
.code pre {
  margin: 0;
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-all;
  overflow-x: auto;
}

.billboard {
  min-height: 0;
}
.billboard--gate {
  margin: 16px 0;
  min-height: 90px;
}

/* ----- Freshness + answer-first (GEO) ----- */
.stamp-date {
  margin: 0 0 14px;
  font-size: 0.85rem;
  color: var(--ink-soft);
  font-family: var(--font-mono);
}
.stamp-date time { color: var(--ink); }

.answer-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--amber);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin: 0 0 18px;
  max-width: none;
  width: 100%;
  box-sizing: border-box;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.55;
}
.answer-box strong { color: var(--ink); font-weight: 500; }

/* ----- Longread ----- */
.longread {
  padding-bottom: 24px;
  width: 100%;
}
.longread section {
  margin: 40px 0;
  width: 100%;
}
.longread section > h2 {
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.longread section > h3 {
  margin: 1.25em 0 0.5em;
  font-size: 1.05rem;
}
/* Text fills the centered .wrap — no narrow 68ch column that sticks left on desktop */
.longread p {
  max-width: none;
  color: var(--ink-soft);
}
.longread .lead {
  max-width: 52rem;
  font-size: 1.05rem;
  color: var(--ink-soft);
}
.longread strong {
  color: var(--ink);
  font-weight: 500;
}
.longread ul,
.longread ol {
  max-width: none;
  color: var(--ink-soft);
}
.longread li {
  margin-bottom: 0.4em;
}

.placard {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--amber);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin: 18px 0;
  max-width: none;
  width: 100%;
  box-sizing: border-box;
  color: var(--ink-soft);
}
.placard__h {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber);
}
.placard p:last-child { margin-bottom: 0; }

.ledger-wrap {
  overflow-x: auto;
  margin: 16px 0 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  width: 100%;
  max-width: none;
}
.ledger {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 520px;
}
.ledger th,
.ledger td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.ledger th {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: var(--bg);
}
.ledger tr:last-child td { border-bottom: 0; }
.ledger td {
  color: var(--ink-soft);
}
.ledger td:first-child {
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
}

.type-grid {
  display: grid;
  gap: 12px;
  margin: 16px 0;
  width: 100%;
}
@media (min-width: 640px) {
  .type-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1000px) {
  .type-grid { grid-template-columns: repeat(3, 1fr); }
}
.type-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  transition: border-color .15s;
}
.type-card:hover { border-color: var(--amber); }
.type-card h3 {
  margin: 0 0 6px;
  font-size: 0.98rem;
}
.type-card p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ink-soft);
  max-width: none;
}
.type-card__en {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--amber);
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}

.rungs {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: rung;
  max-width: none;
  width: 100%;
}
.rungs__step {
  position: relative;
  padding: 14px 14px 14px 52px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  margin-bottom: 10px;
  counter-increment: rung;
}
.rungs__step::before {
  content: counter(rung, decimal-leading-zero);
  position: absolute;
  left: 12px;
  top: 14px;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--amber);
}
.rungs__step h3 { margin: 0 0 6px; }
.rungs__step p {
  margin: 0;
  max-width: none;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.myth {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  margin-bottom: 10px;
  overflow: hidden;
  max-width: none;
  width: 100%;
}
.myth__bad {
  margin: 0;
  padding: 10px 14px;
  background: var(--amber-bg);
  color: var(--amber);
  font-weight: 500;
  font-size: 0.92rem;
}
.myth__ok {
  margin: 0;
  padding: 10px 14px;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.term-list {
  margin: 0;
  padding: 0;
  list-style: none;
  max-width: none;
  width: 100%;
}
.term-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.term-list li:last-child { border-bottom: 0; }
.term-list strong {
  color: var(--ink);
  font-weight: 500;
}

.inline-links {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}
.inline-links a {
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.inline-links a:hover {
  border-bottom-color: var(--amber);
}

.final-cta {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 22px;
  margin: 48px 0 16px;
  text-align: center;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}
.final-cta h2 {
  margin-bottom: 8px;
  border: 0;
  padding: 0;
}
.final-cta p {
  margin: 0 auto 18px;
  color: var(--ink-soft);
  max-width: 48ch;
}
.final-cta__acts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 16px 0 12px;
  max-width: none;
  width: 100%;
}
@media (min-width: 640px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
}
.stats-grid__i {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 10px;
  text-align: center;
}
.stats-grid__n {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--amber);
  line-height: 1.2;
}
.stats-grid__l {
  display: block;
  font-size: 0.75rem;
  color: var(--ink-soft);
  margin-top: 4px;
  line-height: 1.3;
}

.gtile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s;
}
.gtile:hover {
  border-color: var(--amber);
  text-decoration: none;
}
.gtile__name {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ink);
  font-size: 0.98rem;
}
.gtile__count {
  font-size: 0.82rem;
  color: var(--ink-soft);
  font-family: var(--font-mono);
}

.cluster-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
  max-width: none;
  width: 100%;
}
.cluster-list li {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.cluster-list strong {
  display: block;
  color: var(--ink);
  margin-bottom: 4px;
  font-weight: 500;
}
