/* /divide/: the Tour Divide kit page. Builds on /style.css. */

:root {
  --measure: 38rem;
  --wide: 52rem;
  --accent: #8a5a2b;   /* dry clay */
  --wash: #f2eee6;
}
@media (prefers-color-scheme: dark) {
  :root { --accent: #d2a26f; --wash: #1d1b19; }
}

body { max-width: var(--wide); }
.col { max-width: var(--measure); }

/* Masthead */

.kicker {
  font-variant-caps: all-small-caps;
  letter-spacing: 0.09em;
  color: var(--accent);
  font-size: 0.95rem;
  margin: 0 0 0.6rem;
}
.kicker a { color: var(--accent); text-decoration: none; }
header h1 {
  font-size: 2.35rem;
  line-height: 1.18;
  max-width: 34rem;
  margin-bottom: 1.2rem;
}
.lede { font-size: 1.08rem; }

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7.4rem, 1fr));
  gap: 0;
  margin: 2.2rem 0 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.facts div { padding: 0.9rem 0.9rem 0.8rem 0; }
.facts b {
  display: block;
  font-weight: normal;
  font-size: 1.45rem;
  line-height: 1.2;
  font-variant-numeric: lining-nums;
}
.facts span {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.35;
  display: block;
  margin-top: 0.2rem;
}

nav.toc { margin-top: 1.6rem; line-height: 2; }
nav.toc a { margin-right: 1rem; white-space: nowrap; }

/* Sections */

section { margin-top: 4rem; }
section > h2 { margin-bottom: 0.4rem; }
h3.title {
  font-size: 1.55rem;
  font-weight: normal;
  line-height: 1.25;
  margin: 0 0 1.1rem;
  max-width: var(--measure);
}
h4 {
  font-size: 1.12rem;
  font-weight: normal;
  font-style: italic;
  margin: 2.6rem 0 0.5rem;
}
.note { font-size: 0.88rem; color: var(--muted); }

/* Principles */

ol.beliefs { list-style: none; padding: 0; margin: 1.6rem 0 0; counter-reset: b; max-width: var(--measure); }
ol.beliefs li {
  counter-increment: b;
  display: grid;
  grid-template-columns: 2.6rem 1fr;
  margin: 0 0 1.5rem;
}
ol.beliefs li::before {
  content: counter(b);
  font-size: 1.7rem;
  line-height: 1.1;
  color: var(--accent);
  font-variant-numeric: oldstyle-nums;
}
ol.beliefs strong { font-weight: normal; font-size: 1.12rem; display: block; margin-bottom: 0.15rem; }
ol.beliefs p { margin: 0; color: var(--muted); }

/* Pull figure */

.figure {
  margin: 2rem 0;
  padding: 1.2rem 1.3rem;
  background: var(--wash);
  border-radius: 3px;
}
.figure p:last-child { margin-bottom: 0; }

/* Bike drawing */

figure.bike { margin: 1.6rem 0 0.4rem; }
figure.bike svg { width: 100%; height: auto; display: block; }
figure.bike figcaption { font-size: 0.85rem; color: var(--muted); margin-top: 0.4rem; }
.bike .line { stroke: var(--ink); fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.bike .thin { stroke: var(--muted); fill: none; stroke-width: 1.2; }
.bike .tire { stroke: var(--ink); fill: none; stroke-width: 7; opacity: 0.9; }
.bike .bag { fill: var(--accent); fill-opacity: 0.2; stroke: var(--accent); stroke-width: 1.5; }
.bike .bag.behind { fill-opacity: 0.1; stroke-dasharray: 4 3; }
.bike .lead { stroke: var(--muted); stroke-width: 0.8; fill: none; }
.bike text { font-family: var(--serif); fill: var(--ink); font-size: 15px; }
.bike text.l { fill: var(--muted); font-size: 13px; }

/* Spec list */

.spec { columns: 2 16rem; column-gap: 2.4rem; margin: 1.4rem 0; padding: 0; list-style: none; font-size: 0.95rem; }
.spec li { break-inside: avoid; margin: 0 0 0.6rem; }
.spec b { font-weight: normal; font-variant-caps: all-small-caps; letter-spacing: 0.05em; color: var(--muted); display: block; line-height: 1.2; }

/* Item rows */

.items { margin: 1rem 0 0; border-top: 1px solid var(--rule); }
.item {
  display: grid;
  grid-template-columns: 1fr 4.6rem;
  column-gap: 1.2rem;
  padding: 0.85rem 0 0.9rem;
  border-bottom: 1px solid var(--rule);
}
.item .name { font-size: 1.02rem; }
.item .why { grid-column: 1; color: var(--muted); font-size: 0.95rem; margin-top: 0.15rem; max-width: var(--measure); }
.item .g {
  grid-column: 2; grid-row: 1;
  text-align: right;
  font-variant-numeric: lining-nums tabular-nums;
  font-size: 0.95rem;
}
.item .g.listed { font-style: italic; color: var(--muted); }
.item .g.none { color: var(--muted); }

details { margin: 0.9rem 0 0; max-width: var(--measure); font-size: 0.95rem; }
details summary {
  cursor: pointer;
  color: var(--accent);
  font-variant-caps: all-small-caps;
  letter-spacing: 0.06em;
  list-style: none;
}
details summary::-webkit-details-marker { display: none; }
details summary::before { content: "+ "; }
details[open] summary::before { content: "\2212  "; }
details ul { margin: 0.6rem 0 0; padding-left: 1.1rem; color: var(--muted); }
details li { margin: 0 0 0.45rem; }

/* Tables */

.table { overflow-x: auto; margin: 1.4rem 0; }
table { border-collapse: collapse; width: 100%; font-size: 0.92rem; font-variant-numeric: lining-nums tabular-nums; }
th, td { text-align: left; vertical-align: top; padding: 0.55rem 1rem 0.55rem 0; border-bottom: 1px solid var(--rule); }
th { font-weight: normal; font-variant-caps: all-small-caps; letter-spacing: 0.06em; color: var(--muted); }
td.n, th.n { text-align: right; white-space: nowrap; }
td:first-child { white-space: nowrap; }
td.wrap { white-space: normal; }

/* Bars */

.bars { margin: 1.4rem 0; font-size: 0.9rem; }
.bar { display: grid; grid-template-columns: 9rem 1fr 4.2rem; align-items: center; column-gap: 0.8rem; margin: 0 0 0.45rem; }
.bar .track { height: 0.7rem; background: var(--wash); border-radius: 2px; overflow: hidden; }
.bar .fill { height: 100%; background: var(--accent); opacity: 0.75; }
.bar .v { text-align: right; font-variant-numeric: lining-nums tabular-nums; }
.bar .k { color: var(--muted); }

/* Ladder */

ol.ladder { list-style: none; padding: 0; margin: 1.2rem 0; max-width: var(--measure); }
ol.ladder li { border-left: 2px solid var(--accent); padding: 0.1rem 0 0.1rem 1rem; margin: 0 0 0.9rem; }
ol.ladder li:last-child { border-left-style: dotted; }
ol.ladder b { font-weight: normal; font-variant-caps: all-small-caps; letter-spacing: 0.06em; color: var(--accent); }

/* Open list */

ul.open { list-style: none; padding: 0; margin: 1rem 0; max-width: var(--measure); }
ul.open li { padding-left: 1.4rem; position: relative; margin: 0 0 0.8rem; }
ul.open li::before { content: "\25CB"; position: absolute; left: 0; color: var(--accent); font-size: 0.8rem; top: 0.25rem; }
ul.open li.done::before { content: "\25CF"; }

@media (max-width: 620px) {
  header h1 { font-size: 1.85rem; }
  .bar { grid-template-columns: 6.5rem 1fr 3.8rem; }
  .item { grid-template-columns: 1fr 3.8rem; }
}
.li { font-weight: normal; font-style: italic; color: var(--ink); }
.items + .col, .items + p { margin-top: 1.4rem; }
