/* Manual testing to automatic testing site stylesheet
 *
 * Lily Design System™ class names, given a calm health care palette and
 * typography: strong blue, generous line height, high-contrast focus states.
 *
 * Sections:
 *   1. Tokens
 *   2. Base elements
 *   3. Lily components
 *   4. Site chrome
 *   5. Page patterns
 *   6. Responsive and motion
 */

/* 1. Tokens ------------------------------------------------------------- */

/* This site's own token names (`--site-*`) are deliberately distinct from
 * Lily's own hook variables (`--lily-*`, e.g. `--lily-surface`,
 * `--lily-text-muted`) even though several mean almost the same thing.
 * ThemePicker swaps in one of Lily's reference themes from
 * static/assets/themes/ (see bin/lily-themes.txt and bin/sync) — full
 * standalone stylesheets, each defining Lily's own `--color-*` and
 * `--lily-*` hooks under `:root` or `:root[data-theme="<slug>"]`. Reusing
 * Lily's own names for this site's tokens would mean a handful of them
 * (border, surface, text, text-muted, shadow-lg, font-mono) got silently
 * overwritten by the loaded theme while everything else — primary, danger,
 * page background, card background — stayed stuck at whatever this block
 * sets, because Lily's files never define those names. Every `--site-*`
 * token below is instead an explicit, considered choice of which of Lily's
 * tokens feeds it, so a theme swap re-themes the whole page consistently.
 * The literal fallback in each `var()` is what renders before ThemePicker's
 * JS runs, and for a visit with JavaScript disabled entirely (no managed
 * theme <link> is ever inserted) — it is this site's own light theme,
 * restated. */
:root {
  --site-primary: var(--color-primary, #1d70b8);
  --site-primary-hover: var(--color-secondary, #003078);
  --site-primary-wash: color-mix(in oklch, var(--color-primary, #1d70b8) 12%, var(--color-base-100, #ffffff));
  --site-accent: var(--color-accent, #28a197);
  --site-danger: var(--color-error, #d4351c);
  --site-warning: var(--color-warning, #f47738);
  --site-success: var(--color-success, #00703c);
  /* Fixed, not themed — the yellow-and-black focus indicator stays the
   * same in every theme, see § 2. */
  --site-focus: #ffdd00;

  --site-page-bg: var(--color-base-100, #ffffff);
  --site-surface: var(--color-base-200, #f3f2f1);
  --site-card-bg: var(--color-base-100, #ffffff);

  --site-text: var(--color-base-content, #0b0c0c);
  --site-text-muted: var(--lily-text-muted, #505a5f);
  --site-border: var(--lily-border, #b1b4b6);
  --site-border-subtle: var(--color-base-300, #dee0e2);

  --site-shadow: var(--lily-shadow-sm, 0 1px 2px rgba(11, 12, 12, 0.08));
  --site-shadow-lg: var(--lily-shadow-lg, 0 8px 24px -8px rgba(11, 12, 12, 0.18));
  --site-radius: var(--lily-radius-md, 4px);

  /* Layout constants, not colours — untouched by a theme swap. */
  /* Full browser width: no maximum line length for the page or its text. */
  --site-content-max: none;
  --site-prose-max: none;

  --site-font-sans: var(
    --lily-font-body,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Helvetica,
    Arial,
    sans-serif
  );
  --site-font-mono: var(
    --lily-font-mono,
    ui-monospace,
    SFMono-Regular,
    "SF Mono",
    Menlo,
    Consolas,
    monospace
  );
}

/* TextSizePicker sets data-text-size on <html>. Every other size in this
 * file is in rem, so scaling the root font-size scales the whole page —
 * headings included — without touching a single other rule. */
:root[data-text-size='small'] {
  font-size: 87.5%;
}
:root[data-text-size='large'] {
  font-size: 112.5%;
}
:root[data-text-size='x-large'] {
  font-size: 125%;
}

/* 2. Base elements ------------------------------------------------------ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  font-family: var(--site-font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--site-text);
  background: var(--site-page-bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--site-primary);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
a:hover {
  color: var(--site-primary-hover);
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid transparent;
  /* Fixed, not `var(--site-text)`: the yellow-and-black focus state is
   * the same in every theme, so it stays visible and high-contrast in dark
   * mode instead of inheriting a light body colour onto a yellow chip. */
  color: #0b0c0c;
  background: var(--site-focus);
  box-shadow:
    0 -2px var(--site-focus),
    0 4px #0b0c0c;
  text-decoration: none;
}

h1,
h2,
h3,
h4 {
  line-height: 1.2;
  font-weight: 700;
  margin: 2rem 0 1rem;
}
h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin-top: 0;
}
h2 {
  font-size: 1.6rem;
}
h3 {
  font-size: 1.25rem;
}
h4 {
  font-size: 1.0625rem;
}

p {
  margin: 0 0 1rem;
}

ul,
ol {
  padding-left: 1.25rem;
}
li {
  margin-bottom: 0.35rem;
}

hr {
  border: 0;
  border-top: 1px solid var(--site-border-subtle);
  margin: 2.5rem 0;
}

code,
pre {
  font-family: var(--site-font-mono);
  font-size: 0.9em;
}
code {
  background: var(--site-surface);
  padding: 0.1em 0.35em;
  border-radius: 3px;
}
pre {
  background: #0b0c0c;
  color: #f3f2f1;
  padding: 1rem;
  border-radius: var(--site-radius);
  overflow-x: auto;
}
pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

table {
  border-collapse: collapse;
  width: 100%;
  margin: 0 0 1.5rem;
}
th,
td {
  text-align: left;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--site-border-subtle);
  vertical-align: top;
}
th {
  font-weight: 700;
}

/* 3. Lily components ---------------------------------------------------- */

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 100;
  background: var(--site-focus);
  color: var(--site-text);
  padding: 0.6rem 1rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 3px var(--site-text);
}
.skip-link:focus {
  top: 0.5rem;
}


.tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  background: var(--site-primary);
  color: #ffffff;
}
.tag-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.tag-quiet {
  background: var(--site-surface);
  color: var(--site-text-muted);
}

.badge {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: var(--site-surface);
  color: var(--site-text-muted);
}
.badge[data-type='info'] {
  background: var(--site-primary-wash);
  color: var(--site-primary-hover);
}
.badge[data-type='warning'] {
  background: #fdf0e5;
  color: #7a3a00;
}

.back-link {
  display: inline-block;
  margin-bottom: 1rem;
  font-size: 0.9375rem;
}
.back-link::before {
  content: '← ';
}

.card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  background: var(--site-card-bg);
  border: 1px solid var(--site-border-subtle);
  border-left: 4px solid var(--site-primary);
  border-radius: var(--site-radius);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--site-shadow);
}
.card:hover {
  box-shadow: var(--site-shadow-lg);
}
.card h2,
.card h3 {
  margin: 0;
  font-size: 1.1875rem;
}
.card h2 a,
.card h3 a {
  text-decoration: none;
}
.card h2 a:hover,
.card h3 a:hover {
  text-decoration: underline;
}
.card p {
  margin: 0;
  color: var(--site-text-muted);
  font-size: 0.9375rem;
}
.card-meta {
  margin-top: auto;
  padding-top: 0.5rem;
  font-size: 0.8125rem;
  color: var(--site-text-muted);
}

.section-heading {
  margin: 0 0 1.5rem;
}
.section-heading-eyebrow {
  margin: 0 0 0.25rem;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--site-primary);
}
.section-heading-heading {
  margin: 0;
}
.section-heading-subtitle {
  margin: 0.5rem 0 0;
  color: var(--site-text-muted);
  max-width: var(--site-prose-max);
}

.inset-text {
  border-left: 5px solid var(--site-border);
  padding: 0.5rem 0 0.5rem 1.15rem;
  margin: 1.5rem 0;
  color: var(--site-text-muted);
}

.warning-callout {
  display: block;
  background: var(--site-primary-wash);
  border-left: 5px solid var(--site-primary);
  border-radius: 0 var(--site-radius) var(--site-radius) 0;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}
.warning-callout > :last-child {
  margin-bottom: 0;
}

.contents-nav {
  background: var(--site-surface);
  border-radius: var(--site-radius);
  padding: 1rem 1.25rem;
}
.contents-nav h2 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}
.contents-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.9375rem;
}
.contents-list-item {
  margin-bottom: 0.4rem;
}
.contents-list-item.is-nested {
  padding-left: 1rem;
}

.statistic {
  display: flex;
  flex-direction: column;
  background: var(--site-surface);
  border-radius: var(--site-radius);
  padding: 1rem 1.25rem;
}
.statistic-title {
  order: 2;
  font-size: 0.9375rem;
  color: var(--site-text-muted);
}
.statistic-value {
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--site-primary-hover);
}

.summary-list {
  margin: 0;
}
.summary-list-item {
  display: grid;
  grid-template-columns: minmax(8rem, 14rem) 1fr;
  gap: 0.5rem 1.5rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--site-border-subtle);
}
.summary-list-item dt {
  font-weight: 700;
}
.summary-list-item dd {
  margin: 0;
}

.details {
  border-bottom: 1px solid var(--site-border-subtle);
  padding: 0.75rem 0;
}
.details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--site-primary);
}
/* Assessments wrap each question's worked answer in a `.details`, so a
   reader can attempt the question before checking it. It sits right after
   the question's own prose, so it wants its own space, not the border a
   `.details` normally borrows from a list of them. */
.assessment-answer {
  margin: 0.75rem 0 1.75rem;
  border-bottom: 0;
  padding: 0;
}
.assessment-answer summary {
  padding: 0.5rem 0.75rem;
  border: 2px solid var(--site-border);
  border-radius: var(--site-radius);
}
.assessment-answer summary:hover {
  background: var(--site-primary-wash);
}
.assessment-answer[open] summary {
  margin-bottom: 0.75rem;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
.assessment-answer p:last-child {
  margin-bottom: 0;
}

/* Site tools: ThemePicker, LocalePicker, TextSizePicker and SharePicker,
 * composed by PickerBar — all @lilydesignsystem/svelte-* npm dependencies,
 * not the headless package. All four are headless, so every rule below is
 * this site's own visual decision, not the component's. */

.site-tools {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.theme-picker,
.locale-picker,
.text-size-picker,
.share-picker {
  position: relative;
  display: inline-block;
}

.theme-picker-button,
.locale-picker-button,
.text-size-picker-button,
.share-picker-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid var(--site-border);
  border-radius: var(--site-radius);
  background: var(--site-page-bg);
  color: var(--site-text);
  cursor: pointer;
  line-height: 1;
}
.theme-picker-button:hover,
.locale-picker-button:hover,
.text-size-picker-button:hover,
.share-picker-button:hover {
  background: var(--site-surface);
}
.theme-picker-button[aria-expanded='true'],
.locale-picker-button[aria-expanded='true'],
.text-size-picker-button[aria-expanded='true'],
.share-picker-button[aria-expanded='true'] {
  background: var(--site-surface);
  border-color: var(--site-text);
}

.theme-picker-icon,
.locale-picker-icon,
.text-size-picker-icon,
.share-picker-icon {
  font-family: system-ui, 'Segoe UI Symbol', 'Apple Symbols', sans-serif;
  font-size: 1.125em;
}

.theme-picker-list,
.locale-picker-list,
.text-size-picker-list,
.share-picker-list {
  position: absolute;
  z-index: 10;
  inset-block-start: calc(100% + 0.35rem);
  inset-inline-end: 0;
  min-inline-size: 11rem;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  border: 1px solid var(--site-border);
  border-radius: var(--site-radius);
  background: var(--site-card-bg);
  /* The theme list alone holds 37 options — the others stay well under
   * this height and never scroll. Keyboard nav already calls
   * scrollIntoView on the active option (see the vendored ThemePicker). */
  max-height: min(60vh, 28rem);
  overflow-y: auto;
  box-shadow: var(--site-shadow-lg);
}
.theme-picker-list[hidden],
.locale-picker-list[hidden],
.text-size-picker-list[hidden],
.share-picker-list[hidden] {
  display: none;
}

.theme-picker-option,
.locale-picker-option,
.text-size-picker-option {
  padding: 0.4rem 0.6rem;
  border-radius: var(--site-radius);
  cursor: pointer;
  font-size: 0.9375rem;
}
.theme-picker-option[data-active],
.locale-picker-option[data-active],
.text-size-picker-option[data-active] {
  background: var(--site-surface);
}
.theme-picker-option[aria-selected='true'],
.locale-picker-option[aria-selected='true'],
.text-size-picker-option[aria-selected='true'] {
  font-weight: 700;
  color: var(--site-primary-hover);
}

.share-picker-list-item {
  margin: 0;
}
.share-picker-target,
.share-picker-copy {
  display: block;
  width: 100%;
  padding: 0.4rem 0.6rem;
  border: 0;
  border-radius: var(--site-radius);
  background: transparent;
  color: var(--site-text);
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.share-picker-target:hover,
.share-picker-copy:hover {
  background: var(--site-surface);
  color: var(--site-text);
}

.theme-picker-status,
.text-size-picker-status,
.share-picker-status {
  margin: 0;
}

/* 4. Site chrome -------------------------------------------------------- */

.site-header {
  border-bottom: 4px solid var(--site-text);
  background: var(--site-page-bg);
}
.site-header-inner {
  /* Two rows: the brand and the PickerBar share the first row, with the
   * PickerBar pinned to the right; the navigation has the second row to
   * itself. So the PickerBar never wraps under the brand, however many
   * navigation links there are. */
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    'brand tools'
    'nav nav';
  align-items: center;
  gap: 0.75rem 1rem;
  max-width: var(--site-content-max);
  margin: 0 auto;
  padding: 1rem 1.5rem;
}
.site-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--site-text);
  text-decoration: none;
}
.site-brand-mark {
  width: 2.25rem;
  height: 2.25rem;
}
.site-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.site-brand-name {
  font-weight: 700;
  font-size: 1.25rem;
}
.site-brand-tagline {
  font-size: 0.8125rem;
  color: var(--site-text-muted);
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
}
.site-nav a {
  padding: 0.4rem 0.65rem;
  border-radius: var(--site-radius);
  color: var(--site-text-muted);
  text-decoration: none;
  font-size: 0.9375rem;
}
.site-nav a:hover {
  background: var(--site-surface);
  color: var(--site-text);
}
.site-nav a[aria-current='page'] {
  color: var(--site-primary-hover);
  font-weight: 700;
  box-shadow: inset 0 -3px var(--site-primary);
  border-radius: 0;
}

.site-main {
  max-width: var(--site-content-max);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.site-footer {
  border-top: 2px solid var(--site-border);
  background: var(--site-surface);
  padding: 2rem 1.5rem;
}
.site-footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 3rem;
  justify-content: space-between;
  max-width: var(--site-content-max);
  margin: 0 auto;
  font-size: 0.9375rem;
  color: var(--site-text-muted);
}
.site-footer p {
  margin: 0 0 0.5rem;
}
.site-footer-fine {
  font-size: 0.875rem;
}
.site-footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

/* 5. Page patterns ------------------------------------------------------ */

.page-intro {
  max-width: var(--site-prose-max);
  padding: 1rem 0 2rem;
}
.page-intro h1 {
  margin-bottom: 0.75rem;
}
.page-lede {
  font-size: 1.25rem;
  color: var(--site-text-muted);
}

.button {
  display: inline-block;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  padding: 0.65rem 1.25rem;
  border: 2px solid var(--site-primary);
  border-radius: var(--site-radius);
  background: var(--site-primary);
  color: #ffffff;
  box-shadow: 0 2px 0 var(--site-primary-hover);
  cursor: pointer;
}
.button:hover {
  background: var(--site-primary-hover);
  border-color: var(--site-primary-hover);
  color: #ffffff;
}
.button-secondary {
  background: var(--site-page-bg);
  color: var(--site-primary-hover);
  box-shadow: 0 2px 0 var(--site-border);
}
.button-secondary:hover {
  background: var(--site-primary-wash);
  color: var(--site-primary-hover);
}
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0 3rem;
  padding: 0;
  list-style: none;
}
.card-grid > li {
  display: flex;
  margin: 0;
}
.card-grid > li > .card {
  width: 100%;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 1rem;
  margin: 2rem 0 3rem;
}

.section {
  margin: 3rem 0;
}
/* The page intro already carries its own bottom space. */
.page-intro + .section,
.page-intro + .stat-row,
.page-intro + .finder-form {
  margin-top: 0.5rem;
}

.doc-header {
  margin-bottom: 2rem;
}
.doc-header h1 {
  margin-bottom: 0.5rem;
}

.prose {
  max-width: var(--site-prose-max);
}
.prose h2 {
  margin-top: 2.5rem;
}
.prose h3 {
  margin-top: 1.75rem;
}
.prose li > input[type='checkbox'] {
  margin-right: 0.5rem;
}
.prose ul:has(> li > input[type='checkbox']) {
  list-style: none;
  padding-left: 0.25rem;
}
.prose blockquote {
  margin: 1.5rem 0;
  padding-left: 1rem;
  border-left: 4px solid var(--site-border);
  color: var(--site-text-muted);
}

/* Skills gap forms are filled in on the page, so their questions, answer
   prompts, and tick lists render as real controls. `gapform.js` keeps the
   answers in the reader's own browser and exports them; nothing is sent. */

.form-question {
  margin-top: 1.75rem;
}

.form-field {
  margin: 0 0 1.75rem;
}
.form-label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.35rem;
}
.form-textarea {
  display: block;
  width: 100%;
  padding: 0.5rem;
  font: inherit;
  color: var(--site-text);
  background: var(--site-page-bg);
  border: 2px solid var(--site-text);
  border-radius: 0;
  resize: vertical;
}
.form-textarea:focus-visible {
  outline: 3px solid var(--site-focus);
  outline-offset: 0;
  box-shadow: inset 0 0 0 2px var(--site-text);
}

.form-choices {
  margin: 0 0 1.75rem;
  padding: 0;
  border: 0;
}
.form-choice {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  padding: 0.35rem 0.5rem;
  border-radius: var(--site-radius);
}
.form-choice:hover,
.form-choice:has(input:checked) {
  background: var(--site-primary-wash);
}
.form-choice input {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0.3rem 0 0;
  accent-color: var(--site-primary);
}
.form-choice label {
  cursor: pointer;
}
/* The worked example in the rating scale section shows the controls ticked. */
.form-choice input:disabled + label {
  cursor: default;
}
/* The global focus style fills the control itself, which hides a tick. */
.form-choices input:focus-visible {
  background: none;
  outline: 3px solid var(--site-focus);
  outline-offset: 1px;
  box-shadow: 0 0 0 4px var(--site-text);
}

.gapform-tools {
  margin-top: 1.5rem;
}
.gapform-tools .button-row {
  margin: 0 0 0.5rem;
}
.gapform-status {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--site-text-muted);
}

.skill-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.skill-list > li {
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--site-border-subtle);
}
.skill-list h3 {
  margin: 0 0 0.5rem;
  font-size: 1.0625rem;
}
.skill-list ul {
  margin: 0;
}

.level-list {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  border-top: 1px solid var(--site-border-subtle);
}
.level-list > li {
  margin: 0;
  border-bottom: 1px solid var(--site-border-subtle);
}
.level-list a {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 0.75rem;
  padding: 0.85rem 0.5rem;
  text-decoration: none;
}
.level-list a:hover {
  background: var(--site-surface);
}
.level-list-number {
  min-width: 1.75rem;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--site-text-muted);
}
.level-list-title {
  font-weight: 600;
  text-decoration: underline;
}
.level-list-meta {
  margin-left: auto;
  font-size: 0.8125rem;
  color: var(--site-text-muted);
}

.finder-form {
  margin: 0 0 1.5rem;
  max-width: 34rem;
}
.finder-label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.35rem;
}
.finder-input {
  width: 100%;
  font: inherit;
  padding: 0.65rem 0.85rem;
  border: 2px solid var(--site-text);
  border-radius: var(--site-radius);
  background: var(--site-page-bg);
}
.finder-count {
  color: var(--site-text-muted);
  font-size: 0.9375rem;
  margin: 0 0 1rem;
}
.finder-empty {
  background: var(--site-surface);
  border-radius: var(--site-radius);
  padding: 1.5rem;
}

.result-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--site-border-subtle);
}
.result-list > li {
  margin: 0;
  border-bottom: 1px solid var(--site-border-subtle);
  padding: 0.85rem 0.5rem;
}
.result-list a {
  font-weight: 600;
}
.result-meta {
  display: block;
  font-size: 0.875rem;
  color: var(--site-text-muted);
}

.column-list {
  columns: 3 15rem;
  column-gap: 2rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.column-list > li {
  break-inside: avoid;
  margin-bottom: 0.5rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* 6. Responsive and motion ---------------------------------------------- */

@media (max-width: 40rem) {
  .site-main {
    padding: 2rem 1rem 3rem;
  }
  .site-header-inner {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .site-nav {
    width: 100%;
  }
  .site-tools {
    width: 100%;
  }
  .summary-list-item {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
  .level-list-meta {
    margin-left: 0;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  /* A form is printed as often as it is filled in on screen. */
  .form-textarea {
    min-height: 6rem;
    border: 1px solid var(--site-text);
    print-color-adjust: exact;
  }
  .form-choice input {
    print-color-adjust: exact;
  }
  .form-choice:hover,
  .form-choice:has(input:checked) {
    background: none;
  }
  .gapform-tools {
    display: none;
  }
}

/* 7. Roles and skills patterns ------------------------------------------ */

.finder-select {
  font: inherit;
  padding: 0.5rem 0.75rem;
  border: 2px solid var(--site-text);
  border-radius: var(--site-radius);
  background: var(--site-card-bg);
  color: var(--site-text);
  max-width: 16rem;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.95rem;
}
.data-table th,
.data-table td {
  text-align: left;
  vertical-align: top;
  padding: 0.5rem 0.75rem 0.5rem 0;
  border-bottom: 1px solid var(--site-border-subtle);
}
.data-table thead th {
  border-bottom: 2px solid var(--site-border);
}
.data-table tbody th {
  font-weight: 600;
}
.data-table .numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.data-table tfoot th,
.data-table tfoot td {
  border-bottom: 0;
  border-top: 2px solid var(--site-border);
}
.data-table .result-meta {
  display: block;
  font-weight: 400;
}

.framework-quote {
  margin: 1rem 0 1.5rem;
}
.framework-quote blockquote {
  margin: 0;
  padding: 0.75rem 1rem;
  border-left: 4px solid var(--site-border);
  background: var(--site-surface);
}
.framework-quote blockquote > :last-child {
  margin-bottom: 0;
}
.framework-quote figcaption,
.source-credit {
  font-size: 0.85rem;
  color: var(--site-text-muted);
  margin-top: 0.5rem;
}

.level-text-lead {
  margin-bottom: 0.25rem;
}
.level-text-items {
  margin: 0;
}

.level-switcher ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}
.level-switcher li {
  margin: 0;
}
.level-switcher a {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--site-border);
  border-radius: var(--site-radius);
  text-decoration: none;
  font-size: 0.9rem;
}
.level-switcher a[aria-current='page'] {
  background: var(--site-primary);
  border-color: var(--site-primary);
  color: var(--site-page-bg);
}

.self-assessment {
  margin-top: 2.5rem;
  padding-top: 0.5rem;
}
.self-assessment-summary,
.self-assessment-status {
  color: var(--site-text-muted);
}
.rating {
  border: 1px solid var(--site-border-subtle);
  border-radius: var(--site-radius);
  padding: 0.75rem 1rem 1rem;
  margin: 0 0 1rem;
}
.rating legend {
  padding: 0 0.25rem;
}
.rating-skill {
  font-weight: 700;
}
.rating-expected {
  margin-left: 0.5rem;
  color: var(--site-text-muted);
  font-size: 0.9rem;
}
.rating-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin: 0.25rem 0 0.75rem;
}
.rating-choice {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.rating-gap {
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.rating-gap-below::before {
  content: '▲ ';
  color: var(--site-warning);
}
.self-assessment .form-textarea {
  width: 100%;
  margin-bottom: 0.5rem;
}
.self-assessment .form-label {
  display: block;
  font-weight: 600;
  margin-top: 0.25rem;
}

/* 7. This site ---------------------------------------------------------- */

/* Contrast. A theme's own primary colour does not always reach WCAG AA (4.5:1)
 * against its page background: the default theme, corporate, gives 4.13:1.
 * So every use of the primary colour mixes 30% of the theme's own text colour
 * into it, which darkens it on light themes and lightens it on dark ones, and
 * filled buttons and tags take the page background as their text colour. Both
 * pairs then contrast in every theme. tests/accessibility.spec.ts checks it. */
:root {
  --site-primary: color-mix(in oklch, var(--color-primary, #1d70b8) 70%, var(--color-base-content, #0b0c0c));
  --site-primary-hover: color-mix(in oklch, var(--color-primary, #1d70b8) 50%, var(--color-base-content, #0b0c0c));
  --site-danger: color-mix(in oklch, var(--color-error, #d4351c) 60%, var(--color-base-content, #0b0c0c));
  --site-warning: color-mix(in oklch, var(--color-warning, #f47738) 45%, var(--color-base-content, #0b0c0c));
  --site-success: color-mix(in oklch, var(--color-success, #00703c) 60%, var(--color-base-content, #0b0c0c));
}
.button,
.button:hover,
.tag {
  color: var(--site-page-bg);
}

/* Rendered Markdown documents: a single column, the full width of the page. */
.doc {
  min-width: 0;
}
.doc table {
  border-collapse: collapse;
  width: 100%;
  margin: 1rem 0;
}
.doc th,
.doc td,
.index-table th,
.index-table td {
  border: 1px solid var(--site-border-subtle);
  padding: 0.4rem 0.6rem;
  text-align: start;
  vertical-align: top;
}
.doc thead th {
  background: var(--site-surface);
}
.table-scroll {
  overflow-x: auto;
  max-width: 100%;
}
.doc pre {
  overflow-x: auto;
  padding: 0.75rem 1rem;
  background: var(--site-surface);
  border-radius: var(--site-radius);
}
.doc-source {
  margin-top: 3rem;
  font-size: 0.95rem;
  color: var(--site-text-muted);
}
.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.button-danger,
.button-danger:hover {
  background: var(--site-page-bg);
  border-color: var(--site-danger);
  color: var(--site-danger);
  box-shadow: 0 2px 0 var(--site-border);
}
.muted {
  color: var(--site-text-muted);
}

/* The self-assessment tool. */
.assessment-summary {
  border: 1px solid var(--site-border-subtle);
  border-radius: var(--site-radius);
  padding: 1rem 1.25rem;
  background: var(--site-surface);
}
.assessment-controls,
.assessment-actions,
.rating-row,
.meter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: end;
}
.assessment-controls-label,
.rating label,
.note-row label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.assessment-actions {
  margin-top: 1rem;
  align-items: center;
}
.file-button {
  cursor: pointer;
}
.file-button:focus-within {
  outline: 3px solid var(--site-focus);
  outline-offset: 0;
}
.assessment-item {
  margin: 1rem 0;
  scroll-margin-top: 1rem;
}
.assessment-item .fieldset {
  border: 1px solid var(--site-border-subtle);
  border-radius: var(--site-radius);
  padding: 0.75rem 1rem 1rem;
}
.assessment-item legend {
  font-weight: 700;
  padding: 0 0.25rem;
}
.assessment-statement {
  margin-top: 0;
}
.note-row {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.75rem;
}
@media (min-width: 48rem) {
  .note-row {
    grid-template-columns: 1fr 1fr;
  }
}
.note-row textarea {
  width: 100%;
}
.status {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: var(--site-radius);
  font-weight: 600;
  border: 2px solid currentColor;
}
.status-meets {
  color: var(--site-success);
}
.status-partly {
  color: var(--site-warning);
}
.status-not-yet {
  color: var(--site-danger);
}
.result-pass {
  font-weight: 600;
  color: var(--site-success);
}
.search-results {
  padding-inline-start: 1.25rem;
}
.search-results h2 {
  font-size: 1.15rem;
  margin-bottom: 0.25rem;
}

/* Header grid areas (see .site-header-inner). */
.site-brand {
  grid-area: brand;
  min-width: 0;
}
.site-header-inner > .site-tools {
  grid-area: tools;
  justify-self: end;
  flex-wrap: nowrap;
}
.site-header-inner > .site-nav {
  grid-area: nav;
}
/* On narrow screens the PickerBar takes its own row under the brand; the
 * link picker (the home icon) still offers every page. */
@media (max-width: 40rem) {
  .site-header-inner {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      'brand'
      'tools'
      'nav';
  }
  .site-header-inner > .site-tools {
    justify-self: start;
  }
}

/* The link and search pickers: drop-down panels, like the other pickers. */
.link-picker,
.search-picker {
  position: relative;
  display: inline-block;
}
.link-picker-list,
.search-picker-panel {
  position: absolute;
  z-index: 10;
  inset-block-start: calc(100% + 0.35rem);
  inset-inline-start: 0;
  min-inline-size: 13rem;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  border: 1px solid var(--site-border);
  border-radius: var(--site-radius);
  background: var(--site-card-bg);
  box-shadow: var(--site-shadow-lg);
}
.link-picker-list[hidden],
.search-picker-panel[hidden] {
  display: none;
}
.link-picker-link {
  display: block;
  padding: 0.4rem 0.6rem;
  border-radius: var(--site-radius);
  color: var(--site-text);
  text-decoration: none;
}
.link-picker-link:hover,
.link-picker-link:focus-visible {
  background: var(--site-surface);
}
.link-picker-link[aria-current='page'] {
  font-weight: 700;
}
.search-picker-form {
  display: flex;
  gap: 0.35rem;
}
.search-picker-input {
  min-inline-size: 14rem;
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--site-border);
  border-radius: var(--site-radius);
  font: inherit;
}
.search-picker-submit {
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--site-border);
  border-radius: var(--site-radius);
  background: var(--site-page-bg);
  color: var(--site-text);
  cursor: pointer;
}


/* A track page's checklist: real checkboxes, one item per line. */
.doc .checklist-item {
  list-style: none;
  margin-left: -1.25rem;
}
.doc .checklist-item label {
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
  cursor: pointer;
}
.doc .checklist-item input {
  flex: none;
  width: 1.1rem;
  height: 1.1rem;
}
