/* Survey sheets: home page of rishabhramteke.github.io */
:root {
  --paper: #EDEFEC;
  --paper-2: #E2E5E1;
  --wine: #8A2A3D;
  --wine-deep: #5B1426;
  --ink: #231518;
  --ink-2: #5A4549;
  --rule: #3A1D24;
  --rule-soft: rgba(58, 29, 36, .28);
  --halo: 0 0 2px var(--paper), 0 0 2px var(--paper), 0 0 3px var(--paper), 1px 1px 0 var(--paper), -1px -1px 0 var(--paper);
  --sans: "Barlow", "Helvetica Neue", Arial, sans-serif;
  --cond: "Barlow Condensed", "Barlow", "Helvetica Neue", Arial, sans-serif;
  --serif: "Source Serif 4", Georgia, serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --gutter: clamp(16px, 2.2vw, 32px);
}
*, *::before, *::after { box-sizing: border-box; }
html { scrollbar-color: var(--wine-deep) var(--paper-2); scroll-behavior: smooth; }
body.sheet-page { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
::selection { background: var(--wine); color: var(--paper); }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .22em; }
a:hover { color: var(--wine); }
:focus-visible { outline: 2px solid var(--wine); outline-offset: 3px; }
h1, h2 { font-family: var(--cond); font-weight: 600; color: var(--wine-deep); letter-spacing: .005em; line-height: 1.02; margin: 0; text-wrap: balance; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--wine); color: var(--paper); padding: .5rem .9rem; z-index: 50; }
.skip:focus { left: 8px; }
.skip:hover, .act-main:hover, .act-main:focus-visible { color: var(--paper); }
.nw { white-space: nowrap; }

/* ---------- Sheets ---------- */
.sheet { padding: var(--gutter); height: 100svh; min-height: 660px; max-height: 1000px; }
.neatline {
  position: relative; height: 100%; border: 1.5px solid var(--rule); overflow: hidden;
  background-image:
    linear-gradient(to right, rgba(138, 42, 61, .08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(138, 42, 61, .08) 1px, transparent 1px);
  background-size: 12.5% 100%, 100% 16.6667%;
}
.contours { position: absolute; inset: 0; width: 100%; height: 100%; }
.contours path { fill: none; stroke: var(--wine); vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.contours .c { stroke-width: .8; opacity: .26; }
.contours .ci { stroke-width: 1.3; opacity: .5; }
.contours text { paint-order: stroke; stroke: var(--paper); stroke-width: 4px; stroke-linejoin: round; }
.contours .cl { font: 500 15px var(--sans); fill: var(--wine); letter-spacing: .02em; dominant-baseline: middle; text-anchor: middle; font-variant-numeric: tabular-nums; }
.contours .peak path { fill: var(--wine-deep); stroke: none; }
.contours .pe { font: 500 14px var(--sans); fill: var(--wine-deep); font-variant-numeric: tabular-nums; }
.js .contours .c, .js .contours .ci { stroke-dasharray: 1; animation: draw 1.6s var(--ease) both; }
.js .contours .ci { animation-delay: .25s; }
.js .contours text { animation: fade .8s var(--ease) 1.1s both; }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.layer { will-change: transform; }

.ticks { position: absolute; display: flex; font: 500 .78rem/1 var(--cond); letter-spacing: .3em; color: var(--rule); pointer-events: none; }
.ticks-x { top: 6px; left: 0; right: 0; }
.ticks-x span { flex: 1; text-align: center; }
.ticks-y { top: 0; bottom: 0; left: 6px; flex-direction: column; }
.ticks-y span { flex: 1; display: flex; align-items: center; }

.legend {
  position: absolute; left: 3.5%; top: 7%; z-index: 3; width: min(30rem, 34%);
  background: var(--paper); border: 1.5px solid var(--rule); padding: 1.6rem 1.8rem 1.5rem;
}
.legend h1 { font-size: clamp(2.6rem, 4.4vw, 4.4rem); }
.role { font: 400 1.16rem/1.42 var(--serif); margin: .9rem 0 0; color: var(--ink); max-width: 36ch; text-wrap: balance; }
.coords { margin: .55rem 0 0; font: 600 .84rem/1.4 var(--cond); letter-spacing: .07em; color: var(--wine); font-variant-numeric: tabular-nums; }
.coords abbr { text-decoration: none; border-bottom: 1px dotted var(--wine); cursor: help; }
.sym { width: 16px; height: 16px; fill: none; stroke: var(--wine); stroke-width: 2; flex: none; }
.sym .dot, .mark svg .dot, .fm svg .dot { fill: var(--wine); stroke: none; }
.actions { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; margin-top: 1.4rem; align-items: center; font-weight: 500; }
.act { text-decoration: underline; }
.act-main { background: var(--wine); color: var(--paper); text-decoration: none; padding: .5rem 1.05rem; transition: background .25s var(--ease); }
.act-main:hover { background: var(--wine-deep); }


.points { list-style: none; margin: 0; padding: 0; position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.points:has(.pt:hover), .points:has(.pt:focus-within) { z-index: 6; }
.pt { position: absolute; left: var(--x); top: var(--y); transform: translate(calc(-8px + var(--mx, 0px)), calc(-8px + var(--my, 0px))); pointer-events: auto; }
.pt a { display: flex; align-items: flex-start; gap: .55rem; text-decoration: none; }
.mark { position: relative; width: 16px; height: 16px; flex: none; margin-top: .12rem; }
.mark svg { width: 16px; height: 16px; fill: var(--paper); stroke: var(--wine); stroke-width: 2.2; display: block; transition: fill .25s var(--ease); }
.pt-trig .mark, .pt-trig .mark svg { width: 20px; height: 20px; }
.mark::before { content: ""; position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; border: 1.25px dashed var(--wine); opacity: 0; transform: scale(.4); transition: opacity .3s var(--ease), transform .5s var(--ease); }
.label { font: 600 1.05rem/1.2 var(--sans); color: var(--ink); text-shadow: var(--halo); letter-spacing: .01em; white-space: nowrap; }
.pt-trig .label { font-size: 1.15rem; color: var(--wine-deep); }
.note {
  position: absolute; left: 1.6rem; top: 1.75rem; width: 19rem; padding: .75rem .9rem; background: var(--paper);
  border: 1.5px solid var(--rule); font: 400 .97rem/1.45 var(--serif); color: var(--ink);
  opacity: 0; transform: translateY(6px); transition: opacity .25s var(--ease), transform .35s var(--ease); pointer-events: none;
}
.note-meta { display: block; font: 600 .8rem/1.3 var(--cond); letter-spacing: .07em; color: var(--wine); margin-bottom: .3rem; font-variant-numeric: tabular-nums; }
.pt-left a { flex-direction: row-reverse; }
.pt-left .note { left: auto; right: 1.6rem; }
.pt-up .note { top: auto; bottom: 1.75rem; transform: translateY(-6px); }
.pt:hover .note, .pt:focus-within .note { opacity: 1; transform: none; }
.pt:hover .mark::before, .pt:focus-within .mark::before { opacity: 1; transform: none; }
.pt:hover .mark svg, .pt:focus-within .mark svg { fill: var(--wine); }
.pt:hover .label, .pt:focus-within .label { color: var(--wine-deep); }
.face { display: none; }

.titleblock {
  position: absolute; right: 3.5%; bottom: 6%; z-index: 3; width: min(24rem, 30%);
  background: var(--paper); border: 1.5px solid var(--rule); padding: 1rem 1.3rem 1.1rem;
}
.tb-title { margin: 0 0 .7rem; font: 600 1.45rem/1.1 var(--cond); color: var(--wine-deep); letter-spacing: .02em; }
.scale { position: relative; width: min(var(--bar, 160px), 100%); margin-bottom: 1.15rem; }
.scale .bar { display: flex; height: 7px; border: 1.25px solid var(--rule); width: 100%; }
.scale .bar i { flex: 1; }
.scale .bar i:nth-child(odd) { background: var(--wine-deep); }
.scale-lab { position: absolute; top: 10px; left: 0; transform: translateX(-30%); font: 500 .76rem/1 var(--sans); color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.scale-end { left: auto; right: 0; transform: translateX(40%); }
.titleblock dl { display: grid; grid-template-columns: auto 1fr; gap: .2rem .8rem; margin: 0; }
.titleblock dt { font: 600 .74rem/1.55 var(--cond); letter-spacing: .16em; text-transform: uppercase; color: var(--wine); }
.titleblock dd { margin: 0; font: italic 400 .86rem/1.35 var(--serif); color: var(--ink-2); }
.tb-next { display: block; margin-top: .8rem; padding-top: .6rem; border-top: 1px solid var(--rule-soft); font-weight: 600; text-decoration: underline; }

.reticle { position: absolute; inset: 0; pointer-events: none; z-index: 1; opacity: 0; transition: opacity .3s var(--ease); }
.neatline.hot .reticle { opacity: 1; }
.neatline.hot { cursor: crosshair; }
.neatline.hot a { cursor: pointer; }
.rx, .ry { position: absolute; background: rgba(138, 42, 61, .32); }
.rx { left: 0; right: 0; height: 1px; top: 0; transform: translateY(var(--cy, -10px)); }
.ry { top: 0; bottom: 0; width: 1px; left: 0; transform: translateX(var(--cx, -10px)); }
.readout { position: absolute; left: 0; top: 0; transform: translate(calc(var(--cx, 0px) + 12px), calc(var(--cy, 0px) + 10px)); font: 600 .8rem/1 var(--cond); letter-spacing: .14em; color: var(--wine-deep); text-shadow: var(--halo); font-variant-numeric: tabular-nums; white-space: nowrap; }

.motto { padding: clamp(2.5rem, 6vw, 4.5rem) var(--gutter); text-align: center; }
.motto blockquote { margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: .3rem 1rem; }
.motto p { margin: 0; font: 600 clamp(.95rem, 1.4vw, 1.15rem)/1.5 var(--cond); letter-spacing: .22em; text-transform: uppercase; color: var(--wine-deep); }
.motto footer { margin: 0; font: italic 400 1rem/1.3 var(--serif); color: var(--ink-2); white-space: nowrap; }
.motto footer::before { content: "— "; }

/* ---------- Sheet 2: journal ---------- */
.sheet2 { height: auto; max-height: none; min-height: 0; padding-top: 0; }
.n2 {
  height: auto; background-color: var(--paper-2); background-size: 12.5% 100%, 100% 25%;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "text globe" "tb globe";
  gap: 2rem clamp(2rem, 5vw, 5rem); align-items: center; padding: clamp(3.5rem, 7vw, 6rem) 3.5% clamp(2.5rem, 5vw, 4rem);
}
.jr-text { grid-area: text; align-self: end; }
.sheet2 h2, .imprint h2 { font-size: clamp(2.2rem, 4vw, 3.4rem); }
.jr-lede { font: 400 1.18rem/1.5 var(--serif); color: var(--ink-2); margin: .8rem 0 2rem; max-width: 46ch; }
.stops { list-style: none; margin: 0; padding: 0 0 0 1.9rem; position: relative; }
.stops::before { content: ""; position: absolute; left: 7px; top: .7rem; bottom: .9rem; width: 0; border-left: 2px dashed var(--wine); }
.stops li { position: relative; margin: 0 0 1.15rem; }
.stops a { display: grid; grid-template-columns: 1fr; text-decoration: none; }
.stops .sym { position: absolute; left: -1.9rem; top: .32rem; fill: var(--paper-2); transition: fill .25s var(--ease); }
.stops a:hover .sym, .stops a:focus-visible .sym { fill: var(--wine); }
.stop-t { font: 600 1.35rem/1.2 var(--cond); letter-spacing: .02em; color: var(--wine-deep); }
.stops a:hover .stop-t { text-decoration: underline; }
.stop-n { font: italic 400 1.02rem/1.45 var(--serif); color: var(--ink-2); }
.globe-wrap { grid-area: globe; margin: 0; justify-self: center; width: min(100%, 560px); }
#globe { width: 100%; height: auto; aspect-ratio: 1; display: block; cursor: grab; touch-action: pan-y; }
#globe:active { cursor: grabbing; }
.tb2 { grid-area: tb; position: static; width: auto; max-width: 30rem; align-self: start; }
.tb-proj { margin: 0 0 .7rem; font: italic 400 .9rem/1.4 var(--serif); color: var(--ink-2); }
.route-gaz { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: .9rem; }
.route-gaz caption { text-align: left; font: 600 .74rem/1.5 var(--cond); letter-spacing: .16em; text-transform: uppercase; color: var(--wine); padding-bottom: .2rem; }
.route-gaz th { text-align: left; font: 600 .95rem/1.5 var(--cond); letter-spacing: .04em; color: var(--wine-deep); padding: .15rem 0; border-top: 1px solid var(--rule-soft); }
.route-gaz td.yrs { text-align: left; color: var(--ink); padding-left: .6rem; }
.route-gaz td { text-align: right; color: var(--ink-2); border-top: 1px solid var(--rule-soft); white-space: nowrap; padding-left: .8rem; }

/* ---------- Imprint ---------- */
.imprint { max-width: 72rem; margin: 0 auto; padding: clamp(4rem, 8vw, 6.5rem) var(--gutter) 3rem; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(2rem, 5vw, 5rem); }
.imp-text p { font: 400 1.18rem/1.5 var(--serif); color: var(--ink-2); max-width: 40ch; margin: .8rem 0 1.4rem; }
.imp-links { list-style: none; padding: 0; margin: 1.2rem 0 0; display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; font-weight: 600; }
.imp-links a { text-decoration: underline; }
.imp-form { display: grid; gap: 1.1rem; }
.imp-form label { display: grid; gap: .35rem; font: 600 .8rem/1 var(--cond); letter-spacing: .2em; text-transform: uppercase; color: var(--wine); }
.imp-form input, .imp-form textarea { font: 400 1.05rem/1.45 var(--serif); color: var(--ink); background: transparent; border: 0; border-bottom: 1.5px solid var(--rule); padding: .45rem 0; border-radius: 0; caret-color: var(--wine); resize: vertical; }
.imp-form input:focus, .imp-form textarea:focus { outline: none; border-bottom-color: var(--wine); box-shadow: 0 1.5px 0 var(--wine); }
.imp-form input:user-invalid, .imp-form textarea:user-invalid { border-bottom-color: #A3122E; }
.imp-form button { justify-self: start; font: 600 1rem/1 var(--sans); background: var(--wine); color: var(--paper); border: 0; padding: .85rem 1.4rem; cursor: pointer; transition: background .25s var(--ease); }
.imp-form button:hover { background: var(--wine-deep); }
.colophon { grid-column: 1 / -1; margin: 2rem 0 0; padding-top: 1.2rem; border-top: 1px solid var(--rule-soft); font: italic 400 .88rem/1.5 var(--serif); color: var(--ink-2); }

/* ---------- Mid widths: keep the legend from swallowing the map ---------- */
@media (min-width: 961px) and (max-width: 1240px) {
  .legend { width: min(25rem, 38%); padding: 1.2rem 1.3rem; }
  .legend h1 { font-size: clamp(2.3rem, 3.9vw, 3.2rem); }
    .actions { margin-top: 1rem; }
  .titleblock { width: min(22rem, 34%); padding: .8rem 1rem .9rem; }
}

/* ---------- Narrow screens ---------- */
@media (max-width: 960px) {
  .sheet { height: auto; max-height: none; min-height: 0; }
  .neatline { display: flex; flex-direction: column; padding: 0 0 .4rem; }
  .contours { height: 86vw; bottom: auto; }
  .ticks { display: none; }
  .contours .cl, .contours .pe { display: none; }
  .face { display: block; position: relative; height: 86vw; z-index: 2; order: 1; }
  .fm { position: absolute; left: var(--x); top: var(--y); width: 18px; height: 18px; margin: -9px 0 0 -9px; animation: bob calc(6s + var(--i) * 1s) ease-in-out calc(var(--i) * -1.4s) infinite alternate; }
  .fm svg { width: 100%; height: 100%; fill: var(--paper); stroke: var(--wine); stroke-width: 2.2; }
  @keyframes bob { from { transform: translate(-3px, 2px); } to { transform: translate(3px, -4px); } }
  .legend, .titleblock { position: relative; left: auto; right: auto; top: auto; bottom: auto; width: auto; border: 0; border-top: 1.5px solid var(--rule); background: var(--paper); padding: 1.3rem 1.1rem; }
  .legend { order: 2; }
  .legend h1 { font-size: clamp(2.2rem, 10vw, 3.4rem); }
  .points { position: relative; inset: auto; pointer-events: auto; display: grid; gap: 1rem; background: var(--paper); border-top: 1px solid var(--rule-soft); padding: 1.2rem 1.1rem; z-index: 3; order: 3; }
  .pt { position: static; transform: none; }
  .pt a, .pt-left a { flex-direction: row; flex-wrap: wrap; }
  .label { white-space: normal; text-shadow: none; flex: 1; }
  .note, .pt-up .note { position: static; opacity: 1; transform: none; width: 100%; border: 0; padding: .1rem 0 0 1.6rem; background: none; }
  .mark::before { display: none; }
  .titleblock { order: 5; }
  .n2 { grid-template-columns: minmax(0, 1fr); grid-template-areas: "text" "globe" "tb"; padding: 3rem 1.1rem 1.5rem; }
  .n2 .ticks { display: none; }
  .tb2 { border: 0; border-top: 1.5px solid var(--rule); padding: 1.1rem 0 0; background: none; max-width: none; }
  .imprint { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .contours .c, .js .contours .ci, .js .contours text, .fm { animation: none; }
  .note, .mark::before, .reticle { transition: none; }
}
