/* Person colors sampled from the rendered phase canvas.
   Angelo is the coral stroke's brightest pixel. Cristian is the cyan stroke's.
   Both clear WCAG AA on the dark card, so the text uses the sampled color. */
:root {
  --person-angelo: #fe5936;
  --person-cristian: #00e4fe;
}

/* Field desk, tools, and manuals.
   Built on the palette, panels, and buttons in styles.css.
   Amber and cyan stay as they are. The phase background is untouched.
   --header-h still sizes the logo row. The quiz bar offset is retuned
   below so it clears the new menu. */

.nav-bar {
  width: min(820px, calc(100% - 28px));
  margin: 0 auto;
}
.site-nav {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 8px;
}
.site-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 40px;
  padding: 0 2px;
  color: var(--text-dim);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.site-nav a:hover { color: var(--white); }
.site-nav a.is-on,
.site-nav a.is-on:hover {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
}
/* The study column is transparent, so the fixed phase drawing shows
   through the words. This menu makes the header 40px taller and that
   slid the drawing up across the study text. On study routes only,
   move the drawing down by the menu height so the column matches the
   page from before the menu. Other pages are left alone. */
body.is-study #phase-bg {
  top: var(--study-shift, 40px);
  bottom: auto;
  height: 100%;
}

.q-top { top: var(--header-stack, 112px); }
.math-sec,
.study :is(h1, h2, h3) { scroll-margin-top: calc(var(--header-stack, 112px) + 8px); }

.title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 18px;
  flex-wrap: wrap;
}
.title-row h1 { margin: 0; }

.study-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  flex-wrap: wrap;
  margin-top: 16px;
  color: var(--text);
  text-decoration: none;
}
.study-entry:hover { border-color: var(--cyan); }
.study-copy { flex: 1 1 16rem; min-width: 0; }
.study-copy strong { display: block; font-size: 1.15rem; }
.study-copy span { color: var(--text-dim); font-size: 0.95rem; }
.study-entry .btn { flex: none; }
.study-entry .btn.primary {
  background: var(--cyan);
  border-color: var(--cyan);
  color: var(--cyan-ink);
}
.study-entry:hover .btn.primary,
.study-entry:focus-visible .btn.primary {
  background: var(--white);
  border-color: var(--white);
  color: var(--bg);
}

.desk {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
  align-items: start;
}
.desk > .panel + .panel,
.tool-grid > .panel + .panel { margin-top: 0; }
.desk > *,
.tool-grid > * { min-width: 0; }

.panel-h {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.panel-h h2 {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.panel-h .tag { flex: none; }

.news-list { list-style: none; margin: 0; padding: 0; }
.news-list li { padding: 10px 0; border-top: 1px solid var(--line); }
.news-list li:first-child { border-top: 0; padding-top: 0; }
a.news-hit {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}
a.news-hit:hover { color: inherit; }
.news-thumb {
  flex: none;
  width: 64px;
  height: 48px;
  background: var(--bg);
  border: 1px solid var(--line);
  overflow: hidden;
}
.news-thumb img,
.news-thumb svg {
  width: 64px;
  height: 48px;
  max-width: none;
  display: block;
  object-fit: cover;
}
.news-copy { min-width: 0; flex: 1; }
.news-title {
  display: block;
  margin: 0 0 3px;
  font-weight: 650;
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
}
a.news-hit:hover .news-title { color: var(--white); }
.news-src { display: block; font-size: 0.86rem; color: var(--text-dim); }
.news-empty { margin: 0; color: var(--text-dim); font-size: 0.92rem; }

.slide {
  display: none;
  margin: 0;
  background: var(--bg);
  border: 1px solid var(--line);
}
.slide.is-on { display: block; }
.art-frame svg { display: block; width: 100%; height: auto; }
.slide figcaption {
  margin: 0;
  padding: 8px 10px 10px;
  text-align: center;
  color: var(--text-faint);
  font-size: 0.78rem;
}
.deck-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
}
.deck-dots { display: flex; align-items: center; gap: 6px; }
.deck-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 1px solid var(--text-faint);
  background: transparent;
  cursor: pointer;
}
.deck-dot.is-on { background: var(--cyan); border-color: var(--cyan); }
.deck-btns { display: flex; gap: 6px; flex: none; }

.dist-strip,
.jump-row,
.gear-filters { margin: 8px 0 12px; }
.dist-strip,
.jump-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
}
.dist-strip a { text-underline-offset: 3px; }
a.jump {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  background: var(--panel-2);
  color: var(--text);
  text-decoration: none;
  font-size: 0.86rem;
}
a.jump:hover { border-color: var(--cyan); color: var(--cyan); }

.gear-section,
.gear-sub { scroll-margin-top: 124px; }
.back-top {
  min-height: 44px;
  width: 100%;
  margin-top: 12px;
}
.gear-cat {
  margin: 18px 0 8px;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
}
.gear-sub { margin-top: 12px; min-width: 0; }
.gear-sub h3 { margin: 0 0 8px; font-size: 1.05rem; }
.gear-empty { margin: 8px 0 0; color: var(--text-dim); }

.tool-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.tool-card { min-width: 0; }
.tool-photo {
  margin: -16px -16px 10px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.tool-photo img {
  display: block;
  width: 100%;
  height: auto;
}
.tool-credit {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 10px;
  align-items: baseline;
  margin: 0 0 8px;
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}
.tool-image-note {
  min-width: 0;
  max-width: 100%;
  color: var(--text-faint);
}
.tool-card h3 { margin: 0 0 4px; font-size: 1.05rem; }
.tool-maker {
  margin: 0 0 8px;
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 0.78rem;
}
.tool-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
  margin: 0 0 8px;
}
.tool-buyer {
  margin: 0 0 4px;
  font-family: var(--mono);
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}
.tool-buyer.person-angelo { color: var(--person-angelo); }
.tool-buyer.person-cristian { color: var(--person-cristian); }
.chip.person-angelo {
  color: var(--person-angelo);
  border-color: var(--person-angelo);
}
.chip.person-cristian {
  color: var(--person-cristian);
  border-color: var(--person-cristian);
}
.chip.person-angelo[aria-pressed="true"] {
  background: var(--person-angelo);
  color: var(--bg);
  border-color: var(--person-angelo);
}
.chip.person-cristian[aria-pressed="true"] {
  background: var(--person-cristian);
  color: var(--bg);
  border-color: var(--person-cristian);
}
.tool-price {
  margin: 0 0 10px;
  color: var(--amber-2);
  font-family: var(--mono);
  font-size: 0.82rem;
}
.tool-k {
  margin: 0 0 2px;
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.tool-material,
.tool-use,
.tool-rating,
.tool-note {
  margin: 0 0 10px;
  overflow-wrap: break-word;
}
.tool-material,
.tool-use,
.tool-note { color: var(--text-dim); font-size: 0.92rem; }
.tool-material { font-size: 0.86rem; }
.tool-rating { color: var(--text); font-size: 0.9rem; }
.tool-note { color: var(--text-faint); font-size: 0.82rem; }
.tool-links { display: flex; flex-wrap: wrap; gap: 8px; }
.tool-links .btn { text-align: center; }
.tool-field { margin: 4px 0 0; color: var(--text-dim); font-size: 0.9rem; }
.tool-field summary { cursor: pointer; color: var(--text); }
.tool-field ul { margin: 8px 0 0; padding-left: 1.15rem; }
.tool-field li { margin: 0 0 6px; overflow-wrap: break-word; }

.soon { max-width: 42rem; }
.soon p { margin: 0; color: var(--text-dim); max-width: 42ch; }

@media (max-width: 640px) {
  .site-nav a {
    font-size: 0.66rem;
    letter-spacing: 0.06em;
    gap: 4px;
  }
  .desk,
  .tool-grid { grid-template-columns: 1fr; }
  .title-row { align-items: flex-start; }
}

/* Photo questions (equipment identification). Image above the stem; credit under it. */
.q-figure {
  margin: 4px 0 12px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--amber);
  background: var(--bg-deep);
  width: fit-content;
  max-width: 100%;
}
.q-figure img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 300px;
  margin: 0 auto;
}
.q-figure figcaption {
  padding: 4px 8px;
  border-top: 1px solid var(--line);
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}
.q-figure-sm img { max-height: 180px; }
