/* GSP website, styled after greenseal.dev (Bootstrap-based Jekyll theme). */
:root {
  --primary: #427f69;
  --primary-light: #579a82;   /* lighten(primary, 10%) on greenseal.dev */
  --primary-dark: #2c4436;
  --secondary: #a3bdb3;
  --black: #2f2f41;
  --white: #ffffff;
  --white-offset: #f4f7f5;
  --steel: #6b7c74;
  --sub-footer: #325f4f;      /* darken(primary, 10%) */
  --level-1: #6e6e6e;         /* GSP self-assessed badge */
  --level-2: #4f7f6a;         /* GSP verified badge */
  --line: #e3e9e5;
  --heading: "Playfair Display", serif;
  --body: Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--white); color: var(--black); font: 16px/1.5 var(--body); }

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-light); text-decoration: underline; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

p { color: var(--steel); line-height: 26px; margin: 0 0 20px; }
h1, h2, h3 { font-family: var(--heading); color: var(--black); font-weight: 700; }
h1 { font-size: 30px; line-height: 1.2; margin: 0 0 20px; }
h2 { font-size: 24px; line-height: 1.4; margin: 0 0 10px; }
h3 { font-size: 18px; line-height: 1.4; margin: 0 0 6px; }
@media (min-width: 768px) {
  h1 { font-size: 32px; }
  h2 { font-size: 26px; }
  h3 { font-size: 20px; }
}
code { font-size: 0.9em; }
ul, ol { margin: 0; padding: 0; }

.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .container { padding: 0 24px; } }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: var(--white); padding: 8px 12px; z-index: 10; }
.muted, .note { color: var(--steel); font-size: 0.9rem; }

/* Header, as on greenseal.dev */
.header { background: var(--white); border-bottom: 1px solid var(--white-offset); padding: 10px 0; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; min-height: 52px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand:hover { text-decoration: none; }
/* GSP mark, in the type and shape of the GSP badges */
.gsp-mark { display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0 10px; border-radius: 9px; background: var(--level-2); color: var(--white); font: 700 21px/1 var(--body); letter-spacing: -0.02em; }
.gsp-mark-small { height: 28px; padding: 0 7px; border-radius: 6px; font-size: 15px; vertical-align: middle; margin-right: 6px; background: var(--white); color: var(--primary); }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-family: var(--heading); font-weight: 700; font-size: 1.1rem; color: var(--black); }
.brand-by { font-size: 0.78rem; color: var(--steel); }
.main-menu { display: flex; flex-wrap: wrap; align-items: center; margin-right: -12px; }
.main-menu a { padding: 10px 12px; color: var(--primary); }
.main-menu a[aria-current="page"] { font-weight: 700; }
.main-menu a[aria-current="page"]:hover { text-decoration: none; }
@media (max-width: 575px) { .main-menu { margin-left: -10px; } .main-menu a { padding: 8px 10px; font-size: 0.95rem; } }

.banner { background: var(--white-offset); color: var(--primary-dark); font-size: 0.95rem; padding: 10px 0; border-bottom: 1px solid var(--line); }
.banner-draft { background: #fff6e0; color: #6a4b00; }
.banner-draft a { color: inherit; text-decoration: underline; }

/* Buttons, as on greenseal.dev */
.button { display: inline-block; white-space: nowrap; height: 40px; line-height: 40px; padding: 0 14px; background: var(--primary); border: 1px solid var(--primary); border-radius: 4px; font-size: 14px; text-transform: uppercase; letter-spacing: 0.025em; color: var(--white); text-decoration: none; transition: all 0.15s ease; margin: 0 6px 8px 0; }
.button:hover { color: var(--white); background: var(--primary-light); border-color: var(--primary-light); text-decoration: none; transform: translateY(-1px); }
.button-outline { background: transparent; color: var(--primary); }
.button-outline:hover { background: var(--primary); color: var(--white); }
@media (prefers-reduced-motion: reduce) { .button, .button:hover { transition: none; transform: none; } }

/* Strips */
.strip { padding: 56px 0; }
@media (min-width: 768px) { .strip { padding: 72px 0; } }
.strip-grey { background: var(--white-offset); }
.lede { font-size: 1.15rem; line-height: 1.6; max-width: 44rem; }
.actions { margin: 28px 0 0; }
.section-title { text-align: center; margin-bottom: 36px; }
.centered { text-align: center; max-width: 44rem; margin: 32px auto 0; }

/* Home hero: GSP's own band, built around the level badges */
.hero { background: var(--primary-dark); color: var(--white); padding: 56px 0; }
@media (min-width: 768px) { .hero { padding: 88px 0 80px; } }
.hero-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 7fr 5fr; gap: 64px; } }
.hero h1 { color: var(--white); font-size: 42px; line-height: 1.15; margin-bottom: 20px; }
@media (min-width: 768px) { .hero h1 { font-size: 56px; } }
.hero-text > p { color: #d5e2db; font-size: 1.2rem; line-height: 1.55; max-width: 36rem; }
.hero .hero-version { font-size: 0.9rem; color: var(--secondary); margin: 8px 0 0; }
.button-light { background: var(--white); border-color: var(--white); color: var(--primary-dark); }
.button-light:hover { background: var(--white-offset); border-color: var(--white-offset); color: var(--primary-dark); }
.button-ghost { background: transparent; border-color: rgba(255, 255, 255, 0.55); color: var(--white); }
.button-ghost:hover { background: rgba(255, 255, 255, 0.1); border-color: var(--white); }
.hero-levels { list-style: none; display: grid; gap: 14px; }
.hero-levels a { display: grid; grid-template-columns: 190px 1fr; gap: 18px; align-items: center; padding: 16px; border-radius: 12px; background: rgba(255, 255, 255, 0.06); color: #d5e2db; font-size: 0.95rem; line-height: 1.45; }
.hero-levels a:hover { background: rgba(255, 255, 255, 0.12); text-decoration: none; }
.hero-levels img { width: 100%; height: auto; display: block; }
.hero-levels strong { color: var(--white); }
.hero-note { color: var(--secondary); font-size: 0.88rem; padding-left: 4px; }
@media (max-width: 480px) { .hero-levels a { grid-template-columns: 1fr; } .hero-levels img { width: 220px; } }

/* Category boxes, after the greenseal.dev service summaries */
.box-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
@media (min-width: 992px) { .box-grid { grid-template-columns: repeat(3, 1fr); } }
.box { display: flex; flex-direction: column; background: var(--white-offset); border: 1px solid var(--white-offset); border-radius: 12px; padding: 24px; color: var(--black); }
a.box:hover { text-decoration: none; border-color: var(--secondary); }
a.box:hover h2 { text-decoration: underline; }
.box h2 { font-size: 22px; color: var(--primary); margin-bottom: 10px; }
.box p { margin-bottom: 16px; }
.box .box-foot { margin: auto 0 0; font-size: 0.9rem; }
.box-cta { background: var(--primary); border-color: var(--primary); }
.box-cta h2, .box-cta p { color: var(--white); }
.box-cta .button { background: var(--white); border-color: var(--white); color: var(--primary); margin: 0; }
.box-cta .button:hover { background: var(--white-offset); color: var(--primary-dark); }

/* How to read a practice: definitions beside a real practice */
.anatomy-grid { display: grid; gap: 40px; align-items: start; }
@media (min-width: 900px) { .anatomy-grid { grid-template-columns: 5fr 6fr; gap: 56px; } }
.anatomy { margin: 20px 0 0; }
.anatomy div { padding: 10px 0; border-bottom: 1px solid #dfe7e2; }
.anatomy div:last-child { border-bottom: 0; }
.anatomy dt { font-weight: 700; color: var(--black); }
.anatomy dd { margin: 2px 0 0; color: var(--steel); line-height: 24px; }
.sample { display: block; background: var(--white); border-radius: 3px; padding: 28px 32px; color: var(--black); box-shadow: 0 1px 2px rgba(44, 68, 54, 0.08); }
.sample:hover { text-decoration: none; }
.sample:hover .sample-link { text-decoration: underline; }
.sample h3 { font-size: 26px; margin: 2px 0 10px; }
.sample-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 0.9rem; }
.sample-req { font-family: var(--heading); font-size: 1.2rem; line-height: 1.5; color: var(--primary-dark); border-left: 4px solid var(--primary); padding-left: 16px; }
.sample ul { list-style: disc; padding-left: 20px; margin-bottom: 16px; }
.sample li { color: var(--steel); line-height: 24px; }
.sample .sample-link { color: var(--primary); margin: 0; }

.split { display: grid; gap: 16px 56px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

/* Inner pages */
.page { padding-top: 24px; padding-bottom: 64px; }
.crumbs { font-size: 0.9rem; color: var(--steel); margin-bottom: 16px; }
.crumbs a { color: var(--steel); text-decoration: underline; }
.crumbs a:hover { color: var(--primary); }

/* Level and priority labels, after the GSP badges */
.levels { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.level { display: inline-block; font-size: 0.75rem; line-height: 1; padding: 4px 8px; border-radius: 6px; color: var(--white); white-space: nowrap; }
.level-1 { background: var(--level-1); }
.level-2 { background: var(--level-2); }
.priority { font-size: 0.8rem; color: var(--steel); white-space: nowrap; }
.priority-core { color: var(--primary-dark); font-weight: 700; }

/* Practices list */
.filters { display: grid; gap: 12px 16px; grid-template-columns: 2fr repeat(3, minmax(0, 1fr)); align-items: end; margin: 28px 0 8px; padding: 16px 20px; background: var(--white-offset); border-radius: 4px; }
@media (max-width: 860px) { .filters { grid-template-columns: 1fr 1fr; } .filter-search { grid-column: 1 / -1; } }
.filters label { display: block; font-size: 0.85rem; color: var(--steel); }
.filters input, .filters select { display: block; width: 100%; margin-top: 4px; font: inherit; font-size: 0.95rem; color: var(--black); padding: 7px 10px; border: 1px solid #ced4da; border-radius: 4px; background: var(--white); }
.filters input:focus, .filters select:focus { border-color: var(--secondary); outline: 0; box-shadow: 0 0 0 0.2rem rgba(66, 127, 105, 0.25); }
.filter-count { grid-column: 1 / -1; margin: 0; font-size: 0.88rem; line-height: 1.4; }

.category { margin-top: 44px; scroll-margin-top: 16px; }
.category > p { margin-bottom: 12px; }
.practice-list { list-style: none; border-top: 1px solid var(--line); }
.practice-row a { display: grid; grid-template-columns: 7.5em 1fr auto; gap: 4px 16px; align-items: center; padding: 12px 4px; border-bottom: 1px solid var(--line); color: var(--black); }
.practice-row a:hover { background: var(--white-offset); text-decoration: none; }
.practice-row a:hover .row-title { color: var(--primary); text-decoration: underline; }
.row-id { font-size: 0.9rem; font-weight: 700; color: var(--primary); }
.row-meta { display: inline-flex; gap: 10px; align-items: center; justify-content: flex-end; }
.row-meta .priority { width: 5.5em; }
@media (max-width: 640px) { .practice-row a { grid-template-columns: 1fr auto; } .row-title { grid-column: 1 / -1; grid-row: 2; } }
.empty { margin: 40px 0; }

/* Practice page */
.practice { display: grid; gap: 48px; grid-template-columns: minmax(0, 1fr) 300px; }
@media (max-width: 900px) { .practice { grid-template-columns: 1fr; gap: 16px; } }
.practice-main { max-width: 46rem; }
.practice-head { border-bottom: 1px solid var(--line); padding-bottom: 20px; margin-bottom: 28px; }
.practice-id { font-weight: 700; color: var(--primary); margin: 0 0 4px; }
.practice-head h1 { margin-bottom: 16px; }
@media (min-width: 768px) { .practice-head h1 { font-size: 38px; } }
.meta { display: flex; flex-wrap: wrap; gap: 12px 32px; margin: 0; }
.meta dt { font-size: 0.85rem; color: var(--steel); }
.meta dd { margin: 2px 0 0; color: var(--black); }
.practice-main section { margin-bottom: 32px; }
.practice-main h2 { font-size: 22px; }
.requirement { border-left: 4px solid var(--primary); padding: 2px 0 2px 20px; }
.requirement p { font-family: var(--heading); font-size: 1.35rem; line-height: 1.5; color: var(--primary-dark); margin: 0; }
.evidence { list-style: disc; padding-left: 20px; }
.evidence li, .scale li { color: var(--steel); line-height: 26px; margin-bottom: 5px; }
.scale { list-style: none; border-top: 1px solid var(--line); }
.scale li { padding: 10px 0; margin: 0; border-bottom: 1px solid var(--line); }
.scale strong { display: block; color: var(--black); }
.scale span { display: block; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 48px; }
.pager a { display: block; padding: 12px 14px; border: 1px solid var(--line); border-radius: 4px; color: var(--black); font-size: 0.92rem; }
.pager a:hover { border-color: var(--primary); text-decoration: none; }
.pager span { display: block; font-size: 0.85rem; color: var(--steel); }
.pager-next { text-align: right; grid-column: 2; }
@media (max-width: 575px) { .pager { grid-template-columns: 1fr; } .pager-next { grid-column: 1; } }

.practice-side { display: flex; flex-direction: column; gap: 16px; }
.side-box { background: var(--white-offset); border-radius: 4px; padding: 18px 20px; }
.side-box h2 { font-size: 18px; margin-bottom: 8px; }
.cite { font-size: 0.88rem; line-height: 1.5; margin-bottom: 8px; overflow-wrap: anywhere; }
.side-box summary { cursor: pointer; color: var(--primary); font-size: 0.9rem; }
.side-box pre { font-size: 0.75rem; background: var(--white); padding: 10px; border-radius: 4px; overflow-x: auto; }
.side-list { list-style: none; font-size: 0.95rem; }
.side-list li { padding: 3px 0; color: var(--steel); }

/* Prose pages */
.prose { max-width: 820px; }
.prose ul { list-style: disc; padding-left: 20px; margin-bottom: 20px; }
.prose li { color: var(--steel); line-height: 26px; }
.versions-table { width: 100%; border-collapse: collapse; margin: 24px 0; }
.versions-table th, .versions-table td { text-align: left; vertical-align: top; padding: 8px 10px 8px 0; border-top: 1px solid var(--line); color: var(--steel); }
.versions-table thead th { color: var(--black); border-top: 0; border-bottom: 1px solid var(--line); }
.versions-table tbody th { color: var(--black); font-weight: 400; }
.changelog h2 { font-family: var(--body); font-size: 1.1rem; margin-top: 28px; }

/* Footer, as on greenseal.dev */
.footer { background: var(--primary); padding: 15px 0; }
.footer-inner { display: flex; flex-direction: column; align-items: flex-start; }
@media (min-width: 576px) { .footer-inner { flex-direction: row; justify-content: space-between; align-items: center; } }
.footer-title { font-family: var(--heading); font-weight: 700; font-size: 1.3rem; color: var(--white); margin: 0 0 6px; display: flex; align-items: center; }
@media (min-width: 576px) { .footer-title { margin: 0; } }
.footer ul { list-style: none; display: flex; flex-wrap: wrap; }
.footer a { display: inline-block; color: var(--white); padding: 10px 14px 10px 0; }
@media (min-width: 576px) { .footer a { padding: 10px 8px; } }
.footer a:hover { color: var(--white); }
.sub-footer { background: var(--sub-footer); padding: 14px 0 4px; }
.sub-footer p { color: var(--white); font-size: 14px; line-height: 1.5; margin-bottom: 10px; }
.sub-footer a { color: var(--white); font-weight: 700; }
.sub-footer .endorse a { display: inline-flex; align-items: center; gap: 10px; font-weight: 400; }
.sub-footer .endorse img { display: block; width: 40px; height: 40px; }

/* Print: auditors print practice pages. */
@media print {
  .header, .main-menu, .filters, .pager, .practice-side details, .skip, .actions, .banner, .footer { display: none !important; }
  .practice { display: block; }
  .sub-footer { background: none; }
  .sub-footer p { color: #444; }
  .side-box { break-inside: avoid; background: none; border: 1px solid #ccc; }
  .requirement { break-inside: avoid; }
}
