/*
Theme Name: PhysNotes
Theme URI: https://example.com/physnotes
Author: PhysNotes
Description: A modern physics-notes WordPress theme. Live homepage pulls Featured + Recent posts from WordPress, every visible text editable via Appearance → Customize → PhysNotes Theme Options. Auto-grouped Team page, public author profiles, automatic glossary tooltips, and seeded demo content on activation.
Version: 2.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: physnotes
*/


/* ========================================================================
   PhysNotes 2.0 - Preview Stylesheet
   Modern, academic, content-focused design
   ======================================================================== */

:root {
  --pn-bg: #ffffff;
  --pn-bg-soft: #f7f8fb;
  --pn-bg-deep: #003a5c;
  --pn-ink: #0f172a;
  --pn-ink-2: #334155;
  --pn-ink-3: #3d4f5e;
  --pn-line: #e5e7eb;
  --pn-line-soft: #f1f5f9;
  --pn-brand: #1e40af;
  --pn-brand-2: #0277bd;
  --pn-brand-ink: #0b2a6b;
  --pn-accent: #ea580c;
  --pn-success: #059669;
  --pn-radius: 3px;
  --pn-radius-sm: 3px;
  --pn-radius-lg: 3px;
  --pn-shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 1px rgba(15, 23, 42, .04);
  --pn-shadow: 0 4px 14px rgba(15, 23, 42, .08);
  --pn-shadow-lg: 0 18px 40px -12px rgba(15, 23, 42, .22);
  --pn-ff-serif: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --pn-ff-sans: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --pn-ff-mono: ui-monospace, "Cascadia Code", Consolas, monospace;
  --pn-max: 1240px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 120px; }
body {
  margin: 0;
  font-family: var(--pn-ff-sans);
  color: var(--pn-ink);
  background: var(--pn-bg);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  padding-top: 100px;
  transition: padding-top .3s ease;
}

img { max-width: 100%; display: block; height: auto; }
a { color: var(--pn-brand-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
.pn-prose a { color: #1d4ed8; text-decoration: none; }
.pn-prose a:hover { color: #c06800; text-decoration: underline; }

h1, h2, h3, h4 { font-family: var(--pn-ff-serif); color: var(--pn-brand-ink); line-height: 1.25; margin: 0 0 .4em; font-weight: 600; }
h1 { font-size: clamp(1.4rem, 3vw, 2.1rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.2rem, 2vw, 1.6rem); letter-spacing: -.015em; }
h3 { font-size: 1.15rem; }

.pn-container { max-width: var(--pn-max); margin: 0 auto; padding: 0 24px; }

/* ===================== HEADER ===================== */
.pn-site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: #003a5c;
  border-bottom: none;
  box-shadow: none;
  transition: transform 0.3s ease, box-shadow 0.2s ease;
}
.pn-site-header.is-scrolled {
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}
/* backdrop-filter lives on ::before so the header itself is NOT a containing block
   for position:fixed children (backdrop-filter on a parent traps fixed descendants). */
.pn-site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

.pn-site-header.nav-hidden {
  transform: translateY(-100%);
}

.pn-header-inner {
  display: flex;
  flex-direction: column;
  min-height: unset;
  padding: 3px 0 4px;
}
/* Row 1: logo */
.pn-header-inner .pn-logo-placeholder {
  padding-bottom: 6px;
}
/* Row 2: nav row — toggle (mobile) | nav | search */
.pn-header-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0;
}
.pn-header-nav-row .pn-primary-nav    { flex: 1; }
.pn-header-nav-row .pn-header-actions { flex-shrink: 0; }
.pn-header-nav-row .pn-mobile-toggle  { flex-shrink: 0; }

.pn-primary-nav {
  display: flex;
  justify-content: flex-start;
}

.pn-logo-placeholder {
  display: inline-flex; align-items: center; gap: 12px;
  color: #fa9f20; text-decoration: none;
}
.pn-logo-placeholder .custom-logo-link {
  display: inline-flex; align-items: center; min-height: 48px;
}

.pn-logo-mark {
  width: 42px; height: 42px; display: grid; place-items: center;
  font-family: var(--pn-ff-serif); font-size: 22px; font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--pn-brand) 0%, var(--pn-brand-2) 100%);
  border-radius: var(--pn-radius);
  box-shadow: var(--pn-shadow);
}

.pn-logo-wordmark { display: flex; flex-direction: column; line-height: 1.15; }
.pn-sitename { font-family: var(--pn-ff-serif); font-size: 1.15rem; font-weight: 700; letter-spacing: .02em; }
.pn-sitedesc { font-size: .78rem; color: #fa9f20; }

.pn-menu {
  list-style: none; margin: 0; padding: 0;
  display: flex; gap: 4px; justify-content: center;
}

.pn-menu a {
  display: inline-block; padding: 7px 10px;
  color: #fa9f20; font-weight: 600; font-size: 18px;
  border-radius: 8px; transition: background .15s, color .15s;
  text-decoration: none;
}

.pn-menu a:hover,
.pn-menu a.is-active,
.pn-menu li.current-menu-item > a,
.pn-menu li.current_page_item > a,
.pn-menu li.current-menu-ancestor > a {
  background: transparent;
  color: #f7d71e;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.pn-header-actions { display: flex; gap: 10px; align-items: center; }

.pn-search {
  display: flex; align-items: center; gap: 6px;
  background: var(--pn-bg-soft); border: 1px solid var(--pn-line);
  border-radius: 999px; padding: 6px 8px 6px 14px;
  transition: border-color .15s, box-shadow .15s;
}

.pn-search:focus-within {
  border-color: var(--pn-brand-2);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, .15);
}

.pn-search input {
  border: 0; background: transparent; outline: none; font: inherit; color: inherit;
  width: 200px;
}

.pn-search button {
  border: 0; background: var(--pn-brand); color: #fff;
  width: 32px; height: 32px; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center;
}

/* ===================== SEARCH TOGGLE BUTTON ===================== */
.pn-search-toggle {
  background: none; border: none; cursor: pointer;
  color: #fa9f20; display: flex; align-items: center; gap: 6px;
  padding: 7px 10px; border-radius: 8px;
  transition: background .15s, color .15s, text-decoration .15s;
  font-weight: 600; font-size: 1.10rem;
}
.pn-search-toggle:hover { background: transparent; color: #f7d71e; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.pn-search-label {
  font-size: .85rem; font-weight: 600; letter-spacing: .03em;
}

/* ===================== SEARCH OVERLAY ===================== */
.pn-search-overlay {
  position: fixed; top: 0; left: 0; right: 0; z-index: 9999;
  background: #003a5c;
  padding: 22px 24px;
  display: flex; align-items: center;
  transform: translateY(-100%);
  transition: transform .3s cubic-bezier(.4, 0, .2, 1);
}
.pn-search-overlay.is-open { transform: translateY(0); }

.pn-search-overlay-inner {
  max-width: 900px; margin: 0 auto; width: 100%;
  display: flex; align-items: center; gap: 12px;
}

.pn-search-overlay-form {
  flex: 1; display: flex; gap: 10px;
}

.pn-search-overlay-form input[type="search"] {
  flex: 1; height: 52px; padding: 0 20px;
  border: none; border-radius: 6px; outline: none;
  font-size: 1.05rem; font-family: inherit;
  background: #fff; color: #333;
}
.pn-search-overlay-form input[type="search"]::placeholder { color: #767676; }

.pn-search-overlay-submit {
  height: 52px; padding: 0 28px;
  background: #fa9f20; color: #003a5c;
  border: none; border-radius: 6px; cursor: pointer;
  font-weight: 700; font-size: .88rem; letter-spacing: .07em; text-transform: uppercase;
  white-space: nowrap; transition: background .15s, color .15s;
}
.pn-search-overlay-submit:hover { background: #f7d71e; color: #003a5c; }

.pn-search-overlay-close {
  background: none; border: none;
  color: rgba(250,159,32,.7); font-size: 1.3rem; line-height: 1;
  cursor: pointer; padding: 8px; flex-shrink: 0;
  transition: color .15s;
}
.pn-search-overlay-close:hover { color: #fa9f20; }

@media (max-width: 768px) {
  .pn-search-overlay-submit { display: none; }
  .pn-search-overlay-form input[type="search"] { height: 46px; font-size: .97rem; }
}

/* ===== HAMBURGER — mobile only ===== */
.pn-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
}

.pn-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--pn-ink);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.pn-hamburger.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.pn-hamburger.is-open span:nth-child(2) {
  opacity: 0;
}
.pn-hamburger.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== MOBILE DROPDOWN ===== */
.pn-mobile-nav {
  display: none;
  position: fixed;
  top: 74px;
  left: 0;
  right: 0;
  background: #003a5c;
  border-bottom: 1px solid rgba(255,255,255,.15);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
  z-index: 49;
  padding: 12px 0;
}

.pn-mobile-nav.is-open {
  display: block;
}

.pn-mobile-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pn-mobile-nav ul li a {
  display: block;
  padding: 14px 24px;
  color: #fa9f20;
  font-weight: 600;
  font-size: 18px;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.1);
  transition: color 0.15s;
}

.pn-mobile-nav ul li a:hover {
  background: transparent;
  color: #f7d71e;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .pn-hamburger {
    display: flex;
  }
  .pn-primary-nav {
    display: none;
  }
  .pn-header-inner {
    justify-content: space-between;
  }
}
/* ===================== HERO ===================== */
.pn-hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1000px 400px at 85% -10%, rgba(14, 165, 233, .18), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(30, 64, 175, .14), transparent 60%),
    linear-gradient(180deg, #fafbff 0%, #ffffff 100%);
  border-bottom: 1px solid var(--pn-line);
  padding: 68px 0 80px;
  max-width: var(--pn-max);
  margin-left: auto;
  margin-right: auto;
}
.pn-hero-inner { max-width: 860px; margin: 0 auto; text-align: center; position: relative; z-index: 2; }
.pn-hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px;
  background: rgba(30, 64, 175, .08); color: var(--pn-brand);
  font-size: .82rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  margin-bottom: 22px;
}
.pn-hero-eyebrow::before { content: ""; width: 6px; height: 6px; background: var(--pn-brand-2); border-radius: 50%; }
.pn-hero-title {
  font-size: clamp(1.8rem, 4.5vw, 3rem);
  line-height: 1.08; letter-spacing: -.025em; margin: 0 0 18px;
  background: linear-gradient(135deg, var(--pn-ink) 0%, var(--pn-brand-ink) 60%, var(--pn-brand) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.pn-hero-sub {
  font-size: clamp(1.05rem, 1.5vw, 1.2rem); color: var(--pn-ink);
  max-width: 620px; margin: 0 auto 30px;
}
.pn-hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.pn-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px;
  font-weight: 700; font-size: .97rem; text-decoration: none;
  transition: transform .15s, box-shadow .15s, background .15s;
  cursor: pointer; border: 0;
}
.pn-btn-primary { background: #003a5c; color: #fa9f20; border: 1px solid #003a5c; box-shadow: var(--pn-shadow); font-size: 1.1rem; text-transform: capitalize; }
.pn-btn-primary:hover { background: #d4880f; color: #003a5c; border-color: #d4880f; transform: translateY(-2px); box-shadow: var(--pn-shadow-lg); }
.pn-btn-ghost { background: #fff; color: var(--pn-ink-2); border: 1px solid var(--pn-line); }
.pn-btn-ghost:hover { background: #003a5c; color: #fa9f20; border-color: #003a5c; }

/* Formula orbit */
.pn-hero-formula {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  font-family: var(--pn-ff-mono); color: rgba(30, 64, 175, .14);
  font-size: 1.1rem; font-weight: 400;
}
.pn-hero-formula span { position: absolute; white-space: nowrap; }
.pn-hero-formula span:nth-child(1) { top: 18%; left: 6%; font-size: 2rem; }
.pn-hero-formula span:nth-child(2) { top: 62%; left: 8%; font-size: 1.6rem; }
.pn-hero-formula span:nth-child(3) { top: 20%; right: 6%; font-size: 1.4rem; }
.pn-hero-formula span:nth-child(4) { top: 68%; right: 5%; font-size: 1.8rem; }

/* ===================== SECTION HEADS ===================== */
.pn-section { margin: 64px 0; }
.pn-section-head { margin: 0 0 32px; display: flex; align-items: end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.pn-section-title {
  font-size: clamp(1.3rem, 2.2vw, 1.75rem); margin: 0;
  position: relative; padding-bottom: 10px;
}
.pn-section-title::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 60px; height: 4px; border-radius: 4px;
  background: linear-gradient(90deg, var(--pn-brand), var(--pn-brand-2));
}
.pn-section-sub { margin: 8px 0 0; color: var(--pn-ink); max-width: 520px; }
.pn-section-more { margin-top: 22px; text-align: center; }

/* ===================== RECENT NOTES CAROUSEL ===================== */
.pn-carousel { position: relative; }
.pn-carousel-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: 340px;
  gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 8px 4px 28px; scrollbar-width: thin;
}
.pn-carousel-track::-webkit-scrollbar { height: 8px; }
.pn-carousel-track::-webkit-scrollbar-thumb { background: var(--pn-line); border-radius: 4px; }
.pn-carousel-card { scroll-snap-align: start; }
.pn-carousel-controls { position: absolute; top: 50%; transform: translateY(-50%); display: flex; justify-content: space-between; width: 100%; pointer-events: none; }
.pn-carousel-btn {
  pointer-events: auto;
  width: 44px; height: 44px; border-radius: 50%;
  background: #fff; border: 1px solid var(--pn-line);
  box-shadow: var(--pn-shadow); cursor: pointer;
  display: grid; place-items: center;
  color: var(--pn-ink-2);
  transition: all .15s;
}
.pn-carousel-btn:hover { background: #003a5c; color: #fa9f20; border-color: #003a5c; }
.pn-carousel-btn.prev { margin-left: -12px; }
.pn-carousel-btn.next { margin-right: -12px; }

/* ===================== CARDS ===================== */
.pn-grid { display: grid; gap: 24px; }
.pn-grid-cards { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

.pn-card {
  background: #fff; border: 1px solid var(--pn-line);
  border-radius: 3px; overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.pn-card:hover {
  transform: translateY(-4px); box-shadow: var(--pn-shadow-lg);
  border-color: transparent;
}
.pn-card-thumb {
  aspect-ratio: 16 / 10; background: var(--pn-bg-soft); overflow: hidden;
  position: relative;
}
.pn-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.pn-card-cat {
  position: absolute; top: 12px; left: 12px;
  padding: 5px 10px; border-radius: 3px;
  background: rgba(255, 255, 255, .95); color: var(--pn-brand);
  font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  backdrop-filter: blur(4px);
}
.pn-card-body { padding: 20px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.pn-card-title {
  font-family: var(--pn-ff-serif); font-size: 1.15rem; line-height: 1.35; margin: 0; font-weight: 600;
}
.pn-card-title a { color: var(--pn-ink); text-decoration: none; }
.pn-card-title a:hover { color: var(--pn-brand); text-decoration: underline; }
.pn-card-excerpt { color: var(--pn-ink); font-size: .93rem; line-height: 1.55; margin: 0; flex: 1; }
.pn-card-meta {
  display: flex; gap: 12px; align-items: center;
  font-size: .82rem; color: var(--pn-ink-3);
  padding-top: 12px; border-top: 1px solid var(--pn-line-soft);
  margin-top: auto;
}
.pn-card-meta span { display: inline-flex; align-items: center; gap: 5px; }
.pn-card-cta {
  display: inline-flex; align-items: center; gap: 4px;
  color: #1d4ed8; font-weight: 700; font-size: .9rem; margin-top: 4px;
}
.pn-card-cta:hover { color: #c06800; text-decoration: underline; }

/* ===================== QUOTE BAND ===================== */
.pn-quote-band {
  padding: 80px 0; margin: 64px auto;
  position: relative; overflow: hidden;
  max-width: var(--pn-max);
}

.pn-quote-slides { position: relative; overflow: hidden; }

.pn-quote-slide {
  display: none;
  animation: pnSlideIn .5s cubic-bezier(.25, .46, .45, .94) both;
}
.pn-quote-slide.is-active { display: block; }

@keyframes pnSlideIn {
  from { opacity: 0; transform: translateX(80px); }
  to   { opacity: 1; transform: translateX(0); }
}

.pn-quote-inner {
  max-width: 780px; margin: 0 auto;
  background: rgba(255, 255, 255, .95);
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .15);
  padding: 50px 60px 44px;
  text-align: center;
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 20px;
}

.pn-quote-avatar {
  width: 100px; height: 100px; border-radius: 50%;
  border: 4px solid #fff;
  box-shadow: 0 4px 20px rgba(13, 27, 42, .2);
  background: linear-gradient(135deg, var(--pn-brand-2), var(--pn-brand));
  display: grid; place-items: center;
  font-family: var(--pn-ff-serif); font-size: 2rem; font-weight: 700; color: #fff;
  overflow: hidden;
  margin-top: -30px;
}
.pn-quote-avatar img { width: 100%; height: 100%; object-fit: cover; }

.pn-quote-text {
  font-family: var(--pn-ff-serif); font-style: italic;
  font-size: clamp(0.95rem, 1.5vw, 1.1rem); line-height: 1.6;
  color: var(--pn-ink); margin: 0; font-weight: 400;
}

.pn-quote-cite {
  color: var(--pn-brand-ink);
  font-weight: 400; letter-spacing: .04em;
}
.pn-quote-cite strong {
  color: var(--pn-brand-ink); font-weight: 700;
  display: block; font-size: 1.15rem;
  letter-spacing: 0;
}

.pn-quote-dots {
  display: flex; justify-content: center; gap: 8px;
  padding-top: 28px;
}
.pn-quote-dot {
  width: 10px; height: 10px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.6);
  background: transparent; cursor: pointer;
  transition: background .2s, border-color .2s;
  padding: 0;
}
.pn-quote-dot.is-active {
  background: #fff;
  border-color: #fff;
}

@media (max-width: 640px) {
  .pn-quote-inner { padding: 50px 24px 32px; }
}



/* ===================== CATEGORIES GRID ===================== */
.pn-cat-grid {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.pn-cat-card {
  position: relative; aspect-ratio: 4 / 3;
  border-radius: var(--pn-radius); overflow: hidden;
  text-decoration: none; color: #fff; display: block;
  box-shadow: var(--pn-shadow);
  transition: transform .2s, box-shadow .2s;
}
.pn-cat-card:hover { transform: translateY(-4px); box-shadow: var(--pn-shadow-lg); text-decoration: none; }
.pn-cat-card img { width: 100%; height: 100%; object-fit: cover; }
.pn-cat-card::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(13, 27, 42, .1) 0%, rgba(13, 27, 42, .85) 100%);
}
.pn-cat-card-body { position: absolute; inset: auto 0 0 0; padding: 18px; z-index: 2; }
.pn-cat-card-title { font-family: var(--pn-ff-serif); font-size: 1.2rem; margin: 0; color: #fff; }
.pn-cat-card-count { font-size: .82rem; color: rgba(255, 255, 255, .8); margin-top: 2px; display: block; }

/* Category card — no image placeholder */
.pn-cat-no-image {
  background: linear-gradient(135deg, var(--pn-brand) 0%, var(--pn-brand-2) 100%);
}
.pn-cat-placeholder {
  position: absolute; inset: 0;
  display: grid; place-items: center;
}
.pn-cat-placeholder span {
  font-family: var(--pn-ff-serif); font-size: 5rem; font-weight: 700;
  color: rgba(255, 255, 255, .15);
  line-height: 1;
}

/* ===================== LIST VIEW (All Notes page) ===================== */
.pn-breadcrumbs {
  font-size: .88rem; color: var(--pn-ink-3); margin: 14px 0 6px;
}
.pn-breadcrumbs a { color: var(--pn-ink); text-decoration: none; font-weight: 600; }
.pn-breadcrumbs a:hover { color: #c06800; text-decoration: underline; text-underline-offset: 2px; }
.pn-breadcrumbs .sep { margin: 0 6px; color: #9ca3af; }

.pn-page-header { padding: 12px 0 32px; border-bottom: 1px solid var(--pn-line); margin-bottom: 40px; }
.pn-page-eyebrow {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  background: rgba(30, 64, 175, .08); color: var(--pn-brand);
  font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  margin-bottom: 12px;
}
.pn-page-title { margin: 0 0 10px; }
.pn-page-sub { color: var(--pn-ink); max-width: 680px; margin: 0; }


.pn-note-row {
  display: grid; grid-template-columns: 200px minmax(0, 1fr) auto;
  gap: 24px; align-items: center;
  padding: 20px 16px;
  margin-bottom: 10px;
  background: #ffffff;
  border: 1px solid var(--pn-line);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
  transition: box-shadow .2s, border-color .2s, transform .2s;
}
.pn-note-row:hover { box-shadow: var(--pn-shadow-lg); border-color: transparent; transform: translateY(-2px); }
.pn-note-row-thumb {
  width: 200px; aspect-ratio: 16 / 10; border-radius: var(--pn-radius-sm); overflow: hidden;
  background: var(--pn-bg-soft);
}
.pn-note-row-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pn-note-row-body h3 { font-size: 1.15rem; margin: 0 0 6px; font-weight: 600; }
.pn-note-row-body h3 a { color: var(--pn-brand-ink); }
.pn-note-row-body h3 a:hover { color: #c06800; }
.pn-note-row-meta { font-size: .85rem; color: var(--pn-ink-3); display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.pn-note-row-meta .pn-author-link { color: #1d4ed8; text-decoration: none; }
.pn-note-row-meta .pn-author-link:hover { color: #c06800; text-decoration: underline; }
.pn-note-row-excerpt { font-size: .93rem; color: var(--pn-ink); margin: 0; }
.pn-note-row-badge {
  padding: 4px 10px; border-radius: 3px;
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  white-space: nowrap;
}
.pn-note-row-badge.is-note { background: rgba(30, 64, 175, .1); color: var(--pn-brand); }
.pn-note-row-badge.is-post { background: rgba(234, 88, 12, .1); color: var(--pn-accent); }

/* Flat card variant — used on All Notes for mobile reordering */
.pn-note-row--flat {
  grid-template-columns: 200px 1fr;
  grid-template-areas:
    "thumb htitle"
    "thumb meta"
    "thumb excerpt";
  align-items: start;
  row-gap: 4px;
}
.pn-note-row--flat .pn-note-row-thumb   { grid-area: thumb; width: 200px; align-self: stretch; }
.pn-note-row--flat .pn-note-row-htitle  { grid-area: htitle; font-size: 1.15rem; margin: 0; font-weight: 600; }
.pn-note-row--flat .pn-note-row-htitle a { color: var(--pn-ink); }
.pn-note-row--flat .pn-note-row-htitle a:hover { color: var(--pn-brand); }
.pn-note-row--flat .pn-note-row-meta    { grid-area: meta; margin-bottom: 0; }
.pn-note-row--flat .pn-note-row-excerpt { grid-area: excerpt; }

/* ===================== TEAM PAGE ===================== */
.pn-team-grid {
  display: grid; gap: 24px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.pn-team-card {
  background: #fff; border: 1px solid var(--pn-line);
  border-radius: var(--pn-radius); padding: 28px 22px;
  text-align: center; transition: all .2s;
}
.pn-team-card:hover { border-color: transparent; box-shadow: var(--pn-shadow-lg); transform: translateY(-4px); }
.pn-team-avatar {
  width: 110px; height: 110px; border-radius: 50%;
  margin: 0 auto 16px; overflow: hidden;
  background: linear-gradient(135deg, var(--pn-brand), var(--pn-brand-2));
  display: grid; place-items: center;
  color: #fff; font-family: var(--pn-ff-serif); font-size: 2.4rem; font-weight: 700;
  border: 3px solid #fff; box-shadow: 0 0 0 2px var(--pn-line);
}
.pn-team-avatar img { width: 100%; height: 100%; object-fit: cover; }
.pn-team-name { font-family: var(--pn-ff-serif); font-size: 1.25rem; margin: 0 0 4px; }
.pn-team-subrole {
  display: inline-block; margin: 0 0 8px;
  padding: 2px 10px; border-radius: 999px;
  font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  background: linear-gradient(135deg,#fbbf24,#ea580c); color: #fff;
}
.pn-team-title { color: var(--pn-ink-3); font-size: .9rem; margin: 0 0 12px; }
.pn-team-count {
  display: inline-block; padding: 4px 12px;
  background: var(--pn-bg-soft); border-radius: 999px;
  font-size: .82rem; color: var(--pn-ink-2); margin-bottom: 16px;
}
.pn-team-count strong { color: var(--pn-brand); }
.pn-team-btn {
  display: inline-block; padding: 8px 18px; border-radius: 999px;
  border: 1px solid var(--pn-line); color: var(--pn-ink-2);
  font-weight: 700; font-size: .88rem; text-decoration: none;
  transition: all .15s;
}
.pn-team-btn:hover { background: #003a5c; color: #fa9f20; border-color: #003a5c; text-decoration: none; }

/* ===================== AUTHOR ARCHIVE ===================== */
.pn-author-hero {
  display: grid; grid-template-columns: auto 1fr; gap: 36px; align-items: start;
  background: var(--pn-bg-soft); border: 1px solid var(--pn-line);
  border-radius: var(--pn-radius-lg); padding: 40px;
  margin: 8px 0 40px;
}
.pn-author-hero-photo {
  width: 200px; height: 200px; border-radius: 16px;
  background: linear-gradient(135deg, var(--pn-brand), var(--pn-brand-2));
  display: grid; place-items: center; color: #fff;
  font-family: var(--pn-ff-serif); font-size: 4rem; font-weight: 700;
  overflow: hidden; border: 4px solid #fff; box-shadow: var(--pn-shadow);
}
.pn-author-hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.pn-author-hero-body .pn-eyebrow {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  background: rgba(30, 64, 175, .1); color: var(--pn-brand);
  font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  margin-bottom: 10px;
}
.pn-author-hero-name { font-size: clamp(1.8rem, 3.2vw, 2.6rem); margin: 0 0 6px; }
.pn-author-hero-title { color: var(--pn-ink-3); font-size: 1.1rem; margin: 0 0 18px; }
.pn-author-hero-bio { color: var(--pn-ink); margin-bottom: 8px; text-align: justify; }
.pn-author-bio-toggle {
  background: none; border: none; padding: 0; cursor: pointer;
  color: var(--pn-brand); font-size: .92rem; font-weight: 700;
  margin-bottom: 18px; display: inline-block;
}
.pn-author-bio-toggle:hover { text-decoration: underline; }

.pn-author-links { list-style: none; padding: 0; margin: 0 0 18px; display: flex; gap: 8px; flex-wrap: wrap; }
.pn-author-links a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; background: #fff; border: 1px solid var(--pn-line);
  border-radius: 999px; color: var(--pn-ink-2); font-size: .88rem; font-weight: 400;
  text-decoration: none; transition: all .15s;
}
.pn-author-links a:hover { border-color: var(--pn-brand); color: var(--pn-brand); }
.pn-author-links a[data-platform="website"]:hover      { color: #1d4ed8; border-color: #1d4ed8; }
.pn-author-links a[data-platform="email"]:hover        { color: #EA4335; border-color: #EA4335; }
.pn-author-links a[data-platform="scholar"]:hover      { color: #4285F4; border-color: #4285F4; }
.pn-author-links a[data-platform="orcid"]:hover        { color: #A6CE39; border-color: #A6CE39; }
.pn-author-links a[data-platform="linkedin"]:hover     { color: #0A66C2; border-color: #0A66C2; }
.pn-author-links a[data-platform="researchgate"]:hover { color: #00CCBB; border-color: #00CCBB; }
.pn-author-links a[data-platform="twitter"]:hover      { color: #000;    border-color: #000; }
.pn-author-links a[data-platform="custom"]:hover       { color: #1d4ed8; border-color: #1d4ed8; }
.pn-author-stat {
  display: inline-flex; align-items: baseline; gap: 8px;
  padding: 10px 18px; background: #fff; border: 1px solid var(--pn-line);
  border-radius: var(--pn-radius-sm);
}
.pn-author-stat-num { font-family: var(--pn-ff-serif); font-size: 1.6rem; font-weight: 700; color: var(--pn-brand); }
.pn-author-stat-label { color: var(--pn-ink-3); font-size: .9rem; }

/* ===================== LAYOUT (2-col) ===================== */
.pn-layout-2col {
  display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; align-items: start;
}

/* ===================== SIDEBAR ===================== */
.pn-layout-aside,
.pn-side-col {
  position: static;
  align-self: start;
  max-height: none;
  overflow-y: visible;
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
  max-width: 100%;
}

.pn-widget {
  background: #fff; border: 1px solid var(--pn-line);
  border-radius: var(--pn-radius); padding: 28px 22px 22px;
  width: 100%;
}
.pn-widget-title {
  font-size: 1rem; margin: 0 0 16px; padding-bottom: 12px;
  border-bottom: 1px solid var(--pn-line-soft);
  font-family: var(--pn-ff-sans); font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em; color: var(--pn-ink-2);
}
.pn-widget ul { list-style: none; padding: 0; margin: 0; }

/* Categories widget */
.pn-widget-categories { border-top: 3px solid var(--pn-brand); }
.pn-widget-categories li { border-bottom: 1px solid var(--pn-line-soft); }
.pn-widget-categories li:last-child { border-bottom: 0; }
.pn-widget-categories a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; color: var(--pn-ink-2); font-weight: 400;
  text-decoration: none;
}
.pn-widget-categories a:hover { color: var(--pn-brand); text-decoration: underline; }
.pn-cat-count {
  background: var(--pn-bg-soft); border-radius: 999px;
  padding: 2px 10px; font-size: .78rem; font-weight: 700; color: var(--pn-ink-3);
}

/* Recent notes widget */
.pn-widget-recent { border-top: 3px solid var(--pn-brand-2); }
.pn-widget-recent li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--pn-line-soft); }
.pn-widget-recent li:last-child { border-bottom: 0; }
.pn-recent-thumb {
  width: 64px; height: 64px; flex-shrink: 0; border-radius: var(--pn-radius-sm);
  overflow: hidden; background: var(--pn-bg-soft);
}
.pn-recent-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pn-recent-body { display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.pn-recent-title { font-weight: 600; color: var(--pn-ink); font-size: .92rem; line-height: 1.35; text-decoration: none; }
.pn-recent-title:hover { color: var(--pn-brand); }
.pn-recent-date { font-size: .78rem; color: var(--pn-ink-3); }

@media (max-width: 960px) {
  .pn-layout-aside,
  .pn-side-col {
    gap: 20px;
  }
}

/* ===================== SINGLE NOTE ===================== */
.pn-layout-3col {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 300px;
  gap: 40px;
  align-items: start;
  transition: grid-template-columns .35s ease;
}
/* When TOC is collapsed, shrink its column to a thin rail so content expands.
   We toggle this by adding .toc-collapsed on the .pn-layout-3col wrapper. */
.pn-layout-3col.toc-collapsed {
  grid-template-columns: 0 minmax(0, 1fr) 300px;
}
.pn-toc-col { position: sticky; top: 100px; transition: width .25s ease; }
.pn-toc {
  background: #fff; border: 1px solid var(--pn-line); border-radius: var(--pn-radius); padding: 20px;
  transition: padding .25s ease;
  position: sticky;
  top: 90px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--pn-line) transparent;
}
/* Collapsed TOC visual - just a hamburger pill */
.pn-toc-col.is-collapsed .pn-toc { padding: 0; border: 0; background: transparent; box-shadow: none; }
.pn-toc-col.is-collapsed .pn-toc-body,
.pn-toc-col.is-collapsed .pn-toc-head-text { display: none; }
.pn-toc-col.is-collapsed .pn-toc-head { justify-content: center; margin: 0; padding: 0; border-bottom: 0; }
.pn-toc-col.is-collapsed .pn-toc-toggle {
  position: fixed; left: 0; top: 260px;
  width: auto; height: 36px; padding: 0 10px;
  background: #003a5c; color: #fa9f20; border: none; box-shadow: none;
}

.pn-toc-head {
  display: flex; align-items: center; justify-content: space-between;
  margin: 0 0 12px; padding-bottom: 12px; border-bottom: 1px solid var(--pn-line-soft);
}
.pn-toc-head-text { display: flex; flex-direction: column; gap: 0; }
.pn-toc-title { font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: var(--pn-ink-3); margin: 0; font-family: var(--pn-ff-sans); font-weight: 700; }
.pn-toc-toggle {
  background: #fff; border: 1px solid var(--pn-line); border-radius: 999px;
  height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  cursor: pointer; color: #fa9f20; padding: 0 12px; flex-shrink: 0;
  font-weight: 700; font-size: .88rem;
  transition: all .15s;
}
.pn-toc-arrow { color: #fa9f20; flex-shrink: 0; }
.pn-toc-toggle:hover { background: #003a5c; color: #f7d71e; border-color: #003a5c; }
.pn-toc-toggle:hover .pn-toc-arrow { color: #f7d71e; }
.pn-toc-arrow { flex-shrink: 0; }
.pn-toc-toggle-label { font-size: .7rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; display: none; }
/* Show label only when TOC is collapsed so people know what the hamburger is */
.pn-toc-col.is-collapsed .pn-toc-toggle-label { display: inline; }

/* When TOC is collapsed, prose expands to fill the full content column */
.pn-content-col { transition: max-width .35s ease; width: 100%; box-sizing: border-box; }
.pn-prose { width: 100%; box-sizing: border-box; }
.pn-layout-3col.toc-collapsed .pn-note-title { font-size: clamp(1.6rem, 5vw, 2.8rem); }

.pn-toc-list { list-style: none; padding: 0; margin: 0; font-size: .92rem; }
.pn-toc-list li { margin-bottom: 6px; }
.pn-toc-list a { color: var(--pn-ink-2); text-decoration: none; padding: 4px 0; display: block; border-left: 2px solid transparent; padding-left: 10px; margin-left: -10px; transition: all .15s; }
.pn-toc-list a:hover, .pn-toc-list a.is-active { color: var(--pn-brand-ink); border-left-color: var(--pn-brand-ink); }
.pn-toc-sub { list-style: none; padding: 0 0 0 14px; margin: 6px 0; font-size: .88rem; color: var(--pn-ink-3); }

.pn-toc::-webkit-scrollbar {
  width: 4px;
}
.pn-toc::-webkit-scrollbar-track {
  background: transparent;
}
.pn-toc::-webkit-scrollbar-thumb {
  background: var(--pn-line);
  border-radius: 4px;
}
.pn-toc::-webkit-scrollbar-thumb:hover {
  background: var(--pn-ink-3);
}

@media (max-width: 960px) {
  .pn-toc {
    position: static;
    max-height: none;
    overflow-y: visible;
  }
}

/* Compact title-only related notes widget */
.pn-related-list { list-style: none; padding: 0; margin: 0; }
.pn-related-list li {
  padding: 12px 0; border-bottom: 1px solid var(--pn-line-soft);
  position: relative; padding-left: 22px;
}
.pn-related-list li:last-child { border-bottom: 0; }
.pn-related-list li::before {
  content: ""; position: absolute; left: 0; top: 18px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--pn-brand);
  opacity: .4;
}
.pn-related-list a {
  color: var(--pn-brand-ink); font-weight: 400; font-size: .95rem; line-height: 1.4;
  text-decoration: none; display: block; transition: color .15s;
}
.pn-related-list a:hover { color: #c06800; text-decoration: underline; }
.pn-related-list li:hover::before { opacity: 1; }

/* ===================== COMMENTS ===================== */
.pn-comments { margin-top: 50px; padding-top: 40px; border-top: 2px solid var(--pn-line); position: relative; }
.pn-admin-pill {
  display: inline-block; margin-bottom: 18px;
  padding: 6px 14px; border-radius: 999px;
  background: rgba(30, 64, 175, .08); color: var(--pn-brand);
  font-size: .78rem; font-weight: 700;
}
.pn-comments-head { margin-bottom: 24px; }
.pn-comments-title { font-size: 1.5rem; margin: 0 0 6px; }
.pn-comments-sub { color: var(--pn-ink-3); font-size: .92rem; margin: 0; }

.pn-comment-list { list-style: none; padding: 0; margin: 0 0 40px; }
.pn-comment {
  display: grid; grid-template-columns: 48px 1fr; gap: 14px;
  padding: 18px 0; border-bottom: 1px solid var(--pn-line-soft);
}
.pn-comment-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, var(--pn-brand), var(--pn-brand-2));
  color: #fff; display: grid; place-items: center;
  font-family: var(--pn-ff-serif); font-weight: 700; font-size: 1.1rem;
  flex-shrink: 0;
}
.pn-comment-meta {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  margin-bottom: 6px;
}
.pn-comment-author { color: var(--pn-ink); font-weight: 700; font-size: .98rem; }
.pn-comment-tag {
  display: inline-block; margin-left: 6px;
  padding: 1px 8px; border-radius: 999px;
  background: var(--pn-brand); color: #fff;
  font-size: .7rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}
.pn-comment-date { color: var(--pn-ink-3); font-size: .82rem; }
.pn-comment-text { color: var(--pn-ink); font-size: .96rem; line-height: 1.65; }
.pn-comment-text p { margin: 0 0 8px; }
.pn-comment-reply {
  display: inline-block; margin-top: 8px;
  font-size: .85rem; font-weight: 700; color: var(--pn-brand);
  text-decoration: none;
}
.pn-comment-reply:hover { text-decoration: underline; }
.pn-comment-children {
  list-style: none; margin: 14px 0 0;
  border-left: 2px solid var(--pn-line);
  padding-left: 20px;
}
.pn-comment-children .pn-comment { padding: 14px 0; }
.pn-comment-children .pn-comment:last-child { border-bottom: 0; padding-bottom: 0; }

/* Comment form */
.pn-comment-form {
  background: var(--pn-bg-soft); border: 1px solid var(--pn-line);
  border-radius: var(--pn-radius); padding: 28px;
}
.pn-comment-form-title { font-size: 1.2rem; margin: 0 0 6px; }
.pn-comment-form-note { color: var(--pn-ink-3); font-size: .85rem; margin: 0 0 20px; }
.pn-comment-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.pn-comment-form label {
  display: block; margin-bottom: 16px;
}
.pn-comment-form label > span {
  display: block; margin-bottom: 6px;
  font-size: .85rem; font-weight: 700; color: var(--pn-ink-2);
}
.pn-comment-form input,
.pn-comment-form textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--pn-line); border-radius: var(--pn-radius-sm);
  font: inherit; color: var(--pn-ink);
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
  resize: vertical;
}
.pn-comment-form input:focus,
.pn-comment-form textarea:focus {
  outline: none;
  border-color: var(--pn-brand-2);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, .15);
}
.pn-comments-disabled {
  text-align: center; padding: 30px; background: var(--pn-bg-soft);
  border-radius: var(--pn-radius); color: var(--pn-ink-3);
}
@media (max-width: 640px) {
  .pn-comment-form-row { grid-template-columns: 1fr; }
}

.pn-note-header { margin-bottom: 28px; }
.pn-note-cat {
  display: inline-block; padding: 4px 12px; border-radius: 6px;
  background: rgba(30, 64, 175, .1); color: var(--pn-brand);
  font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  margin-bottom: 14px; text-decoration: none;
}
.pn-note-title { font-size: clamp(1.6rem, 5vw, 2.8rem); letter-spacing: -.03em; margin: 0 0 16px; line-height: 1.22; color: var(--pn-ink); font-weight: 500; }
.pn-note-meta { display: flex; gap: 20px; flex-wrap: wrap; color: var(--pn-ink-3); font-size: .92rem; }
.pn-note-meta span { display: inline-flex; align-items: center; gap: 6px; }
.pn-note-featured { margin: 0 0 30px; border-radius: var(--pn-radius); overflow: hidden; }

.pn-prose { font-size: 1.12rem; line-height: 1.9; color: var(--pn-ink); }
.pn-prose h2 { font-size: 1.5rem; font-weight: 700; margin: 1.8rem 0 0.8rem; padding-bottom: 0.4rem; border-bottom: 2px solid rgba(30,64,175,.18); }
.pn-prose h3 { font-size: 1.3rem; font-weight: 700; margin: 1.5rem 0 0.6rem; padding-bottom: 0.3rem; border-bottom: 1px solid rgba(30,64,175,.12); }
.pn-prose h4 { font-size: 1.0rem; font-weight: 700; margin: 1.2rem 0 0.4rem; }
.pn-prose p { margin: 0 0 18px; text-align: justify; hyphens: none; overflow-wrap: break-word; width: 100%; box-sizing: border-box; }
.pn-prose strong { color: var(--pn-ink); font-weight: 700; }
.pn-prose blockquote {
  border-left: 4px solid var(--pn-brand); padding: 6px 20px;
  background: var(--pn-bg-soft); margin: 22px 0;
  font-style: italic; color: var(--pn-ink);
  border-radius: 0 var(--pn-radius-sm) var(--pn-radius-sm) 0;
}
.pn-prose ul, .pn-prose ol { padding-left: 24px; margin: 0 0 18px; width: 100%; box-sizing: border-box; }
.pn-prose li { margin-bottom: 6px; }
.pn-prose code {
  font-family: var(--pn-ff-mono); background: var(--pn-bg-soft);
  padding: 2px 6px; border-radius: 4px; font-size: .92em;
}

/* Tooltip */
.pn-tip {
  position: relative; cursor: help;
  border-bottom: 1.5px dotted var(--pn-brand);
  color: var(--pn-brand-ink); font-weight: 700;
}
/* JS-driven tooltip — see assets/js/tooltips.js */
#pn-tooltip {
  position: fixed; z-index: 9999;
  max-width: calc(100vw - 16px);
  background: var(--pn-bg-deep); color: #fff;
  padding: 12px 14px; border-radius: var(--pn-radius-sm);
  font-size: .85rem; font-weight: 400; line-height: 1.55;
  box-shadow: var(--pn-shadow-lg);
  pointer-events: none;
  opacity: 0; transition: opacity .15s;
  word-break: break-word; overflow-wrap: break-word;
  box-sizing: border-box;
}
#pn-tooltip.is-visible { opacity: 1; }
.pn-tt-body { display: block; }
.pn-tt-arrow {
  position: absolute; left: 50%;
  width: 0; height: 0;
  border: 6px solid transparent;
}
#pn-tooltip:not(.is-below) .pn-tt-arrow {
  bottom: -12px; transform: translateX(-50%);
  border-top-color: var(--pn-bg-deep);
}
#pn-tooltip.is-below .pn-tt-arrow {
  top: -12px; transform: translateX(-50%);
  border-bottom-color: var(--pn-bg-deep);
}
.pn-tip-dot {
  display: inline-block; width: 4px; height: 4px;
  background: var(--pn-brand); border-radius: 50%;
  vertical-align: super; margin-left: 3px;
}

/* Share bar */
.pn-share {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  padding: 20px 0; border-top: 1px solid var(--pn-line); border-bottom: 1px solid var(--pn-line);
  margin: 32px 0;
}
.pn-share-label { font-weight: 700; font-size: .9rem; color: var(--pn-ink-2); }
.pn-share a, .pn-share-copy, .pn-share-rg {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--pn-bg-soft); color: var(--pn-ink-2);
  display: grid; place-items: center;
  transition: all .15s; text-decoration: none;
  border: none; cursor: pointer; font-size: 1rem; padding: 0;
}
.pn-share a:hover, .pn-share-copy:hover, .pn-share-rg:hover { background: var(--pn-ink-2); color: #fff; }
.pn-share a[href*="twitter.com"]:hover, .pn-share a[href*="x.com"]:hover { background: #000; color: #fff; }
.pn-share a[href*="facebook.com"]:hover  { background: #1877F2; color: #fff; }
.pn-share a[href*="linkedin.com"]:hover  { background: #0A66C2; color: #fff; }
.pn-share a[href*="wa.me"]:hover         { background: #25D366; color: #fff; }
.pn-share-rg:hover                       { background: #00CCBB; color: #fff; }
.pn-share-copy:hover                     { background: #16a34a; color: #fff; }
.pn-share-copy.is-copied, .pn-share-rg.is-copied { background: #16a34a; color: #fff; }
.pn-share a.pn-share-citation {
  width: auto; height: auto; margin-left: auto;
  border-radius: 999px; padding: 8px 18px;
  border: 1px solid var(--pn-line);
  background: #fff;
  color: var(--pn-ink-2); font-size: .88rem; font-weight: 700;
  box-shadow: none; transform: none;
  transition: all .15s; text-decoration: none;
}
.pn-share a.pn-share-citation:hover {
  background: #003a5c; color: #fa9f20; border-color: #003a5c;
  transform: none; box-shadow: none; text-decoration: none;
}

/* Prev / Next post navigation */
.pn-post-nav {
  display: flex; justify-content: space-between; align-items: center;
  margin: 28px 0 24px;
}
.pn-post-nav-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 18px; border-radius: 999px;
  border: 1px solid var(--pn-line);
  background: #fff;
  color: var(--pn-ink-2); font-size: .88rem; font-weight: 700;
  text-decoration: none;
  transition: all .15s;
}
.pn-post-nav-btn:hover { background: #003a5c; color: #fa9f20; border-color: #003a5c; }

/* Author card at end of note */
.pn-author-card {
  display: grid; grid-template-columns: 120px 1fr; gap: 18px;
  background: var(--pn-bg-soft); border-radius: var(--pn-radius); padding: 22px;
  margin: 32px 0;
}
.pn-author-avatar {
  width: 120px; height: 120px; border-radius: 12px; overflow: hidden;
  background: linear-gradient(135deg, var(--pn-brand), var(--pn-brand-2));
  display: grid; place-items: center; color: #fff;
  font-family: var(--pn-ff-serif); font-size: 2.4rem; font-weight: 700;
}
.pn-author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.pn-author-name { margin: 0 0 4px; font-size: 1.1rem; font-weight: 600; }
.pn-author-name a { color: var(--pn-brand-ink); }
.pn-author-name a:hover { color: #c06800; text-decoration: underline; }
.pn-note-meta a:hover { color: #c06800; text-decoration: underline; }
.pn-author-title { color: var(--pn-ink-3); font-size: .88rem; margin: 0 0 8px; }
.pn-author-bio { color: var(--pn-ink); font-size: .92rem; margin: 0 0 8px; }
.pn-author-more { color: var(--pn-brand); font-weight: 700; font-size: .88rem; }

/* ===================== GLOSSARY ===================== */
.pn-glossary-nav {
  display: flex; gap: 4px; flex-wrap: wrap;
  padding: 14px; background: var(--pn-bg-soft); border-radius: var(--pn-radius);
  margin: 24px 0 32px;
}
.pn-glossary-nav a {
  width: 36px; height: 36px; border-radius: 8px;
  display: grid; place-items: center;
  background: #fff; color: var(--pn-ink-2); font-weight: 700; font-size: .88rem;
  text-decoration: none; transition: all .15s;
}
.pn-glossary-nav a:hover, .pn-glossary-nav a.is-active { background: #003a5c; color: #fa9f20; }
.pn-glossary-nav a.is-empty { background: transparent; color: var(--pn-line); cursor: default; }

.pn-glossary-letter {
  display: inline-block; font-family: var(--pn-ff-serif); font-weight: 700; font-size: 2.4rem;
  color: var(--pn-brand); margin: 30px 0 14px; padding: 0 18px;
  background: rgba(30, 64, 175, .08); border-radius: var(--pn-radius-sm);
}
.pn-glossary-terms {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.pn-glossary-term {
  background: #fff; border: 1px solid var(--pn-line);
  border-radius: var(--pn-radius); padding: 20px;
  transition: all .2s; text-decoration: none; color: var(--pn-ink);
  display: block;
}
.pn-glossary-term:hover { border-color: var(--pn-brand); box-shadow: var(--pn-shadow); text-decoration: none; }
.pn-glossary-term h3 {
  font-size: 1.1rem; margin: 0 0 6px; color: var(--pn-brand);
  font-family: var(--pn-ff-sans); font-weight: 700;
}
.pn-glossary-term p { margin: 0; color: var(--pn-ink); font-size: .92rem; line-height: 1.55; }

/* ===================== ABOUT PAGE ===================== */
.pn-about-hero {
  padding: 48px 0 32px; text-align: center;
  border-bottom: 1px solid var(--pn-line); margin-bottom: 40px;
}
.pn-about-intro {
  max-width: 760px; margin: 20px auto 0; color: var(--pn-ink);
  font-size: 1.15rem; line-height: 1.7;
}
.pn-about-intro p { margin: 0 0 1em; }
.pn-about-intro p:last-child { margin-bottom: 0; }
.pn-stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 20px; margin: 40px 0 60px;
}
.pn-stat {
  background: linear-gradient(135deg, #fff, var(--pn-bg-soft));
  border: 1px solid var(--pn-line); border-radius: var(--pn-radius);
  padding: 24px; text-align: center;
}
.pn-stat-num {
  display: block; font-family: var(--pn-ff-serif); font-weight: 700;
  font-size: 2.6rem; color: var(--pn-brand); line-height: 1;
}
.pn-stat-label { display: block; color: var(--pn-ink-3); font-size: .88rem; margin-top: 6px; letter-spacing: .04em; text-transform: uppercase; }
.pn-feature-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px; margin: 40px 0;
}
.pn-feature {
  background: #fff; border: 1px solid var(--pn-line);
  border-radius: var(--pn-radius); padding: 24px;
}
.pn-feature-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: linear-gradient(135deg, var(--pn-brand), var(--pn-brand-2));
  display: grid; place-items: center; color: #fff;
  margin-bottom: 14px;
}
.pn-feature h3 { margin: 0 0 8px; font-size: 1.1rem; }
.pn-feature p { color: var(--pn-ink); font-size: .92rem; margin: 0; }

/* ===================== FOOTER ===================== */
.pn-site-footer {
  background: var(--pn-bg-deep); color: #fa9f20;
  padding: 60px 0 30px; margin-top: 80px;
}
.pn-footer-grid {
  display: flex; flex-wrap: wrap; gap: 40px 30px; margin-bottom: 40px;
}
.pn-footer-brand {
  flex: 2 1 280px; min-width: 220px;
}
.pn-footer-col {
  flex: 1 1 160px; min-width: 140px;
}
.pn-footer-social {
  display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px;
}
.pn-footer-social-link {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,.15); color: #fff; text-decoration: none; flex-shrink: 0;
  transition: transform .15s, background .15s;
}
.pn-footer-social-link:hover { transform: translateY(-2px); background: rgba(255,255,255,.28); }
.pn-footer-social-link.pn-social--email     { background: #EA4335; }
.pn-footer-social-link.pn-social--instagram { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%); }
.pn-footer-social-link.pn-social--facebook  { background: #1877F2; }
.pn-footer-social-link.pn-social--linkedin  { background: #0A66C2; }
.pn-footer-social-link.pn-social--pinterest { background: #E60023; }
.pn-footer-social-link.pn-social--youtube   { background: #FF0000; }
.pn-footer-social-link.pn-social--twitter   { background: #000; }
.pn-footer-social-link.pn-social--tiktok    { background: #010101; }
.pn-footer-connect-links { list-style: none; padding: 0; margin: 0; }
.pn-footer-brand p { color: #ffffff; font-size: 0.95rem; font-weight: 400; margin: 10px 0 0; max-width: 320px; line-height: 1.6; }
.pn-footer-col h4 {
  color: #ffffff; font-size: 1.05rem; font-weight: 700;
  margin: 0 0 14px; font-family: var(--pn-ff-sans);
}
.pn-footer-col ul { list-style: none; padding: 0; margin: 0; }
.pn-footer-col li { margin-bottom: 10px; }
.pn-footer-col a { color: #fa9f20; text-decoration: none; font-size: 0.95rem; font-weight: 500; }
.pn-footer-col a:hover { background: transparent; color: #f7d71e; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.pn-footer-bottom {
  padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .1);
  text-align: center;
  color: #ffffff; font-size: 18px; font-weight: 600;
}
.pn-footer-bottom a { color: #fa9f20; text-decoration: underline; font-size: 18px; font-weight: 600; }
.pn-footer-bottom a:hover { background: transparent; color: #f7d71e; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* ===================== LEARNING OBJECTIVES ===================== */
.pn-learning-obj {
  background: #eff6ff;
  border-left: 4px solid var(--pn-brand);
  border-radius: 0 var(--pn-radius) var(--pn-radius) 0;
  padding: 18px 22px;
  margin: 28px 0;
}
.pn-learning-obj-title {
  font-size: .85rem; font-weight: 700; color: var(--pn-brand-ink);
  margin: 0 0 10px; padding: 0 0 8px;
  border-bottom: 1px solid rgba(30,64,175,.18);
}
.pn-learning-obj-title::before,
.pn-learning-obj-title::after { display: none; content: none; }
.pn-learning-obj-list { margin: 0; padding: 0 0 0 18px; }
.pn-learning-obj-list li {
  color: var(--pn-ink); font-size: .93rem; margin-bottom: 6px; line-height: 1.5;
}
.pn-learning-obj-list li:last-child { margin-bottom: 0; }

/* ---- Derivation box (shortcode) ---- */
.pn-derivation {
  background: #eff6ff;
  border-left: 4px solid var(--pn-brand);
  border-radius: 0 var(--pn-radius) var(--pn-radius) 0;
  padding: 18px 22px;
  margin: 28px 0;
}
.pn-derivation-title {
  font-size: 1.1rem; font-weight: 700; color: var(--pn-brand-ink);
  margin: 0 0 12px; border: none; padding: 0;
}
.pn-derivation-title::before,
.pn-derivation-title::after { display: none; content: none; }
.pn-derivation-body { color: var(--pn-ink); font-size: .93rem; line-height: 1.7; }
.pn-derivation-body p { margin: 0 0 10px; }
.pn-derivation-body p:last-child { margin-bottom: 0; }
.pn-derivation-body ol,
.pn-derivation-body ul { margin: 0 0 10px; padding-left: 20px; }
.pn-derivation-body li { margin-bottom: 4px; }

/* Block pattern output — direct block children inside derivation/statement box */
.pn-derivation > .wp-block-paragraph,
.pn-derivation > p { color: var(--pn-ink); font-size: .93rem; line-height: 1.7; margin: 0 0 10px; }
.pn-derivation > .wp-block-paragraph:last-child,
.pn-derivation > p:last-child { margin-bottom: 0; }
.pn-derivation > .wp-block-list,
.pn-derivation > ul,
.pn-derivation > ol { font-size: .93rem; line-height: 1.7; margin: 0 0 10px; padding-left: 20px; }
.pn-derivation > .wp-block-list li,
.pn-derivation > ul li,
.pn-derivation > ol li { color: var(--pn-ink); margin-bottom: 4px; }
.pn-derivation > .wp-block-heading { border: none; padding: 0; }

/* ===================== AWARD BANNER (homepage) ===================== */
.pn-award-banner {
  background: linear-gradient(135deg, #fefce8 0%, #eff6ff 100%);
  border-top: 3px solid #f59e0b; border-bottom: 3px solid #f59e0b;
  padding: 0; overflow: hidden;
  animation: pnAwardSlideIn .6s ease both;
}
@keyframes pnAwardSlideIn {
  from { opacity: 0; transform: translateY(-18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.pn-award-banner-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.pn-award-banner-slides { position: relative; min-height: 80px; }
.pn-award-banner-slide {
  display: none; align-items: center; gap: 18px;
  padding: 18px 0;
}
.pn-award-banner-slide.is-active { display: flex; }
.pn-award-banner-trophy { font-size: 2rem; flex-shrink: 0; }
.pn-award-banner-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.pn-award-banner-label { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #b45309; }
.pn-award-banner-title { font-size: 1rem; font-weight: 700; color: var(--pn-ink); }
.pn-award-banner-recipient { font-size: .92rem; color: var(--pn-ink-2); }
.pn-award-banner-meta { font-size: .82rem; color: var(--pn-ink-3); }
.pn-award-banner-btn { flex-shrink: 0; font-size: .85rem; padding: 7px 16px; }
.pn-award-banner-dots { display: flex; gap: 6px; justify-content: center; padding-bottom: 10px; }
.pn-award-banner-dot {
  width: 8px; height: 8px; border-radius: 50%; border: none; cursor: pointer;
  background: #d97706; opacity: .35; transition: opacity .2s;
}
.pn-award-banner-dot.is-active { opacity: 1; }
@media (max-width: 640px) {
  .pn-award-banner-slide { flex-wrap: wrap; gap: 10px; }
  .pn-award-banner-btn { width: 100%; text-align: center; }
}

/* ===================== AWARD PAGE ===================== */
.pn-award-hero {
  text-align: center; padding: 60px 20px 40px;
  background: linear-gradient(135deg, #fefce8 0%, #eff6ff 100%);
  border-radius: var(--pn-radius); margin: 32px 0 40px;
  border: 1px solid #fde68a;
}
.pn-award-trophy { font-size: 4rem; line-height: 1; margin-bottom: 16px; }
.pn-award-title  { font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 700; color: var(--pn-brand); margin: 12px 0 16px; }
.pn-award-recipient { font-size: 1.3rem; font-weight: 700; color: var(--pn-ink); margin: 0 0 8px; }
.pn-award-meta { font-size: .95rem; color: var(--pn-ink-3); margin: 4px 0; }
.pn-award-photo { margin-top: 24px; }
.pn-award-img   { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; border: 4px solid #fde68a; box-shadow: var(--pn-shadow); }
.pn-award-body  { max-width: 720px; margin: 0 auto 40px; }
.pn-award-back  { text-align: center; padding-bottom: 48px; }

/* ===================== SCROLL TO TOP ===================== */
#pnScrollTop {
  position: fixed; bottom: 28px; right: 28px; z-index: 999;
  width: 56px; height: 56px; border-radius: 50%;
  background: #003a5c; color: #fa9f20;
  border: none; cursor: pointer;
  display: grid; place-items: center;
  box-shadow: var(--pn-shadow-lg);
  opacity: 0; pointer-events: none;
  transform: translateY(16px);
  transition: opacity .25s ease, transform .25s ease, background .15s;
}
#pnScrollTop.is-visible {
  opacity: 1; pointer-events: auto;
  transform: translateY(0);
}
#pnScrollTop:hover {
  background: #fa9f20; color: #003a5c;
  transform: translateY(-3px);
}


/* ===================== PREVIEW BANNER ===================== */
.pn-preview-bar {
  background: linear-gradient(90deg, #0d1b2a, #1e40af);
  color: #fff; padding: 10px 20px; font-size: .85rem;
  display: flex; gap: 16px; justify-content: center; flex-wrap: wrap;
  position: sticky; top: 0; z-index: 100;
}
.pn-preview-bar strong { color: #fff; }
.pn-preview-bar a { color: #bfdbfe; text-decoration: none; font-weight: 700; padding: 2px 8px; border-radius: 4px; }
.pn-preview-bar a:hover { background: rgba(255, 255, 255, .1); }
.pn-preview-bar a.is-current { background: rgba(255, 255, 255, .15); color: #fff; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 960px) {
  .pn-prose { font-size: 1.125rem; line-height: 1.65; }
  .pn-layout-3col { grid-template-columns: 1fr; }
  .pn-layout-2col { grid-template-columns: 1fr; }
  .pn-toc-col { position: static; order: -1; }
  .pn-footer-brand { flex-basis: 100%; }
  .pn-author-hero { grid-template-columns: 1fr; text-align: center; }
  .pn-author-hero-photo { margin: 0 auto; }
  .pn-author-links { justify-content: center; }
}
@media (max-width: 640px) {
  .pn-search input { width: 140px; }
  .pn-note-row { grid-template-columns: 100px 1fr; }
  .pn-note-row-thumb { width: 100px; }
  .pn-note-row-badge { grid-column: 2; justify-self: start; }
  .pn-footer-col { flex-basis: 100%; }
  .pn-hero { padding: 40px 0 48px; }
}


/* Team sections (grouped by role) */
.pn-team-section { margin: 48px 0; }
.pn-team-section:first-of-type { margin-top: 0; }
.pn-team-section-head { margin: 0 0 24px; }
.pn-team-section-title {
  font-size: clamp(1.4rem, 2.2vw, 1.8rem); margin: 0;
  position: relative; padding-bottom: 8px;
}
.pn-team-section-title::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 48px; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, var(--pn-brand), var(--pn-brand-2));
}
.pn-team-section-sub { color: var(--pn-ink-3); font-size: .95rem; margin: 8px 0 0; }

/* Role badge on each card */
.pn-team-card { position: relative; padding-top: 38px; }
.pn-team-role-badge {
  position: absolute; top: 14px; right: 14px;
  padding: 3px 10px; border-radius: 999px;
  font-size: .68rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  background: var(--pn-bg-soft); color: var(--pn-ink-3);
}
.pn-role-founder { background: linear-gradient(135deg,#fbbf24,#ea580c); color:#fff; }
.pn-role-core { background: linear-gradient(135deg,var(--pn-brand),var(--pn-brand-2)); color:#fff; }
.pn-role-author { background: rgba(30, 64, 175, .1); color: var(--pn-brand); }
.pn-role-advisor { background: rgba(124, 58, 237, .12); color: #6d28d9; }
.pn-role-tech { background: rgba(5, 150, 105, .12); color: #057a55; }
/* WordPress compatibility additions */
.admin-bar .pn-header { top: 32px; }
.wp-caption, .wp-caption-text, .gallery-caption, .bypostauthor { max-width: 100%; }
.alignleft { float: left; margin: 0 1.5rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.5rem; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.screen-reader-text { position:absolute; left:-9999px; width:1px; height:1px; overflow:hidden; }
@media (max-width: 782px) { .admin-bar .pn-header { top: 46px; } }

/* Dynamic WordPress single-note refinements */
.pn-comment-form .comment-form-author,
.pn-comment-form .comment-form-email,
.pn-comment-form .comment-form-url { display:block; margin-bottom:16px; }
.pn-comment-form .form-submit { margin: 8px 0 0; }
.pn-comment-list .children { list-style:none; margin:14px 0 0 0; border-left:2px solid var(--pn-line); padding-left:20px; }

/* ========================================================================
   PhysNotes layout fix: search/sidebar overlap + mobile single-note order
   ======================================================================== */
.pn-layout-main,
.pn-content-col,
.pn-side-col {
  min-width: 0;
}
.pn-layout-aside .pn-widget,
.pn-side-col .pn-widget {
  max-width: 100%;
  overflow-wrap: anywhere;
}
.pn-note-row-body {
  min-width: 0;
}
.pn-note-row-body h3,
.pn-note-row-excerpt,
.pn-recent-title {
  overflow-wrap: anywhere;
}
.pn-search input {
  min-width: 0;
}

@media (max-width: 1100px) {
  .pn-layout-2col {
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 28px;
  }
  .pn-layout-3col {
    grid-template-columns: 230px minmax(0, 1fr) 260px;
    gap: 26px;
  }
}

@media (max-width: 960px) {
  .pn-layout-2col {
    grid-template-columns: 1fr;
  }
  .pn-layout-main {
    order: 1;
  }
  .pn-layout-aside {
    order: 2;
    margin-top: 28px;
  }

  /* Single note mobile/tablet: content first; categories/recent/related below. */
  .pn-layout-3col,
  .pn-layout-3col.toc-collapsed {
    display: block;
    grid-template-columns: none;
  }
  .pn-content-col {
    display: block;
  }
  .pn-side-col {
    display: block;
    margin-top: 32px;
  }

  /* Fixed floating TOC on left — same as desktop, consistent across all screen sizes. */
  .pn-toc-col {
    position: fixed;
    top: 260px;
    left: 0;
    z-index: 1200;
    width: min(320px, calc(100vw - 32px));
    max-height: calc(100vh - 280px);
    overflow: visible;
    order: initial;
    transition: top .3s ease;
  }
  .pn-toc-col .pn-toc {
    max-height: calc(100vh - 280px);
    overflow: auto;
    box-shadow: var(--pn-shadow-lg);
  }
  .pn-toc-col.is-collapsed {
    width: auto;
  }
  .pn-toc-col.is-collapsed .pn-toc {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }
  .pn-toc-col.is-collapsed .pn-toc-body,
  .pn-toc-col.is-collapsed .pn-toc-head-text {
    display: none;
  }
  .pn-toc-col.is-collapsed .pn-toc-head {
    margin: 0;
    padding: 0;
    border: 0;
  }
  /* Toggle is inside the fixed toc-col on mobile, so keep it static (not doubly fixed). */
  .pn-toc-col.is-collapsed .pn-toc-toggle {
    position: static;
    border-radius: 8px;
  }
  .pn-toc-col:not(.is-collapsed) .pn-toc-toggle {
    background: var(--pn-brand);
    color: #fff;
    border-color: var(--pn-line);
  }

  .pn-related-list,
  .pn-widget-categories ul,
  .pn-widget-recent ul {
    max-width: 100%;
  }
}



@media (max-width: 640px) {
  .pn-container {
    padding-left: 16px;
    padding-right: 16px;
  }
  .pn-header-nav-row {
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 16px;
    padding-right: 16px;
  }
  .pn-primary-nav.is-open {
    margin-left: -16px;
  }
  .pn-menu > li > a {
    padding-left: 16px;
    padding-right: 16px;
  }
  .pn-note-row {
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 14px;
  }
  .pn-note-row-thumb {
    width: 92px;
  }
  .pn-note-row-badge {
    grid-column: 2;
    justify-self: start;
  }
  /* All-notes flat card: stack vertically on phones only */
  .pn-note-row--flat {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .pn-note-row--flat .pn-note-row-htitle  { order: 1; font-size: 1.05rem; margin: 0; }
  .pn-note-row--flat .pn-note-row-meta    { order: 2; margin-bottom: 0; }
  .pn-note-row--flat .pn-note-row-thumb   { order: 3; width: 100%; aspect-ratio: 16 / 9; height: auto; }
  .pn-note-row--flat .pn-note-row-excerpt { order: 4; }
  .pn-layout-aside,
  .pn-side-col {
    margin-top: 28px;
  }
}


/* ===== Single-note image normalization =====
   Keep all article images full available width with symmetric corners. */
.single .pn-note-featured,
.pn-note .pn-note-featured {
  width: 100%;
  max-width: 100%;
  margin: 0 0 30px;
  border-radius: var(--pn-radius);
  overflow: hidden;
}

.single .pn-note-featured img,
.pn-note .pn-note-featured img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: var(--pn-radius);
  object-fit: cover;
}

.single .pn-prose img,
.pn-note .pn-prose img,
.single .wp-block-image img,
.pn-note .wp-block-image img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: var(--pn-radius);
  object-fit: cover;
}

.single .wp-block-image,
.pn-note .wp-block-image,
.single .pn-prose figure,
.pn-note .pn-prose figure {
  width: 100%;
  max-width: 100%;
  margin: 16px 0;
}

@media (max-width: 960px) {
  .single .pn-note-featured,
  .pn-note .pn-note-featured,
  .single .pn-prose img,
  .pn-note .pn-prose img,
  .single .wp-block-image img,
  .pn-note .wp-block-image img {
    width: 100%;
    max-width: 100%;
    border-radius: 12px;
  }
}

@media (max-width: 640px) {
  .pn-prose { font-size: 1.125rem; line-height: 1.75; }
  .single .pn-note-featured,
  .pn-note .pn-note-featured,
  .single .wp-block-image,
  .pn-note .wp-block-image,
  .single .pn-prose figure,
  .pn-note .pn-prose figure {
    margin-left: 0;
    margin-right: 0;
    width: 100%;
  }
  .single .pn-note-featured img,
  .pn-note .pn-note-featured img,
  .single .pn-prose img,
  .pn-note .pn-prose img,
  .single .wp-block-image img,
  .pn-note .wp-block-image img {
    width: 100%;
    max-width: 100%;
    border-radius: 10px;
  }
}

.pn-site-header .custom-logo-link img {
    height: 50px !important;
    width: auto !important;
    max-width: 200px !important;
    display: block;
    object-fit: contain;
    background: transparent;
    mix-blend-mode: normal;
}

.pn-widget-authors {
  border-top: 3px solid var(--pn-brand-2);
}

/* ===================== TOC ACTIVE LINK ===================== */
.pn-toc-body a {
  display: block;
  padding: 4px 8px;
  border-radius: 6px;
  color: var(--pn-ink-2);
  text-decoration: none;
  font-size: .9rem;
  transition: background .15s, color .15s, border-color .15s;
  border-left: 2px solid transparent;
}
.pn-toc-body a:hover {
  color: var(--pn-brand-ink);
  background: var(--pn-bg-soft);
}
.pn-toc-body a.is-active {
  color: var(--pn-brand-ink);
  background: rgba(11, 42, 107, .06);
  border-left-color: var(--pn-brand-ink);
  font-weight: 700;
}

/* ===================== ARTICLE HEADING COLORS ===================== */
.pn-prose h2 {
  color: var(--pn-brand);
}
.pn-prose h3 {
  color: var(--pn-brand-ink);
}
.pn-prose h4 {
  color: var(--pn-brand);
}

.home .pn-hero {
  margin-top: -100px;
  padding-top: calc(68px + 100px);
}

/* ===================== DROPDOWN MENU ===================== */
.pn-menu li {
  position: relative;
  list-style: none;
}

/* Level 1 dropdown */
.pn-menu li > ul {
  display: none;
  position: absolute; top: 100%; left: 0;
  background: #003a5c; border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--pn-radius-sm);
  box-shadow: var(--pn-shadow-lg);
  min-width: 210px; z-index: 200;
  padding: 6px 0;
  list-style: none;
}
.pn-menu li:hover > ul { display: block; }

.pn-menu li ul li { border: none; list-style: none; position: relative; }

.pn-menu li ul a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 12px;
  color: #fa9f20; font-weight: 600;
  font-size: 18px; border-radius: 4px;
  margin: 1px 4px; white-space: nowrap;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.pn-menu li ul a:hover {
  background: transparent;
  color: #f7d71e;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

/* Level 2 (sub-sub) dropdown — flies out to the right */
.pn-menu li ul li > ul {
  top: 0; left: 100%;
  border-radius: var(--pn-radius-sm);
}
.pn-menu li ul li:hover > ul { display: block; }

/* ---- Arrows via ::after — no Walker needed ---- */

/* Down chevron for top-level items with children */
/* Down chevron for top-level items with children */
.pn-menu > li.menu-item-has-children > a::after {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin-left: 7px;
  vertical-align: middle;
  position: relative; top: -2px;
  transition: transform .2s;
}
.pn-menu > li.menu-item-has-children:hover > a::after {
  transform: rotate(225deg);
}

/* Right chevron for second-level items that open a third level */
.pn-menu li ul li.menu-item-has-children > a::after {
  content: "";
  display: inline-block;
  width: 5px; height: 5px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  flex-shrink: 0;
  transition: transform .2s;
}
.pn-menu li ul li.menu-item-has-children:hover > a::after {
  transform: rotate(-45deg) translateX(2px);
}

/* ===================== HAMBURGER BUTTON ===================== */
.pn-mobile-toggle {
  display: none;
  align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 8px;
  border: none; background: transparent;
  cursor: pointer; color: #fa9f20;
  font-weight: 600; font-size: 18px; letter-spacing: .08em;
}
.pn-toggle-bars {
  display: flex; flex-direction: column; gap: 4px; width: 18px;
}
.pn-toggle-bars span {
  display: block; height: 2px; width: 100%;
  background: currentColor; border-radius: 2px;
  transition: transform .25s, opacity .25s;
}

/* Animate to ✕ when open */
.pn-mobile-toggle[aria-expanded="true"] .pn-toggle-bars span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.pn-mobile-toggle[aria-expanded="true"] .pn-toggle-bars span:nth-child(2) {
  opacity: 0; transform: scaleX(0);
}
.pn-mobile-toggle[aria-expanded="true"] .pn-toggle-bars span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ===================== MOBILE / TABLET MENU (≤768px) ===================== */
@media (max-width: 768px) {
  /* Nav row: flex-wrap so the nav panel drops below the control bar */
  .pn-header-nav-row {
    flex-wrap: wrap;
    align-items: center;
    min-height: 52px;
    background: #003a5c;
    margin-left: -24px;
    margin-right: -24px;
    padding-left: 24px;
    padding-right: 24px;
  }

  /* Control bar: MENU (left) — SEARCH (right), always on the same line */
  .pn-header-nav-row .pn-mobile-toggle  { display: flex; order: 1; flex-shrink: 0; }
  .pn-header-nav-row .pn-header-actions { order: 2; flex-shrink: 0; margin-left: auto; align-self: center; }

  /* Nav panel always wraps to its own full-width row below the control bar */
  .pn-header-nav-row .pn-primary-nav    { order: 3; flex-basis: 100%; }

  /* Search label matches MENU sizing on small screens */
  .pn-search-label { font-size: 1rem; }

  .pn-primary-nav { display: none; width: 100%; }
  .pn-primary-nav.is-open {
    display: block;
    /* Break out of container padding → full device width */
    width: 100vw;
    margin-left: -24px;
    padding: 8px 0 24px;
    background: #003a5c;
    max-height: 60vh; overflow-y: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .pn-menu {
    flex-direction: column; gap: 0;
    padding: 0 20px;
  }
  /* Nav logo — sticky at the top of the open mobile nav */
  .pn-nav-logo {
    display: flex; align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--pn-line);
    background: #003a5c;
    position: sticky; top: 0; z-index: 5;
  }
  .pn-nav-logo a {
    display: inline-flex; align-items: center; gap: 12px;
    text-decoration: none; color: #fa9f20;
  }
  .pn-nav-logo img {
    max-height: 44px; width: auto; display: block;
  }

  .pn-menu li { width: 100%; }

  /* Items with children: flex row so link + toggle sit side by side */
  .pn-menu li.menu-item-has-children {
    display: flex; flex-wrap: wrap; align-items: stretch;
  }
  .pn-menu li.menu-item-has-children > a { flex: 1; }
  .pn-menu li.menu-item-has-children > ul { flex-basis: 100%; }

  /* Top-level links — full-width hover to nav edges */
  .pn-menu > li > a {
    display: flex; align-items: center;
    padding: 12px 24px;
    font-size: 1.05rem;
    border-radius: 0;
    border-bottom: none;
  }
  /* Separator lives on the li so hover bg stays fully rounded */
  .pn-menu > li { border-bottom: 1px solid var(--pn-line-soft); }
  .pn-menu > li:last-child { border-bottom: none; }
  .pn-menu li.menu-item-has-children > a { border-bottom: none; }
  .pn-menu li.menu-item-has-children { border-bottom: 1px solid var(--pn-line-soft); }

  /* Hide desktop ::after arrows on mobile — button handles it */
  .pn-menu > li.menu-item-has-children > a::after,
  .pn-menu li ul li.menu-item-has-children > a::after { content: none; }

  /* Submenu toggle button */
  .pn-sub-toggle {
    background: none; border: none; cursor: pointer;
    color: #fa9f20;
    padding: 0 4px 0 14px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    transition: color .15s;
  }
  .pn-sub-toggle::before {
    content: "";
    display: inline-block;
    width: 6px; height: 6px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform .25s;
    position: relative; top: -2px;
  }
  .pn-menu li.is-open > .pn-sub-toggle { color: #f7d71e; }
  .pn-menu li.is-open > .pn-sub-toggle::before {
    transform: rotate(225deg);
    top: 2px;
  }

  /* Submenus — static, indented */
  .pn-menu li > ul {
    position: static; display: none;
    box-shadow: none; border: none; border-radius: 0;
    min-width: 100%; padding: 0 0 0 16px;
    background: #003a5c;
    border-left: 3px solid #fa9f20;
  }
  .pn-menu li ul li > ul {
    padding-left: 12px;
    border-left-color: var(--pn-brand-2);
  }
  .pn-menu li ul a {
    padding: 9px 12px; margin: 0; border-radius: 8px;
    border-bottom: none;
    font-size: 1rem;
    justify-content: space-between;
  }
  .pn-menu li ul li { border-bottom: 1px solid var(--pn-line-soft); }
  .pn-menu li ul li:last-child { border-bottom: none; }

  /* Disable hover-open on mobile; use .is-open instead */
  .pn-menu li:hover > ul { display: none; }
  .pn-menu li.is-open > ul { display: block; }
}

/* ===================== DESKTOP ONLY (>768px) ===================== */
@media (min-width: 769px) {
  .pn-header-nav-row .pn-mobile-toggle { display: none; }
  .pn-nav-logo { display: none; }
  .pn-sub-toggle { display: none; }
}

/* ===================== 404 PAGE ===================== */
.pn-404 {
  text-align: center; padding: 80px 20px 60px; max-width: 560px; margin: 0 auto;
}
.pn-404-code {
  display: block; font-family: var(--pn-ff-serif); font-size: clamp(5rem, 15vw, 9rem);
  font-weight: 700; color: var(--pn-line); line-height: 1;
}
.pn-404-title {
  font-size: clamp(1.5rem, 4vw, 2.5rem); font-weight: 700;
  color: var(--pn-ink); margin: 0 0 12px;
}
.pn-404-sub {
  color: var(--pn-ink-3); font-size: 1.05rem; margin: 0 0 32px;
}
.pn-404-actions {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 16px;
}
.pn-404-redirect {
  font-size: .9rem; color: var(--pn-ink-3); margin: 0 0 32px;
}
.pn-404-redirect #pn404Countdown {
  font-weight: 700; color: var(--pn-brand);
}
.pn-404-search {
  max-width: 420px; margin: 0 auto;
}
.pn-404-search p { color: var(--pn-ink-3); margin-bottom: 12px; }

/* ===================== IMAGE PLACEHOLDER ===================== */
.pn-img-placeholder {
  width: 100%; aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--pn-bg-soft) 0%, var(--pn-line) 100%);
  display: grid; place-items: center;
  border-radius: var(--pn-radius);
}
.pn-img-placeholder span {
  font-family: var(--pn-ff-serif); font-size: 2rem; font-weight: 700;
  color: var(--pn-line-soft); opacity: .5;
}

/* ===================== MISC UTILITIES ===================== */
.pn-section-no-top { margin-top: 0 !important; padding-top: 0 !important; }
/* Page template: first section inside main should not use full section top margin */
main > .pn-container.pn-section { margin-top: 12px; }
.pn-result-count   { color: var(--pn-ink-3); margin-bottom: 24px; }
.pn-page-count     { margin-top: 14px; color: var(--pn-ink-3); font-weight: 700; }
.pn-related-notes  { margin-top: 32px; }

/* Active category in sidebar */
.pn-widget-categories a.is-active {
  background: var(--pn-bg-soft);
  border-radius: 8px;
  padding: 6px 10px;
  margin: 2px -10px;
}

/* Footer logo colour override */
.pn-footer-logo { color: #fa9f20 !important; }
.pn-footer-logo .pn-sitedesc { color: #fa9f20 !important; }
.pn-footer-logo .custom-logo-link { min-height: unset !important; }
.pn-footer-logo .custom-logo-link img,
.pn-footer-logo .custom-logo-link .custom-logo { width: 150px !important; height: auto !important; max-width: 100% !important; }

/* ===================== FRONT PAGE SECTION ALIGNMENT ===================== */
@media (min-width: 961px) {
  .pn-home-sections {
    padding-left: 0;
    padding-right: 0;
  }
  .single .pn-container {
    padding-left: 8px;
    padding-right: 8px;
  }
  .single .pn-breadcrumbs {
    margin-top: 8px;
  }
  .pn-home-sections .pn-layout-aside {
    margin-top: 14px;
  }
}

/* ===================== FRONT PAGE RECENT NOTES GRID ===================== */
.pn-recent-notes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 28px;
}
.pn-recent-note-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  grid-template-areas:
    "thumb title"
    "thumb meta"
    "thumb excerpt";
  column-gap: 14px;
  align-items: start;
  padding: 14px;
  border-radius: var(--pn-radius-sm);
  background: #ffffff;
  border: 1px solid var(--pn-line);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
  transition: box-shadow .2s, border-color .2s, transform .2s;
}
.pn-recent-note-item:hover {
  box-shadow: var(--pn-shadow-lg);
  border-color: transparent;
  transform: translateY(-2px);
}
.pn-recent-note-thumb {
  grid-area: thumb;
  width: 80px;
  height: 80px;
  border-radius: var(--pn-radius-sm);
  overflow: hidden;
  background: var(--pn-bg-soft);
  border: 1px solid var(--pn-line-soft);
}
.pn-recent-note-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
.pn-recent-note-item:hover .pn-recent-note-thumb img { transform: scale(1.0); }
.pn-recent-note-title {
  grid-area: title;
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.35;
  margin: 0 0 5px;
  overflow-wrap: anywhere;
}
.pn-recent-note-title a { color: var(--pn-ink); text-decoration: none; }
.pn-recent-note-title a:hover { color: var(--pn-brand); text-decoration: underline; }
.pn-recent-note-meta {
  grid-area: meta;
  font-size: .77rem;
  color: var(--pn-ink-3);
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 0 0 6px;
}
.pn-recent-note-meta .pn-author-link { color: #1d4ed8; text-decoration: none; }
.pn-recent-note-meta .pn-author-link:hover { color: #c06800; text-decoration: underline; }
.pn-recent-note-excerpt {
  grid-area: excerpt;
  font-size: .82rem;
  color: var(--pn-ink);
  line-height: 1.5;
  margin: 0;
}
.pn-read-more { color: #1d4ed8; font-weight: 450; text-decoration: none; white-space: nowrap; }
.pn-read-more:hover { color: #c06800; text-decoration: underline; }
@media (max-width: 640px) {
  .pn-recent-notes-grid { grid-template-columns: 1fr; }
  .pn-recent-note-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .pn-recent-note-title   { order: 1; margin-bottom: 0; }
  .pn-recent-note-meta    { order: 2; margin-bottom: 0; }
  .pn-recent-note-thumb   { order: 3; width: 100%; height: auto; aspect-ratio: 16 / 9; }
  .pn-recent-note-excerpt { order: 4; }
}

/* ===================== FAQ ACCORDION ===================== */
.pn-faq {
  margin: 36px 0;
  border-radius: 3px;
  border: 1px solid var(--pn-line);
  overflow: hidden;
}
.pn-faq > .pn-faq-heading {
  font-size: 1.15rem; font-weight: 700;
  color: var(--pn-brand-ink); margin: 0 !important;
  padding: 10px 22px 12px;
  border-bottom: 1px solid var(--pn-line);
  background: var(--pn-bg-soft);
}
.pn-faq > .pn-faq-heading::before,
.pn-faq > .pn-faq-heading::after { display: none; content: none; }
.pn-faq-item {
  border-bottom: 1px solid var(--pn-line);
}
.pn-faq-item:last-child { border-bottom: none; }
.pn-faq-question {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; cursor: pointer; list-style: none;
  padding: 14px 22px;
  font-weight: 600; font-size: .95rem;
  color: var(--pn-ink);
  background: #fff;
  transition: background .15s, color .15s;
  user-select: none;
}
.pn-faq-question::-webkit-details-marker { display: none; }
.pn-faq-question::after {
  content: "";
  flex-shrink: 0;
  width: 8px; height: 8px;
  border-right: 2px solid var(--pn-brand);
  border-bottom: 2px solid var(--pn-brand);
  transform: rotate(45deg);
  transition: transform .2s;
  margin-top: -2px;
}
.pn-faq-item[open] > .pn-faq-question {
  color: var(--pn-brand-ink);
  background: var(--pn-bg-soft);
}
.pn-faq-item[open] > .pn-faq-question::after {
  transform: rotate(225deg);
  margin-top: 4px;
}
.pn-faq-question:hover {
  background: var(--pn-bg-soft);
  color: var(--pn-brand-ink);
}
.pn-faq-answer {
  padding: 12px 22px 18px;
  font-size: .93rem; color: var(--pn-ink); line-height: 1.7;
  border-top: 1px solid var(--pn-line-soft);
  background: #fff;
}
.pn-faq-answer p { margin: 0 0 10px; }
.pn-faq-answer p:last-child { margin-bottom: 0; }
