:root {
  --ground: #14110f;
  --ink: #f3e7d4;
  --mute: #9a8f7e;
  --accent: #c24a1c;
  --panel-glow: #2a241c;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(ellipse at 50% 0%, #2c241c 0%, var(--ground) 55%),
    var(--ground);
  color: var(--ink);
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
}

.page-head {
  max-width: 1040px;
  margin: 0 auto;
  padding: 1.2rem 1.1rem 0.2rem;
}

.page-head h1 {
  margin: 0;
  font-size: clamp(1.5rem, 3.2vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.article-cite {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0 0 1.1rem;
  padding: 0.15rem 0 0.85rem;
  border-bottom: 1px solid rgb(243 231 212 / 0.14);
  color: inherit;
  text-decoration: none;
  font-family: "EB Garamond", "Iowan Old Style", Palatino, Georgia, serif;
}

.article-cite-title {
  font-size: clamp(1.55rem, 3.4vw, 2.15rem);
  font-weight: 600;
  font-style: italic;
  letter-spacing: 0.01em;
  line-height: 1.15;
  color: var(--ink);
}

.article-cite-meta {
  font-size: 1.05rem;
  font-style: italic;
  letter-spacing: 0.04em;
  color: var(--mute);
}

.article-cite:hover .article-cite-title,
.article-cite:focus-visible .article-cite-title {
  color: var(--accent);
}

.article-cite:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 4px;
}

.device {
  position: relative;
  width: min(1040px, calc(100% - 1.5rem));
  margin: 1rem auto 0;
  aspect-ratio: 1000 / 640;
  filter: drop-shadow(0 28px 36px rgb(0 0 0 / 0.45));
  user-select: none;
  touch-action: manipulation;
}

.device svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.device canvas#screen {
  position: absolute;
  left: 31.8%;
  top: 9.6875%;
  width: 20%;
  height: 31.25%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  background: #0a0a0b;
  border-radius: 2px;
}

.hit {
  position: absolute;
  touch-action: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  border-radius: 12px;
}

.hit.knob {
  cursor: ns-resize;
  border-radius: 50%;
}

.hit:focus-visible {
  outline: 3px solid #e8dcc8;
  outline-offset: 2px;
}

.ctl.lit .btnface,
.ctl.lit .keyface.white {
  fill: #e8dcc8;
}

.ctl.lit .keyface.black {
  fill: #c24a1c;
}

.notes {
  max-width: 1040px;
  margin: 0.55rem auto 2.5rem;
  padding: 0 1.1rem;
  color: var(--mute);
  font-size: 0.92rem;
}

.notes summary {
  display: flex;
  justify-content: center;
  width: fit-content;
  margin: 0 auto;
  padding: 0.35rem;
  cursor: pointer;
  color: #e8dcc8;
  list-style: none;
  border-radius: 999px;
  transition: color 0.2s ease, transform 0.25s ease, filter 0.25s ease;
}

.notes summary::-webkit-details-marker {
  display: none;
}

.notes summary:hover,
.notes summary:focus-visible {
  color: #f6efe3;
  filter: drop-shadow(0 0 10px rgb(194 74 28 / 0.35));
}

.notes summary:focus-visible {
  outline: 2px solid #e8dcc8;
  outline-offset: 4px;
}

.notes-mark {
  display: block;
  width: 2.4rem;
  height: 2.4rem;
  transition: transform 0.35s ease;
}

.notes[open] .notes-mark {
  transform: rotate(30deg) scale(1.06);
  color: var(--accent);
}

.notes[open] summary {
  margin-bottom: 0.85rem;
}

.hud {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0 0 1rem;
  font-size: clamp(0.9rem, 2vw, 1.05rem);
  color: var(--mute);
}

#status {
  color: var(--ink);
}

.notes dl {
  margin: 0;
  display: grid;
  gap: 0.25rem 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
}

.notes dl div {
  display: flex;
  gap: 0.45rem;
}

.notes dt {
  margin: 0;
  color: var(--ink);
  font-weight: 600;
}

.notes dd {
  margin: 0;
}

@media (max-width: 700px) {
  .page-head {
    padding-top: 1rem;
  }
}
