/* ixud — layout after alaskahoffman.com: system Helvetica, very small type, a fixed index
   sidebar with one hairline beside a 600px text column, on plain white. Two columns at
   every width. Light only.
   Kept for accessibility: label grey passes 4.5:1, sizes in rem, prose links have a
   hairline underline, visible focus outline, skip link. */

:root {
  --ink: #000000;
  --label: #555b61;          /* 6.6:1 on white */
  --rule: #b4c0c8;
  --img-rule: #cccccc;
  color-scheme: light;
}

html { background: #ffffff; color: var(--ink); height: 100%; overflow: hidden; }

@view-transition { navigation: auto; }
.main-content { view-transition-name: page; }
.sidebar { view-transition-name: sidebar; }
::view-transition-old(page) { animation: page-out 280ms ease-in both; }
::view-transition-new(page) { animation: page-in 380ms 90ms ease-out both; }
@keyframes page-out { to { opacity: 0; transform: scale(0.9); } }
@keyframes page-in { from { opacity: 0; transform: scale(0.9); } }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(page),
  ::view-transition-new(page) { animation: none; }
  a, .sidebar a { transition: none; transform: none; }
}

body {
  font-family: Helvetica, Arial, sans-serif;
  font-size: 0.6875rem;      /* 11px at default settings, same as alaskahoffman.com */
  line-height: 1.35;
  height: 100%;
  overflow: hidden;
  margin: 0;
  padding: 0;
}

p { margin: 0 0 1em; }
h1 { font-size: 1em; font-weight: bold; margin: 0 0 1em; }
ol, ul { margin: 0 0 1em; padding-left: 1.5em; }
li { margin-bottom: 0.25em; }

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
  transition: color 140ms ease, opacity 120ms ease, text-decoration-color 140ms ease, transform 120ms ease;
}
a:hover { text-decoration-color: currentColor; }
a:active { opacity: 0.45; transition-duration: 60ms; }
.sidebar a { display: inline-block; }
.sidebar a:hover { transform: translateX(2px); }
.sidebar a:active { transform: translateX(2px) translateY(1px); opacity: 0.4; }
.main-content p a,
.main-content li a {
  text-decoration-color: var(--rule);
}
.main-content p a:hover,
.main-content li a:hover { text-decoration-color: currentColor; }
a[aria-current="page"] { text-decoration-color: currentColor; }
:focus-visible { outline: 1px solid var(--ink); outline-offset: 2px; }

.skip-link {
  position: absolute;
  left: 16px;
  top: 4px;
  background: #ffffff;
  padding: 2px 4px;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* Two columns, always. */
.container { display: flex; height: 100%; overflow: hidden; }

.sidebar {
  position: sticky;
  top: 0;
  width: 160px;
  height: 100%;
  flex: none;
  padding: 16px;
  box-sizing: border-box;
  overflow-y: auto;
  border-right: 1px solid var(--rule);
}
.sidebar nav > div { margin: 0; }
.sidebar .gap { height: 1.35em; }
.sidebar .gap-lg { height: 6.75em; }

.main-content {
  flex: 1;
  min-width: 0;
  height: 100%;
  overflow-y: auto;
  box-sizing: border-box;
  padding: 64px 48px 32px 48px;
}
.main-content > * { max-width: 600px; }

.nav-label {
  color: var(--label);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.5625rem;      /* 9px */
  margin-bottom: 3px;
}
.main-content .nav-label { margin-top: 2em; }

@font-face {
  font-family: "Helvetica Neue 85 Heavy";
  src: url("fonts/helvetica-neue-85-heavy.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

.project-meta { color: var(--label); }
/* Stands in for the per-project wordmark image on alaskahoffman.com: set type, no SVG. */
.project-wordmark {
  font-family: "Helvetica Neue 85 Heavy", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 800;
  font-synthesis: none;
  font-size: 3rem;
  line-height: 1;
  letter-spacing: -0.05em;
  text-transform: lowercase;
  margin: 10px 0 20px;
  overflow-wrap: anywhere;
}

.project-img {
  width: 100%;
  max-width: 600px;
  height: auto;
  display: block;
  border: 1px solid var(--img-rule);
}
figure { margin: 10px 0; }
figure .project-img { margin: 0 0 4px; }
figcaption { color: var(--label); }

.mobile-menu-toggle { display: none; }

/* pirate dial: an FM scale drawn with hairlines. */
.dial-readout { display: flex; align-items: baseline; gap: 12px; margin: 10px 0 4px; }
.dial-freq {
  font-family: "Helvetica Neue 85 Heavy", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 800; font-synthesis: none; font-size: 3rem; line-height: 1; letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
}
.dial-station { color: var(--label); }
.dial-scale {
  position: relative; height: 44px; margin: 6px 0 22px; cursor: ew-resize; touch-action: none;
  border-bottom: 1px solid var(--ink); user-select: none;
}
.dial-scale .tick { position: absolute; bottom: 0; width: 1px; height: 6px; background: var(--rule); }
.dial-scale .tick.major { height: 12px; background: var(--ink); }
.dial-scale .tick-label { position: absolute; top: 100%; transform: translateX(-50%); padding-top: 3px; color: var(--label); font-size: 0.5625rem; }
.dial-marks .mark { position: absolute; bottom: 16px; width: 3px; height: 3px; margin-left: -1px; background: var(--ink); border-radius: 50%; }
.dial-needle { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--ink); transition: left 90ms linear; }
.dial-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 1em; }
.dial-row input[type="range"] { flex: 1; min-width: 120px; accent-color: #000; }
.dial-year-out { font-variant-numeric: tabular-nums; min-width: 3ch; font-weight: bold; }
#dial-app button, #luma-app button, #luma-app .luma-button {
  font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--ink);
  padding: 1px 6px; cursor: pointer; border-radius: 0; text-decoration: none; display: inline-block;
}
#dial-app button:active, #luma-app button:active, #luma-app .luma-button:active { opacity: 0.45; }
#dial-app .dial-play { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 18px; padding: 0; }
.dial-play svg { display: block; fill: currentColor; }
#dial-app .dial-on .dial-play { background: var(--ink); color: #fff; }
.dial-list { list-style: none; padding: 0; max-height: 360px; overflow-y: auto; border-bottom: 1px solid var(--rule); }
.dial-list li { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; padding: 6px 0; border-top: 1px solid var(--rule); }
.dial-list li > button { grid-row: span 2; align-self: start; }
.dial-list li.dial-empty { display: block; color: var(--label); }
.dial-list li.dial-on > span:first-of-type { font-weight: bold; }
.dial-src { color: var(--label); }
.dial-others button { margin: 0 2px 4px 0; }
.dial-deck { display: flex; align-items: flex-start; gap: 12px; margin: 0 0 1em; }
.dial-player { flex: 1; min-width: 0; }
.dial-player:empty { height: 60px; border: 1px solid var(--img-rule); box-sizing: border-box; }
.dial-player iframe { border: 1px solid var(--img-rule); display: block; margin-bottom: 4px; }
.dial-player p { margin: 0; }
/* Volume as signal bars: ten ascending hairline-framed bars, filled black up to the level. */
.dial-vol-wrap { flex: none; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.dial-vol {
  display: flex; align-items: flex-end; gap: 2px; height: 44px; padding: 2px;
  cursor: pointer; touch-action: none; user-select: none;
}
.dial-vol .bar { width: 4px; box-sizing: border-box; border: 1px solid var(--ink); background: #fff; }
.dial-vol .bar.on { background: var(--ink); }
.dial-vol-wrap .nav-label { margin: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .dial-needle { transition: none; } }

/* luma: same controls as the dial. Hairline boxes, black ink, native range inputs. */
#luma-app [hidden] { display: none !important; }
.luma-drop {
  border: 1px dashed var(--rule); padding: 32px 16px; margin: 10px 0 1em; text-align: center; cursor: pointer;
}
.luma-drop p { margin: 0 0 8px; }
.luma-drop.is-dragging { border-style: solid; border-color: var(--ink); }
.luma-file { display: flex; align-items: baseline; gap: 8px; padding: 6px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); margin: 10px 0 1em; }
.luma-file strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.luma-file span { color: var(--label); white-space: nowrap; }
.luma-file button { margin-left: auto; }
.luma-settings { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px 16px; margin: 0 0 1em; }
.luma-settings label, .luma-slider { display: flex; flex-direction: column; gap: 3px; }
.luma-settings .nav-label, .luma-slider .nav-label { margin: 0; }
#luma-app select {
  font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--ink); border-radius: 0; padding: 1px 2px;
}
.luma-sliders { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 16px; margin: 0 0 1em; }
.luma-slider-head { display: flex; justify-content: space-between; align-items: baseline; }
.luma-slider-head output { font-weight: bold; font-variant-numeric: tabular-nums; }
.luma-slider input[type="range"] { width: 100%; margin: 0; accent-color: #000; }
.luma-slider small { color: var(--label); font-size: 1em; }
.luma-curve { display: block; width: 100%; height: 180px; }
.luma-preview { position: relative; border: 1px solid var(--img-rule); min-height: 120px; display: grid; place-items: center; }
.luma-preview img { display: block; max-width: 100%; height: auto; }
.luma-preview img:not([src]) { display: none; }
.luma-preview p { margin: 0; color: var(--label); }
.is-rendering .luma-preview img { opacity: 0.55; }
.luma-progress-head { display: flex; justify-content: space-between; margin: 10px 0 4px; }
.luma-progress-head strong { font-variant-numeric: tabular-nums; }
.luma-track { height: 4px; border: 1px solid var(--ink); margin: 0 0 1em; }
.luma-track i { display: block; height: 100%; width: 0; background: var(--ink); }
.luma-result img { display: block; max-width: 100%; height: auto; border: 1px solid var(--img-rule); margin: 10px 0 4px; }
.luma-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 1em; }
.luma-error { border-left: 2px solid var(--ink); padding-left: 8px; }

/* Narrow screens keep both columns; only the sidebar and padding tighten. */
@media (max-width: 640px) {
  .sidebar { width: 96px; padding: 12px 8px 12px 10px; overflow-wrap: anywhere; }
  .main-content { padding: 32px 12px 12px 14px; }
  .project-wordmark { font-size: 2rem; }
}

@media print {
  .sidebar, .skip-link { display: none; }
}

/* tfl-808 sequencer */
#tfl-app { margin: 14px 0 20px; }
.seq-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; }
.seq-bar button, .seq-bar select {
  font: inherit; background: #fff; color: var(--ink);
  border: 1px solid var(--ink); padding: 2px 7px; cursor: pointer;
}
.seq-bar button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.seq-grid { border-top: 1px solid var(--rule); margin: 10px 0; }
.seq-row {
  display: grid; grid-template-columns: 96px 42px 1fr; gap: 6px; align-items: center;
  padding: 4px 0; border-bottom: 1px solid var(--rule);
}
.seq-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seq-ctrl { display: flex; gap: 3px; }
.seq-ctrl button {
  font: inherit; font-size: 0.5625rem; width: 18px; height: 18px; padding: 0;
  background: #fff; color: var(--ink); border: 1px solid var(--rule); cursor: pointer;
}
.seq-ctrl button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.seq-steps { display: grid; grid-template-columns: repeat(16, 1fr); gap: 2px; }
.seq-cell {
  height: 18px; padding: 0; background: #fff; border: 1px solid var(--rule); cursor: pointer;
}
.seq-cell.is-on { background: var(--ink); border-color: var(--ink); }
.seq-cell.is-now { outline: 1px solid var(--ink); outline-offset: 1px; }
.seq-status, .seq-feed { color: var(--label); margin: 6px 0; min-height: 1.35em; }
