/* Base layout */
body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  max-width: 800px;
  margin: 2rem auto;
  line-height: 1.6;
  padding: 0 1rem;
  color: #1c1c1e;
  background-color: #fefefe;
}

/* Headers */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 1rem;
  line-height: 1.2;
  color: #111;
}

/* Header sizes */
h1 { font-size: 2.2rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.5rem; }

/* Paragraphs */
p {
  margin-bottom: 1rem;
}

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

li {
  margin-bottom: 0.5rem;
}

/* Links */
a {
  color: #0a84ff;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Blockquotes */
blockquote {
  border-left: 5px solid #0a84ff;
  padding: 1rem 1.5rem;
  color: #555;
  font-style: italic;
  margin: 1.5rem 0;
  background-color: #f9f9f9;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Code styling */
code {
  font-family: "Fira Code", monospace;
  background-color: #eef0f2;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9rem;
}

pre {
  background-color: #1e1e1e;
  color: #f8f8f2;
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid #333;
}

pre code {
  background-color: transparent;
  padding: 0;
  font-size: 0.9rem;
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin: 1rem 0;
}

/* Horizontal rules */
hr {
  border: none;
  border-top: 1px solid #ccc;
  margin: 2rem 0;
}

/* Header & Footer */
header, footer {
  text-align: center;
  margin-bottom: 2rem;
  color: #666;
  font-size: 0.95rem;
}

footer strong {
  color: #111;
}

/* Optional: make links in footer subtle */
footer a {
  color: #0a84ff;
  text-decoration: none;
}

/* Top Bar */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid #e5e5e5;
  margin-bottom: 2rem;
}

.top-bar-left a {
  font-size: 1.2rem;
  font-weight: bold;
  color: #111;
}

.top-bar-right a {
  font-size: 1rem;
  color: #0a84ff;
}

/* Docs Page Layout */
.docs-container {
  display: flex;
  gap: 2rem;
}

.sidebar {
  width: 200px;
  flex-shrink: 0;
}

.sidebar nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar nav li a {
  display: block;
  padding: 0.5rem 1rem;
  border-radius: 4px;
}

.sidebar nav li a:hover {
  background-color: #f0f0f0;
  text-decoration: none;
}

.docs-container main {
  flex-grow: 1;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
}

thead {
  background-color: #f5f5f5;
}

th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid #e0e0e0;
  color: #333;
}

td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f0f0f0;
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:hover {
  background-color: #fafafa;
}

/* Task Lists */
.task-item {
  list-style: none;
  margin-left: -2rem;
}

.task-item input[type="checkbox"] {
  margin-right: 0.5rem;
  cursor: default;
}

/* Strikethrough */
del {
  color: #888;
  text-decoration: line-through;
}

/* Highlight/Mark */
mark {
  background-color: #fff3cd;
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
  color: #333;
}

/* Subscript and Superscript */
sub, sup {
  font-size: 0.75em;
  line-height: 0;
}

sup {
  vertical-align: super;
}

sub {
  vertical-align: sub;
}

/* Definition Lists */
dl {
  margin: 1rem 0;
}

dt {
  font-weight: 600;
  margin-top: 1rem;
}

dd {
  margin-left: 2rem;
  margin-bottom: 0.5rem;
}

/* Keyboard Keys */
kbd {
  background-color: #f4f4f4;
  border: 1px solid #ccc;
  border-radius: 3px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
  display: inline-block;
  font-family: monospace;
  font-size: 0.85em;
  padding: 0.2em 0.4em;
}

/* Abbreviations */
abbr {
  border-bottom: 1px dotted #666;
  cursor: help;
}

/* Footnotes */
.footnote {
  font-size: 0.85rem;
  color: #666;
  border-top: 1px solid #e0e0e0;
  padding-top: 1rem;
  margin-top: 2rem;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  body {
    background-color: #1c1c1e;
    color: #e0e0e0;
  }

  h1, h2, h3, h4, h5, h6 {
    color: #f0f0f0;
  }

  a {
    color: #0a84ff;
  }

  blockquote {
    background-color: #2c2c2e;
    border-left-color: #0a84ff;
    color: #b0b0b0;
  }

  code {
    background-color: #2c2c2e;
    color: #ff9f0a;
  }

  table {
    border-color: #3a3a3c;
  }

  thead {
    background-color: #2c2c2e;
  }

  th {
    border-bottom-color: #3a3a3c;
    color: #f0f0f0;
  }

  td {
    border-bottom-color: #2c2c2e;
  }

  tbody tr:hover {
    background-color: #2c2c2e;
  }

  mark {
    background-color: #4a4a00;
    color: #ffeb3b;
  }

  kbd {
    background-color: #2c2c2e;
    border-color: #3a3a3c;
    color: #e0e0e0;
  }

  .top-bar {
    border-bottom-color: #3a3a3c;
  }

  .top-bar-left a {
    color: #f0f0f0;
  }

  hr {
    border-top-color: #3a3a3c;
  }
}
