/* ==========================================================================
   MSP Practice Playbook — page styles (builds on styles.css brand tokens)
   ========================================================================== */
.brand img { height: 46px; width: auto; }
.footer-top img { height: 40px; }
.legal-nv { margin-top: 8px; }
.btn { cursor: pointer; font-family: inherit; }
.btn-ghost { background: transparent; color: var(--white); border-color: rgba(255,255,255,.45); }
.btn-ghost:hover { border-color: var(--white); background: rgba(255,255,255,.08); }
@media (max-width: 1140px) { .nav-links .nav-cta { color: var(--white); } }
@media (max-width: 600px) { .brand img { height: 38px; } }

/* Hero */
.pb-hero { position: relative; overflow: hidden; background: var(--black); color: var(--white); padding: clamp(64px, 8vw, 112px) 0 clamp(56px, 7vw, 92px); }
.pb-hero-g { position: absolute; inset: 0; background: url("graphic-ring.webp") 118% 40% / 60% auto no-repeat; opacity: .7; }
.pb-hero .container { position: relative; }
.pb-hero h1 { font-size: clamp(36px, 4.8vw, 62px); max-width: 860px; }
.pb-hero .lead { color: rgba(255,255,255,.85); max-width: 680px; }
.pb-hero-mod { padding-bottom: clamp(44px, 5vw, 68px); }
.pb-crumb { display: table; color: rgba(255,255,255,.7); font-size: 14px; text-decoration: none; margin-bottom: 18px; }
.pb-crumb::before { content: "← "; }
.pb-crumb:hover { color: var(--white); }
.pb-hero-acts { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.pb-ws { margin: 22px 0 0; font-size: 14px; color: rgba(255,255,255,.65); }
.pb-facts { list-style: none; padding: 0; margin: 40px 0 0; display: flex; flex-wrap: wrap; gap: 14px 40px; }
.pb-facts li { border-left: 3px solid; border-image: var(--accent-gradient) 1; padding-left: 14px; }
.pb-facts strong { display: block; font-size: 18px; }
.pb-facts span { font-size: 14px; color: rgba(255,255,255,.7); }
@media (max-width: 760px) { .pb-hero-g { opacity: .35; background-size: 120% auto; } }

/* Hub: module cards */
.mod-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.mod-card { position: relative; border: 1px solid var(--gray-100); border-radius: 18px; padding: 32px; background: var(--white); display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s; }
.mod-card:hover { box-shadow: 0 18px 40px rgba(32,0,76,.10); transform: translateY(-2px); }
.mod-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; border-radius: 18px 18px 0 0; background: var(--accent-gradient); }
.mod-n { position: absolute; right: 28px; top: 22px; font-size: 44px; font-weight: 800; color: var(--gray-100); line-height: 1; }
.mod-card .overline { color: var(--purple); }
.mod-card h3 { font-size: 26px; line-height: 1.2; margin: 8px 0 10px; }
.mod-card h3 a { color: inherit; text-decoration: none; }
.mod-card > p { color: var(--gray-600); margin: 0 0 16px; font-size: 16px; }
.mod-card ul { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 6px; font-size: 15px; }
.mod-card li a { color: var(--black); text-decoration: none; border-bottom: 1px solid var(--gray-100); }
.mod-card li a:hover { color: var(--violet); border-color: var(--violet); }
.mod-go { margin-top: auto; display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--violet); text-decoration: none; }
@media (max-width: 860px) { .mod-grid { grid-template-columns: 1fr; } .mod-card { padding: 26px 22px; } }

/* Hub: tracker + phases */
.pb-tracker { display: grid; grid-template-columns: 1.5fr 1fr; gap: 40px; align-items: end; padding-bottom: 48px; border-bottom: 1px solid var(--gray-300); }
.pb-tracker h2 { margin: 10px 0 14px; }
.pb-tracker-cta .tp-file { margin-top: 12px; }
.ph-h { font-size: 22px; margin: 48px 0 20px; }
.ph-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.ph { background: var(--white); border-radius: 16px; padding: 26px; border: 1px solid var(--gray-100); }
.ph h3 { margin: 0 0 4px; font-size: 20px; }
.ph > p { margin: 0 0 14px; color: var(--gray-600); font-size: 15px; }
.ph ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.ph li { display: flex; justify-content: space-between; gap: 10px; font-size: 14.5px; line-height: 1.35; }
.ph li a { color: var(--black); text-decoration: none; }
.ph li a:hover { color: var(--violet); }
.ph li span { color: var(--gray-600); font-size: 12px; white-space: nowrap; }
@media (max-width: 960px) { .ph-grid, .pb-tracker { grid-template-columns: 1fr; } }

/* Module page layout */
.pb-layout { display: grid; grid-template-columns: 260px 1fr; gap: 56px; padding-top: 56px; padding-bottom: 40px; }
.pb-toc { position: sticky; top: 100px; align-self: start; max-height: calc(100vh - 120px); overflow: auto; }
.pb-toc .overline { color: var(--purple); margin: 0 0 12px; }
.pb-toc ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.pb-toc a { display: grid; grid-template-columns: 28px 1fr; gap: 6px; padding: 7px 10px; border-radius: 8px; font-size: 14px; line-height: 1.35; color: var(--gray-600); text-decoration: none; }
.pb-toc a span { font-weight: 700; color: var(--gray-300); }
.pb-toc a:hover, .pb-toc a.on { background: var(--gray-050); color: var(--black); }
.pb-toc a.on span { color: var(--violet); }
@media (max-width: 1000px) { .pb-layout { grid-template-columns: 1fr; gap: 24px; } .pb-toc { position: static; max-height: none; border: 1px solid var(--gray-100); border-radius: 14px; padding: 18px; } }

/* Template sections */
.tp { display: grid; grid-template-columns: 56px 1fr; gap: 18px; padding: 44px 0; border-top: 1px solid var(--gray-100); scroll-margin-top: 90px; }
.tp:first-child { border-top: 0; padding-top: 0; }
.tp-num { font-size: 32px; font-weight: 800; color: var(--gray-100); line-height: 1; padding-top: 4px; }
.tp:target .tp-body, .tp.flash .tp-body { animation: flash 2.4s ease; border-radius: 16px; }
@keyframes flash { 0%, 30% { box-shadow: 0 0 0 10px rgba(117,25,249,.10); background: rgba(117,25,249,.05); } 100% { box-shadow: 0 0 0 10px rgba(117,25,249,0); background: transparent; } }
.tp-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gray-600); }
.tp-kind { color: var(--purple); }
.tp-ref { color: var(--gray-600); font-weight: 600; }
.tp h2 { font-size: clamp(26px, 2.6vw, 34px); line-height: 1.15; margin: 10px 0 12px; }
.tp-purpose { font-size: 17.5px; color: #2a2a30; margin: 0 0 22px; max-width: 760px; }
.tp-grid { display: grid; grid-template-columns: 1fr 330px; gap: 32px; }
.tp h3 { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--indigo); margin: 0 0 10px; }
.tp-steps { margin: 0; padding-left: 22px; display: grid; gap: 8px; font-size: 16px; }
.tp-side { background: var(--gray-050); border-radius: 16px; padding: 22px; }
.tp-dl { width: 100%; justify-content: center; }
.tp-file { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--gray-600); margin: 10px 0 18px; word-break: break-word; }
.fi { flex-shrink: 0; font-size: 10px; font-weight: 800; color: var(--white); border-radius: 4px; padding: 3px 5px; letter-spacing: .04em; }
.fi-xls { background: #1d6f42; } .fi-doc { background: #2b579a; }
.tp-attrs { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 6px; }
.tp-attrs li { font-size: 13px; font-weight: 600; background: var(--white); border: 1px solid #e4dcf3; color: var(--purple); padding: 4px 10px; border-radius: 999px; }
.tp-dl-list { margin: 0; font-size: 13.5px; display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; }
.tp-dl-list dt { font-weight: 700; color: var(--gray-600); }
.tp-dl-list dd { margin: 0; }
@media (max-width: 860px) { .tp { grid-template-columns: 1fr; gap: 6px; padding: 36px 0; } .tp-num { font-size: 22px; } .tp-grid { grid-template-columns: 1fr; gap: 22px; } }

/* Preview */
.tp-preview { margin-top: 26px; border: 1px solid var(--gray-100); border-radius: 14px; padding: 0 20px; }
.tp-preview summary { cursor: pointer; font-weight: 700; padding: 16px 0; color: var(--indigo); list-style: none; display: flex; align-items: center; gap: 10px; }
.tp-preview summary::-webkit-details-marker { display: none; }
.tp-preview summary::before { content: "+"; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--gray-050); font-size: 16px; }
.tp-preview[open] summary::before { content: "–"; }
.tp-preview[open] { padding-bottom: 20px; }
.tp-preview h4 { font-size: 14px; margin: 18px 0 8px; color: var(--purple); }
.pv-scroll { overflow-x: auto; }
.pv { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 1.4; }
.pv th { background: var(--indigo); color: var(--white); text-align: left; font-weight: 600; padding: 8px 10px; white-space: nowrap; }
.pv td { border: 1px solid var(--gray-100); padding: 8px 10px; vertical-align: top; min-width: 90px; }
.pv td small { display: block; color: var(--gray-600); font-size: 12px; margin-top: 2px; }
.pv td em { color: #8a8a94; }
.pv-ref td { background: var(--gray-050); }
.pv-in { display: block; min-height: 18px; background: #fff8e7; border-radius: 4px; }
.pv-calc { font-size: 11px; font-weight: 700; color: #4a43c9; background: #f0f4ff; border-radius: 4px; padding: 2px 6px; }
.pv-check { margin: 0; padding-left: 0; list-style: none; display: grid; gap: 6px; font-size: 14px; }
.pv-check li { padding-left: 26px; position: relative; }
.pv-check li::before { content: ""; position: absolute; left: 0; top: 3px; width: 15px; height: 15px; border: 1.5px solid var(--gray-300); border-radius: 4px; }
.pv-note { font-size: 12.5px; color: var(--gray-600); margin: 8px 0 0; }

/* Pager */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding-bottom: 72px; }
.pager a { display: block; border: 1px solid var(--gray-100); border-radius: 14px; padding: 18px 22px; text-decoration: none; color: var(--black); font-weight: 700; }
.pager a span { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--gray-600); font-weight: 700; margin-bottom: 4px; }
.pager a:hover { border-color: var(--violet); }
.pg-next { text-align: right; grid-column: 2; }
@media (max-width: 640px) { .pager { grid-template-columns: 1fr; } .pg-next { grid-column: 1; } }

@media print {
  .site-header, .site-footer, .pb-toc, .pager, .pb-hero-acts, .tp-dl { display: none !important; }
  .pb-hero { background: none; color: #000; padding: 0 0 20px; } .pb-hero .lead { color: #000; } .pb-hero-g { display: none; }
  .pb-layout { display: block; padding: 0; } .tp { break-inside: avoid; }
}
.nav-cta { padding: 10px 22px !important; white-space: nowrap; }
