/* ---- TRPL brand fonts (served from trlibrary.com) ---- */
@font-face { font-family: "Clearface"; font-weight: 400; font-style: normal; font-display: swap; src: url("https://www.trlibrary.com/themes/custom/trpl/css/clearfacestd-regular.woff2") format("woff2"); }
@font-face { font-family: "Clearface"; font-weight: 700; font-style: normal; font-display: swap; src: url("https://www.trlibrary.com/themes/custom/trpl/css/clearfacestd-heavy.woff2") format("woff2"); }
@font-face { font-family: "Dharma Gothic E"; font-weight: 700; font-style: normal; font-display: swap; src: url("https://www.trlibrary.com/themes/custom/trpl/css/dharma_type-dharmagothice-bold.woff2") format("woff2"); }
@font-face { font-family: "Frutiger"; font-weight: 400; font-style: normal; font-display: swap; src: url("https://www.trlibrary.com/themes/custom/trpl/css/frutigerltstd-regular.woff2") format("woff2"); }
@font-face { font-family: "Frutiger"; font-weight: 700; font-style: normal; font-display: swap; src: url("https://www.trlibrary.com/themes/custom/trpl/css/frutigerltstd-bold.woff2") format("woff2"); }

:root {
  --dark-gray: #25282A; --forest: #1B4633; --forest-dark: #163728; --sand: #D1CCBD; --paper: #FBFAF6;
  --orange-dark: #C9653F; --muted: #5d625f; --line: #e2ddd0; --layer: #1B4633;
  --display: "Dharma Gothic E", "Oswald", "Archivo Narrow", "Helvetica Neue", sans-serif;
  --body: "Clearface", "Source Serif 4", Georgia, serif;
  --ui: "Frutiger", "Inter", system-ui, -apple-system, sans-serif;
  --mh: 58px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--paper); color: var(--dark-gray); font-family: var(--body); -webkit-font-smoothing: antialiased; overflow: hidden; }
button { font: inherit; cursor: pointer; }

.masthead { height: var(--mh); background: var(--dark-gray); color: #fff; display: flex; align-items: center; gap: 18px; padding: 0 20px; }
.masthead img { height: 30px; width: auto; display: block; }
.masthead .title { font-family: var(--display); font-weight: 700; text-transform: uppercase; font-size: 26px; letter-spacing: .02em; padding-left: 18px; border-left: 1px solid rgba(255,255,255,.25); }
.masthead .visit { margin-left: auto; color: #fff; font-family: var(--ui); font-size: 14px; text-decoration: none; opacity: .85; }
.masthead .visit:hover { opacity: 1; }
.embed .masthead { display: none; }

.app { position: relative; height: calc(100% - var(--mh)); display: flex; }
.embed .app { height: 100%; }
.viewer { position: relative; flex: 1; min-width: 0; overflow: hidden; background: #EEF0EA; }
.viewer canvas { display: block; width: 100%; height: 100%; }
.labels { position: absolute; inset: 0; pointer-events: none; }
.labels > * { pointer-events: none; }

.tabs { position: absolute; z-index: 5; top: 14px; left: 14px; display: flex; background: rgba(255,255,255,.92); border-radius: 999px; padding: 4px; box-shadow: 0 2px 12px rgba(22,55,40,.14); }
.tabs button { border: 0; background: none; padding: 8px 16px; border-radius: 999px; font-family: var(--ui); font-weight: 700; font-size: 14px; color: var(--dark-gray); }
.tabs button[aria-selected="true"] { background: var(--c); color: #fff; }
.tabs button[data-layer="overview"][aria-selected="true"] { background: var(--forest); }
.tabs button:focus-visible, .tools button:focus-visible, .panel button:focus-visible, .hotspot:focus-visible { outline: 3px solid var(--orange-dark); outline-offset: 2px; }

.tools { position: absolute; z-index: 5; left: 14px; bottom: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.tools button { border: 1px solid rgba(37,40,42,.15); background: rgba(255,255,255,.94); border-radius: 8px; padding: 8px 12px; font-family: var(--ui); font-size: 13px; color: var(--dark-gray); }
.tools button[aria-pressed="true"] { background: var(--dark-gray); color: #fff; }
.hint { position: absolute; z-index: 4; right: 14px; bottom: 10px; margin: 0; font-family: var(--ui); font-size: 12px; color: var(--muted); background: rgba(255,255,255,.75); padding: 4px 8px; border-radius: 6px; }

.hotspot { pointer-events: auto !important; width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; background: var(--c); color: #fff; font-family: var(--ui); font-weight: 700; font-size: 14px; display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0,0,0,.3); transition: transform .15s; }
.hotspot:hover { transform: scale(1.12); }
.hotspot.active { transform: scale(1.3); box-shadow: 0 0 0 6px color-mix(in srgb, var(--c) 35%, transparent), 0 2px 8px rgba(0,0,0,.3); }
.place { font-family: var(--ui); font-size: 12px; font-weight: 700; color: var(--dark-gray); background: rgba(255,255,255,.9); padding: 3px 8px; border-radius: 4px; white-space: nowrap; box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.place.main { font-family: var(--display); text-transform: uppercase; font-size: 18px; background: var(--forest-dark); color: #fff; letter-spacing: .02em; }
.ruler { font-family: var(--ui); font-size: 11px; font-weight: 700; color: #a2481f; background: rgba(255,255,255,.85); padding: 1px 6px; border-radius: 3px; }

.loading { position: absolute; inset: 0; z-index: 9; display: grid; place-items: center; background: #EEF0EA; font-family: var(--ui); color: var(--muted); transition: opacity .5s; }
.loading.done { opacity: 0; pointer-events: none; }

.panel { position: relative; width: 390px; flex: none; background: #fff; border-left: 1px solid var(--line); display: flex; flex-direction: column; }
.no-panel .panel { display: none; }
.panel-body { flex: 1; overflow-y: auto; padding: 22px 24px 8px; }
.panel-toggle { display: none; }
.eyebrow { font-family: var(--ui); font-weight: 700; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--orange-dark); }
.panel h2 { font-family: var(--display); font-weight: 700; text-transform: uppercase; color: var(--forest-dark); font-size: 54px; line-height: .95; margin: 6px 0 10px; border-bottom: 5px solid var(--layer); padding-bottom: 6px; }
.intro { font-size: 17px; line-height: 1.5; margin: 0 0 14px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 6px; }
.stats div { background: #F5F2EB; border-radius: 8px; padding: 8px 10px; }
.stats b { display: block; font-family: var(--display); font-size: 30px; line-height: 1; color: var(--forest-dark); }
.stats span { font-family: var(--ui); font-size: 12px; color: var(--muted); line-height: 1.2; display: block; margin-top: 3px; }
.statnote { font-family: var(--ui); font-size: 11px; color: var(--muted); margin: 4px 0 10px; }
.stops { list-style: none; margin: 12px 0 0; padding: 0; }
.stops li { border-top: 1px solid var(--line); }
.stops li > button { width: 100%; text-align: left; border: 0; background: none; padding: 12px 0; display: flex; align-items: center; gap: 12px; font-family: var(--ui); font-weight: 700; font-size: 15px; color: var(--dark-gray); }
.stops li > button i { font-style: normal; flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--layer); color: #fff; font-size: 13px; }
.stops li.open > button { color: var(--forest-dark); }
.detail p { margin: 0 0 12px; font-size: 16px; line-height: 1.55; }
.nav { display: flex; justify-content: space-between; margin-bottom: 14px; }
.nav button { border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 6px 12px; font-family: var(--ui); font-size: 13px; }
.nav button.next { background: var(--forest); border-color: var(--forest); color: #fff; }
.pick { display: grid; gap: 10px; margin-top: 8px; }
.pick button { text-align: left; border: 0; border-left: 6px solid var(--c); background: #F5F2EB; border-radius: 8px; padding: 12px 14px; display: flex; justify-content: space-between; align-items: baseline; }
.pick b { font-family: var(--display); font-size: 30px; text-transform: uppercase; color: var(--forest-dark); }
.pick span { font-family: var(--ui); font-size: 13px; color: var(--muted); }
.note { margin: 18px 0 16px; padding-top: 10px; font-family: var(--ui); font-size: 11px; line-height: 1.4; color: var(--muted); border-top: 1px solid var(--line); }

@media (max-width: 760px) {
  :root { --mh: 50px; }
  .masthead .title { font-size: 20px; } .masthead .visit { display: none; }
  .app { flex-direction: column; }
  .viewer { flex: 1 1 auto; min-height: 0; }
  .panel { width: 100%; max-height: 46%; border-left: 0; border-top: 1px solid var(--line); transition: max-height .25s; }
  .panel.collapsed { max-height: 64px; }
  .panel-toggle { display: block; position: absolute; top: 0; left: 0; right: 0; height: 18px; border: 0; background: none; z-index: 2; }
  .panel-toggle span { display: block; width: 40px; height: 4px; margin: 6px auto; background: var(--sand); border-radius: 4px; }
  .panel-body { padding: 18px 16px 4px; }
  .panel h2 { font-size: 40px; }
  .tabs { left: 50%; transform: translateX(-50%); top: 10px; }
  .tabs button { padding: 7px 11px; font-size: 13px; }
  .tools { left: 10px; bottom: 10px; } .tools button { padding: 6px 9px; font-size: 12px; }
  .hint { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
/* cutaway callouts */
.co { width: 0; height: 0; position: relative; }
.co::before { content: ''; position: absolute; left: -4px; top: -4px; width: 8px; height: 8px; border-radius: 50%; background: var(--layer); box-shadow: 0 0 0 2px #fff; }
.co::after { content: ''; position: absolute; left: 0; bottom: 0; width: 22px; height: 22px; border-left: 2px solid var(--layer); border-top: 2px solid var(--layer); transform-origin: 0 100%; transform: skewX(40deg); }
.co .callout { position: absolute; left: 18px; bottom: 20px; font-family: var(--ui); background: rgba(255,255,255,.96); border-left: 3px solid var(--layer); padding: 4px 9px 5px; border-radius: 3px; box-shadow: 0 2px 8px rgba(0,0,0,.18); white-space: nowrap; line-height: 1.2; }
.co.left::after { transform: skewX(-40deg); left: -22px; border-left: 0; border-right: 2px solid var(--layer); }
.co.left .callout { left: auto; right: 18px; }
.callout b { display: block; font-size: 12.5px; color: var(--dark-gray); }
.callout span { display: block; font-size: 11px; color: var(--muted); }
.cut-tag { font-style: normal; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; margin-left: auto; padding: 1px 6px; border-radius: 10px; background: color-mix(in srgb, var(--layer) 18%, #fff); color: var(--dark-gray); font-weight: 700; }
@media (max-width: 760px) { .callout b { font-size: 11px; } .callout span { display: none; } }
/* flow legend */
.legend { position: absolute; z-index: 5; right: 14px; bottom: 44px; background: rgba(255,255,255,.94); border-radius: 8px; padding: 8px 12px 9px; font-family: var(--ui); font-size: 12px; color: var(--dark-gray); box-shadow: 0 2px 10px rgba(0,0,0,.12); display: grid; gap: 4px; max-width: 260px; }
.legend[hidden] { display: none; }
.legend b { font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.legend span { display: flex; align-items: center; gap: 8px; }
.legend i { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 1.5px rgba(0,0,0,.25), 0 0 6px var(--c); }
@media (max-width: 760px) { .legend { right: 8px; bottom: 50px; font-size: 10px; padding: 5px 8px; max-width: 165px; gap: 2px; } .legend b { display: none; } }
