.window-guides {
  --guide-ink: #152e2d;
  --guide-paper: #f8faf6;
  --guide-line: #b7cbc1;
  --guide-copy: #364e49;
  --operation: #225f51;
  --operation-pale: #e4f0e8;
  --project: #384f69;
  --project-pale: #e9eff5;
  background: var(--guide-paper);
}
.window-guides main { color: var(--guide-ink); }
.window-guides main :focus-visible { outline: 3px solid var(--operation); outline-offset: 4px; }

.guide-intro {
  padding-block: clamp(23px, 4.7vw, 59px) clamp(26px, 5.4vw, 66px);
  border-bottom: 1px solid var(--guide-line);
  background: var(--operation-pale);
}
.guide-intro--project {
  border-color: #becbda;
  background: var(--project-pale);
}
.guide-trail { display: block; margin-bottom: clamp(9px, 2vw, 20px); }
.guide-trail ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 9px;
  padding: 0;
  margin: 0;
  list-style: none;
  font-size: .87rem;
}
.guide-trail li + li::before { content: "/"; margin-right: 9px; color: var(--guide-copy); }
.guide-trail a { min-height: 40px; padding: 0; font-weight: 600; text-decoration: underline; text-underline-offset: .19em; white-space: normal; }
.guide-intro h1 { max-width: 24ch; font-size: clamp(2.2rem, 5.5vw, 5.1rem); line-height: 1.03; overflow-wrap: anywhere; }
.guide-summary { max-width: 63ch; margin-top: 14px; color: var(--guide-copy); font-size: clamp(1.015rem, 1.5vw, 1.17rem); }
.window-reader { padding-block: clamp(20px, 3vw, 39px) 46px; }
.window-reader h2 { font-size: clamp(1.45rem, 3vw, 2.5rem); line-height: 1.09; }

.guide-family-nav { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-bottom: clamp(31px,5vw,58px); }
.guide-family-nav .guide-family {
  --family: var(--operation);
  --family-bg: var(--operation-pale);
  position: relative;
  display: block;
  padding: clamp(13px, 2vw, 23px) 38px clamp(13px, 2vw, 23px) clamp(13px, 2vw, 23px);
  border: 1px solid var(--guide-line);
  border-top: 3px solid var(--family);
  background: var(--family-bg);
  color: var(--guide-ink);
  text-decoration: none;
  white-space: normal;
}
.guide-family-nav .guide-family--project { --family: var(--project); --family-bg: var(--project-pale); border-inline-color: #becbda; border-bottom-color: #becbda; }
.guide-family strong, .guide-family span { display: block; }
.guide-family strong { font-size: clamp(1.1rem, 2vw, 1.4rem); font-weight: 700; line-height: 1.15; }
.guide-family span { margin-top: 7px; color: var(--guide-copy); font-size: .91rem; font-weight: 500; line-height: 1.35; }
.guide-family:hover strong { text-decoration: underline; text-underline-offset: .17em; }
.guide-family::after {
  position: absolute;
  inset: clamp(15px, 2.5vw, 27px) 17px auto auto;
  width: .55rem;
  height: .55rem;
  content: "";
  border-right: 2px solid var(--family);
  border-bottom: 2px solid var(--family);
  transform: rotate(45deg);
}

.guide-directory {
  --family: var(--operation);
  --family-bg: var(--operation-pale);
  display: grid;
  grid-template-columns: minmax(190px,.36fr) minmax(0,1fr);
  align-items: start;
  gap: 1.25rem clamp(1.5rem,5vw,5rem);
  border-top: 2px solid var(--family);
  padding: clamp(18px,3vw,30px) 0 clamp(29px,5vw,52px);
}
.guide-directory--project {
  --family: var(--project);
  --family-bg: var(--project-pale);
}
.guide-directory > header { position: sticky; top: 1.1rem; }
.guide-directory nav { display: block; margin-top: 12px; }
.guide-directory nav ul { list-style: none; margin: 0; padding: 0; }
.guide-directory nav a {
  display: inline-block;
  padding: .43rem 0;
  color: var(--family);
  font-size: .9rem;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: .17em;
  white-space: normal;
}
.guide-shelves { display: grid; gap: clamp(16px, 3vw, 27px); min-width: 0; }
.guide-topic {
  border: 1px solid var(--guide-line);
  background: #fff;
}
.guide-topic h3 {
  padding: .75rem .9rem;
  border-bottom: 1px solid var(--guide-line);
  background: var(--family-bg);
  color: var(--family);
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  line-height: 1.18;
  letter-spacing: -.015em;
}
.guide-topic ul { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); margin: 0; padding: 0; list-style: none; }
.guide-topic li { min-width: 0; padding: .76rem .9rem .91rem; border-bottom: 1px solid var(--guide-line); }
.guide-topic li:nth-child(odd) { border-right: 1px solid var(--guide-line); }
.guide-topic li:last-child, .guide-topic li:nth-last-child(2):nth-child(odd) { border-bottom: 0; }
.guide-topic a { color: var(--guide-ink); font-weight: 700; text-underline-offset: .19em; overflow-wrap: anywhere; }
.guide-topic li p { margin-top: .27rem; color: var(--guide-copy); font-size: .91rem; line-height: 1.42; }

.guide-reading { display: grid; grid-template-columns: minmax(155px,.35fr) minmax(0,1fr); align-items: start; gap: 1.4rem clamp(1.5rem,5.5vw,5rem); }
.guide-toc {
  display: block;
  position: sticky;
  top: 1.1rem;
  padding: 13px 15px 15px;
  border-left: 3px solid var(--operation);
  background: var(--operation-pale);
}
.guide-toc > p { margin: 0 0 .5rem; font-size: .9rem; font-weight: 720; }
.guide-toc ol { margin: 0; padding-left: 1.2rem; }
.guide-toc li + li { margin-top: .33rem; }
.guide-toc li a { display: inline; min-height: 0; padding: 0; color: var(--guide-ink); font-size: .9rem; font-weight: 550; text-decoration: underline; white-space: normal; }
.guide-intro--project + .window-reader .guide-toc { border-color: var(--project); background: var(--project-pale); }
.guide-copy { min-width: 0; }
.guide-copy section { max-width: 68ch; margin-bottom: clamp(1.6rem,4vw,2.7rem); }
.guide-copy p { margin-top: .67rem; }
.guide-checks {
  margin-top: .92rem;
  padding: .7rem .9rem .83rem;
  border: 1px solid var(--guide-line);
  background: #f0f6f0;
}
.guide-checks h3 { font-size: 1rem; line-height: 1.2; letter-spacing: 0; }
.guide-checks ul { margin: .4rem 0 0; padding-left: 1.16rem; }
.guide-checks li + li { margin-top: .24rem; }
.guide-next-check { padding: .9rem 1rem; border-left: 3px solid var(--project); background: var(--project-pale); }
.guide-next-check h2 { font-size: clamp(1.3rem,2.3vw,1.8rem); }
.guide-copy .guide-source { margin-bottom: 1.3rem; font-size: .9rem; }
.guide-copy .guide-related { padding-top: 1.05rem; margin-bottom: 0; border-top: 1px solid var(--guide-line); }
.guide-related ul { list-style: none; margin: .7rem 0 0; padding: 0; }
.guide-related li + li { margin-top: .57rem; }
.guide-related a { color: var(--operation); font-weight: 700; }
.guide-action {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: clamp(1.5rem,3.5vw,2.5rem);
  padding: clamp(15px,2.5vw,25px);
  border-top: 2px solid var(--operation);
  background: var(--operation-pale);
}
.guide-action p { margin-top: .45rem; color: var(--guide-copy); }
.guide-intro--project + .window-reader .guide-action { border-color: var(--project); background: var(--project-pale); }

@media (max-width: 700px) {
  .guide-directory, .guide-reading { grid-template-columns: minmax(0,1fr); }
  .guide-directory > header, .guide-toc { position: static; }
  .guide-directory nav ul { display: flex; flex-wrap: wrap; column-gap: .85rem; }
}
@media (max-width: 490px) {
  .guide-family-nav, .guide-topic ul { grid-template-columns: minmax(0,1fr); }
  .guide-family-nav { margin-bottom: 23px; }
  .guide-topic li:nth-child(n) { border-right: 0; border-bottom: 1px solid var(--guide-line); }
  .guide-topic li:last-child { border-bottom: 0; }
}
