:root {
  --ps-cream: #fffaf2;
  --ps-sand: #f6e7c8;
  --ps-peach: #ffd6c2;
  --ps-pink: #f9c5d9;
  --ps-mint: #c6ecdc;
  --ps-sky: #c8e2f7;
  --ps-lilac: #ddd3f5;
  --ps-ink: #3d3a4b;
  --ps-muted: #77738a;
  --ps-accent: #e98fb0;
  --ps-radius: 18px;
  --ps-shadow: 0 8px 24px rgba(61, 58, 75, 0.08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--ps-cream);
  color: var(--ps-ink);
  font-family: "Nunito", "Quicksand", "Segoe UI", system-ui, -apple-system, sans-serif;
  line-height: 1.65;
}

a { color: inherit; }

img { max-width: 100%; display: block; }

/* Header */
.ps-header {
  background: linear-gradient(120deg, var(--ps-peach), var(--ps-pink) 45%, var(--ps-lilac));
  padding: 1rem 1.5rem;
  box-shadow: var(--ps-shadow);
}

.ps-header-inner {
  max-width: 1350px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.ps-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 1.4rem;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.ps-logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--ps-cream);
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  box-shadow: inset 0 -3px 0 var(--ps-sand);
}

.ps-nav {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.ps-nav a {
  text-decoration: none;
  font-weight: 700;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  transition: background 0.2s ease, transform 0.2s ease;
}

.ps-nav a:hover { background: #fff; transform: translateY(-1px); }
.ps-nav a[aria-current="page"] { background: var(--ps-ink); color: var(--ps-cream); }

.ps-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: var(--ps-mint);
}

/* Main containers */
.ps-main {
  box-sizing: content-box;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

.ps-main--home { max-width: 1000px; }
.ps-main--category { max-width: 1200px; }
.ps-main--article { max-width: 1350px; }

.ps-hero {
  background: linear-gradient(135deg, var(--ps-sky), var(--ps-mint));
  border-radius: var(--ps-radius);
  padding: 2.5rem 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--ps-shadow);
}

.ps-hero h1 {
  margin: 0.6rem 0 0.4rem;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.ps-hero p { margin: 0; color: var(--ps-muted); max-width: 60ch; }

.ps-section-title {
  font-size: 1.4rem;
  margin: 2rem 0 1rem;
}

/* Cards */
.ps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.ps-card {
  background: #fff;
  border-radius: var(--ps-radius);
  box-shadow: var(--ps-shadow);
  overflow: hidden;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ps-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(61, 58, 75, 0.12); }

.ps-card-art {
  height: 140px;
  display: grid;
  place-items: center;
  font-size: 3rem;
}

.ps-card-body { padding: 1rem 1.2rem 1.3rem; }
.ps-card-body h3 { margin: 0.5rem 0 0.3rem; font-size: 1.1rem; line-height: 1.3; }
.ps-card-body p { margin: 0; font-size: 0.92rem; color: var(--ps-muted); }

.ps-stars { color: #e7a53b; letter-spacing: 0.1em; font-size: 0.9rem; }

.bg-peach { background: var(--ps-peach); }
.bg-pink { background: var(--ps-pink); }
.bg-mint { background: var(--ps-mint); }
.bg-sky { background: var(--ps-sky); }
.bg-lilac { background: var(--ps-lilac); }
.bg-sand { background: var(--ps-sand); }

/* Ad containers (visual placeholders only; RAMP fills them) */
#iab-1, #iab-2, #iab-3,
.category-iab,
.sidebar-iab {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1.5rem auto;
  border: 2px dashed var(--ps-accent);
  border-radius: 12px;
  background: repeating-linear-gradient(45deg, #fff5f9, #fff5f9 12px, #fdeef4 12px, #fdeef4 24px);
}

#iab-1, #iab-2, #iab-3 { min-height: 125px; }
.category-iab { min-height: 280px; }
.sidebar-iab { min-height: 250px; margin: 0 auto 1.5rem; }

/* Article layout: content + sidebar, combined 1350px max */
.ps-article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 340px);
  gap: 2rem;
  align-items: start;
}

#content-wrapper {
  min-width: 0;
}

.ps-article {
  background: #fff;
  border-radius: var(--ps-radius);
  box-shadow: var(--ps-shadow);
  padding: 2rem clamp(1.25rem, 3vw, 2.75rem);
  min-height: 2500px;
}

.ps-article h1 {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  line-height: 1.2;
  margin: 0.6rem 0;
  letter-spacing: -0.02em;
}

.ps-article h2 { margin-top: 2.2rem; font-size: 1.45rem; }
.ps-article p { font-size: 1.05rem; }

.ps-byline { color: var(--ps-muted); font-size: 0.92rem; margin-bottom: 1.5rem; }

.ps-figure {
  border-radius: var(--ps-radius);
  height: 320px;
  display: grid;
  place-items: center;
  font-size: 5rem;
  margin: 1.5rem 0;
}

.ps-callout {
  background: var(--ps-lilac);
  border-radius: 14px;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}

.ps-proscons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}

.ps-proscons > div { border-radius: 14px; padding: 1rem 1.25rem; }
.ps-proscons ul { margin: 0.4rem 0 0; padding-left: 1.2rem; }

.ps-sidebar {
  min-width: 300px;
}

.ps-sidebar-box {
  background: #fff;
  border-radius: var(--ps-radius);
  box-shadow: var(--ps-shadow);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.ps-sidebar-box h4 { margin: 0 0 0.75rem; }
.ps-sidebar-box ol { margin: 0; padding-left: 1.2rem; }
.ps-sidebar-box li { margin-bottom: 0.5rem; }

/* Category toolbar */
.ps-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.ps-filters span {
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--ps-shadow);
  font-weight: 700;
  font-size: 0.9rem;
}

/* Footer */
.ps-footer {
  background: var(--ps-sand);
  text-align: center;
  padding: 2rem 1rem;
  color: var(--ps-muted);
  font-size: 0.9rem;
}

@media (max-width: 860px) {
  .ps-article-layout { grid-template-columns: 1fr; }
  .ps-proscons { grid-template-columns: 1fr; }
}

/* Landing page */
.ps-cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.25rem !important; }
.ps-btn {
  display: inline-block;
  padding: 0.7rem 1.3rem;
  border-radius: 999px;
  background: var(--ps-ink);
  color: var(--ps-cream);
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s ease;
}
.ps-btn:hover { transform: translateY(-2px); }
.ps-btn--ghost { background: #fff; color: var(--ps-ink); }
.ps-steps { list-style: none; counter-reset: step; padding: 0; margin: 0 0 2rem; display: grid; gap: 0.9rem; }
.ps-steps li {
  counter-increment: step;
  position: relative;
  padding: 1rem 1.25rem 1rem 3.5rem;
  border-radius: 16px;
}
.ps-steps li::before {
  content: counter(step);
  position: absolute;
  left: 1rem;
  top: 1rem;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
}
.ps-hero p + p { margin-top: 0.75rem; }
code { background: rgba(255, 255, 255, 0.7); padding: 0.05rem 0.35rem; border-radius: 6px; font-size: 0.88em; }
