/* Standalone pages (/tracks/, /rules/, /schedule/): one of the homepage's sections on its own,
   between the navbar and the footer (tools/build-content.mjs sets data-page on the root). On the
   homepage the stages' empty space is taken back out of the flow, since the sections on either
   side run into it (home.css, vertical rhythm). Here there is nothing above, so the section
   starts at the top of the window, and the footer follows it. */
:root[data-page]:not([data-page="home"]) :is(.home__key-features,.home__use-cases[data-schedule-mode="run"]){
  margin-block:0;
  padding-top:0;
}
:root[data-page]:not([data-page="home"]) :is(.home__rules,.home__use-cases:not([data-schedule-mode="run"])){
  padding-block:calc(var(--recreated-section-anchor-offset) + var(--space-heading)) var(--space-section);
}

/* The section fills the window at least, so the footer starts below the fold. */
:root[data-page]:not([data-page="home"]) :is(.home__rules,.home__use-cases){
  box-sizing:border-box;
  min-height:100vh;
  min-height:100svh;
}

/* A page's lead under its heading (build-content.mjs): the palette's lighter tint, so the heading
   alone carries the accent. */
.event-page-lead{color:var(--current-color-20)}

/* The Rules page is for reading: one centred column, narrower than the navbar on a wide screen, that
   the heading and everything under it start on. */
[data-page="rules"]{--reading-column:min(var(--nav-width),60rem)}

/* Rules: a row per rule. What you need to know is the
   loudest thing in the row, and what it is about the quietest:
     label    the rule's title, small capitals in the accent and the system face
     rule     its first paragraph, the rule in a line
     detail   any further paragraphs, a size down and a step quieter
   On a phone the label goes over its rule. The homepage's list keeps its own look (home.css). */
[data-page="rules"] :is(.home__rules,.event-rules-block){
  display:block;
}
[data-page="rules"] .home__rules :is(.section-intro__wrapper,.event-rules){
  margin-inline:auto;
  width:var(--reading-column);
}
[data-page="rules"] .event-rules{
  margin-top:var(--space-heading);
}
[data-page="rules"] .event-rules__item{
  align-items:baseline;
  display:grid;
  gap:var(--stack-pair) 1.5rem;
}
[data-page="rules"] .event-rules__item h3{
  color:var(--current-accent);
  font-size:var(--text-xs);
  font-weight:500;
  letter-spacing:.04em;
  line-height:1.35;
  text-transform:uppercase;
}
[data-page="rules"] .event-rules__item p{
  color:color-mix(in srgb,var(--current-color-10) 66%,var(--current-surface));
  font-size:var(--text-base);
  line-height:1.5;
  margin:0;
  /* one measure for a rule's lead and its notes, in rem, so the smaller notes run out to the same
     edge as the line above them (in em they stopped a fifth short) */
  max-width:44rem;
}
[data-page="rules"] .event-rules__item h3 + p{
  color:var(--current-color-10);
  font-size:var(--text-lg);
  line-height:1.35;
}
@media (min-width:769px){
  [data-page="rules"] .event-rules__item{
    grid-template-columns:9rem minmax(0,1fr);
  }
  [data-page="rules"] .event-rules__item p{
    grid-column:2;
  }
}

/* The sponsors' own rules, if there are any, under the list in the same column: their heading, then
   each track's rules, part by part. */
.event-briefs{
  display:grid;
  margin:var(--space-section) auto 0;
  row-gap:var(--space-heading);
  width:var(--reading-column);
}
.event-briefs h2{
  color:var(--current-color-40);
  font-size:var(--text-3xl);
  letter-spacing:-.04em;
  line-height:.95;
  margin:0;
  text-wrap:balance;
}
.event-briefs__list{
  display:grid;
  gap:var(--space-section);
}
.event-track-rules{
  color:var(--current-color-20);
  /* a link to a track's rules brings them up level with where the headings stand (runtime.js) */
  scroll-margin-top:calc(var(--recreated-section-anchor-offset) + var(--space-heading));
}
.event-track-rules h3{
  font-size:var(--text-2xl);
  letter-spacing:-.04em;
  line-height:.95;
  margin:0;
}
.event-track-rules dl{
  margin:0;
}
.event-track-rules dt{
  color:var(--current-color-40);
  font-size:var(--text-xs);
  letter-spacing:.04em;
  margin-top:var(--stack-action);
  text-transform:uppercase;
}
.event-track-rules dd{
  font-size:var(--text-md);
  line-height:1.3;
  margin:var(--stack-pair) 0 0;
  max-width:68ch;
  text-wrap:pretty;
}
/* A standalone page is for looking things up, so it shows everything at once: the homepage brings
   its tracks and days past one at a time as you scroll. The schedule's heading
   and the tracks' start on the navbar's left edge, the rules' on the reading column's.

   Tracks: the section's heading as the page's, and under it the tracks written out in panels
   (tracks-page.css) where the homepage has its deck. */
[data-page="tracks"] .key-features__sticky{
  box-sizing:border-box;
  height:auto;
  min-height:100vh;
  overflow:clip;
  padding-block:calc(var(--recreated-section-anchor-offset) + var(--space-heading)) var(--space-section);
  position:relative;
}
[data-page="tracks"] .key-features__heading{
  margin-inline:auto;
  position:relative;
  text-align:left;
  inset:auto;
  width:var(--nav-width);
}
/* the mask the heading rises out of; the room at its sides is for the inked edge, and the room
   under the line is the other headings' (section-intro.css), taken back out of the layout */
[data-page="tracks"] .key-features__heading .split-mask{
  margin-bottom:calc(-.2*var(--text-3xl));
  margin-inline:calc(-.25*var(--text-base));
  overflow:clip;
  padding-inline:calc(.25*var(--text-base));
}
[data-page="tracks"] .key-features__heading h2{
  margin-inline:0 auto!important;
  padding-bottom:.2em;
}

/* Schedule: the three days side by side, each one block: its date and name on one line, and its
   agenda, the times in a column of their own. The ribbon, which on the homepage runs between the names and
   the agendas, would part the two here, so it closes the page under the days. On a phone the days
   stack, and the ribbon comes last there too. */
:root[data-page="schedule"]:not([data-page="home"]) .home__use-cases:not([data-schedule-mode="run"]){
  padding-bottom:var(--space-heading);
}
/* in a window taller than the days need, the ribbon stays at the foot of it */
[data-page="schedule"] :is(.home__use-cases,.home__use-cases__wrapper,.home__use-cases__content){
  display:flex;
  flex-direction:column;
}
[data-page="schedule"] :is(.home__use-cases__wrapper,.home__use-cases__content,.event-schedule__track){
  flex:1 0 auto;
}
[data-page="schedule"] .event-schedule__track{
  display:flex;
  flex-direction:column;
}
[data-page="schedule"] .event-schedule__rail{
  margin-top:var(--space-heading);
  order:1;
}
[data-page="schedule"] .event-schedule__rail + .event-schedule__day{
  margin-top:0;
}
[data-page="schedule"] .home__use-cases .section-intro{
  width:100%;
}
[data-page="schedule"] .home__use-cases .section-intro__wrapper{
  margin-inline:auto;
  max-width:none;
  padding-inline:0;
  width:var(--nav-width);
}
[data-page="schedule"] .home__use-cases .section-intro__text p{
  margin-left:calc(-1*var(--sidebearing-display))!important;
}
/* a day's heading is its date and name together: a size down from the homepage's, so the longest
   holds one line in its third of the window */
@media (min-width:769px){
  [data-page="schedule"] .event-schedule__title{
    font-size:var(--text-xl);
  }
}
@media (min-width:769px) and (max-width:1200px){
  [data-page="schedule"] .event-schedule__title{
    font-size:var(--text-lg);
  }
}
[data-page="schedule"] .event-schedule__agenda{
  gap:var(--stack-label);
  grid-auto-columns:auto;
  grid-auto-flow:row;
  justify-content:stretch;
  padding:0;
}
[data-page="schedule"] .event-schedule__agenda li{
  column-gap:var(--text-base);
  display:grid;
  grid-template-columns:9ch minmax(0,1fr);
  list-style:none;
  padding:0;
}
[data-page="schedule"] .event-schedule__what{
  grid-column:2;
}
[data-page="schedule"] .event-schedule__note{
  display:block;
  font-size:var(--text-sm);
  margin-top:calc(var(--stack-pair)/2);
  opacity:.7;
  text-wrap:pretty;
}
[data-page="schedule"] .event-schedule__time{
  color:var(--current-color-40);
  font-family:var(--font-system)!important;
  white-space:nowrap;
}
@media (min-width:769px){
  [data-page="schedule"] .home__use-cases{
    --schedule-rail-height:min(calc(170*var(--dp)),22vh);
  }
  [data-page="schedule"] .event-schedule__track{
    column-gap:var(--space-heading);
    display:grid;
    position:relative;
    grid-template-columns:repeat(var(--schedule-days),minmax(0,1fr));
    grid-template-rows:auto auto minmax(var(--schedule-rail-height),1fr);
  }
  [data-page="schedule"] .event-schedule__rail{
    /* out of the flow, so the days take the columns (home.css, the run's rail) */
    grid-column:1/-1;
    grid-row:3/4;
    height:var(--schedule-rail-height);
    inset:auto 0 0;
    margin-top:0;
    position:absolute;
  }
  [data-page="schedule"] .event-schedule__day{
    display:grid;
    grid-row:1/3;
    grid-template-rows:subgrid;
    margin-top:0;
  }
  [data-page="schedule"] .event-schedule__agenda{
    align-content:start;
    grid-row:2;
    margin-top:0;
    padding-block:calc(1.5*var(--stack-label)) var(--space-heading);
  }
}
/* too narrow for two columns in each of three: the time goes over what happens */
@media (min-width:769px) and (max-width:1100px){
  [data-page="schedule"] .event-schedule__agenda li{
    grid-template-columns:minmax(0,1fr);
    row-gap:calc(var(--stack-pair)/2);
  }
  [data-page="schedule"] .event-schedule__what{
    grid-column:1;
  }
}
/* The goo reaches up out of the closing section, as it does over the homepage's FAQ (home.css,
   --goo-overreach). Here the cards are in the other wrapper, so the closing section's is opened
   at the top, and the cards are stacked over it: a body rising past the section's edge goes on
   whole behind them instead of being cut off flat. */
[data-page="tracks"] .home__bot-hero{
  clip-path:inset(calc(-1*var(--goo-overreach)) 0 calc(-1*var(--goo-overhang)));
}
[data-page="tracks"] .home__top-hero{
  z-index:4;
}
/* ...and none of it shows on the first screen (runtime.js, updateGooArrival) */
:root[data-page]:not([data-page="home"]) [data-gfx-slot="final-goo"] .gfx-live{
  opacity:var(--goo-arrive,0);
}
