:root {
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color:#183d34;
  background:#f6f7f2;
  font-synthesis:none;
  color-scheme:light;
  --forest:#1c4b3e;
  --muted:#5f7063;
  --line:#dce3d4;
  --paper:#fff;
  --accent:#b27037
}
* {
  box-sizing:border-box
}
body {
  margin:0
}
button,input,select,textarea {
  font:inherit
}
button,.file-button {
  cursor:pointer;
  border:1px solid #cbd5cb;
  border-radius:9px;
  background:#fff;
  color:#254e41;
  padding:10px 14px;
  font-size:.85rem;
  font-weight:650;
  min-height:44px;
  line-height:1.45
}
button:hover,.file-button:hover {
  background:#edf1e8
}
button:disabled {
  opacity:.5;
  cursor:default
}
a {
  color:inherit
}
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,a:focus-visible {
  outline:3px solid var(--accent);
  outline-offset:3px
}
[hidden] {
  display:none!important
}
.skip-link {
  position:absolute;
  top:-100px;
  left:20px;
  padding:12px;
  background:#fff;
  z-index:10
}
.skip-link:focus {
  top:12px
}
header {
  max-width:1240px;
  margin:auto;
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:24px 36px;
  border-bottom:1px solid var(--line);
  gap:16px
}
.brand {
  text-decoration:none;
  font-size:1.5rem;
  font-weight:800;
  letter-spacing:-.04em
}
.brand-caption {
  display:block;
  font-size:.66rem;
  letter-spacing:.015em;
  font-weight:500;
  color:var(--muted);
  margin-top:3px
}
.header-tools {
  display:flex;
  gap:18px;
  align-items:center;
  font-size:.75rem;
  color:#53685c
}
.units {
  display:flex;
  align-items:center;
  gap:8px
}
.units select {
  width:auto;
  padding:8px
}
main {
  max-width:1240px;
  margin:auto;
  padding:0 36px 24px
}
.hero {
  display:flex;
  justify-content:space-between;
  gap:24px;
  align-items:center;
  padding:40px 0 30px;
  overflow:hidden
}
.hero-copy {
  flex:1 1 500px
}
.eyebrow {
  font-size:.67rem;
  letter-spacing:.15em;
  font-weight:750;
  color:#65784f;
  margin:0 0 12px
}
h1 {
  font-size:clamp(2.3rem,5vw,3.6rem);
  letter-spacing:-.055em;
  line-height:1.09;
  margin:0 0 20px;
  font-weight:700
}
.hero-copy>p:not(.eyebrow) {
  font-size:.97rem;
  line-height:1.75;
  color:var(--muted)
}
.hero-actions {
  display:flex;
  gap:15px;
  align-items:center;
  flex-wrap:wrap;
  margin-top:22px
}
.hero-actions button {
  background:#edf1e6
}
.mountain-art {
  width:36%;
  max-width:410px;
  min-width:200px;
  align-self:end
}
.stats {
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:14px;
  margin:0 0 24px
}
.stats article {
  border:1px solid var(--line);
  padding:22px;
  background:#edf1e6;
  border-radius:14px
}
.stats p {
  font-size:.78rem;
  margin:0 0 11px;
  color:var(--muted)
}
.stats strong {
  font-size:clamp(1.4rem,3vw,1.9rem);
  letter-spacing:-.035em;
  overflow-wrap:anywhere
}
.view-nav {
  display:flex;
  gap:6px;
  padding:6px;
  background:#e9eee2;
  border:1px solid var(--line);
  border-radius:12px;
  position:sticky;
  top:0;
  z-index:3;
  scroll-margin-top:12px
}
.view-nav button {
  flex:1;
  border-color:transparent;
  background:transparent;
  color:#52634e;
  white-space:nowrap
}
.view-nav button[aria-pressed=true] {
  background:#fff;
  color:var(--forest);
  border-color:var(--line);
  box-shadow:0 1px 3px #2139210a
}
.view-nav button:hover {
  background:#f8faf3
}
#selection-note {
  margin:12px 2px 20px;
  min-height:20px
}
.workspace {
  display:grid;
  grid-template-columns:310px minmax(0,1fr);
  gap:24px;
  align-items:start
}
.panel {
  background:var(--paper);
  border:1px solid #e0e5db;
  border-radius:15px;
  padding:25px
}
h2 {
  font-size:1.2rem;
  letter-spacing:-.025em;
  margin:0 0 18px;
  line-height:1.35
}
h2[tabindex]:focus {
  outline:none
}
.entry h2 {
  font-size:1.5rem
}
label {
  display:flex;
  flex-direction:column;
  gap:8px;
  font-size:.79rem;
  font-weight:600;
  color:#536559
}
input,select,textarea {
  width:100%;
  min-width:0;
  border:1px solid #d4ddd0;
  border-radius:8px;
  background:#fbfcf9;
  padding:11px;
  color:#193d32;
  min-height:44px
}
textarea {
  resize:vertical;
  line-height:1.6
}
input:disabled,select:disabled,textarea:disabled {
  background:#f0f2eb;
  color:#708273
}
form {
  display:grid;
  gap:17px
}
.form-row {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px
}
.optional {
  font-size:.68rem;
  font-weight:400;
  color:var(--muted);
  margin-top:-5px
}
.primary {
  background:var(--forest);
  color:white;
  border-color:var(--forest);
  margin-top:5px
}
.primary:hover {
  background:#2c6150
}
.hint {
  font-size:.77rem;
  color:var(--muted);
  line-height:1.7
}
.intro {
  font-size:.93rem;
  color:var(--muted);
  line-height:1.8;
  max-width:750px;
  margin:0 0 24px
}
.entry>.hint {
  margin:18px 0 0
}
.journal-column {
  display:grid;
  gap:22px
}
.section-heading {
  display:flex;
  justify-content:space-between;
  gap:14px;
  align-items:center
}
.section-heading h2 {
  margin:0 0 14px
}
.section-heading .eyebrow {
  margin-bottom:7px
}
.progress-grid {
  display:grid;
  grid-template-columns:1.2fr 1fr;
  gap:24px;
  align-items:start
}
.chart {
  display:grid;
  gap:15px;
  padding-top:10px
}
.chart-row {
  display:grid;
  grid-template-columns:80px minmax(30px,1fr) 90px;
  gap:14px;
  align-items:center;
  font-size:.75rem
}
.chart-row strong {
  text-align:right;
  font-weight:600
}
meter {
  width:100%;
  height:18px;
  border:0;
  background:#edf1e8;
  border-radius:5px
}
meter::-webkit-meter-bar {
  background:#edf1e8;
  border:0;
  border-radius:5px
}
meter::-webkit-meter-optimum-value {
  background:#78916a;
  border-radius:5px
}
meter::-moz-meter-bar {
  background:#78916a;
  border-radius:5px
}
.highlight {
  border-top:1px solid var(--line);
  padding-top:16px;
  margin-top:16px
}
.highlight .eyebrow {
  font-size:.6rem
}
.filters {
  display:grid;
  grid-template-columns:1.4fr 1fr 1fr auto;
  gap:10px;
  margin-top:14px;
  align-items:end
}
.filters input {
  font-size:.8rem
}
.hike {
  display:flex;
  justify-content:space-between;
  gap:16px;
  border-top:1px solid #ebeee5;
  padding:19px 0
}
.hike:last-child {
  padding-bottom:0
}
.hike-info {
  min-width:0;
  overflow-wrap:anywhere
}
h3 {
  font-size:1rem;
  margin:0 0 6px;
  line-height:1.5
}
.hike p {
  font-size:.82rem;
  margin:5px 0;
  color:var(--muted)
}
.hike-notes {
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  font-size:.8rem;
  line-height:1.65;
  color:var(--muted);
  border-left:2px solid #d9e0cf;
  padding-left:12px;
  margin:12px 0!important
}
.hike-actions {
  display:flex;
  gap:6px;
  align-items:center;
  flex-shrink:0
}
.hike-actions button {
  font-size:.75rem;
  padding:8px 10px
}
.text-danger {
  color:#995343
}
#empty {
  text-align:center;
  padding:30px 15px;
  color:#687962
}
#empty p {
  font-size:.85rem;
  line-height:1.7
}
.import-panel {
  display:flex;
  flex-wrap:wrap;
  gap:15px;
  align-items:center
}
.import-panel>div {
  flex:1 1 250px
}
.import-panel h2 {
  margin-bottom:5px
}
.import-panel p {
  margin:0
}
.import-panel a {
  font-size:.76rem
}
.file-button {
  position:relative;
  overflow:hidden;
  display:inline-flex;
  justify-content:center;
  align-items:center
}
.file-button input {
  position:absolute;
  inset:0;
  opacity:0;
  cursor:pointer
}
.file-button:focus-within {
  outline:3px solid var(--accent);
  outline-offset:3px
}
.file-button:has(input:disabled) {
  opacity:.5;
  cursor:default
}
.insight {
  border-top:1px solid var(--line);
  padding:18px 0;
  overflow-wrap:anywhere
}
.insight p {
  font-size:.82rem;
  line-height:1.65;
  margin:6px 0
}
.insight strong {
  display:block;
  font-size:.86rem;
  line-height:1.6;
  color:#254e41;
  margin-top:9px
}
.plan-controls {
  grid-template-columns:1fr 1fr auto;
  align-items:end;
  border-bottom:1px solid var(--line);
  padding-bottom:22px;
  max-width:850px
}
.plan-controls button {
  margin:0
}
.route-grid {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(min(100%,270px),1fr));
  gap:16px;
  margin:20px 0 24px
}
.route-card {
  background:#f8faf4;
  border:1px solid var(--line);
  border-radius:12px;
  padding:22px;
  min-width:0;
  overflow-wrap:anywhere
}
.route-time {
  font-size:1.6rem;
  letter-spacing:-.04em;
  display:block;
  margin-top:18px
}
.route-fit,.route-caution {
  font-size:.78rem;
  line-height:1.7;
  padding:10px 12px;
  border-radius:7px;
  background:#e6eedc;
  color:#355337
}
.route-caution {
  background:#f5ead6;
  color:#775129
}
.route-card button {
  width:100%;
  margin-top:8px
}
.gpx-actions {
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom:16px
}
#gpx-preview {
  border-top:1px solid var(--line);
  margin-top:28px;
  padding-top:24px
}
#gpx-sketch {
  width:100%;
  max-height:340px;
  background:#f0f4e9;
  border-radius:12px;
  border:1px solid #dce3d4;
  margin-top:14px
}
#gpx-sketch polyline {
  fill:none;
  stroke:#39614f;
  stroke-width:3;
  stroke-linejoin:round;
  stroke-linecap:round;
  vector-effect:non-scaling-stroke
}
.gpx-metrics {
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:18px;
  margin:24px 0
}
.gpx-metrics dt {
  font-size:.72rem;
  color:var(--muted);
  margin-bottom:9px
}
.gpx-metrics dd {
  font-size:1.1rem;
  font-weight:650;
  margin:0;
  overflow-wrap:anywhere
}
.sample-banner {
  display:flex;
  gap:16px;
  flex-wrap:wrap;
  background:#f5ead6;
  border:1px solid #e5d4b7;
  color:#70542e;
  border-radius:9px;
  padding:13px 18px;
  margin-bottom:20px;
  font-size:.8rem;
  line-height:1.6
}
footer {
  display:flex;
  justify-content:space-between;
  gap:15px;
  font-size:.72rem;
  color:#627660;
  padding:28px 0
}
#notice {
  padding:15px 20px;
  background:#e5eddd;
  border:1px solid #becdb1;
  border-radius:10px;
  margin:0 0 20px;
  font-size:.87rem;
  line-height:1.6
}
#notice.error {
  background:#fbece4;
  border-color:#e3b3a1;
  color:#833d2c
}
#recovery {
  margin-bottom:24px
}
dialog {
  max-width:450px;
  border:1px solid #d4ddd0;
  border-radius:16px;
  padding:28px;
  color:#183d34
}
dialog::backdrop {
  background:#153b3266
}
dialog p {
  line-height:1.6
}
.dialog-actions {
  display:flex;
  gap:12px;
  justify-content:flex-end;
  margin-top:24px
}
.danger {
  background:#984d3c;
  color:#fff;
  border-color:#984d3c
}
.danger:hover {
  background:#7b3c30
}
@media(max-width:1000px) {
  .workspace {
    grid-template-columns:270px minmax(0,1fr);
    gap:16px
  }
  .panel {
    padding:20px
  }
  .filters {
    grid-template-columns:1fr 1fr
  }
  .filters>label:first-child {
    grid-column:1/-1
  }
  .filters>button {
    grid-column:1/-1
  }
  .hike {
    flex-direction:column
  }
  .hike-actions {
    justify-content:flex-end
  }
  .progress-grid {
    grid-template-columns:1fr 1fr;
    gap:16px
  }
  .chart-row {
    grid-template-columns:70px minmax(20px,1fr) 70px;
    gap:7px
  }
  .header-tools>span {
    max-width:160px;
    line-height:1.5
  }
  .mountain-art {
    width:32%;
    min-width:160px
  }
  .gpx-metrics {
    grid-template-columns:1fr 1fr
  }
}
@media(max-width:720px) {
  header {
    padding:18px 20px
  }
  .header-tools {
    gap:10px
  }
  .header-tools>span {
    display:none
  }
  main {
    padding:0 18px 18px
  }
  .hero {
    padding:28px 0 24px
  }
  .hero-copy {
    flex-basis:auto
  }
  .mountain-art {
    display:none
  }
  .hero-copy>p:not(.eyebrow) {
    font-size:.88rem
  }
  .hero-actions {
    gap:9px;
    margin-top:17px
  }
  .hero-actions .hint {
    font-size:.7rem
  }
  .stats {
    grid-template-columns:1fr 1fr;
    gap:10px;
    margin-bottom:18px
  }
  .stats article {
    padding:16px 18px
  }
  .stats strong {
    font-size:1.5rem
  }
  .workspace,.progress-grid {
    grid-template-columns:1fr
  }
  .section-heading {
    flex-wrap:wrap
  }
  .chart-row {
    grid-template-columns:72px minmax(25px,1fr) 75px;
    gap:8px
  }
  footer {
    flex-direction:column;
    line-height:1.6
  }
  .hero h1 br {
    display:none
  }
  .entry h2 {
    font-size:1.3rem
  }
  .hike {
    flex-direction:row;
    gap:10px
  }
  .hike-actions {
    flex-direction:column
  }
  .units {
    font-size:.72rem
  }
  .view-nav {
    gap:0;
    padding:4px;
    margin:0 -4px
  }
  .view-nav button {
    font-size:.73rem;
    padding:10px 6px
  }
  .plan-controls {
    grid-template-columns:1fr 1fr;
    gap:14px
  }
  .plan-controls button {
    grid-column:1/-1
  }
  .route-grid {
    grid-template-columns:1fr
  }
  .brand-caption {
    display:none
  }
  .gpx-metrics {
    gap:22px 15px
  }
  .gpx-metrics dd {
    font-size:.95rem
  }
  #selection-note {
    font-size:.72rem;
    line-height:1.6
  }
}
@media(prefers-reduced-motion:reduce) {
  * {
    scroll-behavior:auto!important
  }
}
.hero-actions .primary {
  background:var(--forest);
  color:#fff;
  margin:0
}
.hero-actions .primary:hover {
  background:#2c6150
}
.entry {
  scroll-margin-top:80px
}
#hike-form {
  scroll-margin-top:90px
}
@media(max-width:720px) {
  .workspace>.entry {
    order:2
  }
  .workspace>.journal-column {
    order:1
  }
  .hero-actions .hint {
    flex-basis:100%
  }
}
.more-button {
  width:100%;
  margin:20px 0 4px;
  background:#f8faf4
}
.duration-series {
  width:100%;
  height:auto;
  max-height:150px;
  display:block;
  margin-top:18px;
  background:#f7f9f1;
  border-radius:8px
}
.duration-series polyline {
  fill:none;
  stroke:#39614f;
  stroke-width:2.5;
  stroke-linejoin:round;
  vector-effect:non-scaling-stroke
}
.duration-series circle {
  fill:#39614f
}
.duration-series .series-baseline {
  stroke:#cad5c0;
  stroke-width:1
}
details {
  margin-top:15px;
  font-size:.78rem;
  line-height:1.7
}
summary {
  cursor:pointer;
  min-height:32px;
  color:#39614f;
  font-weight:650
}
table {
  width:100%;
  border-collapse:collapse;
  table-layout:fixed;
  font-size:.72rem;
  margin:12px 0;
  overflow-wrap:anywhere
}
caption {
  text-align:left;
  color:var(--muted);
  padding-bottom:10px
}
th,td {
  padding:10px 7px;
  text-align:left;
  vertical-align:top;
  border-bottom:1px solid var(--line)
}
th:first-child,td:first-child {
  width:28%
}
th:nth-child(2),td:nth-child(2) {
  width:24%
}
@media(max-width:720px) {
  table {
    font-size:.69rem
  }
  th,td {
    padding:9px 5px
  }
}
td:last-child {
  white-space:pre-wrap
}
header {
  flex-wrap:wrap
}
.brand {
  flex-shrink:0
}
.header-tools {
  max-width:100%;
  flex-wrap:wrap;
  justify-content:flex-end
}
.route-limits {
  grid-column:1/-1;
  border-top:1px solid var(--line);
  padding-top:15px;
  margin-top:2px
}
.route-limits .form-row {
  max-width:600px;
  margin-top:14px
}
.route-limits summary {
  min-height:40px;
  padding-top:6px
}
.has-journal .hero {
  padding:25px 0
}
.has-journal h1 {
  font-size:2.4rem;
  margin-bottom:10px
}
.has-journal .hero-copy>p:not(.eyebrow) {
  display:none
}
.has-journal .mountain-art {
  max-width:260px
}
.has-journal .hero-actions {
  margin-top:15px
}
@media(max-width:720px) {
  .has-journal h1 {
    font-size:1.8rem;
    max-width:330px
  }
  .has-journal .hero {
    padding:22px 0
  }
  .has-journal .hero-copy>.eyebrow {
    font-size:.61rem
  }
}
.journal-tools {
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end
}
.format-help {
  flex-basis:100%;
  border-top:1px solid var(--line);
  padding-top:13px
}
.format-help p {
  font-size:.77rem;
  line-height:1.8;
  color:var(--muted);
  margin:10px 0
}
.format-help code {
  overflow-wrap:anywhere;
  font-size:.72rem
}
.view-nav button[aria-pressed=true] {
  box-shadow:inset 0 -3px 0 var(--forest)
}

.csv-dialog{width:min(620px,calc(100vw - 32px));max-width:620px;max-height:85vh;overflow-y:auto}.csv-dialog>p{font-size:.85rem}.import-preview-hike{border-top:1px solid var(--line);padding:15px 0}.csv-dialog .dialog-actions{position:sticky;bottom:-28px;background:#fff;padding:15px 0 5px}.csv-dialog .dialog-actions button{margin-top:0}

#notice,.csv-dialog,#gpx-name{overflow-wrap:anywhere}.csv-dialog .dialog-actions{bottom:0}
