/* The Brass Orrery - observatory nocturne, oiled brass */

:root {
  --green-black: #0a120e;
  --green-deep: #050907;
  --green-smoke: #14221a;
  --green-veil: rgba(21, 39, 30, 0.82);
  --brass: #b98a3e;
  --brass-bright: #e3bd75;
  --brass-dim: #7a5527;
  --ivory: #f3ead4;
  --ivory-soft: #d8ceb7;
  --ink: #d9cfbc;
  --muted: #a99b82;
  --garnet: #7e1f22;
  --garnet-hot: #bd4140;
  --line: rgba(185, 138, 62, 0.28);
  --line-soft: rgba(243, 234, 212, 0.12);
  --shadow: rgba(0, 0, 0, 0.48);
  --display: 'Cinzel', serif;
  --body: 'Crimson Pro', serif;
  --header-h: 66px;
  --sight-angle: 0deg;
  --sight-radius: 30%;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  color-scheme: dark;
  background: var(--green-black);
  scrollbar-color: var(--brass-dim) var(--green-deep);
  scrollbar-width: thin;
}

html,
body {
  margin: 0;
  min-height: 100%;
  overflow-x: clip;
}

body {
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.16rem;
  line-height: 1.62;
  background:
    conic-gradient(from 12deg at 73% 24%, rgba(185, 138, 62, 0.045), transparent 16%, rgba(126, 31, 34, 0.08), transparent 45%),
    radial-gradient(circle at 18% 9%, rgba(185, 138, 62, 0.12), transparent 26rem),
    radial-gradient(circle at 86% 4%, rgba(126, 31, 34, 0.16), transparent 24rem),
    linear-gradient(180deg, #0d1812 0%, var(--green-black) 38%, #060a08 100%);
  -webkit-font-smoothing: antialiased;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "liga" 1, "onum" 1;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  z-index: 80;
  opacity: 0.075;
  mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)' opacity='.75'/%3E%3C/svg%3E");
}

body::after {
  z-index: 79;
  background:
    radial-gradient(ellipse 90% 65% at 50% 28%, transparent 48%, rgba(1, 3, 2, 0.32) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.12), transparent 16%, transparent 84%, rgba(0, 0, 0, 0.16));
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--green-deep);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--brass-bright), var(--brass-dim));
  border: 3px solid var(--green-deep);
}

::selection {
  background: var(--brass-bright);
  color: var(--green-deep);
}

a {
  color: var(--brass-bright);
  text-decoration-color: rgba(227, 189, 117, 0.42);
  text-underline-offset: 0.18em;
  transition: color 180ms ease, text-decoration-color 180ms ease;
}

a:hover {
  color: var(--ivory);
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--brass-bright);
  outline-offset: 4px;
}

p {
  text-wrap: pretty;
}

.skip-link {
  position: fixed;
  top: -5rem;
  left: 1rem;
  z-index: 120;
  background: var(--ivory);
  color: var(--green-deep);
  padding: 0.75rem 1rem;
  font-family: var(--display);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  transition: top 180ms ease;
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
  padding: 0 clamp(1rem, 4vw, 3.5rem);
  background:
    linear-gradient(180deg, rgba(5, 9, 7, 0.94), rgba(5, 9, 7, 0.72)),
    linear-gradient(90deg, rgba(185, 138, 62, 0.08), transparent 34%, rgba(126, 31, 34, 0.08));
  border-bottom: 1px solid rgba(185, 138, 62, 0.24);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 44px;
  color: var(--ivory);
  font-family: var(--display);
  font-size: clamp(0.8rem, 1.25vw, 1rem);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}

.brand-mark {
  position: relative;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border: 1px solid var(--brass-bright);
  border-radius: 50%;
  box-shadow: 0 0 18px rgba(227, 189, 117, 0.25);
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid var(--brass);
  transform: rotate(45deg);
}

.brand-mark::after {
  inset: 9px;
  border-radius: 50%;
  background: var(--ivory);
  box-shadow: 0 0 10px rgba(243, 234, 212, 0.6);
}

.site-header nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(0.1rem, 1vw, 0.8rem);
}

.site-header nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.65rem 0.62rem;
  color: var(--ivory-soft);
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
}

.site-header nav a::after,
.site-footer a::after {
  content: "";
  position: absolute;
  left: 0.55rem;
  right: 0.55rem;
  bottom: 0.56rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--brass-bright), transparent);
  opacity: 0;
  transform: scaleX(0.35);
  transition: opacity 180ms ease, transform 180ms ease;
}

.site-header nav a:hover {
  color: var(--brass-bright);
}

.site-header nav a:hover::after,
.site-header nav a:focus-visible::after,
.site-header nav a[aria-current="page"]::after,
.site-footer a:hover::after,
.site-footer a:focus-visible::after {
  opacity: 0.9;
  transform: scaleX(1);
}

main {
  position: relative;
  z-index: 1;
}

main section[id] {
  scroll-margin-top: calc(var(--header-h) + 1rem);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(22rem, 0.72fr) minmax(520px, 1.28fr);
  align-items: center;
  gap: clamp(1.2rem, 3.6vw, 4rem);
  min-height: 100svh;
  padding: calc(var(--header-h) + clamp(1.4rem, 3vw, 3.6rem)) clamp(1rem, 5vw, 4.5rem) clamp(2.1rem, 4vw, 4.2rem);
  isolation: isolate;
  overflow: clip;
}

.hero::before {
  content: "";
  position: absolute;
  inset: var(--header-h) clamp(0.75rem, 4vw, 4rem) 2rem;
  z-index: -2;
  border-left: 1px solid rgba(185, 138, 62, 0.18);
  border-right: 1px solid rgba(185, 138, 62, 0.12);
  background:
    linear-gradient(90deg, transparent 0 17%, rgba(227, 189, 117, 0.07) 17.1% 17.2%, transparent 17.3% 82.7%, rgba(227, 189, 117, 0.07) 82.8% 82.9%, transparent 83%),
    radial-gradient(ellipse 42% 30% at 70% 42%, rgba(227, 189, 117, 0.1), transparent 72%);
}

.hero-sky {
  position: absolute;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(circle at 73% 35%, rgba(243, 234, 212, 0.08) 0 1px, transparent 1.5px),
    radial-gradient(circle at 58% 18%, rgba(243, 234, 212, 0.11) 0 1px, transparent 1.5px),
    radial-gradient(circle at 90% 17%, rgba(185, 138, 62, 0.18) 0 1px, transparent 1.5px),
    radial-gradient(circle at 35% 27%, rgba(243, 234, 212, 0.08) 0 1px, transparent 1.5px);
  background-size: 240px 240px, 310px 310px, 180px 180px, 420px 420px;
  opacity: 0.82;
}

.hero-copy,
.instrument-shell {
  opacity: 0;
  transform: translateY(22px);
}

.hero-copy > * {
  opacity: 0;
  transform: translateY(18px);
}

body.is-loaded .hero-copy {
  animation: rise-in 900ms cubic-bezier(.2, .9, .2, 1) 90ms forwards;
}

body.is-loaded .hero-copy > * {
  animation: rise-in 760ms cubic-bezier(.2, .9, .2, 1) forwards;
}

body.is-loaded .hero-copy > :nth-child(1) {
  animation-delay: 130ms;
}

body.is-loaded .hero-copy > :nth-child(2) {
  animation-delay: 220ms;
}

body.is-loaded .hero-copy > :nth-child(3) {
  animation-delay: 330ms;
}

body.is-loaded .hero-copy > :nth-child(4) {
  animation-delay: 440ms;
}

body.is-loaded .instrument-shell {
  animation: rise-in 1000ms cubic-bezier(.2, .9, .2, 1) 260ms forwards;
}

.kicker {
  margin: 0 0 0.9rem;
  color: var(--brass-bright);
  font-family: var(--display);
  font-size: clamp(0.72rem, 1.3vw, 0.85rem);
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1.35;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--ivory);
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.06;
  text-wrap: balance;
  font-optical-sizing: auto;
}

h1 {
  max-width: 9ch;
  font-size: clamp(3.15rem, 8.2vw, 8.7rem);
  letter-spacing: 0.006em;
  text-shadow: 0 12px 38px rgba(0, 0, 0, 0.52);
}

.hero-lede {
  max-width: 38rem;
  margin: clamp(1.1rem, 2vw, 1.8rem) 0 0;
  color: var(--ivory-soft);
  font-size: clamp(1.2rem, 1.75vw, 1.55rem);
  line-height: 1.42;
}

.hero-ledger {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  max-width: 43rem;
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
  border: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(227, 189, 117, 0.5), rgba(126, 31, 34, 0.46)),
    var(--line);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
}

.hero-ledger p {
  min-width: 0;
  margin: 0;
  padding: 0.95rem 1rem;
  background:
    linear-gradient(135deg, rgba(243, 234, 212, 0.04), transparent 42%),
    rgba(5, 9, 7, 0.76);
}

.hero-ledger span,
.readout-label,
.workshop-ticket span,
.note-number {
  display: block;
  color: var(--muted);
  font-family: var(--display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.25;
  text-transform: uppercase;
}

.hero-ledger strong {
  display: block;
  margin-top: 0.32rem;
  color: var(--ivory);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.18;
  white-space: nowrap;
}

.instrument-shell {
  position: relative;
  min-width: 0;
  --mode-mix: 0;
  --time-spin: 0deg;
  padding: clamp(0.75rem, 1.8vw, 1.1rem);
  border: 1px solid rgba(227, 189, 117, 0.36);
  background:
    linear-gradient(135deg, rgba(243, 234, 212, 0.08), transparent 24%),
    radial-gradient(circle at 50% 36%, rgba(185, 138, 62, 0.22), transparent 50%),
    radial-gradient(circle at calc(30% + (40% * var(--mode-mix))) 26%, rgba(126, 31, 34, 0.2), transparent 34%),
    rgba(3, 6, 5, 0.72);
  box-shadow:
    inset 0 0 0 1px rgba(243, 234, 212, 0.055),
    0 34px 100px rgba(0, 0, 0, 0.48),
    0 0 75px rgba(185, 138, 62, 0.1);
  transition: border-color 420ms ease, box-shadow 420ms ease;
}

.instrument-shell.is-rerigging {
  border-color: rgba(227, 189, 117, 0.74);
  box-shadow:
    inset 0 0 0 1px rgba(243, 234, 212, 0.09),
    0 36px 105px rgba(0, 0, 0, 0.54),
    0 0 98px rgba(185, 138, 62, 0.2);
}

.instrument-shell.is-sighting {
  border-color: rgba(227, 189, 117, 0.82);
  box-shadow:
    inset 0 0 0 1px rgba(243, 234, 212, 0.1),
    0 38px 112px rgba(0, 0, 0, 0.56),
    0 0 112px rgba(185, 138, 62, 0.22);
}

.instrument-shell::before,
.instrument-shell::after,
.scope-rim {
  content: "";
  position: absolute;
  pointer-events: none;
}

.instrument-shell::before {
  inset: 0;
  background:
    linear-gradient(90deg, rgba(185, 138, 62, 0.18), transparent 12%, transparent 88%, rgba(185, 138, 62, 0.14)),
    repeating-linear-gradient(90deg, transparent 0 18px, rgba(227, 189, 117, 0.035) 18px 19px);
  opacity: 0.54;
}

.instrument-shell::after {
  top: 0.62rem;
  left: 0.62rem;
  right: 0.62rem;
  height: 34px;
  border-top: 1px solid rgba(243, 234, 212, 0.18);
  border-left: 1px solid rgba(243, 234, 212, 0.08);
  border-right: 1px solid rgba(243, 234, 212, 0.08);
}

.scope-rim {
  inset: clamp(1rem, 2vw, 1.6rem);
  border: 1px solid rgba(185, 138, 62, 0.2);
  box-shadow:
    inset 0 0 50px rgba(0, 0, 0, 0.42),
    inset 0 0 0 8px rgba(185, 138, 62, 0.018);
}

.instrument-shell.is-sighting .scope-rim {
  border-color: rgba(227, 189, 117, 0.42);
  box-shadow:
    inset 0 0 70px rgba(0, 0, 0, 0.46),
    inset 0 0 0 8px rgba(185, 138, 62, 0.026),
    0 0 38px rgba(227, 189, 117, 0.14);
}

.machine-status {
  position: relative;
  z-index: 2;
  min-height: 28px;
  margin-inline: clamp(0rem, 2vw, 1rem);
  padding: 0.24rem 0.55rem 0.52rem;
  color: var(--brass-bright);
  font-family: var(--display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-align: center;
  text-transform: uppercase;
  background:
    linear-gradient(90deg, transparent, rgba(185, 138, 62, 0.12), transparent),
    rgba(5, 9, 7, 0.5);
  border-bottom: 1px solid rgba(185, 138, 62, 0.16);
}

.rigging-rail {
  position: absolute;
  top: clamp(3.1rem, 6vw, 4.15rem);
  left: clamp(1.05rem, 2vw, 1.75rem);
  z-index: 3;
  display: grid;
  gap: 0.35rem;
  pointer-events: none;
}

.rigging-rail span {
  display: inline-flex;
  align-items: center;
  width: max-content;
  min-height: 1.55rem;
  padding: 0.22rem 0.48rem;
  border: 1px solid rgba(185, 138, 62, 0.24);
  background: rgba(5, 9, 7, 0.62);
  color: rgba(243, 234, 212, 0.72);
  font-family: var(--display);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1;
  text-transform: uppercase;
  transform: translateX(calc(var(--mode-mix) * 1.15rem));
  transition: transform 520ms cubic-bezier(.2, .9, .2, 1), color 520ms ease, border-color 520ms ease;
}

.rigging-rail span:nth-child(2) {
  transform: translateX(calc(var(--mode-mix) * 2.15rem));
}

.rigging-rail span:nth-child(3) {
  transform: translateX(calc(var(--mode-mix) * 3.05rem));
}

.instrument-shell.is-geocentric .rigging-rail span {
  border-color: rgba(189, 65, 64, 0.46);
  color: var(--ivory);
}

.orrery-mount {
  position: relative;
  z-index: 1;
  width: 100%;
  height: clamp(410px, 54vh, 620px);
  min-height: 0;
  cursor: grab;
  touch-action: none;
  background:
    radial-gradient(ellipse at 50% 59%, rgba(185, 138, 62, 0.17), transparent 38%),
    radial-gradient(ellipse at 50% 39%, rgba(243, 234, 212, 0.06), transparent 34%),
    linear-gradient(180deg, rgba(3, 5, 4, 0.54), rgba(1, 2, 2, 0.9));
  box-shadow:
    inset 0 26px 70px rgba(0, 0, 0, 0.54),
    inset 0 -24px 54px rgba(185, 138, 62, 0.05);
  isolation: isolate;
  overflow: clip;
  user-select: none;
}

.orrery-mount::before,
.orrery-mount::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.orrery-mount::before {
  z-index: 2;
  opacity: 0.52;
  background:
    linear-gradient(calc(var(--sight-angle) + 90deg), transparent 0 49.8%, rgba(227, 189, 117, 0.07) 49.95% 50.05%, transparent 50.2%),
    radial-gradient(ellipse at 50% 100%, rgba(227, 189, 117, 0.08), transparent 48%),
    repeating-linear-gradient(0deg, transparent 0 31px, rgba(243, 234, 212, 0.025) 31px 32px);
  mix-blend-mode: screen;
}

.orrery-mount::after {
  z-index: 6;
  opacity: 0;
  background:
    linear-gradient(104deg, transparent 0 34%, rgba(243, 234, 212, 0.09) 42%, rgba(185, 138, 62, 0.22) 47%, transparent 56%),
    linear-gradient(90deg, rgba(5, 9, 7, 0.96), rgba(5, 9, 7, 0.2) 45%, transparent);
  transform: translateX(-118%);
}

body.is-loaded .orrery-mount::after {
  animation: aperture-pass 1200ms cubic-bezier(.18, .8, .18, 1) 700ms both;
}

.orrery-mount:active {
  cursor: grabbing;
}

.orrery-mount canvas,
.orrery-mount svg {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse at 50% 62%, rgba(19, 34, 25, 0.75), rgba(2, 4, 3, 0.86) 58%, rgba(1, 2, 2, 0.96));
}

.orrery-mount svg {
  filter: drop-shadow(0 24px 34px rgba(0, 0, 0, 0.42));
}

.transit-sight {
  position: absolute;
  inset: 0;
  z-index: 4;
  opacity: 0;
  transform: scale(0.985);
  transition: opacity 260ms ease, transform 360ms cubic-bezier(.2, .9, .2, 1);
  pointer-events: none;
}

.instrument-shell.is-sighting .transit-sight {
  opacity: 1;
  transform: scale(1);
}

.transit-sight__ring,
.transit-sight__vane,
.transit-sight__bead,
.transit-sight__label {
  position: absolute;
}

.transit-sight__ring {
  left: 50%;
  top: 50%;
  width: min(68%, 34rem);
  aspect-ratio: 1;
  border: 1px solid rgba(227, 189, 117, 0.28);
  border-radius: 50%;
  background:
    conic-gradient(from var(--sight-angle), transparent 0 77%, rgba(126, 31, 34, 0.55) 78% 79.5%, rgba(227, 189, 117, 0.42) 80% 81%, transparent 82%),
    repeating-conic-gradient(rgba(227, 189, 117, 0.18) 0 0.8deg, transparent 0.8deg 7.5deg);
  box-shadow: inset 0 0 45px rgba(185, 138, 62, 0.05);
  transform: translate(-50%, -50%);
  mask-image: radial-gradient(circle, transparent 0 45%, #000 45.4% 46.4%, transparent 47%);
}

.transit-sight__vane {
  left: 50%;
  top: 50%;
  width: var(--sight-radius);
  height: 1px;
  background: linear-gradient(90deg, rgba(243, 234, 212, 0.1), rgba(227, 189, 117, 0.92));
  box-shadow: 0 0 12px rgba(227, 189, 117, 0.42);
  transform: rotate(var(--sight-angle));
  transform-origin: left center;
}

.transit-sight__bead {
  left: 50%;
  top: 50%;
  width: 0.58rem;
  height: 0.58rem;
  border: 1px solid var(--ivory);
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 28%, var(--ivory), var(--brass-bright) 42%, var(--garnet) 100%);
  box-shadow:
    0 0 0 4px rgba(185, 138, 62, 0.12),
    0 0 20px rgba(227, 189, 117, 0.48);
  transform: rotate(var(--sight-angle)) translateX(var(--sight-radius)) translate(-50%, -50%);
  transform-origin: 0 0;
}

.transit-sight__label {
  right: clamp(0.7rem, 2vw, 1.1rem);
  top: clamp(0.7rem, 2vw, 1.1rem);
  max-width: 11rem;
  padding: 0.38rem 0.52rem;
  border: 1px solid rgba(227, 189, 117, 0.38);
  background: rgba(5, 9, 7, 0.74);
  color: var(--ivory);
  font-family: var(--display);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  line-height: 1.15;
  text-transform: uppercase;
}

.readout-panel {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(15rem, auto);
  align-items: stretch;
  gap: 0.75rem;
  margin-top: -0.08rem;
}

.date-drum {
  min-width: 0;
  padding: 0.76rem 0.98rem;
  border: 1px solid rgba(185, 138, 62, 0.3);
  background:
    linear-gradient(90deg, rgba(5, 9, 7, 0.4), transparent 12%, transparent 88%, rgba(5, 9, 7, 0.44)),
    linear-gradient(180deg, rgba(243, 234, 212, 0.07), rgba(0, 0, 0, 0.18)),
    rgba(5, 9, 7, 0.7);
  overflow: hidden;
}

.date-drum strong {
  display: block;
  margin-top: 0.1rem;
  color: var(--ivory);
  font-family: var(--display);
  font-size: clamp(1.08rem, 2.15vw, 1.78rem);
  font-weight: 600;
  line-height: 1.12;
  transform-origin: 50% 65%;
}

.date-drum strong,
.hero-ledger strong,
.archive-strip strong,
.ephemeris-table td,
.ephemeris-table th,
.commission-list time,
.demo-marks time {
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: "kern" 1, "liga" 1, "tnum" 1, "lnum" 1;
}

.date-drum.is-spinning strong {
  animation: drum-flip 360ms cubic-bezier(.2, .8, .2, 1);
}

.mode-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(112px, 1fr));
  gap: 1px;
  border: 1px solid rgba(185, 138, 62, 0.36);
  background: rgba(185, 138, 62, 0.3);
}

.mode-button {
  min-height: 54px;
  border: 0;
  border-radius: 0;
  background: rgba(5, 9, 7, 0.78);
  color: var(--ivory-soft);
  cursor: pointer;
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  transition: background 220ms ease, color 220ms ease;
}

.mode-button:hover,
.mode-button.is-active {
  background:
    linear-gradient(180deg, rgba(227, 189, 117, 0.22), rgba(185, 138, 62, 0.08)),
    rgba(5, 9, 7, 0.94);
  color: var(--ivory);
}

.mode-button:focus-visible {
  position: relative;
  z-index: 1;
}

.mode-button.is-active {
  box-shadow: inset 0 -3px 0 var(--garnet-hot);
}

.crank-control {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(9rem, auto) minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
  margin-top: 0.9rem;
  color: var(--ivory-soft);
  font-family: var(--display);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.crank-control label {
  min-width: 0;
}

.crank-assembly {
  display: grid;
  grid-template-columns: 3.25rem minmax(0, 1fr);
  align-items: center;
  gap: 0.8rem;
}

.crank-wheel {
  position: relative;
  width: 3.25rem;
  height: 3.25rem;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid rgba(227, 189, 117, 0.52);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, var(--ivory) 0 7%, transparent 8%),
    repeating-conic-gradient(from var(--time-spin), rgba(227, 189, 117, 0.92) 0 5deg, rgba(122, 85, 39, 0.82) 5deg 10deg),
    radial-gradient(circle, rgba(185, 138, 62, 0.92), rgba(58, 37, 17, 0.94) 68%);
  box-shadow:
    inset 0 0 0 0.55rem rgba(5, 9, 7, 0.58),
    0 0 22px rgba(185, 138, 62, 0.18);
  cursor: pointer;
  transform: rotate(var(--time-spin));
  transition: transform 220ms cubic-bezier(.2, .9, .2, 1), box-shadow 220ms ease;
}

.crank-wheel::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -0.45rem;
  width: 0.48rem;
  height: 1.34rem;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--ivory), var(--brass));
  box-shadow: 0 0 14px rgba(227, 189, 117, 0.34);
  transform: translateX(-50%);
}

.crank-wheel__hub {
  position: absolute;
  inset: 1.16rem;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, var(--ivory), var(--brass) 52%, var(--brass-dim));
  box-shadow: 0 0 16px rgba(243, 234, 212, 0.2);
}

.crank-wheel:hover,
.crank-wheel:focus-visible,
.instrument-shell.is-cranking .crank-wheel {
  box-shadow:
    inset 0 0 0 0.55rem rgba(5, 9, 7, 0.48),
    0 0 30px rgba(227, 189, 117, 0.34);
}

.crank-control input {
  width: 100%;
  accent-color: var(--brass-bright);
  cursor: ew-resize;
}

.control-note {
  position: relative;
  z-index: 2;
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.35;
  text-align: center;
}

.section-band {
  position: relative;
  padding: clamp(5rem, 9.5vw, 9.5rem) clamp(1rem, 5vw, 5rem) clamp(4rem, 8vw, 8rem);
}

.section-band::before {
  content: "";
  position: absolute;
  top: 0;
  left: clamp(1rem, 5vw, 5rem);
  right: clamp(1rem, 5vw, 5rem);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(185, 138, 62, 0.38), transparent);
}

.section-heading {
  max-width: 56rem;
}

.section-heading h2 {
  font-size: clamp(2rem, 4.8vw, 4.8rem);
  letter-spacing: 0.01em;
}

.section-heading p:not(.kicker) {
  max-width: 48rem;
  margin: 1rem 0 0;
  color: var(--ivory-soft);
  font-size: clamp(1.1rem, 1.7vw, 1.34rem);
  line-height: 1.45;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 760ms ease, transform 760ms cubic-bezier(.2, .85, .2, 1);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

.provenance-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(260px, 0.74fr);
  gap: clamp(1rem, 3vw, 2rem);
  align-items: start;
  margin-top: clamp(1.8rem, 4vw, 3rem);
}

.provenance-grid > p,
.ledger-columns p {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.12rem, 1.45vw, 1.32rem);
}

.workshop-ticket {
  padding: 1.15rem;
  border: 1px solid rgba(185, 138, 62, 0.34);
  background:
    linear-gradient(145deg, rgba(126, 31, 34, 0.14), transparent 42%),
    rgba(5, 9, 7, 0.58);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.24);
}

.workshop-ticket strong {
  display: block;
  margin-top: 0.35rem;
  color: var(--ivory);
  font-family: var(--display);
  font-size: 1.55rem;
  line-height: 1;
}

.workshop-ticket p {
  margin: 0.85rem 0 0;
  color: var(--ivory-soft);
  line-height: 1.38;
}

.archive-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  max-width: 76rem;
  margin-top: clamp(1.5rem, 4vw, 3rem);
  border: 1px solid rgba(185, 138, 62, 0.3);
  background:
    linear-gradient(90deg, rgba(185, 138, 62, 0.32), rgba(126, 31, 34, 0.3)),
    rgba(185, 138, 62, 0.18);
}

.archive-strip p {
  margin: 0;
  padding: clamp(0.8rem, 1.8vw, 1.15rem);
  background:
    linear-gradient(145deg, rgba(243, 234, 212, 0.035), transparent 56%),
    rgba(5, 9, 7, 0.78);
}

.archive-strip strong {
  display: block;
  color: var(--ivory);
  font-family: var(--display);
  font-size: clamp(1.55rem, 3vw, 2.55rem);
  font-weight: 500;
  line-height: 0.95;
}

.archive-strip span {
  display: block;
  margin-top: 0.45rem;
  color: var(--muted);
  font-family: var(--display);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.24;
  text-transform: uppercase;
}

.almanac-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(17rem, 0.34fr);
  gap: clamp(1rem, 2.8vw, 2rem);
  align-items: stretch;
  margin-top: clamp(1.5rem, 3vw, 2.6rem);
  --sight-angle: 0deg;
  --sight-radius: 30%;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid rgba(185, 138, 62, 0.32);
  background:
    linear-gradient(180deg, rgba(227, 189, 117, 0.06), rgba(0, 0, 0, 0.18)),
    rgba(5, 9, 7, 0.7);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.ephemeris-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

.ephemeris-table caption {
  padding: 1rem 1.1rem 0;
  color: var(--muted);
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-align: left;
  text-transform: uppercase;
}

.ephemeris-table th,
.ephemeris-table td {
  padding: 1rem 1.1rem;
  border-bottom: 1px solid rgba(185, 138, 62, 0.18);
  text-align: left;
  vertical-align: top;
}

.ephemeris-table thead th {
  color: var(--brass-bright);
  font-family: var(--display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ephemeris-table tbody th {
  color: var(--ivory);
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 600;
}

.ephemeris-table tbody tr {
  cursor: crosshair;
  outline: 0;
  transition: background 180ms ease, box-shadow 180ms ease, color 180ms ease;
}

.ephemeris-table tbody tr:hover,
.ephemeris-table tbody tr:focus-visible,
.ephemeris-table tbody tr.is-sighted {
  background:
    linear-gradient(90deg, rgba(227, 189, 117, 0.12), rgba(126, 31, 34, 0.11) 72%, transparent),
    rgba(185, 138, 62, 0.035);
  box-shadow:
    inset 3px 0 0 var(--brass-bright),
    inset 0 -1px 0 rgba(227, 189, 117, 0.16);
}

.ephemeris-table tbody tr:hover [data-current],
.ephemeris-table tbody tr:focus-visible [data-current],
.ephemeris-table tbody tr.is-sighted [data-current] {
  color: var(--brass-bright);
}

.ephemeris-table td {
  color: var(--ivory-soft);
}

.ephemeris-table [data-current] {
  color: var(--ivory);
  font-weight: 600;
}

.equation-cabinet {
  position: relative;
  min-height: 100%;
  padding: clamp(1rem, 2vw, 1.35rem);
  border: 1px solid rgba(185, 138, 62, 0.32);
  background:
    radial-gradient(circle at 50% 30%, rgba(185, 138, 62, 0.18), transparent 42%),
    linear-gradient(150deg, rgba(126, 31, 34, 0.16), transparent 46%),
    rgba(5, 9, 7, 0.72);
  overflow: clip;
}

.equation-cabinet::before {
  content: "";
  position: absolute;
  right: -5.5rem;
  bottom: -5rem;
  width: 16rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    repeating-conic-gradient(rgba(227, 189, 117, 0.2) 0 2deg, transparent 2deg 7deg),
    radial-gradient(circle, transparent 0 32%, rgba(185, 138, 62, 0.2) 33% 34%, transparent 35% 48%, rgba(185, 138, 62, 0.16) 49% 50%, transparent 51%);
  opacity: 0.5;
}

.equation-cabinet > * {
  position: relative;
  z-index: 1;
}

.cabinet-label {
  display: block;
  color: var(--brass-bright);
  font-family: var(--display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.25;
  text-transform: uppercase;
}

.equation-cabinet p {
  margin: 1rem 0 1.2rem;
  color: var(--ivory);
  font-size: clamp(1.25rem, 2vw, 1.68rem);
  line-height: 1.16;
}

.equation-cabinet dl {
  display: grid;
  gap: 0.7rem;
  margin: 0;
}

.sighting-register {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 9.5rem;
  margin-top: clamp(1rem, 2vw, 1.4rem);
  border-top: 1px solid rgba(185, 138, 62, 0.22);
  opacity: 0.66;
  transition: opacity 220ms ease;
}

.almanac-layout.is-sighting .sighting-register {
  opacity: 1;
}

.sighting-register__dial,
.sighting-register__needle,
.sighting-register__label {
  position: absolute;
}

.sighting-register__dial {
  width: 8.2rem;
  aspect-ratio: 1;
  border: 1px solid rgba(227, 189, 117, 0.32);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(243, 234, 212, 0.18) 0 3%, transparent 3.7%),
    repeating-conic-gradient(rgba(227, 189, 117, 0.22) 0 1.4deg, transparent 1.4deg 9deg),
    radial-gradient(circle, transparent 0 46%, rgba(126, 31, 34, 0.2) 47% 49%, transparent 50%);
  box-shadow: inset 0 0 35px rgba(185, 138, 62, 0.08);
  transform: rotate(var(--sight-angle));
  transition: transform 420ms cubic-bezier(.2, .9, .2, 1);
}

.sighting-register__needle {
  width: 3.8rem;
  height: 1px;
  background: linear-gradient(90deg, rgba(243, 234, 212, 0.14), var(--brass-bright));
  box-shadow: 0 0 12px rgba(227, 189, 117, 0.42);
  transform: rotate(var(--sight-angle)) translateX(1.85rem);
  transform-origin: left center;
  transition: transform 420ms cubic-bezier(.2, .9, .2, 1);
}

.sighting-register__label {
  left: 0;
  right: 0;
  bottom: 0;
  color: var(--muted);
  font-family: var(--display);
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-align: center;
  text-transform: uppercase;
  transition: color 180ms ease;
}

.almanac-layout.is-sighting .sighting-register__label {
  color: var(--brass-bright);
}

.equation-cabinet div {
  padding-top: 0.7rem;
  border-top: 1px solid rgba(185, 138, 62, 0.22);
}

.equation-cabinet dt {
  color: var(--brass-bright);
  font-family: var(--display);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.equation-cabinet dd {
  margin: 0.2rem 0 0;
  color: var(--ivory-soft);
  line-height: 1.3;
}

.tooth-gauge {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, max-content);
  align-items: center;
  justify-content: start;
  gap: 0.75rem;
  max-width: 55rem;
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
  padding-top: 1rem;
  color: var(--muted);
  font-family: var(--display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.tooth-gauge::before,
.tooth-gauge::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(185, 138, 62, 0.55));
}

.tooth-gauge::after {
  display: none;
}

.tooth-gauge span {
  display: inline-flex;
  min-height: 2rem;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.6rem;
  border: 1px solid rgba(185, 138, 62, 0.26);
  background: rgba(5, 9, 7, 0.55);
}

.note-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(0.65rem, 1.2vw, 1rem);
  margin-top: clamp(1.7rem, 3vw, 2.5rem);
}

.bench-note {
  position: relative;
  overflow: clip;
  grid-column: span 4;
  min-height: 21rem;
  padding: clamp(1.05rem, 2vw, 1.45rem);
  border: 1px solid rgba(185, 138, 62, 0.32);
  background:
    radial-gradient(circle at 100% 0, rgba(227, 189, 117, 0.1), transparent 46%),
    rgba(5, 9, 7, 0.82);
}

.bench-note::before {
  content: "";
  position: absolute;
  right: -4.5rem;
  top: -4.5rem;
  width: 12rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    repeating-conic-gradient(rgba(227, 189, 117, 0.22) 0 3deg, transparent 3deg 8deg),
    radial-gradient(circle, transparent 0 34%, rgba(185, 138, 62, 0.18) 35% 37%, transparent 38% 56%, rgba(185, 138, 62, 0.15) 57% 58%, transparent 59%);
  opacity: 0.44;
  pointer-events: none;
}

.bench-note:nth-child(even) {
  background:
    radial-gradient(circle at 0 100%, rgba(126, 31, 34, 0.16), transparent 48%),
    rgba(8, 15, 11, 0.84);
}

.bench-note:nth-child(1) {
  grid-column: span 5;
}

.bench-note:nth-child(2) {
  grid-column: span 3;
  transform: translateY(1.6rem);
}

.bench-note:nth-child(3) {
  grid-column: span 4;
}

.bench-note:nth-child(4) {
  grid-column: 4 / span 6;
  min-height: 17rem;
}

.bench-note > * {
  position: relative;
  z-index: 1;
}

.bench-note h3,
.commission-list h3 {
  margin-top: 1.2rem;
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  hyphens: none;
}

.bench-note p,
.commission-list p {
  margin: 0.9rem 0 0;
  color: #ded5c2;
  line-height: 1.45;
}

@media (hover: hover) {
  .bench-note,
  .commission-list article,
  .workshop-ticket,
  .equation-cabinet {
    transition: border-color 220ms ease, box-shadow 220ms ease, transform 220ms ease;
  }

  .bench-note:hover,
  .commission-list article:hover,
  .workshop-ticket:hover,
  .equation-cabinet:hover {
    border-color: rgba(227, 189, 117, 0.58);
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.3), 0 0 28px rgba(185, 138, 62, 0.08);
    transform: translateY(-2px);
  }
}

.nowrap {
  white-space: nowrap;
}

.commission-list {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr 1.05fr;
  gap: clamp(1rem, 2.5vw, 2rem);
  margin-top: clamp(1.8rem, 4vw, 3rem);
}

.commission-list article {
  position: relative;
  padding: 1.25rem 1.2rem 1.35rem;
  border-top: 2px solid var(--brass);
  background:
    linear-gradient(180deg, rgba(243, 234, 212, 0.045), transparent 44%),
    rgba(5, 9, 7, 0.46);
}

.commission-list article:nth-child(2) {
  margin-top: clamp(1.2rem, 5vw, 4rem);
  border-top-color: var(--garnet-hot);
}

.commission-list time {
  color: var(--brass-bright);
  font-family: var(--display);
  font-size: 2.4rem;
  font-weight: 500;
  line-height: 1;
}

.ledger-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.3rem, 4vw, 3rem);
  max-width: 72rem;
  margin-top: clamp(1.6rem, 3vw, 2.6rem);
}

.night-ledger {
  overflow: clip;
}

.night-ledger::after {
  content: "";
  position: absolute;
  right: clamp(1rem, 6vw, 7rem);
  bottom: 5.5rem;
  width: min(27vw, 22rem);
  aspect-ratio: 1;
  border: 1px solid rgba(185, 138, 62, 0.18);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(126, 31, 34, 0.34) 0 2.2%, transparent 2.6%),
    repeating-radial-gradient(circle, transparent 0 18%, rgba(185, 138, 62, 0.11) 18.5% 19%, transparent 19.4% 30%),
    conic-gradient(from 12deg, transparent 0 15%, rgba(227, 189, 117, 0.08) 15.4% 18%, transparent 18.4% 100%);
  opacity: 0.7;
  pointer-events: none;
}

.night-ledger > * {
  position: relative;
  z-index: 1;
}

.demo-marks {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  max-width: 72rem;
  margin: clamp(1.5rem, 3vw, 2.4rem) 0 0;
  padding: 0;
  list-style: none;
  border: 1px solid rgba(185, 138, 62, 0.28);
  background: rgba(185, 138, 62, 0.2);
}

.demo-marks li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.75rem;
  align-items: baseline;
  padding: 0.85rem 0.95rem;
  background: rgba(5, 9, 7, 0.76);
}

.demo-marks time {
  color: var(--brass-bright);
  font-family: var(--display);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.demo-marks span {
  color: var(--ivory-soft);
  line-height: 1.28;
}

.site-footer {
  position: relative;
  z-index: 81;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.4rem clamp(1rem, 5vw, 5rem) 1.6rem;
  border-top: 1px solid rgba(185, 138, 62, 0.26);
  background:
    radial-gradient(circle at 12% 0, rgba(185, 138, 62, 0.18), transparent 22rem),
    linear-gradient(180deg, rgba(8, 16, 12, 0.98), #050907);
}

.site-footer p {
  margin: 0;
  color: #c8b99c;
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem 1rem;
}

.site-footer a {
  position: relative;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: #d8ceb7;
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-decoration: none;
  text-transform: uppercase;
}

.site-footer a:hover {
  color: var(--brass-bright);
}

/* Guide page */

.guide-main {
  padding-top: var(--header-h);
  background:
    radial-gradient(circle at 84% 12%, rgba(185, 138, 62, 0.12), transparent 28rem),
    linear-gradient(90deg, rgba(185, 138, 62, 0.05), transparent 18%, transparent 82%, rgba(126, 31, 34, 0.06));
}

.guide-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(17rem, 0.34fr);
  gap: clamp(1.2rem, 4vw, 4rem);
  align-items: end;
  padding: clamp(5rem, 10vw, 8rem) clamp(1rem, 6vw, 6rem) clamp(3rem, 7vw, 5rem);
  overflow: clip;
}

.guide-hero::before {
  content: "";
  position: absolute;
  inset: 1.5rem clamp(1rem, 5vw, 5rem);
  border: 1px solid rgba(185, 138, 62, 0.2);
  pointer-events: none;
}

.guide-hero::after {
  content: "";
  position: absolute;
  right: 13%;
  top: 0;
  bottom: 0;
  width: 10rem;
  background: linear-gradient(104deg, transparent, rgba(243, 234, 212, 0.07), transparent 62%);
  opacity: 0.72;
  transform: skewX(-12deg);
  pointer-events: none;
}

.guide-hero h1 {
  max-width: 11ch;
  font-size: clamp(2.8rem, 8vw, 7rem);
}

.guide-hero p:not(.kicker) {
  max-width: 49rem;
  margin: 1.2rem 0 0;
  color: var(--ivory-soft);
  font-size: clamp(1.16rem, 2vw, 1.45rem);
  line-height: 1.45;
}

.guide-plate {
  position: absolute;
  right: clamp(-4rem, -2vw, -1rem);
  bottom: -8rem;
  width: min(46vw, 42rem);
  aspect-ratio: 1;
  border: 1px solid rgba(185, 138, 62, 0.32);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(243, 234, 212, 0.16) 0 3%, transparent 3.5%),
    repeating-radial-gradient(circle, transparent 0 8%, rgba(185, 138, 62, 0.2) 8.3% 8.6%, transparent 8.9% 15%),
    conic-gradient(from 20deg, rgba(185, 138, 62, 0.28), transparent 16%, rgba(126, 31, 34, 0.22), transparent 52%, rgba(227, 189, 117, 0.24));
  opacity: 0.62;
  pointer-events: none;
}

.guide-plate::before {
  content: "";
  position: absolute;
  inset: 14%;
  border-radius: 50%;
  background:
    repeating-conic-gradient(rgba(227, 189, 117, 0.15) 0 2deg, transparent 2deg 8deg),
    radial-gradient(circle, transparent 0 48%, rgba(126, 31, 34, 0.22) 49% 51%, transparent 52%);
}

.guide-hero-copy,
.guide-ledger {
  position: relative;
  z-index: 1;
}

.guide-ledger {
  display: grid;
  gap: 1px;
  margin: 0 0 0 auto;
  width: min(100%, 22rem);
  border: 1px solid rgba(185, 138, 62, 0.28);
  background: rgba(185, 138, 62, 0.22);
}

.guide-ledger div {
  padding: 0.85rem 0.95rem;
  background:
    linear-gradient(135deg, rgba(243, 234, 212, 0.04), transparent 55%),
    rgba(5, 9, 7, 0.76);
}

.guide-ledger dt {
  color: var(--brass-bright);
  font-family: var(--display);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.guide-ledger dd {
  margin: 0.24rem 0 0;
  color: var(--ivory);
  line-height: 1.22;
}

.guide-article {
  position: relative;
  max-width: 76rem;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2rem) clamp(4rem, 8vw, 7rem);
}

.guide-article::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: clamp(4rem, 8vw, 7rem);
  left: clamp(1rem, 4vw, 2rem);
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(185, 138, 62, 0.34), transparent);
}

.guide-article section {
  position: relative;
  display: grid;
  grid-template-columns: minmax(11rem, 0.28fr) minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 2.6rem);
  padding: clamp(2rem, 5vw, 3.5rem) 0;
  border-top: 1px solid rgba(185, 138, 62, 0.24);
}

.guide-article section::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 1.4rem;
  width: min(18vw, 12rem);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    repeating-conic-gradient(rgba(185, 138, 62, 0.09) 0 2deg, transparent 2deg 10deg),
    radial-gradient(circle, transparent 0 54%, rgba(126, 31, 34, 0.1) 55% 56%, transparent 57%);
  opacity: 0;
  transform: rotate(18deg);
  pointer-events: none;
}

.guide-article section:nth-child(even)::after {
  opacity: 0.42;
}

.guide-article section::before {
  content: "";
  position: absolute;
  top: clamp(2rem, 5vw, 3.5rem);
  left: -0.34rem;
  width: 0.68rem;
  height: 0.68rem;
  border: 1px solid var(--brass);
  border-radius: 50%;
  background: var(--green-black);
  box-shadow: 0 0 18px rgba(185, 138, 62, 0.28);
}

.guide-article h2 {
  grid-column: 1;
  padding-left: 1.05rem;
  font-size: clamp(1.55rem, 3.2vw, 2.6rem);
  color: var(--ivory);
}

.guide-article section > :not(h2) {
  grid-column: 2;
}

.guide-article p,
.guide-article li {
  color: var(--ivory-soft);
  font-size: clamp(1.08rem, 1.7vw, 1.28rem);
}

.guide-article p {
  margin: 0.9rem 0 0;
}

.guide-article ul {
  margin: 1rem 0 0;
  padding-left: 1.2rem;
}

.guide-article strong {
  color: var(--ivory);
}

.token-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 1.3rem;
  border: 1px solid rgba(185, 138, 62, 0.32);
  background: rgba(185, 138, 62, 0.24);
}

.token-row span {
  min-height: 5rem;
  padding: 0.8rem;
  background: var(--swatch, var(--green-black));
  color: var(--label, var(--ivory));
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.48);
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.token-row span[style*="0a120e"],
.token-row span[style*="7e1f22"] {
  --label: #f3ead4;
}

@keyframes rise-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes drum-flip {
  0% {
    transform: translateY(-18%) rotateX(80deg);
    filter: blur(2px);
  }
  100% {
    transform: translateY(0) rotateX(0);
    filter: blur(0);
  }
}

@keyframes aperture-pass {
  0% {
    opacity: 0.95;
    transform: translateX(-118%);
  }
  58% {
    opacity: 0.9;
  }
  100% {
    opacity: 0;
    transform: translateX(118%);
  }
}

@media (max-width: 1020px) {
  .hero {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 1.25rem;
  }

  h1 {
    max-width: 12ch;
  }

  .hero-lede {
    max-width: 46rem;
  }

  .instrument-shell {
    width: 100%;
  }

  .orrery-mount {
    height: clamp(360px, 40vh, 470px);
  }

  .provenance-grid,
  .commission-list {
    grid-template-columns: 1fr 1fr;
  }

  .archive-strip,
  .almanac-layout,
  .note-grid,
  .guide-hero {
    grid-template-columns: 1fr 1fr;
  }

  .demo-marks {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .bench-note,
  .bench-note:nth-child(1),
  .bench-note:nth-child(2),
  .bench-note:nth-child(3),
  .bench-note:nth-child(4) {
    grid-column: auto;
    transform: none;
  }

  .workshop-ticket,
  .commission-list article:nth-child(3) {
    grid-column: 1 / -1;
  }

  .bench-note {
    min-height: 16rem;
  }

  .guide-ledger {
    align-self: stretch;
  }
}

@media (max-width: 720px) {
  :root {
    --header-h: 62px;
  }

  body {
    font-size: 1.08rem;
  }

  .site-header {
    padding: 0 0.72rem;
  }

  .brand {
    max-width: 8.3rem;
    gap: 0.45rem;
    font-size: 0.7rem;
    letter-spacing: 0.09em;
    white-space: normal;
    line-height: 1.05;
  }

  .brand-mark {
    width: 20px;
    height: 20px;
  }

  .site-header nav {
    gap: 0;
    max-width: calc(100vw - 9rem);
    overflow-x: auto;
    scrollbar-width: none;
  }

  .site-header nav::-webkit-scrollbar {
    display: none;
  }

  .site-header nav a {
    flex: 0 0 auto;
    padding: 0.6rem 0.42rem;
    font-size: 0.64rem;
    letter-spacing: 0.065em;
  }

  .wide-only {
    display: none !important;
  }

  .hero {
    min-height: auto;
    padding: calc(var(--header-h) + 1.1rem) 0.8rem 3.2rem;
  }

  .hero::before {
    inset: var(--header-h) 0.6rem 1rem;
  }

  h1 {
    font-size: clamp(2.85rem, 15.8vw, 4.05rem);
    line-height: 1.02;
  }

  .section-heading h2 {
    font-size: clamp(1.8rem, 8.4vw, 2.55rem);
    line-height: 1.12;
  }

  .hero-lede {
    font-size: 1.12rem;
  }

  .hero-ledger {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero-ledger p {
    padding: 0.62rem 0.55rem;
  }

  .hero-ledger span {
    font-size: 0.54rem;
    letter-spacing: 0.1em;
  }

  .hero-ledger strong {
    font-size: 0.82rem;
    white-space: normal;
  }

  .instrument-shell {
    padding: 0.62rem;
  }

  .rigging-rail {
    top: 2.7rem;
    left: 0.85rem;
  }

  .transit-sight__ring {
    width: 82%;
  }

  .transit-sight__label {
    right: 0.55rem;
    top: auto;
    bottom: 0.55rem;
    font-size: 0.56rem;
  }

  .rigging-rail span {
    min-height: 1.35rem;
    padding: 0.18rem 0.38rem;
    font-size: 0.5rem;
  }

  .machine-status {
    font-size: 0.58rem;
    letter-spacing: 0.08em;
  }

  .orrery-mount {
    height: 390px;
  }

  .readout-panel,
  .crank-control {
    grid-template-columns: 1fr;
  }

  .readout-panel {
    gap: 0.55rem;
  }

  .crank-assembly {
    grid-template-columns: 2.9rem minmax(0, 1fr);
  }

  .crank-wheel {
    width: 2.9rem;
    height: 2.9rem;
  }

  .mode-toggle {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mode-button {
    min-height: 48px;
    font-size: 0.66rem;
  }

  .control-note {
    font-size: 0.95rem;
  }

  .section-band {
    padding: 4rem 0.9rem;
  }

  .section-band::before {
    left: 0.9rem;
    right: 0.9rem;
  }

  .provenance-grid,
  .note-grid,
  .commission-list,
  .ledger-columns,
  .archive-strip,
  .almanac-layout,
  .demo-marks,
  .guide-hero,
  .guide-article section,
  .token-row {
    grid-template-columns: 1fr;
  }

  .guide-article section > :not(h2),
  .guide-article h2 {
    grid-column: 1;
  }

  .guide-article h2 {
    padding-left: 0;
  }

  .commission-list article:nth-child(2) {
    margin-top: 0;
  }

  .bench-note {
    min-height: 0;
  }

  .bench-note h3 {
    font-size: 1.45rem;
  }

  .night-ledger::after {
    width: 18rem;
    right: -7rem;
    bottom: 1rem;
    opacity: 0.38;
  }

  .demo-marks li {
    grid-template-columns: 4rem minmax(0, 1fr);
  }

  .tooth-gauge {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }

  .tooth-gauge span {
    justify-content: flex-start;
  }

  .guide-article::before,
  .guide-article section::before {
    display: none;
  }

  .guide-ledger {
    width: 100%;
  }

  .token-row span {
    min-height: 4.3rem;
  }

  .site-footer {
    display: block;
    padding: 1.2rem 0.9rem 1.4rem;
  }

  .site-footer nav {
    justify-content: flex-start;
    margin-top: 0.65rem;
  }

  .site-footer a {
    font-size: 0.66rem;
  }

  .guide-plate {
    width: 72vw;
    right: -36vw;
    opacity: 0.42;
  }

  .sighting-register {
    min-height: 8.5rem;
  }

  .guide-hero::after,
  .guide-article section::after {
    display: none;
  }
}

@media (max-width: 420px) {
  .site-header nav a {
    padding-inline: 0.28rem;
    font-size: 0.58rem;
  }

  .brand {
    max-width: 7.2rem;
  }

  .orrery-mount {
    height: 360px;
  }

  .date-drum strong {
    font-size: 1rem;
  }

  .transit-sight__label {
    max-width: 9rem;
  }
}

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

  .hero-copy,
  .instrument-shell,
  [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .orrery-mount::after {
    display: none;
  }
}
