/* Documents section styles. Put this file in /docs/docs.css */
.docs-hero h1 { max-width: 880px; }
.docs-section { background: var(--bg); }
.docs-muted { color: var(--muted); }
.docs-kicker { margin: 0 0 10px; color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.docs-grid { display: grid; gap: 16px; margin-top: 26px; }
.docs-card { display: flex; flex-direction: column; min-height: 100%; padding: 24px; border: 1px solid var(--line); border-radius: 24px; background: rgba(255,255,255,.72); box-shadow: 0 14px 40px rgba(0,0,0,.055); color: inherit; text-decoration: none; transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease; }
.docs-card:hover { transform: translateY(-3px); background: var(--dark); color: var(--white); box-shadow: var(--shadow); }
.docs-card:hover p, .docs-card:hover .docs-card-meta, .docs-card:hover .docs-file-list { color: rgba(255,255,255,.72); }
.docs-card h3 { font-size: clamp(22px, 4.6vw, 30px); }
.docs-card p { margin-bottom: 18px; color: var(--muted); }
.docs-card-meta { color: var(--muted); font-size: 13px; font-weight: 800; }
.docs-card-action { display: inline-flex; margin-top: auto; padding-top: 18px; color: var(--accent); font-weight: 800; }
.docs-file-list { display: grid; gap: 7px; margin: 8px 0 18px; padding: 0; list-style: none; color: var(--muted); font-size: 14px; }
.docs-layout { display: grid; gap: 18px; align-items: start; }
.docs-nav { position: static; max-height: none; overflow: visible; padding: 18px; border: 1px solid var(--line); border-radius: 22px; background: rgba(255,250,242,.9); box-shadow: 0 14px 40px rgba(0,0,0,.05); }
.docs-nav a { display: block; padding: 11px 0; border-top: 1px solid rgba(24,24,24,.08); color: var(--text); text-decoration: none; font-weight: 800; }
.docs-nav a:hover { color: var(--accent-dark); }
.docs-stack { display: grid; gap: 22px; min-width: 0; }
.docs-package-intro { padding: 24px; border: 1px solid var(--line); border-radius: 24px; background: rgba(255,255,255,.72); box-shadow: 0 14px 40px rgba(0,0,0,.055); }
.docs-package-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.document-paper { padding: clamp(22px,5vw,54px); border: 1px solid var(--line); border-radius: 26px; background: var(--paper); box-shadow: 0 18px 54px rgba(0,0,0,.07); font-size: 15.5px; line-height: 1.62; overflow-wrap: anywhere; }
.document-paper h2 { margin: 18px 0 8px; text-align: center; font-size: clamp(24px,5vw,34px); letter-spacing: .02em; }
.document-paper h3 { margin: 24px 0 10px; font-size: 18px; line-height: 1.28; letter-spacing: -.015em; }
.document-paper p { margin-bottom: 10px; }
.document-paper ul { margin: 0 0 12px; padding-left: 24px; }
.document-paper li { margin: 6px 0; }
.document-meta { color: var(--muted); font-size: 13px; line-height: 1.45; font-weight: 700; }
.approval-block { width: max-content; max-width: 100%; margin-left: auto; color: var(--text); font-size: 14px; line-height: 1.55; font-weight: 700; }
.document-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; margin: 12px 0 22px; color: var(--muted); font-weight: 700; }
.signature-block { display: grid; gap: 18px; margin-top: 34px; font-weight: 700; }
.form-line { display: block; min-height: 22px; border-bottom: 1px solid rgba(24,24,24,.35); }
.form-checks { display: grid; gap: 6px; margin: 10px 0 14px; }
.form-table { width: 100%; border-collapse: collapse; margin: 12px 0 18px; font-size: 14px; }
.form-table th, .form-table td { border: 1px solid rgba(24,24,24,.22); padding: 8px; text-align: left; vertical-align: top; }
.form-table th { background: rgba(24,24,24,.04); }
.envelope-label { margin-top: 18px; padding: 22px; border: 2px solid rgba(24,24,24,.28); border-radius: 18px; background: rgba(255,255,255,.45); }
.envelope-label h3 { text-align: center; letter-spacing: .04em; }
@media (max-width: 679px) {
  .docs-nav { margin-bottom: 4px; }
  .docs-nav .section-label { margin-bottom: 4px; }
  .docs-nav a { padding: 9px 0; font-size: 14px; }
  .document-paper { border-radius: 20px; font-size: 14.5px; line-height: 1.55; }
  .form-table { display: block; overflow-x: auto; white-space: nowrap; }
}
@media (min-width: 680px) {
  .docs-grid { grid-template-columns: repeat(2,1fr); }
  .signature-block { grid-template-columns: 1fr 1.2fr; }
}
@media (min-width: 980px) {
  .docs-layout { grid-template-columns: 280px minmax(0,1fr); }
  .docs-nav { position: sticky; top: 88px; max-height: calc(100vh - 110px); overflow: auto; }
}
@media print {
  .topbar, .hero, .docs-nav, .docs-package-intro { display: none; }
  body { background: #fff; }
  .section { padding: 0; }
  .container { width: 100%; padding: 0; }
  .docs-layout { display: block; }
  .document-paper { box-shadow: none; border: 0; border-radius: 0; page-break-after: always; }
}


/* Integration with main site header and authorization controls */
.docs-site-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
}

.docs-site-topbar .topbar-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.docs-site-topbar .account-login-button {
  flex: 0 0 auto;
}

.docs-site-topbar .topbar-phone,
.docs-site-topbar .docs-top-button {
  min-height: 46px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.docs-site-topbar .topbar-phone:hover,
.docs-site-topbar .docs-top-button:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.3);
  transform: translateY(-1px);
}

/* The document table of contents is useful on desktop, but harmful on small screens. */
@media (max-width: 979px) {
  .docs-nav {
    display: none !important;
  }

  .docs-layout {
    display: block;
  }

  .docs-card:hover {
    transform: none;
    background: rgba(255,255,255,.72);
    color: inherit;
    box-shadow: 0 14px 40px rgba(0,0,0,.055);
  }

  .docs-card:hover p,
  .docs-card:hover .docs-card-meta,
  .docs-card:hover .docs-file-list {
    color: var(--muted);
  }
}

@media (max-width: 760px) {
  .docs-site-topbar {
    min-height: 76px;
    padding: 12px 16px;
    align-items: center;
  }

  .docs-site-topbar .brand-name {
    display: block;
    font-size: 11px;
    line-height: 1.05;
  }

  .docs-site-topbar .topbar-actions {
    gap: 8px;
  }

  .docs-site-topbar .topbar-phone {
    display: none;
  }

  .docs-site-topbar .docs-top-button {
    display: inline-flex;
    min-height: 42px;
    padding: 0 14px;
    font-size: 13px;
  }

  .docs-site-topbar .account-login-button {
    width: 42px;
    height: 42px;
  }

  .docs-hero {
    padding-top: 44px;
    padding-bottom: 42px;
  }

  .docs-grid {
    grid-template-columns: 1fr;
  }

  .document-paper {
    max-width: 100%;
    overflow-x: hidden;
  }

  .approval-block {
    width: 100%;
    margin-left: 0;
    text-align: left;
  }
}

@media (max-width: 420px) {
  .docs-site-topbar {
    padding-left: 12px;
    padding-right: 12px;
  }

  .docs-site-topbar .brand-link {
    gap: 9px;
  }

  .docs-site-topbar .brand-stripes {
    height: 30px;
  }

  .docs-site-topbar .docs-top-button {
    padding: 0 12px;
  }

  .document-paper {
    padding: 18px;
  }
}


/* Server-only fallback screen */
.server-required-screen {
  min-height: 100vh;
  padding: 28px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}
.server-required-screen > div {
  width: min(100%, 620px);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.server-required-screen h1 {
  margin-bottom: 14px;
  font-size: clamp(30px, 8vw, 54px);
}
.server-required-screen p {
  color: var(--muted);
}


/* Final topbar overrides for protected document pages */
.docs-site-topbar .topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
}

.docs-site-topbar .topbar-phone,
.docs-site-topbar .docs-top-button {
  box-shadow: none;
}

@media (max-width: 760px) {
  .docs-site-topbar .topbar-phone,
  .docs-site-topbar .docs-top-button {
    display: inline-flex;
  }

  .docs-site-topbar .topbar-phone-icon span {
    display: none;
  }

  .docs-site-topbar .topbar-phone-icon svg {
    display: block;
  }
}


.admin-settings-link {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #f4f4f4;
  background: rgba(255,255,255,.04);
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.admin-settings-link:hover {
  transform: translateY(-1px);
  border-color: rgba(255,174,66,.85);
  background: rgba(255,174,66,.10);
  box-shadow: 0 0 18px rgba(255,174,66,.26);
}

.admin-settings-link svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}
