.notations-page {
  --notation-ink: var(--nav-color-text);
  --notation-accent: var(--nav-teal-400);
  color: var(--notation-ink);
  background: var(--nav-color-bg);
}

.notations-hero {
  max-width: 1440px;
  margin: auto;
  padding: clamp(3rem, 7vw, 7rem) clamp(1.25rem, 5vw, 5rem);
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

.notations-specimen figcaption,
.notations-specimen__footer {
  font-family: ui-monospace, monospace;
  font-size: .8rem;
  letter-spacing: .06em;
}

.notations-hero h1 {
  font-size: clamp(3.3rem, 6.3vw, 6.7rem);
  letter-spacing: -.065em;
  line-height: 1.02;
  font-weight: 650;
  max-width: 10ch;
  margin: 1.5rem 0;
}
.notations-lead { font-size: 1.15rem; line-height: 1.75; max-width: 43ch; }
.nav-theme .notations-lead a {
  color: var(--nav-color-link);
  text-decoration: underline;
  text-underline-offset: .18em;
}
.notations-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem; margin-top: 2rem; }
/* Hero links follow the page theme; filled specimens retain their teal ground. */
.nav-theme .notations-actions a:not(.nav-btn),
.nav-theme .notations-actions a:not(.nav-btn):hover { color: var(--notation-ink); }
.nav-theme .notations-actions .nav-btn,
.nav-theme .notations-actions .nav-btn:hover,
.nav-theme .notations-actions .nav-btn:focus-visible {
  color: white;
  background: var(--nav-teal-950);
  border-color: var(--notation-ink);
}
.notations-specimen {
  min-width: 0;
  margin: 0;
  border: 1px solid var(--nav-teal-600);
  border-radius: 14px;
  background: var(--nav-teal-950);
  color: var(--nav-teal-subtle);
  box-shadow: 14px 14px 0 var(--notation-accent);
  transform: rotate(1deg);
}
.notations-specimen figcaption, .notations-specimen__footer {
  display: flex;
  justify-content: space-between;
  padding: 1.1rem 1.4rem;
  gap: .5rem;
}
.notations-specimen figcaption { border-bottom: 1px solid var(--nav-teal-500); }
.notations-specimen pre, .notations-specimen .nav-code pre { background: transparent; color: inherit; border: 0; border-radius: 0; padding: 1.4rem 5rem 1.4rem 1.4rem; margin: 0; overflow-x: auto; font-size: clamp(.76rem, .95vw, .9rem); line-height: 1.8; }
.notations-specimen code { background: transparent; color: inherit; }
.notations-specimen__footer { background: var(--notation-accent); color: var(--nav-teal-950); border-radius: 0 0 12px 12px; letter-spacing: 0; }
.notations-page .fm-band { padding-block: clamp(3rem, 7vw, 7rem); }
.notations-page .fm-band__inner { max-width: 1280px; }
.notations-page h2 { font-size: clamp(2.3rem, 4.2vw, 4.5rem); letter-spacing: -.045em; line-height: 1.1; }
.notations-page .fm-band__description, .notations-page .fm-card__body p,
.notations-page .fm-project-network__node p { color: var(--nav-color-text-muted); }
.notations-page .fm-card, .notations-page .fm-step { background: var(--nav-color-surface); color: var(--notation-ink); border-color: var(--nav-color-border); }
.notations-page .fm-card__link { color: var(--nav-color-link); }
/* teal-500 on `#notation-flow`'s surface-subtle is 4.41:1; tokens.css says step to 600. */
.notations-page .fm-overline { color: var(--nav-color-primary-hover); }
.notations-page code { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: .92em; }
.notations-page #notation-flow { background: var(--nav-color-surface-subtle); }
.notations-page .fm-project-network { margin-top: 3rem; }
.notations-page .fm-project-network__core { background: var(--nav-teal-950); color: white; border-color: var(--nav-teal-950); border-radius: 20px; box-shadow: 0 0 0 12px #b5e9f0; }
.notations-page .fm-project-network__core h3 { color: var(--notation-accent); font-size: 2rem; line-height: 1.1; }
.notations-page .fm-project-network__core p { color: var(--nav-teal-subtle); }
.notations-page .fm-project-network__wheel { width: 68px; height: 68px; background: var(--nav-teal-subtle); border-radius: 50%; padding: 8px; }
.notations-page .fm-project-network__node { background: var(--nav-color-bg); border-radius: 10px; }
.notations-page #rules { background: var(--nav-color-surface-raised); }
.catalog-library { padding-block: 3rem; }
.catalog-library > h2 { max-width: 1120px; margin: 1rem auto 2rem; padding-inline: 1.5rem; font-size: clamp(2rem, 4vw, 3.5rem); letter-spacing: -.04em; }
.notations-page a:focus-visible { outline: 3px solid var(--nav-teal-600); outline-offset: 5px; }
@media (min-width: 1000px) {
  .notations-page #anatomy .fm-cards, .notations-page #rules .fm-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 850px) {
  .notations-hero { grid-template-columns: 1fr; }
  .notations-hero h1 { max-width: 13ch; }
  .notations-specimen { transform: none; margin-right: 12px; }
  .notations-specimen pre, .notations-specimen .nav-code pre { font-size: .76rem; }
}

/* ------------------------------------------------------------------ */
/* The kind catalog (LAW-53): every S103-accepted `kind:`, generated    */
/* from the same source the gate validates against.                    */
/* ------------------------------------------------------------------ */

.kind-catalog { max-width: 1120px; margin: 0 auto 3rem; padding-inline: 1.5rem; }
.kind-catalog__intro { max-width: 66ch; color: var(--nav-color-text-muted); margin-bottom: 1.5rem; }
.kind-catalog__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr));
  gap: 1rem;
  padding: 0;
  margin: 0;
  list-style: none;
}
.kind-catalog__entry {
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--nav-color-border);
  border-radius: var(--nav-radius);
  background: var(--nav-color-surface);
}
.kind-catalog__heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.kind-catalog__value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.95rem;
}
.kind-catalog__category { font-size: 0.75rem; }
.kind-catalog__definition { margin: 0 0 0.5rem; }
.kind-catalog__rules { margin: 0; padding-left: 1.1rem; font-size: 0.9rem; }
.kind-catalog__rules--none {
  padding: 0;
  list-style: none;
  color: var(--nav-color-text-muted);
  font-style: italic;
  font-size: 0.9rem;
}

/* ------------------------------------------------------------------ */
/* The template gallery (LAW-53): a kind facet above a grid of preview  */
/* cards grouped by category — modeled on opening a new document from   */
/* a template gallery.                                                  */
/* ------------------------------------------------------------------ */

.template-gallery-wrapper { margin-bottom: 2rem; }

/* Visually hidden but still focusable and clickable via its `<label for>` —
   the standard accessible radio-pill technique. */
.nav-template-filter__input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.template-filter__pill {
  display: inline-block;
  margin: 0 0.5rem 0.5rem 0;
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--nav-color-border);
  border-radius: 999px;
  background: var(--nav-color-surface);
  color: var(--nav-color-text);
  cursor: pointer;
  font-size: 0.875rem;
  user-select: none;
}
.nav-template-filter__input:checked + .template-filter__pill {
  /* `--notation-ink` is scoped to `.notations-page` (the hero/bands); the
     gallery renders as its sibling, so this uses the underlying global
     token directly rather than an out-of-scope custom property. */
  background: var(--nav-teal-950);
  border-color: var(--nav-teal-950);
  color: #fff;
}
.nav-template-filter__input:focus-visible + .template-filter__pill {
  outline: 3px solid var(--nav-teal-600);
  outline-offset: 2px;
}

.template-gallery__group { margin-bottom: 2rem; }
.template-gallery__group > h3 {
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}
.template-gallery__cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 1.25rem;
  padding: 0;
  margin: 0;
  list-style: none;
}
.template-card { min-width: 0; }
.template-card__link {
  display: flex;
  height: 100%;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--nav-color-border);
  border-radius: var(--nav-radius);
  background: var(--nav-color-surface);
  color: inherit;
  text-decoration: none;
  transition: transform 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
.template-card__link:hover,
.template-card__link:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--nav-shadow);
}
/* The stylized cover: the model is opening a new Word document from a
   template gallery, where every entry shows a first-page preview — this is
   the lightweight stand-in until a rendered thumbnail lands. */
.template-card__face {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 6rem;
  /* Same out-of-scope-token note as the checked filter pill above. */
  background: var(--nav-teal-950);
  color: var(--nav-teal-subtle);
}
.template-card__face-kind {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.template-card__body { padding: 1rem 1.1rem; }
.template-card__body h3 { margin: 0.15rem 0 0.35rem; font-size: 1.05rem; }

@media (prefers-reduced-motion: reduce) {
  .template-card__link { transition: none; }
}
