/* =========================================================
   RESET
   ========================================================= */

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

html {
  font-size: 16px;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.65;
  color: #111827;
  background-color: #e5e7eb;
}

/* =========================================================
   CONTAINER
   ========================================================= */

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* =========================================================
   HEADER
   ========================================================= */

.site-header {
  background-color: #ffffff;
  border-bottom: 1px solid #d1d5db;
}

.site-header .container {
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}

.site-title {
  font-size: 1.4rem;
  font-weight: 600;
  text-decoration: none;
  color: #111827;
}

.site-tagline {
  display: block;
  font-size: 0.9rem;
  color: #4b5563;
  margin-top: 0.25rem;
}

/* =========================================================
   LAYOUT (FULL-HEIGHT SIDEBAR)
   ========================================================= */

.layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 3rem;
  align-items: stretch;
}

/* =========================================================
   SIDEBAR (DEFAULT)
   ========================================================= */

.sidebar {
  background-color: #eef2ff;
  color: #1e293b;
  padding: 2rem 1.75rem;
  border-radius: 8px;
  font-size: 0.95rem;
}

/* Sidebar navigation */
.sidebar-nav ul,
.sidebar-external ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-nav li,
.sidebar-external li {
  margin-bottom: 0.8rem;
}

/* Sidebar links */
.sidebar a {
  color: #1e3a8a;
  text-decoration: none;
  font-weight: 500;
}

.sidebar a:hover {
  color: #063ceb;
  text-decoration: underline;
}

/* Sidebar divider */
.sidebar-divider {
  margin: 1.75rem 0;
  border-top: 1px solid #c7d2fe;
}

/* =========================================================
   SIDEBAR COLOR BY SECTION
   ========================================================= */

/* README */
body.README .sidebar {
  background-color: #D8E3DB;
}

/* =========================================================
   MAIN CONTENT
   ========================================================= */

.site-main {
  background-color: #ffffff;
  padding: 3rem;
  border-radius: 8px;
  color: #111827;
}

.page-header {
  margin-bottom: 2rem;
}

.page-header h1 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.25;
}

/* =========================================================
   TYPOGRAPHY
   ========================================================= */

h1,
h2,
h3 {
  line-height: 1.3;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: #111827;
}

h2 {
  font-size: 1.55rem;
}

h3 {
  font-size: 1.25rem;
}

p {
  margin-bottom: 1.25rem;
}

ul,
ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

/* =========================================================
   LINKS (MAIN CONTENT ONLY)
   ========================================================= */

.site-main a {
  color: #2563eb;
}

.site-main a:hover {
  text-decoration: underline;
}

/* =========================================================
   CODE
   ========================================================= */

pre,
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

pre {
  background-color: #f3f4f6;
  border: 1px solid #d1d5db;
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
}

code {
  background-color: #e5e7eb;
  padding: 0.2em 0.4em;
  border-radius: 4px;
}

/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
  margin-top: 3rem;
  background-color: #ffffff;
  border-top: 1px solid #d1d5db;
}

.site-footer .container {
  text-align: center;
  font-size: 0.85rem;
  color: #4b5563;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

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

  .sidebar {
    padding: 1.75rem;
  }

  .site-main {
    padding: 2rem;
  }
}
