/* Nimbus Cleaner — legal and support document pages. */

.doc-hero {
  background: linear-gradient(168deg, #0e2740 0%, #0a1d2f 70%);
  color: var(--text-on-navy);
  padding-block: clamp(48px, 6vw, 76px);
}

.doc-hero h1 {
  font-size: clamp(2rem, 4.6vw, 3rem);
  margin-bottom: 12px;
}

.doc-hero p {
  margin: 0;
  max-width: 60ch;
  color: var(--text-on-navy-muted);
}

.doc-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 18px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.55);
}

.doc-hero__meta a {
  color: var(--brand-bright);
}

.breadcrumb {
  margin-bottom: 18px;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.5);
}

.breadcrumb a {
  color: rgba(255, 255, 255, 0.72);
}

.breadcrumb span {
  padding-inline: 8px;
}

/* ---------- Two-column document layout ---------- */

.doc-layout {
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  gap: clamp(32px, 5vw, 64px);
  padding-block: clamp(44px, 6vw, 72px);
  align-items: start;
}

.doc-toc {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  padding: 22px;
  background: var(--paper);
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
}

.doc-toc h2 {
  margin: 0 0 14px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.doc-toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: toc;
}

.doc-toc li {
  counter-increment: toc;
  margin-bottom: 9px;
  font-size: 0.9rem;
  line-height: 1.4;
}

.doc-toc a {
  color: var(--text-muted);
  display: block;
}

.doc-toc a::before {
  content: counter(toc) ".";
  display: inline-block;
  width: 1.7em;
  color: var(--brand);
  font-weight: 700;
}

.doc-toc a:hover {
  color: var(--brand);
  text-decoration: none;
}

/* ---------- Document body ---------- */

.doc-body {
  max-width: 74ch;
  font-size: 1.02rem;
}

/* Pages without a table of contents centre their column instead of hugging
   the left edge under a full-width row above it. */
.doc-body--centered {
  margin-inline: auto;
}

.doc-body > p:first-child {
  font-size: 1.1rem;
  color: var(--text-dark);
}

.doc-body h2 {
  margin: 44px 0 14px;
  padding-top: 8px;
  font-size: 1.42rem;
  font-weight: 800;
  letter-spacing: -0.015em;
}

.doc-body h2:first-of-type {
  margin-top: 0;
}

.doc-body h3 {
  margin: 28px 0 10px;
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text-dark);
}

.doc-body p,
.doc-body li {
  color: #33475b;
  line-height: 1.72;
}

.doc-body ul {
  padding-left: 0;
  list-style: none;
}

.doc-body ul li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 9px;
}

.doc-body ul li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 11px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
}

.doc-body a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.doc-callout {
  margin: 28px 0;
  padding: 20px 22px;
  background: var(--brand-soft);
  border-left: 4px solid var(--brand);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.doc-callout p:last-child {
  margin-bottom: 0;
}

.doc-callout strong {
  color: var(--text-dark);
}

@media (max-width: 900px) {
  .doc-layout {
    grid-template-columns: 1fr;
  }

  .doc-toc {
    position: static;
  }

  .doc-toc ol {
    columns: 2;
    column-gap: 24px;
  }
}

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

/* ---------- Support page ---------- */

.support-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 20px;
  margin-bottom: clamp(48px, 6vw, 72px);
}

.support-card {
  padding: 28px 26px;
  background: var(--white);
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.support-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-bottom: 16px;
  border-radius: 13px;
  background: var(--brand-soft);
  color: var(--brand);
}

.support-card__icon svg {
  width: 24px;
  height: 24px;
}

.support-card h3 {
  margin-bottom: 8px;
}

.support-card p {
  font-size: 0.97rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.support-card p:last-child {
  margin-bottom: 0;
}

.support-card .btn {
  margin-top: 6px;
  padding: 11px 22px;
  font-size: 0.95rem;
}

.mail-link {
  font-weight: 700;
  word-break: break-all;
}

/* Permission reference table */

.perm-table {
  width: 100%;
  margin: 26px 0;
  border-collapse: collapse;
  font-size: 0.96rem;
  text-align: left;
}

.perm-table caption {
  margin-bottom: 12px;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: left;
}

.perm-table th,
.perm-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line-light);
  vertical-align: top;
}

.perm-table th {
  background: var(--paper);
  font-weight: 700;
  color: var(--text-dark);
  white-space: nowrap;
}

.perm-table td {
  color: #33475b;
  line-height: 1.6;
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ---------- 404 ---------- */

.notfound {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: calc(100vh - var(--header-h) - 220px);
  padding-block: 80px;
}

.notfound__code {
  font-size: clamp(4rem, 14vw, 7rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--brand);
  margin-bottom: 12px;
}

.notfound p {
  max-width: 46ch;
  color: var(--text-muted);
  margin-bottom: 28px;
}
