/* YEARBOOK shared component system: buttons, forms, cards, headings, borders and focus states. */
:where(h1, h2, h3, h4, h5, h6) {
  color: var(--color-ink);
  font-family: var(--font-heading);
  font-weight: 800;
  text-wrap: balance;
}
:where(p, li, label, input, select, textarea, button) { font-family: var(--font-body); }
:where(.container, .header-inner, .footer-main, .footer-bottom) { max-width: var(--container-max); }
:where(.page-shell, .archive-shell, .single-shell) { padding-block: var(--space-section); }
:where(.event-card, .post-card, .newsletter-card, .stats-panel, .widget, .comment-respond) {
  border-color: var(--color-line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}
:where(.event-card, .post-card, .newsletter-card) { overflow: hidden; }
:where(.button, button, input[type="button"], input[type="submit"], input[type="reset"], .wp-element-button) {
  min-height: 44px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 700;
  transition: background-color .16s ease, color .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
:where(.button-dark, .login-button, .search-form button, .newsletter-form button, input[type="submit"], .wp-element-button) {
  background-color: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-surface);
}
:where(.button-dark, .login-button, .search-form button, .newsletter-form button, input[type="submit"], .wp-element-button):hover {
  background-color: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  color: var(--color-surface);
}
:where(.button-outline, .button:not(.button-dark)) { border-color: var(--color-accent); }
:where(.button-outline, .button:not(.button-dark)):hover { color: var(--color-accent-hover); border-color: var(--color-accent-hover); }
:where(input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]), select, textarea) {
  max-width: 100%;
  min-height: 44px;
  padding: .7rem .85rem;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-ink);
  font: inherit;
}
:where(textarea) { min-height: 8rem; resize: vertical; }
:where(input, select, textarea):focus-visible,
:where(button, a, .button, .wp-element-button):focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  box-shadow: var(--focus-ring);
}
:where(input[type="checkbox"], input[type="radio"]) { accent-color: var(--color-accent); }
:where(.event-card, .post-card, .latest-card, .newsletter-card) h2,
:where(.event-card, .post-card, .latest-card, .newsletter-card) h3 { font-family: var(--font-heading); }
:where(.event-card, .post-card, .latest-card) a:hover { color: var(--color-accent-hover); }
:where(.eyebrow, .meta, .category-pill) { letter-spacing: .12em; }
:where(.site-header, .site-footer, .timeline-strip, .map-section, .stats-panel) { border-color: var(--color-line); }
:where(.site-header, .site-footer, .timeline-strip, .newsletter-card) { background-color: var(--color-surface); }
:where(.menu a:hover, .menu .current-menu-item > a, .text-link:hover, .footer-social a:hover) { color: var(--color-accent); }
:where(.timeline-year.is-active) { background: var(--color-accent); color: var(--color-surface); }
:where(.brand-word, .brand-footer .brand-word) { font-family: var(--font-heading); }
@media (prefers-reduced-motion: reduce) {
  :where(.button, button, input[type="button"], input[type="submit"], input[type="reset"], .wp-element-button) { transition: none; }
}


/* YEARBOOK Core account and authentication forms */
.yearbook-auth{max-width:560px;margin:2rem auto;padding:clamp(1.25rem,4vw,2.5rem);background:var(--color-surface);border:1px solid var(--color-line);border-radius:16px;color:var(--color-ink)}
.yearbook-auth h2{margin:0 0 1rem;font-family:Manrope, sans-serif;font-size:clamp(1.5rem,4vw,2rem)}
.yearbook-auth p{line-height:1.65}
.yearbook-auth__form{display:grid;gap:.7rem;margin:1.25rem 0}
.yearbook-auth__form label{font-weight:600;margin-top:.35rem}
.yearbook-auth__form input[type=text],.yearbook-auth__form input[type=email],.yearbook-auth__form input[type=password]{box-sizing:border-box;width:100%;min-height:48px;padding:.75rem .9rem;border:1px solid var(--color-border-strong);border-radius:8px;background:var(--color-surface);color:var(--color-ink);font:inherit}
.yearbook-auth__form input:focus{outline:3px solid var(--color-accent-soft);border-color:var(--color-accent)}
.yearbook-auth__check{display:flex;align-items:center;gap:.55rem;font-weight:400!important}
.yearbook-auth__check input{width:18px;height:18px}
.yearbook-auth__button{display:inline-flex;align-items:center;justify-content:center;min-height:46px;padding:.75rem 1.2rem;border:0;border-radius:8px;background:var(--color-accent);color:var(--color-surface)!important;text-decoration:none;font:inherit;font-weight:700;cursor:pointer}
.yearbook-auth__button:hover{background:var(--color-accent-hover)}
.yearbook-auth__notice{max-width:560px;margin:1rem auto;padding:1rem 1.1rem;border:1px solid var(--color-border-strong);border-radius:8px;background:var(--color-accent-soft);color:var(--color-accent-hover);line-height:1.55}
@media(max-width:600px){.yearbook-auth{margin:1.25rem auto;padding:1.15rem;border-radius:12px}.yearbook-auth__form input[type=text],.yearbook-auth__form input[type=email],.yearbook-auth__form input[type=password]{font-size:16px}}


/* Etapa 32 — personal profile and saved events */
.yearbook-profile { max-width: 900px; margin: 0 auto 3rem; }
.yearbook-profile__header { margin-bottom: 2rem; }
.yearbook-profile__header h2 { margin-bottom: .5rem; }
.yearbook-profile__section { padding: 1.5rem; margin: 1.25rem 0; border: 1px solid var(--color-line); border-radius: 12px; background: var(--color-surface); }
.yearbook-profile__section h3 { margin-top: 0; }
.yearbook-profile__form { max-width: 620px; }
.yearbook-profile__hint { font-size: .9rem; color: var(--color-muted); }
.yearbook-profile__favorites { list-style: none; margin: 0; padding: 0; }
.yearbook-profile__favorites li { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .8rem; padding: .85rem 0; border-bottom: 1px solid var(--color-line); }
.yearbook-profile__favorites li:last-child { border-bottom: 0; }
.yearbook-profile__favorites li > a { font-weight: 600; flex: 1 1 220px; }
.yearbook-profile__favorites li > span { color: var(--color-muted); font-size: .9rem; }
.yearbook-favorite-form { margin: 1rem 0; }
.yearbook-favorite-remove { display: inline-flex; margin: 0; }
.yearbook-favorite-remove button { border: 0; background: transparent; color: var(--color-accent); text-decoration: underline; cursor: pointer; font: inherit; padding: .4rem; }
.yearbook-profile__logout { margin-top: 2rem; }
.yearbook-auth__notice { padding: .85rem 1rem; margin: 1rem 0; border-radius: 8px; background: var(--color-accent-soft); color: var(--color-ink); }
@media (max-width: 640px) {
  .yearbook-profile__section { padding: 1rem; }
  .yearbook-profile__favorites li { align-items: flex-start; }
  .yearbook-favorite-form .yearbook-auth__button { width: 100%; }
}

body.yearbook-compact-view .event-card,
body.yearbook-compact-view .article-card,
body.yearbook-compact-view .yearbook-card { padding-block: .65rem; }
body.yearbook-compact-view .event-card p,
body.yearbook-compact-view .article-card p,
body.yearbook-compact-view .yearbook-card p { margin-bottom: .45rem; }


/* Etapa 44 — shared primitives and consistent token-driven controls. */
body { background: var(--color-paper); color: var(--color-ink); font-family: var(--font-body); }
:where(h1, h2, h3, h4, h5, h6) { font-family: var(--font-heading); line-height: var(--leading-tight); }
:where(.container, .header-inner, .footer-main, .footer-bottom) { width: min(calc(100% - (2 * var(--layout-gutter))), var(--container-max)); margin-inline: auto; }
:where(.page-content, .entry-content, .yearbook-auth) { color: var(--color-ink); }
:where(.button, .login-button, .yearbook-auth__button, .wp-element-button) { min-height: var(--control-height); padding-inline: var(--button-padding-inline); border-radius: var(--control-radius); }
:where(.button, .login-button, .text-link, .eyebrow, .meta) { letter-spacing: var(--button-letter-spacing); }
:where(.event-card, .post-card, .latest-card, .newsletter-card, .sidebar-card, .yearbook-profile__section, .yearbook-auth) { border-color: var(--color-line); }
:where(.event-card, .post-card, .latest-card, .newsletter-card, .sidebar-card, .yearbook-profile__section) { border-radius: var(--radius-md); }
:where(input, select, textarea) { accent-color: var(--color-accent); }
:where(input, select, textarea)::placeholder { color: var(--color-muted); opacity: 1; }
:where(a, button, input, select, textarea) { -webkit-tap-highlight-color: transparent; }
:where(a, button, input, select, textarea):focus-visible { outline-color: var(--color-accent); }


/* Etapa 56 — consistent keyboard focus and readable validation */
:where(.newsletter-form, .yearbook-comments__form, .yearbook-auth__form) :where(input, select, textarea, button):focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
  box-shadow: 0 0 0 2px var(--color-surface);
}
:where(.newsletter-notice, .yearbook-comments__notice, .yearbook-auth__notice) {
  line-height: 1.6;
  overflow-wrap: anywhere;
}
:where(.newsletter-form, .yearbook-comments__form, .yearbook-auth__form) :where(input, select, textarea) {
  font-size: max(1rem, 16px);
}
