:root {
  --bg: #121212;
  --panel: #1e1c1a;
  --gold: #c9a86a;
  --cream: #f0e6d2;
  --text: #e8e4dc;
  --muted: #9a948a;
  --accent: #d84a3a;
  --knob-face: #2b2824;
  --knob-ring: #4a443c;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
  padding: 2rem 1rem 4rem;
}

.wrap { width: min(96vw, 1700px); margin: 0 auto; }

/* Units flow into columns on wide screens */
.units {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 1.6rem;
  align-items: start;
}
.units .unit { margin-bottom: 0; }
.units .unit.tab { grid-column: 1 / -1; }

header.site { text-align: center; margin-bottom: 2.5rem; }
header.site h1 {
  font-size: 2.2rem;
  letter-spacing: 0.04em;
  color: var(--cream);
}
header.site p.sub { color: var(--muted); margin-top: 0.3rem; }

a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }

nav.breadcrumb { margin-bottom: 1.5rem; color: var(--muted); font-size: 0.9rem; }

/* Index cards */
.song-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.2rem;
}
.song-card {
  background: var(--panel);
  border: 1px solid #332f29;
  border-radius: 10px;
  padding: 1.3rem;
  display: block;
  transition: border-color 0.15s, transform 0.15s;
}
.song-card:hover { border-color: var(--gold); transform: translateY(-2px); text-decoration: none; }
.song-card h2 { font-size: 1.2rem; color: var(--cream); }
.song-card .artist { color: var(--gold); font-size: 0.95rem; margin-bottom: 0.5rem; }
.song-card p { color: var(--muted); font-size: 0.9rem; }

.gear-list {
  background: var(--panel);
  border: 1px solid #332f29;
  border-radius: 10px;
  padding: 1.3rem;
  margin-bottom: 2rem;
}
.gear-list h2 { color: var(--cream); font-size: 1.1rem; margin-bottom: 0.6rem; }
.gear-list ul { list-style: none; }
.gear-list li { padding: 0.25rem 0; color: var(--text); }
.gear-list li span { color: var(--muted); font-size: 0.9rem; }

/* Song page */
.song-header { margin-bottom: 2rem; }
.song-header h1 { font-size: 2rem; color: var(--cream); }
.song-header .artist { color: var(--gold); font-size: 1.1rem; }
.song-header .vibe { color: var(--muted); margin-top: 0.6rem; max-width: 640px; }

.unit {
  background: var(--panel);
  border: 1px solid #332f29;
  border-radius: 12px;
  padding: 1.4rem;
  margin-bottom: 1.6rem;
}
.unit > h2 {
  color: var(--cream);
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid #332f29;
  padding-bottom: 0.6rem;
  margin-bottom: 1rem;
}
.unit > h2 .state { float: right; font-size: 0.8rem; letter-spacing: 0.05em; padding: 0.15rem 0.6rem; border-radius: 20px; }
.state.on  { background: #1f3d24; color: #7fd98a; }
.state.off { background: #3d1f1f; color: #d98a7f; }
.gear-panel { position: relative; margin: 0.4rem auto 1.2rem; }
.gear-panel img { display: block; width: 100%; border-radius: 8px; }
.gp-knob {
  position: absolute;
  transform: translate(-50%, -50%);
  aspect-ratio: 1;
  border: 2px solid var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(0,0,0,0.55);
}
.gp-needle { position: absolute; inset: 0; }
.gp-needle::before {
  content: "";
  position: absolute;
  left: 50%; top: -22%;
  width: 2px; height: 50%;
  background: var(--gold);
  transform: translateX(-50%);
  border-radius: 2px;
  box-shadow: 0 0 3px rgba(0,0,0,0.9);
}
.gp-val {
  position: absolute;
  top: 104%; left: 50%;
  transform: translateX(-50%);
  background: rgba(13,12,11,0.88);
  color: var(--gold);
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1.3;
  padding: 0 0.3rem;
  border-radius: 4px;
  border: 1px solid #3a362f;
  white-space: nowrap;
}
.gp-fader {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 9%; height: 4px;
  background: var(--gold);
  border-radius: 2px;
  box-shadow: 0 0 5px rgba(0,0,0,0.9);
}
.gp-readout {
  display: flex;
  justify-content: center;
  gap: 0.9rem;
  flex-wrap: wrap;
  margin-bottom: 0.8rem;
}
.gp-readout b { color: var(--gold); font-size: 0.85rem; display: block; text-align: center; }
.gp-readout span { color: var(--muted); font-size: 0.68rem; display: block; text-align: center; }

.unit.has-gear > h2 { display: flex; align-items: center; gap: 0.7rem; }
.unit.has-gear > h2 .state { float: none; margin-left: auto; }
.unit-gear {
  width: 42px;
  height: 46px;
  object-fit: contain;
  background: #fff;
  border: 1px solid #3a362f;
  border-radius: 6px;
  padding: 2px;
  flex-shrink: 0;
}

.knob-row { display: flex; flex-wrap: wrap; gap: 1.4rem 1.8rem; }

.knob { text-align: center; width: 78px; }
.knob .dial {
  width: 64px; height: 64px;
  margin: 0 auto;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #38342e, var(--knob-face));
  border: 3px solid var(--knob-ring);
  position: relative;
  box-shadow: 0 3px 8px rgba(0,0,0,0.5);
}
.knob .pointer {
  position: absolute;
  left: 50%; top: 50%;
  width: 3px; height: 26px;
  background: var(--gold);
  border-radius: 2px;
  transform-origin: 50% 0%;
  /* rotation set by JS */
}
.knob .val { font-size: 1rem; color: var(--gold); margin-top: 0.4rem; font-weight: 600; }
.knob .label { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }

.switches { display: flex; gap: 1.5rem; margin-top: 1.1rem; flex-wrap: wrap; }
.switch { font-size: 0.85rem; color: var(--muted); }
.switch b { color: var(--cream); }

/* GE-7 sliders: -15 .. +15 dB */
.eq {
  display: flex;
  gap: 1.1rem;
  align-items: flex-end;
  padding: 0.5rem 0 0;
}
.eq .band { text-align: center; width: 56px; }
.eq .track {
  position: relative;
  height: 140px;
  width: 10px;
  margin: 0 auto;
  background: #0d0c0b;
  border-radius: 5px;
  border: 1px solid #3a362f;
}
.eq .track::after { /* center (0 dB) line */
  content: "";
  position: absolute;
  left: -8px; right: -8px; top: 50%;
  border-top: 1px dashed #4a443c;
}
.eq .fader {
  position: absolute;
  left: 50%;
  width: 26px; height: 12px;
  transform: translateX(-50%);
  background: linear-gradient(#eee, #999);
  border-radius: 3px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.6);
  /* top set by JS */
}
.eq .db { font-size: 0.85rem; color: var(--gold); margin-top: 0.5rem; font-weight: 600; }
.eq .freq { font-size: 0.72rem; color: var(--muted); }

.notes { margin-top: 1.1rem; color: var(--muted); font-size: 0.92rem; border-left: 3px solid var(--gold); padding-left: 0.8rem; }

.units .unit.intro { grid-column: 1 / -1; }
.video-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.2rem;
  margin: 1rem 0;
}
.video-row figure { margin: 0; }
.video-row .frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #3a362f;
  background: #000;
}
.video-row iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
}
.video-row figcaption { color: var(--muted); font-size: 0.85rem; margin-top: 0.4rem; }
.rig-diagram {
  margin-top: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.rig-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}
.rig-item { text-align: center; }
.rig-img {
  background: #fff;
  border: 1px solid #3a362f;
  border-radius: 8px;
  height: 96px;
  width: 86px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin: 0 auto;
}
.rig-img img { max-width: 92%; max-height: 92%; object-fit: contain; }
.rig-amp .rig-img { width: 190px; }
.rig-guitar .rig-img { background: #0d0c0b; color: var(--gold); }
.rig-guitar svg { width: 54px; height: 54px; }
.rig-label { font-size: 0.78rem; color: var(--cream); margin-top: 0.35rem; font-weight: 600; }
.rig-label span { display: block; font-weight: 400; color: var(--muted); font-size: 0.7rem; }
.rig-arrow { color: var(--gold); font-size: 1.3rem; padding-bottom: 1.2rem; }
.rig-loop {
  border: 1px dashed #4a443c;
  border-radius: 10px;
  padding: 0.7rem 0.9rem;
  position: relative;
  align-self: flex-start;
  margin-left: 2rem;
}
.rig-tag {
  position: absolute;
  top: -0.7rem;
  left: 0.8rem;
  background: var(--gold);
  color: #141210;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.1rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.rig-label-plain { color: var(--muted); font-size: 0.8rem; font-style: italic; padding-bottom: 1.2rem; }
.rig-loop .rig-label-plain, .rig-loop .rig-arrow { padding-bottom: 1.2rem; }

.search-box { margin: 1.4rem 0 0.4rem; }
.search-box input {
  width: 100%;
  box-sizing: border-box;
  background: #0d0c0b;
  border: 1px solid #3a362f;
  border-radius: 8px;
  padding: 0.65rem 0.9rem;
  color: var(--cream);
  font-size: 1rem;
}
.search-box input:focus { outline: none; border-color: var(--gold); }
.search-box #no-results { color: var(--muted); font-size: 0.9rem; margin: 0.6rem 0 0; }

.photo-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
  margin: 1rem 0;
}
.photo-gallery figure { margin: 0; }
.photo-gallery img {
  display: block;
  width: 100%;
  border-radius: 6px;
  border: 1px solid #3a362f;
}
.photo-gallery figcaption { color: var(--muted); font-size: 0.75rem; margin-top: 0.25rem; text-align: center; }
.photo-gallery.solo-lines { grid-template-columns: repeat(2, 1fr); }
.photo-gallery.solo-lines img { background: #fff; }

pre.tabtxt {
  background: #0d0c0b;
  border: 1px solid #3a362f;
  border-radius: 8px;
  padding: 1rem;
  overflow-x: auto;
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--cream);
  margin: 0.8rem 0;
}
pre.tabtxt .cmt { color: var(--muted); }

.tab-btn {
  display: inline-block;
  background: var(--gold);
  color: #1a1712;
  font-weight: 700;
  padding: 0.7rem 1.4rem;
  border-radius: 8px;
  letter-spacing: 0.02em;
}
.tab-btn:hover { background: var(--cream); text-decoration: none; }
.unit.tab p.why { color: var(--muted); font-size: 0.88rem; margin-top: 0.8rem; }

.signal-chain {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 1.6rem;
}
.signal-chain b { color: var(--cream); }

/* Gig layout (built by settings.js): one screen of settings per song */
.units.gig { display: block; }
.song-header { margin-bottom: 0.4rem; }
.song-header h1 { display: inline; font-size: 1.7rem; line-height: 1.2; margin-right: 0.6rem; }
.song-header .artist { display: inline; font-size: 1.05rem; }
.signal-chain { margin: 0 0 0.7rem; font-size: 0.82rem; }
body:has(.units.gig) { padding-top: 1rem; }
nav.breadcrumb { float: right; margin: 0.35rem 0 0 1rem; }
.setup {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  grid-auto-flow: dense;
  gap: 0.6rem;
  align-items: start;
}
.setup .unit.wide { grid-column: span 2; }
.setup .unit { margin: 0; padding: 0.7rem 0.8rem; border-radius: 10px; min-width: 0; }
.setup .unit > h2 { font-size: 0.78rem; padding-bottom: 0.35rem; margin-bottom: 0.45rem; }
.setup .unit > h2 .state { font-size: 0.68rem; padding: 0.1rem 0.5rem; }
.setup .gear-panel { margin: 0.1rem auto 0.4rem; }
.setup .gear-panel[style*="max-width: 1"] { max-width: 60px !important; } /* tall single-knob pedals */
.setup .gear-panel[style*="max-width: 2"] { max-width: 96px !important; }
/* GE-7: the readout carries the settings, the fader photo is skipped on the setup screen */
.setup .gear-panel:has(.gp-fader) { display: none; }
.setup .gp-readout { display: grid; grid-template-columns: repeat(4, 1fr); padding: 0.2rem 0; gap: 0.1rem 0.35rem; margin-bottom: 0.3rem; }
.setup .gp-readout span { font-size: 0.6rem; white-space: nowrap; }
.setup .gp-readout b { font-size: 0.78rem; }
.setup .switches { gap: 0.2rem 0.9rem; margin-top: 0.3rem; }
.setup .switch { font-size: 0.74rem; }
.setup .notes { margin-top: 0.4rem; font-size: 0.74rem; line-height: 1.35; padding-left: 0.55rem; }
.setup .knob-row { gap: 0.5rem 0.9rem; }
.setup .knob { width: 50px; }
.setup .knob .dial { width: 40px; height: 40px; }
.setup .knob .pointer { height: 16px; }
.setup .knob .val { font-size: 0.82rem; margin-top: 0.15rem; }
.setup .knob .label { font-size: 0.62rem; }
.off-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.6rem; margin: 0.6rem 0 0; font-size: 0.78rem; color: var(--muted); }
.off-strip:empty { display: none; }
.off-strip > b { color: #d98a7f; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.7rem; }
.off-chip { display: inline-flex; align-items: center; gap: 0.35rem; background: var(--panel); border: 1px solid #332f29; border-radius: 20px; padding: 0.15rem 0.6rem 0.15rem 0.2rem; color: var(--text); }
.off-chip .unit-gear { width: 20px; height: 22px; padding: 1px; border-radius: 4px; }
.more { margin-top: 2rem; display: grid; gap: 1rem; }
.more > .vibe { color: var(--muted); max-width: 70ch; margin: 0; }
.more .unit { margin: 0; }
.why-off .notes { margin-top: 0.5rem; }
/* Long tips fold to two lines on screen; tap a tip to read all of it */
html.js .setup .notes { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
html.js .setup .notes.open { display: block; }
.setup .bass-amp .gear-panel { max-width: 400px !important; }
.screen-end { height: 0; }
.more-title { color: var(--cream); font-size: 0.95rem; letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 0.6rem; }
.bass-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0.8rem; align-items: start; }
.bass-grid .unit { margin: 0; }
.bass-grid .gear-panel { max-width: 460px !important; }
.setup .gp-readout > div { min-width: 0; text-align: center; }
header.site .pdf-link, header.site .tuner-link { margin-top: 0.9rem; }

/* Rig overview on the home page */
.rig { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-bottom: 1.6rem; }
.rig-card { background: var(--panel); border: 1px solid #332f29; border-radius: 14px; padding: 1.1rem 1.2rem 1.3rem; }
.rig-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 0.9rem; }
.rig-head h2 { color: var(--cream); font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase; }
.rig-head span { color: var(--muted); font-size: 0.78rem; }
.chain, .loop { display: flex; align-items: center; flex-wrap: wrap; gap: 0.7rem 0; }
.tile { margin: 0; width: 118px; text-align: center; }
.tile.wide { width: 220px; }
.tile-img {
  height: 104px; border-radius: 10px; background: #f3efe7;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  box-shadow: inset 0 -3px 0 var(--c), 0 4px 14px rgba(0,0,0,0.35);
}
.tile-img img { max-width: 84%; max-height: 82%; object-fit: contain; mix-blend-mode: multiply; }
.tile.wide .tile-img img { max-width: 92%; }
.tile-img svg { width: 56px; height: 56px; color: var(--gold); }
.tile:first-child .tile-img:has(svg) { background: #0d0c0b; border: 1px solid #3a362f; }
.tile figcaption { margin-top: 0.45rem; line-height: 1.25; }
.tile figcaption b { display: block; color: var(--cream); font-size: 0.8rem; }
.tile figcaption span { display: block; color: var(--muted); font-size: 0.68rem; margin-top: 0.1rem; }
.link { flex: 1 0 18px; max-width: 46px; height: 2px; margin: 0 0.35rem; margin-bottom: 2.4rem; background: var(--gold); opacity: 0.7; position: relative; }
.link::after { content: ""; position: absolute; right: -1px; top: -4px; border: 5px solid transparent; border-left: 7px solid var(--gold); border-right: 0; }
.loop {
  position: relative; margin: 1.6rem 0 0 auto; width: fit-content; max-width: 100%;
  border: 1px dashed #5a5247; border-radius: 12px; padding: 1.3rem 1rem 0.7rem;
}
.loop-tag {
  position: absolute; top: -0.75rem; left: 1rem; background: var(--gold); color: #141210;
  font-size: 0.66rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.15rem 0.55rem; border-radius: 5px;
}
.loop-end { color: var(--muted); font-size: 0.72rem; font-style: italic; margin-bottom: 2.4rem; }
@media (min-width: 1100px) {
  .rig { grid-template-columns: 1fr auto; align-items: start; }
}

/* Home page gear list (replaces the photo rig view) */
.gear { display: grid; grid-template-columns: 2fr 1fr; gap: 1rem; margin-bottom: 2.5rem; }
.gear-col { background: var(--panel); border: 1px solid #2c2925; border-radius: 14px; padding: 1.2rem 1.3rem 1.3rem; }
.gear-col h2 { color: var(--cream); font-size: 1.15rem; letter-spacing: 0.01em; }
.gear-sub { color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; margin: 0.15rem 0 0.9rem; }
.chain-list { list-style: none; position: relative; padding: 0; margin: 0; }
.chain-list::before { content: ""; position: absolute; left: 7px; top: 12px; bottom: 12px; width: 2px; background: linear-gradient(var(--gold), #3a352e); opacity: 0.5; }
.chain-list li { position: relative; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.6rem; padding: 0.5rem 0 0.5rem 1.9rem; }
.chain-list li::before { content: ""; position: absolute; left: 1px; top: 0.85rem; width: 14px; height: 14px; border-radius: 50%; background: var(--c, var(--gold)); box-shadow: 0 0 0 3px var(--panel), 0 0 10px color-mix(in srgb, var(--c, var(--gold)) 50%, transparent); }
.chain-list li b { color: var(--cream); font-weight: 600; }
.chain-list li span { color: var(--muted); font-size: 0.9rem; }
.chain-list li.amp b { color: var(--gold); font-size: 1.08rem; }
.chain-list li.amp::before { width: 18px; height: 18px; left: -1px; top: 0.75rem; }
.chain-list li.loop-label { padding: 0.6rem 0 0.2rem 1.9rem; color: var(--muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; }
.chain-list li.loop-label::before { width: 8px; height: 8px; left: 4px; top: 0.95rem; background: #3a352e; box-shadow: 0 0 0 3px var(--panel); }
@media (max-width: 700px) { .gear { grid-template-columns: 1fr; } }
