﻿/* ============================================================
   PS3 WORLD — STYLESHEET
   ------------------------------------------------------------
   Table of contents:
     01. Design Tokens (CSS Variables)
     02. Reset & Base
     03. Layout Utilities
     04. WIP Notice Banner
     05. Site Header
     06. Primary Navigation (desktop)
     07. Navigation Dropdowns
     08. Mobile Navigation
     09. Hero Section
     10. Search Bar
     11. Section Headers
     12. Category Grid
     13. Cards Grid
     14. Placeholder Blocks
     15. Category Header
     16. Empty State
     17. Site Footer
     18. Back to Top
     19. Lightbox
     20. Prose Content
     21. Contact Form
     22. Nav Widget
     23. Essentials Widget
     24. Button
     25. Feature Row + Slideshow
     26. Page-wide Animated Waves (XMB-style)
     27. Tool Block (ISO Tools page)
     28. Info Box — Purple (Tutorial)
     29. Info Box — Blue (Neutral)
     30. Tutorial Details
     31. 404 Page — Centered Hero
     32. About Page — Layout
     33. Contact Page — Layout
     34. Homebrew Page — Category Nav Grid
     35. Warning Box (Red)
     36. Repository Box — Blue
     37. Repository Box — Green
     38. Green Button
     39. Manual List
     40. Sources List
     41. Useful Links List
     42. Responsive — Tablet (≤720px)
     43. Responsive — Mobile (≤480px)
     44. iOS Performance
     45. Accessibility — Reduced Motion
     46. Stacking — chrome above waves
     47. What's New
   ============================================================ */


/* ============================================================
   01. DESIGN TOKENS
   ============================================================ */
:root {
  /* Backgrounds */
  --bg: #05070d;
  --bg-2: #0a0e18;
  --card: #10141f;
  --card-2: #161b28;

  /* Borders */
  --border: #1f2533;
  --border-2: #2c3549;

  /* Text */
  --text: #eef1f7;
  --text-2: #a2acc0;
  --text-3: #67718a;

  /* Accent colors */
  --ps-blue: #0070d1;
  --ps-blue-2: #2b8fff;
  --ps-cyan: #4ad9ff;
  --p3t: #56e39f;

  /* Radii */
  --radius: 14px;
  --radius-sm: 8px;

  /* Shadows */
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px rgba(43, 143, 255, 0.15);

  /* Motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);

  /* Fonts */
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

/* Dividers */
hr.solid {
  border: none;
  border-bottom: 2px solid rgba(74, 158, 255, 0.2);
  position: relative;
  margin: 24px 0;
}

hr.solid::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, #4a9eff, transparent);
}


/* ============================================================
   02. RESET & BASE
   ============================================================ */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html,
body {
  margin: 0;
  padding: 0;
}

body {
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  background:
    linear-gradient(rgba(5, 7, 13, 0.95), rgba(5, 7, 13, 0.95)),
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(43, 143, 255, 0.08), transparent),
    radial-gradient(ellipse 60% 50% at 80% 100%, rgba(74, 217, 255, 0.04), transparent);
  background-attachment: fixed;
}

/* Form elements inherit the site font */
button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

a {
  color: var(--ps-blue-2);
  text-decoration: none;
  transition: color 0.15s var(--ease);
}

a:hover { color: var(--ps-cyan); }

img { display: block; max-width: 100%; }

h1,
h2,
h3,
h4 {
  line-height: 1.15;
  margin: 0 0 0.5em;
}

h1 {
  font-size: 48px;
  text-align: center;
}

h2 {
  font-size: 32px;
}

h3 { font-size: 20px; }
h4 { font-size: 16px; }


/* ============================================================
   03. LAYOUT UTILITIES
   ============================================================ */
.wrap {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 28px;
}

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

.reveal.in {
  opacity: 1;
  transform: none;
}
main {
  padding-top: 24px;
}

/* ============================================================
   04. WIP NOTICE BANNER
   ============================================================ */
.wip-notice-compact {
  background: linear-gradient(145deg, rgb(45, 35, 20), rgb(55, 42, 22));
  color: rgb(200, 185, 165);
  padding: 10px 20px;
  text-align: center;
  border-bottom: 2px solid rgba(255, 200, 50, 0.15);
  font-size: 0.9rem;
  letter-spacing: 0.3px;
  position: relative;
}

.wip-notice-compact .badge {
  display: inline-block;
  background: rgba(255, 200, 50, 0.1);
  color: #ffcc44;
  padding: 2px 12px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: 1px solid rgba(255, 200, 50, 0.1);
  margin-right: 10px;
}

.wip-notice-compact strong {
  color: #ffcc44;
  font-weight: 600;
}


/* ============================================================
   05. SITE HEADER
   ============================================================ */
header.site {
  border-bottom: 1px solid var(--border);
  background: rgba(5, 7, 13, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 100;
  animation: slideDown 0.4s var(--ease);
}

@keyframes slideDown {
  from { transform: translateY(-100%); }
  to   { transform: none; }
}

header.site .wrap {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 68px;
}

.logo {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.3px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo:hover { color: var(--text); }

.logo-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--ps-blue) 0%, var(--ps-cyan) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 0 20px rgba(74, 217, 255, 0.35);
  letter-spacing: -0.5px;
  animation: pulseGlow 3s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 20px rgba(74, 217, 255, 0.35); }
  50%      { box-shadow: 0 0 30px rgba(74, 217, 255, 0.6); }
}


/* ============================================================
   06. PRIMARY NAVIGATION (desktop)
   ============================================================ */
nav.main {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

nav.main a {
  color: var(--text-2);
  padding: 9px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.15s var(--ease);
}

nav.main a:hover {
  color: var(--text);
  background: var(--card);
}

nav.main a.active {
  color: var(--text);
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--border);
}


/* ============================================================
   07. NAVIGATION DROPDOWNS
   ============================================================ */
nav.main .nav-item {
  position: relative;
  display: inline-block;
}

nav.main .nav-item > a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-2);
  padding: 9px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.15s var(--ease);
  white-space: nowrap;
}

nav.main .nav-item > a:hover,
nav.main .nav-item.open > a {
  color: var(--text);
  background: var(--card);
}

nav.main .caret {
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.55;
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}

nav.main .nav-item:hover .caret,
nav.main .nav-item.open .caret {
  opacity: 1;
  transform: rotate(180deg);
}

nav.main .dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 220px;
  padding: 8px 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow), 0 0 0 1px rgba(43, 143, 255, 0.06);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s var(--ease),
              transform 0.2s var(--ease),
              visibility 0.2s var(--ease);
  z-index: 200;
}

nav.main .dropdown::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 10px;
}

nav.main .nav-item:hover .dropdown,
nav.main .nav-item.open .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

nav.main .dropdown a {
  display: block;
  padding: 10px 18px;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  border-radius: 0;
  transition: all 0.15s var(--ease);
  white-space: nowrap;
}

nav.main .dropdown a:hover {
  color: var(--ps-cyan);
  background: rgba(43, 143, 255, 0.08);
  padding-left: 22px;
}

nav.main .dropdown a.dropdown-all {
  color: var(--ps-cyan);
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
  padding-bottom: 12px;
}

nav.main .dropdown a.dropdown-all strong {
  font-weight: 700;
  letter-spacing: 0.3px;
}
/* Parent link gets a subtle glow when its dropdown is open OR page is active */
nav.main .nav-item > a.active {
  color: var(--text);
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--border);
}

/* Dropdown accent — the panel picks up a cyan left border when the parent is active */
nav.main .nav-item > a.active + .dropdown {
  border-top: 2px solid var(--ps-blue-2);
}

/* Inside a dropdown, highlight whichever link matches the current page */
nav.main .dropdown a.active {
  color: var(--ps-cyan);
  background: rgba(74, 217, 255, 0.08);
}

nav.main .dropdown a.active::before {
  position: absolute;
  left: 8px;
  color: var(--ps-cyan);
  font-size: 11px;
  opacity: 0.9;
}

/* ============================================================
   08. MOBILE NAVIGATION
   ============================================================ */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: none;
  border: 0;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.15s var(--ease);
}

.nav-toggle:hover {
  background: var(--card);
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }

  nav.main {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-left: 0;
    width: 100%;
    padding: 12px 18px 18px;
    background: rgba(5, 7, 13, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: max-height 0.35s var(--ease),
                opacity 0.25s var(--ease),
                visibility 0.25s var(--ease);
    z-index: 99;
  }

  nav.main.open {
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    opacity: 1;
    visibility: visible;
  }

  nav.main > a,
  nav.main .nav-item > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 14px 16px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
  }

  nav.main > a + a,
  nav.main .nav-item + .nav-item,
  nav.main > a + .nav-item,
  nav.main .nav-item + a {
    border-top: 1px solid var(--border);
  }

  nav.main .nav-item {
    display: block;
    width: 100%;
  }

  nav.main .dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: rgba(0, 0, 0, 0.18);
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s var(--ease);
  }

  nav.main .nav-item.open .dropdown {
    max-height: 500px;
    padding: 6px 0;
  }

  nav.main .dropdown::before { display: none; }

  nav.main .dropdown a {
    padding: 10px 16px 10px 28px;
    font-size: 14px;
    border-left: 2px solid var(--border);
    border-radius: 0;
  }

  nav.main .dropdown a:hover {
    padding-left: 32px;
    border-left-color: var(--ps-blue-2);
    background: rgba(43, 143, 255, 0.06);
  }

  nav.main .dropdown a.active {
    color: var(--ps-cyan);
    border-left-color: var(--ps-cyan);
    background: rgba(74, 217, 255, 0.06);
  }
}


/* ============================================================
   09. HERO SECTION
   ============================================================ */
.hero {
  position: relative;
  padding: 72px 0 40px;
  overflow: hidden;
  isolation: isolate;
}

.hero-waves {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.6;
}

.hero-waves svg {
  width: 100%;
  height: 100%;
  display: block;
}

.hero .wrap {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 52px;
  margin: 0 0 16px;
  letter-spacing: -2px;
  font-weight: 800;
  line-height: 1.05;
  background: linear-gradient(180deg, #fff 0%, #a2acc0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: fadeUp .6s var(--ease) backwards;
}

.hero p {
  color: var(--text-2);
  font-size: 18px;
  margin: 0;
  max-width: 620px;
  line-height: 1.6;
  animation: fadeUp .6s .1s var(--ease) backwards;
}

/* Hero wave animation — scoped to .hero-waves so it doesn't clash with .page-waves */
.hero-waves .wave {
  transform-origin: center;
  will-change: transform;
}

.hero-waves .wave-1 { animation: heroWaveA 9s  ease-in-out infinite; }
.hero-waves .wave-2 { animation: heroWaveB 11s ease-in-out infinite; }
.hero-waves .wave-3 { animation: heroWaveC 13s ease-in-out infinite; }

@keyframes heroWaveA {
  0%, 100% { transform: translate3d(0, 0, 0)      scaleY(1); }
  50%      { transform: translate3d(0, -18px, 0)  scaleY(1.04); }
}

@keyframes heroWaveB {
  0%, 100% { transform: translate3d(0, 0, 0)      scaleY(1); }
  50%      { transform: translate3d(0, -12px, 0)  scaleY(1.06); }
}

@keyframes heroWaveC {
  0%, 100% { transform: translate3d(0, 0, 0)      scaleY(1); }
  50%      { transform: translate3d(0, -8px, 0)   scaleY(1.08); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}


/* ============================================================
   10. SEARCH BAR
   ============================================================ */
.searchbar {
  display: flex;
  gap: 10px;
  margin: 28px 0 48px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
  max-width: 640px;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  animation: fadeUp 0.6s 0.3s var(--ease) backwards;
}

.searchbar:focus-within {
  border-color: var(--ps-blue);
  box-shadow: 0 0 0 4px rgba(43, 143, 255, 0.12);
}

.searchbar input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 15px;
  padding: 12px 16px;
  font-family: inherit;
}

.searchbar input::placeholder {
  color: var(--text-3);
}

.searchbar select {
  background: var(--bg-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
}

.searchbar select:focus {
  outline: none;
  border-color: var(--ps-blue);
}


/* ============================================================
   11. SECTION HEADERS
   ============================================================ */
h2.section {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--text-3);
  margin: 56px 0 24px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 14px;
}

h2.section::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border), transparent);
}

h2.section .count {
  color: var(--text-3);
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  font-size: 13px;
  padding: 4px 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
}


/* ============================================================
   12. CATEGORY GRID
   ============================================================ */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin: 24px 0 40px;
}

.cat-tile {
  display: block;
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--card);
  transition: transform 0.25s var(--ease),
              border-color 0.25s var(--ease),
              box-shadow 0.25s var(--ease);
  color: var(--text);
  text-decoration: none;
}

.cat-tile:hover {
  transform: translateY(-4px);
  border-color: var(--border-2);
  box-shadow: var(--shadow), var(--shadow-glow);
  color: var(--text);
}

.cat-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease), filter 0.3s var(--ease);
  filter: brightness(0.85) saturate(0.95);
}

.cat-tile:hover img {
  transform: scale(1.06);
  filter: brightness(1) saturate(1.1);
}

.cat-tile::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(5, 7, 13, 0.55) 65%, rgba(5, 7, 13, 0.95) 100%);
  pointer-events: none;
}

.cat-tile .tile-body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 20px 22px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cat-tile .tile-name {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1.2;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
  color: #fff;
}

.cat-tile .tile-meta {
  font-size: 12px;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cat-tile .tile-meta .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-3);
  display: inline-block;
}

.cat-tile .tile-arrow {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(5, 7, 13, 0.75);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--text-2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.25s var(--ease);
  z-index: 2;
}

.cat-tile:hover .tile-arrow {
  background: var(--ps-blue);
  color: #fff;
  border-color: var(--ps-blue-2);
  box-shadow: 0 0 20px rgba(43, 143, 255, 0.6);
  transform: translate(2px, -2px);
}


/* ============================================================
   13. CARDS GRID
   ============================================================ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s var(--ease),
              border-color 0.2s var(--ease),
              box-shadow 0.2s var(--ease);
  position: relative;
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--border-2);
  box-shadow: var(--shadow), 0 0 0 1px rgba(43, 143, 255, 0.15);
}

.card .thumb {
  aspect-ratio: 16 / 10;
  background: #03050a;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease);
}

.card:hover .thumb img {
  transform: scale(1.05);
}

.card .body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.card .title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  word-break: break-word;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card .author {
  font-size: 12px;
  color: var(--text-3);
  font-weight: 500;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: -4px;
}

.card .author::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ps-cyan);
  opacity: 0.7;
  flex-shrink: 0;
}

.card .author .name {
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
}

.card .meta {
  font-size: 11px;
  color: var(--text-3);
  display: flex;
  gap: 10px;
  margin-top: auto;
  font-weight: 500;
}

.card .meta span + span::before {
  content: '·';
  margin-right: 10px;
  color: var(--text-3);
}

.card .actions {
  display: flex;
  gap: 6px;
}

.card .actions a {
  flex: 1;
  text-align: center;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--text-2);
  transition: all 0.15s var(--ease);
  letter-spacing: 0.2px;
}

.card .actions a:hover {
  background: var(--card-2);
  color: var(--text);
  border-color: var(--border-2);
}

.card .actions a.p3t {
  border-color: rgba(86, 227, 159, 0.35);
  color: var(--p3t);
  background: rgba(86, 227, 159, 0.04);
}

.card .actions a.p3t:hover {
  background: rgba(86, 227, 159, 0.12);
  border-color: rgba(86, 227, 159, 0.6);
  color: #7fffbb;
}

.card .actions a.disabled {
  opacity: 0.3;
  pointer-events: none;
}


/* ============================================================
   14. PLACEHOLDER BLOCKS
   ============================================================ */
.placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-3);
  background: linear-gradient(135deg, rgba(43, 143, 255, 0.06), rgba(74, 217, 255, 0.03)),
              repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.008) 0px, rgba(255, 255, 255, 0.008) 8px, transparent 8px, transparent 16px);
  position: relative;
}

.placeholder::before {
  content: '';
  position: absolute;
  inset: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  pointer-events: none;
}

.placeholder .ph-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--ps-blue), var(--ps-cyan));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
  box-shadow: 0 0 24px rgba(74, 217, 255, 0.25);
  opacity: 0.8;
}

.placeholder .ph-text {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-3);
}


/* ============================================================
   15. CATEGORY HEADER
   ============================================================ */
.cat-header {
  padding: 48px 0 28px;
}

.cat-header .back {
  color: var(--text-3);
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  font-weight: 500;
  transition: color 0.15s var(--ease), gap 0.15s var(--ease);
}

.cat-header .back:hover {
  color: var(--ps-cyan);
  gap: 10px;
}

.cat-header h1 {
  font-size: 40px;
  margin: 0 0 8px;
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.1;
  background: linear-gradient(180deg, #fff 0%, #8fbaff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.cat-header .count {
  color: var(--text-2);
  font-size: 15px;
  font-weight: 500;
}

.cat-header .count b {
  color: var(--text);
  font-weight: 700;
}


/* ============================================================
   16. EMPTY STATE
   ============================================================ */
.empty {
  padding: 80px 24px;
  text-align: center;
  color: var(--text-3);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}


/* ============================================================
   17. SITE FOOTER
   ============================================================ */
footer.site {
  border-top: 1px solid var(--border);
  margin-top: 100px;
  padding: 36px 0;
  color: var(--text-3);
  font-size: 13px;
}

footer.site .wrap {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

footer.site .footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 4px;
}

footer.site .footer-links a {
  color: var(--text-2);
  text-decoration: none;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border-radius: 6px;
  transition: color 0.15s var(--ease), background 0.15s var(--ease);
}

footer.site .footer-links a:hover {
  color: var(--ps-cyan);
  background: var(--card);
}

footer.site .footer-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

footer.site .ps-mark {
  font-weight: 700;
  letter-spacing: 2px;
  font-size: 11px;
  color: var(--text-3);
  text-transform: uppercase;
}
footer.site .footer-links a.active {
  color: var(--ps-cyan);
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--border);
}

/* ============================================================
   18. BACK TO TOP
   ============================================================ */
#backToTop {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ps-blue), var(--ps-blue-2));
  color: #fff;
  border: 1px solid var(--ps-blue-2);
  box-shadow: 0 8px 32px rgba(43, 143, 255, 0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(20px) scale(0.8);
  pointer-events: none;
  transition: all 0.3s var(--ease);
  z-index: 90;
}

#backToTop.visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

#backToTop:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(43, 143, 255, 0.6), 0 0 0 8px rgba(74, 217, 255, 0.08);
}

#backToTop svg {
  width: 18px;
  height: 18px;
}


/* ============================================================
   19. LIGHTBOX
   ============================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.lightbox.open {
  display: flex;
  animation: lbIn 0.25s var(--ease);
}

@keyframes lbIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.lightbox .lb-stage {
  position: relative;
  max-width: 100%;
  max-height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  animation: lbZoom 0.3s var(--ease);
}

@keyframes lbZoom {
  from { opacity: 0; transform: scale(0.94); }
  to   { opacity: 1; transform: none; }
}

.lightbox img {
  max-width: 100%;
  max-height: 85vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.05);
  display: block;
}

.lightbox .lb-info {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  background: rgba(16, 20, 31, 0.9);
  border: 1px solid var(--border);
  border-radius: 999px;
  backdrop-filter: blur(12px);
  flex-shrink: 0;
}

.lightbox .lb-title {
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  max-width: 400px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lightbox .lb-author {
  color: var(--text-3);
  font-size: 12px;
  font-style: italic;
}

.lightbox .lb-size {
  color: var(--text-3);
  font-size: 12px;
}

.lightbox .lb-dl {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--ps-blue), var(--ps-blue-2));
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--ps-blue-2);
  box-shadow: 0 0 24px rgba(43, 143, 255, 0.5);
  transition: all 0.2s var(--ease);
  text-decoration: none;
}

.lightbox .lb-dl:hover {
  color: #fff;
  box-shadow: 0 0 36px rgba(74, 217, 255, 0.7);
  transform: translateY(-1px);
}

.lightbox .lb-dl.disabled {
  background: var(--bg-2);
  color: var(--text-3);
  border-color: var(--border);
  box-shadow: none;
  pointer-events: none;
}

.lightbox .lb-dl svg {
  width: 14px;
  height: 14px;
}

.lightbox .close {
  position: absolute;
  top: 24px;
  right: 28px;
  color: #fff;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.6;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.15s var(--ease);
  z-index: 2;
}

.lightbox .close:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.1);
  transform: rotate(90deg);
}


/* ============================================================
   20. PROSE CONTENT
   ============================================================ */
.prose {
  max-width: 760px;
  color: var(--text-2);
  font-size: 16px;
  line-height: 1.75;
}

.prose h2 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-3);
  font-weight: 700;
  margin: 48px 0 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.prose h2::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border), transparent);
}

.prose h3 {
  font-size: 17px;
  color: var(--text);
  margin: 28px 0 8px;
  font-weight: 600;
}

.prose p {
  margin: 0 0 18px;
}

.prose strong {
  color: var(--text);
  font-weight: 600;
}

.prose a {
  color: var(--ps-blue-2);
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s var(--ease);
}

.prose a:hover {
  color: var(--ps-cyan);
  border-bottom-color: var(--ps-cyan);
}

.prose ul,
.prose ol {
  padding-left: 22px;
  margin: 0 0 22px;
}

.prose li {
  margin-bottom: 8px;
}

.prose code {
  background: var(--card);
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 13px;
  font-family: var(--font-mono);
  color: var(--text);
  border: 1px solid var(--border);
}


/* ============================================================
   21. CONTACT FORM
   ============================================================ */
.contact-form {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  max-width: 640px;
  margin: 28px 0 0;
}

.contact-form .field {
  margin-bottom: 20px;
}

.contact-form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.contact-form label .required {
  color: #ff6666;
  margin-left: 4px;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form select,
.contact-form textarea {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
  border-color: var(--ps-blue);
  box-shadow: 0 0 0 4px rgba(43, 143, 255, 0.12);
}

.contact-form textarea {
  resize: vertical;
  min-height: 180px;
}

.contact-form select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a2acc0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}

.contact-form button,
.contact-form input[type="submit"] {
  background: linear-gradient(135deg, var(--ps-blue), var(--ps-blue-2));
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 10px;
  border: 1px solid var(--ps-blue-2);
  cursor: pointer;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  box-shadow: 0 0 24px rgba(43, 143, 255, 0.35);
  transition: all 0.2s var(--ease);
}

.contact-form button:hover,
.contact-form input[type="submit"]:hover {
  box-shadow: 0 0 36px rgba(74, 217, 255, 0.6);
  transform: translateY(-1px);
}

/* Honeypot — hidden from real users, visible to bots */
.contact-form .honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}


/* ============================================================
   22. NAV WIDGET
   ============================================================ */
.nav-widget {
  max-width: 100%;
  padding: 30px;
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  margin-bottom: 20px;
}

.nav-widget::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.nav-widget .widget-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid rgba(74, 158, 255, 0.2);
  position: relative;
}

.nav-widget .widget-header::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, #4a9eff, transparent);
}

.nav-widget .widget-title {
  color: #ffffff;
  font-size: 22px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin: 0;
}

.nav-widget .nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.nav-widget .nav-item {
  background: rgba(255, 255, 255, 0.03);
  border-left: 3px solid rgba(74, 158, 255, 0.3);
  border-radius: 8px;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.nav-widget .nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-left-color: #6db3ff;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
}

.nav-widget .nav-item > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 18px;
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  transition: color 0.3s ease, padding 0.3s ease;
  position: relative;
}

.nav-widget .nav-item > a::after {
  content: '→';
  font-size: 18px;
  line-height: 1;
  color: #4a9eff;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.nav-widget .nav-item:hover > a::after {
  opacity: 1;
  transform: translateX(0);
}

.nav-widget .nav-item > a:hover {
  color: #4a9eff;
  padding-left: 22px;
}

.nav-widget .sub-nav {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.35s ease,
              padding 0.35s ease;
  padding: 0;
}

.nav-widget .nav-item:hover .sub-nav {
  max-height: 400px;
  opacity: 1;
  padding: 6px 0;
}

.nav-widget .sub-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  color: #76cae9;
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: color 0.25s ease,
              background 0.25s ease,
              padding 0.25s ease,
              transform 0.25s ease,
              opacity 0.25s ease;
  position: relative;
  transform: translateX(-6px);
  opacity: 0;
}

.nav-widget .nav-item:hover .sub-nav a {
  transform: translateX(0);
  opacity: 1;
}

.nav-widget .nav-item:hover .sub-nav a:nth-child(1) { transition-delay: 0.05s; }
.nav-widget .nav-item:hover .sub-nav a:nth-child(2) { transition-delay: 0.08s; }
.nav-widget .nav-item:hover .sub-nav a:nth-child(3) { transition-delay: 0.11s; }
.nav-widget .nav-item:hover .sub-nav a:nth-child(4) { transition-delay: 0.14s; }
.nav-widget .nav-item:hover .sub-nav a:nth-child(5) { transition-delay: 0.17s; }
.nav-widget .nav-item:hover .sub-nav a:nth-child(6) { transition-delay: 0.20s; }
.nav-widget .nav-item:hover .sub-nav a:nth-child(7) { transition-delay: 0.23s; }

.nav-widget .sub-nav a::before {
  content: '›';
  font-size: 16px;
  line-height: 1;
  color: rgba(118, 202, 233, 0.5);
  transition: color 0.25s ease;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  transform: translateY(-1px);
}

.nav-widget .sub-nav a:hover {
  background: rgba(74, 158, 255, 0.08);
  color: #4a9eff;
  padding-left: 24px;
}

.nav-widget .sub-nav a:hover::before {
  color: #4a9eff;
}


/* ============================================================
   23. ESSENTIALS WIDGET
   ============================================================ */
.essential-resources {
  max-width: 100%;
  padding: 25px 30px;
  background: linear-gradient(145deg, rgb(28, 28, 28), rgb(45, 45, 45));
  border-radius: 12px;
  border: 1px solid rgba(255, 215, 0, 0.1);
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.essential-resources::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.03) 0%, transparent 70%);
  pointer-events: none;
}

.essential-resources .resources-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 2px solid rgba(255, 215, 0, 0.12);
  position: relative;
}

.essential-resources .resources-header::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 50px;
  height: 2px;
  background: linear-gradient(90deg, #ffd700, transparent);
}

.essential-resources .star-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(255, 215, 0, 0.08);
  border-radius: 50%;
  border: 1px solid rgba(255, 215, 0, 0.15);
  flex-shrink: 0;
  font-size: 16px;
  color: #ffd700;
  font-weight: 700;
}

.essential-resources h3 {
  color: #ffffff;
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin: 0;
}

.essential-resources h3 span { color: #ffd700; }

.essential-resources .resources-intro {
  color: rgb(200, 200, 200);
  font-size: 14px;
  font-weight: 300;
  line-height: 1.5;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: rgba(255, 215, 0, 0.03);
  border-radius: 6px;
  border-left: 3px solid rgba(255, 215, 0, 0.15);
}

.essential-resources .resources-intro strong {
  color: #ffd700;
  font-weight: 600;
}

.essential-resources .resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 8px;
}

.essential-resources .resource-item {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 6px;
  transition: background 0.3s ease;
  display: flex;
  align-items: center;
  padding: 2px 0;
}

.essential-resources .resource-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.essential-resources .resource-item .star-marker {
  display: inline-block;
  color: #ffd700;
  font-size: 12px;
  margin-right: 8px;
  padding-left: 4px;
  flex-shrink: 0;
}

.essential-resources .resource-item a {
  display: block;
  padding: 8px 10px 8px 0;
  color: #76cae9 !important;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: color 0.3s ease;
}

.essential-resources .resource-item a:hover {
  color: #ffffff !important;
  text-decoration: underline;
}

.essential-resources .resource-tag {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 6px;
  vertical-align: middle;
  background: rgba(255, 215, 0, 0.08);
  color: #ffd700;
  border: 1px solid rgba(255, 215, 0, 0.06);
}


/* ============================================================
   24. BUTTON
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--ps-blue), var(--ps-blue-2));
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 10px;
  border: 1px solid var(--ps-blue-2);
  cursor: pointer;
  letter-spacing: .3px;
  box-shadow: 0 0 24px rgba(43,143,255,.35);
  transition: all .2s var(--ease);
  text-decoration: none;
}

.btn:hover {
  color: #fff;
  box-shadow: 0 0 36px rgba(74,217,255,.6);
  transform: translateY(-1px);
}

.btn svg {
  width: 14px;
  height: 14px;
}


/* ============================================================
   25. FEATURE ROW + SLIDESHOW
   ============================================================ */
.feature-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.feature-text {
  flex: 1 1 400px;
  min-width: 0;
}

.feature-action {
  flex: 0 0 auto;
  align-self: center;
}

.slideshow {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  background: #03050a;
}

.slideshow .slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
  pointer-events: none;
}

.slideshow .slide.active {
  opacity: 1;
  pointer-events: auto;
}

.slideshow .slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  cursor: zoom-in;
}

.slideshow .dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
  padding: 6px 10px;
  background: rgba(5, 7, 13, 0.65);
  border-radius: 999px;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.slideshow .dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition: background 0.25s var(--ease), transform 0.25s var(--ease);
}

.slideshow .dots span:hover {
  background: rgba(255, 255, 255, 0.5);
}

.slideshow .dots span.active {
  background: var(--ps-blue-2);
  transform: scale(1.25);
}


/* ============================================================
   26. PAGE-WIDE ANIMATED WAVES (XMB-style)
   ============================================================ */
.page-waves {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.35;
  overflow: hidden;
  mix-blend-mode: screen;
}

.page-waves svg {
  width: 100%;
  height: 100%;
  display: block;
}

.page-waves .wave {
  transform-origin: center;
  will-change: transform;
}

.page-waves .wave-1 { animation: xmbWaveA 14s ease-in-out infinite; }
.page-waves .wave-2 { animation: xmbWaveB 18s ease-in-out infinite; }
.page-waves .wave-3 { animation: xmbWaveC 22s ease-in-out infinite; }

@keyframes xmbWaveA {
  0%   { transform: translate3d(-20px,  0,   0) scaleY(1); }
  25%  { transform: translate3d(  0px, -10px, 0) scaleY(1.03); }
  50%  { transform: translate3d( 20px,  0,   0) scaleY(1); }
  75%  { transform: translate3d(  0px,  10px, 0) scaleY(0.98); }
  100% { transform: translate3d(-20px,  0,   0) scaleY(1); }
}

@keyframes xmbWaveB {
  0%   { transform: translate3d( 20px,  0,   0) scaleY(1); }
  25%  { transform: translate3d(  0px,  8px, 0) scaleY(0.97); }
  50%  { transform: translate3d(-20px,  0,   0) scaleY(1); }
  75%  { transform: translate3d(  0px, -8px, 0) scaleY(1.03); }
  100% { transform: translate3d( 20px,  0,   0) scaleY(1); }
}

@keyframes xmbWaveC {
  0%   { transform: translate3d(-10px,  0,   0) scaleY(1); }
  33%  { transform: translate3d( 10px, -6px, 0) scaleY(1.02); }
  66%  { transform: translate3d(-5px,   6px, 0) scaleY(0.98); }
  100% { transform: translate3d(-10px,  0,   0) scaleY(1); }
}


/* ============================================================
   27. TOOL BLOCK (ISO Tools page)
   ============================================================ */
.tool-block {
  display: flex;
  align-items: flex-start;
  gap: 32px;
  margin: 32px 0;
  flex-wrap: wrap;
}

.tool-media {
  flex: 0 0 280px;
  max-width: 280px;
}

.tool-media img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: block;
}

.tool-info {
  flex: 1 1 400px;
  min-width: 0;
}

.tool-info h2 {
  margin-top: 0;
}

.tool-info .credits {
  color: var(--text-3);
  font-size: 13px;
  font-style: italic;
  margin: 6px 0 12px;
}

.tool-info ul,
.tool-info ol {
  padding-left: 22px;
  margin: 12px 0 20px;
}

.tool-info li {
  margin-bottom: 6px;
}

.tool-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.tool-actions .source {
  font-size: 13px;
  color: var(--text-3);
}

.tool-actions .source a {
  color: var(--ps-blue-2);
}

/* Responsive YouTube embed */
.video-wrap {
  position: relative;
  width: 100%;
  max-width: 720px;
  aspect-ratio: 16 / 9;
  margin: 20px 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
}

.video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Wide variant — holds two images side by side */
.tool-media-wide {
  flex: 0 0 100%;
  max-width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 8px;
}

.tool-media-wide img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: block;
  object-fit: cover;
}


/* ============================================================
   28. INFO BOX — PURPLE (Tutorial)
   ============================================================ */
.info-box-purple {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 4px solid #9b59b6;
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 24px 0;
}

.info-box-purple .box-title {
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.info-box-purple .box-title span {
  color: #9b59b6;
  font-weight: 300;
}

.info-box-purple p {
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 12px;
}

.info-box-purple ol {
  padding-left: 0;
  margin: 0;
  list-style: none;
  counter-reset: step;
}

.info-box-purple ol li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.55;
  padding: 6px 0;
  counter-increment: step;
  margin: 0;
}

.info-box-purple ol li::before {
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  background: rgba(155, 89, 182, 0.12);
  color: #9b59b6;
  font-size: 11px;
  font-weight: 700;
  border-radius: 50%;
  border: 1px solid rgba(155, 89, 182, 0.2);
  flex-shrink: 0;
  margin-top: 1px;
}

.info-box-purple ol li strong {
  color: var(--text);
}

.info-box-purple ol li .highlight {
  color: #9b59b6;
}


/* ============================================================
   29. INFO BOX — BLUE (Neutral)
   ============================================================ */
.info-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--ps-blue-2);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 24px 0;
}

.info-box .box-title {
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.info-box .box-title span {
  color: var(--ps-blue-2);
  font-weight: 300;
}

.info-box p {
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 12px;
}

.info-box p strong {
  color: var(--text);
}

.info-box ol {
  padding-left: 0;
  margin: 0;
  list-style: none;
  counter-reset: step;
}

.info-box ol li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.55;
  padding: 6px 0;
  counter-increment: step;
  margin: 0;
}

.info-box ol li::before {
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  background: rgba(43, 143, 255, 0.12);
  color: var(--ps-blue-2);
  font-size: 11px;
  font-weight: 700;
  border-radius: 50%;
  border: 1px solid rgba(43, 143, 255, 0.2);
  flex-shrink: 0;
  margin-top: 1px;
}

.info-box ol li strong {
  color: var(--text);
}

.info-box ol li .highlight {
  color: var(--ps-blue-2);
}

.info-box .file-path {
  display: inline-block;
  background: var(--bg-2);
  color: var(--text-2);
  padding: 1px 8px;
  border-radius: 3px;
  font-size: 12px;
  font-family: var(--font-mono);
  border: 1px solid var(--border);
}


/* ============================================================
   30. TUTORIAL DETAILS
   ============================================================ */
.tutorial {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 12px 0;
}

.tutorial summary {
  cursor: pointer;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 13px;
  color: var(--text);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.tutorial summary::-webkit-details-marker { display: none; }

.tutorial summary::before {
  content: '+';
  display: inline-block;
  width: 18px;
  text-align: center;
  color: var(--ps-blue-2);
  font-weight: 700;
}

.tutorial[open] summary::before {
  content: '−';
}

.tutorial .tutorial-body {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.7;
}

.tutorial .tutorial-body ul {
  padding-left: 22px;
  margin: 0;
  columns: 2;
  column-gap: 28px;
}

.tutorial .tutorial-body li {
  margin-bottom: 3px;
  line-height: 1.5;
  break-inside: avoid;
}


/* ============================================================
   31. 404 PAGE — CENTERED HERO
   ============================================================ */
.error-hero {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 0 40px;
  text-align: center;
}

.error-hero .error-inner {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 24px;
}

.error-hero .error-code {
  font-size: 96px;
  font-weight: 800;
  letter-spacing: -4px;
  line-height: 1;
  color: #ea0e0e;
  margin: 0 0 8px;
  text-shadow: 0 4px 24px rgba(234, 14, 14, 0.3);
}

.error-hero .error-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 16px;
  letter-spacing: -0.5px;
}

.error-hero .error-desc {
  font-size: 16px;
  color: var(--text-2);
  line-height: 1.6;
  margin: 0 0 28px;
}

.error-hero .error-actions {
  display: inline-flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}


/* ============================================================
   32. ABOUT PAGE — LAYOUT
   ============================================================ */
.disclaimer-box {
  background: linear-gradient(145deg, rgba(30, 30, 35, 0.9), rgba(45, 45, 50, 0.9));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin: 24px 0;
  position: relative;
  overflow: hidden;
}

.disclaimer-box .disc-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.04);
  position: relative;
}

.disclaimer-box .disc-header::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 50px;
  height: 2px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.15), transparent);
}

.disclaimer-box .disc-title {
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin: 0;
}

.disclaimer-box .disc-title span {
  color: var(--text-3);
  font-weight: 300;
}

.disclaimer-box .disc-text {
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.7;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.01);
  border-radius: 8px;
  border-left: 3px solid rgba(255, 255, 255, 0.04);
  margin: 0 0 12px;
}

.disclaimer-box .disc-text:last-child {
  margin-bottom: 0;
}

.disclaimer-box .disc-text strong {
  color: var(--text);
  font-weight: 600;
}

.disclaimer-box .disc-text .highlight {
  display: inline-block;
  color: var(--text-2);
  font-weight: 400;
  padding: 1px 8px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.disclaimer-box .disc-text .accent {
  color: #c8a03c;
  font-weight: 400;
}

.about-content {
  max-width: 760px;
  margin: 0 auto;
}

.about-content p {
  color: var(--text-2);
  font-size: 16px;
  line-height: 1.75;
  margin: 0 0 18px;
}

.about-content p strong {
  color: var(--text);
  font-weight: 600;
}

.about-content p .sig {
  display: inline-block;
  margin-top: 8px;
  color: var(--ps-cyan);
  font-style: italic;
}


/* ============================================================
   33. CONTACT PAGE — LAYOUT
   ============================================================ */
.contact-notice {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--ps-blue-2);
  border-radius: var(--radius);
  padding: 24px;
  margin: 24px 0;
}

.contact-notice .notice-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid rgba(43, 143, 255, 0.12);
  position: relative;
}

.contact-notice .notice-header::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 50px;
  height: 2px;
  background: linear-gradient(90deg, var(--ps-blue-2), transparent);
}

.contact-notice .notice-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(43, 143, 255, 0.08);
  border-radius: 50%;
  border: 1px solid rgba(43, 143, 255, 0.15);
  flex-shrink: 0;
  font-size: 18px;
  color: var(--ps-blue-2);
}

.contact-notice .notice-title {
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin: 0;
}

.contact-notice .notice-title span {
  color: var(--ps-blue-2);
  font-weight: 300;
}

.contact-notice ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.contact-notice li {
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.6;
  padding: 10px 16px;
  margin-bottom: 6px;
  background: rgba(255, 255, 255, 0.01);
  border-radius: var(--radius-sm);
  border-left: 2px solid rgba(43, 143, 255, 0.08);
}

.contact-notice li strong {
  color: var(--text);
  font-weight: 600;
}

.contact-notice li a {
  color: var(--ps-blue-2);
  font-weight: 500;
}

.contact-notice li a:hover {
  color: var(--ps-cyan);
}

.contact-signature {
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.7;
  margin: 24px 0;
}

.contact-signature .sig {
  color: var(--ps-cyan);
  font-style: italic;
}


/* ============================================================
   34. HOMEBREW PAGE — CATEGORY NAV GRID
   ============================================================ */
.tools-nav {
  padding: 30px;
  background: linear-gradient(145deg, rgb(28, 28, 28), rgb(45, 45, 45));
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  margin: 24px 0 32px;
}

.tools-nav::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(74, 158, 255, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

.tools-nav .nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  position: relative;
  z-index: 1;
}

.tools-nav .nav-item {
  background: rgba(255, 255, 255, 0.03);
  border-left: 3px solid rgba(74, 158, 255, 0.3);
  border-radius: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.tools-nav .nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(4px) scale(1.02);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  border-left-color: #6db3ff;
}

.tools-nav .nav-item a {
  display: block;
  padding: 14px 18px;
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  transition: color 0.3s ease;
  position: relative;
}

.tools-nav .nav-item a::after {
  content: '→';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  transition: all 0.3s ease;
  font-size: 16px;
  color: #4a9eff;
}

.tools-nav .nav-item:hover a::after {
  opacity: 1;
  right: 8px;
}

.tools-nav .nav-item a:hover {
  color: #4a9eff;
}


/* ============================================================
   35. WARNING BOX (Red)
   ============================================================ */
.warn-box {
  background: linear-gradient(145deg, rgba(45, 20, 20, 0.9), rgba(60, 25, 25, 0.9));
  border: 1px solid rgba(255, 50, 50, 0.15);
  border-radius: var(--radius);
  padding: 24px;
  margin: 24px 0;
}

.warn-box .warn-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 2px solid rgba(255, 50, 50, 0.2);
  position: relative;
}

.warn-box .warn-header::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, #ff3333, transparent);
}

.warn-box .warn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: rgba(255, 50, 50, 0.12);
  border-radius: 50%;
  border: 2px solid rgba(255, 50, 50, 0.3);
  flex-shrink: 0;
  font-size: 20px;
  font-weight: 800;
  color: #ff4444;
}

.warn-box .warn-title {
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin: 0;
}

.warn-box .warn-title span {
  color: #ff4444;
}

.warn-box .warn-content {
  color: rgb(220, 200, 200);
  font-size: 14px;
  line-height: 1.6;
}

.warn-box .warn-content strong {
  color: #ff6666;
  font-weight: 700;
}

.warn-box .warn-content .highlight {
  display: inline-block;
  background: rgba(255, 50, 50, 0.15);
  color: #ff6666;
  padding: 2px 10px;
  border-radius: 4px;
  font-weight: 600;
  border: 1px solid rgba(255, 50, 50, 0.1);
}


/* ============================================================
   36. REPOSITORY BOX — BLUE
   ============================================================ */
.repo-box {
  background: linear-gradient(145deg, rgba(20, 30, 45, 0.9), rgba(35, 50, 70, 0.9));
  border: 1px solid rgba(74, 158, 255, 0.12);
  border-radius: var(--radius);
  padding: 24px;
  margin: 24px 0;
}

.repo-box .repo-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 2px solid rgba(74, 158, 255, 0.15);
  position: relative;
}

.repo-box .repo-header::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, #4a9eff, transparent);
}

.repo-box .repo-title {
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin: 0;
}

.repo-box .repo-title span {
  color: #4a9eff;
}

.repo-box .repo-content {
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 18px;
}

.repo-box .repo-content a {
  color: #4a9eff;
  font-weight: 600;
  border-bottom: 1px solid rgba(74, 158, 255, 0.3);
}

.repo-box .repo-content a:hover {
  color: var(--ps-cyan);
  border-bottom-color: var(--ps-cyan);
}

.repo-box .repo-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid rgba(74, 158, 255, 0.06);
}

.repo-box .repo-tip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-3);
  font-size: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.repo-box .repo-tip .dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #4a9eff;
  border-radius: 50%;
}


/* ============================================================
   37. REPOSITORY BOX — GREEN
   ============================================================ */
.repo-box-green {
  background: linear-gradient(145deg, rgba(20, 40, 30, 0.9), rgba(25, 50, 35, 0.9));
  border: 1px solid rgba(46, 204, 113, 0.15);
  border-radius: var(--radius);
  padding: 24px;
  margin: 24px 0;
}

.repo-box-green .repo-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 2px solid rgba(46, 204, 113, 0.15);
  position: relative;
}

.repo-box-green .repo-header::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, #2ecc71, transparent);
}

.repo-box-green .repo-title {
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin: 0;
}

.repo-box-green .repo-title span {
  color: #2ecc71;
}

.repo-box-green .repo-content {
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 18px;
}

.repo-box-green .repo-content a {
  color: #2ecc71;
  font-weight: 600;
  border-bottom: 1px solid rgba(46, 204, 113, 0.3);
}

.repo-box-green .repo-content a:hover {
  color: #58d68d;
  border-bottom-color: #58d68d;
}

.repo-box-green .repo-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid rgba(46, 204, 113, 0.06);
}

.repo-box-green .repo-tip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-3);
  font-size: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.repo-box-green .repo-tip .dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #2ecc71;
  border-radius: 50%;
}


/* ============================================================
   38. GREEN BUTTON
   ============================================================ */
.btn-green {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(46, 204, 113, 0.15), rgba(46, 204, 113, 0.05));
  color: #2ecc71;
  border: 1px solid rgba(46, 204, 113, 0.25);
  padding: 10px 22px;
  font-family: inherit;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 50px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 1px;
}

.btn-green:hover {
  background: linear-gradient(135deg, #2ecc71, #27ae60);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(46, 204, 113, 0.3);
  border-color: #2ecc71;
}


/* ============================================================
   39. MANUAL LIST
   ============================================================ */
.manual-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 24px;
}

.manual-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
  line-height: 1.55;
}

.manual-list li:last-child {
  border-bottom: none;
}

.manual-list li strong {
  color: var(--text);
  font-weight: 600;
}

.manual-list li strong a {
  color: var(--ps-blue-2);
}

.manual-list li strong a:hover {
  color: var(--ps-cyan);
}

.manual-list li em {
  color: var(--text-3);
  font-size: 13px;
  font-style: italic;
}

.manual-list li .note {
  display: block;
  color: var(--text-3);
  font-size: 13px;
  margin-top: 4px;
}


/* ============================================================
   40. SOURCES LIST
   ============================================================ */
.sources-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 24px;
}

.sources-list li {
  padding: 4px 0;
}

.sources-list li a {
  color: var(--ps-blue-2);
}


/* ============================================================
   41. USEFUL LINKS LIST
   ============================================================ */
.useful-links {
  margin: 8px 0 24px;
}

.useful-links li {
  margin-bottom: 4px;
}


/* ============================================================
   42. RESPONSIVE — TABLET (≤720px)
   ============================================================ */
@media (max-width: 720px) {
  .wrap { padding: 0 18px; }

  header.site .wrap {
    gap: 12px;
    padding: 0 18px;
    height: 60px;
  }

  .hero { padding: 48px 0 24px; }
  .hero h1 { font-size: 34px; letter-spacing: -1px; }
  .hero p { font-size: 16px; }

  .cat-grid { grid-template-columns: 1fr; gap: 14px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }

  .cat-header h1 { font-size: 28px; }

  .lightbox { padding: 8px; }
  .lightbox .lb-stage {
    max-width: 100vw;
    max-height: 100vh;
    width: 100%;
    gap: 10px;
  }
  .lightbox img {
    max-height: 75vh;
    max-width: 100vw;
    width: auto;
    height: auto;
  }
  .lightbox .lb-info {
    flex-wrap: wrap;
    justify-content: center;
    padding: 8px 12px;
    gap: 6px;
    border-radius: 12px;
  }
  .lightbox .lb-title { white-space: normal; text-align: center; }
  .lightbox .close {
    top: 8px;
    right: 8px;
    width: 40px;
    height: 40px;
    font-size: 26px;
    background: rgba(0, 0, 0, 0.5);
  }

  #backToTop { bottom: 18px; right: 18px; width: 44px; height: 44px; }

  footer.site {
    padding: 28px 0;
    margin-top: 60px;
  }
  footer.site .footer-links { gap: 4px 2px; }
  footer.site .footer-links a { font-size: 12px; padding: 5px 10px; }
  footer.site .footer-meta {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }

  /* Nav widget */
  .nav-widget { padding: 20px; }
  .nav-widget .widget-title { font-size: 18px; }
  .nav-widget .nav-grid { grid-template-columns: 1fr; gap: 6px; }

  .nav-widget .nav-item > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    padding: 14px 16px;
    position: relative;
  }

  .nav-widget .nav-item > a::after { display: none; }

  .nav-widget .nav-item:hover {
    transform: none;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.03);
    border-left-color: rgba(74, 158, 255, 0.3);
  }

  .nav-widget .nav-item:hover > a {
    padding-left: 16px;
    color: #ffffff;
  }

  .nav-widget .sub-nav {
    max-height: none;
    opacity: 1;
    padding: 6px 0;
    background: rgba(0, 0, 0, 0.15);
    transition: none;
  }

  .nav-widget .sub-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    font-size: 13px;
    transform: none;
    opacity: 1;
    transition: none;
  }

  .nav-widget .nav-item:hover .sub-nav a:nth-child(1),
  .nav-widget .nav-item:hover .sub-nav a:nth-child(2),
  .nav-widget .nav-item:hover .sub-nav a:nth-child(3),
  .nav-widget .nav-item:hover .sub-nav a:nth-child(4),
  .nav-widget .nav-item:hover .sub-nav a:nth-child(5),
  .nav-widget .nav-item:hover .sub-nav a:nth-child(6),
  .nav-widget .nav-item:hover .sub-nav a:nth-child(7) {
    transition-delay: 0s;
  }

  .nav-widget .sub-nav a:hover {
    background: rgba(74, 158, 255, 0.08);
    color: #4a9eff;
    padding-left: 16px;
  }

  .nav-widget .sub-nav a:hover::before { color: #4a9eff; }

  /* Essentials widget */
  .essential-resources { padding: 20px; }
  .essential-resources h3 { font-size: 16px; }
  .essential-resources .resources-grid { grid-template-columns: 1fr; gap: 4px; }
  .essential-resources .resource-item a { font-size: 13px; padding: 6px 8px 6px 0; }
  .essential-resources .resources-intro { font-size: 13px; padding: 10px 14px; }

  /* Tool block */
  .tool-block {
    flex-direction: column;
    gap: 20px;
    margin: 20px 0;
  }

  .tool-media {
    flex: 0 0 auto;
    max-width: 100%;
  }

  .tool-info {
    flex: 1 1 auto;   /* was: 1 1 400px — kills the phantom 400px height on mobile */
    min-width: 0;
    width: 100%;
  }

  .tool-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-top: 12px;
  }
   .tool-media-wide {
    flex: 0 0 auto;
    max-width: 100%;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* Tutorial */
  .tutorial .tutorial-body ul {
    columns: 1;
  }

  /* 404 hero */
  .error-hero .error-code {
    font-size: 72px;
    letter-spacing: -3px;
  }
  .error-hero .error-title {
    font-size: 22px;
  }
  .error-hero .error-desc {
    font-size: 15px;
  }

  /* About page */
  .disclaimer-box { padding: 18px; }
  .disclaimer-box .disc-title { font-size: 14px; letter-spacing: 1px; }
  .disclaimer-box .disc-text { font-size: 13px; padding: 12px 14px; }
  .about-content p { font-size: 15px; }

  /* Contact page */
  .contact-notice { padding: 18px; }
  .contact-notice .notice-title { font-size: 14px; letter-spacing: 1px; }
  .contact-notice li { font-size: 13px; padding: 8px 14px; }
  .contact-form { padding: 18px; }

  /* Homebrew nav */
  .tools-nav { padding: 20px; }
  .tools-nav .nav-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
  }
  .tools-nav .nav-item a { font-size: 12px; padding: 12px 14px; }

  /* Green repo footer */
  .repo-box-green .repo-footer {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
}


/* ============================================================
   43. RESPONSIVE — MOBILE (≤480px)
   ============================================================ */
@media (max-width: 480px) {
  .hero h1 { font-size: 28px; letter-spacing: -0.8px; }
  .hero p { font-size: 15px; }

  .cat-tile .tile-name { font-size: 17px; }
  .cat-grid { gap: 10px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }

  .wip-notice-compact { font-size: 0.8rem; padding: 8px 14px; }
  .wip-notice-compact .badge {
    font-size: 0.6rem;
    padding: 2px 10px;
    display: block;
    margin: 0 0 4px 0;
  }

  .nav-widget { padding: 16px; }
  .nav-widget .nav-item > a { font-size: 13px; padding: 12px 14px; }
  .nav-widget .sub-nav a { padding: 8px 14px; font-size: 12px; }

  .essential-resources { padding: 16px; }
  .essential-resources .resources-header { flex-wrap: wrap; }
  .essential-resources h3 { font-size: 14px; letter-spacing: 1px; }
  .essential-resources .star-icon { width: 30px; height: 30px; font-size: 13px; }
  .essential-resources .resource-item a { font-size: 12px; padding: 6px 6px 6px 0; }
  .essential-resources .resources-intro { font-size: 12px; padding: 8px 12px; }
  .essential-resources .resource-tag { font-size: 8px; padding: 1px 6px; }

  .tool-info .credits { font-size: 12px; }
  .tool-info ul { padding-left: 18px; margin: 8px 0 14px; }
  .tool-info li { margin-bottom: 4px; }

  /* 404 hero */
  .error-hero { padding: 60px 0 30px; }
  .error-hero .error-code {
    font-size: 56px;
    letter-spacing: -2px;
  }
  .error-hero .error-title { font-size: 18px; }
  .error-hero .error-actions {
    flex-direction: column;
    width: 100%;
  }
  .error-hero .error-actions .btn {
    justify-content: center;
    width: 100%;
  }

  /* Homebrew nav */
  .tools-nav { padding: 16px; }
  .tools-nav .nav-grid { grid-template-columns: 1fr; }
  .tools-nav .nav-item a { font-size: 13px; padding: 14px 16px; }
}


/* ============================================================
   44. iOS PERFORMANCE
   ------------------------------------------------------------
   Kills everything expensive on iPhone/iPad and touch devices:
     - both wave systems (hero + page)
     - will-change hints
     - fixed background
     - header blur
     - logo pulse
     - smooth scroll
     - nav-widget blur
   ============================================================ */
@media (max-width: 720px),
       (hover: none) and (pointer: coarse) {
  /* Waves off — both systems */
  .hero-waves,
  .page-waves {
    display: none !important;
  }

  .hero-waves .wave,
  .page-waves .wave {
    animation: none !important;
    will-change: auto !important;
  }

  /* Fixed background kills scroll perf on iOS */
  body {
    background-attachment: scroll;
  }

  /* Header blur repaints on every scroll frame */
  header.site {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(5, 7, 13, 0.98);
  }

  /* Logo pulse runs forever */
  .logo-mark {
    animation: none;
  }

  /* Smooth scroll fights iOS momentum */
  html {
    scroll-behavior: auto;
  }

  /* Nav-widget glass blur */
  .nav-widget .nav-item {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  /* Mobile nav menu glass blur */
  nav.main {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(5, 7, 13, 0.98);
  }
}


/* ============================================================
   45. ACCESSIBILITY — REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  html { scroll-behavior: auto; }

  .nav-widget .nav-item,
  .nav-widget .nav-item > a,
  .nav-widget .nav-item > a::after,
  .nav-widget .sub-nav,
  .nav-widget .sub-nav a,
  .nav-widget .sub-nav a::before {
    transition: none !important;
  }
}


/* ============================================================
   46. STACKING — chrome above the fixed waves
   ============================================================ */
header.site {
  z-index: 100;   /* already has position: sticky */
}

main,
footer.site {
  position: relative;
  z-index: 1;
}


/* ============================================================
   47. What's New
   ============================================================ */
html { scroll-padding-top: 90px; }

.post { margin: 28px 0; }

.post h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 4px;
  line-height: 1.25;
}

.post-date {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--ps-cyan);
  margin: 0 0 14px;
}

.post h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 20px 0 6px;
  text-transform: uppercase;
}

.post p {
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.65;
  margin: 0 0 14px;
}

.post ul,
.post ol {
  padding-left: 22px;
  margin: 0 0 16px;
  color: var(--text-2);
}

.post li {
  margin-bottom: 6px;
  line-height: 1.6;
}

.post li strong { color: var(--text); }

.post code {
  background: var(--bg-2);
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 13px;
  font-family: var(--font-mono);
  border: 1px solid var(--border);
}

.post .btn { margin-top: 6px; }
.post .btn + .btn { margin-left: 8px; }

@media (max-width: 720px) {
  .post h2 { font-size: 17px; }
  .post h3 { font-size: 14px; }
  .post p, .post li { font-size: 14px; }
}