.page-hero { padding-bottom: 0; }
.page-hero h1 { margin-bottom: 4px; }
.org-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 28px; }
.org-tab {
  padding: 12px 16px; font-size: 0.9rem; font-weight: 600; min-height: 44px;
  color: rgba(255,255,255,.78); border-bottom: 3px solid transparent;
}
.org-tab:hover { color: white; }
.org-tab[aria-pressed="true"] { color: white; border-bottom-color: var(--red-on-dark); }
.org-tab .count { font-weight: 500; opacity: .8; }

.forms-layout {
  display: grid; grid-template-columns: 250px minmax(0, 1fr);
  gap: 32px; align-items: start; padding: 28px 0 80px;
}
.filters-panel { position: sticky; top: 88px; }
.filters {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius); padding: 16px 18px;
}
.filters summary { font-weight: 800; color: var(--navy); cursor: pointer; padding: 4px 0; list-style-position: inside; }
.filter-count { font-weight: 600; color: var(--red-dark); font-size: .85rem; }
.filter-group { border: none; margin: 14px 0; padding: 0; }
.filter-group legend {
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--gray-600); font-weight: 700; margin-bottom: 6px;
}
.radio-list { display: flex; flex-direction: column; gap: 2px; }
.filter-note { margin: 8px 0 0; font-size: .8rem; line-height: 1.45; color: var(--gray-600); }
.filter-note a { color: var(--red-dark); font-weight: 600; text-decoration: underline; }
.radio-list label, .check {
  display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: var(--radius-sm);
  font-size: 0.9rem; color: var(--gray-800); cursor: pointer; min-height: 36px;
}
.radio-list label:hover, .check:hover { background: var(--gray-100); }
.radio-list .count { margin-left: auto; font-size: .78rem; color: var(--gray-600); background: var(--gray-100); padding: 1px 8px; border-radius: 10px; }
.radio-list input:checked + .swatch + .text, .radio-list input:checked ~ .text { font-weight: 700; }
.radio-list input[disabled] ~ .text, .radio-list input[disabled] ~ .count { opacity: .55; }
.swatch { width: 12px; height: 12px; border-radius: 3px; border: 1px solid rgba(0,0,0,.15); flex-shrink: 0; }

.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 12px; }
.search-field { flex: 1 1 260px; min-width: 0; }
.search-field label, .sort-field label { display: block; font-size: .82rem; font-weight: 700; color: var(--gray-600); margin-bottom: 4px; }
.sort-field { flex: 0 1 230px; min-width: 0; }
.sort-field select { width: 100%; min-height: 48px; }
.results-summary { font-size: .9rem; color: var(--gray-600); margin-bottom: 16px; min-height: 1.4em; }

.style-header {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 20px; background: var(--navy); border-radius: var(--radius);
  color: white; margin-bottom: 16px;
}
.style-header h3 { color: white; font-size: 1.05rem; margin-bottom: 2px; }
.style-header p  { color: rgba(255,255,255,.78); font-size: 0.85rem; }
.series-title { margin: 0 0 12px; color: var(--gray-600); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; }
.forms-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-bottom: 32px; }
.form-card .meta-line { font-size: .82rem; color: var(--gray-600); }
.form-card .description { font-size: .85rem; }
.form-card-visual img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: contain; }
.form-card-visual span { line-height: 1; }
/* The picture is a link to the lesson: the whole image is the target, with a visible keyboard focus ring inside the card. */
a.form-card-visual { color: inherit; text-decoration: none; }
a.form-card-visual:focus-visible { outline: 3px solid var(--gold); outline-offset: -3px; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  a.form-card-visual img { transition: transform .2s ease; }
  a.form-card-visual:hover img { transform: scale(1.02); }
}
/* Footer: the lesson and Save buttons side by side, equal width, the same on every card; stacked on a narrow card. */
.form-card { container-type: inline-size; }
.form-card-footer { display: block; }
.form-card-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.form-card-actions > .btn, .form-card-actions > .badge { width: 100%; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; text-align: center; white-space: normal; }
@container (max-width: 260px) { .form-card-actions { grid-template-columns: minmax(0, 1fr); } }

@media (max-width: 1100px) { .forms-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .forms-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .filters-panel { position: static; }
}
@media (max-width: 560px) {
  .forms-grid { grid-template-columns: minmax(0, 1fr); }
  .org-tab { padding: 10px 12px; }
}
.page-hero .hero-jump { display: flex; flex-wrap: wrap; gap: 8px; }
/* Secondary tools: one wrapping row of text links under the primary buttons.
   Each link's box is at least 24px high (WCAG 2.2 target size), with 20px gaps. */
.page-hero .hero-tools { display: flex; flex-wrap: wrap; gap: 4px 20px; list-style: none; margin: 12px 0 0; padding: 0; }
.page-hero .hero-tools a { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 0; color: #fff; font-weight: 700; font-size: .95rem; text-decoration: underline; text-underline-offset: 3px; }
