/* AgileBase — single stylesheet. No external resources, no web fonts. */

:root {
  --paper: #f7f3ec;
  --card: #fffcf7;
  --tint: #efe7da;
  --ink: #241f1a;
  --ink-soft: #554d43;
  --rule: #d8cdbc;
  --rust: #8c3a12;
  --rust-dark: #6f2d0d;
  --moss: #2f5d50;
  --measure: 40rem;
  --gap: 1.5rem;
  --radius: 2px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.68;
  overflow-wrap: break-word;
}

h1, h2, h3, h4, .brand-name, .site-nav, .cta, .aside-h, th, .kicker {
  font-family: var(--sans);
}

h1 {
  font-size: clamp(1.75rem, 1.25rem + 2.1vw, 2.6rem);
  line-height: 1.16;
  letter-spacing: -0.015em;
  margin: 0 0 1rem;
}

h2 {
  font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.6rem);
  line-height: 1.24;
  letter-spacing: -0.01em;
  margin: 2.75rem 0 0.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
}

h3 {
  font-size: 1.1rem;
  line-height: 1.3;
  margin: 1.9rem 0 0.5rem;
}

h4 { font-size: 1rem; margin: 1.4rem 0 0.4rem; }

p, ul, ol, dl, table, figure { margin: 0 0 1.1rem; }

a { color: var(--rust); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--rust-dark); }

a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid var(--moss);
  outline-offset: 2px;
  border-radius: var(--radius);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--moss);
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 50;
}
.skip:focus { left: 0; }

/* ---- header ---- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.head-inner {
  max-width: 68rem;
  margin: 0 auto;
  padding: 0.6rem 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--ink);
  margin-right: auto;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 1.85rem;
  height: 1.85rem;
  background: var(--rust);
  color: #fff;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: var(--radius);
}

.brand-name { font-weight: 700; font-size: 1.05rem; letter-spacing: -0.01em; }

.nav-toggle {
  font-family: var(--sans);
  font-size: 0.9rem;
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 0.4rem 0.8rem;
  cursor: pointer;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1rem;
}

.site-nav a {
  display: block;
  padding: 0.3rem 0;
  font-size: 0.875rem;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover { color: var(--rust); border-bottom-color: var(--rule); }
.site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--rust); }

@media (max-width: 62rem) {
  .site-nav { flex-basis: 100%; display: none; }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; padding-bottom: 0.5rem; }
  .site-nav li { border-top: 1px solid var(--rule); }
  .site-nav a { padding: 0.55rem 0; font-size: 1rem; }
}

@media (min-width: 62.01rem) {
  .nav-toggle { display: none; }
}

/* ---- layout ---- */

.shell {
  max-width: 68rem;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem;
}

@media (min-width: 60rem) {
  .shell { grid-template-columns: minmax(0, 1fr) 16rem; align-items: start; }
  .shell-wide { grid-template-columns: minmax(0, 1fr); max-width: 52rem; }
}

.content { min-width: 0; }
.content > article > * { max-width: var(--measure); }
.content > article > .full, .content > article > .table-wrap { max-width: none; }

.lead {
  font-size: 1.18rem;
  line-height: 1.55;
  color: var(--ink-soft);
  margin-bottom: 1.75rem;
}

/* ---- sidebar ---- */

.rail { font-family: var(--sans); font-size: 0.9rem; }

@media (min-width: 60rem) {
  .rail { position: sticky; top: 4.5rem; }
}

.aside-h {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  margin: 0 0 0.6rem;
  padding: 0;
  border: 0;
}

.toc, .side-box {
  background: var(--card);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--moss);
  padding: 1rem;
  margin-bottom: 1.25rem;
}

.toc ul, .side-box ul { list-style: none; margin: 0; padding: 0; }
.toc li { margin-bottom: 0.4rem; line-height: 1.35; }
.toc a { color: var(--ink-soft); text-decoration: none; border-bottom: 1px solid transparent; }
.toc a:hover, .toc a.here { color: var(--rust); border-bottom-color: var(--rust); }
.side-box li { margin-bottom: 0.5rem; }
.side-box p { margin-bottom: 0.7rem; }

/* ---- disclosure and calls to action ---- */

.disclosure {
  background: var(--tint);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--rust);
  padding: 1.1rem 1.25rem;
  margin: 0 0 2rem;
}

.disclosure h2 {
  margin: 0 0 0.5rem;
  padding: 0;
  border: 0;
  font-size: 1.05rem;
}

.disclosure p { margin-bottom: 0.7rem; }
.disclosure p:last-child { margin-bottom: 0; }

.cta-line { margin: 1.4rem 0 0.5rem; }

.cta {
  display: inline-block;
  background: var(--rust);
  color: #fff;
  text-decoration: none;
  font-size: 0.97rem;
  font-weight: 600;
  padding: 0.7rem 1.2rem;
  border-radius: var(--radius);
  border: 1px solid var(--rust-dark);
}

.cta:hover { background: var(--rust-dark); color: #fff; }

.cta-note {
  font-family: var(--sans);
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--ink-soft);
  margin-bottom: 1.6rem;
}

/* ---- content blocks ---- */

.callout, .watch, .method, .quick {
  border: 1px solid var(--rule);
  background: var(--card);
  padding: 1rem 1.15rem;
  margin: 1.75rem 0;
}

.callout { border-left: 4px solid var(--moss); }
.watch { border-left: 4px solid var(--rust); background: var(--tint); }
.method { border-left: 4px solid var(--ink-soft); }
.quick { border: 1px dashed var(--rule); background: var(--tint); }

.callout h3, .watch h3, .method h3, .quick h3 {
  margin-top: 0;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

.callout > :last-child, .watch > :last-child, .method > :last-child, .quick > :last-child { margin-bottom: 0; }

.table-wrap { overflow-x: auto; margin: 1.5rem 0; }

table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }

caption {
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--ink-soft);
  text-align: left;
  padding-bottom: 0.5rem;
}

th, td { border: 1px solid var(--rule); padding: 0.6rem 0.7rem; text-align: left; vertical-align: top; }
th { background: var(--tint); font-size: 0.85rem; font-weight: 700; }
tbody th { background: var(--card); }

dl.defs { margin: 1.25rem 0; }
dl.defs dt {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.98rem;
  margin-top: 1.1rem;
  scroll-margin-top: 5rem;
}
dl.defs dd { margin: 0.25rem 0 0; }
dl.defs dd + dd { margin-top: 0.4rem; font-size: 0.93rem; color: var(--ink-soft); }

.letter {
  font-family: var(--sans);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--rust);
  border-top: 1px solid var(--rule);
  padding-top: 0.9rem;
  margin: 2.25rem 0 0;
  scroll-margin-top: 5rem;
}

.strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 2rem;
}

.strip a {
  display: block;
  font-family: var(--sans);
  font-size: 0.86rem;
  text-decoration: none;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 0.35rem 0.7rem;
}

.strip a:hover { border-color: var(--rust); color: var(--rust); }

.cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); margin: 1.5rem 0 2rem; padding: 0; list-style: none; }

.cards li { border: 1px solid var(--rule); background: var(--card); padding: 1rem; }
.cards h3 { margin: 0 0 0.35rem; font-size: 1rem; }
.cards p { margin: 0; font-size: 0.95rem; color: var(--ink-soft); }

ul.ticks { list-style: none; padding-left: 0; }
ul.ticks li { position: relative; padding-left: 1.5rem; margin-bottom: 0.6rem; }
ul.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 0.6rem;
  height: 0.6rem;
  border: 1px solid var(--rust);
  border-radius: var(--radius);
}

ol.steps { padding-left: 1.3rem; }
ol.steps li { margin-bottom: 0.8rem; }

details {
  border: 1px solid var(--rule);
  background: var(--card);
  padding: 0.25rem 1rem;
  margin-bottom: 0.6rem;
}

summary {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  padding: 0.75rem 0;
  list-style-position: outside;
}

details[open] summary { border-bottom: 1px solid var(--rule); margin-bottom: 0.8rem; }

figure.diagram { border: 1px solid var(--rule); background: var(--card); padding: 1rem; margin: 1.75rem 0; }
figure.diagram svg { display: block; width: 100%; height: auto; }
figure.diagram figcaption { font-family: var(--sans); font-size: 0.84rem; color: var(--ink-soft); margin-top: 0.6rem; }

.kicker {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--ink-soft);
  margin-bottom: 0.4rem;
}

.small { font-size: 0.92rem; color: var(--ink-soft); }

/* ---- footer ---- */

.site-foot {
  border-top: 1px solid var(--rule);
  background: var(--tint);
  font-family: var(--sans);
  font-size: 0.9rem;
  line-height: 1.6;
}

.foot-inner { max-width: 68rem; margin: 0 auto; padding: 2rem 1rem 2.5rem; }
.foot-inner p { margin: 0 0 0.2rem; }
.pub-site { font-weight: 700; font-size: 1rem; color: var(--ink); }
.publisher { margin-bottom: 1rem; color: var(--ink-soft); }
.publisher a { color: var(--rust); }
.foot-nav { margin-bottom: 1rem; color: var(--ink-soft); }
.trademark { max-width: 52rem; color: var(--ink-soft); margin-bottom: 0.9rem; font-size: 0.86rem; }
.reviewed { color: var(--ink-soft); font-size: 0.86rem; }

@media print {
  .site-head, .rail, .cta { display: none; }
}
