/* Navigation, type, buttons and the light/dark palette are shared with the main site. */
.guides {
  --rule: 1px solid var(--gyde-border);
}

.guides [hidden] {
  display: none !important;
}

.guides :is(section[id], form[id], #sample-weeks, .editor, #builder-error, .calendar h2) {
  scroll-margin-top: 5rem;
}

.guides button, .guides input, .guides select, .guides textarea {
  font: inherit;
}

.guides button, .guides summary, .guides select {
  cursor: pointer;
}

.guides button.btn-secondary {
  background-color: transparent;
}

.guides :is(button, input, select, textarea, summary):focus-visible,
.guides a:focus-visible {
  outline: 2px solid var(--gyde-focus-ring);
  outline-offset: 3px;
}

.guides h2, .guides h1 {
  overflow-wrap: anywhere;
}

.guides .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.guides .site-nav {
  border-bottom: var(--rule);
}

.guides .nav-links .guide-nav {
  display: inline;
  color: var(--gyde-text);
}

.guides .home-footer {
  margin-top: clamp(3rem, 7vw, 6rem);
  border-top: var(--rule);
}

.guides .category, .race-meta, .crumb {
  display: flex;
  align-items: center;
  gap: .65rem;
  color: var(--gyde-text-muted);
  font-size: .9375rem;
}

.guides .category {
  font-weight: 600;
  color: var(--gyde-text);
}

.sun-dot {
  display: inline-block;
  flex: none;
  width: .62rem;
  height: .62rem;
  border-radius: 50%;
  background: var(--gyde-brand);
}

.guides .crumb {
  padding-top: 1.5rem;
  gap: .7rem;
  font-size: .875rem;
}

.crumb a {
  color: inherit;
}

.crumb > span {
  color: var(--gyde-border-strong);
}

.guides .cover {
  display: grid;
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
}

.guides .cover {
  padding-block: clamp(2.75rem, 6vw, 5rem);
}

.cover-copy, .article-hero .hero-copy {
  display: grid;
  justify-items: start;
  align-content: center;
  gap: 1.15rem;
  padding: 0;
}

.cover-copy .actions {
  margin-top: .75rem;
  column-gap: 1.5rem;
}

.coverphoto {
  width: 100%;
  height: auto;
  aspect-ratio: 1.6;
  object-fit: cover;
  object-position: 50% 57%;
  border-radius: var(--gyde-radius-xl);
}

.credit {
  display: block;
  margin-top: .4rem;
  font-size: .75rem;
  line-height: 1.5;
  color: var(--gyde-text-muted);
}

.credit a {
  color: inherit;
}

.catalog, .preview {
  border-top: var(--rule);
  padding-block: clamp(2.5rem, 5vw, 4.25rem);
}

.catalog:has(input[value="10K"]:checked) .race-list a:not([data-distance="10K"]),
.catalog:has(input[value="Half marathon"]:checked) .race-list a:not([data-distance="Half marathon"]),
.catalog:has(input[value="Marathon"]:checked) .race-list a:not([data-distance="Marathon"]) {
  display: none;
}

.sectionhead, .calendar-head, .cta, .share {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.directory {
  display: grid;
  column-gap: clamp(1rem, 5vw, 4rem);
}

.guides .directory {
  margin-top: 1.75rem;
}

.directory a, .line {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-block: 1rem;
  border-bottom: var(--rule);
  text-decoration: none;
  color: var(--gyde-text);
}

.directory a:hover strong, .line:hover, .step-rail a:hover {
  color: var(--gyde-brand-text);
  text-decoration: underline;
  text-underline-offset: .2em;
}

.date-tile {
  display: grid;
  place-content: center;
  min-width: 3.3rem;
  height: 3.55rem;
  background: var(--gyde-surface);
  border: var(--rule);
  border-radius: var(--gyde-radius-md);
  text-align: center;
  line-height: 1.05;
}

.date-tile span {
  font-size: .75rem;
  font-weight: 600;
  color: var(--gyde-text-muted);
}

.date-tile b {
  font-size: 1.45rem;
  font-variant-numeric: tabular-nums;
}

.row-copy {
  display: grid;
  gap: .16rem;
}

.directory strong {
  font-size: 1.1rem;
  font-weight: 650;
}

.row-copy small, .endgrid small, .watch small, .step-rail {
  color: var(--gyde-text-muted);
}

.chevron {
  flex: none;
  display: block;
  width: .55rem;
  height: .55rem;
  border: solid currentColor;
  border-width: 1.7px 1.7px 0 0;
  transform: rotate(45deg);
  margin: 0 .3rem 0 auto;
  color: var(--gyde-text-muted);
}

.article-hero {
  max-width: 56rem;
  padding: clamp(1.3rem, 2.6vw, 2.4rem) 0 clamp(1.6rem, 3.2vw, 2.75rem);
}

.article-hero .display {
  font-size: clamp(2.9rem, 1.5rem + 4.2vw, 4.75rem);
}

.article-hero .hero-copy .lede {
  max-width: 38em;
}

.race-meta {
  font-variant-numeric: tabular-nums;
  gap: .8rem;
  font-weight: 550;
}

.race-meta span {
  border-left: var(--rule);
  padding-left: .8rem;
}

.article-hero .sample-link {
  font-size: .95rem;
}

.watch {
  min-width: 0;
}

.video, .player {
  display: block;
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  overflow: hidden;
  border: 0;
  border-radius: var(--gyde-radius-xl);
  background: var(--gyde-surface-sunken);
  color: var(--gyde-text);
}

.video img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  visibility: hidden;
}

.video img.loaded {
  visibility: visible;
}

.video img[src*="ytimg"] {
  object-position: center;
}

.poster-title {
  position: absolute;
  inset: 0;
  padding: 1.5rem 1.5rem 4.5rem;
  display: grid;
  align-items: center;
  font: 500 clamp(1.25rem, 3vw, 2rem)/1.12 var(--gyde-font-serif);
}

.video img {
  position: relative;
}

.play {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  padding: .65rem 1rem;
  border-radius: 2rem;
  background: #14181b;
  color: #fff;
  font-size: .875rem;
  font-weight: 650;
}

.play i {
  width: 0;
  height: 0;
  border-block: .31rem solid transparent;
  border-left: .5rem solid var(--gyde-daybreak-400);
}

.video:hover .play {
  box-shadow: 0 0 0 2px var(--gyde-daybreak-400);
}

.watch figcaption {
  display: grid;
  gap: .2rem;
  margin-top: .7rem;
}

.watch figcaption > a {
  justify-self: start;
  color: var(--gyde-text);
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
}

.watch figcaption > a:hover {
  text-decoration: underline;
}

.watch figcaption .credit {
  margin-top: .05rem;
}

.reading {
  display: grid;
  gap: clamp(2rem, 7vw, 6rem);
  padding-block: clamp(2.25rem, 5vw, 4.25rem);
  border-top: var(--rule);
}

.contents nav {
  display: grid;
  justify-items: start;
  gap: .85rem;
  margin-top: 1.05rem;
}

.question-menu, .optional-film {
  border-block: var(--rule);
}

.question-menu summary, .optional-film summary {
  display: flex;
  align-items: center;
  gap: .8rem;
  min-height: 3rem;
  list-style: none;
  font-weight: 650;
}

.question-menu summary::-webkit-details-marker, .optional-film summary::-webkit-details-marker {
  display: none;
}

.question-menu summary .chevron, .optional-film summary .chevron {
  transform: rotate(45deg);
}

.question-menu[open] > summary .chevron, .optional-film[open] > summary .chevron {
  transform: rotate(135deg);
}

.question-menu[open] nav {
  margin: .25rem 0 1rem;
}

.contents a {
  color: var(--gyde-text-muted);
  text-decoration: none;
  line-height: 1.4;
}

.contents a:hover, .answer h2 a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .15em;
}

.prose {
  max-width: 68ch;
}

.prose > * + * {
  margin-top: clamp(1.7rem, 3vw, 2.75rem);
}

.answer h2 {
  scroll-margin-top: 5.5rem;
  text-wrap: pretty;
}

.answer h2 a {
  color: inherit;
  text-decoration: none;
}

.answer-source {
  display: inline-block;
  margin-top: .6rem;
  font-size: .9rem;
  color: var(--gyde-text-muted);
  text-underline-offset: .2em;
}

.guides .answer .course-photo { margin: 1rem 0 0; }
.course-photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--gyde-radius-md);
}
.course-photo figcaption { margin-top: .55rem; line-height: 1.45; }
.course-photo small { display: block; margin-top: .25rem; color: var(--gyde-text-muted); }
.course-photo small a { color: inherit; text-underline-offset: .15em; }

.optional-film {
  scroll-margin-top: 5rem;
}

.optional-film summary {
  padding-block: .85rem;
}

.optional-film small {
  display: block;
  margin-top: .2rem;
  font-weight: 450;
  color: var(--gyde-text-muted);
}

.optional-film .watch {
  margin-block: .25rem 1rem;
}

.source-note, .calendar-guide {
  margin-top: .85rem;
  line-height: 1.55;
}

.prose section h2, .endgrid h2, .cta h2, .reviewbox h1, .step-panel h2 {
  font: 500 clamp(1.8rem, 1.4rem + 1.4vw, 2.45rem)/1.13 var(--gyde-font-serif);
  letter-spacing: -.015em;
}

.prose section p {
  margin-top: .6rem;
  font-size: 1.11rem;
  line-height: 1.62;
}

.fact {
  padding: .15rem 0 .15rem 1.1rem;
  border-left: 3px solid var(--gyde-brand);
}

.fact p {
  font: 500 1.45rem/1.28 var(--gyde-font-serif);
}

.fact a {
  display: inline-block;
  margin-top: .5rem;
  font-size: .875rem;
}

.guides .section-intro, .guides .help, .guides .assume, .guides .race-choice {
  color: var(--gyde-text-muted);
}

.guides .section-intro {
  margin-top: .5rem;
  font-size: 1.1rem;
}

.preview-grid {
  display: grid;
  align-items: start;
  gap: 1.5rem;
  margin-top: 1.65rem;
}

.editor, .step-sheet, .samples, .calendar-weeks .week, .reviewbox {
  background: var(--gyde-surface);
  border: var(--rule);
  border-radius: var(--gyde-radius-xl);
}

.editor {
  min-width: 0;
}

.editor > summary, .week > summary, .calendar-weeks .week header {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.editor > summary, .week > summary {
  list-style: none;
}

.editor summary::-webkit-details-marker, .week summary::-webkit-details-marker {
  display: none;
}

.editor > summary {
  padding: 1.15rem 1.4rem;
}

.editor > summary strong {
  display: block;
  font: 500 1.65rem/1.2 var(--gyde-font-serif);
}

.editor > summary small, .week-label small {
  display: block;
  color: var(--gyde-text-muted);
}

.editor > summary .chevron, .week summary .chevron {
  transform: rotate(135deg);
}

.editor[open] > summary .chevron, .week[open] summary .chevron {
  transform: rotate(-45deg);
}

.editor form {
  display: grid;
  gap: 1.1rem;
  padding: 0 1.4rem 1.4rem;
}

.guides .help, .guides .assume, .race-choice, .week-body > p {
  font-size: .94rem;
  line-height: 1.45;
}

.guides .assume {
  margin-bottom: .8rem;
}

.distance-block, .choice-field {
  display: grid;
  gap: .8rem;
}

.measures {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .8rem;
}

.field, .reviewbox label {
  display: grid;
  align-content: end;
  gap: .4rem;
  min-width: 0;
  color: var(--gyde-text);
  font-size: .925rem;
  font-weight: 600;
}

.number-wrap {
  position: relative;
  display: block;
}

.unit-suffix {
  position: absolute;
  right: .85rem;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 500;
  color: var(--gyde-text-muted);
  pointer-events: none;
}

.guides :is(.field, .reviewbox) :is(input:not([type=hidden]), select, textarea) {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: var(--gyde-control-lg);
  border: 1px solid var(--gyde-border-strong);
  border-radius: var(--gyde-radius-md);
  padding: .65rem .9rem;
  background: var(--gyde-surface);
  color: var(--gyde-text);
  font: 500 1.0625rem/1.4 var(--gyde-font-sans);
}

.guides .field .number-wrap input {
  padding-right: 2.8rem;
  appearance: textfield;
  font-variant-numeric: tabular-nums;
}

.number-wrap input::-webkit-inner-spin-button {
  appearance: none;
}

.guides fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.guides legend {
  padding: 0;
  color: var(--gyde-text);
  font-size: .925rem;
  font-weight: 600;
}

.choice-field legend {
  margin-bottom: .5rem;
}

.guides .segments {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  gap: .15rem;
  padding: .2rem;
  background: var(--gyde-surface-sunken);
  border-radius: var(--gyde-radius-md);
}

.segments label, :is(.weekday-picks, .longday-picks) label {
  position: relative;
  display: flex;
  min-width: 0;
}

.segments input, :is(.weekday-picks, .longday-picks) input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}

.segments label span, :is(.weekday-picks, .longday-picks) label span {
  display: grid;
  place-items: center;
  min-height: 2.75rem;
  padding-inline: .9rem;
  border-radius: var(--gyde-radius-sm);
  font-size: .9rem;
  font-weight: 600;
  color: var(--gyde-text-muted);
}

.segments input:checked + span {
  background: var(--gyde-surface);
  color: var(--gyde-text);
  box-shadow: var(--gyde-elevation-1);
}

.segments input:focus-visible + span, :is(.weekday-picks, .longday-picks) input:focus-visible + span {
  outline: 2px solid var(--gyde-focus-ring);
  outline-offset: 1px;
}

.guides .count-picks {
  width: 100%;
  max-width: 21rem;
}

.count-picks label {
  flex: 1;
}

.count-picks label span {
  width: 100%;
  padding-inline: 0;
}

.week {
  min-width: 0;
}

.samples .week + .week {
  border-top: var(--rule);
}

.week summary, .week header {
  padding: 1rem 1.3rem;
}

.week-label {
  display: grid;
  gap: .2rem;
  margin-right: auto;
}

.week-label strong, .guides .week-label h3 {
  font: 650 1.12rem/1.25 var(--gyde-font-sans);
}

.week > summary b, .week header b {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-size: 1rem;
}

.week summary .chevron {
  margin-left: 0;
}

.week-body {
  padding: 0 1.3rem 1rem;
}

.week-body > p {
  color: var(--gyde-text-muted);
  padding-bottom: .6rem;
}

.days {
  padding: 0;
  list-style: none;
}

.days li {
  display: grid;
  grid-template-columns: .6rem minmax(6.2rem, auto) 1fr;
  gap: .65rem;
  align-items: baseline;
  padding-block: .5rem;
  border-top: var(--rule);
  color: var(--gyde-text-muted);
  font-size: .93rem;
}

.days li::before {
  content: "";
  display: block;
  width: .42rem;
  height: .42rem;
  align-self: start;
  margin-top: .49rem;
  border-radius: 50%;
  background: var(--gyde-border);
}

.days .run {
  color: var(--gyde-text);
}

.days .run::before {
  background: var(--gyde-brand);
}

.days .run > span {
  font-weight: 600;
}

.days time {
  font-variant-numeric: tabular-nums;
}

.days small {
  color: var(--gyde-text-muted);
}

.guides .notice {
  margin-block: 1rem;
  padding: .7rem 1rem;
  border-left: 3px solid var(--gyde-brand);
  background: var(--gyde-surface-sunken);
  font-size: .95rem;
}

.cta {
  gap: 1.5rem;
  padding: clamp(1.4rem, 3.5vw, 2.75rem);
  border: var(--rule);
  border-radius: var(--gyde-radius-xl);
  background: var(--gyde-surface);
}

.cta p {
  margin-top: .5rem;
  max-width: 38rem;
  color: var(--gyde-text-muted);
}

.endgrid {
  display: grid;
  gap: 2rem;
  margin-block: 3rem;
}

.endgrid h2 {
  font-size: 1.8rem;
}

.line {
  justify-content: space-between;
  gap: 1rem;
  padding-block: .85rem;
}

.line span {
  color: var(--gyde-brand-text);
}

.endgrid small {
  display: block;
  margin-top: .9rem;
}

.share {
  justify-content: start;
  border-top: var(--rule);
  padding-top: 1rem;
  font-size: .94rem;
}

.link-button {
  background: none;
  border: 0;
  padding: .6rem 0;
  color: var(--gyde-brand-text);
  text-decoration: underline;
  text-underline-offset: .18em;
}

.builder-intro {
  padding-block: clamp(2rem, 4vw, 3.5rem) 2rem;
}

.builder-intro .lede {
  margin-top: .75rem;
}

.walkthrough {
  display: grid;
  gap: 1.3rem;
  max-width: 62rem;
  margin-bottom: 2rem;
}

.walkthrough [data-enhanced] {
  display: none;
}

.walkthrough[data-ready] .step-actions[data-enhanced] {
  display: flex;
}

.walkthrough[data-ready] button[data-enhanced] {
  display: inline-flex;
}

.step-rail ol {
  padding: 0;
  list-style: none;
  display: flex;
}

.step-rail li {
  min-width: 0;
}

.step-rail a {
  display: flex;
  align-items: center;
  gap: .55rem;
  min-height: 2.75rem;
  padding-right: .8rem;
  text-decoration: none;
  color: var(--gyde-text-muted);
  font-size: .94rem;
}

.step-marker {
  flex: none;
  display: grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border: var(--rule);
  border-radius: 50%;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.step-rail [aria-current="step"] {
  color: var(--gyde-text);
  font-weight: 650;
}

.step-rail [aria-current="step"] .step-marker {
  background: var(--gyde-brand);
  border-color: transparent;
  color: var(--gyde-on-brand);
}

.step-sheet {
  padding: clamp(1.15rem, 3.3vw, 2.5rem);
  min-width: 0;
}

.step-panel {
  display: grid;
  gap: 1.1rem;
}

.step-panel + .step-panel {
  margin-top: 2rem;
  border-top: var(--rule);
  padding-top: 1.5rem;
}

.walkthrough[data-ready] .step-panel {
  margin: 0;
  border: 0;
  padding: 0;
}

.step-panel h2 {
  margin-bottom: .3rem;
}

.step-panel h2:focus {
  outline: none;
}

.step-actions {
  display: flex;
  justify-content: flex-end;
  gap: .5rem;
  margin-top: .4rem;
}

.step-actions [data-back] {
  margin-right: auto;
}

.race-choice:empty {
  display: none;
}

/* The dialog enhances the native race field. Both submit the same race slug. */
.race-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--gyde-border-strong);
  border-radius: var(--gyde-radius-md);
  background: var(--gyde-surface);
  color: var(--gyde-text);
  text-align: left;
}

.race-trigger:hover {
  border-color: var(--gyde-brand-text);
}

.race-trigger-copy {
  display: grid;
  gap: .25rem;
}

.race-trigger-copy strong {
  font-size: 1.125rem;
}

.race-trigger-copy small {
  color: var(--gyde-text-muted);
  line-height: 1.45;
}

.race-trigger-action {
  display: flex;
  align-items: center;
  gap: .45rem;
  color: var(--gyde-brand-text);
  font-size: .875rem;
  font-weight: 650;
  white-space: nowrap;
}

.race-trigger-action .chevron {
  width: .43rem;
  height: .43rem;
  margin: 0 .12rem;
  color: inherit;
  transform: rotate(135deg);
}

.custom-fields {
  display: grid;
  gap: 1rem;
}

.race-dialog {
  width: min(34rem, calc(100% - 2rem));
  height: min(38rem, calc(100dvh - 3rem));
  padding: 0;
  color: var(--gyde-text);
  background: var(--gyde-surface);
  border: var(--rule);
  border-radius: var(--gyde-radius-xl);
  overflow: hidden;
}

.race-dialog[open] {
  display: flex;
  flex-direction: column;
}

html:has(.race-dialog[open]) {
  overflow: hidden;
}

.race-dialog::backdrop {
  background: rgb(20 24 27 / 55%);
}

.picker-head, .race-search, .own-race, .race-option {
  display: flex;
  align-items: center;
  gap: .8rem;
}

.picker-head {
  justify-content: space-between;
  padding: 1.1rem 1.15rem .55rem 1.4rem;
}

.guides .picker-head h2 {
  font: 500 1.875rem/1.1 var(--gyde-font-serif);
}

.guides .picker-close {
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--gyde-text-muted);
  font-size: 1.75rem;
}

.picker-close:hover {
  background: var(--gyde-surface-sunken);
}

.race-search {
  margin: 0 1.4rem .8rem;
  padding: 0 .9rem;
  background: var(--gyde-bg);
  border: 1px solid var(--gyde-border-strong);
  border-radius: var(--gyde-radius-md);
}

.race-search:focus-within {
  outline: 2px solid var(--gyde-focus-ring);
  outline-offset: 1px;
}

.race-search input {
  width: 100%;
  min-width: 0;
  min-height: 2.85rem;
  background: transparent;
  color: var(--gyde-text);
  border: 0;
}

.guides .race-search input:focus-visible {
  outline: 0;
}

.search-glass {
  position: relative;
  width: .85rem;
  height: .85rem;
  border: 1.6px solid var(--gyde-text-muted);
  border-radius: 50%;
}

.search-glass::after {
  position: absolute;
  right: -.32rem;
  bottom: -.14rem;
  width: .42rem;
  height: 1.6px;
  background: var(--gyde-text-muted);
  transform: rotate(45deg);
  content: "";
}

.race-options {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: .25rem .75rem;
}

.race-option {
  width: 100%;
  padding: .6rem .65rem;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: var(--gyde-radius-md);
  color: var(--gyde-text);
}

.race-option .date-tile {
  flex: none;
  min-width: 2.7rem;
  height: 2.9rem;
}

.race-option .date-tile b {
  font-size: 1.12rem;
}

.race-option:hover, .race-option:focus-visible {
  background: var(--gyde-bg);
}

.race-option[aria-pressed="true"] {
  background: var(--gyde-brand-subtle);
}

.race-tick {
  margin-left: auto;
  color: var(--gyde-brand-text);
  visibility: hidden;
}

.race-option[aria-pressed="true"] .race-tick {
  visibility: visible;
}

.own-race {
  flex-shrink: 0;
  justify-content: space-between;
  padding: 1.05rem 1.4rem;
  border: 0;
  border-top: var(--rule);
  background: var(--gyde-surface);
  color: var(--gyde-brand-text);
  font-weight: 650;
}

.own-race:hover {
  background: var(--gyde-bg);
}

.guides .picker-status:not(.visually-hidden) {
  padding: .5rem 1.4rem 1.5rem;
  color: var(--gyde-text-muted);
}

.all-week {
  justify-self: start;
}

.all-week:disabled {
  color: var(--gyde-text-muted);
  text-decoration: none;
  cursor: default;
}

.longday-picks {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.longday-picks label {
  min-width: 2.8rem;
}

.longday-picks label span {
  border-radius: var(--gyde-radius-full);
}

.weekday-picks {
  display: grid;
  grid-template-columns: repeat(7,minmax(0,1fr));
  gap: .35rem;
}

:is(.weekday-picks, .longday-picks) label span {
  width: 100%;
  border: var(--rule);
  padding: 0 .15rem;
}

:is(.weekday-picks, .longday-picks) input:checked + span {
  border-color: var(--gyde-brand-text);
  background: var(--gyde-brand-subtle);
  color: var(--gyde-text);
}

.field-error {
  color: var(--gyde-danger);
  font-size: .94rem;
}

.calendar:not(:empty) {
  margin-block: 2rem;
}

.calendar-head {
  padding-block: 1.5rem;
  border-top: var(--rule);
}

.calendar-head .category {
  margin-bottom: .6rem;
}

.calendar-head h2 {
  max-width: 25ch;
}

.calendar-weeks {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
  align-items: start;
}

.reviewbox {
  max-width: 39rem;
  padding: clamp(1.25rem,4vw,2.5rem);
  margin: 2rem auto;
}

.reviewbox h1 {
  margin-block: .5rem 1.2rem;
}

.reviewbox form, .reviewbox label {
  display: grid;
  gap: .75rem;
}

.reviewbox form, .reviewbox p {
  margin-block: .8rem;
}

.reviewbox textarea {
  min-height: 6rem !important;
}

.reviewbox .evidence {
  overflow-wrap: anywhere;
}

@media (min-width: 760px) {
  .cover {
    grid-template-columns: 1.05fr 1fr;
  }
  .directory, .endgrid, .calendar-weeks {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  .reading {
    grid-template-columns: minmax(0,1fr) minmax(14rem,.4fr);
  }
  .reading .prose {
    grid-column: 1;
    grid-row: 1;
  }
  .contents {
    grid-column: 2;
    grid-row: 1;
  }
  .contents .question-menu {
    position: sticky;
    top: 5.5rem;
    border-top: 3px solid var(--gyde-brand);
  }
  .preview-grid {
    grid-template-columns: minmax(0,1.55fr) minmax(18rem,1fr);
    gap: clamp(2rem,4.5vw,4rem);
  }
  .walkthrough {
    grid-template-columns: 13rem minmax(0,1fr);
    gap: 2rem;
  }
  .step-rail ol {
    flex-direction: column;
    gap: .75rem;
  }
  .step-rail li {
    position: relative;
  }
  .step-rail li + li::before {
    content: "";
    position: absolute;
    width: 1px;
    height: 1.4rem;
    background: var(--gyde-border);
    left: .83rem;
    bottom: calc(100% - .5rem);
  }
  .step-rail a {
    gap: .8rem;
  }
  .calendar-head {
    align-items: end;
  }
}

@media (max-width: 759px) {
  .cover {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.65rem;
  }
  .builder-intro:has(+ .walkthrough[data-advanced]) {
    padding-block: 1.5rem .9rem;
  }
  .guides .builder-intro:has(+ .walkthrough[data-advanced]) h1 {
    font-size: 2rem;
  }
  .builder-intro:has(+ .walkthrough[data-advanced]) .lede {
    display: none;
  }
  .preview-grid .editor {
    grid-row: 1;
  }
  .reading {
    border-top: none;
    padding-top: 0;
    gap: 1.5rem;
  }
  .article-hero .hero-copy {
    gap: .7rem;
  }
  .race-list a {
    padding-block: .85rem;
  }
  .distance-filter {
    flex-wrap: wrap;
  }
  .segments.distance-filter span {
    padding-inline: .7rem;
  }
  .guides .nav-links {
    gap: .8rem;
  }
  .step-rail ol {
    justify-content: space-between;
    gap: .25rem;
  }
  .step-rail a {
    flex-direction: column;
    gap: .3rem;
    padding: 0 .35rem;
    font-size: .82rem;
  }
}

@media (max-width: 540px) {
  .race-dialog {
    width: 100%;
    max-width: 100%;
    max-height: min(42rem, 85dvh);
    margin: auto 0 0;
    border-radius: var(--gyde-radius-xl) var(--gyde-radius-xl) 0 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
}

@media (max-width: 440px) {
  .guides .nav-links .guide-nav {
    display: none;
  }
  .guides .actions .btn {
    white-space: normal;
  }
  .guides .cta .actions, .cta .btn {
    width: 100%;
  }
  .weekday-picks, .longday-picks {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
  }
  .guides .measures {
    gap: .6rem;
  }
  .step-sheet .measures .field, .editor .measures .field {
    font-size: .87rem;
  }
}

@media (max-width: 360px) {
  .article-hero .display {
    font-size: 2.4rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .guides *, .guides *::before, .guides *::after {
    transition-duration: 0s !important;
  }
}

@media (scripting: none) {
  .unit-suffix, #print, #copy {
    display: none;
  }
}

@media print {
  .guides .site-nav, .guides .home-footer, .guides .crumb, .builder-intro, .walkthrough, .calendar-head .actions {
    display: none !important;
  }
  .guides {
    background: white;
    color: black;
  }
  .guides .wrap {
    max-width: none;
    padding: 0;
  }
  .calendar-weeks {
    display: block;
  }
  .calendar-weeks .week {
    break-inside: avoid;
    margin-block: .7rem;
  }
  .calendar-head {
    border: 0;
  }
}
