/* EIDORA documentation. Shared by every HTML page; no build step is needed. */

/* 1. Brand colors and typography, based on eidora.org. */
:root {
  color-scheme: light;
  --paper: #f5f3eb;
  --porcelain: #fcfbf7;
  --ink: #303830;
  --muted: #596153;
  --teal: #426f6e;
  --deep-teal: #254948;
  --sage: #e8e9e0;
  --rule: #d3d5ca;
  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* 2. Readable defaults and keyboard access. */
* { box-sizing: border-box; }
html { scroll-padding-top: 2rem; }
body {
  margin: 0;
  background: var(--porcelain);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.7;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--deep-teal); text-underline-offset: .22em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible {
  outline: 3px solid var(--deep-teal);
  outline-offset: 4px;
  border-radius: 2px;
}
::selection { background: #e4d4b4; color: var(--ink); }
h1, h2, h3 { line-height: 1.25; }
h1, h2 { font-family: var(--serif); font-weight: 400; }
h1 { margin: .5rem 0 1rem; font-size: clamp(2.5rem, 4vw, 3.5rem); letter-spacing: -.035em; }
h2 { margin: 0 0 1rem; font-size: 1.8rem; letter-spacing: -.02em; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1rem; }
li + li { margin-top: .4rem; }
main { min-width: 0; overflow-wrap: anywhere; }
main:focus { outline: none; }
.skip-link {
  position: absolute;
  z-index: 2;
  top: 1rem;
  left: 1rem;
  padding: .7rem 1rem;
  background: var(--porcelain);
  transform: translateY(-200%);
}
.skip-link:focus { transform: translateY(0); }

/* 3. Shared header. The logo links to the documentation home page. */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 2rem;
  min-height: 88px;
  padding: 1rem 2.5rem;
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}
.site-identity, .brand { display: flex; align-items: center; }
.site-identity { flex-wrap: wrap; gap: .7rem 1.5rem; }
.brand { gap: .7rem; min-height: 44px; }
.brand-icon { width: 36px; }
.brand-wordmark { width: 120px; }
.site-label {
  border-left: 1px solid var(--rule);
  padding-left: 1.5rem;
  color: var(--muted);
  font-size: .9rem;
}
.website-link { display: inline-flex; align-items: center; min-height: 44px; font-size: .9rem; }

/* 4. Two-column documentation layout. */
.docs-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  max-width: 1440px;
  margin-inline: auto;
}
.sidebar {
  padding: 2.5rem 1.5rem;
  border-right: 1px solid var(--rule);
  background: var(--paper);
}
.sidebar nav { position: sticky; top: 2rem; }
.nav-group + .nav-group { margin-top: 1.8rem; }
.nav-heading {
  margin: 0 0 .6rem .75rem;
  color: var(--muted);
  font-family: var(--sans);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.sidebar ul { margin: 0; padding: 0; list-style: none; }
.sidebar li + li { margin-top: .15rem; }
.sidebar a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: .45rem .75rem;
  border-left: 3px solid transparent;
  color: var(--ink);
  font-size: .94rem;
  text-decoration: none;
}
.sidebar a:hover { background: var(--sage); text-decoration: underline; }
.sidebar a[aria-current="page"] {
  border-left-color: var(--deep-teal);
  background: var(--sage);
  color: var(--deep-teal);
  font-weight: 600;
}
.document { width: 100%; max-width: 900px; padding: 3rem 4rem 2rem; }
.eyebrow { margin: 0; color: var(--teal); font-size: .75rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.lead { max-width: 42rem; color: var(--muted); font-size: 1.15rem; line-height: 1.7; }
.draft-note {
  margin: 1.75rem 0;
  padding: .9rem 1.1rem;
  border-left: 3px solid var(--teal);
  background: var(--sage);
  font-size: .88rem;
}
.draft-note p { margin: 0; }
.page-contents { margin-bottom: 2.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--rule); }
.page-contents h2 { margin-bottom: .5rem; font-family: var(--sans); font-size: .85rem; font-weight: 600; }
.page-contents ul { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; margin: 0; padding: 0; list-style: none; }
.page-contents li { margin: 0; }
.page-contents a { display: inline-flex; align-items: center; min-height: 44px; font-size: .88rem; }
.document section { margin-block: 2.5rem; }
.placeholder { color: var(--muted); }
.topic-list { margin: 1.25rem 0; padding: 0; list-style: none; }
.topic-list li { padding: 1rem 0; border-top: 1px solid var(--rule); }
.topic-list li:last-child { border-bottom: 1px solid var(--rule); }
.topic-list a { display: inline-block; padding-block: .25rem; font-weight: 600; }
.topic-list p { margin: .15rem 0 0; color: var(--muted); font-size: .93rem; }
.page-navigation { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--rule); }
.page-navigation a { display: inline-flex; flex-direction: column; justify-content: center; min-height: 48px; }
.page-navigation span { color: var(--muted); font-size: .75rem; text-decoration: none; }
.page-navigation .next-page { margin-left: auto; text-align: right; }
.site-footer { margin-top: 2rem; color: var(--muted); font-size: .78rem; }

/* 5. Small screens and zoom: navigation flows above the article. */
@media (max-width: 900px) {
  .document { padding: 2.5rem 2rem; }
  .docs-layout { grid-template-columns: 230px minmax(0, 1fr); }
  .sidebar { padding-inline: 1rem; }
}
@media (max-width: 700px) {
  .site-header { padding: 1rem 1.25rem; }
  .site-identity { gap: .5rem 1rem; }
  .site-label { padding-left: 1rem; }
  .docs-layout { display: block; }
  .sidebar { padding: 1.5rem 1.25rem; border-right: 0; border-bottom: 1px solid var(--rule); }
  .sidebar nav { position: static; display: flex; flex-wrap: wrap; gap: 1.5rem; }
  .nav-group { flex: 1 1 10rem; }
  .nav-group + .nav-group { margin: 0; }
  .document { padding: 2rem 1.25rem; }
  .page-contents ul { display: block; }
}

/* 6. Print only the documentation content. */
@media print {
  body { background: white; color: black; font-size: 11pt; }
  .site-header, .sidebar, .skip-link, .page-contents, .page-navigation, .site-footer { display: none; }
  .docs-layout { display: block; }
  .document { max-width: none; padding: 0; }
  h1, h2, h3 { break-after: avoid; }
  a { color: inherit; }
}
