:root {
  color-scheme: light;
  --paper: #fff;
  --panel: #f5f7f3;
  --line: #dee6dc;
  --ink: #172d25;
  --body: #38483f;
  --muted: #52645a;
  --forest: #193b31;
  --green: #23733c;
  --green-soft: #e5f1e3;
  --header-height: 4.25rem;
  --radius: .75rem;
  font-family: agenda-one, 'Agenda One', 'Avenir Next', Avenir, system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  scrollbar-color: #b8c7bb transparent;
  scrollbar-width: thin;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 0; }
[hidden] { display: none !important; }
img { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
button, summary { cursor: pointer; }
a { color: inherit; text-underline-offset: .2em; }
::selection { background: #cae8c4; color: var(--ink); }
:focus-visible { outline: 2px solid #348e50; outline-offset: 4px; }
svg { flex: none; vertical-align: middle; }

.sr-only, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link:focus {
  position: fixed;
  z-index: 20;
  left: 1rem;
  top: 1rem;
  padding: .65rem 1rem;
  background: var(--paper);
  border-radius: .3rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  min-height: var(--header-height);
  max-width: 104rem;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 3.1vw, 3.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand, .header-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.brand-logo { flex: none; }
.brand-logo img {
  width: 8.75rem;
  height: auto;
  filter: brightness(0) saturate(100%) invert(14%) sepia(20%) saturate(995%) hue-rotate(106deg) brightness(93%) contrast(92%);
}
.brand-doc {
  padding-left: 1.25rem;
  border-left: 1px solid var(--line);
  line-height: 1.75;
  font-size: .94rem;
  font-weight: 600;
  text-decoration: none;
}
.search-trigger, .search-head button, .brief-tools button {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: .5rem;
  padding: .45rem .6rem;
}
.search-trigger {
  min-height: 2.4rem;
  min-width: 12.25rem;
  color: var(--muted);
  font-size: .875rem;
}
.search-trigger:hover, .brief-tools button:hover, .search-head button:hover { background: var(--green-soft); }
.search-trigger kbd {
  font: inherit;
  font-size: .75rem;
  margin-left: auto;
  padding: .06rem .35rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: .25rem;
  white-space: nowrap;
}
.studio-link {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-weight: 600;
  font-size: .875rem;
  text-decoration: none;
  white-space: nowrap;
}
.studio-link:hover, .brand-doc:hover { color: var(--green); }

.shell {
  max-width: 104rem;
  min-height: calc(100vh - var(--header-height));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 15.35rem minmax(0, 49rem) minmax(9.75rem, 13rem);
  gap: clamp(1.4rem, 3.25vw, 3.75rem);
  padding: 0 clamp(1.25rem, 3.1vw, 3.5rem) 0 0;
}
.sidebar {
  position: sticky;
  top: var(--header-height);
  align-self: start;
  min-height: calc(100vh - var(--header-height));
  max-height: calc(100vh - var(--header-height));
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  background: var(--panel);
  border-right: 1px solid var(--line);
  padding: 2rem .9rem 1.75rem clamp(1.1rem, 2.5vw, 2.7rem);
}
.chapter-nav a {
  min-height: 2rem;
  padding: .37rem .56rem;
  display: flex;
  align-items: center;
  gap: .55rem;
  color: var(--body);
  border-radius: .32rem;
  font-size: .875rem;
  line-height: 1.26;
  text-decoration: none;
}
.chapter-nav a:hover { background: var(--green-soft); }
.chapter-nav a[aria-current="page"] {
  background: var(--green-soft);
  color: #1c612e;
  font-weight: 700;
}
.nav-home a { font-size: .96rem; font-weight: 650; min-height: 2.35rem; }
.nav-home svg { width: 1rem; height: 1rem; }
.nav-group { margin-top: 1.45rem; }
.nav-group p {
  margin: 0 0 .28rem;
  padding: 0 .56rem;
  font-size: .875rem;
  font-weight: 700;
  line-height: 1.35;
}
main { min-width: 0; padding-top: clamp(2rem, 3.15vw, 3.25rem); }
main:focus { outline: none; }
.mobile-chapters, .mobile-outline { display: none; }
.page-outline { padding-top: clamp(2.6rem, 4.3vw, 4.5rem); min-width: 0; }
.page-outline nav {
  position: sticky;
  top: calc(var(--header-height) + 2.75rem);
}
.page-outline p {
  display: flex;
  gap: .45rem;
  align-items: center;
  margin: 0 0 .875rem;
  font-size: .875rem;
  font-weight: 700;
}
.page-outline svg { width: 1rem; height: 1rem; color: var(--green); }
.page-outline ul, .mobile-outline ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.page-outline li { border-left: 1px solid var(--line); }
.page-outline li:has([aria-current]) { border-left-color: var(--green); }
.page-outline a, .mobile-outline a {
  display: block;
  padding: .38rem 0 .38rem .8rem;
  color: var(--muted);
  font-size: .875rem;
  line-height: 1.38;
  text-decoration: none;
}
.page-outline a:is(:hover, [aria-current]), .mobile-outline a:hover { color: var(--green); }
.page-outline [aria-current] { font-weight: 700; }

.overview-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  align-items: center;
  min-height: 24rem;
  border-radius: var(--radius);
  background: #1c392e;
  color: #f6fbf5;
}
.overview-hero::before {
  position: absolute;
  inset: 0 0 0 33%;
  z-index: -2;
  content: "";
  background: url("feld.jpg") 52% 74% / cover no-repeat;
}
.overview-hero::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background: linear-gradient(90deg, #1c392e 23%, #1c392e 34%, #1c392ee0 48%, #1c392e32 78%, #132d2112);
}
.hero-content {
  width: min(34rem, 80%);
  padding: clamp(1.5rem, 4vw, 3.45rem);
}
h1, h2, h3, p { margin-top: 0; }
h1 {
  margin-bottom: 0;
  font-size: clamp(2.55rem, 4.35vw, 4.2rem);
  font-weight: 700;
  line-height: .99;
  letter-spacing: -.035em;
  text-wrap: balance;
  hyphens: auto;
  overflow-wrap: anywhere;
}
.hero-content h1 {
  font-size: clamp(2.65rem, 5.1vw, 4.6rem);
  font-weight: 700;
  text-wrap: initial;
  hyphens: none;
}
.hero-content p {
  max-width: 37ch;
  margin: 1.25rem 0 1.6rem;
  color: #e4eee2;
  font-size: clamp(1rem, 1.45vw, 1.2rem);
  line-height: 1.45;
}
.hero-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.6rem;
  border-radius: .38rem;
  padding: .46rem .95rem;
  color: #153321;
  background: #d0edbc;
  font-weight: 700;
  text-decoration: none;
}
.hero-link:hover { background: #e5f8d9; }
.hero-link:focus-visible { outline-color: #e4fbe3; }

.chapter-heading {
  padding-top: .4rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 2.15rem;
}
.lead {
  max-width: 58ch;
  margin: 1.05rem 0 0;
  color: var(--body);
  font-size: clamp(1.09rem, 1.65vw, 1.3rem);
  line-height: 1.5;
}
.prose { color: var(--body); font-size: 1.0625rem; line-height: 1.62; overflow-wrap: anywhere; }
.prose > p, .prose [data-brief-text] > p { max-width: 72ch; }
.prose p { margin-bottom: 1.04rem; }
.prose strong { color: var(--ink); font-weight: 700; }
.prose h2, .prose h3 { color: var(--ink); line-height: 1.16; text-wrap: balance; }
.prose h2 {
  margin: 2.65rem 0 .7rem;
  font-size: clamp(1.55rem, 2.17vw, 2.05rem);
  font-weight: 700;
  letter-spacing: -.024em;
  scroll-margin-top: calc(var(--header-height) + 1.5rem);
}
.prose h2:first-child, .prose [data-brief-text] h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.02rem; }
.prose a { color: var(--green); }
.prose a:hover { text-decoration-thickness: 2px; }
.prose > ul { padding-left: 1.25rem; }
.prose > ul li { margin: .25rem 0; }
.overview-prose { padding-top: 2.45rem; }
.overview-prose h2 + p { margin-top: .65rem; }

.reading-paths { border-top: 1px solid var(--line); margin-top: .9rem; }
.reading-paths a {
  display: grid;
  grid-template-columns: 1.35rem 1fr;
  gap: .85rem;
  align-items: center;
  padding: .8rem .25rem;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}
.reading-paths a:hover { background: var(--panel); }
.reading-paths a span span { display: block; color: var(--muted); font-size: .96rem; line-height: 1.35; }

blockquote {
  margin: 1.35rem 0;
  padding: .95rem 1.2rem;
  border-radius: .5rem;
  background: var(--green-soft);
  color: var(--ink);
  font-size: 1.13rem;
  font-weight: 600;
}
.prose blockquote p { margin: 0; }
.table-scroll { overflow: auto; margin: 1.25rem 0 1.65rem; border: 1px solid var(--line); border-radius: .55rem; }
table { width: 100%; border-collapse: collapse; font-size: .97rem; line-height: 1.45; }
th, td { padding: .7rem .85rem; text-align: left; vertical-align: top; }
th { color: var(--ink); font-weight: 700; }
thead { background: var(--panel); }
tbody tr { border-top: 1px solid var(--line); }

.diagram, .technical-flow, .product-flow { margin: 1.1rem 0 1.5rem; }
.diagram {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}
.flow { padding: 1rem 1.1rem; background: var(--panel); }
.flow-focus { background: var(--green-soft); }
.flow h3 { margin-bottom: .7rem; font-size: 1.09rem; }
.flow dl { margin: 0; }
.flow dt { font-weight: 700; font-size: .98rem; color: var(--ink); }
.flow dd { margin: 0 0 .6rem; line-height: 1.4; font-size: .93rem; }
.flow dd:last-child { margin-bottom: 0; }
.technical-flow ol {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  list-style: none;
  padding: 0;
  margin: 0;
  border: 1px solid var(--line);
  overflow: hidden;
  border-radius: .55rem;
  background: var(--line);
}
.technical-flow li { background: var(--panel); padding: .85rem; font-size: .93rem; line-height: 1.4; }
.technical-flow li:nth-child(2) { background: var(--green-soft); }
.technical-flow li span { display: block; }
figcaption { margin-top: .45rem; color: var(--muted); font-size: .875rem; line-height: 1.4; }
.editor { margin: 1.1rem 0 1.4rem; }
.editor img { border: 1px solid var(--line); border-radius: .6rem; width: 100%; }
.product-flow { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.product-flow .flow { border: 1px solid var(--line); border-radius: var(--radius); }
.product-flow .flow:last-child { background: var(--green-soft); }

.menu-demo { margin: 1.1rem 0 1.45rem; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.demo-toggle {
  display: flex;
  align-items: center;
  gap: .7rem;
  font-weight: 700;
  color: var(--ink);
  padding: .85rem 1rem;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.demo-toggle input { accent-color: var(--green); width: 1.12rem; height: 1.12rem; margin: 0; }
.menu-comparison { display: grid; grid-template-columns: 1fr 1fr; }
.menu-comparison > div { min-width: 0; padding: 1rem; }
.menu-comparison > div + div { border-left: 1px solid var(--line); }
.menu-comparison h3 { margin: 0 0 .8rem; }
.menu-comparison p { color: var(--muted); margin: .55rem 0 0; font-size: .9rem; line-height: 1.4; }
.demo-menu { list-style: none; padding: 0; margin: 0; min-height: 9.8rem; }
.demo-menu li {
  display: flex;
  align-items: center;
  gap: .55rem;
  min-height: 2.2rem;
  padding: .31rem .45rem;
  margin-bottom: .28rem;
  border: 1px solid var(--line);
  border-radius: .35rem;
  background: var(--panel);
  color: var(--ink);
  font-size: .92rem;
  line-height: 1.2;
}
.demo-menu .empty-slot { background: transparent; border-style: dashed; color: var(--muted); }
.function-key {
  background: var(--green-soft);
  display: inline-grid;
  place-items: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: .18rem;
  font-size: .83rem;
  font-weight: 700;
}
.variants { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1rem 0; }
.variant { padding: .9rem; border-radius: var(--radius); }
.variant-light { background: #eff3dc; color: #2f3822; }
.variant-dark { background: #263c3d; color: #eff8f4; }
.variant p { font-weight: 700; margin: 0 0 .6rem; }
.setting { font-size: .9rem; }
.variant-control { display: flex; align-items: center; gap: .45rem; }
.variant-control button {
  background: #fbfcf8;
  color: #263c3d;
  border: 0;
  border-radius: .3rem;
  width: 2rem;
  height: 2rem;
  padding: 0;
}
.variant-control button:hover { background: #d0edbc; }
.variant-control button:disabled { opacity: .55; cursor: default; }
.demo-value { font-size: 1.45rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.brief-tools { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem; margin-bottom: 1.4rem; }
.brief-tools button { background: var(--paper); font-size: .9rem; }
.brief-tools svg { width: 1rem; height: 1rem; }
.copy-status { font-size: .875rem; color: var(--green); }

.chapter-pagination {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2.65rem;
}
.chapter-pagination a {
  display: grid;
  gap: .15rem;
  padding: .65rem .8rem;
  border: 1px solid var(--line);
  border-radius: .5rem;
  text-decoration: none;
}
.chapter-pagination a:hover { background: var(--panel); border-color: #b1c7b1; }
.chapter-pagination span { color: var(--muted); font-size: .82rem; }
.chapter-pagination strong { color: var(--green); font-size: .97rem; }
.chapter-pagination .next { grid-column: 2; text-align: right; }
.page-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .4rem 1.1rem;
  margin-top: 2.25rem;
  padding: 1.1rem 0 1.65rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .875rem;
}
.page-footer a:hover { color: var(--green); }

.search-dialog {
  width: min(36rem, calc(100% - 1.9rem));
  max-height: min(36rem, 78vh);
  padding: 0;
  margin: min(14vh, 7.5rem) auto auto;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}
.search-dialog::backdrop { background: #10251dc4; }
.search-head {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .65rem .8rem;
  border-bottom: 1px solid var(--line);
}
.search-head input {
  flex: 1;
  width: 0;
  border: 0;
  padding: .44rem 0;
  outline: none;
  background: var(--paper);
  color: var(--ink);
}
.search-head:focus-within { box-shadow: inset 0 -2px 0 #348e50; }
.search-head button { padding: .34rem; }
.search-head input::placeholder { color: var(--muted); }
.search-message { margin: 0; padding: .65rem 1rem; color: var(--muted); font-size: .875rem; }
.search-results { list-style: none; margin: 0; padding: 0 .55rem .55rem; }
.search-results a {
  display: block;
  padding: .68rem .55rem;
  border-radius: .35rem;
  text-decoration: none;
  line-height: 1.35;
}
.search-results a:is(:hover, :focus-visible) { background: var(--green-soft); outline-offset: -2px; }
.search-results small, .search-results span { display: block; color: var(--muted); }
.search-results small { margin-bottom: .15rem; font-size: .85rem; }
.search-results span { margin-top: .17rem; font-size: .9rem; }

@media (max-height: 50rem) {
  .sidebar { padding-top: 1.65rem; padding-bottom: 1rem; }
  .sidebar .nav-group { margin-top: 1.12rem; }
  .sidebar .chapter-nav a { min-height: 1.87rem; padding-block: .3rem; }
}
@media (max-width: 67rem) {
  .shell { grid-template-columns: 13.5rem minmax(0, 49rem) minmax(8rem, 10rem); gap: 1.25rem; }
  .sidebar { padding-left: 1rem; }
}
@media (max-width: 56rem) {
  .shell { grid-template-columns: 13.5rem minmax(0, 49rem); }
  .page-outline { display: none; }
}
@media (max-width: 46rem) {
  :root { --header-height: 3.7rem; }
  .header-inner { padding-inline: 1rem; }
  .brand, .header-actions { gap: .65rem; }
  .brand-logo img { width: 7.05rem; }
  .brand-doc { padding-left: .65rem; font-size: .875rem; }
  .search-trigger { min-width: 2.4rem; min-height: 2.4rem; justify-content: center; }
  .search-trigger span, .search-trigger kbd, .studio-link, .sidebar { display: none; }
  .mobile-chapters {
    display: block;
    padding: .25rem 1rem;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
  }
  .mobile-chapters summary, .mobile-outline summary {
    min-height: 2.65rem;
    display: flex;
    align-items: center;
    gap: .45rem;
    list-style: none;
    font-size: .9rem;
    font-weight: 700;
  }
  .mobile-chapters summary::-webkit-details-marker, .mobile-outline summary::-webkit-details-marker { display: none; }
  .mobile-chapters summary::after, .mobile-outline summary::after {
    content: "";
    width: .42rem;
    height: .42rem;
    border-right: 1px solid;
    border-bottom: 1px solid;
    transform: rotate(45deg);
    margin: -.22rem 0 0 auto;
  }
  details[open] > summary::after { transform: rotate(225deg); margin-top: .22rem; }
  .mobile-chapters .chapter-nav { padding-bottom: .65rem; }
  .mobile-chapters .nav-group { margin-top: .8rem; }
  .mobile-outline { display: block; border-bottom: 1px solid var(--line); margin-bottom: 1.4rem; }
  .mobile-outline nav { padding-bottom: .6rem; }
  .shell { display: block; padding-inline: 1rem; }
  main { padding-top: 1.35rem; }
  .overview-hero { min-height: 20.25rem; }
  .overview-hero::before { inset-inline-start: 33%; }
  .overview-hero::after { background: linear-gradient(90deg, #1c392e 22%, #1c392ef5 42%, #1c392e8c 78%, #19332244); }
  .hero-content { width: 100%; padding: 1.5rem; }
  .hero-content h1 { font-size: clamp(2.25rem, 8.8vw, 3.8rem); }
  .hero-content p { max-width: 33ch; }
  .overview-prose { padding-top: 0; }
  .chapter-heading { margin-bottom: .25rem; padding-bottom: 1.1rem; }
}
@media (max-width: 28rem) {
  .diagram, .product-flow { grid-template-columns: 1fr; }
  .technical-flow ol { grid-template-columns: 1fr; }
  .menu-comparison > div { padding: .65rem .45rem; }
  .menu-comparison h3 { min-height: 2.1em; }
  .menu-comparison p { font-size: .84rem; }
  th, td { padding: .59rem .48rem; }
  .chapter-pagination { gap: .45rem; }
  .chapter-pagination a { padding: .48rem; }
}

@media print {
  :root { color: #000; background: #fff; }
  .site-header, .sidebar, .page-outline, .mobile-chapters, .mobile-outline, .chapter-pagination, .page-footer, .brief-tools, .skip-link { display: none !important; }
  .shell { display: block; padding: 0; }
  main { padding: 0; }
  .prose { color: #000; font-size: 11pt; }
  h1 { font-size: 28pt; }
  .prose h2 { font-size: 16pt; break-after: avoid; }
  .prose p { max-width: none; }
}
