/* Trip planner additions on top of style.css. Run colors follow the North American trail-sign convention. */
:root { --easy: #2f9e44; --inter: #1c6dd0; --adv: #20262c; --exp: #000000; --mixed: #8a5cc2; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --adv: #cfd6dc; --exp: #ffffff; --mixed: #b48ce8; } }
:root[data-theme="dark"] { --adv: #cfd6dc; --exp: #ffffff; --mixed: #b48ce8; }

.controls { grid-template-columns: auto auto auto 1fr; align-items: end; gap: 14px 22px; justify-content: start; }
.ctl { display: grid; gap: 6px; min-width: 0; }
.ctl select { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--fg); max-width: 100%; }
.ctl.chk { display: flex; gap: 8px; align-items: center; font-size: .9rem; }
.ctl.chk input { accent-color: var(--snow); width: 18px; height: 18px; }
.seg { display: inline-flex; flex-wrap: nowrap; border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; background: var(--panel); justify-self: start; }
.seg button { white-space: nowrap; font: 500 .85rem var(--body); border: 0; background: none; color: var(--muted); padding: 6px 12px; border-radius: 999px; cursor: pointer; }
.seg button[aria-checked="true"] { background: var(--snow); color: var(--panel); }
.seg.small button { font-size: .8rem; padding: 5px 10px; }

.planout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 24px; align-items: start; }
.sticky { position: sticky; top: 70px; }
.mapbox.tall { height: min(78vh, 680px); }
.ranked { display: grid; gap: 10px; }

.stay { border: 2px solid var(--snow); border-radius: 10px; padding: 14px 16px; background: var(--panel); display: grid; gap: 8px; }
.stay h3 { font-size: 1.15rem; }
.stay .towns { display: grid; gap: 4px; font-size: .86rem; }
.stay .towns div { display: grid; grid-template-columns: 9em 1fr auto; gap: 8px; align-items: center; }
.stay .towns div.on { font-weight: 600; }
.mini { height: 8px; background: var(--alt); border-radius: 4px; overflow: hidden; }
.mini b { display: block; height: 100%; background: var(--snow); border-radius: 4px; }

.rc { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: grid; gap: 8px; cursor: pointer; text-align: left; font: inherit; color: var(--fg); }
.rc:hover, .rc.on { border-color: var(--snow); }
.rc.on { box-shadow: 0 0 0 1px var(--snow) inset; }
.rc .hd { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.rc .hd h3 { font-size: 1.02rem; }
.rc .rk { font: 600 .8rem var(--mono); color: var(--muted); margin-right: 6px; }
.rc .meta { font-size: .8rem; color: var(--muted); font-family: var(--mono); }
.odds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.odd { display: grid; gap: 1px; }
.odd b { font: 700 1.35rem/1.1 var(--display); font-variant-numeric: tabular-nums; }
.odd b.cold { color: var(--snow); }
.odd b.warm { color: var(--warm); }
.odd span { font-size: .76rem; color: var(--muted); line-height: 1.3; }
.odd i { font-style: normal; font-size: .72rem; color: var(--muted); font-family: var(--mono); }
.diffbar { display: flex; height: 7px; border-radius: 4px; overflow: hidden; background: var(--alt); }
.diffbar span { display: block; height: 100%; }
.why { font-size: .84rem; color: var(--muted); }
.why b { color: var(--fg); font-weight: 600; }

.lg { display: flex; align-items: center; gap: 6px; }
.lg i { width: 18px; height: 4px; border-radius: 2px; display: inline-block; flex: none; }
.lg i.dash { background: repeating-linear-gradient(90deg, #6b7782 0 4px, transparent 4px 7px) !important; height: 3px; }
.snowctl { position: absolute; left: 10px; right: 54px; bottom: 30px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; display: grid; gap: 2px; }
.snowctl[hidden] { display: none; }
.snowctl input, .snowrow input { width: 100%; accent-color: var(--snow); }
.snowctl .lbl b, .snowrow .lbl b { color: var(--fg); font-size: 1rem; text-transform: none; letter-spacing: 0; }
.snowrow { display: grid; gap: 4px; }
#colorby { margin-top: 8px; }

.nowrow { display: grid; grid-template-columns: minmax(0, 1.3fr) auto auto; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: .86rem; }
.nowrow:last-child { border-bottom: 0; }
.nowrow span { font-family: var(--mono); font-size: .8rem; text-align: right; }
.tag { font: 600 .7rem var(--mono); padding: 2px 7px; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em; }
.tag.hi { background: var(--snow-soft); color: var(--snow); }
.tag.lo { background: var(--warm-soft); color: var(--warm); }
#howbody { display: grid; gap: 14px; }
#howbody ul { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }

@media (max-width: 980px) {
  .planout { grid-template-columns: 1fr; }
  .sticky { position: static; order: -1; }
  .mapbox.tall { height: 420px; }
  .controls { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .controls { grid-template-columns: 1fr; }
  .mapbox.tall { height: 360px; }
  .stay .towns div { grid-template-columns: 7.5em 1fr auto; }
  .odd b { font-size: 1.15rem; }
  .top nav a:nth-child(4) { display: none; }
}
.rlabel { font: 600 .72rem var(--body); background: var(--panel); color: var(--fg); border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; cursor: pointer; white-space: nowrap; box-shadow: 0 1px 4px rgba(0,0,0,.18); }
.rlabel.on { background: var(--snow); color: var(--panel); border-color: var(--snow); }
@media (max-width: 560px) {
  .seg { flex-wrap: wrap; border-radius: 12px; }
  .nowrow { grid-template-columns: 1fr auto; gap: 2px 10px; }
  .nowrow > div { grid-column: 1 / -1; }
  .nowrow span { text-align: left; }
  .tag { white-space: nowrap; }
}
.ranktiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.rt { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; display: grid; gap: 1px; cursor: pointer; text-align: left; font: inherit; color: var(--fg); }
.rt:hover, .rt.on { border-color: var(--snow); }
.rt.on { box-shadow: 0 0 0 1px var(--snow) inset; }
.rt b { font: 600 .86rem var(--body); }
.rt span { font: 500 .78rem var(--mono); color: var(--muted); }
.rt em { font: 700 1.1rem var(--display); font-style: normal; color: var(--snow); }
.rt em.lo { color: var(--warm); }
.sw.band { background: var(--snow-soft); border-radius: 2px; }
.sw.med { background: var(--muted); height: 2px; border-radius: 0; }
.sw.analog { background: var(--dot); height: 2px; border-radius: 0; opacity: .7; }
.verdict { font: 600 .72rem var(--mono); padding: 2px 7px; border-radius: 999px; text-transform: uppercase; }
.verdict.big { background: var(--snow-soft); color: var(--snow); }
.verdict.dry { background: var(--warm-soft); color: var(--warm); }
.verdict.mid { background: var(--alt); color: var(--muted); }
@media (max-width: 980px) { .seg { flex-wrap: wrap; border-radius: 12px; } .controls { grid-template-columns: 1fr; } }
.fcard { border: 2px solid var(--snow); }
.fcard h3 { font-size: 1.05rem; line-height: 1.35; }
.fcard .chip { justify-self: start; font: 500 .82rem var(--body); padding: 5px 12px; border-radius: 999px; border: 1px solid var(--snow); background: var(--panel); color: var(--snow); cursor: pointer; }
.fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 4px 14px; font-size: .86rem; }
.fgrid div { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px dashed var(--line); padding: 3px 0; }
.fgrid span { font-family: var(--mono); font-size: .8rem; color: var(--muted); white-space: nowrap; }
.fgrid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.fgrid div { min-width: 0; flex-wrap: wrap; }
