/* Trim Sheet Baker user guide: page specific styles on top of /assets/site.css */

/* header: the way back to the home page, set apart from the links into this guide */
.site-nav .nav-home {
  color: var(--text); padding-right: 22px; border-right: 1px solid var(--line-hi);
}
.site-nav .nav-home::before { content: "←"; color: var(--accent); margin-right: 8px; }
.site-nav .nav-home:hover { color: var(--accent); }

.doc-hero { padding: 64px 0 40px; }
.doc-hero h1 { font-size: clamp(2.2rem, 6vw, 4rem); }
.doc-hero .lead { margin-top: 18px; }
.doc-hero .meta { margin: 18px 0 0; font-family: var(--mono); font-size: 0.82rem; color: var(--cyan); letter-spacing: 0.06em; text-transform: uppercase; }
/* .shot further down sets an 8px top margin; the extra class keeps the image clear of the box's corner */
.shot.hero-shot { margin-top: 44px; }

.doc-layout {
  display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 48px;
  align-items: start; padding-bottom: 72px;
}

/* ---------- table of contents ---------- */

.toc { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow-y: auto; padding-right: 6px; }
.toc summary {
  cursor: pointer; list-style: none;
  font-family: var(--mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent);
  margin-bottom: 10px;
}
.toc summary::-webkit-details-marker { display: none; }
.toc ol { list-style: none; margin: 0; padding: 0; }
/* only on the top list: a reset on the nested lists started the count anew after them */
.toc > details > ol { counter-reset: toc; }
.toc > details > ol > li { counter-increment: toc; }
.toc a {
  display: block; padding: 5px 0 5px 12px; border-left: 1px solid var(--line-hi);
  color: var(--text-muted); text-decoration: none; font-size: 0.9rem; line-height: 1.35;
}
.toc > details > ol > li > a::before {
  content: counter(toc, decimal-leading-zero) " "; font-family: var(--mono); font-size: 0.72rem; color: var(--accent);
}
/* sub-sections start right of their chapter's title, past its number */
.toc ol ol a { padding-left: 48px; font-size: 0.84rem; }
.toc a:hover { color: var(--text); }
.toc a.active { color: var(--text); border-left-color: var(--accent); }

/* ---------- content ---------- */

.doc { min-width: 0; max-width: 880px; }
.doc section { padding: 0 0 56px; }
.doc .section-head { margin-bottom: 26px; }
.doc h3 { margin: 40px 0 14px; font-size: 1.35rem; }
.doc h4 { margin: 30px 0 10px; font-family: var(--display); font-size: 1.08rem; letter-spacing: 0.03em; color: var(--text); }
.doc h3 + h4 { margin-top: 18px; }
.doc p, .doc li { color: #c9d1dd; }
.doc p { margin: 0 0 14px; }
.doc ul, .doc ol { margin: 0 0 16px; padding-left: 22px; }
.doc li { margin: 5px 0; }
.doc li::marker { color: var(--accent); }
.doc strong { color: var(--text); }
.doc em { color: var(--text); }

.doc code {
  font-family: var(--mono); font-size: 0.86em; padding: 1px 6px;
  background: var(--panel-hi); border: 1px solid var(--line); color: #e9c9a8;
}
.doc pre {
  margin: 0 0 18px; padding: 16px 18px; overflow-x: auto;
  background: var(--panel); border: 1px solid var(--line); border-left: 2px solid var(--cyan);
}
.doc pre code { padding: 0; border: 0; background: none; color: var(--text); font-size: 0.86rem; }
kbd {
  font-family: var(--mono); font-size: 0.8em; padding: 1px 6px; white-space: nowrap;
  color: var(--text); background: var(--panel-hi); border: 1px solid var(--line-hi); border-bottom-width: 2px;
}

/* tables */
.table-wrap { margin: 0 0 20px; overflow-x: auto; border: 1px solid var(--line); background: rgba(14, 19, 27, 0.6); }
.doc table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.doc th, .doc td { padding: 9px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.doc th {
  font-family: var(--mono); font-weight: 500; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--cyan); background: var(--panel); white-space: nowrap;
}
.doc tr:last-child td { border-bottom: 0; }
.doc td:first-child { color: var(--text); }
.doc td { color: #c9d1dd; }

/* screenshots */
.shot { margin: 8px 0 26px; }
.shot a { display: block; border: 1px solid var(--line-hi); background: #000; transition: border-color 0.15s; }
.shot a:hover { border-color: var(--accent); }
.shot img { width: 100%; }
.shot figcaption { margin-top: 8px; font-family: var(--mono); font-size: 0.76rem; color: var(--text-muted); letter-spacing: 0.02em; }
.shot figcaption::before { content: "// "; color: var(--accent); }
.shot.panel { max-width: 370px; }
.shot.strip a { background: #1d1d1d; }

/* video thumbnail: a play button over the image, the video itself opens on YouTube */
.shot.video a { position: relative; }
.shot.video a::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 84px; height: 84px; transform: translate(-50%, -50%);
  background: rgba(10, 12, 16, 0.78) no-repeat 54% 50% / 34px 34px
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 3l15 9-15 9z' fill='%23ff7a1a'/%3E%3C/svg%3E");
  border: 1px solid var(--accent); transition: background-color 0.15s, box-shadow 0.15s;
}
.shot.video a:hover::after { background-color: rgba(10, 12, 16, 0.92); box-shadow: 0 0 28px var(--accent-glow); }
.doc #video { padding-bottom: 32px; }

/* a table or text next to a sidebar screenshot */
.split { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; margin-bottom: 8px; }
.split > .shot { margin-top: 0; }
.split > div > :last-child { margin-bottom: 0; }

.note {
  margin: 0 0 18px; padding: 14px 18px;
  background: var(--panel); border: 1px solid var(--line); border-left: 2px solid var(--accent);
}
.note p:last-child { margin-bottom: 0; }

.steps { counter-reset: step; list-style: none; padding-left: 0 !important; }
.steps > li { counter-increment: step; position: relative; padding-left: 40px; margin: 10px 0; }
.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 1px;
  width: 26px; height: 26px; display: grid; place-items: center;
  font-family: var(--mono); font-size: 0.8rem; color: #0a0c10; background: var(--accent);
}

.doc-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

/* ---------- small screens ---------- */

@media (max-width: 960px) {
  .doc-layout { grid-template-columns: 1fr; gap: 24px; }
  .toc { position: static; max-height: none; padding: 16px 18px; background: var(--panel); border: 1px solid var(--line); }
  .toc summary { margin-bottom: 0; }
  .toc details[open] summary { margin-bottom: 10px; }
  .split { grid-template-columns: 1fr; }
  .split > .shot { max-width: 370px; }
}

@media (max-width: 760px) {
  /* phones: Back to Home on a line of its own above the links into the guide */
  .site-nav .nav-home { flex-basis: 100%; padding-right: 0; border-right: 0; }
  .doc-hero { padding: 40px 0 28px; }
  .doc th, .doc td { padding: 8px 10px; }
  .doc table { font-size: 0.88rem; }
}
