/* Extracted from awards.html inline <style> block */
.awards-intro-block {
  background: var(--blue-deep);
  color: var(--white);
  padding-top: calc(var(--nav-height) + clamp(3rem, 6vw, 5rem));
  padding-bottom: clamp(3rem, 6vw, 5rem);
  position: relative;
  overflow: hidden;
}

.awards-intro-block::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.awards-intro-block h1 { color: var(--white); }
.awards-intro-block .lead { color: rgba(255,255,255,0.82); max-width: 52ch; }

.award-seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border: 2px solid rgba(255,255,255,0.25);
  border-radius: 50%;
  margin-bottom: 1.25rem;
  color: rgba(255,255,255,0.7);
}

.award-seal svg { width: 24px; height: 24px; }

.recipients-decade { margin-bottom: 0.25rem; }
.recipients-year-group { }

.decade-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.875rem 0;
  border-bottom: 1.5px solid var(--rule-mid);
  text-align: left;
}

.decade-toggle__label {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--charcoal);
}

.decade-toggle__meta {
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-light);
}

.decade-toggle__icon {
  width: 20px;
  height: 20px;
  color: var(--blue-deep);
  transition: transform var(--transition);
  flex-shrink: 0;
}

.decade-toggle[aria-expanded="true"] .decade-toggle__icon {
  transform: rotate(180deg);
}

.decade-content { overflow: hidden; }
.decade-content[hidden] { display: none; }
.decade-content--hidden { display: none; }

.contest-card {
  background: var(--paper);
  border: 1px solid var(--rule-mid);
  border-top: 3px solid var(--blue-light);
  padding: clamp(1.5rem, 3vw, 2rem);
}

/* From styles.css — awards page styles */
.award-feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.award-feature > * { min-width: 0; }

.award-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: var(--blue-deep);
  color: var(--white);
  border-radius: 50%;
  margin-bottom: 1.5rem;
  flex-shrink: 0;
}

.award-badge svg { width: 28px; height: 28px; }

.award-panel {
  background: var(--paper);
  border: 1px solid var(--rule-mid);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  border-top: 3px solid var(--blue-deep);
}

.award-panel--green { border-top-color: var(--green); }

/* Recipients list */
.recipients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.decade-block { margin-bottom: 3rem; }

.decade-label {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 0.75rem;
  padding-bottom: 0.625rem;
  border-bottom: 1.5px solid var(--rule-mid);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.decade-label span {
  font-family: var(--font-sans);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-light);
}

.recipient-row {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: 0.875rem;
}

.recipient-row:last-child { border-bottom: none; }

.recipient-year {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--blue-deep);
  min-width: 44px;
  flex-shrink: 0;
  font-size: 0.8125rem;
}

.recipient-names { color: var(--text-mid); }

/* Contest table */
.contest-table-wrap {
  overflow-x: auto;
  margin-block: 1.5rem;
  border: 1px solid var(--rule-mid);
}

.contest-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.contest-table th {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-light);
  padding: 0.625rem 1rem;
  background: var(--paper);
  text-align: left;
  border-bottom: 1.5px solid var(--rule-mid);
  white-space: nowrap;
}

.contest-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--rule);
  color: var(--text-mid);
  vertical-align: top;
}

.contest-table tr:last-child td { border-bottom: none; }
.contest-table tr:hover td { background: var(--paper); }

.contest-table td:first-child {
  font-weight: 600;
  color: var(--charcoal);
}


@media (max-width: 1023px) {
  .award-feature {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .award-panel { padding: 1.25rem; }
  .form-row { grid-template-columns: 1fr; }
  .contest-table { min-width: 500px; }
}

/* ─── Native award feature blocks ───────────────────────────────────────── */
.award-feature h2 { margin-top: 0; margin-bottom: 1rem; }
.award-feature__desc { font-size: 1.0625rem; line-height: 1.8; color: var(--text-mid) !important; max-width: 60ch; margin-bottom: 1.25rem !important; }
.award-feature__note { font-size: 1rem; line-height: 1.75; color: var(--text-mid) !important; max-width: 60ch; margin-bottom: 1.75rem !important; }
/* Explicit button styles so border + hover are always present regardless of WP global style injection */
/* Solid buttons only. Without the :not() this claimed OUTLINE buttons too, and
   an !important background is a fight the outline style only wins where its own
   rule is also !important — which the editor stylesheet's was not, so the Math
   Contest button rendered blue-on-blue in Gutenberg. Excluding outline here
   removes the conflict instead of escalating it. */
.award-feature .wp-block-button:not(.is-style-outline) .wp-block-button__link { background: var(--blue-deep) !important; color: var(--white) !important; border: 1.5px solid var(--blue-deep) !important; }
.award-feature .wp-block-button:not(.is-style-outline) .wp-block-button__link:hover { background: #134870 !important; border-color: #134870 !important; }

/* ─── Awards intro z-index fix (replaces invalid block style attribute) ─── */
.awards-intro__inner { position: relative; z-index: 1; }

/* ─── Awards intro outline buttons (white on blue background) ───────────── */
/* border-color needs !important — style.css sets border shorthand with !important */
.awards-intro-block .wp-block-button.is-style-outline .wp-block-button__link { color: var(--white) !important; border-color: rgba(255,255,255,0.75) !important; background: transparent !important; }
.awards-intro-block .wp-block-button.is-style-outline .wp-block-button__link:hover { background: rgba(255,255,255,0.12) !important; border-color: var(--white) !important; }

/* ─── Award panel label ─────────────────────────────────────────────────── */
.award-panel__label { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--blue-deep); margin-bottom: 1.25rem; max-width: none !important; }

/* ─── Contest At a Glance — wp:table inside pdi-box ────────────────────── */
.pdi-box .wp-block-table { margin: 0 !important; }
.pdi-box .wp-block-table table { width: 100%; border-collapse: collapse; border: none !important; font-size: 1rem; }
.pdi-box .wp-block-table td { padding: 0.625rem 0; border: none !important; border-bottom: 1px solid var(--rule) !important; color: var(--text-mid); vertical-align: baseline; line-height: 1.5; }
.pdi-box .wp-block-table tr:last-child td { border-bottom: none !important; }
.pdi-box .wp-block-table td:first-child { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--blue-deep); width: 110px; min-width: 90px; padding-right: 1rem; }

/* ─── Decade heading toggle (replaces button) ───────────────────────────── */
/* Sized deliberately larger than the 0.875rem rows inside it so the hierarchy
   reads as "group heading" rather than "another row", and given a chevron so it
   is obviously a control rather than a label. */
.decade-heading { font-size: 1.0625rem !important; font-family: var(--font-sans) !important; font-weight: 700 !important; color: var(--charcoal) !important; cursor: pointer; padding: 0.875rem 0; border-bottom: 1.5px solid var(--rule-mid); margin: 0 !important; display: flex; align-items: center; justify-content: space-between; user-select: none; transition: color var(--transition); }
.decade-heading:hover { color: var(--blue-deep) !important; }
.decade-heading--expanded { color: var(--blue-deep) !important; }
.decade-heading__meta { font-size: 0.75rem; font-weight: 400; color: var(--text-light); margin-left: auto; padding-left: 1rem; }
.decade-heading--expanded .decade-heading__meta { color: var(--blue-deep); }

/* Chevron drawn from two borders on a rotated square — no icon font, no SVG,
   and currentColor means it picks up the charcoal -> blue shift for free.
   Down = collapsed, up = expanded. */
.decade-heading::after {
  content: '';
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  margin-left: 0.875rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 220ms ease;
}
.decade-heading--expanded::after { transform: translateY(2px) rotate(-135deg); }

@media (prefers-reduced-motion: reduce) {
  .decade-heading::after { transition: none; }
}

/* ─── pdi-box base styles (duplicated from pd.css — needed on contests page) */
.pdi-box { margin-top: 1.5rem; background: var(--paper); border: 1px solid var(--rule-mid); padding: 1.75rem; }
.pdi-box--first { margin-top: 2rem; }
.pdi-box--blue { border-left: 4px solid var(--blue-deep); }
.pdi-box--green { border-left: 4px solid var(--green); }
.pdi-box__label { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--blue-deep); margin-bottom: 1.25rem; max-width: none !important; }
.pdi-box--green .pdi-box__label { color: var(--green); }
.pdi-box--plain .pdi-box__label { color: var(--text-light); }
.pdi-box__body { font-size: 0.9375rem; line-height: 1.8; color: var(--text-mid) !important; max-width: none !important; margin-bottom: 0.75rem; }
.pdi-box__note { font-size: 0.875rem; line-height: 1.75; color: var(--text-mid) !important; margin-top: 0.75rem; max-width: none !important; }
.pdi-box .wp-block-buttons { margin-top: 1.25rem; }

/* ─── wp:table inside decade-content accordion ──────────────────────────── */
.decade-content figure.wp-block-table { border: none !important; margin: 0 !important; }
.decade-content .wp-block-table { border: none !important; margin: 0; }
.decade-content .wp-block-table table { width: 100%; border-collapse: collapse; border: none !important; border-top: none !important; border-bottom: none !important; border-left: none !important; border-right: none !important; font-size: 0.875rem; }
.decade-content .wp-block-table thead,
.decade-content .wp-block-table tbody,
.decade-content .wp-block-table tr { border: none !important; }
.decade-content .wp-block-table td { padding: 0.5rem 0; border: none !important; border-top: none !important; border-left: none !important; border-right: none !important; border-bottom: 1px solid var(--rule) !important; color: var(--text-mid); vertical-align: baseline; }
.decade-content .wp-block-table tr:last-child td { border-bottom: none !important; }
.decade-content .wp-block-table td:first-child { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--blue-deep); width: 60px; min-width: 44px; font-size: 0.8125rem; }

/* ─── Plain (unaccented) pdi-box label ──────────────────────────────────── */
/* The modifier belongs on the label, not on the box — the old markup put
   .pdi-box--plain on the paragraph, where the `.pdi-box--plain .pdi-box__label`
   descendant selector could never match it. */
.pdi-box__label--plain { color: var(--text-light) !important; }

/* ─── Past recipients: one table in, an accordion out ───────────────────── */
/* The client maintains a single core/table of "year | name(s)". mamt.js buckets
   it into decades at runtime, so a 2030s group appears by itself the moment she
   adds a 2030 row — see initRecipients(). The generated markup reuses
   .decade-heading / .decade-content above, so nothing new is needed for it. */
.recipients-accordion { margin-top: 0.25rem; }

/* Set by JS once the accordion exists. Hiding it here rather than removing the
   table means that with JavaScript off the full list is still on the page. */
.recipients-table--replaced { display: none; }

/* The source table has to stand on its own for that no-JS case, so it gets the
   same treatment as a decade table. */
.award-panel .recipients-table { border: none !important; margin: 0 !important; }
.award-panel .recipients-table table { width: 100%; border-collapse: collapse; border: none !important; font-size: 0.875rem; }
.award-panel .recipients-table td { padding: 0.5rem 0; border: none !important; border-bottom: 1px solid var(--rule) !important; color: var(--text-mid); vertical-align: baseline; }
.award-panel .recipients-table tr:last-child td { border-bottom: none !important; }
.award-panel .recipients-table td:first-child { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--blue-deep); width: 60px; min-width: 44px; font-size: 0.8125rem; }
