/* SpatialTurn homepage: "Survey Sheet" design. Dark theme by default, light theme on request. */
@font-face { font-family: "Barlow Condensed"; font-weight: 500; font-display: swap; src: url("fonts/barlow-condensed-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url("fonts/barlow-condensed-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url("fonts/barlow-condensed-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-weight: 400; font-display: swap; src: url("fonts/source-serif-4-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-weight: 400; font-style: italic; font-display: swap; src: url("fonts/source-serif-4-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-weight: 600; font-display: swap; src: url("fonts/source-serif-4-latin-600-normal.woff2") format("woff2"); }

:root, :root[data-theme="dark"] {
  --bg: #0B1418;
  --paper: #0F1A1F;
  --ink: #E6EDEA;
  --muted: #A3B3AD;
  --rule: #6E827A;
  --cont: #4A5B54;
  --cont-major: #849890;
  --water: #3D7FB0;
  --street: #CFB991;
  --accent: #CFB991;
  --accent-ink: #0F1A1F;
  --hover: rgba(207, 185, 145, 0.10);
  --panel: rgba(15, 26, 31, 0.86);
  --py: #7DB3E0;
  --qgis: #E8A25C;
}
:root[data-theme="light"] {
  --bg: #E9EBE4;
  --paper: #F6F7F2;
  --ink: #1F2A2E;
  --muted: #4B5A60;
  --rule: #1F2A2E;
  --cont: #C49A7C;
  --cont-major: #9A5B34;
  --water: #2E6E9E;
  --street: #1F2A2E;
  --accent: #8E6F3E;
  --accent-ink: #F6F7F2;
  --hover: rgba(142, 111, 62, 0.10);
  --panel: rgba(246, 247, 242, 0.88);
  --py: #2B6795;
  --qgis: #A4570F;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Source Serif 4", Georgia, serif; font-size: 17px; line-height: 1.5;
  transition: background-color .3s, color .3s;
}
a { color: var(--accent); }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; z-index: 10; }
.skip:focus { left: 8px; }
.cond, .brand, nav, .kicker, h1, h2, .btn, .num, .modules b, .tb-title, .collar, .map-caption { font-family: "Barlow Condensed", "Arial Narrow", sans-serif; }

/* ---- sheet, collar, double neatline ---- */
.sheet { max-width: 1320px; margin: 0 auto; padding: 0 24px; }
.collar { display: flex; justify-content: space-between; gap: 16px; font-size: 13px; letter-spacing: .04em; color: var(--muted); padding: 8px 2px; font-variant-numeric: tabular-nums; }
.collar-bottom { align-items: baseline; flex-wrap: wrap; }
.privacy { text-align: center; flex: 1 1 auto; }
.neatline { border: 2px solid var(--rule); padding: 6px; position: relative; }
.neatline::before, .neatline::after { content: ""; position: absolute; width: 10px; height: 10px; border: 0 solid var(--rule); }
.neatline::before { top: -12px; left: -12px; border-right-width: 1px; border-bottom-width: 1px; }
.neatline::after { bottom: -12px; right: -12px; border-left-width: 1px; border-top-width: 1px; }
.frame { border: 1px solid var(--rule); background: var(--paper); position: relative; overflow: hidden; }

/* ---- header ---- */
.site-header { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 32px; border-bottom: 1px solid var(--rule); background: var(--paper); }
.brand { font-weight: 700; font-size: 23px; letter-spacing: .02em; color: var(--ink); text-decoration: none; }
nav { display: flex; align-items: center; gap: 24px; font-size: 19px; }
nav a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 4px; }
.theme-toggle { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-size: 17px; color: var(--ink); background: transparent; border: 1px solid var(--rule); padding: 5px 12px; cursor: pointer; }
.theme-toggle:hover { background: var(--hover); }
.theme-toggle svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
:root[data-theme="dark"] .i-moon, :root[data-theme="light"] .i-sun { display: none; }

/* ---- hero with map ---- */
.hero { position: relative; min-height: 560px; display: flex; align-items: center; padding: 56px 32px 64px; }
.hero-map { position: absolute; top: 0; bottom: 0; right: 0; width: 74%; }
.hero-map::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 15%; background: linear-gradient(90deg, var(--paper), transparent); pointer-events: none; }
.hero-map img, .hero-map svg { display: block; width: 100%; height: 100%; object-fit: cover; }
.hero-map svg { cursor: crosshair; }
.hero-text { position: relative; z-index: 1; max-width: 520px; background: var(--panel); padding: 12px 20px 24px 0; box-shadow: 14px 0 14px -6px var(--panel); }
.kicker { margin: 0 0 14px; font-size: 15px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
h1 { margin: 0 0 20px; font-weight: 600; font-size: clamp(46px, 6.4vw, 78px); line-height: .96; letter-spacing: -.005em; }
.lede { margin: 0 0 28px; font-size: 19px; line-height: 1.55; max-width: 470px; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; }
.btn { font-size: 20px; font-weight: 600; letter-spacing: .02em; padding: 11px 22px; text-decoration: none; border: 2px solid var(--accent); transition: background-color .2s, color .2s; }
.btn-solid { background: var(--accent); color: var(--accent-ink); }
.btn-solid:hover { background: transparent; color: var(--ink); }
.btn-line { color: var(--ink); }
.btn-line:hover { background: var(--accent); color: var(--accent-ink); }
.map-caption { position: absolute; z-index: 1; right: 24px; bottom: 14px; font-size: 14px; color: var(--muted); background: var(--panel); padding: 8px 12px 6px; max-width: 46ch; text-align: right; border: 1px solid color-mix(in srgb, var(--rule) 50%, transparent); }
.map-caption p { margin: 6px 0 0; line-height: 1.35; }
.map-caption .scalebar { display: flex; justify-content: flex-end; }

/* map layers (units are meters on the ground) */
.hm-water { fill: var(--water); fill-opacity: .55; stroke: var(--water); stroke-width: 10; }
.hm-contours { fill: none; stroke: var(--cont); stroke-width: 11; stroke-linejoin: round; }
.hm-major { stroke: var(--cont-major); stroke-width: 18; }
.hm-streets { fill: none; stroke: var(--street); stroke-width: 9; stroke-opacity: .10; stroke-linecap: round; stroke-linejoin: round; }
.hm-streets.hm-lens { stroke-opacity: .95; stroke-width: 12; }
.hm-city { fill: none; stroke: var(--accent); stroke-width: 16; stroke-dasharray: 90 70; stroke-opacity: .55; }
.hm-marker { fill: var(--accent); stroke: var(--paper); stroke-width: 22; }
.hm-label { font-family: "Barlow Condensed", sans-serif; font-size: 300px; font-weight: 600; fill: var(--ink); paint-order: stroke; stroke: var(--paper); stroke-width: 60px; stroke-linejoin: round; }
.hm-river { font-family: "Source Serif 4", serif; font-style: italic; font-size: 270px; fill: var(--water); letter-spacing: 20px; }
:root[data-theme="dark"] .hm-river { fill: #7FB2D9; }
.js .hm-contours path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.js .drawn .hm-contours path { animation: draw 2.4s ease-out forwards; }
.js .drawn .hm-major path { animation-duration: 3s; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---- header: view-by-tool switch ---- */
.tool-switch { display: flex; align-items: center; }
.tool-switch[hidden] { display: none; }
.ts-label { font-size: 14px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-right: 12px; }
.tool-switch button { font: inherit; font-size: 17px; font-weight: 600; color: var(--ink); background: transparent; border: 1px solid var(--accent); margin-left: -1px; padding: 5px 14px; min-height: 36px; cursor: pointer; transition: background-color .15s, color .15s; }
.tool-switch button:hover { background: var(--hover); }
.tool-switch button[aria-checked="true"] { background: var(--accent); color: var(--accent-ink); }

/* ---- legend (modules) ---- */
.legend-row { position: relative; z-index: 2; border-top: 1px solid var(--rule); background: var(--paper); }
.legend { padding: 26px 32px 30px; }
.legend-head { text-align: center; margin-bottom: 18px; }
h2 { margin: 0 0 4px; font-weight: 600; font-size: 23px; }
.legend-summary { margin: 0; font-family: "Barlow Condensed", "Arial Narrow", sans-serif; font-size: 17px; color: var(--muted); }
.tool-key { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; font-size: 14px; color: var(--muted); }
.tool-key[hidden] { display: none; }
.tool-key li { display: flex; align-items: center; gap: 7px; }
.tool-key li[hidden] { display: none; }
.chip { font-family: "Barlow Condensed", "Arial Narrow", sans-serif; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; border: 1px solid currentColor; padding: 1px 6px; line-height: 1.4; white-space: nowrap; text-align: center; }
.chip-python { color: var(--py); } .chip-qgis { color: var(--qgis); } .chip-theory { color: var(--muted); } .chip-both { color: var(--accent); } .chip-ws { color: var(--accent); }
.ws-tag { font-family: "Barlow Condensed", "Arial Narrow", sans-serif; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); white-space: nowrap; }

/* Foundations across the top, then pairs (2|5, 3|6, 4|7) that share one row height */
.modules { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto repeat(3, auto); grid-auto-flow: column; gap: 12px 20px; font-size: 15px; line-height: 1.35; }
.modules li[data-module] { border: 1px solid var(--rule); padding: 12px 14px; transition: border-color .15s; min-width: 0; }
.modules li[data-module]:hover, .modules li[data-module]:focus-within { border-color: var(--accent); }
/* path views: two columns of tiles, bottoms aligned (the last tile in each column stretches) */
.modules.path-view { grid-template-rows: none; grid-auto-flow: row; }
.pcol { min-width: 0; }
.pcol-list { list-style: none; margin: 0; padding: 0; height: 100%; display: flex; flex-direction: column; gap: 12px; }
.pcol-list > li:last-child { flex: 1 1 auto; }
.modules.path-view .span .tilehead { justify-content: flex-start; text-align: left; }
.modules.path-view .span .tilehead > span { padding-left: 32px; }
.modules.path-view .span .num { display: inline-block; width: 20px; margin: 0 12px 0 -32px; }
.modules.path-view .span .eps { max-width: none; }
.modules .span { grid-column: 1 / -1; }
.tilehead { display: flex; gap: 12px; color: var(--ink); text-decoration: none; }
.tilehead:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.tilehead:hover b { color: var(--accent); }
.modules .span .tilehead { justify-content: center; text-align: center; }
.modules .span .num { width: auto; margin-right: 14px; }
.modules em { font-style: normal; font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-left: 10px; }
.desc { color: var(--muted); }
.num { font-weight: 700; font-size: 19px; width: 20px; flex-shrink: 0; color: var(--accent); }
.modules b { display: block; font-size: 19px; font-weight: 600; color: var(--ink); transition: color .15s; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0 32px; }
.span .chips { justify-content: center; margin-left: 0; }
.eps { list-style: none; margin: 12px 0 0; padding: 8px 0 0; border-top: 1px solid color-mix(in srgb, var(--rule) 60%, transparent); display: flex; flex-direction: column; gap: 2px; }
.span .eps { max-width: 590px; margin-left: auto; margin-right: auto; }
.eps a { display: grid; grid-template-columns: minmax(0, 1fr) 84px 54px; align-items: center; gap: 12px; padding: 6px 8px; min-height: 38px; color: var(--ink); text-decoration: none; border: 1px solid transparent; transition: border-color .15s, background-color .15s; }
.eps a:hover, .eps a:focus-visible { border-color: var(--accent); background: var(--hover); outline: none; }
.eps .theory a { color: var(--muted); }
.eps .theory a:hover, .eps .theory a:focus-visible { color: var(--ink); }
.ep-title .ws-tag { margin-left: 8px; }
.ep-mins { font-family: "Barlow Condensed", "Arial Narrow", sans-serif; font-size: 15px; color: var(--muted); text-align: right; white-space: nowrap; }

/* ---- title block: a full-width strip in three parts ---- */
.title-block { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: center; gap: 20px; padding: 20px 32px; border-top: 1px solid var(--rule); background: var(--paper); font-size: 14px; line-height: 1.45; }
.title-block p { margin: 0; }
.tb-title { font-weight: 700; font-size: 21px; line-height: 1.1; }
.tb-text { text-align: right; }
.logos { display: flex; align-items: center; justify-content: center; gap: 18px; }
.logos a { display: block; line-height: 0; }
.logos a:hover { opacity: .85; }
.logo-purdue img { width: 168px; height: auto; }
.logo-nsf img { width: 56px; height: 56px; }
:root[data-theme="dark"] .on-light, :root[data-theme="light"] .on-dark { display: none; }
.scalebar svg { display: block; overflow: visible; }
.scalebar rect { stroke: var(--ink); stroke-width: 1; }
.scalebar .sb-a { fill: var(--ink); } .scalebar .sb-b { fill: var(--paper); }
.scalebar text { font-family: "Barlow Condensed", sans-serif; font-size: 11px; fill: var(--muted); }
.small { font-size: 13px; color: var(--muted); }

/* ---- narrow screens ---- */
@media (max-width: 900px) {
  .site-header { flex-wrap: wrap; }
  nav { flex-wrap: wrap; }
  .title-block { grid-template-columns: 1fr; text-align: center; }
  .tb-text { text-align: center; }
  .hero-map { width: 100%; opacity: .7; }
  .hero-map::after { display: none; }
}
@media (max-width: 640px) {
  .sheet { padding: 0 16px; }
  .site-header, .hero, .legend, .title-block { padding-left: 18px; padding-right: 18px; }
  .hero { min-height: 0; padding-top: 40px; padding-bottom: 88px; }
  .hero-text { padding: 16px; box-shadow: none; }
  .modules { grid-template-columns: 1fr; grid-auto-flow: row; grid-template-rows: none; }
  .pcol, .pcol-list { display: contents; }
  .ts-label { display: none; }
  .tool-switch { width: 100%; }
  .tool-switch button { flex: 1 1 0; padding: 5px 6px; font-size: 16px; }
  .chips { margin-left: 0; }
  .eps a { grid-template-columns: minmax(0, 1fr) 70px 46px; gap: 8px; padding: 6px 4px; }
  .hero { padding-bottom: 130px; }
  .collar-top span:last-child, #cursor-readout { display: none; }
  .map-caption { left: 18px; right: 18px; text-align: left; }
  .map-caption .scalebar { justify-content: flex-start; }
  nav { gap: 14px; }
  .theme-label { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js .hm-contours path { stroke-dasharray: none; stroke-dashoffset: 0; }
}

/* ---- Workshop 2026 page ---- */
.tiles { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 15px; line-height: 1.4; }
.tiles li { display: flex; flex: 1 1 auto; }
.tiles a { flex: 1 1 auto; display: flex; gap: 12px; padding: 12px 14px; color: var(--ink); text-decoration: none; border: 1px solid color-mix(in srgb, var(--rule) 45%, transparent); transition: border-color .15s, background-color .15s; }
.tiles a:hover, .tiles a:focus-visible { border-color: var(--accent); background: var(--hover); outline: none; }
.tiles a span:last-child { color: var(--muted); }
.tiles a:hover span:last-child, .tiles a:focus-visible span:last-child { color: var(--ink); }
.tiles .num { width: 30px; }
.tiles b { display: block; font-family: "Barlow Condensed", "Arial Narrow", sans-serif; font-size: 20px; font-weight: 600; color: var(--ink); }
.tiles em { font-family: "Barlow Condensed", sans-serif; font-style: normal; font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-left: 10px; white-space: nowrap; }
.tiles .span a { border-color: var(--rule); }

.ws-hero { display: flex; gap: 48px; align-items: flex-start; padding: 44px 32px 36px; border-bottom: 1px solid var(--rule); }
.ws-intro { flex: 1 1 auto; max-width: 660px; }
.ws-intro h1 { font-size: clamp(40px, 5vw, 62px); }
.ws-intro .lede { margin-bottom: 0; }
.ws-where { flex: 0 0 340px; margin-left: auto; display: flex; flex-direction: column; gap: 10px; font-size: 14px; line-height: 1.5; }
.ws-where p { margin: 0; }
.ws-small-h { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.ws-map { border: 1px solid var(--rule); background: var(--bg); line-height: 0; }
.ws-map img, .ws-map svg { width: 100%; height: auto; display: block; }
.ws-osm { font-family: "Barlow Condensed", sans-serif; font-size: 17px; }
.wm-streets { fill: none; stroke: var(--street); stroke-opacity: .5; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.wm-halo { fill: var(--accent); fill-opacity: .22; }
.wm-dot { fill: var(--accent); stroke: var(--paper); stroke-width: 10; }
.wm-label { font-family: "Barlow Condensed", sans-serif; font-size: 64px; font-weight: 600; fill: var(--ink); paint-order: stroke; stroke: var(--bg); stroke-width: 16px; }
.wm-scale rect { fill: var(--ink); stroke: var(--ink); stroke-width: 3; } .wm-scale rect.b { fill: var(--bg); }
.wm-scale text, .wm-north text { font-family: "Barlow Condensed", sans-serif; font-size: 50px; fill: var(--muted); }
.wm-north path { fill: var(--ink); }

.ws-schedule { padding: 26px 32px 32px; display: flex; flex-direction: column; gap: 26px; }
.ws-day h2 { margin-bottom: 12px; font-size: 24px; }
.ws-fork { margin: 18px 0 10px; font-family: "Barlow Condensed", sans-serif; font-size: 15px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.ws-tracks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.ws-track { display: flex; flex-direction: column; }
.ws-track h3 { margin: 0 0 10px; font-family: "Barlow Condensed", sans-serif; font-size: 19px; font-weight: 600; }
.ws-track h3 span { color: var(--muted); font-weight: 500; }
.ws-track .tiles { flex: 1 1 auto; }
.ws-track-b .num { color: #7FB2D9; }
:root[data-theme="light"] .ws-track-b .num { color: var(--water); }

.ws-credits { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; padding: 20px 32px; border-top: 1px solid var(--rule); font-size: 14px; }
.ws-credits p { margin: 0; }
.ws-credits .tb-title { flex: 1 1 260px; max-width: 360px; }

@media (max-width: 900px) {
  .ws-hero { flex-direction: column; gap: 28px; }
  .ws-where { flex-basis: auto; width: 100%; max-width: 440px; margin-left: 0; }
  .ws-tracks { grid-template-columns: 1fr; gap: 22px; }
}
@media (max-width: 640px) {
  .ws-hero, .ws-schedule, .ws-credits { padding-left: 18px; padding-right: 18px; }
  .tiles em { display: block; margin: 2px 0 0; }
}
