/*
 * study-post.css -- the Specialty Study post's own blocks on perridm.com
 * (Phase AE.8, SPEC-AE8-monthly-study-post.md §7, §9a).
 *
 * Shipped to perridm.com by the PDM Study Posts plugin
 * (/srv/www/customplugins/pdm-study-posts), which loads it only on a post
 * holding these blocks; rebuild the plugin after a change here. Every post's charts, At a glance, colour
 * swatches, font samples and citation box are Custom HTML blocks with ss-
 * classes and no colours of their own: the colours are here, perridm.com's
 * palette. Two things are data and come with the post: a bar's width, and a
 * swatch's colour (--ss-chip, --ss-chip-text), since the colour is what the
 * swatch shows. A recommended font's sample names its font, and loads it from
 * Google Fonts in its own block.
 *
 * The main color chart keeps the study sites' own colour families (§7: those
 * are data), as ss-fam-* classes.
 *
 * Shipped in the post's export beside study-post.js (the Copy buttons), and
 * drawn by Insight's review step from this same file.
 */

.ss-glance, .ss-chart, .ss-tiles, .ss-cities, .ss-sizes, .ss-palette, .ss-fonts, .ss-cite, .ss-download {
  --ss-navy: #0C273D;
  --ss-navy-2: #10304C;
  --ss-navy-3: #163B5B;
  --ss-mid: #2A5575;
  --ss-green: #2C5E2E;
  --ss-bright: #70B85D;
  --ss-sky: #54D0ED;
  --ss-ice: #CDEFF7;
  --ss-mist: #EEF8FB;
  --ss-leaf: #EEF7EA;
  --ss-cream: #FFFEF1;
  --ss-head: "Nunito", system-ui, sans-serif;
  --ss-body: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  box-sizing: border-box;
  color: var(--ss-navy);
  font-family: var(--ss-body);
  margin: 0 0 1.6em;
}
.ss-glance *, .ss-chart *, .ss-tiles *, .ss-cities *, .ss-palette *, .ss-fonts *, .ss-cite *, .ss-download * { box-sizing: border-box; }

/* ---------------------------------------------------------- tiles */
.ss-glance, .ss-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.ss-tile { background: var(--ss-mist); border: 1px solid var(--ss-ice); border-radius: 12px; padding: 14px 16px; }
.ss-glance .ss-tile { background: var(--ss-cream); border-color: var(--ss-ice); }
.ss-n { font-family: var(--ss-head); font-weight: 800; font-size: 30px; line-height: 1.1; color: var(--ss-mid); }
.ss-glance .ss-n { color: var(--ss-green); font-size: 34px; }
.ss-l { font-size: 15px; line-height: 1.35; margin-top: 4px; }
.ss-n.ss-none { font-size: 18px; color: var(--ss-mid); }

/* --------------------------------------------------------- charts */
.ss-chart { background: #FFFFFF; border: 1px solid var(--ss-ice); border-radius: 12px; padding: 16px 18px; }
.ss-chart-title { font-family: var(--ss-head); font-weight: 800; font-size: 18px; line-height: 1.3; margin: 0 0 10px; color: var(--ss-navy); }
.ss-chart .ss-tiles { margin-bottom: 12px; }
.ss-bars { display: grid; gap: 8px; }
.ss-bar { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 2fr) 3.2em; gap: 10px; align-items: center; font-size: 15px; line-height: 1.3; }
.ss-lab { min-width: 0; }
.ss-cnt { color: var(--ss-mid); font-size: 13px; font-weight: 600; margin-left: 4px; }
/* The wording a bar or tile counted ("Book an Appointment, Schedule a Visit"), in small text. */
.ss-note { display: block; font-size: 12.5px; line-height: 1.35; color: var(--ss-mid); margin-top: 3px; }
.ss-track { display: block; height: 14px; background: var(--ss-mist); border-radius: 7px; overflow: hidden; }
.ss-fill { display: block; height: 100%; background: var(--ss-mid); border-radius: 7px; min-width: 2px; }
.ss-pct { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.ss-src { font-size: 13.5px; line-height: 1.4; color: var(--ss-mid); margin: 10px 0 0; }

/* Shares of a whole: one bar in parts, with its key. */
.ss-stack { display: flex; height: 22px; border-radius: 8px; overflow: hidden; background: var(--ss-mist); }
.ss-seg { display: block; height: 100%; }
.ss-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-size: 14px; }
.ss-key { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.ss-stack + .ss-bars, .ss-bars + .ss-stack { margin-top: 12px; }
.ss-part-1 { background: var(--ss-mid); }
.ss-part-2 { background: var(--ss-sky); }
.ss-part-3 { background: var(--ss-bright); }
.ss-part-4 { background: var(--ss-ice); }
.ss-part-rest { background: var(--ss-ice); }
/* The sites' own colour families (data). */
.ss-fam-red { background: #C9443A; }
.ss-fam-orange { background: #E08A2C; }
.ss-fam-yellow { background: #E3C130; }
.ss-fam-green { background: #2E9A5C; }
.ss-fam-blue { background: #2F6FD0; }
.ss-fam-purple { background: #7B4FC0; }
.ss-fam-brown { background: #8A5A35; }
.ss-fam-grey { background: #8C939B; }
.ss-fam-black { background: #1B1B1B; }
.ss-fam-white { background: #FFFFFF; box-shadow: inset 0 0 0 1px var(--ss-ice); }

/* --------------------------------------------------------- cities */
.ss-cities { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 10px; }
.ss-cities-h { font-family: var(--ss-head); font-weight: 800; font-size: 16px; margin: 0 0 6px; }
.ss-cities ul { margin: 0; padding-left: 1.1em; font-size: 15px; line-height: 1.55; }
.ss-sizes { font-size: 15px; line-height: 1.5; background: var(--ss-mist); border-radius: 10px; padding: 10px 14px; }
.ss-sizes p { margin: 0; }
.ss-sizes p + p { margin-top: 4px; }

/* ------------------------------------------------------- swatches */
.ss-palette { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.ss-swatch { border: 1px solid var(--ss-ice); border-radius: 12px; padding: 8px; background: #FFFFFF; font-size: 14px; }
.ss-chip { height: 64px; border-radius: 8px; display: grid; place-items: center; background: var(--ss-chip, var(--ss-mist)); color: var(--ss-chip-text, var(--ss-navy));
           box-shadow: inset 0 0 0 1px rgba(12, 39, 61, .12); font-family: var(--ss-head); font-weight: 800; font-size: 22px; }
.ss-role { font-weight: 700; margin-top: 8px; }
.ss-hex { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.ss-hex code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13.5px; background: none; padding: 0; color: var(--ss-navy); }
.ss-rgb { color: var(--ss-mid); font-size: 13px; margin-top: 2px; }

/* ---------------------------------------------------------- fonts */
.ss-fonts { background: #FFFFFF; border: 1px solid var(--ss-ice); border-radius: 12px; padding: 16px 18px; }
.ss-font + .ss-font { margin-top: 14px; border-top: 1px solid var(--ss-mist); padding-top: 14px; }
.ss-font-lab { font-size: 14px; color: var(--ss-mid); }
.ss-font-sample { margin-top: 4px; color: var(--ss-navy); line-height: 1.3; overflow-wrap: break-word; }
.ss-font-heading { font-size: 26px; font-weight: 700; }
.ss-font-body { font-size: 18px; font-weight: 400; }

/* ---------------------------------------------- Cite this study */
.ss-cite { background: var(--ss-leaf); border: 1px solid #D5E9CC; border-radius: 12px; padding: 18px 20px; }
.ss-cite-title { font-family: var(--ss-head); font-weight: 800; font-size: 19px; margin: 0 0 8px; }
.ss-cite-text, .ss-cite-note { margin: 0 0 10px; font-size: 15.5px; line-height: 1.5; overflow-wrap: anywhere; }
.ss-cite-note { margin: 10px 0 0; font-size: 14.5px; }
.ss-copy-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ss-cite-link { flex: 1 1 260px; min-width: 0; font: 14px/1.2 ui-monospace, Menlo, Consolas, monospace; color: var(--ss-navy); background: #FFFFFF;
                border: 1px solid #C9DFC0; border-radius: 999px; padding: 9px 14px; }

/* -------------------------------------------- Download the study */
.ss-download { background: var(--ss-mist); border: 1px solid var(--ss-ice); border-radius: 12px; padding: 18px 20px; }
.ss-download-title { font-family: var(--ss-head); font-weight: 800; font-size: 19px; margin: 0 0 8px; }
.ss-download-text { margin: 0 0 14px; font-size: 15.5px; line-height: 1.5; }
/* .ss-download a.ss-download-btn, not .ss-download-btn alone: the theme's link colour
   (Elementor's .elementor-kit-N a, the site's green) outranks a single class and put
   green text on the navy button (operator, 2026-11-14). */
.ss-download a.ss-download-btn, .ss-download a.ss-download-btn:visited { display: inline-block; font: 700 15px/1 var(--ss-body); color: #FFFFFF;
                   background: var(--ss-navy); border: 2px solid var(--ss-navy); border-radius: 999px; padding: 12px 20px; text-decoration: none; }
.ss-download a.ss-download-btn:hover, .ss-download a.ss-download-btn:focus-visible { color: #FFFFFF; background: var(--ss-green); border-color: var(--ss-green); }

/* The Copy buttons: pills, as perridm.com's (deep green on white). */
.ss-copy { font: 700 14px/1 var(--ss-body); color: #FFFFFF; background: var(--ss-green); border: 2px solid var(--ss-green); border-radius: 999px;
           padding: 9px 16px; cursor: pointer; }
.ss-copy:hover, .ss-copy:focus-visible { background: var(--ss-navy); border-color: var(--ss-navy); }
.ss-copy:focus-visible { outline: 3px solid var(--ss-sky); outline-offset: 2px; }
.ss-copy-alt { background: var(--ss-mid); border-color: var(--ss-mid); }
.ss-hex .ss-copy { font-size: 12px; padding: 5px 10px; }
.ss-copy.ss-done { background: var(--ss-navy); border-color: var(--ss-navy); }

/* ------------------------------------------- tablet and mobile */
@media (max-width: 1024px) {
  .ss-palette { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .ss-bar { grid-template-columns: minmax(0, 1fr) 3em; gap: 4px 10px; }
  .ss-lab { grid-column: 1 / -1; }
  .ss-cities { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .ss-palette { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ss-glance, .ss-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ss-n { font-size: 26px; }
  .ss-chart, .ss-fonts, .ss-cite { padding: 14px; }
}
