/* Guides generated by build-guias.py. Loaded after styles.css; no inline styles (CSP style-src 'self').
   Shape rule from styles.css: tiles 16px, cards 24px, panels 28px, buttons and nav pills. */

.guide {
  max-width: 820px;
  padding: clamp(24px, 5vw, 64px) 0 clamp(56px, 8vw, 96px);
}

.guide h1 {
  font-size: clamp(2.2rem, 5.4vw, 3.4rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.guide .lead {
  max-width: 62ch;
  margin: 0;
  color: var(--ink-2);
  font-size: clamp(1.06rem, 1.8vw, 1.2rem);
}

.guide .meta {
  margin: 1rem 0 0;
  color: var(--ink-3);
  font-size: 0.88rem;
  font-weight: 600;
}

.guide h2 {
  margin: 2.6rem 0 0.7rem;
  font-size: clamp(1.5rem, 3vw, 1.95rem);
  line-height: 1.12;
}

.guide h3 {
  margin: 1.7rem 0 0.35rem;
  font-family: var(--font-body);
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.3;
}

.guide p,
.guide li,
.guide dd {
  color: var(--ink-2);
}

.guide p {
  margin: 0.9rem 0 0;
}

.guide strong {
  color: var(--ink);
}

.guide ul,
.guide ol {
  margin: 0.9rem 0 0;
  padding-left: 1.25rem;
}

.guide li + li {
  margin-top: 0.45rem;
}

.guide section {
  padding: 0.4rem 0 1.6rem;
  border-bottom: 1px solid var(--line);
}

.guide section:last-of-type {
  border-bottom: 0;
}

/* Table of contents */

.toc {
  margin: 1.8rem 0 0;
  padding: 1.1rem 1.3rem;
  border-radius: var(--radius-card);
  background: var(--bg-raise);
  box-shadow: inset 0 0 0 1px var(--line);
}

.toc-title {
  margin: 0 0 0.5rem;
  color: var(--ink-3);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.toc ol {
  margin: 0;
  padding-left: 1.1rem;
  columns: 2;
  column-gap: 2rem;
  font-size: 0.95rem;
}

.toc li {
  margin: 0.3rem 0;
  break-inside: avoid;
}

.toc a {
  color: var(--ink-2);
  text-decoration: none;
}

.toc a:hover {
  color: var(--route-ink);
  text-decoration: underline;
}

/* Numbers that carry the page */

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin: 1.6rem 0 0;
  padding: 0;
  list-style: none;
}

.facts li {
  margin: 0;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-tile);
  background: var(--bg-raise);
  box-shadow: inset 0 0 0 1px var(--line);
}

.facts b {
  display: block;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.7rem;
  line-height: 1;
  letter-spacing: -0.01em;
}

.facts span {
  display: block;
  margin-top: 0.4rem;
  color: var(--ink-3);
  font-size: 0.88rem;
  line-height: 1.35;
}

/* Tables */

.table-wrap {
  margin: 1.3rem 0 0;
  overflow-x: auto;
  border-radius: var(--radius-tile);
  box-shadow: inset 0 0 0 1px var(--line);
  background: var(--bg-raise);
}

.guide table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
}

.guide caption {
  caption-side: top;
  padding: 0.85rem 1rem 0;
  color: var(--ink-3);
  font-size: 0.85rem;
  line-height: 1.4;
  text-align: left;
}

.guide th,
.guide td {
  padding: 0.7rem 0.95rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.guide thead th {
  background: var(--t-slate);
  color: var(--ink);
  font-weight: 700;
  white-space: nowrap;
}

.guide tbody tr:last-child td {
  border-bottom: 0;
}

.guide tbody th {
  color: var(--ink);
}

/* Callout */

.guide .note {
  margin: 1.2rem 0 0;
  padding: 0.95rem 1.1rem;
  border-radius: 14px;
  background: var(--t-amber);
  color: var(--ink);
  font-size: 0.95rem;
}

/* Glossary */

.glossary {
  margin: 1.2rem 0 0;
}

.glossary div {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}

.glossary div:last-child {
  border-bottom: 0;
}

.glossary dt {
  color: var(--ink);
  font-weight: 700;
}

.glossary dd {
  margin: 0.2rem 0 0;
}

/* Multi-column list (the 19 departments) */

.guide .cols {
  columns: 3;
  column-gap: 1.5rem;
  padding-left: 1.15rem;
}

.guide .cols li {
  break-inside: avoid;
  margin-top: 0.3rem;
}

/* Visible FAQ: same disclosure pattern as the home */

.faq {
  display: grid;
  gap: 10px;
  margin: 1.3rem 0 0;
}

.faq details {
  border-radius: 18px;
  background: var(--bg-raise);
  box-shadow: inset 0 0 0 1px var(--line);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 56px;
  padding: 1rem 1.15rem;
  border-radius: 18px;
  color: var(--ink);
  cursor: pointer;
  font-weight: 600;
  line-height: 1.35;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  flex: 0 0 auto;
  color: var(--route-ink);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
}

.faq details[open] summary::after {
  content: "−";
}

.faq .a {
  padding: 0 1.15rem 1.1rem;
}

.faq .a p {
  margin: 0;
}

/* Closing call to action */

.guide .cta-panel {
  margin: 2.4rem 0 0;
  padding: clamp(1.4rem, 4vw, 2.2rem);
  border-bottom: 0;
  border-radius: var(--radius-panel);
  background: var(--night);
  color: var(--on-night);
}

.cta-panel h2 {
  margin: 0;
  color: var(--on-night);
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.cta-panel p {
  margin: 0.8rem 0 1.3rem;
  max-width: 56ch;
  color: var(--on-night-2);
}

.cta-panel .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.cta-panel .button.secondary {
  color: var(--on-night);
  box-shadow: inset 0 0 0 1.5px var(--on-night-line);
}

.cta-panel .button.secondary:hover {
  background: var(--night-2);
}

/* Related guides */

.guide .related {
  margin: 2.6rem 0 0;
  padding: 0;
  border-bottom: 0;
}

.related h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.3rem, 2.4vw, 1.6rem);
}

.related ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.related li {
  margin: 0;
}

.related a {
  display: block;
  height: 100%;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-tile);
  background: var(--bg-raise);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink);
  text-decoration: none;
}

.related a strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  line-height: 1.15;
}

.related a span {
  display: block;
  margin-top: 0.35rem;
  color: var(--ink-3);
  font-size: 0.9rem;
  line-height: 1.4;
}

@media (hover: hover) and (pointer: fine) {
  .related a:hover {
    background: var(--route-tint);
  }
}

@media (max-width: 860px) {
  .toc ol {
    columns: 1;
  }

  .guide .cols {
    columns: 2;
  }
}

@media (max-width: 640px) {
  .guide .cols {
    columns: 1;
  }

  .facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cta-panel .actions .button {
    flex: 1 1 100%;
  }
}
