/* Cycling Americas — site-wide visual audit pass
 * Five ranked improvements:
 * 1. Compact interior-page hierarchy and vertical rhythm
 * 2. One consistent control/filter surface
 * 3. One restrained card/surface language
 * 4. Consistent reading measure and typography
 * 5. Compact mobile header/navigation
 */

:root{
  --ca-radius:14px;
  --ca-radius-sm:10px;
  --ca-border:#cbdde6;
  --ca-border-soft:#dce8ed;
  --ca-surface:#ffffff;
  --ca-surface-soft:#f7fbfc;
  --ca-surface-blue:#eef7fa;
  --ca-ink:#123e5c;
  --ca-muted:#607887;
  --ca-accent:#146987;
  --ca-shadow-sm:0 3px 12px rgba(12,62,88,.055);
  --ca-shadow-hover:0 10px 24px rgba(12,62,88,.10);
}

/* 1 — Compact interior hierarchy and vertical rhythm */
.pagehero{
  padding:30px 0 24px;
  background:linear-gradient(135deg,#eef7fa 0%,#f7fbfc 72%);
  border-bottom:1px solid var(--ca-border);
}
.pagehero .wrap{
  max-width:1180px;
}
.pagehero h1{
  max-width:900px;
  margin:5px 0 8px;
  font-size:clamp(34px,4.8vw,50px);
  line-height:1.02;
}
.pagehero .muted,
.pagehero> .wrap > p{
  max-width:70ch;
  margin-top:0;
  line-height:1.5;
}
.section{
  padding:38px 0;
}
.section+.section{
  border-top-color:var(--ca-border-soft);
}
.section h2{
  line-height:1.08;
}
.head{
  margin-bottom:15px;
}
.head h2{
  margin-bottom:4px;
}
.field-guides-page>.pagehero{
  padding:21px 0 14px;
}
#selected-guide>.pagehero,
#selected-guide .pagehero{
  padding:22px 0 14px;
}

/* Keep the homepage intentionally more expressive than interior pages. */
.landing-hero,
.hero{
  border-bottom:0;
}

/* 2 — One visual language for controls, filters and scope pickers */
.filters,
.map-filters,
.field-intel-controls,
.qa-scope,
.home-map-controls,
.data-export-controls{
  border:1px solid var(--ca-border);
  border-radius:var(--ca-radius);
  background:var(--ca-surface-soft);
  box-shadow:none;
}
.filters,
.map-filters,
.field-intel-controls,
.home-map-controls{
  padding:12px;
}
.qa-scope{
  padding:13px 14px;
}
.data-export-controls{
  padding:12px;
  margin-top:16px;
}
.field label{
  margin-bottom:5px;
  color:#486779;
  font-size:10px;
  letter-spacing:.09em;
}
.field select,
.field input,
.field textarea,
.field-intel-controls input,
.field-intel-controls select,
.qa textarea{
  min-height:42px;
  border:1px solid #bcd2dc;
  border-radius:9px;
  background:#fff;
  box-shadow:inset 0 1px 0 rgba(15,70,96,.02);
}
.field select:focus,
.field input:focus,
.field textarea:focus,
.field-intel-controls input:focus,
.field-intel-controls select:focus,
.qa textarea:focus{
  outline:3px solid rgba(29,126,162,.15);
  outline-offset:1px;
  border-color:#62a6bd;
}
.map-legend,
.field-intel-note{
  margin-top:12px;
  border:1px solid var(--ca-border-soft);
  border-radius:var(--ca-radius);
  background:#fbfdfe;
  box-shadow:none;
}

/* 3 — Restrained, consistent card/surface system */
.card,
.panel,
.resultcard,
.mapcard,
.resource-card,
.routecard,
.countryrow,
.listrow,
.faq-topic-group,
.field-intel-card,
.contribution-form{
  border:1px solid var(--ca-border);
  border-radius:var(--ca-radius);
  background:var(--ca-surface);
  box-shadow:var(--ca-shadow-sm);
}
.resource-card,
.contribution-form,
.faq-topic-group{
  background:linear-gradient(180deg,#fff 0%,#fbfdfe 100%);
}
.card,
.panel,
.resultcard,
.mapcard,
.listrow,
.field-intel-card{
  padding:16px;
}
.resource-card,
.contribution-form,
.faq-topic-group{
  padding:20px;
}
.routecard{
  overflow:hidden;
}
.click{
  transition:transform .14s ease,border-color .14s ease,box-shadow .14s ease;
}
.click:hover,
.routecard:hover,
.countryrow:hover,
.resource-card:hover{
  transform:translateY(-1px);
  border-color:#99bdcc;
  box-shadow:var(--ca-shadow-hover);
}
.card h3,
.mapcard h3,
.field-intel-card h3{
  margin:4px 0 7px;
  line-height:1.22;
}
.resource-card h2{
  margin:4px 0 8px;
  font-size:clamp(24px,2.4vw,28px);
}
.routecard-body{
  padding:16px;
}
.countryrow{
  padding:12px 14px;
}
.stats{
  gap:8px;
  margin:14px 0;
}
.stat{
  padding:10px 11px;
  border:1px solid #d6e5ea;
  background:#f4f9fb;
}
.stat b{
  font-size:16px;
}

/* Maps should read like primary content, not an oversized bordered widget. */
.map{
  border-radius:var(--ca-radius);
  border-color:#b9d2dd;
  box-shadow:var(--ca-shadow-sm);
}
.maplist{
  margin-top:14px;
}

/* 4 — Consistent reading measure and text hierarchy */
body{
  text-rendering:optimizeLegibility;
}
.pagehero p,
.card p,
.mapcard p,
.resource-card p,
.field-intel-note p,
.qa-page p,
.about p,
.report-main p,
.field-guide-report-main p,
.guide-section p{
  line-height:1.58;
}
.about{
  grid-template-columns:140px minmax(0,720px);
  gap:24px;
  justify-content:start;
}
.about img{
  width:140px;
  height:140px;
  border-radius:16px;
}
.about>div{
  max-width:720px;
}
.resource-card p,
.field-intel-note p,
.map-legend p,
.qa-scope .meta{
  max-width:68ch;
}
.fine,
.meta{
  line-height:1.45;
}
.eyebrow{
  letter-spacing:.12em;
}
.question-chips{
  gap:8px;
}
.question-chips a{
  line-height:1.3;
}
footer{
  margin-top:28px;
  padding:28px 0;
}
footer p{
  max-width:68ch;
}

/* Reduce visual noise in long lists and database-derived surfaces. */
.fact,
.reading-source-list li,
.report-evidence-list article{
  border-color:var(--ca-border-soft);
}
.fact{
  padding:11px 13px;
}
.empty,
.mapfallback{
  border-color:#c9dce4;
  background:#fbfdfe;
}

/* 5 — Mobile header/navigation: one compact row instead of a tall stack */
@media(max-width:850px){
  .topbar{
    min-height:56px;
  }
  .field-practical-nav{
    top:56px;
  }
  .report-main [id],
  .field-guide-report-main [id],
  .field-service-directory,
  .field-service-group{
    scroll-margin-top:112px;
  }
  .navwrap{
    min-height:56px;
    flex-direction:row;
    align-items:center;
    gap:12px;
    padding:0;
  }
  .brand{
    flex:0 0 auto;
    font-size:14px;
  }
  .brand small{
    display:none;
  }
  .nav{
    width:auto;
    min-width:0;
    flex:1 1 auto;
    margin-left:auto;
    gap:2px;
    overflow-x:auto;
    overflow-y:hidden;
    scrollbar-width:none;
    -webkit-overflow-scrolling:touch;
  }
  .nav::-webkit-scrollbar{
    display:none;
  }
  .nav a{
    flex:0 0 auto;
    padding:8px 9px;
    font-size:12px;
  }
  .pagehero{
    padding:24px 0 18px;
  }
  .pagehero h1{
    font-size:clamp(31px,8vw,42px);
  }
  .section{
    padding:30px 0;
  }
  .filters,
  .map-filters,
  .field-intel-controls,
  .home-map-controls,
  .data-export-controls{
    padding:10px;
  }
  .resource-card,
  .contribution-form,
  .faq-topic-group{
    padding:17px;
  }
  .about{
    grid-template-columns:110px minmax(0,1fr);
    gap:18px;
  }
  .about img{
    width:110px;
    height:110px;
  }
  .map{
    height:470px;
  }
}

@media(max-width:560px){
  .wrap{
    width:calc(100% - 28px);
  }
  .brand{
    max-width:118px;
    line-height:1;
  }
  .nav a{
    padding:8px 7px;
    font-size:11.5px;
  }
  .pagehero{
    padding:20px 0 15px;
  }
  .section{
    padding:25px 0;
  }
  .head{
    gap:8px;
  }
  .card,
  .panel,
  .resultcard,
  .mapcard,
  .listrow,
  .field-intel-card{
    padding:14px;
  }
  .about{
    grid-template-columns:1fr;
  }
  .about img{
    width:104px;
    height:104px;
  }
  .map{
    height:430px;
  }
}

@media(prefers-reduced-motion:reduce){
  .click,
  .btn,
  .routecard,
  .countryrow,
  .resource-card{
    transition:none!important;
  }
  .click:hover,
  .btn:hover,
  .routecard:hover,
  .countryrow:hover,
  .resource-card:hover{
    transform:none!important;
  }
}