*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #24292e;
  margin: 0;
  padding: 0;
  background: #ffffff;
}

/* Header */
.site-header {
  border-bottom: 1px solid #e1e4e8;
  padding: 0.75rem 2rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.site-title {
  font-weight: 600;
  font-size: 1rem;
  color: #24292e;
  text-decoration: none;
}

nav {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

nav a {
  font-size: 0.875rem;
  color: #586069;
  text-decoration: none;
}

nav a:hover { color: #0366d6; }

/* Main content */
main {
  max-width: 860px;
  margin: 0 auto;
  padding: 2rem;
}

h1 { font-size: 1.5rem; font-weight: 600; margin-top: 0; }
h2 { font-size: 1.2rem; font-weight: 600; margin-top: 2rem; }
h3 { font-size: 1rem; font-weight: 600; margin-top: 1.5rem; }

/* Paragraph interaction */
.para-wrap {
  position: relative;
  padding-right: 2.5rem;
}

.comment-btn {
  position: absolute;
  right: 0;
  top: 0.2em;
  opacity: 0;
  color: #586069;
  padding: 0.2em 0.3em;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  background: none;
  line-height: 1;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: opacity 0.1s;
}

.para-wrap:hover .comment-btn,
.comment-btn:focus {
  opacity: 1;
  border-color: #e1e4e8;
  background: #f6f8fa;
}

.comment-btn:hover { color: #0366d6; border-color: #c8d1d9; }

.issue-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4em;
  height: 1.4em;
  font-size: 0.7rem;
  font-weight: 600;
  background: #0366d6;
  color: #ffffff;
  border-radius: 10px;
  padding: 0 0.4em;
  text-decoration: none;
  margin-left: 0.5em;
  vertical-align: middle;
}

.issue-badge:hover { background: #005cc5; }

/* Draft status badge */
.doc-status {
  display: inline-block;
  padding: 0.2em 0.6em;
  font-size: 0.75rem;
  border-radius: 3px;
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffc107;
  margin-bottom: 1.5rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid #e1e4e8;
  padding: 1rem 2rem;
  text-align: center;
  font-size: 0.8rem;
  color: #586069;
  margin-top: 3rem;
}

.site-footer a { color: #586069; }

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

th, td {
  border: 1px solid #e1e4e8;
  padding: 0.5rem 0.75rem;
  text-align: left;
  vertical-align: top;
}

th { background: #f6f8fa; font-weight: 600; }

/* HR */
hr { border: none; border-top: 1px solid #e1e4e8; margin: 1.5rem 0; }

/* Code */
code { font-size: 0.875em; background: #f6f8fa; padding: 0.1em 0.3em; border-radius: 3px; }
pre { background: #f6f8fa; padding: 1rem; border-radius: 4px; overflow-x: auto; }
pre code { background: none; padding: 0; }

/* Document index table on home page */
.doc-index { width: 100%; }
.doc-index td:first-child { font-weight: 500; }
