/* ==========================================================================
   Access100 — Standalone Document Stylesheet
   Shared across all governance HTML documents
   ========================================================================== */

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Atkinson Hyperlegible', system-ui, -apple-system, sans-serif;
  color: #020617;
  background: #f1f5f9;
  line-height: 1.7;
}

/* ---------- Focus Styles (Accessibility) ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #1E40AF;
  outline-offset: 3px;
  border-radius: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

/* ---------- Skip Link ---------- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: #0F172A;
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  z-index: 9999;
  font-weight: 700;
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 1rem;
}

/* ---------- Document Container ---------- */
.document {
  max-width: 816px; /* ~8.5in */
  margin: 0 auto;
  padding: 3rem 3rem 4rem;
  background: #fff;
}

/* ---------- Document Header (screen) ---------- */
.doc-header {
  background: #0F172A;
  color: #fff;
  padding: 1rem 0;
}

.doc-header-inner {
  max-width: 816px;
  margin: 0 auto;
  padding: 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
}

.org-name {
  display: flex;
  align-items: center;
}

.org-address {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.95);
}

/* ---------- Document Footer ---------- */
.doc-footer {
  max-width: 816px;
  margin: 0 auto;
  padding: 1.5rem 3rem 3rem;
  text-align: center;
  font-size: 0.8125rem;
  color: #475569;
}

.doc-footer a {
  color: #1e3a8a;
  text-decoration: underline;
}

.doc-footer a:hover {
  text-decoration: underline;
}

/* ---------- Typography ---------- */
h1 {
  font-size: 1.75rem;
  color: #0F172A;
  text-align: center;
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.doc-subtitle {
  text-align: center;
  color: #0F172A;
  font-style: normal;
  font-weight: 700;
  font-size: 1.2rem;
  text-transform: uppercase;
  margin-bottom: 2rem;
}

.doc-preamble {
  text-align: center;
  font-size: 0.875rem;
  color: #475569;
  margin-bottom: 2rem;
  line-height: 1.6;
}

h2 {
  font-size: 1.3rem;
  color: #0F172A;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid #e2e8f0;
  text-transform: uppercase;
}

h3 {
  font-size: 1.05rem;
  color: #1E40AF;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
}

h4 {
  font-size: 0.95rem;
  color: #334155;
  margin-top: 1.25rem;
  margin-bottom: 0.4rem;
  font-weight: 700;
}

p {
  margin-bottom: 0.85rem;
}

/* Centered title block for legal docs */
.title-block {
  text-align: center;
  margin-bottom: 2.5rem;
  position: relative;
}

.title-block h1 {
  margin-bottom: 0.5rem;
}

.title-block .doc-subtitle {
  margin-bottom: 0.25rem;
}

/* Indented legal paragraphs */
.legal-indent {
  margin-left: 2rem;
  margin-bottom: 0.85rem;
}

.legal-indent-2 {
  margin-left: 3.5rem;
  margin-bottom: 0.85rem;
}

/* ---------- Lists ---------- */
ul, ol {
  margin-left: 1.75rem;
  margin-bottom: 1rem;
}

li {
  margin-bottom: 0.4rem;
}

li ul, li ol {
  margin-top: 0.4rem;
}

/* Lettered list (a, b, c) */
ol.alpha {
  list-style-type: lower-alpha;
}

/* Roman numeral list */
ol.roman {
  list-style-type: upper-roman;
}

/* ---------- Tables ---------- */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

thead th {
  background: #0F172A;
  color: #fff;
  padding: 0.6rem 0.75rem;
  text-align: left;
  font-weight: 700;
  font-size: 0.85rem;
}

tbody td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: top;
}

tbody tr:nth-child(even) {
  background: #f8fafc;
}

/* Category header rows in retention table */
tbody .category-row td {
  background: #1e293b;
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.4rem 0.75rem;
}

/* ---------- Badges ---------- */
.badge-draft {
  display: inline-block;
  background: #b45309;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  position: absolute;
  top: 0;
  right: 0;
}

/* Amendment highlight (gold) for COI policy */
.amendment {
  background: #fef3c7;
  border-left: 4px solid #d97706;
  padding: 0.75rem 1rem;
  margin-bottom: 0.85rem;
  border-radius: 0 4px 4px 0;
}

.amendment h3 {
  color: #92400e;
}

/* ---------- Status Badges (governance review) ---------- */
.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-strong {
  background: #dcfce7;
  color: #166534;
}

.badge-excellent {
  background: #d1fae5;
  color: #065f46;
}

.badge-attention {
  background: #fef9c3;
  color: #713f12;
}

.badge-verification {
  background: #fee2e2;
  color: #991b1b;
}

.badge-critical {
  background: #fee2e2;
  color: #991b1b;
}

.badge-essential {
  background: #fef9c3;
  color: #713f12;
}

.badge-important {
  background: #dbeafe;
  color: #1e3a8a;
}

/* ---------- Signature / Adoption Blocks ---------- */
.doc-adoption {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e2e8f0;
}

.signature-block {
  margin-top: 2rem;
}

.sig-line {
  width: 280px;
  border-bottom: 1px solid #020617;
  margin-bottom: 0.25rem;
  margin-top: 2.5rem;
}

.sig-label {
  font-size: 0.875rem;
  color: #475569;
  margin-bottom: 0.1rem;
}

/* Certificate block */
.certificate-block {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e2e8f0;
}

.certificate-block h2 {
  text-align: center;
  border-bottom: none;
  margin-bottom: 1rem;
}

/* ---------- Meeting Info Block (templates) ---------- */
.meeting-info {
  margin-bottom: 2rem;
}

.meeting-info table {
  width: auto;
  margin: 0;
}

.meeting-info td {
  padding: 0.3rem 1rem 0.3rem 0;
  border: none;
}

.meeting-info td:first-child {
  font-weight: 700;
  white-space: nowrap;
}

/* ---------- Acknowledgment Form ---------- */
.ack-form {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid #0F172A;
  page-break-before: always;
}

.ack-form h2 {
  text-align: center;
  border-bottom: none;
}

/* ---------- Checklist Table ---------- */
.checklist-table td:nth-child(2),
.checklist-table td:nth-child(3) {
  width: 100px;
  text-align: center;
}

.checklist-table th:nth-child(2),
.checklist-table th:nth-child(3) {
  width: 100px;
  text-align: center;
}

/* ---------- Checklist Fields (New Board Member, Date, Mentor) ---------- */
.checklist-fields {
  margin-top: 1.5rem;
}

.checklist-fields p {
  margin: 0.5rem 0;
}

.field-line {
  display: inline-block;
  width: 240px;
  border-bottom: 1px solid #020617;
  vertical-align: bottom;
}

/* ---------- Notes / Guidance Blocks ---------- */
.notes-block {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

.notes-block h3 {
  margin-top: 0;
  color: #334155;
}

/* Placeholder brackets for templates */
.placeholder {
  color: #64748b;
  font-style: italic;
}

/* ---------- Responsive ---------- */
@media (max-width: 700px) {
  .document {
    padding: 1.5rem 1.25rem 2rem;
  }
  .doc-header-inner {
    padding: 0;
    flex-direction: column;
  }
  .doc-footer {
    padding: 1rem 1.25rem 2rem;
  }
  h1 { font-size: 1.4rem; }
  h2 { font-size: 1.15rem; }
  table { font-size: 0.8rem; }
  .legal-indent { margin-left: 1rem; }
  .legal-indent-2 { margin-left: 2rem; }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */
@media print {
  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
    line-height: 1.5;
  }

  .doc-header {
    background: none;
    color: #000;
    border-bottom: 2px solid #000;
    padding: 0 0 0.5rem;
    margin-bottom: 1rem;
  }

  .doc-header-inner {
    padding: 0;
  }

  .org-name svg text:first-of-type {
    fill: #000 !important;
  }

  .org-address {
    font-size: 9pt;
    color: #333;
    opacity: 1;
  }

  .document {
    max-width: none;
    padding: 0;
    margin: 0;
    background: none;
    box-shadow: none;
  }

  .doc-footer {
    display: none;
  }

  h1 { font-size: 16pt; color: #000; }
  h2 { font-size: 13pt; color: #000; border-bottom-color: #999; }
  h3 { font-size: 11pt; color: #000; }

  a { color: #000; text-decoration: underline; }

  .badge-draft {
    background: none;
    color: #000;
    border: 1px solid #000;
  }

  .amendment {
    background: none;
    border-left: 3px solid #000;
  }

  .badge {
    background: none !important;
    color: #000 !important;
    border: 1px solid #999;
  }

  table { page-break-inside: auto; }
  tr { page-break-inside: avoid; }
  thead { display: table-header-group; }

  thead th {
    background: #eee;
    color: #000;
    border: 1px solid #999;
  }

  tbody td {
    border: 1px solid #ccc;
  }

  tbody .category-row td {
    background: #ddd;
    color: #000;
  }

  h2, h3 { page-break-after: avoid; }
  .ack-form { page-break-before: always; }
  .certificate-block { page-break-before: always; }

  @page {
    margin: 1in 0.75in;
    @bottom-center {
      content: counter(page);
      font-size: 9pt;
    }
  }
}
