/* API-dokumentasjon. Bygger på fargene og grunnstilene i styles.css. */
.docs { background: var(--surface); }
.docs .brand-logo { width: 32px; height: 32px; }
.docs .topbar-inner { width: min(1320px, 100% - 2 * var(--gutter)); }
.docs-label { font-size: 14px; font-weight: 600; color: var(--muted); padding-left: 16px; border-left: 1px solid var(--line); }

.docs-layout { width: min(1320px, 100% - 2 * var(--gutter)); margin-inline: auto; display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 56px; padding: 40px 0 72px; }
.docs-nav { position: sticky; top: 92px; align-self: start; max-height: calc(100vh - 110px); overflow: auto; font-size: 14px; }
.docs-nav-title { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--heart-strong); margin: 0 0 10px; }
.docs-nav ol { list-style: none; margin: 0; padding: 0; }
.docs-nav ol ol { padding-left: 12px; margin: 4px 0 6px; border-left: 1px solid var(--line); }
.docs-nav a { display: block; padding: 5px 8px; border-radius: 6px; color: var(--muted); text-decoration: none; }
.docs-nav a:hover { color: var(--ink); background: var(--surface-2); }
.docs-nav a[aria-current="true"] { color: var(--brand); background: var(--brand-soft); font-weight: 600; }

.docs-main { max-width: 860px; min-width: 0; }
.docs-main section { padding-top: 8px; margin-bottom: 52px; }
.docs-main h1 { font-size: clamp(36px, 5vw, 52px); line-height: 1.05; margin: 0 0 16px; }
.docs-main h2 { font-size: 32px; margin: 0 0 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.docs-main section:first-child h2 { border-top: 0; }
.docs-main h3 { font-size: 21px; margin: 26px 0 8px; }
.docs-main h3.group { font-size: 24px; margin: 44px 0 14px; color: var(--brand); }
.docs-main p, .docs-main li { font-size: 15px; line-height: 1.65; }
.docs-main a { color: var(--brand); font-weight: 600; text-underline-offset: 3px; }
.docs-main :target { scroll-margin-top: 90px; }
.lead { font-size: 18px !important; color: var(--muted); max-width: 680px; }

code { font: 13.5px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--brand-tint); padding: 1px 5px; border-radius: 4px; overflow-wrap: anywhere; }
pre { position: relative; background: #163f48; color: #eaf3f4; border-radius: 10px; padding: 16px 18px; overflow-x: auto; margin: 10px 0 16px; }
pre code { background: none; padding: 0; color: inherit; font-size: 13px; overflow-wrap: normal; white-space: pre; }
.copy-button { position: absolute; top: 8px; right: 8px; background: #24606d; color: #eaf3f4; border: 0; border-radius: 6px; padding: 5px 9px; font: 600 12px var(--sans); cursor: pointer; opacity: .85; }
.copy-button:hover, .copy-button:focus-visible { opacity: 1; background: #2f7584; }

.concept-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 26px 0 20px; }
.concept-grid > div { background: var(--paper); border-radius: 10px; padding: 16px 18px; }
.concept-grid strong { display: block; font: 500 19px var(--serif); margin-bottom: 4px; }
.concept-grid span { font-size: 14px; color: var(--muted); line-height: 1.55; }

.callout { border-radius: 10px; padding: 14px 16px; font-size: 14px; line-height: 1.6; margin: 16px 0; }
.callout-info { background: var(--info-soft); }
.callout-warn { background: #fbf3e2; border-left: 4px solid #d9a441; }

.facts { padding-left: 20px; }
.facts li { margin-bottom: 8px; }

.auth-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.auth-card { border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
.auth-card p { font-size: 14px !important; margin: 10px 0 0; color: var(--muted); }

.steps { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 12px; }
.steps li { display: flex; gap: 14px; align-items: flex-start; }
.steps li > span { flex: 0 0 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; }

.access { display: inline-block; font: 700 11px var(--sans); text-transform: uppercase; letter-spacing: .06em; padding: 4px 8px; border-radius: 20px; white-space: nowrap; }
.access-public { background: var(--success-soft); color: var(--success); }
.access-user { background: #e3ebf3; color: #355b7d; }
.access-organizer { background: #f1e6f2; color: #7a4a7e; }
.access-token { background: #f4ecdc; color: #8a6420; }

.m { display: inline-block; min-width: 54px; text-align: center; font: 700 12px ui-monospace, Menlo, monospace; padding: 4px 7px; border-radius: 5px; color: #fff; }
.m-get { background: var(--success); }
.m-post { background: var(--brand); }
.m-patch { background: #a0672a; }

table { width: 100%; border-collapse: collapse; margin: 12px 0 16px; font-size: 14px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; line-height: 1.5; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
td em { color: var(--danger); font-style: normal; font-size: 12px; font-weight: 600; }
tr.owner td em { color: #7a4a7e; }
.ep-index td:nth-child(2) a { font-weight: 400; }
.ep-index tbody tr:hover { background: var(--paper); }

.ep { border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px 6px; margin: 16px 0; background: var(--surface); }
.ep > header { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 8px; }
.ep > header > code { font-size: 15px; font-weight: 600; background: none; padding: 0; }
.ep:target { border-color: var(--brand); box-shadow: 0 0 0 4px #1f57631f; }
.resp { margin-bottom: 0; }
.code-ok { font: 700 12px ui-monospace, Menlo, monospace; background: var(--success-soft); color: var(--success); padding: 2px 6px; border-radius: 4px; margin-right: 4px; }
.errs { font-size: 14px !important; color: var(--muted); }
details { margin: 4px 0 14px; }
summary { cursor: pointer; font-weight: 600; color: var(--brand); font-size: 14px; }

.docs footer a { color: var(--brand); font-weight: 600; }

@media (max-width: 960px) {
  .docs-layout { grid-template-columns: 1fr; gap: 24px; padding-top: 24px; }
  .docs-nav { position: static; max-height: none; border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
  .docs-nav > ol { columns: 2; }
  .auth-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .docs-label { display: none; }
  .docs-nav > ol { columns: 1; }
  .concept-grid { grid-template-columns: 1fr; }
  .ep-index thead { display: none; }
  .ep-index tr { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .ep-index td { border: 0; padding: 0; }
  .ep-index td:nth-child(3), .ep-index td:nth-child(4) { grid-column: 2; font-size: 13px; color: var(--muted); }
  .ep { padding: 14px 14px 4px; }
}
