/* Special Projects NYC — interactive homepage. */
html { height: 100%; }
.simulator-page { height: 100vh; height: 100dvh; display: grid; grid-template-rows: 92px minmax(0, 1fr); }
a { -webkit-tap-highlight-color: transparent; }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 50; transform: translateY(-170%); padding: 14px 20px; border-radius: 12px; color: white; background: var(--blue); }
.skip-link:focus { transform: translateY(0); }
.site-header { min-height: 0; padding: 0 max(4.1%, calc((100vw - 1470px) / 2)); gap: 25px; justify-content: flex-start; border-bottom: 4px solid var(--red); }
.site-name { margin: 0; width: min(600px, 100%); line-height: 1; }
.header-wordmark { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; padding: 6px 0; text-decoration: none; color: var(--ink); }
.chrome-wordmark {
  --crop: 50% 49%;
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 12 / 1;
  filter: drop-shadow(0 -.65px 0 #f1fbff) drop-shadow(0 .75px 0 #c0ddf4) drop-shadow(0 1.5px .6px #092450);
}
/* Keep the chrome and its reflected light inside the original letter contours. */
.chrome-wordmark img, .chrome-wordmark::after {
  -webkit-mask: url("assets/chrome-lettering.svg") var(--crop) / cover no-repeat;
  mask: url("assets/chrome-lettering.svg") var(--crop) / cover no-repeat;
}
.chrome-wordmark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--crop);
  filter: grayscale(1) contrast(.91) brightness(1.17);
}
.chrome-wordmark::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(112deg, transparent 9%, #cceaff45 16%, transparent 24%, transparent 54%, #e9faff62 61%, transparent 68%);
}
.wordmark-caption { font: 500 8px/1 var(--mono); letter-spacing: .85px; }
main { display: grid; grid-template-rows: minmax(0, 1fr); gap: 0; width: 100%; min-height: 0; padding: 15px 4.1% 17px; }
.playground-section { display: grid; grid-template-rows: minmax(0, 1fr); gap: 0; min-height: 0; }
.tunnel { display: grid; grid-template-rows: minmax(0, 1fr) auto auto; min-height: 0; border-radius: 24px; box-shadow: 0 5px 0 var(--ink); }
.scene { min-height: 0; height: auto; }
.scene-top { top: 17px; left: 20px; right: 20px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 16px; }
.project-cta { display: inline-flex; align-items: center; justify-content: center; justify-self: start; gap: 20px; min-width: 0; max-width: 100%; min-height: 76px; padding: 19px 30px; border: 2px solid var(--ink); border-radius: 999px; background: var(--yellow); color: var(--blue); box-shadow: 4px 5px 0 var(--ink); transform: rotate(-2deg); font-size: 23px; font-weight: 800; line-height: 1.1; text-decoration: none; pointer-events: auto; transition: transform 160ms ease, box-shadow 160ms ease; }
.project-cta .link-arrow { width: 28px; height: 28px; }
.project-cta:hover { transform: rotate(-1deg) translateY(-3px); box-shadow: 4px 8px 0 var(--ink); }
.project-cta:active { transform: rotate(0) translateY(3px); box-shadow: 0 1px 0 var(--ink); }
#random { pointer-events: auto; min-height: 64px; padding: 15px 29px; gap: 12px; font-size: 18px; }
#random .ui-icon { width: 23px; height: 23px; }
.scene-bottom { left: 20px; right: 18px; bottom: 14px; align-items: flex-end; }
.simulation-status { min-height: 28px; padding: 6px 9px; font-size: 10px; }
.scene-actions { gap: 9px; }
.scene-actions .round-button { width: 44px; height: 44px; }
.loading-note { bottom: 25px; }
.view-bar { display: flex; flex-wrap: nowrap; gap: 20px; padding: 10px 17px 12px; }
.surface-modes { gap: 9px; }
.surface-modes button { min-height: 43px; padding: 9px 15px; font-size: 13px; }
.color-key { margin-left: auto; }
#limits-button { width: 36px; height: 36px; font-size: 18px; color: var(--blue); background: var(--yellow); }
.controls { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, .8fr); gap: 17px; margin: 0; }
.control { grid-column: auto; padding: 10px 16px 8px; border-radius: 17px; }
.control-heading { min-height: 31px; font-size: 13px; }
.control-hint { margin-top: 2px; font-size: 10px; }
.control-heading output { min-width: 44px; font-size: 18px; }
input[type=range] { height: 34px; margin-top: 1px; }
.range-labels { font-size: 10px; }
.readouts { display: flex; justify-content: space-evenly; gap: 18px; align-items: center; }
.measurement { padding: 0; gap: 2px; }
.measurement strong { font-size: 30px; }
.measurement > span { font-size: 11px; }
.measurement small { font-size: 9px; }
.link-arrow { width: 22px; height: 22px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.scene.expanded { height: 100%; min-height: 0; }
@media (min-width: 1550px) { main { padding-inline: 0; } }
@media (max-width: 760px) {
  .simulator-page { grid-template-rows: 76px minmax(0, 1fr); }
  .site-header { padding-inline: 18px; }
  .site-name { width: min(500px, 100%); }
  .header-wordmark { gap: 5px; }
  .wordmark-caption { font-size: 6px; letter-spacing: .6px; }
  main { gap: 14px; padding: 12px 15px 14px; }
  .playground-section { gap: 0; }
  .tunnel { border-radius: 20px; }
  .scene-top { top: 13px; left: 13px; right: 13px; gap: 12px; }
  .project-cta { min-height: 64px; padding: 15px 22px; gap: 12px; font-size: 19px; }
  .project-cta .link-arrow { width: 24px; height: 24px; }
  #random { min-height: 57px; padding: 12px 19px; font-size: 16px; gap: 9px; }
  .scene-bottom { left: 13px; right: 13px; bottom: 12px; }
  .scene-actions { gap: 8px; }
  .scene-actions .round-button { width: 42px; height: 42px; }
  .simulation-status { min-height: 26px; padding: 5px 7px; font-size: 9px; gap: 5px; }
  .wind-label { top: 64%; left: 14px; font-size: 8px; }
  .loading-note { bottom: 60px; max-width: 86%; padding: 7px 10px; font-size: 9px; }
  .view-bar { padding: 9px 11px 11px; gap: 12px; }
  .surface-modes { gap: 7px; flex: 1; }
  .surface-modes button { min-height: 42px; flex: 1; padding: 8px 10px; font-size: 12px; }
  .color-key { position: absolute; top: 89px; bottom: auto; left: 17px; font-size: 8px; gap: 4px; background: #ffffffdd; padding: 4px 5px; border-radius: 5px; }
  .tunnel { position: relative; }
  .spectrum { width: 53px; height: 8px; }
  #limits-button { width: 34px; height: 34px; font-size: 17px; }
  .controls { grid-template-columns: 1fr 1fr; gap: 9px 12px; }
  .control { grid-column: auto; padding: 9px 12px 7px; border-radius: 15px; }
  .control-heading { font-size: 12px; }
  .control-heading output { font-size: 17px; min-width: 39px; padding: 3px 6px; }
  .control-hint { font-size: 9px; margin-top: 2px; }
  input[type=range] { height: 35px; margin-top: 1px; }
  .range-labels { font-size: 9px; }
  .readouts { grid-column: 1 / -1; justify-content: center; gap: 35px; padding: 2px 0 0; }
  .measurement { flex-direction: row; gap: 7px; align-items: baseline; }
  .measurement > span { font-size: 10px; }
  .measurement strong { font-size: 19px; letter-spacing: -.5px; }
  .measurement i { font-size: 8px; }
  .measurement small { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
@media (max-width: 480px) {
  .simulator-page { grid-template-rows: 59px minmax(0, 1fr); }
  .site-header { padding-inline: 12px; gap: 16px; }
  .site-name { width: 100%; }
  .wordmark-caption { display: none; }
  main { padding: 10px 11px 12px; gap: 13px; }
  .playground-section { gap: 0; }
  .scene-top { top: 11px; left: 11px; right: 11px; gap: 10px; }
  .project-cta { min-height: 60px; padding: 13px 12px; gap: 8px; font-size: 15px; }
  .project-cta .link-arrow { width: 20px; height: 20px; }
  .color-key { top: 81px; }
  #random { min-height: 56px; font-size: 15px; padding-inline: 18px; }
  #random .ui-icon { width: 21px; height: 21px; }
  .scene-bottom { left: 11px; right: 11px; bottom: 11px; }
  .view-bar { padding: 8px 10px 10px; gap: 9px; }
  .surface-modes { gap: 6px; }
  .surface-modes button { font-size: 11px; padding: 8px 7px; gap: 4px; }
  .surface-modes .ui-icon { width: 14px; height: 14px; }
  .surface-modes .mode-icon { width: 14px; height: 14px; }
  #limits-button { width: 30px; height: 30px; font-size: 15px; }
  .control { padding: 8px 10px 7px; }
  .control-heading { font-size: 11px; gap: 4px; }
  .control-heading output { font-size: 16px; min-width: 34px; }
  .control-hint { font-size: 8px; }
  .range-labels { font-size: 8px; }
  .readouts { gap: 31px; }
  .link-arrow { width: 19px; height: 19px; }
}
@media (max-height: 740px) and (min-width: 761px) {
  .simulator-page { grid-template-rows: 84px minmax(0, 1fr); }
  main { padding-top: 11px; padding-bottom: 12px; gap: 12px; }
  .playground-section { gap: 0; }
  .control { padding-block: 7px 6px; }
  .control-heading { min-height: 27px; }
  .view-bar { padding-block: 8px 10px; }
}
@media (max-height: 700px) and (max-width: 760px) {
  .header-wordmark { padding-block: 3px; gap: 3px; }
  .wordmark-caption { display: none; }
  .simulator-page { grid-template-rows: 53px minmax(0, 1fr); }
  main { padding-block: 8px 10px; gap: 10px; }
  .playground-section { gap: 0; }
  .range-labels { display: none; }
  .control { padding-block: 6px 4px; }
  .control-heading { min-height: 26px; }
  .scene-top { top: 9px; }
}
@media (max-width: 360px) {
  .site-header { gap: 11px; }
  .site-name { width: 100%; }
  .wordmark-caption { font-size: 4.5px; }
  .surface-modes .ui-icon, .surface-modes .mode-icon { display: none; }
  .project-cta { text-align: center; }
  .project-cta .link-arrow { display: none; }
}
@media (max-height: 540px) and (min-width: 500px) {
  .site-name { width: min(400px, 100%); }
  .header-wordmark { padding-block: 3px; gap: 3px; }
  .wordmark-caption { font-size: 6px; }
  .simulator-page { grid-template-rows: 53px minmax(0, 1fr); }
  main { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); padding: 10px 18px 13px; gap: 16px; }
  .readouts { display: none; }
  .controls { grid-template-columns: 1fr 1fr; }
  .range-labels { display: none; }
  .control-hint { display: none; }
  .control { padding: 6px 12px 4px; }
  .control-heading { min-height: 26px; }
  .control-heading output { font-size: 15px; }
  .scene-top { top: 10px; left: 12px; right: 12px; }
  .project-cta { min-height: 48px; padding: 10px 15px; gap: 9px; font-size: 16px; }
  .project-cta .link-arrow { width: 20px; height: 20px; }
  #random { min-height: 48px; font-size: 14px; padding: 10px 17px; }
  .surface-modes button { min-height: 36px; padding: 7px 9px; }
  .view-bar { padding: 6px 10px 8px; }
  .color-key { display: none; }
  .simulation-status { font-size: 8px; }
}
@media (max-height: 540px) and (min-width: 500px) and (max-width: 650px) {
  main { grid-template-columns: minmax(0, 1fr); padding-inline: 10px; gap: 12px; }
  #random { width: 48px; padding: 10px; gap: 0; font-size: 0; }
  .surface-modes .ui-icon, .surface-modes .mode-icon { display: none; }
  .surface-modes { gap: 5px; }
  .surface-modes button { font-size: 10px; padding-inline: 7px; }
  .view-bar { gap: 7px; }
  .control { padding-inline: 8px; }
  .control-heading { font-size: 10px; gap: 3px; }
  .control-heading output { font-size: 13px; min-width: 28px; }
}

/* Quiet controls are part of the tunnel, with no individual panels. */
.tunnel .controls { margin: 0; padding: 12px 20px 15px; background: white; border-top: 1px solid #143b7324; gap: 22px; }
.tunnel .control { --control-accent: var(--blue); padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--ink); box-shadow: none; }
.tunnel .control-heading { font-size: 12px; font-weight: 600; }
.tunnel .control-heading output { border: 0; background: transparent; padding: 0; min-width: 33px; color: var(--blue); font-size: 17px; }
.tunnel .control .control-hint { color: var(--muted); font-size: 9px; font-weight: 400; }
.tunnel .control .range-labels { color: var(--muted); font-size: 9px; font-weight: 400; }
.tunnel input[type=range] { height: 32px; margin-top: 1px; }
.tunnel input[type=range]::-webkit-slider-runnable-track { height: 5px; border: 0; background: linear-gradient(to right, var(--blue) var(--range-fill, 50%), #e3e9f0 var(--range-fill, 50%)); }
.tunnel input[type=range]::-webkit-slider-thumb { width: 20px; height: 20px; margin-top: -7.5px; border: 2px solid var(--blue); background: white; box-shadow: 0 2px 3px #143b7324; }
.tunnel input[type=range]:hover::-webkit-slider-thumb, .tunnel input[type=range]:focus-visible::-webkit-slider-thumb { background: #eaf1ff; transform: scale(1.1); }
.tunnel input[type=range]::-moz-range-track { height: 5px; border: 0; background: linear-gradient(to right, var(--blue) var(--range-fill, 50%), #e3e9f0 var(--range-fill, 50%)); }
.tunnel input[type=range]::-moz-range-thumb { width: 17px; height: 17px; border: 2px solid var(--blue); background: white; box-shadow: 0 2px 3px #143b7324; }
.tunnel .measurement strong { font-size: 26px; }
@media (max-width: 760px) {
  .tunnel .controls { padding: 10px 14px 11px; gap: 5px 22px; }
  .tunnel .control-heading { font-size: 11px; }
  .tunnel .control-heading output { font-size: 16px; }
  .tunnel .control .control-hint, .tunnel .control .range-labels { font-size: 8px; }
  .tunnel .readouts { padding-top: 2px; gap: 30px; }
  .tunnel .measurement strong { font-size: 18px; }
}
@media (max-width: 360px) { .tunnel .controls { padding-inline: 12px; gap: 5px 18px; } }
@media (max-height: 540px) and (min-width: 500px) {
  .tunnel .controls { padding: 6px 12px 8px; gap: 18px; }
  .tunnel input[type=range] { height: 26px; }
}

/* Keep the model scope visible beside the simulation status. */
.scene-status { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; }
.model-note { color: var(--ink); font-size: 10px; font-weight: 600; background: #fffefbdb; padding: 2px 0; }
@media (max-width: 480px) { .model-note { font-size: 8px; } .scene-status { gap: 5px; } }

/* Published cases: the controls select source data or orbit the view. */
#scene-canvas { cursor: grab; touch-action: none; }
#scene-canvas:active { cursor: grabbing; }
#scene-canvas:focus-visible { outline: 3px solid var(--blue); outline-offset: -5px; }
.surface-modes [hidden] { display: none; }
.source-credit { font-size: 12px; color: var(--muted); }
#case-output { white-space: nowrap; }
button:disabled { cursor: wait; }

#playback { background: var(--paper); color: var(--ink); }
#playback[hidden] { display: none; }
#playback svg { stroke-width: 2.7; }
.spectrum { background: linear-gradient(90deg,#1931cf,#0078f5,#00d9e2,#23dd4b,#dfed12,#ffa700,#eb1d14); }

#scene-canvas[hidden], #flow-modes[hidden], #color-key[hidden], #skate-credit[hidden] { display: none; }
#skate-credit { margin-right: auto; color: var(--blue); font-size: 12px; font-weight: 650; text-underline-offset: 3px; }

/* Chrome lettering and cyanotype ruling share the header. */
.site-header { background: transparent; border-bottom: 1px solid rgb(219 243 255 / 46%); }
.wordmark-caption { color: #eef8ff; }

/* Keep the stage and its instrument controls on one charcoal surface. */
.tunnel {
  --control-blue: #85bdff;
  --control-text: #f0f5fc;
  --control-muted: #b2bfcd;
  border-color: #a1c0e0;
  background: var(--stage);
  box-shadow: 0 4px 0 #08234d;
}
.scene, #scene-canvas { background: var(--stage); }
.tunnel .view-bar, .tunnel .controls {
  background: var(--stage);
  border-top: 1px solid #353d46;
  color: var(--control-text);
}
.tunnel .control, .measurement strong, .measurement > span { color: var(--control-text); }
.tunnel .control-heading output, #skate-credit { color: var(--control-blue); }
.tunnel .control .control-hint, .tunnel .control .range-labels, .measurement small,
.measurement i, .color-key { color: var(--control-muted); }
.tunnel input[type=range]::-webkit-slider-runnable-track { background: linear-gradient(to right, var(--control-blue) var(--range-fill, 50%), #434a56 var(--range-fill, 50%)); }
.tunnel input[type=range]::-moz-range-track { background: linear-gradient(to right, var(--control-blue) var(--range-fill, 50%), #434a56 var(--range-fill, 50%)); }
.tunnel input[type=range]::-webkit-slider-thumb { border-color: var(--control-blue); background: var(--stage); }
.tunnel input[type=range]::-moz-range-thumb { border-color: var(--control-blue); background: var(--stage); }
.surface-modes button, #playback {
  background: #11171f; color: var(--control-text);
  border-color: #677e98; box-shadow: 0 2px 0 #283240;
}
.surface-modes button[aria-pressed=true] { background: var(--red); color: white; border-color: #fc636f; }
.model-note { color: #e5eff9; background: transparent; text-shadow: 0 1px 4px #000, 0 0 8px #000; }
.simulation-status { color: #dae6f5; background: #0c1018ef; border-color: #52657d; }
.simulation-status i { background: #79baff; }
.simulation-status i.busy { background: #ff6575; }
.simulation-status i.paused { background: #a4b3c3; }
.tunnel :focus-visible { outline-color: #9bd1ff; }
@media (max-width: 760px) {
  .color-key { background: #080b11e8; }
}
