:root {
  --display: "Instrument Serif", "Baskervville", Georgia, "Times New Roman", serif;
  --body: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
}
body { background: var(--paper); }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.mast { border: 0; }
.mast-inner, .workspace, .research {
  width: 100%;
  max-width: 1850px;
  margin-inline: auto;
  padding-inline: clamp(16px, 2.7vw, 46px);
}
.brand h1 {
  color: var(--ink);
  font: normal clamp(33px, 4vw, 64px)/1 var(--display);
  letter-spacing: -.05em;
}
body[data-view="overview"] .mast-inner {
  gap: 22px;
  padding-block: clamp(14px, 1.9vw, 28px);
}
body[data-view="overview"] .brand {
  display: grid;
  grid-template-columns: max-content minmax(0,1fr);
  align-items: baseline;
  gap: 7px 14px;
}
body[data-view="overview"] .brand h1 { grid-area: 1 / 1; }
.park-intro { grid-column: 1 / -1; grid-row: 2; color: var(--muted); font-size: clamp(13px, 1.05vw, 15px); }
.demo-state {
  grid-area: 1 / 2; justify-self: start; align-self: baseline;
  padding-left: 11px; border-left: 1px solid var(--line);
  color: var(--muted); font: 500 11px/1.2 var(--mono);
}
body:not([data-view="overview"]) .park-intro, body:not([data-view="overview"]) .demo-state { display: none; }

#startTrevi {
  --pin-offset: 6px;
  z-index: 1; gap: 10px; padding: 5px 8px 6px 10px; text-align: left;
  border: 1px solid var(--white); border-radius: 2px; background: var(--accent); color: white;
}
#startTrevi .pin-caption { display: grid; gap: 3px; }
#startTrevi small { font: 550 9px/1 var(--body); letter-spacing: .06em; text-transform: uppercase; }
#startTrevi strong { font: 600 13px/1.05 var(--body); }
#startTrevi svg, #treviBack svg { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
#startTrevi svg { width: 17px; height: 17px; stroke-width: 1.8; }
#startTrevi::before {
  content: ""; display: block; position: absolute; top: -5px; left: calc(50% - 4px);
  width: 8px; height: 8px; border: 1px solid var(--white); border-width: 1px 0 0 1px;
  background: inherit; transform: rotate(45deg);
}
#startTrevi:hover, #startTrevi:focus-visible { background: var(--accent-hover); }
#startTrevi:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
body[data-view="overview"] .workspace { padding-top: 0; }
body[data-view="overview"] #viewport { border-radius: 2px; }
body[data-view="overview"] .park-nav-title {
  margin-block: 11px 10px;
  font: normal clamp(22px, 2.1vw, 31px)/1.1 var(--display);
  letter-spacing: -.035em;
}
body[data-view="overview"] #destinations { gap: 10px; }
body[data-view="overview"] .dest {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  border: 0;
  border-radius: 0;
  background: transparent;
}
body[data-view="overview"] .dest img { border-radius: 3px; aspect-ratio: 1.95; }
body[data-view="overview"] .dest .place { padding: 6px 1px; white-space: normal; }
body[data-view="overview"] .dest strong { font: 600 12px/1.2 var(--body); color: var(--ink); }
body[data-view="overview"] .dest small { font-size: 11px; }
body[data-view="overview"] .dest .arrow { display: none; }
body[data-view="overview"] .dest:hover strong { text-decoration: underline; text-underline-offset: 2px; }
body[data-view="overview"] .dest:hover img, body[data-view="overview"] .dest:focus-visible img {
  outline: 2px solid var(--ink); outline-offset: -2px;
}
body:not([data-view="overview"]) #lighting { border-top: 0; margin-top: 0; padding-top: 13px; }
body:not([data-view="overview"]) aside nav { border-top: 1px solid var(--line); margin-top: 15px; }
body:not([data-view="overview"]) .park-nav-title { display: none; }
body:not([data-view="overview"]) .tools { right: 12px; left: auto; }
#treviBack {
  position: absolute; top: 12px; left: 12px; z-index: 4;
  display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 12px 0 10px;
  border: 1px solid var(--white); border-radius: 5px; background: var(--ink); color: var(--white);
  font: 600 13px/1.2 var(--body); white-space: nowrap;
}
#treviBack svg { width: 19px; height: 19px; flex: none; stroke-width: 2.1; }
#treviBack:hover { background: #111; }
#treviBack:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
html:not(.trevi-studio) .gallery-paging { display: none; }
#segmentation-title { text-wrap: balance; }
#atlasAll { flex-shrink: 0; }
#notice:empty { display: none; }
.hint-icon, .section-icon, .method-icon {
  flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.hint-icon { width: 17px; height: 17px; }
figcaption { align-items: center; }
body[data-view="overview"] #overviewHint, .gesture-hint {
  display: inline-flex; align-items: center; gap: 5px;
}
body[data-view="overview"] #overviewHint {
  margin-top: 0; font-weight: 600; color: var(--ink);
}
.gesture-hint .hint-icon { color: var(--muted); }
#load { width: max-content; max-width: calc(100% - 24px); }
#loadText { font-variant-numeric: tabular-nums; }
#keyboardHint {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
}
#keyboardHint > span { white-space: nowrap; }
#keyboardHint kbd {
  padding: 0 3px;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--ink);
  font: 600 1em/1.2 var(--mono);
}
@media (pointer: coarse) { #keyboardHint { display: none; } }
.section-icon { width: 21px; height: 21px; color: var(--muted); }
#lighting-title, #segmentation-title, body[data-view="overview"] .park-nav-title {
  display: flex; align-items: center; gap: 8px;
}
#parts-help { margin: 0 0 10px; }
#mix-help strong { color: #842d2b; font-weight: 700; }
#mixer:hover #cursor, #mixer:focus-visible #cursor { outline: 2px solid white; outline-offset: 1px; }
.trevi-studio #atlasParts button:focus-visible, .trevi-studio #atlasParts button:hover:enabled {
  border-color: var(--ink);
}

.research {
  display: grid;
  grid-template-columns: minmax(200px, .85fr) minmax(0, 1.75fr);
  column-gap: clamp(28px, 6vw, 105px);
  padding-bottom: clamp(24px, 3.4vw, 54px);
}
.research::before {
  content: "";
  grid-column: 1/-1;
  border-top: 1px solid var(--line);
  margin-block: clamp(9px, 1.2vw, 22px) clamp(18px, 2.3vw, 40px);
}
.research-intro {
  grid-column: 1;
  grid-row: 2;
  align-self: start;
  min-width: 0;
}
.research-intro h2 {
  color: var(--ink);
  font: normal clamp(29px, 3.1vw, 48px)/1.04 var(--display);
  letter-spacing: -.045em;
}
.research-intro > p {
  max-width: 42ch;
  margin-top: 12px;
  color: var(--muted);
  font: 400 clamp(14px, 1.15vw, 17px)/1.55 var(--body);
}
#sourceGallery > p {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.5;
}
#sourcePhotos {
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
}
#sourcePhotos:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
#sourcePhotos li { flex: none; }
#sourcePhotos img {
  display: block;
  width: auto;
  height: clamp(60px, 5.2vw, 76px);
  max-width: none;
  border-radius: 2px;
}
.research-details { grid-column: 2; grid-row: 2; }
.research-methods {
  display: grid;
  align-content: start;
  margin: 0;
}
@media (min-width: 701px) {
  .research-methods { height: 100%; align-content: space-between; }
  .research-methods > div:last-child { padding-bottom: 0; }
}
.research-methods > div { display: grid; grid-template-columns: minmax(105px, .53fr) minmax(0, 1.55fr); gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.research-methods > div:first-child { padding-top: 0; border-top: 0; }
.research-methods dt { display: flex; align-items: baseline; gap: 7px; color: var(--ink); font: 600 14px/1.5 var(--body); }
.method-icon { align-self: flex-start; width: 16px; height: 16px; margin-top: 2px; color: var(--muted); }
.research-methods dd { max-width: 70ch; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.63; }
.research a { text-decoration-color: var(--stroke); color: var(--ink); text-underline-offset: .17em; }
.research a:hover { text-decoration-color: currentColor; }
.vr-note {
  grid-column: 1 / -1;
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}
.demo-footer {
  display: flex; justify-content: center; align-items: center; gap: 7px; padding: 15px;
  border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 500;
}
.demo-footer .hint-icon { color: var(--muted); }

@media (max-width: 900px) {
  .research { grid-template-columns: minmax(165px, .72fr) minmax(0, 1.55fr); gap: 0 26px; }
  .research-methods > div { grid-template-columns: 1fr; gap: 3px; }
}
@media (max-width: 700px) {
  .mast-inner, .workspace, .research { padding-inline: 12px; }
  body[data-view="overview"] .mast-inner { display: grid; gap: 12px; padding-block: 17px 11px; }
  body[data-view="overview"] .brand { column-gap: 10px; row-gap: 3px; }
  #startTrevi { --pin-offset: 5px; gap: 4px; padding: 4px 5px 4px 6px; border-radius: 2px; }
  #startTrevi strong { font-size: 10px; }
  #startTrevi small { font-size: 8px; }
  #startTrevi svg { width: 16px; height: 16px; padding: 2px; }
  #startTrevi::after { content: ""; position: absolute; inset: -3px; }
  #treviBack { top: 8px; left: 8px; }
  body[data-view="overview"] #destinations { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; }
  .research { display: block; }
  .research::before { display: block; margin-block: 8px 18px; }
  .research-intro > p { margin-block: 7px 14px; }
  .research-intro { margin-bottom: 20px; }
  .research-methods > div { padding-block: 11px; }
  .vr-note { margin-top: 0; }
}
@media (max-width: 480px) {
  body[data-view="overview"] #destinations { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  body[data-view="overview"] #destinations img { aspect-ratio: 2.6; }
  body:not([data-view="overview"]) #lighting { padding-top: 9px; }
  .section-icon { width: 18px; height: 18px; }
  .hint-icon { width: 14px; height: 14px; }
}
