/*
 * The Schools Challenge: Competition Results page.
 * Load after screenNEW.css and home.css.
 * The :has() scope distinguishes this page from Entry Forms, which shares body#results.
 * Header, navigation and footer are untouched.
 */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:wght@500;600&display=swap');

body#results:has(.contentfullwidth > a[href="/entryforms.php"]) > #container {
  --tsc-navy:#192b6d;
  --tsc-blue:#2f5caa;
  --tsc-sky:#91c5ed;
  --tsc-pale:#edf6fc;
  --tsc-ink:#172243;
  --tsc-muted:#5e6981;
  --tsc-line:rgba(25,43,109,.16);
  --tsc-serif:'Playfair Display',Georgia,serif;
  --tsc-sans:'DM Sans',Arial,sans-serif;
  box-sizing:border-box;
  width:min(1000px,calc(100% - 2*clamp(18px,4vw,56px)))!important;
  max-width:1000px!important;
  min-height:0!important;
  margin:0 auto!important;
  padding:clamp(42px,6vw,70px) 0 clamp(54px,8vw,86px)!important;
  background:transparent!important;
  color:var(--tsc-ink);
  font:400 16px/1.7 var(--tsc-sans);
  -webkit-font-smoothing:antialiased;
}

body#results:has(.contentfullwidth > a[href="/entryforms.php"]) > #container::before {
  content:'';
  position:fixed;
  z-index:-2;
  inset:0;
  background:linear-gradient(180deg,var(--tsc-pale) 0,#fff 720px);
}

body#results:has(.contentfullwidth > a[href="/entryforms.php"]) > #container *,
body#results:has(.contentfullwidth > a[href="/entryforms.php"]) > #container *::before,
body#results:has(.contentfullwidth > a[href="/entryforms.php"]) > #container *::after { box-sizing:border-box; }

body#results:has(.contentfullwidth > a[href="/entryforms.php"]) #container .contentfullwidth {
  position:relative;
  float:none!important;
  width:100%!important;
  margin:0!important;
  padding:0!important;
}

body#results:has(.contentfullwidth > a[href="/entryforms.php"]) #container h1,
body#results:has(.contentfullwidth > a[href="/entryforms.php"]) #container h2 { color:var(--tsc-navy);font-family:var(--tsc-serif)!important;font-weight:500!important;letter-spacing:-.02em; }

body#results:has(.contentfullwidth > a[href="/entryforms.php"]) #container .contentfullwidth > h1.centeredonsmallscreen {
  max-width:720px;
  margin:0 auto clamp(38px,5vw,58px)!important;
  padding:0!important;
  color:var(--tsc-navy)!important;
  font-size:clamp(2.4rem,5vw,4.1rem)!important;
  line-height:1.08!important;
  text-align:center!important;
}

/* Single page-level shortcut, intentionally styled as a CTA. */
body#results:has(.contentfullwidth > a[href="/entryforms.php"]) #container .contentfullwidth > a:first-child {
  position:relative;
  z-index:3;
  top:auto;
  right:auto;
  display:block;
  width:max-content;
  max-width:100%;
  margin:0 0 22px auto!important;
  color:#fff!important;
  text-decoration:none!important;
}

body#results:has(.contentfullwidth > a[href="/entryforms.php"]) #container .buttonfloatright {
  float:none!important;
  width:auto!important;
  min-width:170px;
  margin:0!important;
  padding:11px 17px!important;
  border:1px solid var(--tsc-blue)!important;
  border-radius:0!important;
  background:var(--tsc-blue)!important;
  color:#fff!important;
  font:600 12px/1.35 var(--tsc-sans)!important;
  letter-spacing:.04em;
  text-align:center!important;
  text-transform:uppercase;
  box-shadow:0 7px 18px rgba(25,43,109,.15);
  transition:background .18s ease,transform .18s ease;
}

body#results:has(.contentfullwidth > a[href="/entryforms.php"]) #container .contentfullwidth > a:first-child:hover .buttonfloatright { background:var(--tsc-navy)!important;transform:translateY(-2px); }
body#results:has(.contentfullwidth > a[href="/entryforms.php"]) #container .contentfullwidth > .clearallclass:first-of-type { display:none!important; }
body#results:has(.contentfullwidth > a[href="/entryforms.php"]) #container .contentfullwidth > br { display:none!important; }
body#results:has(.contentfullwidth > a[href="/entryforms.php"]) #container .contentfullwidth > a[id] { display:block;clear:both;position:relative;top:-15px;height:0;visibility:hidden; }

/* Competition panels */
body#results:has(.contentfullwidth > a[href="/entryforms.php"]) #container .contentfullwidth > h2 {
  clear:both!important;
  width:100%!important;
  margin:0!important;
  padding:clamp(21px,3vw,28px) clamp(22px,3.5vw,34px)!important;
  border:0!important;
  border-top:5px solid var(--tsc-navy)!important;
  background:#fff!important;
  color:var(--tsc-navy)!important;
  font-size:clamp(1.7rem,3vw,2.4rem)!important;
  line-height:1.16!important;
  text-align:left!important;
}

body#results:has(.contentfullwidth > a[href="/entryforms.php"]) #container .contentfullwidth > h2 br { display:none!important; }

body#results:has(.contentfullwidth > a[href="/entryforms.php"]) #container .verticalimageblockleft {
  float:left!important;
  width:285px!important;
  min-height:205px;
  margin:0!important;
  padding:0 0 26px 30px!important;
  background:#fff!important;
}

body#results:has(.contentfullwidth > a[href="/entryforms.php"]) #container .verticalimageblockleft img {
  display:block!important;
  width:100%!important;
  max-width:250px!important;
  height:auto!important;
  margin:0!important;
  border:0!important;
  border-radius:0!important;
  object-fit:cover;
  box-shadow:0 8px 22px rgba(25,43,109,.13);
}

/* Result links: simple editorial rows, not buttons. */
body#results:has(.contentfullwidth > a[href="/entryforms.php"]) #container ul.indent270 {
  width:auto!important;
  min-height:205px;
  margin:0 0 0 285px!important;
  padding:0 clamp(22px,3.5vw,34px) 25px 28px!important;
  background:#fff!important;
  list-style:none!important;
}

body#results:has(.contentfullwidth > a[href="/entryforms.php"]) #container ul.indent270 li {
  position:relative;
  display:flex;
  align-items:center;
  min-height:44px;
  margin:0!important;
  padding:9px 52px 9px 25px!important;
  border-bottom:1px solid var(--tsc-line);
  color:var(--tsc-muted)!important;
  font:400 14px/1.5 var(--tsc-sans)!important;
  list-style:none!important;
}

body#results:has(.contentfullwidth > a[href="/entryforms.php"]) #container ul.indent270 li::marker { content:''!important; }
body#results:has(.contentfullwidth > a[href="/entryforms.php"]) #container ul.indent270 li::before {
  content:'•';
  position:absolute;
  left:3px;
  top:50%;
  color:var(--tsc-blue);
  font:900 1.3rem/1 var(--tsc-sans);
  transform:translateY(-50%);
}

body#results:has(.contentfullwidth > a[href="/entryforms.php"]) #container ul.indent270 li a {
  color:var(--tsc-blue)!important;
  font-weight:600!important;
  text-decoration:none!important;
  text-underline-offset:4px;
}

body#results:has(.contentfullwidth > a[href="/entryforms.php"]) #container ul.indent270 li a:hover { color:var(--tsc-navy)!important;text-decoration:underline!important; }

body#results:has(.contentfullwidth > a[href="/entryforms.php"]) #container ul.indent270 li a[href$=".pdf"]::after,
body#results:has(.contentfullwidth > a[href="/entryforms.php"]) #container ul.indent270 li a[href$=".jpg"]::after,
body#results:has(.contentfullwidth > a[href="/entryforms.php"]) #container ul.indent270 li a:not([href$=".pdf"]):not([href$=".jpg"])::after {
  position:absolute;
  right:4px;
  top:50%;
  padding:2px 6px;
  border:1px solid var(--tsc-line);
  color:var(--tsc-muted);
  font:700 9px/1.3 var(--tsc-sans);
  letter-spacing:.06em;
  transform:translateY(-50%);
}

body#results:has(.contentfullwidth > a[href="/entryforms.php"]) #container ul.indent270 li a[href$=".pdf"]::after { content:'PDF'; }
body#results:has(.contentfullwidth > a[href="/entryforms.php"]) #container ul.indent270 li a[href$=".jpg"]::after { content:'JPG'; }
body#results:has(.contentfullwidth > a[href="/entryforms.php"]) #container ul.indent270 li a:not([href$=".pdf"]):not([href$=".jpg"])::after {
  content:'↗';
  display:flex;
  align-items:center;
  justify-content:center;
  width:25px;
  height:25px;
  padding:0;
  color:var(--tsc-blue);
  font-size:15px;
  line-height:1;
}

/* Pale alternate panels. */
body#results:has(.contentfullwidth > a[href="/entryforms.php"]) #container h2:has(+ .verticalimageblockleft img[src*="April"]),
body#results:has(.contentfullwidth > a[href="/entryforms.php"]) #container .verticalimageblockleft:has(img[src*="April"]),
body#results:has(.contentfullwidth > a[href="/entryforms.php"]) #container .verticalimageblockleft:has(img[src*="April"]) + ul.indent270,
body#results:has(.contentfullwidth > a[href="/entryforms.php"]) #container h2:has(+ .verticalimageblockleft img[src*="Oxford"]),
body#results:has(.contentfullwidth > a[href="/entryforms.php"]) #container .verticalimageblockleft:has(img[src*="Oxford"]),
body#results:has(.contentfullwidth > a[href="/entryforms.php"]) #container .verticalimageblockleft:has(img[src*="Oxford"]) + ul.indent270 { background:var(--tsc-pale)!important; }

body#results:has(.contentfullwidth > a[href="/entryforms.php"]) #container .thicklinedividerformsandrulespage {
  clear:both!important;
  width:100%!important;
  height:24px!important;
  margin:0!important;
  border:0!important;
  background:transparent!important;
}

/* Bottom Entry Forms prompt */
body#results:has(.contentfullwidth > a[href="/entryforms.php"]) #container h1.centered {
  margin:18px 0 20px!important;
  padding:0!important;
  color:var(--tsc-navy)!important;
  font-size:clamp(1.65rem,3vw,2.25rem)!important;
  line-height:1.2!important;
  text-align:center!important;
}

body#results:has(.contentfullwidth > a[href="/entryforms.php"]) #container h1.centered br { display:none!important; }
body#results:has(.contentfullwidth > a[href="/entryforms.php"]) #container .buttoncentered {
  float:none!important;
  width:max-content!important;
  max-width:100%;
  margin:0 auto!important;
  padding:12px 22px!important;
  border:0!important;
  background:var(--tsc-blue)!important;
  color:#fff!important;
  font:600 14px/1.4 var(--tsc-sans)!important;
  text-align:center!important;
}

@media (max-width:700px) {
  body#results:has(.contentfullwidth > a[href="/entryforms.php"]) > #container { width:calc(100% - 30px)!important;padding:36px 0 55px!important; }
  body#results:has(.contentfullwidth > a[href="/entryforms.php"]) #container .contentfullwidth > h1.centeredonsmallscreen { font-size:2.3rem!important; }
  body#results:has(.contentfullwidth > a[href="/entryforms.php"]) #container .contentfullwidth > a:first-child { position:static;display:block;width:max-content;max-width:100%;margin:0 auto 25px!important; }
  body#results:has(.contentfullwidth > a[href="/entryforms.php"]) #container .contentfullwidth > h2 { padding:22px 20px!important; }
  body#results:has(.contentfullwidth > a[href="/entryforms.php"]) #container .verticalimageblockleft { float:none!important;width:100%!important;min-height:0!important;padding:0 20px 20px!important; }
  body#results:has(.contentfullwidth > a[href="/entryforms.php"]) #container .verticalimageblockleft img { width:100%!important;max-width:420px!important;margin:0 auto!important; }
  body#results:has(.contentfullwidth > a[href="/entryforms.php"]) #container ul.indent270 { width:100%!important;min-height:0!important;margin-left:0!important;padding:0 20px 24px!important; }
  body#results:has(.contentfullwidth > a[href="/entryforms.php"]) #container ul.indent270 li { padding-right:48px!important; }
}

@media (prefers-reduced-motion:reduce) {
  body#results:has(.contentfullwidth > a[href="/entryforms.php"]) #container *,body#results:has(.contentfullwidth > a[href="/entryforms.php"]) #container *::before,body#results:has(.contentfullwidth > a[href="/entryforms.php"]) #container *::after { transition:none!important; }
}
