/* ==========================================================================
   Prism Ruins — secondary pages
   Same chrome/typography as home (body also has .ruins-home).
   Load: ruins-home.css → ruins-pages.css
   ========================================================================== */

body.ruins-page {
  /* inherit home tokens via shared ruins-home.css */
}

/* --------------------------------------------------------------------------
   Fixed chamber veil (page-specific art)
   -------------------------------------------------------------------------- */

body.ruins-page .page-veil {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background-color: var(--ru-bg, #090b0e);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

body.ruins-page .page-veil::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(9, 11, 14, 0.55) 0%,
      rgba(9, 11, 14, 0.72) 45%,
      rgba(9, 11, 14, 0.9) 100%
    ),
    radial-gradient(52% 34% at 12% 8%, rgba(44, 142, 125, 0.14), transparent 70%),
    radial-gradient(48% 32% at 88% 26%, rgba(104, 64, 135, 0.16), transparent 72%);
}

body.ruins-page .page-veil::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.28;
  background-image:
    linear-gradient(rgba(243, 240, 232, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(243, 240, 232, 0.02) 1px, transparent 1px);
  background-size: 64px 64px;
}

body.features-page .page-veil { background-image: url("media/chamber-feat.png"); }
body.download-page .page-veil { background-image: url("media/chamber-dl.png"); }
body.guides-page .page-veil { background-image: url("media/chamber-guides.png"); }
body.faq-page .page-veil { background-image: url("media/chamber-faq.png"); }
body.trust-page .page-veil { background-image: url("media/chamber-trust.png"); }
body.error-page .page-veil { background-image: none; background-color: var(--ru-bg); }

body.ruins-page .global-prism-lighting,
body.ruins-page .page-lights,
body.ruins-page .page-cubes {
  display: none !important;
}

/* --------------------------------------------------------------------------
   Stage + hero
   -------------------------------------------------------------------------- */

body.ruins-page .vault-stage.page-stage,
body.ruins-page #vault-stage {
  position: relative;
  z-index: 1;
  min-height: 60vh;
  padding-bottom: clamp(2rem, 5vh, 3.5rem);
  background: transparent !important;
  background-image: none !important;
  background-color: transparent !important;
}

body.ruins-page .vault-stage::before,
body.ruins-page #vault-stage::before {
  display: none !important;
  content: none !important;
}

body.ruins-page .crumb {
  display: block;
  padding: calc(var(--ru-header, 72px) + 1.1rem) var(--ru-gutter) 0.35rem;
  color: var(--ru-muted);
  font-size: 0.86rem;
  text-align: center;
}

body.ruins-page .crumb a {
  color: var(--ru-teal);
  text-decoration: none;
}

body.ruins-page .crumb a:hover {
  text-decoration: underline;
}

body.ruins-page .page-hero,
body.ruins-page .feat-hero,
body.ruins-page .dl-hero,
body.ruins-page .guide-hero,
body.ruins-page .faq-hero,
body.ruins-page .trust-hero {
  padding-top: clamp(1.2rem, 3vh, 2rem);
  padding-bottom: clamp(1.6rem, 4vh, 2.4rem);
  text-align: center;
  background: transparent !important;
}

body.ruins-page .page-hero-inner,
body.ruins-page .feat-hero-inner {
  position: relative;
  text-align: center;
}

body.ruins-page .page-hero-inner::before,
body.ruins-page .feat-hero-inner::before,
body.ruins-page .dl-hero .release-console::before {
  content: "";
  position: absolute;
  inset: -40px -20px;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(
    ellipse at center,
    rgba(9, 11, 14, 0.78),
    rgba(9, 11, 14, 0.35) 55%,
    transparent 75%
  );
}

body.ruins-page .rune-kicker,
body.ruins-page .nx-kicker {
  justify-content: center;
}

body.ruins-page .page-h1,
body.ruins-page h1.rune-title {
  margin: 0.35rem auto 0.75rem;
  max-width: 18ch;
  font-size: clamp(2rem, 5vw, 3.2rem);
  text-align: center;
}

body.ruins-page .page-hero .soft-copy,
body.ruins-page .feat-hero .soft-copy,
body.ruins-page .dl-hero .soft-copy {
  margin-inline: auto;
  max-width: 42rem;
  text-align: center;
}

body.ruins-page .feat-hero-actions,
body.ruins-page .dl-hero-actions,
body.ruins-page .page-hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.15rem;
}

body.ruins-page .alcove {
  background: transparent !important;
}

body.ruins-page .alcove > .alcove-wrap > .rune-title,
body.ruins-page .alcove > .alcove-wrap > .rune-kicker,
body.ruins-page .alcove > .alcove-wrap > h1,
body.ruins-page .alcove > .alcove-wrap > h2,
body.ruins-page .alcove > .alcove-wrap > h3,
body.ruins-page .release-console .rune-title,
body.ruins-page .release-console .rune-kicker {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

body.ruins-page .alcove > .alcove-wrap > .rune-kicker,
body.ruins-page .release-console .rune-kicker,
body.ruins-page .page-hero .rune-kicker,
body.ruins-page .feat-hero .rune-kicker,
body.ruins-page .dl-hero .rune-kicker {
  display: flex;
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  justify-content: center;
}

body.ruins-page .alcove > .alcove-wrap > .soft-copy,
body.ruins-page .alcove > .alcove-wrap > .rune-title + .soft-copy,
body.ruins-page .alcove > .alcove-wrap > h2 + .soft-copy,
body.ruins-page .alcove > .alcove-wrap > h1 + .soft-copy {
  margin-inline: auto;
  text-align: center;
}

/* keep panel/table content left-aligned */
body.ruins-page .stone-panel,
body.ruins-page .gather-panel,
body.ruins-page .platform-row,
body.ruins-page .status-board,
body.ruins-page .faq-row,
body.ruins-page table,
body.ruins-page .crypt-foot {
  text-align: left;
}

/* --------------------------------------------------------------------------
   Feature galleries / screenshots
   -------------------------------------------------------------------------- */

body.ruins-page .feat-gallery {
  display: grid;
  gap: clamp(1rem, 2.5vw, 1.4rem);
  margin-top: 1.35rem;
}

body.ruins-page .feat-gallery-pair {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.ruins-page .feat-gallery-solo {
  grid-template-columns: minmax(0, 1fr);
  max-width: 760px;
  margin-inline: auto;
}

body.ruins-page .feat-shot,
body.ruins-page .stone-frame.feat-shot {
  margin: 0;
  overflow: hidden;
}

body.ruins-page .feat-shot-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

body.ruins-page .feat-shot img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
  object-position: top center;
  background: #0a0c0f;
}

body.ruins-page .feat-shot figcaption {
  padding: 0.7rem 0.9rem 0.9rem;
  color: var(--ru-muted);
  font-size: 0.88rem;
  text-align: center;
}

body.ruins-page .feat-shot-label {
  margin-left: 0.35rem;
}

body.ruins-page .sq {
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  margin-right: 0.25rem;
  vertical-align: middle;
}

body.ruins-page .sq.teal { background: var(--ru-teal); box-shadow: 0 0 8px rgba(112, 217, 192, 0.6); }
body.ruins-page .sq.violet { background: var(--ru-purple); box-shadow: 0 0 8px rgba(166, 107, 212, 0.55); }
body.ruins-page .sq.moss { background: #6fd96a; box-shadow: 0 0 8px rgba(111, 217, 106, 0.45); }

/* --------------------------------------------------------------------------
   Download page
   -------------------------------------------------------------------------- */

body.ruins-page .release-console {
  position: relative;
  max-width: 42rem;
  margin: 0 auto;
  padding: clamp(1.3rem, 3vw, 1.8rem);
  border: 1px solid var(--ru-edge);
  border-radius: var(--ru-radius);
  background: linear-gradient(160deg, rgba(52, 58, 62, 0.55), rgba(11, 14, 17, 0.92));
  box-shadow: var(--ru-carve), 0 20px 50px rgba(0, 0, 0, 0.45);
}

body.ruins-page .status-board {
  display: grid;
  gap: 0.45rem;
  margin: 1rem 0 1.2rem;
  text-align: left;
}

body.ruins-page .status-board .row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid rgba(243, 240, 232, 0.06);
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.22);
  font-size: 0.9rem;
  color: var(--ru-soft);
}

body.ruins-page .status-board .ok {
  color: var(--ru-teal);
  font-weight: 600;
}

body.ruins-page .platform-row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  margin: 0 0 1rem;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--ru-edge);
  border-radius: var(--ru-radius);
  background: linear-gradient(160deg, rgba(52, 58, 62, 0.45), rgba(11, 14, 17, 0.9));
  box-shadow: var(--ru-carve), inset 3px 0 0 color-mix(in srgb, var(--edge, var(--ru-teal)) 70%, transparent);
  transition: transform 0.22s var(--ru-ease), border-color 0.22s ease;
}

body.ruins-page .platform-row:hover {
  transform: translateY(-3px);
  border-color: rgba(112, 217, 192, 0.28);
}

body.ruins-page .plat-main {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

body.ruins-page .platform-ico {
  width: 1.6rem;
  height: 1.6rem;
  flex: 0 0 auto;
  color: var(--ru-teal);
  margin-top: 0.15rem;
}

body.ruins-page .plat-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

body.ruins-page .dl-card,
body.ruins-page .guide-card,
body.ruins-page .content-panel,
body.ruins-page .prism-card,
body.ruins-page .tree,
body.ruins-page .trust-grid > *,
body.ruins-page .guide-rail,
body.ruins-page details.faq-item {
  border: 1px solid var(--ru-edge);
  border-radius: var(--ru-radius);
  background: linear-gradient(158deg, rgba(52, 58, 62, 0.5), rgba(11, 14, 17, 0.92));
  box-shadow: var(--ru-carve), 0 14px 34px rgba(0, 0, 0, 0.38);
}

body.ruins-page .dl-grid,
body.ruins-page .guide-grid,
body.ruins-page .trust-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  margin-top: 1.2rem;
}

body.ruins-page .dl-card,
body.ruins-page .guide-card {
  padding: 1.15rem 1.2rem;
  transition: transform 0.22s var(--ru-ease), border-color 0.22s ease;
}

body.ruins-page .dl-card:hover,
body.ruins-page .guide-card:hover {
  transform: translateY(-3px);
  border-color: rgba(112, 217, 192, 0.3);
}

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */

body.ruins-page .faq-row,
body.ruins-page .nx-item,
body.ruins-page [data-accordion-item] {
  border: 1px solid var(--ru-edge);
  border-radius: var(--ru-radius);
  background: linear-gradient(160deg, rgba(37, 41, 44, 0.65), rgba(11, 14, 17, 0.92));
  box-shadow: var(--ru-carve);
  margin-bottom: 0.55rem;
  overflow: hidden;
}

body.ruins-page .faq-row > button,
body.ruins-page [data-accordion-btn] {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1.1rem;
  border: 0;
  background: transparent;
  color: var(--ru-ink);
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

body.ruins-page .faq-row .panel,
body.ruins-page [data-accordion-panel] {
  padding: 0 1.1rem 1rem;
  color: var(--ru-soft);
}

body.ruins-page .faq-row.is-open,
body.ruins-page [data-accordion-item].is-open {
  border-color: rgba(166, 107, 212, 0.35);
  box-shadow: var(--ru-carve), inset 3px 0 0 rgba(166, 107, 212, 0.55);
}

body.ruins-page #faq-tabs,
body.ruins-page .faq-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin: 1rem 0 1.25rem;
}

body.ruins-page #faq-tabs button,
body.ruins-page .faq-tabs button {
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--ru-edge);
  border-radius: var(--ru-radius);
  background: rgba(16, 20, 25, 0.85);
  color: var(--ru-soft);
  cursor: pointer;
}

body.ruins-page #faq-tabs button.is-active,
body.ruins-page .faq-tabs button[aria-selected="true"] {
  border-color: rgba(112, 217, 192, 0.4);
  color: var(--ru-teal);
}

/* --------------------------------------------------------------------------
   Trust / misc tables
   -------------------------------------------------------------------------- */

body.ruins-page table,
body.ruins-page .cap-table,
body.ruins-page .board-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

body.ruins-page th,
body.ruins-page td {
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid rgba(243, 240, 232, 0.07);
  text-align: left;
}

body.ruins-page th {
  color: var(--ru-soft);
  font-weight: 600;
}

body.ruins-page .text-link,
body.ruins-page a.text-link {
  color: var(--ru-teal);
}

/* utility leftovers from old pages */
body.ruins-page .mb-2 { margin-bottom: 0.5rem; }
body.ruins-page .mb-4 { margin-bottom: 1rem; }
body.ruins-page .mb-6 { margin-bottom: 1.35rem; }
body.ruins-page .mb-8 { margin-bottom: 1.75rem; }
body.ruins-page .pt-6 { padding-top: 0; }
body.ruins-page .pt-8 { padding-top: clamp(1.5rem, 4vh, 2.5rem); }

body.ruins-page .nx-btn,
body.ruins-page .orb-btn {
  /* home button styles already apply */
}


/* --------------------------------------------------------------------------
   Centered guide / article content
   -------------------------------------------------------------------------- */

body.ruins-page.guides-page .guide-desktop-rail {
  display: none !important;
}

body.ruins-page.guides-page .alcove-wrap.grid {
  display: block !important;
}

body.ruins-page.guides-page .guide-mobile-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 0 auto 1.75rem;
  max-width: 52rem;
}

body.ruins-page.guides-page .guide-mobile-tabs a,
body.ruins-page.guides-page .guide-rail a {
  display: inline-flex;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--ru-edge);
  border-radius: var(--ru-radius);
  background: rgba(16, 20, 25, 0.85);
  color: var(--ru-soft);
  text-decoration: none;
  font-size: 0.86rem;
}

body.ruins-page.guides-page .guide-mobile-tabs a:hover {
  border-color: rgba(112, 217, 192, 0.4);
  color: var(--ru-teal);
}

body.ruins-page.guides-page article,
body.ruins-page.guides-page article.mb-14 {
  max-width: 44rem;
  margin-inline: auto;
  margin-bottom: 3rem;
  text-align: center;
}

body.ruins-page.guides-page article .rune-kicker {
  display: flex;
  width: fit-content;
  margin-inline: auto;
  justify-content: center;
}

body.ruins-page.guides-page article .rune-title {
  text-align: center;
  margin-inline: auto;
}

body.ruins-page.guides-page .callout {
  max-width: 40rem;
  margin: 0.9rem auto 1.1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--ru-edge);
  border-radius: var(--ru-radius);
  background: rgba(16, 20, 25, 0.88);
  text-align: center;
  color: var(--ru-soft);
  font-size: 0.94rem;
}

body.ruins-page.guides-page .callout.error {
  border-color: rgba(228, 81, 118, 0.35);
  box-shadow: inset 3px 0 0 rgba(228, 81, 118, 0.55);
}

body.ruins-page.guides-page .callout.fixed,
body.ruins-page.guides-page .callout.check {
  border-color: rgba(112, 217, 192, 0.3);
  box-shadow: inset 3px 0 0 rgba(112, 217, 192, 0.5);
}

body.ruins-page.guides-page .step-seq {
  display: grid;
  gap: 0.75rem;
  max-width: 40rem;
  margin: 0 auto 1rem;
  text-align: center;
}

body.ruins-page.guides-page .step-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--ru-edge);
  border-radius: var(--ru-radius);
  background: linear-gradient(160deg, rgba(52, 58, 62, 0.45), rgba(11, 14, 17, 0.92));
  box-shadow: var(--ru-carve);
  text-align: center;
}

body.ruins-page.guides-page .step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.2rem;
  height: 2.2rem;
  padding: 0 0.45rem;
  border-radius: 3px;
  background: color-mix(in srgb, var(--step, var(--ru-teal)) 22%, transparent);
  color: var(--step, var(--ru-teal));
  font-family: var(--ru-display);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
}

body.ruins-page.guides-page .step-row .font-semibold {
  margin: 0 0 0.25rem;
  color: var(--ru-ink);
  font-weight: 650;
  text-align: center;
}

body.ruins-page.guides-page .step-row .soft-copy {
  margin: 0;
  text-align: center;
}

body.ruins-page.guides-page .page-hero-board,
body.ruins-page.guides-page .status-board {
  max-width: 28rem;
  margin-inline: auto;
  text-align: left;
}

/* Also center FAQ / Features section leads more consistently */
body.ruins-page .alcove > .alcove-wrap {
  text-align: center;
}

body.ruins-page .feat-gallery,
body.ruins-page .platform-row,
body.ruins-page .dl-grid,
body.ruins-page .guide-grid,
body.ruins-page .trust-grid,
body.ruins-page .slit-faq,
body.ruins-page [data-accordion],
body.ruins-page #faq-list,
body.ruins-page .board-shell,
body.ruins-page table,
body.ruins-page .status-board,
body.ruins-page .release-console,
body.ruins-page .plat-actions {
  text-align: left;
}

body.ruins-page .feat-gallery {
  margin-inline: auto;
}

body.ruins-page .feat-shot figcaption {
  text-align: center;
}

body.ruins-page .platform-row {
  max-width: 56rem;
  margin-inline: auto;
}

body.ruins-page .dl-grid,
body.ruins-page .guide-grid {
  max-width: 56rem;
  margin-inline: auto;
  text-align: left;
}

body.ruins-page [data-accordion],
body.ruins-page #faq-list,
body.ruins-page .slit-faq {
  max-width: 44rem;
  margin-inline: auto;
  text-align: left;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 900px) {
  body.ruins-page .feat-gallery-pair {
    grid-template-columns: 1fr;
  }

  body.ruins-page .platform-row {
    grid-template-columns: 1fr;
  }

  body.ruins-page .plat-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  body.ruins-page .page-h1 {
    max-width: 14ch;
  }
}
