/* Results page: five winning essays, sixteen honorable mentions, and the judges. */
:root {
  color-scheme: light;
  --background: #ebe5db;
  --ink: #1a1a19;
  --body: #3d3c3a;
  --muted: #69645d;
  --faint: #69645d;
  --rule: #d2cabd;
  --accent: #3a7569;
  --accent-dark: #2e6258;
  --quiet: #69645d;
  --wordmark: #b7b1a9;
  --link-underline: rgba(58, 117, 105, 0.3);
  --nav-bg: rgba(235, 229, 219, 0.95);
  --measure: 960px;
  --gutter: 1.5rem;
  --ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --serif: "Newsreader", Georgia, serif;
  font-family: var(--serif);
  font-size: 18px;
  color: var(--ink);
  background: var(--background);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
body {
  min-width: 320px;
  margin: 0;
  line-height: 1.65;
  background: var(--background);
}
a {
  color: var(--accent-dark);
  text-decoration: underline;
  text-decoration-color: var(--link-underline);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover {
  text-decoration-color: var(--accent);
}
a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}
[lang="ar"] {
  font-family: "Amiri", serif;
}

.header,
.chapter-nav div,
.opening,
.chapter,
.footer {
  width: min(100% - (2 * var(--gutter)), var(--measure));
  margin-inline: auto;
}

/* ---- masthead and section nav (as on the report) ---- */
.header {
  padding-top: 4.5rem;
  margin-bottom: 2.5rem;
  font-size: 17px;
}
.page-breadcrumb {
  margin: 0 0 1rem;
  font-family: var(--ui);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: var(--quiet);
}
.page-breadcrumb a {
  color: #5e5a55;
  text-decoration-color: rgba(94, 90, 85, 0.35);
}
.page-breadcrumb-sep {
  margin: 0 0.4em;
  color: #c5c0b8;
}
.contest-name {
  display: block;
  width: fit-content;
  margin-bottom: 0.6rem;
  color: inherit;
  text-decoration: none;
}
.contest-name:hover {
  text-decoration: none;
}
.contest-name-arabic {
  display: inline-block;
  font-family: "Reem Kufi", sans-serif;
  font-weight: 400;
  font-size: 2.8rem;
  line-height: 1;
  color: var(--wordmark);
  white-space: nowrap;
  transform-origin: left center;
  -webkit-text-stroke: 0.3px var(--wordmark);
  paint-order: stroke fill;
  will-change: transform;
}
.contest-name-english {
  margin: 0;
  font-size: 3.7rem;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-transform: lowercase;
}
.tagline {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-style: italic;
  color: #555;
}

@media (max-width: 820px) {
  .header {
    padding-top: 3rem;
    margin-bottom: 1.75rem;
  }
  .contest-name-english {
    font-size: 2.6rem;
  }
  .contest-name-arabic {
    font-size: 2rem;
  }
}

.chapter-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--nav-bg);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  backdrop-filter: blur(9px);
}
.chapter-nav div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: clamp(0.7rem, 2.5vw, 1.4rem);
}
.chapter-nav a {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0.62rem 0.1rem 0.58rem;
  font-family: var(--ui);
  font-size: 0.7rem;
  line-height: 1.2;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}
.chapter-nav a:hover {
  color: var(--accent-dark);
}

/* ---- sections ---- */
.section-label {
  margin: 0;
  font-family: var(--ui);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.chapter {
  padding-block: clamp(3.5rem, 7vw, 5.5rem);
  border-top: 1px solid var(--rule);
  scroll-margin-top: 4rem;
}
.chapter-heading {
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.chapter-heading h2 {
  margin: 0.5rem 0 0;
  font-size: clamp(1.4rem, 2.2vw, 1.8rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.chapter-heading h2 + p {
  max-width: 34em;
  margin: 0.7rem 0 0;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--body);
}

/* ---- results introduction ---- */
.opening {
  padding-top: clamp(2rem, 4vw, 2.75rem);
}
.opening + .chapter {
  border-top: 0;
  padding-top: clamp(2rem, 4vw, 3rem);
}
.chapter--prizes .chapter-heading {
  margin-bottom: 2rem;
}
.opening-copy {
  max-width: 36em;
  margin: 1.35rem 0 0;
  font-size: 1.08rem;
  line-height: 1.6;
  color: var(--body);
}
.opening-copy + .opening-copy {
  margin-top: 0.7rem;
}
.prize-reflection {
  max-width: 36em;
  margin: 2.5rem 0 0;
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--body);
}

/* ---- first and second, followed by three equal third prizes ---- */
.prizes {
  display: grid;
  column-gap: 2.4rem;
}
.prizes--leading {
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
}
.prize-tier {
  margin-top: clamp(2.8rem, 5vw, 4rem);
}
.prize-tier-heading {
  margin-bottom: 1rem;
}
.prize-tier-heading .section-label span {
  font-weight: 400;
  letter-spacing: 0.04em;
}
.prizes--third {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: clamp(1.6rem, 3.2vw, 2.4rem);
}
.prize {
  display: flex;
  flex-direction: column;
  padding-top: 1.1rem;
  border-top: 1px solid var(--ink);
  scroll-margin-top: 5rem;
}
.prize-label {
  margin: 0;
  font-family: var(--ui);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent-dark);
}
.prize-label span {
  margin-left: 0.6em;
  font-weight: 400;
  color: var(--muted);
}

/* Animated charcoal drawings: load on first appearance, draw once, then keep a gentle
   motion going. Each SVG shows still under reduced motion.
   One shared height within each tier keeps the summaries aligned. */
.prize-art {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 180px;
  margin: 0.8rem 0 1rem;
}
.prize-art img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
}
.prize-art noscript {
  display: contents;
}
.prizes--leading .prize-art {
  height: clamp(190px, 22vw, 225px);
}
/* The dense family trees and wide plant need slightly less scale than the maps and sapling. */
#essay-variant-annotation .prize-art img,
#essay-environmental-data .prize-art img {
  height: 94%;
}
.prizes--leading .prize:not(.prize--first) .prize-answer {
  font-size: clamp(1.333333rem, 2vw, 1.5rem);
}
.prize-art figcaption {
  margin-top: 0.25rem;
  font-family: var(--ui);
  font-size: 0.66rem;
  line-height: 1.4;
  color: var(--muted);
  text-align: center;
}

.prize-answer {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 400;
  line-height: 1.24;
  letter-spacing: -0.012em;
  text-wrap: pretty;
}
.prize--first .prize-answer {
  font-size: clamp(1.55rem, 2.3vw, 1.8rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
}
.prize-answer a {
  color: inherit;
  text-decoration: none;
}
.prize-answer a:hover {
  color: var(--accent-dark);
}
.prize-source {
  margin: 0.75rem 0 0;
  font-size: 0.92rem;
  line-height: 1.35;
  color: var(--muted);
}
.prize-source cite {
  font-style: italic;
  color: var(--body);
}
.source-title-label {
  font-family: var(--ui);
  font-size: 0.72rem;
  font-weight: 500;
  font-style: normal;
  color: var(--muted);
}
/* Presentation only: complete titles stay in the accessible text and on the essay pages. */
.prize-source .title-subtitle {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.prize-author {
  display: block;
  margin-top: 0.4rem;
  font-size: 1rem;
  font-weight: 600;
  font-style: normal;
  color: var(--ink);
}
.prize-more {
  margin-top: auto;
  padding-top: 0.75rem;
}
/* Share the entry and reading-link rows to align links across each prize tier. */
@supports (grid-template-rows: subgrid) {
  .prize {
    display: grid;
    grid-template-rows: subgrid;
    grid-row: span 2;
    row-gap: 0;
  }
  .prize-more {
    align-self: start;
    margin-top: 0;
  }
}
.read-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--ui);
  font-size: 0.76rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
/* ---- honorable mentions, in subject bins ---- */
.chapter--mentions {
  padding-bottom: 0;
}
.chapter--mentions + .chapter {
  border-top: 0;
}
.mention-group {
  scroll-margin-top: 5rem;
}
/* Two explicit columns (Health + Heat beside Land + Language: 9 and 8 essays) so they end nearly
   level. Not CSS multi-column, whose break-avoidance leaves stray gaps inside entries in Safari. */
.mention-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3.2rem 3.4rem;
  align-items: start;
}
.mention-group + .mention-group {
  margin-top: 3.2rem;
}
/* A small charcoal ornament heads each bin (generated with the prize drawings; still once drawn). */
.group-ornament {
  display: block;
  width: 58px;
  height: 58px;
  margin: 0 0 0.5rem -4px;
}
.group-label {
  display: flex;
  justify-content: space-between;
  margin: 0;
  padding-bottom: 0.6rem;
  font-family: var(--ui);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--ink);
}
.group-label span {
  font-weight: 400;
  color: var(--muted);
}
.mention-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.mention-list li {
  padding: 0.95rem 0 1.05rem;
  scroll-margin-top: 5rem;
}
.mention-list li + li {
  border-top: 1px solid var(--rule);
}
.mention-answer {
  display: block;
  font-size: 1.12rem;
  line-height: 1.35;
  color: var(--ink);
  text-decoration: none;
}
/* Each summary opens its essay: a small arrow says so without hover (phones have none),
   held to the last word by a no-break space. */
.mention-answer::after {
  content: "\00a0\2192";
  font-family: var(--ui);
  font-size: 0.8em;
  color: var(--faint);
}
.mention-answer:hover,
.mention-answer:focus-visible {
  color: var(--accent-dark);
}
.mention-answer:hover::after,
.mention-answer:focus-visible::after {
  color: var(--accent);
}
.mention-source {
  position: relative;
  margin: 0.35rem 0 0;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--muted);
}
.mention-source cite {
  font-style: italic;
  color: var(--muted);
}
.mention-author {
  display: block;
  margin-top: 0.22rem;
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--body);
}
.editorial-note {
  display: inline-block;
  vertical-align: super;
  line-height: 1;
}
.editorial-note summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 24px;
  font-family: var(--ui);
  font-size: 0.72rem;
  color: var(--muted);
  list-style: none;
  cursor: pointer;
}
.editorial-note summary::-webkit-details-marker {
  display: none;
}
.editorial-tooltip {
  position: absolute;
  z-index: 2;
  bottom: calc(100% + 0.4rem);
  left: 0;
  width: min(18rem, 100%);
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--rule);
  background: #f6f4ef;
  box-shadow: 0 3px 10px rgba(26, 26, 25, 0.08);
  font-family: var(--ui);
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--body);
}
/* Native disclosure supports touch and keyboard; newer browsers also show the note on hover
   or focus without opening it. Older browsers keep the same tap-to-open behavior. */
@supports selector(::details-content) {
  .editorial-note::details-content {
    content-visibility: visible;
  }
  .editorial-note:not([open]) .editorial-tooltip {
    visibility: hidden;
  }
  .editorial-note:is(:hover, :focus-within) .editorial-tooltip {
    visibility: visible;
  }
}
.contributors-thanks {
  margin: 2rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--body);
}

/* ---- judges ---- */
.masthead {
  columns: 3;
  column-gap: 2.6rem;
  margin-top: 0.5rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--ink);
}
.judge {
  break-inside: avoid;
  margin-bottom: 1.45rem;
}
.judge-name {
  margin: 0;
  font-size: 1.04rem;
  line-height: 1.3;
}
.judge-name a {
  color: inherit;
  text-decoration-color: var(--link-underline);
}
.judge-name a:hover {
  color: var(--accent-dark);
}
.judge-degree {
  font-size: 0.8em;
  letter-spacing: 0.02em;
  color: var(--muted);
}
.judge-role {
  margin: 0.1rem 0 0;
  font-family: var(--ui);
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--muted);
}
.judge-org {
  color: var(--body);
}
.judge-former {
  display: block;
  font-family: var(--serif);
  font-size: 0.85rem;
  font-style: italic;
  color: var(--faint);
}

.footer {
  padding: 2rem 0 4rem;
  border-top: 1px solid var(--rule);
  font-family: var(--ui);
  font-size: 0.72rem;
  color: var(--muted);
}
.footer p {
  margin: 0 0 0.4rem;
}
.footer a {
  color: var(--muted);
  text-decoration-color: rgba(140, 135, 128, 0.35);
}

@media (max-width: 860px) {
  .masthead {
    columns: 2;
  }
}
@media (width > 900px) {
  /* The shared heading identifies the tie; retain individual labels for assistive technology
     and when the essays become separate rows at narrower widths. */
  .prizes--third .prize-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}
@media (max-width: 900px) {
  .prizes {
    column-gap: 1.6rem;
  }
  .prizes--third {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 2.4rem;
  }
  .prizes--third .prize-entry {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr);
    column-gap: 2rem;
    align-content: start;
    align-items: start;
    grid-template-rows: auto auto 1fr;
  }
  .prizes--third .prize-label {
    grid-column: 1 / -1;
  }
  .prizes--third .prize-art {
    grid-column: 1;
    grid-row: 2 / 4;
    margin-bottom: 0;
  }
  .prizes--third .prize-answer {
    margin-top: 0.8rem;
    font-size: 1.3rem;
  }
  .prizes--third .prize-more {
    margin-left: calc((100% - 2rem) / 2.7 + 2rem);
  }
}
@media (max-width: 760px) {
  .mention-groups {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.6rem;
  }
  .mention-group + .mention-group {
    margin-top: 2.6rem;
  }
}
@media (max-width: 640px) {
  :root {
    --gutter: 16px;
  }
  /* Selected title/subtitle breaks are presentation only; the complete title stays readable
     by assistive technology and is shown on desktop and on the essay's own page. */
  .title-subtitle {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .chapter-nav div {
    column-gap: 0.7rem;
  }
  .chapter-nav a {
    padding-block: 0.55rem;
  }
  .chapter {
    scroll-margin-top: 5rem;
  }
  .masthead {
    columns: 1;
  }
  .group-ornament {
    width: 50px;
    height: 50px;
  }
  .prizes {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.8rem;
  }
  .prizes--third .prize-entry {
    display: block;
  }
  .prizes--third .prize-more {
    margin-left: 0;
  }
  .prize-art,
  .prizes--leading .prize-art,
  .prizes--third .prize-art {
    height: 190px;
    margin: 0.8rem 0 1rem;
  }
  .prize--first .prize-art {
    height: auto;
    aspect-ratio: 900 / 370;
  }
  .prizes--third .prize-answer {
    margin-top: 0;
  }
  .prizes .prize:not(.prize--first) .prize-answer {
    font-size: 1.333333rem;
  }
}
@media (max-width: 400px) {
  .header {
    padding-top: 2.5rem;
  }
  .contest-name-english {
    font-size: 2rem;
  }
  .contest-name-arabic {
    font-size: 1.5rem;
  }
}
