/* The wordmark's face, vendored beside Leaflet so this page still reaches
   the network for nothing. Latin subset, weight 500 -- the one cut there is,
   so headings, trip names and figures all set in it at that weight and get
   their hierarchy from size. Licence in vendor/space-grotesk-OFL.txt.
   font-display:block rather than swap: served off localhost it arrives in
   milliseconds, and a logo that flips typeface after painting looks broken
   in a way that a few missed frames does not. */
@font-face{font-family:'Space Grotesk';font-style:normal;font-weight:500;
  font-display:block;
  src:url('/vendor/space-grotesk-500.woff2') format('woff2')}

/* A map sheet: cool paper, printed ink, and one colour for the route -- the
   magenta of a Garmin course line, which is where every ride here came from.
   Magenta means the line you rode, and whatever is switched on; brown is the
   contour, kept for climbing; nothing else is coloured unless it is a state.
   Every colour is a token, so the dark theme is a second set of values. */
:root{
  --display:'Space Grotesk',ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;
  --text:ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;
  --paper:#eceeea; --sheet:#fafbf8; --well:#e3e7e1; --field:#ffffff;
  --ink:#17252d; --ink-hover:#2b3d47; --ink-2:#44545b; --muted:#6d7c82;
  --on-ink:#fafbf8;
  --rule:#d6dcd6; --rule-strong:#b8c2bb;
  --route:#b5176f; --route-soft:#f5e1ec; --route-ink:#9c1160;
  --contour:#94643a; --contour-soft:#ecdfd0;
  --ok:#2f6b4f; --ok-soft:#dcebe1;
  --warn:#94660f; --warn-soft:#f4e9d2;
  --bad:#ad3a2d; --bad-soft:#f6e0dc;
  --hut:#6b4423; --hut-soft:#f1e6da; --hut-line:#e0ccb7;
  --tent:#1d6b45; --tent-soft:#e0efe6; --tent-line:#c2dfcf;
  --log:#3c4c53;
}
/* Night: the same sheet under a reading lamp -- a deep blue slate rather
   than black, ink gone pale, and the route lifted so it still burns. */
:root[data-theme="dark"]{
  --paper:#131d24; --sheet:#19252d; --well:#111a20; --field:#111a20;
  --ink:#e3e9e5; --ink-hover:#ffffff; --ink-2:#b5c0bf; --muted:#86959a;
  --on-ink:#131d24;
  --rule:#283740; --rule-strong:#3a4b55;
  --route:#f065b2; --route-soft:#3a1d31; --route-ink:#f58cc6;
  --contour:#d6a674; --contour-soft:#33281d;
  --ok:#7cc49d; --ok-soft:#1c3328;
  --warn:#e0b063; --warn-soft:#342a18;
  --bad:#ef8b7f; --bad-soft:#3a2220;
  --hut:#e2bf9c; --hut-soft:#33281e; --hut-line:#4a3a2b;
  --tent:#8fd3b1; --tent-soft:#1d3329; --tent-line:#2b4a3c;
  --log:#b4c3ca;
}
*{box-sizing:border-box}
[hidden]{display:none !important}
body{margin:0;background:var(--paper);color:var(--ink);min-height:100vh;
  font:15.5px/1.6 var(--text);-webkit-font-smoothing:antialiased}
.wrap{max-width:1140px;margin:0 auto;padding:0 28px 96px}
a{color:var(--route-ink);text-underline-offset:2px}
a:hover{color:var(--route)}
:focus-visible{outline:2px solid var(--route);outline-offset:2px}
.sub{color:var(--muted);font-size:14.5px}

/* ---- the top bar ---------------------------------------------------- */
/* Mark and wordmark, the tabs, and who is signed in, on one rule. The tab
   in view is underlined in route magenta, sitting on that rule. */
.top{display:flex;align-items:flex-end;flex-wrap:wrap;gap:0 30px;
  padding-top:22px;margin-bottom:30px;border-bottom:1px solid var(--rule)}
.brand{margin:0;padding-bottom:13px;
  font:500 27px/1 var(--display);letter-spacing:-.035em}
.brand a,.brand .lockup{display:flex;align-items:center;gap:10px;color:var(--ink);
  text-decoration:none}
/* The logo is drawn in currentColor throughout: the mark takes the route
   colour and the wordmark the ink just by sitting where they sit. */
.brand .mark{height:31px;width:auto;flex:none;color:var(--route)}
.nav{display:flex;gap:2px}
.nav .tab{background:none;border:0;border-radius:0;margin-bottom:-1px;
  padding:8px 10px 14px;font-size:15px;font-weight:600;color:var(--muted);
  border-bottom:2px solid transparent}
.nav .tab:hover{color:var(--ink)}
.nav .tab.on{color:var(--ink);border-bottom-color:var(--route)}
.me{margin-left:auto;padding-bottom:11px;display:flex;align-items:center;gap:10px}
.me .who{color:var(--muted);font-size:14px}
.themebtn .sun{display:none}
:root[data-theme="dark"] .themebtn .sun{display:block}
:root[data-theme="dark"] .themebtn .moon{display:none}
/* The sign-in and profile pages carry the mark alone. */
header.solo .brand{padding-bottom:16px}
.lead{font:500 25px/1.25 var(--display);letter-spacing:-.02em;margin:0 0 18px}
.sechead.first{margin-top:0}
.wrap.signin{padding-top:9vh}

/* ---- controls ------------------------------------------------------- */
button{font:inherit;font-size:14.5px;font-weight:600;border-radius:8px;
  padding:10px 18px;border:1px solid transparent;cursor:pointer;color:inherit;
  transition:background .12s ease}
button:active{transform:translateY(1px)}
button:disabled{opacity:.45;cursor:not-allowed}
.primary{background:var(--ink);color:var(--on-ink)}
.primary:hover:not(:disabled){background:var(--ink-hover)}
.ghost{background:var(--sheet);border-color:var(--rule-strong);color:var(--ink)}
.ghost:hover:not(:disabled){background:var(--well)}
.mini{padding:6px 11px;font-size:13px;border-radius:7px}
button.danger,.danger{color:var(--bad)}
button.danger:hover:not(:disabled){background:var(--bad-soft)}
.iconbtn{width:28px;height:28px;padding:0;display:flex;align-items:center;
  justify-content:center;text-decoration:none;border-radius:7px;
  border:1px solid var(--rule);background:var(--sheet);color:var(--ink-2)}
.iconbtn:hover:not(:disabled){color:var(--route);border-color:var(--rule-strong)}
.iconbtn.on{background:var(--route-soft);border-color:var(--route-soft);color:var(--route)}
.iconbtn svg{width:14px;height:14px}
input[type=text],input[type=email],input[type=password],select{font:inherit;
  font-size:15px;padding:10px 13px;border:1px solid var(--rule-strong);
  border-radius:8px;background:var(--field);color:var(--ink)}
input[type=text]{flex:1;min-width:250px}
input:focus,select:focus{outline:2px solid var(--route-soft);outline-offset:0;
  border-color:var(--route)}
input[type=file]{font:inherit;font-size:14px;color:var(--ink-2)}
input[type=checkbox]{width:16px;height:16px;accent-color:var(--route)}
a.linklike{background:none;border:0;padding:0;font:inherit;color:var(--route-ink);
  cursor:pointer;text-decoration:underline}
a.btnlink{display:inline-flex;align-items:center;text-decoration:none;
  border:1px solid var(--rule-strong);border-radius:7px;font-weight:600;
  color:var(--ink);background:var(--sheet)}
a.btnlink:hover{background:var(--well);color:var(--ink)}
.spin{display:inline-block;width:13px;height:13px;border-radius:50%;
  border:2px solid color-mix(in srgb,var(--on-ink) 35%,transparent);
  border-top-color:var(--on-ink);animation:s .7s linear infinite;
  vertical-align:-2px;margin-right:8px}
.spin.dark{border-color:var(--rule-strong);border-top-color:var(--route);
  width:11px;height:11px;margin-right:6px}
@keyframes s{to{transform:rotate(360deg)}}

/* ---- surfaces and type ---------------------------------------------- */
.card{background:var(--sheet);border:1px solid var(--rule);border-radius:10px}
.panel{padding:24px 26px;margin-bottom:18px}
.row{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.stack{display:flex;flex-direction:column;gap:12px}
.narrow{max-width:440px}
h2{font:500 21px/1.25 var(--display);letter-spacing:-.015em;margin:0 0 12px}
.sechead{display:flex;align-items:baseline;gap:16px;margin:64px 0 16px;
  font-size:25px}
.sechead .hcount{margin-left:auto;font:14px var(--text);color:var(--muted);
  letter-spacing:0}
label.field{display:flex;flex-direction:column;gap:6px;font-size:13.5px;
  color:var(--ink-2);font-weight:600}
.hint{color:var(--muted);font-size:14px;margin-top:10px;max-width:68ch}
.hint code,code{background:var(--well);padding:1px 6px;border-radius:5px;font-size:13px}
details.hint summary{cursor:pointer;color:var(--ink);font-weight:600}
ol.steps{margin:10px 0 0;padding-left:22px;display:flex;flex-direction:column;gap:10px}
a.bookmarklet{display:inline-block;margin-left:6px;text-decoration:none;
  border:1px solid var(--rule-strong);border-radius:7px;font-weight:600;
  color:var(--ink);cursor:grab}
.msg{font-size:14px;color:var(--muted);min-height:1.2em}
.msg.bad{color:var(--bad)}
.msg.good{color:var(--ok)}
.empty{padding:44px 28px;text-align:center;color:var(--muted)}
.empty b{color:var(--ink);font-weight:600}
.pill{display:inline-block;padding:2px 9px;border-radius:999px;font-size:12.5px;
  font-weight:600;background:var(--ok-soft);color:var(--ok)}
.pill.warn{background:var(--warn-soft);color:var(--warn)}
.pill.bad{background:var(--bad-soft);color:var(--bad)}
.tag{display:inline-block;padding:0 7px;border-radius:999px;font-size:11.5px;
  font-weight:600;background:var(--warn-soft);color:var(--warn);vertical-align:1px}
.owner{color:var(--muted);font-size:13px}
.linkbox{font:12.5px ui-monospace,Menlo,Consolas,monospace;word-break:break-all;
  background:var(--well);padding:6px 9px;border-radius:7px;color:var(--ink);
  flex:1;min-width:0}
.scrollx{overflow-x:auto}

/* ---- the status strip ----------------------------------------------- */
/* What a sync would change, in one line: Garmin's state, the counts, the
   ride days still waiting for a trip, and the button. The output opens
   under it. */
.status{background:var(--sheet);border:1px solid var(--rule);border-radius:10px;
  padding:10px 10px 10px 18px;margin-bottom:46px}
.statusrow{display:flex;align-items:center;gap:8px 18px;flex-wrap:wrap}
.meta{display:flex;align-items:center;gap:4px 20px;flex-wrap:wrap;
  margin-right:auto;font-size:14px;color:var(--ink-2)}
.meta b{color:var(--ink);font-weight:600}
.gstate{display:inline-flex;align-items:center;gap:8px;font-weight:600;color:var(--ok)}
.gstate i{width:8px;height:8px;border-radius:50%;background:currentColor}
.gstate.warn{color:var(--warn)}
.gstate.bad{color:var(--bad)}
.loosejump{font-weight:600}
.status .hint{margin:8px 0 4px}
.logbar{display:flex;align-items:center;gap:8px;margin:8px 0 2px;padding:0;
  background:none;border:0;color:var(--muted);font-size:13px;font-weight:600;
  cursor:pointer;user-select:none}
.logbar:hover{color:var(--ink)}
.logbar .caret{font-size:9px}
pre.log{background:var(--well);border-radius:7px;margin:8px 8px 4px 0;
  padding:14px 16px;font:12.5px/1.6 ui-monospace,Menlo,Consolas,monospace;
  max-height:300px;overflow:auto;white-space:pre-wrap;color:var(--log)}

/* ---- years ---------------------------------------------------------- */
/* A year opens on its own numeral, set large, with what the year added up
   to beside it -- the one place on the page type is allowed to shout. */
section.year{margin-bottom:64px}
section.year:last-child{margin-bottom:0}
.yearhead{display:flex;align-items:flex-end;flex-wrap:wrap;gap:14px 40px;
  margin-bottom:20px;padding-bottom:16px;border-bottom:1px solid var(--rule)}
.yearhead h2{margin:0;font:500 64px/.82 var(--display);letter-spacing:-.055em}
.yearhead h2.word{font-size:40px;line-height:.9;letter-spacing:-.04em}
dl.figs{display:flex;flex-wrap:wrap;gap:10px 28px;margin:0}
dl.figs div{display:flex;flex-direction:column-reverse}
dl.figs dd{margin:0;font:500 23px/1.1 var(--display);letter-spacing:-.02em}
dl.figs dt{font-size:13px;color:var(--muted);line-height:1.3}
dl.figs div[title]{cursor:help}

/* ---- trip tiles ----------------------------------------------------- */
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:18px}
/* An open panel makes its tile tall; its row-mates keep their own height
   rather than stretching into empty tiles beside it. */
.grid:has(.sharing,.editing){align-items:start}
.trip{position:relative;display:flex;flex-direction:column;
  padding:7px 7px 16px}
.trip:hover{border-color:var(--rule-strong)}
.trip.all{grid-column:span 1}
/* The whole tile opens the trip. A stretched link rather than an onclick,
   so middle-click, ctrl-click and "copy link" all still do what they
   should. Inset -1px: inset counts from the padding box, which would leave
   the tile's own border as a dead ring round it. */
a.cardlink{position:absolute;inset:-1px;z-index:1;border-radius:11px}
a.cardlink:focus-visible{outline-offset:2px}
.trip.editing a.cardlink,.trip.sharing a.cardlink{display:none}
/* Just built: ringed in route magenta until the pointer reaches it. */
.trip.fresh{border-color:var(--route);box-shadow:0 0 0 3px var(--route-soft)}
/* The window onto the riding: the route in magenta on the paper's own
   shade, set off where it started, filled where it ended. */
.sil{position:relative;aspect-ratio:16/10;border-radius:6px;background:var(--well);
  overflow:hidden}
.sil svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
.sil path,.lthumb path{fill:none;stroke:var(--route);stroke-linecap:round;
  stroke-linejoin:round}
.sil circle.from,.lthumb circle.from{fill:var(--well);stroke:var(--route)}
.sil circle.to,.lthumb circle.to{fill:var(--route)}
/* The one moment of motion on the page: a shape arriving is drawn, ride by
   ride, the way it was ridden, and its end dot lands after. */
path.draw{
  animation:draw 1s cubic-bezier(.45,.05,.4,1) forwards}
circle.late{opacity:0;animation:land .3s ease-out forwards}
@keyframes draw{to{stroke-dashoffset:0}}
@keyframes land{to{opacity:1}}
.nosil{position:absolute;inset:0;display:flex;align-items:center;
  justify-content:center;color:var(--muted);font-size:12.5px}
/* Shared with you: the shape would be drawn from your own rides, so the
   window says whose trip it is instead. */
.sil.none{display:flex;align-items:center;justify-content:center}
.sil.none .av{width:44px;height:44px;border-radius:50%;display:flex;
  align-items:center;justify-content:center;background:var(--sheet);
  color:var(--ink-2);font:500 20px/1 var(--display)}
/* An overview: its year's trips as small multiples, in the order ridden,
   each as large as they can all be and still fit (--g, worked out by the
   page). Their lines keep one weight whatever size that comes to. */
.sil.sheet{--g:64px;display:flex;flex-wrap:wrap;align-content:center;align-items:center;
  justify-content:center;gap:4px 10px;padding:12px}
.glyph{position:relative;flex:0 0 var(--g);height:var(--g)}
.glyph svg{position:absolute;inset:0;width:100%;height:100%}
.glyph path{fill:none;stroke:var(--route);stroke-width:1.9px;
  vector-effect:non-scaling-stroke;stroke-linecap:round;stroke-linejoin:round}
.glyph circle{display:none}
.sil.sheet .more{flex:0 0 var(--g);height:var(--g);display:flex;
  align-items:center;justify-content:center;
  font-size:13px;color:var(--muted)}
/* Two columns wide once there are two, its window as tall as its
   neighbours' are: two windows and the gap between, over one window's 16:10. */
@media (min-width:700px){
  .trip.all{grid-column:span 2}
  .trip.all .sil{aspect-ratio:37/11}
  /* Alone in its section -- the map of every year -- it takes the row. */
  .trip.all:only-child{grid-column:1 / -1}
  .trip.all:only-child .sil{aspect-ratio:56/11}
}
.trip .head{padding:13px 9px 0}
/* The name and dates, and beside them the buttons that change the trip,
   raised above the tile's stretched link. */
.trip .head.split{display:flex;align-items:flex-start;gap:10px}
.htext{flex:1;min-width:0}
.trip .cardacts{position:relative;z-index:2;flex:none;display:flex;gap:4px;
  margin:-1px -2px 0 0}
.trip h3{margin:0;font:500 18.5px/1.25 var(--display);letter-spacing:-.015em}
.trip .when{color:var(--muted);font-size:13.5px;margin-top:3px}
.trip.busy .when{color:var(--route-ink)}
.nums{display:flex;flex-wrap:wrap;align-items:center;gap:4px 16px;
  padding:10px 9px 0;margin-top:auto;font-size:13.5px;color:var(--muted)}
.nums b{color:var(--ink);font-weight:600;font-size:15px}
.nums span{display:inline-flex;align-items:center;gap:4px;white-space:nowrap}
.nums .up b{color:var(--contour)}
.nums svg{width:15px;height:15px;color:var(--muted);flex:none}
/* Figures that stand alone take proportional digits, so a 1 is not set in a
   gap the width of an 8; only the tables' columns line up theirs. The climb's
   mountain sits on the figure's baseline, in a line of text or in a card. */
svg.climb{color:var(--contour)}
.up{white-space:nowrap}
.up svg.climb{width:1.25em;height:1.25em;vertical-align:-.27em;margin-right:.15em}
.nums .up{gap:3px}
.nums .up svg.climb{width:17px;height:17px;margin:-2px 0 0}
.badge{display:inline-flex;align-items:center;gap:5px;font-size:12.5px;
  font-weight:600;color:var(--route-ink)}
.badge svg{width:12px;height:12px;color:inherit}
.links{display:flex;gap:7px;flex-wrap:wrap;align-items:center;padding:12px 9px 0}
.trip > .tripedit,.trip > .tripshare{margin:14px 9px 0}
/* A build under way: the dates give way to the stage it is at, and a bar
   along the foot of the tile steps on at each stage. Waiting its turn,
   the bar sweeps instead. Out of the flow, in the tile's padding. */
.trip .prog{position:absolute;left:16px;right:16px;bottom:7px}
.prog{height:3px;border-radius:2px;background:var(--route-soft);overflow:hidden}
.prog i{display:block;height:100%;border-radius:2px;background:var(--route);
  transition:width .6s ease}
.prog.wait i{width:30% !important;animation:sweep 1.3s ease-in-out infinite}
@keyframes sweep{from{transform:translateX(-100%)}to{transform:translateX(340%)}}
.trip.busy [data-act=rebuild] svg{animation:s 1.1s linear infinite}

/* A running job: what it is doing, how far through, and its bar. Under the
   status line, and in a bar at the foot of the page while changes wait for
   it to finish. */
.wnow{display:flex;align-items:baseline;gap:4px 8px;flex-wrap:wrap;font-size:14px}
.wnow .wdoing{color:var(--ink-2)}
.wnow .wpct{margin-left:auto;font:500 13px var(--display);font-variant-numeric:tabular-nums}
.jobnow{margin:8px 8px 2px 0}
.jobnow .wnow{font-size:13px}
.jobnow .prog{margin-top:5px}
.waitbar{position:fixed;z-index:50;left:50%;bottom:16px;transform:translateX(-50%);
  width:min(520px,calc(100% - 32px));padding:12px 14px 11px;
  background:var(--sheet);border:1px solid var(--rule-strong);border-radius:10px;
  box-shadow:0 8px 28px rgba(0,0,0,.18)}
.waitbar .prog{height:4px;margin:9px 0 2px}
.wfoot{display:flex;align-items:center;gap:12px;margin-top:9px;font-size:13px;
  color:var(--muted)}
.wfoot button{margin-left:auto;flex:none}

/* ---- rides not in a trip -------------------------------------------- */
.loosebox{overflow:hidden}
.loose{display:flex;align-items:center;flex-wrap:wrap;gap:8px 16px;
  padding:10px 14px 10px 10px;border-bottom:1px solid var(--rule)}
.loose:last-child{border-bottom:0}
.lthumb{flex:none;position:relative;width:46px;height:46px;border-radius:6px;
  background:var(--well);overflow:hidden}
.lthumb svg{position:absolute;inset:0;width:100%;height:100%}
.lthumb .nosil{font-size:0}
.lwhat{display:flex;flex-direction:column;line-height:1.35;min-width:0}
.lwhat b{font-weight:600;font-size:15px}
.loose .where{font-size:13.5px;color:var(--ink-2)}
.loose .where.none{color:var(--muted);font-style:italic}
.loose .days{margin-left:auto;color:var(--muted);font-size:13.5px}
.lacts{display:flex;gap:6px;flex-wrap:wrap}
/* A ride that arrived while the page was open: the one thing on the list
   that is news, so it pulses. It stays until a reload or until the ride is
   put in a trip, so stepping away from the tab does not lose it. */
.newtag{display:inline-block;margin-left:8px;padding:0 8px;border-radius:999px;
  font-size:12px;font-weight:700;background:var(--route);color:var(--on-ink);
  vertical-align:1px;animation:ping 1.6s ease-out infinite}
@keyframes ping{0%{box-shadow:0 0 0 0 color-mix(in srgb,var(--route) 70%,transparent)}
  70%,100%{box-shadow:0 0 0 7px transparent}}
.newform{display:flex;gap:9px;align-items:center;flex-wrap:wrap;
  padding:12px 14px;background:var(--well);border-bottom:1px solid var(--rule)}
.newform input[type=text]{min-width:180px;flex:1;padding:7px 11px;font-size:14px}
.hutlab{color:var(--muted);font-size:13.5px;display:flex;align-items:center;gap:7px}
#sharedHead + .grid{margin-bottom:0}

/* ---- the settings panel --------------------------------------------- */
.tripedit{display:flex;flex-direction:column;gap:8px;padding-top:14px;
  border-top:1px solid var(--rule)}
.erow{display:flex;align-items:center;gap:8px;flex-wrap:wrap;
  font-size:13px;color:var(--muted)}
.erow > span:first-child{min-width:76px;color:var(--ink-2);font-weight:600}
.erow.bad{color:var(--bad)}
.erow select,.erow input[type=text]{font-size:13px;padding:5px 8px;flex:1;
  min-width:110px;border-radius:7px}
.erow.train input[type=text]{flex:2}
.erow select.mode{flex:none;min-width:0}
.nights{display:flex;flex-wrap:wrap;gap:5px}
button.night{padding:3px 9px;font-size:12px;font-weight:600;border-radius:999px;
  border:1px solid var(--rule);background:var(--sheet);color:var(--ink)}
button.night.nh{background:var(--hut-soft);color:var(--hut);border-color:var(--hut-line)}
button.night.nt{background:var(--tent-soft);color:var(--tent);border-color:var(--tent-line)}
button.night.nx{color:var(--muted);border-style:dashed}
/* Between "all hut, all tent" and the nights they set. */
.nights i.nsep{width:1px;align-self:stretch;margin:2px 3px;background:var(--rule)}
/* A night before or after the riding: added with a dashed pill at either end,
   taken off again with the x fastened to the outermost one. */
button.night.nadd{border-style:dashed;color:var(--muted);background:none}
button.night.nadd:hover{color:var(--route);border-color:var(--route)}
.nedge{display:inline-flex}
.nedge button.night:first-child{border-top-right-radius:0;border-bottom-right-radius:0}
.nedge button.nx{border-left:0;border-top-left-radius:0;border-bottom-left-radius:0;
  padding:3px 7px;color:var(--muted);border-style:solid}
.nedge button.nx:hover{color:var(--bad);background:var(--bad-soft)}
/* Where a transfer went: a pill with its own x, and the search that sets it. */
.erow .place{display:inline-flex}
.erow .place button:first-child{border-top-right-radius:0;border-bottom-right-radius:0;
  max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.erow .place button + button{border-left:0;border-top-left-radius:0;
  border-bottom-left-radius:0;padding-left:8px;padding-right:8px}
.erow.placefind{padding-left:14px}
.placehits{display:flex;flex-direction:column;margin:-2px 0 2px 14px;
  border:1px solid var(--rule);border-radius:8px;overflow:hidden}
button.placehit{display:flex;flex-direction:column;align-items:flex-start;gap:1px;
  padding:6px 10px;border:0;border-radius:0;background:var(--sheet);
  color:var(--ink);font-size:13px;text-align:left;line-height:1.3}
button.placehit + button.placehit{border-top:1px solid var(--rule)}
button.placehit:hover{background:var(--well)}
button.placehit span{font-weight:400;font-size:12px;color:var(--muted)}

/* ---- sharing -------------------------------------------------------- */
/* A section per way into the map, each a settings row -- tile, name and
   what it means now, a control at the far end -- with whatever that way
   needs indented under the name. */
.trip.sharing .badge{display:none}
.tripshare{border-top:1px solid var(--rule)}
.ssec{padding:14px 0}
.ssec + .ssec{border-top:1px solid var(--rule)}
.ssec:last-child{padding-bottom:2px}
.shead{display:flex;align-items:center;gap:12px}
label.shead{cursor:pointer}
.stile{flex:none;width:32px;height:32px;border-radius:8px;display:flex;
  align-items:center;justify-content:center;background:var(--well);color:var(--muted);
  transition:background .2s ease, color .2s ease}
.stile svg{width:16px;height:16px}
.live .stile{background:var(--route-soft);color:var(--route)}
.stext{flex:1;min-width:0;display:flex;flex-direction:column;line-height:1.4}
.stext b{font-size:14.5px;font-weight:600}
.stext span{font-size:13px;color:var(--muted)}
.sbody{margin:12px 0 0 44px;display:flex;flex-direction:column;gap:10px}
.sacts{display:flex;gap:6px;flex-wrap:wrap}
.sacts .copied{color:var(--ok)}
/* The one link among buttons, dressed as one of them. */
a.sopen{display:inline-flex;align-items:center;justify-content:center;
  padding:0 10px;border:1px solid var(--rule-strong);border-radius:7px;
  background:var(--sheet);color:var(--ink-2)}
a.sopen:hover{background:var(--well);color:var(--route)}
a.sopen svg{width:13px;height:13px}
.snote{font-size:13px;line-height:1.5;color:var(--muted)}
.snote.warn{color:var(--warn)}
.sopt{display:flex;align-items:center;gap:9px;font-size:13.5px;cursor:pointer;
  width:max-content;max-width:100%}
.sopt + .snote{margin-top:-6px}
.switch{flex:none;position:relative;width:36px;height:21px;padding:0;border:0;
  border-radius:999px;background:var(--rule-strong);transition:background .15s ease}
.switch span{position:absolute;top:2px;left:2px;width:17px;height:17px;
  border-radius:50%;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.25);
  transition:transform .15s ease}
.switch[aria-checked="true"]{background:var(--route)}
.switch[aria-checked="true"] span{transform:translateX(15px)}
.switch.sm{width:30px;height:18px}
.switch.sm span{width:14px;height:14px}
.switch.sm[aria-checked="true"] span{transform:translateX(12px)}
.chips{display:flex;flex-wrap:wrap;gap:6px}
.chip{display:inline-flex;align-items:center;gap:7px;padding:3px;
  border-radius:999px;background:var(--well);font-size:13.5px;color:var(--ink)}
.chip .av{width:22px;height:22px;border-radius:50%;display:flex;
  align-items:center;justify-content:center;font-size:11px;font-weight:700;
  background:var(--route-soft);color:var(--route-ink)}
.chip button{width:22px;height:22px;padding:0;font-size:15px;line-height:1;
  border-radius:50%;background:none;color:var(--muted)}
.chip button:hover{color:var(--bad);background:var(--bad-soft)}
.sadd{display:flex;gap:6px}
.sadd input[type=email]{flex:1;min-width:0;padding:6px 11px;font-size:14px;border-radius:7px}
.smsg{font-size:13px;color:var(--bad);padding-bottom:2px}

/* ---- the trip page -------------------------------------------------- */
.trippage-head{margin-bottom:24px}
.trippage-head .back{font-size:14.5px;text-decoration:none;font-weight:600}
.triptitle{font:500 44px/1.02 var(--display);letter-spacing:-.04em;margin:14px 0 6px}
.trippage-head dl.figs{margin-top:18px}
.tripacts{margin-top:18px;gap:8px}
.trippage-head .ghost.on{background:var(--route-soft);border-color:var(--route-soft);
  color:var(--route-ink)}
.tripbuild{display:flex;align-items:center;flex-wrap:wrap;gap:4px 10px;
  margin-top:14px;font-size:13.5px;color:var(--route-ink)}
.tripbuild .prog{width:180px}
/* The settings panel, opened on the trip page rather than on its card. */
.tripeditbox{margin:16px 0 0;padding:16px 18px}
.tripeditbox .tripedit{border-top:0;padding-top:0;max-width:680px}
.tripmap{overflow:hidden;margin-bottom:18px;padding:0}
.tripmap iframe{display:block;width:100%;height:64vh;min-height:380px;border:0}
/* The whole trip's climbing, day by day, in contour brown. */
svg.tripprofile{width:100%;height:170px;display:block}
/* Each day in its map colour (--c, set per day), as the map's legend draws
   it; contour brown for a map built before days carried one. */
svg.tripprofile path.area{fill:var(--c,var(--contour));opacity:.3}
svg.tripprofile path.ln{fill:none;stroke:var(--c,var(--contour));stroke-width:1.6;
  stroke-linejoin:round;vector-effect:non-scaling-stroke}
svg.tripprofile line{stroke:var(--sheet);stroke-width:1.5;vector-effect:non-scaling-stroke}
/* A day picked on the map, or here: it stays, the rest fade. */
svg.tripprofile path[data-date]{cursor:pointer}
svg.tripprofile path.area:hover{opacity:.5}
svg.tripprofile.picked path{opacity:.15}
svg.tripprofile.picked path.area.sel{opacity:.55}
svg.tripprofile.picked path.ln.sel{opacity:1}
#stagePick{font-weight:600;color:var(--ink)}

/* ---- tables --------------------------------------------------------- */
table.users{width:100%;border-collapse:collapse;font-size:14px}
table.users th{text-align:left;color:var(--muted);font-weight:600;font-size:13px;
  padding:8px 10px;border-bottom:1px solid var(--rule-strong)}
table.users td{padding:10px;border-bottom:1px solid var(--rule);vertical-align:middle;
  font-variant-numeric:tabular-nums}
table.users tr:last-child td{border-bottom:0}
table.daytable .leg{color:var(--muted);font-style:italic}
table.daytable tr[data-date]{cursor:pointer}
table.daytable tr[data-date]:hover td{background:var(--well)}
table.daytable tr.sel td,table.daytable tr.sel:hover td{background:var(--route-soft)}
table.daytable td.rides{font-size:13px;color:var(--muted)}
table.daytable tr.rest td{color:var(--muted)}
table.daytable span.night{display:inline-block;padding:1px 8px;border-radius:999px;
  font-size:12px;font-weight:600}
span.night.nh{background:var(--hut-soft);color:var(--hut)}
span.night.nt{background:var(--tent-soft);color:var(--tent)}
ul.uploads{margin:10px 0 0;padding-left:20px;font-size:13.5px}
ul.uploads li.bad{color:var(--bad)}
ul.uploads li.muted{color:var(--muted)}

/* ---- account -------------------------------------------------------- */
/* Forms read down one column at a comfortable measure. */
#view-account{max-width:780px}

/* ---- the demo ------------------------------------------------------- */
/* /demo, for anyone (demo.js): nobody to sign out, no account, no Garmin to
   sync from. A line under the top bar says what it is instead. */
.demo .me [data-act="logout"],.demo .nav [data-view="account"],
.demo #syncBtn,.demo .gstate{display:none}
.demonote{margin:-16px 0 22px;font-size:14px;color:var(--ink-2)}
.demonote b{display:inline-block;margin-right:9px;vertical-align:1px;
  font:500 11.5px/1 var(--display);letter-spacing:.07em;text-transform:uppercase;
  color:var(--route-ink);background:var(--route-soft);padding:4px 7px;border-radius:5px}

@media (max-width:640px){
  .wrap{padding:0 16px 64px}
  .top{gap:0 18px}
  .brand{font-size:24px}
  .brand .mark{height:27px}
  .me .who{display:none}
  .nav{order:3;width:100%}
  .nav .tab{padding:6px 10px 12px}
  .panel{padding:20px 18px}
  .grid{grid-template-columns:1fr}
  input[type=text]{min-width:0}
  .yearhead h2{font-size:52px}
  dl.figs{gap:8px 20px}
  dl.figs dd{font-size:20px}
  .triptitle{font-size:34px}
  .loose .days{margin-left:56px;width:100%}
  .lacts{margin-left:56px}
}
@media (prefers-reduced-motion:reduce){
  .newtag,.prog.wait i,.trip.busy [data-act=rebuild] svg{animation:none}
  .stile,.switch,.switch span{transition:none}
}
