@font-face {
  font-family: "Barlow Tunnel";
  src: url("/praful-de-pe-nisip/assets/fonts/BarlowCondensed.6553a31e71bb.woff2") format("woff2");
  font-display: swap;
}

@font-face {
  font-family: "Noto Dust";
  src: url("/praful-de-pe-nisip/assets/fonts/NotoSans.59ac1c6375a8.woff2") format("woff2");
  font-display: swap;
}

@font-face {
  font-family: "Plex Instrument";
  src: url("/praful-de-pe-nisip/assets/fonts/IBMPlexMono-Regular.81fc864103e7.woff2") format("woff2");
  font-display: swap;
}

:root {
  color-scheme: light;
  --tunnel-white: #f5fafa;
  --glass: #d7edf0;
  --glass-deep: #b8dce1;
  --ink: #10292f;
  --ink-soft: #40585f;
  --air: #087f96;
  --air-bright: #18a1b7;
  --dust: #a8322d;
  --dust-dark: #76221f;
  --sand: #d5a45e;
  --sand-light: #edc98e;
  --steel: #63777c;
  --caution: #f1cf63;
  --rule: #7d979d;
  --display: "Barlow Tunnel", "Arial Narrow", sans-serif;
  --sans: "Noto Dust", system-ui, sans-serif;
  --mono: "Plex Instrument", ui-monospace, monospace;
  --measure: 82rem;
}

* { box-sizing: border-box; }

html {
  background: var(--tunnel-white);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.55;
  text-size-adjust: 100%;
}

body { margin: 0; overflow-x: hidden; }
main { overflow: clip; }

a {
  align-items: center;
  color: inherit;
  display: inline-flex;
  min-height: 2.75rem;
  text-decoration-color: var(--dust);
  text-decoration-thickness: 2px;
  text-underline-offset: .18em;
}

a:hover { text-decoration-thickness: 4px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--dust); outline-offset: 4px; }

.skip-link {
  background: var(--ink);
  color: var(--tunnel-white);
  left: 1rem;
  padding: .7rem 1rem;
  position: fixed;
  top: 0;
  transform: translateY(-140%);
  z-index: 100;
}

.skip-link:focus { transform: translateY(0); }

.site-header, .site-footer {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin: 0 auto;
  max-width: calc(var(--measure) + 4rem);
  padding: .8rem 2rem;
}

.site-header {
  border-bottom: 1px solid var(--ink);
  min-height: 4.4rem;
}

.site-header nav { align-items: center; display: flex; gap: clamp(1rem, 3vw, 2.5rem); }
.maker {
  background: var(--ink);
  color: var(--tunnel-white);
  font: 700 .78rem var(--mono);
  height: 2.75rem;
  justify-content: center;
  text-decoration: none;
  width: 2.75rem;
}

.language {
  border: 1px solid var(--ink);
  padding: 0 .8rem;
  text-decoration: none;
}

h1, h2, h3, p { margin-top: 0; }
h1, h2 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: .94;
}

h1 {
  font-size: clamp(3.6rem, 6.2vw, 7rem);
  margin-bottom: 1.4rem;
  max-width: 10.2ch;
}

h1 span { color: var(--dust-dark); display: block; }
h2 { font-size: clamp(3rem, 5.6vw, 5.8rem); margin-bottom: 1.25rem; max-width: 13ch; }
h3 { font-size: 1.2rem; margin-bottom: .7rem; }

.eyebrow, .section-label, .trust, .edition, .instrument-head, .stage-controls, .scale-title, .scale-caveat, .tray-labels, .simulation-stamp, .grain-detail figcaption span, .ledger-head {
  font-family: var(--mono);
}

.hero {
  display: grid;
  gap: clamp(2rem, 4.5vw, 4.5rem);
  grid-template-columns: minmax(20rem, .72fr) minmax(35rem, 1.28fr);
  margin: 0 auto;
  max-width: var(--measure);
  min-height: calc(100svh - 4.4rem);
  padding: clamp(2.4rem, 5vw, 4.5rem) 2rem clamp(3rem, 6vw, 5rem);
}

.hero-copy { align-self: start; }
.eyebrow {
  border-left: .65rem solid var(--caution);
  color: var(--ink-soft);
  font-size: .74rem;
  letter-spacing: .055em;
  margin-bottom: 1.2rem;
  padding-left: .75rem;
  text-transform: uppercase;
}

.deck {
  font-size: clamp(1.08rem, 1.5vw, 1.28rem);
  line-height: 1.48;
  margin-bottom: 1rem;
  max-width: 38rem;
}

.trust {
  color: var(--ink-soft);
  font-size: .75rem;
  line-height: 1.75;
  margin: 0;
  max-width: 39rem;
  text-transform: uppercase;
}

.tunnel-lab {
  align-self: start;
  background: var(--glass);
  border: 2px solid var(--ink);
  box-shadow: .8rem .8rem 0 var(--ink);
  min-width: 0;
}

.instrument-head {
  align-items: center;
  background: var(--ink);
  color: var(--tunnel-white);
  display: flex;
  font-size: .72rem;
  justify-content: space-between;
  letter-spacing: .06em;
  min-height: 3.25rem;
  padding: .55rem .85rem;
  text-transform: uppercase;
}

.instrument-head p { align-items: center; display: flex; gap: .55rem; margin: 0; }
.instrument-head p span {
  background: var(--air-bright);
  border-radius: 50%;
  box-shadow: 0 0 0 .25rem rgb(24 161 183 / 18%);
  height: .62rem;
  width: .62rem;
}

.instrument-head strong { color: var(--caution); font-size: .9rem; }

.stage-controls {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.stage-controls button {
  background: var(--tunnel-white);
  border: 0;
  border-bottom: 1px solid var(--ink);
  color: var(--ink);
  cursor: pointer;
  font: 700 .74rem var(--mono);
  min-height: 3rem;
  padding: .65rem .75rem;
  text-transform: uppercase;
}

.stage-controls button + button { border-left: 1px solid var(--ink); }
.stage-controls button[aria-pressed="true"] { background: var(--caution); }
.stage-controls button:hover { box-shadow: inset 0 -.3rem var(--air); }

.tunnel-figure { background: var(--tunnel-white); margin: 0; padding: .75rem .8rem 0; }
.tray-labels {
  display: grid;
  font-size: .65rem;
  font-weight: 700;
  grid-template-columns: repeat(2, 1fr);
  letter-spacing: .04em;
  padding: .15rem .2rem .25rem;
  text-transform: uppercase;
}

.tray-labels span:last-child { border-left: 1px solid var(--rule); padding-left: .65rem; }
.tunnel-figure svg { display: block; height: auto; width: 100%; }
.glass { stroke: var(--ink); stroke-width: 4; }
.wind { fill: none; stroke: var(--air); stroke-linecap: round; stroke-width: 8; }
.wind-one { opacity: .98; }
.wind-two { opacity: .8; }
.wind-three { opacity: .6; }
.divider { stroke: var(--ink); stroke-dasharray: 8 8; stroke-width: 3; }
.bed-line { stroke: var(--ink); stroke-width: 3; }
.pure-bed { stroke: var(--ink); stroke-width: 3; }
.pure-bed + g { color: var(--sand); }
#pure-dust-ro circle, #pure-dust-en circle { fill: var(--sand-light); stroke: var(--ink); stroke-width: 1.1; }
.sand-bed circle { fill: var(--sand-light); stroke: var(--ink); stroke-width: 3; }
.mixed-dust circle, .flying-dust { fill: var(--dust); stroke: var(--dust-dark); stroke-width: 1.5; }
.layer { opacity: 0; pointer-events: none; transition: opacity .16s ease; }
.tunnel-lab[data-stage="outcome"] .outcome-layer, .tunnel-lab[data-stage="height"] .height-layer, .tunnel-lab[data-stage="thresholds"] .thresholds-layer { opacity: 1; }
.lift-path { fill: none; stroke: var(--dust); stroke-dasharray: 7 6; stroke-linecap: round; stroke-width: 4; }
.result, .height-text, .thresholds-layer text, .simulation-stamp {
  fill: var(--ink);
  font-family: var(--mono);
  font-size: 21px;
  font-weight: 700;
}

.result.no { fill: var(--steel); }
.result.yes { fill: var(--dust-dark); }
.height-rule { stroke: var(--ink-soft); stroke-dasharray: 5 5; stroke-width: 2; }
.height-arrow { fill: none; stroke: var(--air); stroke-width: 5; }
.height-focus { fill: none; stroke: var(--caution); stroke-width: 6; }
.height-text { font-size: 18px; }
.threshold-window { fill: rgb(245 250 250 / 92%); stroke: var(--steel); stroke-width: 3; }
.threshold-window.mixed { stroke: var(--dust); }
.thresholds-layer text { font-size: 17px; }
.simulation-stamp { fill: var(--ink-soft); font-size: 14px; letter-spacing: .05em; }

.tunnel-figure figcaption {
  align-items: baseline;
  border-top: 1px solid var(--rule);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: .8rem .2rem .9rem;
}

.tunnel-figure output { font-size: .92rem; font-weight: 700; }
.tunnel-figure figcaption span { color: var(--ink-soft); font: .62rem var(--mono); text-align: right; text-transform: uppercase; }

.threshold-scale {
  background: var(--ink);
  color: var(--tunnel-white);
  padding: .8rem .95rem .9rem;
}

.scale-title {
  color: var(--caution);
  display: flex;
  font-size: .66rem;
  justify-content: space-between;
  letter-spacing: .05em;
  margin: 0 0 .65rem;
  text-transform: uppercase;
}

.scale-title span { color: #bdd5d9; }
.threshold-scale ol {
  border-top: 2px solid var(--air-bright);
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr 1.35fr;
  list-style: none;
  margin: 0;
  padding: 0;
}

.threshold-scale li {
  min-width: 0;
  padding: .75rem .45rem 0;
  position: relative;
}

.threshold-scale li::before {
  background: var(--tunnel-white);
  border: 3px solid var(--air);
  border-radius: 50%;
  content: "";
  height: .72rem;
  left: .45rem;
  position: absolute;
  top: -.46rem;
  width: .72rem;
}

.threshold-scale li + li { border-left: 1px solid #536c72; }
.threshold-scale strong { color: var(--caution); display: block; font: 700 1.2rem var(--mono); }
.threshold-scale li span { color: #d5e4e6; display: block; font-size: .68rem; line-height: 1.35; }
.threshold-scale .at-shared::before { background: var(--caution); border-color: var(--caution); }
.threshold-scale .at-sand::before { border-color: var(--sand); }
.threshold-scale .at-pure::before { border-color: var(--dust); }
.tunnel-lab[data-stage="thresholds"] .threshold-scale { box-shadow: inset 0 0 0 3px var(--caution); }
.scale-caveat { color: #bdd5d9; font-size: .58rem; margin: .65rem 0 0; text-transform: uppercase; }

.static-steps {
  background: var(--tunnel-white);
  border-top: 1px solid var(--ink);
  margin: 0;
  padding: 1rem 1rem 1rem 2.2rem;
}

.static-steps li + li { margin-top: .4rem; }
.has-js .static-steps { display: none; }

.mechanism-section, .threshold-section, .limit-section, .scope-section {
  border-top: 1px solid var(--ink);
  display: grid;
  gap: clamp(2.5rem, 7vw, 7rem);
  grid-template-columns: minmax(0, .9fr) minmax(22rem, 1.1fr);
  margin: 0 auto;
  max-width: var(--measure);
  padding: clamp(4.5rem, 9vw, 8rem) 2rem;
}

.section-label {
  color: var(--air);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.section-copy > p:not(.section-label), .threshold-definition > p:not(.section-label), .scope-copy > p {
  font-size: clamp(1.02rem, 1.5vw, 1.18rem);
  max-width: 39rem;
}

.grain-detail {
  align-self: start;
  background: var(--glass);
  border: 2px solid var(--ink);
  margin: 0;
  padding: clamp(.8rem, 2.5vw, 1.6rem);
}

.grain-detail svg { display: block; height: auto; width: 100%; }
.reference-bed { stroke: var(--ink); stroke-dasharray: 8 7; stroke-width: 3; }
.detail-sand { fill: var(--sand-light); stroke: var(--ink); stroke-width: 5; }
.detail-dust { fill: var(--dust); stroke: var(--dust-dark); stroke-width: 4; }
.detail-wind { fill: none; stroke: var(--air); stroke-linecap: round; stroke-width: 9; }
.cohesion { fill: none; stroke: var(--caution); stroke-linecap: round; stroke-width: 8; }
.detail-label { fill: var(--ink); font: 700 19px var(--mono); }
.detail-label.quiet { fill: var(--ink-soft); font-size: 16px; }
.grain-detail figcaption { align-items: baseline; border-top: 1px solid var(--rule); display: flex; gap: 1rem; justify-content: space-between; padding-top: .9rem; }
.grain-detail figcaption span { color: var(--ink-soft); font-size: .62rem; text-align: right; text-transform: uppercase; }

.threshold-section { background: var(--ink); color: var(--tunnel-white); max-width: none; padding-left: max(2rem, calc((100vw - var(--measure)) / 2 + 2rem)); padding-right: max(2rem, calc((100vw - var(--measure)) / 2 + 2rem)); }
.threshold-definition h2 { color: var(--caution); }
.threshold-definition .section-label { color: #72d3df; }
.threshold-definition > p:not(.section-label) { color: #d9e7e9; }
.formula {
  align-items: baseline;
  border-bottom: 1px solid #779096;
  border-top: 1px solid #779096;
  display: flex;
  font-family: var(--mono);
  gap: 1rem;
  margin-top: 2rem;
  padding: 1rem 0;
}

.formula span:first-child { color: var(--caution); font-size: 2rem; }
.formula span:last-child { font-size: 1.25rem; }
.threshold-ledger { border: 1px solid #8aa0a5; }
.threshold-ledger > div { display: grid; gap: .25rem; grid-template-columns: 1fr; padding: 1rem 1.2rem; }
.threshold-ledger > div + div { border-top: 1px solid #8aa0a5; }
.threshold-ledger span { color: #9bdce4; font: .68rem var(--mono); text-transform: uppercase; }
.threshold-ledger strong { color: var(--caution); font: 700 clamp(2.5rem, 5vw, 4.5rem) var(--display); line-height: .95; }
.threshold-ledger p { color: #d9e7e9; margin: 0; }

.limit-section { grid-template-columns: minmax(0, .8fr) minmax(24rem, 1.2fr); }
.confidence-ledger { border: 2px solid var(--ink); display: grid; grid-template-columns: repeat(2, 1fr); }
.confidence-ledger > div { min-width: 0; padding: 1.15rem 1.3rem; }
.confidence-ledger > div + div { border-left: 1px solid var(--ink); }
.ledger-head {
  border-bottom: 4px solid var(--air);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .05em;
  padding-bottom: .75rem;
  text-transform: uppercase;
}

.ledger-head.unresolved { border-color: var(--dust); }
.confidence-ledger ul { margin: 0; padding-left: 1.2rem; }
.confidence-ledger li + li { margin-top: .9rem; }

.scope-section { background: var(--glass); grid-template-columns: minmax(0, .8fr) minmax(24rem, 1.2fr); }
.scope-copy h3 { border-top: 1px solid var(--ink); margin-top: 2rem; padding-top: 1.2rem; }
.omissions { columns: 2; gap: 2rem; margin-bottom: 1.5rem; padding-left: 1.2rem; }
.omissions li { break-inside: avoid; margin-bottom: .5rem; }
.source-list { list-style: none; margin: 0; padding: 0; }
.source-list li { border-top: 1px solid var(--rule); }
.source-list li:last-child { border-bottom: 1px solid var(--rule); }
.source-list a { display: flex; justify-content: space-between; padding: .35rem 0; width: 100%; }
.source-list a::after { color: var(--air); content: "↗"; font-family: var(--mono); padding-left: 1rem; }
.availability, .licence {
  background: var(--tunnel-white);
  border-left: .5rem solid var(--caution);
  margin-top: 1.5rem;
  padding: 1rem 1.1rem;
}

.licence { border-color: var(--air); }
.edition { color: var(--ink-soft); font-size: .7rem !important; letter-spacing: .04em; margin: 1.5rem 0 0; text-transform: uppercase; }

.site-footer {
  border-top: 1px solid var(--ink);
  color: var(--ink-soft);
  font-size: .85rem;
  min-height: 6rem;
}

.site-footer p { margin: 0; }

.error-page {
  background:
    linear-gradient(90deg, transparent 0 49.8%, rgb(16 41 47 / 14%) 49.8% 50.2%, transparent 50.2%),
    var(--glass);
  min-height: 100svh;
}

.error-page main {
  background: var(--tunnel-white);
  border: 2px solid var(--ink);
  box-shadow: .8rem .8rem 0 var(--ink);
  margin: clamp(4rem, 16vh, 10rem) auto;
  max-width: 44rem;
  padding: clamp(2rem, 6vw, 4rem);
  width: calc(100% - 2rem);
}

.error-page h1 { font-size: clamp(3.5rem, 10vw, 6.5rem); }
.error-link { border: 1px solid var(--ink); margin-top: 1rem; padding: .2rem 1rem; text-decoration: none; }

@media (max-width: 1050px) {
  .hero { grid-template-columns: 1fr; }
  .hero-copy { display: grid; grid-template-columns: minmax(0, 1fr) minmax(17rem, .7fr); gap: 0 2rem; }
  .hero-copy .eyebrow, .hero-copy h1 { grid-column: 1; }
  .hero-copy .deck, .hero-copy .trust { grid-column: 2; }
  .hero-copy .deck { grid-row: 1 / span 2; align-self: end; }
  .hero-copy .trust { align-self: start; }
  .mechanism-section, .threshold-section, .limit-section, .scope-section { gap: 3rem; }
}

@media (max-width: 780px) {
  .site-header, .site-footer { padding-left: 1rem; padding-right: 1rem; }
  .hero { grid-template-columns: 1fr; min-height: 0; padding: 2rem 1rem 3.2rem; }
  .hero-copy { display: block; }
  h1 { font-size: clamp(3.35rem, 15vw, 5rem); max-width: 9.4ch; }
  .tunnel-lab { box-shadow: .45rem .45rem 0 var(--ink); }
  .mechanism-section, .threshold-section, .limit-section, .scope-section {
    gap: 2.2rem;
    grid-template-columns: 1fr;
    padding: 4.5rem 1rem;
  }
  .threshold-section { padding-left: 1rem; padding-right: 1rem; }
  .confidence-ledger { grid-template-columns: 1fr; }
  .confidence-ledger > div + div { border-left: 0; border-top: 1px solid var(--ink); }
  .site-footer { align-items: flex-start; flex-direction: column; padding-bottom: 1.2rem; padding-top: 1.2rem; }
}

@media (max-width: 540px) {
  .site-header nav { gap: .65rem; }
  .site-header nav > a:first-child { display: none; }
  .hero { gap: 1.6rem; }
  .eyebrow { line-height: 1.5; }
  .deck { font-size: 1.04rem; }
  .trust { font-size: .68rem; line-height: 1.65; }
  .instrument-head { align-items: flex-start; flex-direction: column; gap: .15rem; }
  .stage-controls button { font-size: .62rem; padding-left: .25rem; padding-right: .25rem; }
  .tray-labels { font-size: .52rem; }
  .tunnel-figure { padding-left: .3rem; padding-right: .3rem; }
  .tunnel-figure figcaption { align-items: flex-start; flex-direction: column; gap: .4rem; }
  .tunnel-figure figcaption span { text-align: left; }
  .threshold-scale ol { border-top: 0; display: grid; grid-template-columns: 1fr; }
  .threshold-scale li { border-left: 2px solid var(--air-bright) !important; padding: .25rem 0 .7rem 1rem; }
  .threshold-scale li::before { height: .62rem; left: -.4rem; top: .35rem; width: .62rem; }
  .threshold-scale li + li { border-top: 1px solid #536c72; padding-top: .7rem; }
  .scale-title { align-items: flex-start; flex-direction: column; }
  h2 { font-size: clamp(2.8rem, 13vw, 4.2rem); }
  .grain-detail { padding: .5rem; }
  .grain-detail figcaption { align-items: flex-start; flex-direction: column; }
  .grain-detail figcaption span { text-align: left; }
  .omissions { columns: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

@media print {
  .site-header, .stage-controls, .site-footer { display: none; }
  .hero, .mechanism-section, .threshold-section, .limit-section, .scope-section { break-inside: avoid; }
  .tunnel-lab { box-shadow: none; }
  .static-steps { display: block !important; }
}
