.section-intro { margin: 0 0 2rem; padding: 1.5rem 0; }
.section-intro > p { max-width: 72ch; }
.section-intro .button { margin: .3rem .5rem .3rem 0; white-space: normal; height: auto; line-height: 1.5; padding: .65rem 1rem; }
.ride-story-link { margin-top: .4rem; font-size: .9em; }
.category-intro { margin: 2.4rem 0 4.8rem; padding: 0; border-top: 0; }
.category-intro-main { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr); gap: 4.8rem; align-items: start; padding: 4rem 0; }
.category-intro-copy:only-child { grid-column: 1 / -1; }
.category-intro .section-eyebrow { color: #8b442a; font-size: 1.2rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 1.28rem; }
.category-intro h1 { margin: 0 0 1.6rem; font-size: clamp(3.84rem, 4.5vw, 6.08rem); line-height: 1.05; letter-spacing: -.045em; }
.category-intro .section-description { max-width: 54ch; margin: 0; color: #53554b; font-size: 1.728rem; line-height: 1.65; }
.section-destinations { display: grid; gap: 1.12rem; }
.page-heading a.section-destination { display: flex; align-items: center; gap: 1.6rem; padding: 1.76rem 1.92rem; color: #2b3026; background: #fffdf8; border: 1px solid #ddd9cd; border-radius: 6px; text-decoration: none; transition: border-color .15s, background .15s; }
.page-heading a.section-destination:hover { border-color: #8b442a; background: #f4eee3; }
.destination-icon { display: grid; place-items: center; flex: 0 0 3.84rem; height: 3.84rem; background: #ede9db; color: #774027; border-radius: 50%; font-size: 1.44rem; }
.section-destination strong { display: block; font-size: 1.6rem; line-height: 1.4; }
.section-destination small { display: block; margin-top: 0.32rem; color: #626456; font-size: 1.36rem; line-height: 1.4; }
.destination-arrow { margin-left: auto; color: #8b442a; font-size: 2rem; }
.section-topics { display: flex; flex-wrap: wrap; align-items: center; gap: 1.28rem 1.92rem; padding: 1.92rem 2.08rem; background: #eeeade; border-radius: 6px; }
.section-topics-label { font-size: 1.28rem; font-weight: 700; color: #53554b; }
.section-topics ul { display: flex; flex-wrap: wrap; gap: 0.8rem; list-style: none; margin: 0; padding: 0; }
.section-topics li { margin: 0; padding: 0; }
.category-intro .section-topics li a { display: flex; align-items: center; min-height: 44px; box-sizing: border-box; padding: 0.72rem 1.28rem; border: 1px solid #d5d0c0; border-radius: 999px; background: #fffdf8; color: #464c3c; font-size: 1.36rem; line-height: 1.4; text-decoration: none; }
.category-intro .section-topics li a:hover { background: #464c3c; color: #fffdf8; border-color: #464c3c; }
.category-intro a.section-all-topics { margin-left: auto; color: #774027; font-size: 1.36rem; font-weight: 600; white-space: nowrap; text-underline-offset: .2em; }
.category-intro a:focus-visible { outline: 3px solid #8b442a; outline-offset: 4px; }
@media (max-width: 700px) {
  .category-intro-main { grid-template-columns: 1fr; gap: 2.4rem; padding: 2.88rem 0; }
  .section-topics { gap: 1.28rem; padding: 1.6rem; }
  .section-topics-label { flex-basis: 100%; }
  .category-intro a.section-all-topics { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { .page-heading a.section-destination { transition: none; } }

/* One page-heading rhythm below the shared navigation divider. */
#content > .page-heading,
.ride-report > header.page-heading {
  display: block;
  width: auto;
  margin: 0 0 4rem;
  padding: 0;
  border: 0;
  color: #292c24;
}
#content > .page-heading h1,
.ride-report > header.page-heading h1 {
  grid-column: auto;
  margin: 0 0 1.6rem;
  font-size: clamp(3.8rem, 4vw, 5.6rem);
  line-height: 1.1;
  letter-spacing: -.04em;
  color: #292c24;
}
.page-heading .section-description {
  max-width: 65ch;
  font-size: 1.8rem;
  line-height: 1.65;
  color: #53554b;
  margin: 0 0 1.6rem;
}
#content > .category-intro .category-intro-main { padding: 0 0 3.2rem; }
.ride-report > header.page-heading p { max-width: 78ch; margin: 0 0 1.6rem; }
.page-heading .heading-link { font-size: 1.6rem; font-weight: 600; text-underline-offset: .3em; }
body > #content.about-page,
body > #content.cycling-videos-page { max-width: none; width: auto; margin: 0; }
.about-page .about-body { box-sizing: border-box; max-width: 90rem; margin: 0 auto; }
.about-page .about-copy { max-width: 90rem; }
@media (max-width: 700px) {
  #content > .page-heading, .ride-report > header.page-heading { margin-bottom: 3.2rem; }
}

/* Report views and topics share the same pill-shaped navigation controls. */
.ride-report .tabs,
.ride-report .subtabs {
  gap: .8rem;
}
.ride-report .tabs > button,
.ride-report .subtabs > button,
.ride-report .unit-toggle > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: .72rem 1.28rem;
  border: 1px solid #d5d0c0;
  border-radius: 999px;
  background: #fffdf8;
  color: #464c3c;
  font-size: 1.36rem;
  font-weight: 500;
  line-height: 1.4;
}
.ride-report .tabs > button:hover,
.ride-report .subtabs > button:hover,
.ride-report .unit-toggle > button:hover {
  border-color: #464c3c;
  background: #eeeade;
}
.ride-report .tabs > button[aria-selected="true"],
.ride-report .subtabs > button[aria-selected="true"],
.ride-report .unit-toggle > button[aria-pressed="true"] {
  border-color: #464c3c;
  background: #464c3c;
  color: #fffdf8;
}
.ride-report .tabs > button:focus-visible,
.ride-report .subtabs > button:focus-visible,
.ride-report .unit-toggle > button:focus-visible {
  outline: 3px solid #8b442a;
  outline-offset: 4px;
}

.ride-report .unit-toggle { display: flex; flex-wrap: wrap; gap: .8rem; }
.ride-report #units[hidden], .ride-report label[for="units"][hidden] { display: none; }

/* Keep the riding log's introduction and data controls together. */
#content > header.page-heading-with-links,
.ride-report > header.page-heading-with-links {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr);
  align-items: start;
  gap: 4.8rem;
  margin-bottom: 3.2rem;
}
.ride-report > header.page-heading .section-description { margin-bottom: 0; }
.ride-report > header.log-controls { display: block; }
.ride-report #snapshot { display: flex; flex-wrap: wrap; align-items: baseline; gap: .6rem 1.6rem; margin: 0 0 1.6rem; font-size: 1.3rem; }
.ride-report #snapshot strong { color: #464c3c; font-weight: 600; }
.ride-report #snapshot .recording-note { color: #626456; }
.log-controlbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.2rem 2rem; padding: 0 0 1.2rem; border-bottom: 1px solid #d5d0c0; }
.ride-report .log-controlbar .tabs { border: 0; margin: 0; padding: 0; }
.ride-report .log-controlbar .toolbar { margin: 0; padding: 0; }
.ride-report .ride-type-label { font-size: 1.3rem; font-weight: 600; color: #626456; margin-right: .4rem; }
.ride-report #main > .subtabs { margin: 1.2rem 0; }
.ride-report #main > .panel { margin-top: 1.2rem; }
@media (max-width: 700px) {
  #content > header.page-heading-with-links,
  .ride-report > header.page-heading-with-links { grid-template-columns: 1fr; gap: 2.4rem; margin-bottom: 3.2rem; }
  .ride-report #snapshot .recording-note { flex-basis: 100%; }
  .ride-report .ride-type-label { flex-basis: 100%; }
}
.ride-report > header.log-controls #snapshot { margin: 0 0 1.6rem; }

/* Ride lists favor readable names and directly comparable distances. */
.ride-report button[hidden] { display: none !important; }
.ride-report .ride-list-table { width: 100%; table-layout: fixed; min-width: 720px; }
.ride-report .ride-list-table th, .ride-report .ride-list-table td { min-width: 0; max-width: none; }
.ride-report .ride-list-table th:nth-child(1), .ride-report .ride-list-table td:nth-child(1) { width: 15%; }
.ride-report .ride-list-table th:nth-child(2), .ride-report .ride-list-table td:nth-child(2) { width: 43%; }
.ride-report .ride-list-table th:nth-child(3), .ride-report .ride-list-table td:nth-child(3) { width: 27%; }
.ride-report .ride-list-table th:nth-child(4), .ride-report .ride-list-table td:nth-child(4) { width: 15%; }
.ride-report .ride-list-table td.number,
.ride-report .ride-list-table th:last-child button { text-align: right; font-variant-numeric: tabular-nums; }
.ride-report .ride-list-table progress { display: none; }
.ride-report .ride-list-scroll { max-height: 70vh; scrollbar-gutter: stable; }
.ride-report .ride-list-table thead { position: sticky !important; top: 0 !important; z-index: 2; }
@media print {
  .ride-report .ride-list-scroll { max-height: none; overflow: visible; }
  .ride-report .ride-list-table thead { position: static !important; }
}

/* A date range lives with the Date column, with its editor in the top layer. */
.ride-report input[hidden] { display: none !important; }
.ride-report .date-filter-trigger { width: 100%; min-height: 38px; padding: .7rem 1rem; border: 1px solid #d5d0c0; border-radius: 5px; text-align: left; font-size: 1.35rem; font-weight: 400; background: #fffdf8; white-space: normal; }
.ride-report .date-filter-trigger.date-filter-active { border-color: #464c3c; color: #464c3c; background: #eeeade; font-weight: 600; }
.ride-report .date-filter-panel { position: fixed; inset: auto; margin: 0; width: min(340px, calc(100vw - 24px)); max-height: calc(100vh - 24px); overflow: auto; box-sizing: border-box; padding: 1.8rem; border: 1px solid #d5d0c0; border-radius: 10px; background: #fffdf8; color: #292c24; box-shadow: 0 10px 35px #292c2426; font-size: 1.4rem; font-weight: 400; line-height: 1.4; white-space: normal; text-align: left; }
.ride-report .date-filter-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.4rem; }
.ride-report .date-filter-heading strong { font-size: 1.7rem; }
.ride-report .date-filter-panel button { width: auto; border: 1px solid #d5d0c0; padding: .7rem 1.2rem; font-weight: 600; text-align: center; }
.ride-report .date-filter-heading button { border: 0; padding: .2rem .7rem; font-size: 2.2rem; line-height: 1; }
.ride-report .date-filter-panel label { display: block; font-size: 1.3rem; font-weight: 600; margin: 0 0 .5rem; }
.ride-report .date-filter-panel select, .ride-report .date-filter-panel input { display: block; width: 100%; min-width: 0; margin: 0; font-size: 1.4rem; font-weight: 400; }
.ride-report .date-filter-panel .date-range-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin: 1.6rem 0 1rem; }
.ride-report .date-filter-panel .date-filter-help { font-size: 1.25rem; color: #626456; margin: 0 0 1.6rem; }
.ride-report .date-filter-error { color: #a42a24; font-size: 1.3rem; }
.ride-report .date-filter-actions { display: flex; justify-content: space-between; gap: 1rem; }
.ride-report .date-filter-actions .date-filter-apply { background: #464c3c; color: #fffdf8; border-color: #464c3c; }
.ride-report .date-filter-panel :focus-visible { outline: 2px solid #8b442a; outline-offset: 2px; }

.ride-report .date-filter-panel .date-year-label { font-size: 1.3rem; font-weight: 600; margin: 0 0 .8rem; }
.ride-report .date-year-choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.ride-report .date-year-choices button { min-height: 38px; padding: .5rem; border-radius: 999px; font-size: 1.3rem; }
.ride-report .date-year-choices button[aria-pressed="true"] { background: #464c3c; color: #fffdf8; border-color: #464c3c; }
.ride-report .date-filter-panel input[aria-invalid="true"] { border-color: #a42a24; }

/* Heading level expresses structure; video cards keep their compact title style. */
.cycling-video-card .cycling-video-title { font-size: 2rem; line-height: 1.35; margin-bottom: 0; }

.page-heading .section-destination:focus-visible { outline: 3px solid #8b442a; outline-offset: 4px; }

.ride-report > header.log-heading { margin-bottom: 2rem; }
