/* Layout for brukermanualen. Farger, skrift og komponenter kommer fra
   designsystemet (design.holstadvolley.com/v1/); her står bare plassering. */

.manual {
  max-width: 80rem;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  gap: 3rem;
  align-items: start;
}

@media (max-width: 860px) {
  .manual { grid-template-columns: 1fr; gap: 1.5rem; padding-top: 1.5rem; }
  .manual-meny { position: static !important; }
}

.manual-meny {
  position: sticky;
  top: 1.5rem;
  font-size: 0.95rem;
}
.manual-meny ul { list-style: none; margin: 0; padding: 0; }
.manual-meny ul ul { padding-left: 0.9rem; margin: 0.2rem 0 0.4rem; border-left: 2px solid var(--ds-color-neutral-border-subtle); }
.manual-meny li { margin: 0.15rem 0; }
.manual-meny a { color: var(--ds-color-neutral-text-default); text-decoration: none; display: block; padding: 0.2rem 0.4rem; border-radius: 4px; }
.manual-meny a:hover { text-decoration: underline; }
.manual-meny a[aria-current="page"] { font-weight: 700; color: var(--ds-color-accent-text-default); background: var(--ds-color-accent-surface-tinted); }
.manual-meny__tittel { font-weight: 700; margin: 0 0 0.5rem; text-transform: uppercase; letter-spacing: 0.04em; font-size: 0.8rem; }

.innhold { min-width: 0; max-width: 50rem; }
.innhold > * + * { margin-top: 1rem; }
.innhold h2 { margin-top: 3rem; scroll-margin-top: 1rem; }
.innhold h3 { margin-top: 2rem; scroll-margin-top: 1rem; }
.innhold ul, .innhold ol { padding-left: 1.3rem; }
.innhold li + li { margin-top: 0.35rem; }
.innhold .ingress { font-size: 1.2rem; }

.innhold figure { margin: 1.5rem 0; }
.innhold figure img {
  display: block;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--ds-color-neutral-border-subtle);
  border-radius: 6px;
  box-shadow: 0 2px 10px rgb(0 0 0 / 0.06);
}
.innhold figure.bred { margin-right: min(0px, calc(50rem - 100%)); }
.innhold figure.smal img { max-width: min(100%, 30rem); }
.innhold figcaption { font-size: 0.9rem; color: var(--ds-color-neutral-text-subtle); margin-top: 0.5rem; }

.tjenester { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.tjenester .ds-card { display: flex; flex-direction: column; gap: 0.5rem; }
.tjenester .ds-card p { margin: 0; }
.tjenester .hvem { font-size: 0.9rem; color: var(--ds-color-neutral-text-subtle); }

.merke-tabell td:first-child { white-space: nowrap; }
.tast { font-weight: 600; white-space: nowrap; }

.tjenester .ds-heading { margin-top: 0; }
.manual-meny__tittel a { background: none !important; padding-left: 0; color: inherit; }

/* Smale skjermer: tabellene bryter linjer, og ruller heller enn å
   gjøre hele sida bredere enn vinduet. */
.innhold table { display: block; max-width: 100%; overflow-x: auto; }
.innhold code { overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .merke-tabell td:first-child { white-space: normal; }
  .innhold th, .innhold td { padding-left: 0.5rem; padding-right: 0.5rem; }
}
