/* Roles and skills 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. */
  --site-content-max: 74rem;
  --site-prose-max: 42rem;

  --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-inline-start: 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: start;
  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;
  inset-inline-start: 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;
}

.phase-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem;
  max-width: var(--site-content-max);
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid var(--site-border-subtle);
  font-size: 0.95rem;
  color: var(--site-text-muted);
}
.phase-banner span:last-child {
  flex: 1 1 20rem;
}

.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;
}

.breadcrumb-nav {
  margin: 0 0 1.5rem;
  font-size: 0.9375rem;
}
.breadcrumb-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
  margin: 0;
  padding: 0;
}
.breadcrumb-list-item {
  position: relative;
  margin: 0;
  color: var(--site-text-muted);
}
.breadcrumb-list-item + .breadcrumb-list-item::before {
  content: '';
  position: absolute;
  inset-inline-start: -0.6rem;
  top: 0.45em;
  width: 0.4em;
  height: 0.4em;
  border: solid var(--site-text-muted);
  border-width: 1.5px 1.5px 0 0;
  transform: rotate(45deg);
}
/* Point the chevron the other way in right-to-left locales. */
[dir='rtl'] .breadcrumb-list-item + .breadcrumb-list-item::before {
  transform: rotate(-135deg);
}
.breadcrumb-list-item[aria-current='page'] {
  font-weight: 600;
  color: var(--site-text);
}

.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-inline-start: 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-inline-start: 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-inline-start: 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-inline-start: 1rem;
}

.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-end-start-radius: 0;
  border-end-end-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;
}

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

.link-picker-button,
.search-picker-button,
.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;
}
.link-picker-button:hover,
.search-picker-button:hover,
.theme-picker-button:hover,
.locale-picker-button:hover,
.text-size-picker-button:hover,
.share-picker-button:hover {
  background: var(--site-surface);
}
.link-picker-button[aria-expanded='true'],
.search-picker-button[aria-expanded='true'],
.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);
}

.link-picker-icon,
.search-picker-icon,
.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;
}

.link-picker-list,
.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);
}
.link-picker-list[hidden],
.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: start;
  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;
}

/* The search picker opens a panel holding a search field and a submit
   button, laid out in a row. */
.search-picker-panel {
  position: absolute;
  z-index: 10;
  inset-block-start: calc(100% + 0.35rem);
  inset-inline-end: 0;
  padding: 0.5rem;
  border: 1px solid var(--site-border);
  border-radius: var(--site-radius);
  background: var(--site-card-bg);
  box-shadow: var(--site-shadow-lg);
}
.search-picker-panel[hidden] {
  display: none;
}
.search-picker-form {
  display: flex;
  gap: 0.35rem;
}
.search-picker-input {
  inline-size: min(18rem, 70vw);
  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);
  font: inherit;
}
.search-picker-submit {
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--site-primary);
  border-radius: var(--site-radius);
  background: var(--site-primary);
  color: var(--site-page-bg);
  font: inherit;
  cursor: pointer;
}

/* The link picker holds the same pages as the navigation. */
.link-picker-list-item {
  margin: 0;
}
.link-picker-link {
  display: block;
  padding: 0.4rem 0.6rem;
  border-radius: var(--site-radius);
  color: var(--site-text);
  text-decoration: none;
  font-size: 0.9375rem;
}
.link-picker-link:hover {
  background: var(--site-surface);
  color: var(--site-text);
}
.link-picker-link[aria-current='page'] {
  font-weight: 700;
  color: var(--site-primary-hover);
}

/* Tooltips repeat each picker button's name on hover and focus. */
.link-picker-tooltip,
.search-picker-tooltip,
.theme-picker-tooltip,
.locale-picker-tooltip,
.text-size-picker-tooltip,
.share-picker-tooltip {
  position: absolute;
  z-index: 11;
  inset-block-start: calc(100% + 0.35rem);
  inset-inline-end: 0;
  padding: 0.2rem 0.5rem;
  border-radius: var(--site-radius);
  background: var(--site-text);
  color: var(--site-page-bg);
  font-size: 0.8125rem;
  white-space: nowrap;
  pointer-events: none;
}
.link-picker-tooltip[hidden],
.search-picker-tooltip[hidden],
.theme-picker-tooltip[hidden],
.locale-picker-tooltip[hidden],
.text-size-picker-tooltip[hidden],
.share-picker-tooltip[hidden] {
  display: none;
}

/* The link and search pickers come first in the bar, so their popups open
   from the start edge and stay on screen. */
.link-picker-list,
.link-picker-tooltip,
.search-picker-panel,
.search-picker-tooltip {
  inset-inline-start: 0;
  inset-inline-end: auto;
}

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

.site-header {
  border-bottom: 4px solid var(--site-text);
  background: var(--site-page-bg);
}
.site-header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 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;
  max-width: 44rem;
}
.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: 46rem;
  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%;
}

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

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

.prose {
  max-width: 46rem;
}
.prose h2 {
  margin-top: 2.5rem;
}
.prose h3 {
  margin-top: 1.75rem;
}
.prose li > input[type='checkbox'] {
  margin-inline-end: 0.5rem;
}
.prose ul:has(> li > input[type='checkbox']) {
  list-style: none;
  padding-inline-start: 0.25rem;
}
.prose blockquote {
  margin: 1.5rem 0;
  padding-inline-start: 1rem;
  border-inline-start: 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-inline-start: 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,
  .phase-banner {
    padding-inline-start: 1rem;
    padding-inline-end: 1rem;
  }
  .site-nav {
    width: 100%;
  }
  .site-tools {
    width: 100%;
  }
  .summary-list-item {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
  .level-list-meta {
    margin-inline-start: 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: start;
  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: end;
  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-inline-start: 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-inline-start: 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;
}

/* English quotations from the UK GDaD PCF and ESCO, inside a right-to-left
   locale: lay them out left to right, isolated from the text around them. */
[dir='rtl'] [lang|='en'] {
  direction: ltr;
  unicode-bidi: isolate;
}

/* Home hero: subheadline under the title and the list of translations under the buttons. */
.page-subheadline {
  margin: 0 0 var(--lily-space-md);
  font-size: 1.3em;
  font-weight: 600;
}

.page-translations {
  margin-top: var(--lily-space-md);
  font-size: 0.875em;
  color: var(--lily-text-muted);
}

.page-translations a[aria-current='page'] {
  font-weight: 700;
  text-decoration: none;
}
