/* SimpleHPSDR user guide: additions to ../styles.css */

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

.guide-hero .eyebrow {
  margin-bottom: 0.6rem;
}

.guide-version {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  margin: 1rem 0 0;
}

/* Two columns: the chapter on the left, chapters and sections on the right */

.guide-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 3rem;
  padding: 2.4rem 0 3rem;
  align-items: start;
}

.guide-layout .prose {
  max-width: none;
}

/* Text keeps a readable measure; pictures may use the whole column */
.guide-layout .prose > p,
.guide-layout .prose > ul,
.guide-layout .prose > ol,
.guide-layout .prose > h2,
.guide-layout .prose > h3,
.guide-layout .prose > h4,
.guide-layout .prose > .callout,
.guide-layout .prose > .table-wrap,
.guide-layout .prose > dl {
  max-width: 46rem;
}

.guide-side {
  position: sticky;
  top: 88px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  border-left: 1px solid var(--line);
  padding-left: 1.1rem;
  font-size: 0.86rem;
}

.guide-side h2 {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--phosphor);
  margin: 0 0 0.7rem;
  font-weight: 500;
}

.guide-side ol {
  list-style: none;
  margin: 0 0 1.6rem;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.guide-side a {
  color: var(--muted);
}

.guide-side a:hover,
.guide-side a.active,
.guide-side a[aria-current="page"] {
  color: var(--amber);
}

.guide-side .toc {
  position: static;
  border: 0;
  padding: 0;
  font-size: inherit;
}

.guide-side .toc ol {
  margin-bottom: 0;
}

.guide-search {
  margin: 0 0 1.4rem;
}

.guide-search input {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.45rem 0.7rem;
}

.guide-search input::placeholder {
  color: var(--muted);
}

/* Names of buttons and controls, as they appear in the app */
.ui {
  font-family: var(--mono);
  font-size: 0.86em;
  color: var(--text);
  background: #1f2630;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.05em 0.4em;
  white-space: nowrap;
}

.ui.tx {
  color: #ff8a80;
  border-color: #7a3b36;
}

.prose kbd {
  font-family: var(--mono);
  font-size: 0.84em;
  color: var(--text);
  border: 1px solid #3a4552;
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 0.02em 0.35em;
  background: var(--bg-elev);
}

.prose code {
  font-family: var(--mono);
  font-size: 0.88em;
  color: #d7e0d4;
  background: var(--bg-elev);
  border-radius: 5px;
  padding: 0.1em 0.35em;
  overflow-wrap: anywhere;
}

.prose pre {
  font-family: var(--mono);
  font-size: 0.86rem;
  line-height: 1.55;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.9rem 1.1rem;
  overflow-x: auto;
  margin: 0 0 1.2rem;
  max-width: 46rem;
}

.prose pre code {
  background: none;
  padding: 0;
  overflow-wrap: normal;
}

/* Screenshots */

.shot {
  margin: 1.6rem 0 1.8rem;
}

.shot a {
  display: block;
}

.shot img {
  border-radius: 10px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: #0b0d10;
}

.shot figcaption {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 0.55rem;
  max-width: 46rem;
}

/* Popups and small windows: shown at their real size, never stretched */
.shot.pop img {
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
}

.shot-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem 1.4rem;
  align-items: flex-start;
  margin: 1.6rem 0 1.8rem;
}

.shot-row .shot {
  margin: 0;
  flex: 0 1 auto;
  min-width: 0;
}

/* The numbered tour of the main window */

.tour {
  position: relative;
  margin: 1.6rem 0 0.6rem;
}

.tour img {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.tour .pin,
.pin-key {
  display: inline-grid;
  place-items: center;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 50%;
  background: var(--amber);
  color: #1a1206;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1;
}

.tour .pin {
  position: absolute;
  width: 1.3rem;
  height: 1.3rem;
  font-size: 0.68rem;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 3px rgba(11, 13, 16, 0.75), 0 2px 8px rgba(0, 0, 0, 0.6);
}

.tour-key {
  list-style: none;
  padding: 0 !important;
  margin: 1rem 0 1.6rem !important;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem 1.6rem;
  max-width: none !important;
}

.tour-key li {
  display: grid;
  grid-template-columns: 1.55rem 1fr;
  gap: 0.6rem;
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

.tour-key .pin-key {
  margin-top: 0.1rem;
}

/* Chapter cards on the guide's front page */

.chapter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  margin: 1.2rem 0 1.6rem;
}

.chapter-grid .link-card {
  text-decoration: none;
}

.chapter-grid .link-card strong {
  font-size: 1.05rem;
}

/* Numbered procedures */

.prose ol.steps {
  list-style: none;
  padding-left: 0;
  counter-reset: step;
}

.prose ol.steps > li {
  counter-increment: step;
  position: relative;
  padding-left: 2.6rem;
  margin: 0.8rem 0;
}

.prose ol.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.1rem;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  border: 1px solid var(--amber-dim);
  color: var(--amber);
  font-family: var(--mono);
  font-size: 0.8rem;
  display: grid;
  place-items: center;
}

.data-table td {
  vertical-align: top;
}

.data-table td:first-child {
  white-space: normal;
  min-width: 8.5rem;
}

@media (max-width: 960px) {
  .guide-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.6rem;
  }

  .guide-side {
    position: static;
    order: -1;
    max-height: none;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
    background: var(--bg-card);
  }

  .guide-side ol {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem 1rem;
  }

  .guide-side .toc {
    display: none;
  }

  .guide-side ol.chapters {
    margin-bottom: 0;
  }
}

@media (max-width: 640px) {
  .tour-key,
  .chapter-grid {
    grid-template-columns: 1fr;
  }

  .tour .pin {
    width: 1.15rem;
    height: 1.15rem;
    font-size: 0.6rem;
    box-shadow: 0 0 0 2px rgba(11, 13, 16, 0.75);
  }
}
