/* SHOWBOOK Field Guide page. V1 candidate, 2026-10-27.
   Uses EventOS theme tokens from js/theme.css and the chassis from js/insights.css.
   Classes are namespaced .sb- so nothing collides with other pages. */

.sb-skip {
  position: absolute;
  left: -10000px;
  top: 8px;
  z-index: 2000;
  padding: 8px 14px;
  background: var(--panel);
  border-radius: 8px;
}
.sb-skip:focus { left: 12px; }

.sb-page a:focus-visible,
.sb-page button:focus-visible,
.sb-page input:focus-visible,
.sb-page summary:focus-visible {
  outline: 2px solid var(--accent-rich);
  outline-offset: 3px;
}

.sb-masthead { max-width: 820px; }
.sb-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 0; }
.sb-toc { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 26px 0 0; font-size: 14.5px; font-weight: 600; }
.sb-toc a { color: var(--muted); }
.sb-toc a:hover { color: var(--link); }

.sb-section { padding: 56px 0 8px; scroll-margin-top: 90px; }
.sb-section h2 { margin: 0 0 14px; font-size: 32px; line-height: 1.2; font-weight: 800; letter-spacing: 0.01em; }
.sb-section h3 { font-size: 18px; margin: 0 0 12px; }
.sb-lead { max-width: 760px; margin: 0 0 26px; font-size: 17.5px; line-height: 1.65; color: var(--muted); }
.sb-prose { max-width: 760px; font-size: 17px; line-height: 1.75; }
.sb-prose p { margin: 0 0 16px; }
.sb-sign { font-weight: 700; color: var(--text); }
.sb-small { max-width: 860px; margin: 22px 0 0; font-size: 14.5px; line-height: 1.65; color: var(--muted); }
.sb-linkbtn {
  background: none !important;
  border: 0 !important;
  padding: 6px 0 !important;
  color: var(--link) !important;
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}
.sb-linkbtn:hover { transform: none !important; }

/* Operating Map */
.sb-clusters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
}
.sb-cluster {
  background: var(--panel);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent-rich);
  border-radius: var(--radius);
  padding: 20px 20px 14px;
  box-shadow: var(--shadow-soft);
}
.sb-cluster h3 { margin: 0 0 2px; font-size: 18px; }
.sb-cluster-count { display: block; margin: 0 0 12px; font-size: 13px; color: var(--muted); }
.sb-discipline { border-top: 1px solid var(--border); }
.sb-discipline summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 26px 10px 0;
  position: relative;
  font-weight: 600;
}
.sb-discipline summary::-webkit-details-marker { display: none; }
.sb-discipline summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 8px;
  font-weight: 700;
  color: var(--accent-rich);
}
.sb-discipline[open] summary::after { content: "\2212"; }
.sb-discipline p { margin: 0 0 12px; color: var(--muted); line-height: 1.55; font-size: 15px; }

/* Network band: near full width, dark in both themes */
.sb-network {
  margin: 64px auto 8px;
  width: calc(100% - 32px);
  max-width: 1480px;
  border-radius: 24px;
  background: #0e1a2b;
  color: #eef4fb;
  overflow: hidden;
}
.sb-network-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.4fr);
  align-items: center;
  gap: 24px;
  padding: 48px 48px 40px;
}
.sb-network-eyebrow {
  display: block;
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #7faedb;
}
.sb-network h2 { margin: 0 0 18px; font-size: 40px; line-height: 1.15; font-weight: 800; color: #f2f5f9 !important; }
.sb-network h2 span { color: #7faedb; }
.sb-network p { margin: 0 0 14px; font-size: 18px; line-height: 1.6; color: #d4deea !important; }
.sb-network .sb-network-small { font-size: 15px; color: #a9b8cc !important; }
.sb-network-figure { margin: 0; }
.sb-network-figure img { display: block; width: 100%; height: auto; }

/* Self-check */
.sb-check { max-width: 900px; }
.sb-check-list { list-style: none; margin: 0; padding: 0; }
.sb-q {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 24px;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid var(--border);
}
.sb-q-text { margin: 0; display: flex; gap: 8px; line-height: 1.5; }
.sb-q-num { flex: none; min-width: 22px; font-weight: 700; color: var(--accent-rich); }
.sb-q-opts { display: flex; gap: 8px; }
.sb-q-opt { position: relative; cursor: pointer; }
.sb-q-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sb-q-opt span {
  display: inline-block;
  min-width: 78px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  background: var(--panel);
}
.sb-q-opt:hover span { border-color: var(--accent-rich); }
.sb-q-opt input:checked + span { background: var(--accent-rich); border-color: var(--accent-rich); color: #fff; }
.sb-q-opt input:focus-visible + span { outline: 2px solid var(--accent-rich); outline-offset: 2px; }
.sb-check-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; max-width: 900px; border-top: 1px solid var(--border); padding-top: 10px; }
.sb-check-count { margin: 0; font-size: 14px; color: var(--muted); }
.sb-note {
  max-width: 900px;
  margin: 22px 0 0;
  padding: 20px 22px;
  background: var(--accent-soft);
  border-radius: var(--radius);
  line-height: 1.65;
}
.sb-note p { margin: 0 0 10px; }
.sb-note p:last-child { margin: 0; }

/* After the show */
.sb-two { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr); gap: 32px; align-items: start; }
.sb-files { margin: 0; padding-left: 20px; line-height: 1.7; }
.sb-files li { margin: 0 0 6px; }
.sb-questions { list-style: none; counter-reset: pq; margin: 0; padding: 0; }
.sb-questions li {
  counter-increment: pq;
  position: relative;
  margin: 0 0 12px;
  padding: 16px 18px 16px 56px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  line-height: 1.6;
}
.sb-questions li::before {
  content: counter(pq);
  position: absolute;
  left: 18px;
  top: 13px;
  font-size: 22px;
  font-weight: 800;
  color: var(--accent-rich);
}

/* Worksheet */
.sb-private { max-width: 760px; margin: -8px 0 20px; font-size: 14.5px; color: var(--muted); }
.sb-ws { max-width: 960px; }
.sb-ws-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; margin: 0 0 24px; }
.sb-ws label { display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.sb-ws input { display: block; width: 100%; margin-top: 6px; font: inherit; font-size: 15.5px; text-transform: none; letter-spacing: 0; }
.sb-ws-table { margin: 0 0 22px; }
.sb-ws-table h3 { font-size: 16px; margin: 0 0 8px; }
.sb-ws-table table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.sb-ws-table th { text-align: left; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding: 0 6px 6px 0; }
.sb-ws-table td { padding: 0 6px 6px 0; }
.sb-ws-table td input { margin: 0; }
.sb-ws-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 22px; }
.sb-quote { max-width: 760px; margin: 24px 0 0; font-style: italic; color: var(--link); font-size: 16.5px; line-height: 1.6; }

/* Bridge and Snapshot */
.sb-bridge { padding-top: 64px; }
.sb-snapshot { padding-bottom: 72px; }
.sb-snap-card {
  max-width: 900px;
  padding: 34px 34px 30px;
  border-radius: 20px;
  background: #0e1a2b;
  color: #eef4fb;
}
.sb-snap-eyebrow { display: block; margin: 0 0 10px; font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: #7faedb; }
.sb-snap-card h2 { color: #f2f5f9 !important; }
.sb-snap-card p, .sb-snap-card li { color: #d4deea !important; font-size: 16.5px; line-height: 1.6; }
.sb-snap-card ul { margin: 0 0 24px; padding-left: 20px; }
.sb-form { max-width: 720px; margin-top: 28px; }
.sb-form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.sb-fieldset { margin: 0 0 18px; padding: 16px 18px 6px; border: 1px solid var(--border); border-radius: 12px; }
.sb-fieldset legend { padding: 0 6px; font-size: 14.5px; font-weight: 700; }
.sb-check-opt { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 10px; font-size: 15.5px; cursor: pointer; }
.sb-check-opt input { margin-top: 4px; width: 17px; height: 17px; flex: none; }
.sb-check-opt input:disabled + span { color: var(--muted); }
.sb-other { margin-top: 4px; }

@media (max-width: 900px) {
  .sb-network-inner { grid-template-columns: 1fr; padding: 36px 24px 28px; }
  .sb-network h2 { font-size: 32px; }
  .sb-two { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .sb-section { padding-top: 44px; }
  .sb-section h2 { font-size: 26px; }
  .sb-network { width: 100%; border-radius: 0; margin-top: 48px; }
  .sb-network-inner { padding: 32px 16px 20px; }
  .sb-q { grid-template-columns: 1fr; }
  .sb-q-opts { padding-left: 30px; }
  .sb-q-opt span { min-width: 0; padding: 8px 14px; }
  .sb-ws-grid, .sb-form-row { grid-template-columns: 1fr; }
  .sb-ws-table table, .sb-ws-table thead, .sb-ws-table tbody, .sb-ws-table tr, .sb-ws-table th, .sb-ws-table td { display: block; }
  .sb-ws-table thead { position: absolute; left: -10000px; }
  .sb-ws-table tr { margin: 0 0 12px; padding: 10px 0 4px; border-top: 1px solid var(--border); }
  .sb-ws-table td { padding: 0 0 8px; }
  .sb-ws-table td input::placeholder { color: var(--muted); }
  .sb-snap-card { padding: 26px 20px 22px; }
  .sb-actions .btn { width: 100%; text-align: center; }
}

/* Print: the worksheet button prints only the worksheet */
@media print {
  .topbar, .site-footer, .sb-skip { display: none !important; }
  body.sb-print-ws .sb-page > *:not(.ins-shell),
  body.sb-print-ws .ins-shell > *:not(#worksheet),
  body.sb-print-ws .sb-ws-actions,
  body.sb-print-ws .sb-private { display: none !important; }
  body.sb-print-ws #worksheet { padding-top: 0; }
  .sb-ws input { border: 1px solid #999; background: #fff; color: #000; }
}
.sb-check-count:empty { display: none; }
html[data-theme="dark"] .sb-snap-card,
html[data-theme="dark"] .sb-network { border: 1px solid var(--border); }
@media (min-width: 701px) { .sb-ws-table input::placeholder { color: transparent; } }

/* 2026-10-28 review fixes */
/* "Tell me a little more" stays hidden until "Something else" is checked
   (.ins-field sets display:block, which would otherwise override [hidden]). */
.sb-other[hidden] { display: none; }

/* Snapshot form: controls fill the padded container without overflowing. */
.sb-form,
.sb-form * { box-sizing: border-box; }
.sb-form .ins-field input,
.sb-form .ins-field textarea { width: 100%; max-width: 100%; }
.sb-fieldset { min-width: 0; max-width: 100%; }

@media (max-width: 700px) {
  /* Consistent 20px side gutter for the Snapshot section on phones,
     so text, labels and focus outlines never touch the viewport edge. */
  .sb-page .sb-snapshot { margin-left: -16px; margin-right: -16px; padding-left: 20px; padding-right: 20px; }
  .sb-form { max-width: 100%; }
  .sb-fieldset { padding: 14px 14px 4px; }
  .sb-fieldset legend { white-space: normal; }
  .sb-check-opt { font-size: 15px; }
}
