/* The three landing pages (/, /junior, /middle-school) as one leaderboard on notebook paper: photos rise like bars,
   events are rows on a board, rounds are colored bands, the prizes and the season are podiums. Words stay in the
   templates; the shared sections keep their markup, so event.html and join.html (no body.nb) look as they did. */
body.nb {
  --nb-ink: var(--neutral-14, #161412);
  --nb-boxes: linear-gradient(rgba(22,20,18,.1) 1px, transparent 1px), linear-gradient(90deg, rgba(22,20,18,.1) 1px, transparent 1px);
  --nb-boxes-dark: linear-gradient(rgba(250,248,245,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(250,248,245,.07) 1px, transparent 1px);
  --nb-highlight: linear-gradient(transparent 60%, var(--brand-3, #FAD6AC) 60%, var(--brand-3, #FAD6AC) 94%, transparent 94%);
  --nb-tape: rgba(244,171,82,.72);
}
body.nb main { background-image: radial-gradient(rgba(22,20,18,.2) 1.25px, transparent 1.5px); background-size: 24px 24px; background-position: center top; overflow-x: clip; }
body.nb main > .wrap, body.nb .site-top .wrap, body.nb .factline .wrap { max-width: 1280px; }

/* the nav stays on screen; links stop below it */
body.nb .site-top, body.nb.jr header.top { position: sticky; top: 0; z-index: 50; }
body.nb [id] { scroll-margin-top: 76px; }

/* section headings: big, with highlighter */
body.nb .sec { margin-top: 0; padding-top: 88px; }
body.nb .sec-head { max-width: 860px; margin-bottom: 30px; }
body.nb .sec-head h2 { display: inline; font-size: clamp(36px, 5.2vw, 72px); line-height: 1.04; letter-spacing: -.025em; font-weight: 700; }
body.nb .sec-head h2 em { background: var(--nb-highlight); }
body.nb .sec-head p { margin: 16px 0 0; font-size: 18px; max-width: 620px; }
body.nb .fd-h2 em { font-style: normal; background: var(--nb-highlight); }

/* hero: graph paper, one huge headline, photos rising like bars with the climbing line */
.nb-hero, body.nb .fd-hero { background-color: var(--brand-5); background-image: var(--nb-boxes); background-size: 32px 32px; background-position: center top; color: var(--nb-ink); }
.nb-hero { padding-top: 36px; }
.nb-wide { max-width: 1280px; margin: 0 auto; padding: 0 var(--wrap-pad); }
.nb-hero .ov { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.nb-hero .ov img { width: 30px; height: 30px; }
.nb-hero h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(44px, 8.2vw, 112px); line-height: .94; letter-spacing: -.035em; margin: 0; }
.nb-hero h1 span { display: block; font-weight: 500; font-size: clamp(22px, 2.8vw, 36px); line-height: 1.15; letter-spacing: 0; margin-top: 20px; }
.nb-pitch { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; margin-top: 18px; }
.nb-pitch p { flex: 1 1 420px; max-width: 680px; margin: 0; font-size: 18px; }
.nb-pitch .btn { background: var(--nb-ink); color: #FAF8F5; border-color: var(--nb-ink); }

.fd-rise { position: relative; display: flex; align-items: flex-end; gap: 8px; height: 400px; margin-top: 28px; }
.fd-rise > i, .fd-rise > img { flex: 1 1 0; min-width: 0; }
.fd-rise i { display: block; height: 22%; background: var(--nb-ink); }
.fd-rise img { display: block; width: 100%; object-fit: cover; }
.fd-rise .h2 { height: 40%; } .fd-rise .h3 { height: 54%; object-position: 55% center; } .fd-rise .h4 { height: 70%; object-position: 30% center; } .fd-rise .h5 { height: 86%; object-position: 60% center; }
.fd-climb { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 1; }
.fd-climb path { fill: none; stroke: var(--nb-ink); stroke-width: 3; stroke-dasharray: 2 9; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.fd-dot { position: absolute; z-index: 2; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: #FAF8F5; border: 3px solid var(--nb-ink); box-sizing: border-box; }

/* the fact strip: the top of the scoreboard */
body.nb .factline { background-color: var(--nb-ink); background-image: var(--nb-boxes-dark); background-size: 32px 32px; background-position: center top; border-bottom: 0; }

/* events: rows on a board, not a grid of cards */
body.nb #statechips { margin-bottom: 14px; }
body.nb #eventlist { display: block; background-color: var(--nb-ink); background-image: var(--nb-boxes-dark); background-size: 24px 24px; color: #FAF8F5; }
body.nb #eventlist .evcard { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.7fr) minmax(0, 1.3fr) 210px; grid-template-rows: auto auto; align-items: center; gap: 4px 24px; padding: 16px 22px; margin: 0; background: transparent; color: #FAF8F5; border: 0; border-bottom: 1px solid var(--neutral-10, #524B47); border-radius: 0; box-shadow: none; }
body.nb #eventlist .evcard:last-child { border-bottom: 0; }
body.nb #eventlist .ec-head { grid-column: 1; grid-row: 1 / span 2; background: none; color: inherit; padding: 0; border: 0; }
body.nb #eventlist .ec-badge { position: static; display: inline-block; background: var(--brand-5); color: var(--nb-ink); font-size: 14px; font-weight: 700; padding: 3px 8px; margin-bottom: 6px; transform: rotate(-3deg); }
body.nb #eventlist .ec-kicker { display: none; }
body.nb #eventlist .ec-city { font-size: clamp(28px, 3vw, 40px); font-weight: 700; color: inherit; }
body.nb #eventlist .ec-st { opacity: .75; }
body.nb #eventlist .ec-closes { color: var(--brand-5); opacity: 1; font-size: 13px; margin-top: 4px; }
body.nb #eventlist .ec-rows { grid-column: 2; grid-row: 1 / span 2; display: grid; grid-template-columns: 1fr 1.25fr; gap: 12px; color: inherit; padding: 0; }
body.nb #eventlist .ec-row { padding: 0; border: 0; color: inherit; }
body.nb #eventlist .ec-row b { font-size: 19px; }
body.nb #eventlist .ec-row small { opacity: .75; font-size: 12.5px; }
body.nb #eventlist .ec-bands { grid-column: 3; padding: 0; }
body.nb #eventlist .band { background: #FAF8F5; color: var(--nb-ink); border-color: #FAF8F5; opacity: 1; }
body.nb #eventlist .band small { color: var(--nb-ink); opacity: .8; }
body.nb #eventlist .band.full { background: transparent; color: #FAF8F5; border-color: rgba(250,248,245,.5); }
body.nb #eventlist .band.full small { color: #FAF8F5; }
body.nb #eventlist .ec-notes { grid-column: 3; padding: 0; color: inherit; font-size: 13px; }
body.nb #eventlist .ec-notes .muted { opacity: .75; }
body.nb #eventlist .ec-cta { grid-column: 4; grid-row: 1 / span 2; width: 100%; margin: 0; padding: 13px 12px; background: var(--brand-5); color: var(--nb-ink); border: 0; border-radius: 4px; font-family: var(--font-body); font-size: 15px; font-weight: 500; text-align: center; box-sizing: border-box; }
body.nb #eventlist .ec-cta:hover { background: var(--brand-6); }
body.nb #eventlist .ec-cta.alt { background: transparent; color: #FAF8F5; box-shadow: inset 0 0 0 1.5px rgba(250,248,245,.6); }
body.nb #eventlist .evcard.closed { opacity: 1; filter: none; }
body.nb #eventlist .evcard.closed .ec-head, body.nb #eventlist .evcard.closed .ec-rows, body.nb #eventlist .evcard.closed .ec-bands { opacity: .62; }
body.nb .solo-band { margin-top: 14px; }
body.nb .solo-band > div { background: var(--brand-3, #FAD6AC); border: 0; border-radius: 0; padding: 16px 22px; color: var(--nb-ink); font-size: 16px; }

/* rounds: every round on show as a colored band, its photo beside it */
body.nb #rounds { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr); gap: 0; }
body.nb #rounds .sec-head { grid-column: 1 / -1; }
body.nb #rounds .rtiles { display: contents; }
body.nb #rounds .rtile { aspect-ratio: auto; min-height: 190px; pointer-events: none; transform: none; opacity: 1; border: 0; border-radius: 0; }
body.nb #rounds .rtile::before { display: none; }
body.nb #rounds .rtile b { font-size: 30px; font-weight: 700; }
body.nb #rounds .rtile small { font-size: 14px; color: #FAF8F5; }
body.nb #rounds .rpanel, body.nb #rounds .rpanel[hidden] { display: block; margin: 0; padding: 30px 32px; border: 0; border-radius: 0; color: var(--nb-ink); }
body.nb #rounds .rtile.f { order: 1; } body.nb #rounds .rpanel.f { order: 2; background: var(--f); }
body.nb #rounds .rtile.u { order: 3; } body.nb #rounds .rpanel.u { order: 4; background: var(--u); }
body.nb #rounds .rtile.a { order: 5; } body.nb #rounds .rpanel.a { order: 6; background: var(--a); }
body.nb #rounds .rtile.r { order: 7; } body.nb #rounds .rpanel.r { order: 8; background: var(--r); }
body.nb #rounds .rb-pillar { color: var(--nb-ink); font-weight: 700; }
body.nb #rounds .rb-text h3 { font-size: clamp(38px, 4.6vw, 62px); font-weight: 700; letter-spacing: -.025em; }
body.nb #rounds .rb-line { font-size: 17px; }
body.nb #rounds .spec div { background: rgba(255,255,255,.34); }
body.nb #rounds .spec dt, body.nb #rounds .rb-text .muted { color: var(--nb-ink); opacity: 1; }
body.nb .tryit { background-color: #fff; background-image: var(--nb-boxes); background-size: 24px 24px; border: 1.5px solid var(--nb-ink); border-radius: 8px; }
body.nb .tryset .ti-g span { color: var(--nb-ink); font-weight: 500; }

/* how the day works: a staircase of plain icons that climbs to the medals */
.st-pic { display: block; width: 56px; height: 56px; }
body.nb .story li { position: relative; }
body.nb .story .st-n { position: absolute; width: 30px; height: 30px; font-size: 15px; box-shadow: 0 0 0 2px var(--nb-ink); }
@media (min-width: 901px) {
  body.nb .story { align-items: end; gap: 8px; }
  body.nb .story::before { display: none; }
  body.nb .story li { padding: 14px 14px 18px; background-color: var(--brand-3, #FAD6AC); background-image: var(--nb-boxes); background-size: 24px 24px; }
  body.nb .story .st-n { top: -12px; left: 12px; }
  body.nb .story h3 { font-weight: 700; margin-top: 12px; }
  body.nb .story li:nth-child(1) { min-height: 190px; } body.nb .story li:nth-child(2) { min-height: 220px; } body.nb .story li:nth-child(3) { min-height: 250px; }
  body.nb .story li:nth-child(4) { min-height: 280px; } body.nb .story li:nth-child(5) { min-height: 310px; background-color: var(--brand-5); } body.nb .story li:nth-child(6) { min-height: 340px; }
  body.nb .story p { color: var(--nb-ink); }
}
@media (max-width: 900px) {
  body.nb .story { gap: 10px; }
  body.nb .story::before { display: none; }
  body.nb .story li { grid-template-columns: 56px minmax(0, 1fr); padding: 12px; background: #fff; border: 1.5px solid var(--nb-ink); border-radius: 8px; }
  body.nb .story .st-pic { grid-row: span 2; align-self: center; }
  body.nb .story .st-n { top: -8px; left: -8px; }
  body.nb .story h3 { font-weight: 700; margin-top: 2px; }
  body.nb .story p { color: var(--nb-ink); font-size: 15px; }
}

/* photos: prints taped in, stepping up */
body.nb .photoband .pb-grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: end; }
body.nb .photoband figure, body.nb .fd-room-grid figure { position: relative; }
body.nb .photoband figure { margin: 0; background: #fff; border: 8px solid #fff; box-shadow: 0 1px 4px rgba(22,20,18,.22); }
body.nb .photoband figure:nth-child(1) { transform: rotate(-1deg); } body.nb .photoband figure:nth-child(2) { transform: rotate(.6deg); } body.nb .photoband figure:nth-child(3) { transform: rotate(-.5deg); }
body.nb .photoband figure:nth-child(1) img { height: 250px; } body.nb .photoband figure:nth-child(2) img { height: 330px; } body.nb .photoband figure:nth-child(3) img { height: 410px; }
body.nb .photoband figure.ph { grid-column: 1 / -1; margin-top: 8px; transform: none; }
body.nb .photoband figure.ph img { height: 380px; }
body.nb .photoband figcaption { color: var(--nb-ink); padding: 10px 4px 4px; font-weight: 500; font-size: 14px; }
body.nb .photoband figure::before, body.nb .fd-room-grid figure::before { content: ""; position: absolute; z-index: 2; top: -19px; left: 50%; width: 92px; height: 24px; margin-left: -46px; background: var(--nb-tape); transform: rotate(-2deg); pointer-events: none; }

/* what you win: a podium of solid color, the winner's step in the middle */
body.nb .perks { gap: 8px; align-items: end; }
body.nb .perk { background: var(--pc); border: 0; padding: 26px 24px; color: var(--nb-ink); }
body.nb .perk:nth-child(1) { padding-top: 64px; } body.nb .perk:nth-child(2) { padding-top: 118px; }
body.nb .perk h3 { font-size: clamp(28px, 3vw, 40px); font-weight: 700; line-height: 1.02; letter-spacing: -.02em; margin-bottom: 12px; }
body.nb .perk .pk-lead { font-size: 17px; }
body.nb .perk ul { font-size: 15px; color: var(--nb-ink); }
body.nb .perk li::before { background: var(--nb-ink); }

/* the season: two steps up to the final */
body.nb .stages { gap: 8px; align-items: end; }
body.nb .stg, body.nb .stg.dark { border: 0; padding: 26px 26px 14px; color: var(--nb-ink); background-image: var(--nb-boxes); background-size: 24px 24px; }
body.nb .stg { background-color: var(--brand-3, #FAD6AC); }
body.nb .stg.dark { background-color: var(--brand-5); padding-top: 92px; }
body.nb .stg h3 { font-size: clamp(30px, 3.4vw, 46px); font-weight: 700; letter-spacing: -.02em; }
body.nb .stg-n, body.nb .stg.dark .stg-n { background: var(--nb-ink); color: #FAF8F5; }
body.nb .stg dl > div, body.nb .stg.dark dl > div { border-top-color: rgba(22,20,18,.28); font-size: 16px; }
body.nb .stg dt, body.nb .stg.dark dt { color: var(--nb-ink); font-weight: 700; }

/* the details: heading in the margin, a ruled page beside it */
@media (min-width: 761px) {
  body.nb #faq { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr); gap: 32px; align-items: start; }
  body.nb #faq .sec-head { position: sticky; top: 84px; margin: 0; }
}
body.nb .faq { background-color: #fff; background-image: linear-gradient(90deg, transparent 31px, var(--brand-5) 31px, var(--brand-5) 33px, transparent 33px); border: 1.5px solid var(--nb-ink); border-radius: 8px; padding: 6px 24px 6px 48px; }
body.nb .faq summary { font-size: 20px; font-weight: 500; }
body.nb .faq p { font-size: 16px; color: var(--nb-ink); }

/* the last word: a full gold page */
body.nb .cta-band { margin: 88px calc(50% - 50vw) 0; padding: 56px 0 60px; text-align: left; border-top: 0; color: var(--nb-ink); background-color: var(--brand-5); background-image: var(--nb-boxes); background-size: 32px 32px; background-position: center top; }
body.nb .cta-band .wrap { max-width: 1280px; }
body.nb .cta-band h2 { font-weight: 700; font-size: clamp(46px, 8.2vw, 112px); line-height: .94; letter-spacing: -.035em; margin-bottom: 18px; }
body.nb .cta-band p { margin: 0 0 22px; opacity: 1; font-size: 20px; max-width: none; }
body.nb .cta-band .btn { background: var(--nb-ink); color: #FAF8F5; border-color: var(--nb-ink); }
body.nb .cta-fine { color: var(--nb-ink); font-size: 14px; }

/* diagrams: a sheet of squared paper beside the thing they explain */
.nb-fig { margin: 0; padding: 22px; background-color: #fff; background-image: var(--nb-boxes); background-size: 24px 24px; border: 1.5px solid var(--nb-ink); border-radius: 8px; color: var(--nb-ink); }
.nb-fig svg { display: block; width: 100%; height: auto; }
.nb-fig text { font-family: var(--font-body); font-size: 19px; fill: var(--nb-ink); }
.nb-fig text.b { font-family: var(--font-display); font-weight: 700; font-size: 21px; }
.nb-fig text.big { font-size: 30px; }
.nb-fig text.w { fill: #FAF8F5; }
.nb-fig .ln { fill: none; stroke: var(--nb-ink); stroke-width: 2.5; }
.nb-fig .ln.dash { stroke-dasharray: 3 7; stroke-linecap: round; }
.nb-fig .hd { fill: none; stroke: var(--nb-ink); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.nb-fig figcaption { margin-top: 14px; font-size: 16px; }
.nb-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
body.nb #events > .nb-fig-wide { margin-top: 16px; }
body.nb .stages { margin-top: 16px; }
.nb-fig-flat { padding: 0; margin-top: 14px; background: none; border: 0; max-width: 620px; }
.fd-ico { flex: none; width: 72px; height: 52px; overflow: visible; }
body.nb .fd-season .nb-fig { margin-bottom: 8px; }

/* the feedback box: a button in the corner that opens a small chat */
.nb-fb-open { position: fixed; right: 20px; bottom: 20px; z-index: 40; min-height: 44px; padding: 0 18px; background: var(--nb-ink); color: #FAF8F5; border: 1.5px solid #FAF8F5; border-radius: 4px; font: inherit; font-weight: 500; font-size: 15px; cursor: pointer; }
.nb-fb-open:hover { background: var(--neutral-13); }
.nb-fb { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: flex; flex-direction: column; width: min(360px, calc(100vw - 32px)); background-color: #fff; background-image: var(--nb-boxes); background-size: 24px 24px; border: 1.5px solid var(--nb-ink); border-radius: 8px; box-shadow: 0 8px 24px rgba(22,20,18,.22); color: var(--nb-ink); }
.nb-fb[hidden] { display: none; }
.nb-fb-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 10px 10px 16px; background: var(--nb-ink); color: #FAF8F5; border-radius: 6px 6px 0 0; font-family: var(--font-display); font-weight: 500; font-size: 18px; }
.nb-fb-close { width: 44px; height: 44px; background: none; border: 0; color: inherit; font-size: 24px; line-height: 1; cursor: pointer; }
.nb-fb-log { display: flex; flex-direction: column; gap: 8px; max-height: 240px; overflow-y: auto; padding: 14px 14px 4px; }
.nb-fb-msg { max-width: 86%; padding: 9px 12px; border-radius: 8px; font-size: 15px; line-height: 1.35; white-space: pre-wrap; overflow-wrap: anywhere; }
.nb-fb-msg.us { align-self: flex-start; background: var(--brand-3, #FAD6AC); }
.nb-fb-msg.you { align-self: flex-end; background: var(--nb-ink); color: #FAF8F5; }
.nb-fb form { display: flex; flex-direction: column; gap: 8px; padding: 10px 14px 14px; }
.nb-fb textarea { width: 100%; min-height: 84px; padding: 10px; box-sizing: border-box; background: #fff; border: 1.5px solid var(--nb-ink); border-radius: 4px; font: inherit; font-size: 16px; resize: vertical; }
.nb-fb-trap { position: absolute; left: -9999px; }
.nb-fb .btn { width: 100%; background: var(--brand-5); }

@media (max-width: 760px) {
  .nb-hero { padding-top: 26px; }
  .nb-pitch .btn { width: 100%; }
  .fd-rise { height: 170px; gap: 6px; margin-top: 18px; }
  .fd-rise i, .fd-rise .h2, .fd-climb, .fd-dot { display: none; }
  .fd-rise .h3 { height: 55%; } .fd-rise .h4 { height: 76%; } .fd-rise .h5 { height: 100%; }
  body.nb .sec { padding-top: 56px; }
  .nb-two { grid-template-columns: minmax(0, 1fr); }
  .nb-fig { padding: 12px; }
  .nb-fig text { font-size: 21px; }
  .nb-fig text.b { font-size: 23px; }
  .fd-ico { display: none; }

  body.nb #eventlist .evcard { display: block; padding: 16px; }
  body.nb #eventlist .ec-head { padding-right: 56px; position: relative; }
  body.nb #eventlist .ec-badge { position: absolute; top: 2px; right: 0; margin: 0; }
  body.nb #eventlist .ec-rows { margin-top: 10px; }
  body.nb #eventlist .ec-bands { margin-top: 10px; }
  body.nb #eventlist .ec-notes { margin-top: 10px; }
  body.nb #eventlist .ec-cta { margin-top: 12px; padding: 14px; }

  body.nb #rounds { grid-template-columns: minmax(0, 1fr); }
  body.nb #rounds .rtile { min-height: 170px; }
  body.nb #rounds .rpanel, body.nb #rounds .rpanel[hidden] { padding: 22px 18px 26px; }

  body.nb .photoband .pb-grid3 { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  body.nb .photoband figure { transform: none !important; }
  body.nb .photoband figure img, body.nb .photoband figure.ph img { height: 220px !important; }

  body.nb .perk:nth-child(1), body.nb .perk:nth-child(2) { padding-top: 26px; }
  body.nb .stg.dark { padding-top: 26px; }
  body.nb .faq { padding-left: 40px; background-image: linear-gradient(90deg, transparent 23px, var(--brand-5) 23px, var(--brand-5) 25px, transparent 25px); }
  body.nb .faq summary { font-size: 18px; }
  body.nb .cta-band { margin-top: 56px; padding: 40px 0 44px; }
  body.nb .cta-band .btn { width: 100%; }
}
