@layer bean.reset, bean.base, bean.components, bean.plugins, site;

@layer bean.reset {
  * { box-sizing: border-box; }
}

@layer bean.base {
  :root {
    --bean-font-ui: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
    --bean-font-body: var(--bean-font-ui);
    --bean-font-heading: var(--bean-font-ui);
    --bean-font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    --bean-color-bg: #ffffff;
    --bean-color-surface: #f6f8fa;
    --bean-color-text: #1f2328;
    --bean-color-muted: #667085;
    --bean-color-border: #d0d7de;
    --bean-color-link: #0969da;
    --bean-color-focus: #0969da;
    --bean-color-danger: #b23b3b;
    --bean-color-warning: #9a6700;
    --bean-space-2xs: 0.25rem;
    --bean-space-xs: 0.375rem;
    --bean-space-sm: 0.625rem;
    --bean-space: 1rem;
    --bean-space-lg: 2rem;
    --bean-list-indent: 1.25rem;
    --bean-measure: 70ch;
    --bean-measure-wide: 76rem;
    --bean-radius: 0;
    --bean-shadow: 0 0.5rem 1.5rem rgb(31 35 40 / 12%);
  }

  html { color-scheme: light; }
  body {
    display: flex;
    flex-direction: column;
    margin: 0;
    min-block-size: 100vh;
    min-block-size: 100svh;
    color: var(--bean-color-text);
    background: var(--bean-color-bg);
    font: 16px/1.6 var(--bean-font-body);
    overflow-wrap: break-word;
    scrollbar-gutter: stable;
    text-rendering: optimizeLegibility;
  }
  a {
    color: var(--bean-color-link);
    text-decoration-color: color-mix(in srgb, currentColor 38%, transparent);
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.18em;
  }
  a:hover { text-decoration-color: currentColor; }
  :is(h1, h2, h3, h4, h5, h6) {
    margin-block: var(--bean-space-lg) var(--bean-space-sm);
    font-family: var(--bean-font-heading);
    line-height: 1.2;
    text-wrap: balance;
  }
  h1 { font-size: clamp(1.875rem, 4vw, 2.5rem); font-weight: 750; }
  h2 { font-size: clamp(1.45rem, 3vw, 1.8rem); font-weight: 725; }
  h3 { font-size: clamp(1.2rem, 2vw, 1.4rem); font-weight: 700; }
  :is(h4, h5, h6) { font-size: 1rem; }
  .bean-shell-main article > h1 { margin-block-start: 0; }
  .bean-content > :is(p, ul, ol, dl, blockquote, figure, pre, table) { margin-block: var(--bean-space); }
  .bean-content :is(p, li, blockquote) { text-wrap: pretty; }
  .bean-content > :last-child { margin-block-end: 0; }
  .bean-shell-header, .bean-shell-main, .bean-shell-footer {
    inline-size: min(var(--bean-measure), calc(100% - var(--bean-space) - var(--bean-space)));
    margin-inline: auto;
  }
  .bean-shell-header {
    display: flex;
    gap: var(--bean-space);
    align-items: center;
    justify-content: space-between;
    padding-block: var(--bean-space);
    border-block-end: 1px solid var(--bean-color-border);
  }
  .bean-shell-main { flex: 1 0 auto; padding-block: var(--bean-space-lg); }
  .bean-shell-footer {
    padding-block: var(--bean-space);
    color: var(--bean-color-muted);
    border-block-start: 1px solid var(--bean-color-border);
  }
  img { max-inline-size: 100%; block-size: auto; }
  code, pre { font-family: var(--bean-font-mono); }
  :where(button, input, select, textarea) { color: inherit; font: inherit; }
  :where(button, select, textarea, input:not([type="checkbox"]):not([type="radio"])) {
    min-block-size: 2.5rem;
    border: 1px solid var(--bean-color-border);
    border-radius: var(--bean-radius);
  }
  :where(input, select, textarea) { padding: var(--bean-space-xs) var(--bean-space-sm); background: var(--bean-color-bg); }
  :where(button, input[type="button"], input[type="submit"], input[type="reset"]) {
    padding: var(--bean-space-xs) var(--bean-space-sm);
    color: var(--bean-color-text);
    background: var(--bean-color-surface);
    font-family: var(--bean-font-ui);
    font-weight: 600;
    cursor: pointer;
  }
  :where(button, input[type="button"], input[type="submit"], input[type="reset"]):hover:not(:disabled) {
    border-color: var(--bean-color-link);
    background: var(--bean-color-bg);
  }
  :where(button, input, select, textarea):disabled { opacity: 0.55; cursor: not-allowed; }
  textarea { min-block-size: 8rem; resize: vertical; }
}

@layer bean.components {
  .skip-link {
    position: absolute;
    inset-block-start: var(--bean-space-sm);
    inset-inline-start: var(--bean-space-sm);
    transform: translateY(-200%);
    padding: var(--bean-space-sm) var(--bean-space-sm);
    background: var(--bean-color-bg);
    border: 1px solid var(--bean-color-border);
  }
  .skip-link:focus { transform: translateY(0); }
  .bean-brand {
    color: inherit;
    font-weight: 700;
    text-decoration: none;
  }
  .bean-navigation { margin-inline-start: auto; }
  .bean-navigation__list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--bean-space-2xs) var(--bean-space-sm);
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .bean-navigation__link {
    display: inline-block;
    padding-block: var(--bean-space-2xs);
    color: var(--bean-color-muted);
    font-weight: 600;
    text-decoration: none;
    text-underline-offset: 0.25em;
  }
  .bean-navigation__link:is(:hover, :focus-visible),
  .bean-navigation__link[data-active="true"] {
    color: var(--bean-color-text);
    text-decoration: underline;
    text-decoration-color: var(--bean-color-link);
    text-decoration-thickness: 0.12em;
  }
  .bean-navigation__link:focus-visible,
  .bean-brand:focus-visible {
    outline: 2px solid var(--bean-color-focus);
    outline-offset: 2px;
  }
  .bean-content > :first-child { margin-block-start: 0; }
  .bean-anchor {
    margin-inline-start: 0.35em;
    color: var(--bean-color-muted);
    text-decoration: none;
    opacity: 0;
    transition: opacity 0.15s ease;
  }
  :is(h2, h3, h4, h5, h6):hover > .bean-anchor,
  .bean-anchor:focus-visible { opacity: 1; }
  .bean-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--bean-space-2xs) var(--bean-space-sm);
    color: var(--bean-color-muted);
  }
  .bean-toc {
    margin-block: var(--bean-space);
    padding: var(--bean-space-sm) var(--bean-space);
    border: 1px solid var(--bean-color-border);
    border-radius: var(--bean-radius);
  }
  .bean-toc ol {
    margin-block: var(--bean-space-2xs);
    padding-inline-start: var(--bean-list-indent);
  }
  .bean-toc a {
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.18em;
  }
  .bean-callout {
    margin-block: var(--bean-space);
    padding: var(--bean-space-sm) var(--bean-space);
    border: 1px solid var(--bean-color-border);
    border-inline-start: 4px solid var(--bean-color-link);
    border-radius: var(--bean-radius);
  }
  .bean-callout-title {
    color: var(--bean-color-link);
    font-weight: 700;
    margin-block-end: var(--bean-space-xs);
  }
  .bean-callout > :last-child { margin-block-end: 0; }
  .bean-callout[data-kind="warning"] { border-inline-start-color: var(--bean-color-warning); }
  .bean-callout[data-kind="warning"] .bean-callout-title { color: var(--bean-color-warning); }
  .bean-callout[data-kind="danger"] { border-inline-start-color: var(--bean-color-danger); }
  .bean-callout[data-kind="danger"] .bean-callout-title { color: var(--bean-color-danger); }
  .bean-error {
    margin-block: var(--bean-space);
    padding: var(--bean-space-sm) var(--bean-space);
    border: 1px solid var(--bean-color-danger);
    border-radius: var(--bean-radius);
    color: var(--bean-color-danger);
  }
  .bean-list {
    padding-inline-start: var(--bean-list-indent);
  }
  .bean-groups {
    display: grid;
    gap: var(--bean-space);
    margin-block: var(--bean-space);
  }
  .bean-group > h3 {
    margin-block: 0 var(--bean-space-xs);
    font-size: 1.05rem;
  }
  .bean-group > :last-child {
    margin-block-end: 0;
  }
  .bean-table-wrap {
    margin-block: var(--bean-space);
    border: 1px solid var(--bean-color-border);
    border-radius: var(--bean-radius);
    overflow: hidden;
  }
  .bean-table-scroll {
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
  }
  .bean-table-caption {
    padding-block: var(--bean-space-sm);
    padding-inline: var(--bean-space-sm);
    color: var(--bean-color-muted);
    font-weight: 600;
    text-align: start;
  }
  .bean-table-count {
    color: var(--bean-color-muted);
    font-weight: normal;
    font-size: 0.875em;
  }
  .bean-table-tools {
    display: flex;
    flex-wrap: wrap;
    gap: var(--bean-space-xs);
    align-items: center;
    padding: var(--bean-space-sm);
    background: var(--bean-color-surface);
  }
  .bean-table-tools input {
    flex: 1 1 18rem;
    min-inline-size: min(18rem, 100%);
    min-block-size: 2.5rem;
    padding: var(--bean-space-xs) var(--bean-space-sm);
    border: 1px solid var(--bean-color-border);
    border-radius: var(--bean-radius);
    color: var(--bean-color-text);
    background: var(--bean-color-bg);
    font: inherit;
  }
  .bean-table-tools input::placeholder { color: var(--bean-color-muted); opacity: 1; }
  .bean-table-tools button {
    min-block-size: 2.5rem;
    padding: var(--bean-space-xs) var(--bean-space-sm);
    border: 1px solid var(--bean-color-border);
    border-radius: var(--bean-radius);
    color: var(--bean-color-text);
    background: var(--bean-color-surface);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
  }
  .bean-table-tools button:hover:not(:disabled) {
    border-color: var(--bean-color-link);
    background: var(--bean-color-bg);
  }
  .bean-table-tools input:hover:not(:disabled) { border-color: var(--bean-color-muted); }
  .bean-table-tools :is(input, button):focus-visible {
    outline: 2px solid var(--bean-color-focus);
    outline-offset: 2px;
  }
  .bean-table-tools :is(input, button):disabled { opacity: 0.55; cursor: not-allowed; }
  .bean-table-tools select {
    min-block-size: 2.5rem;
    padding: var(--bean-space-xs) var(--bean-space-sm);
    border: 1px solid var(--bean-color-border);
    border-radius: var(--bean-radius);
    color: var(--bean-color-text);
    background: var(--bean-color-bg);
    font: inherit;
    cursor: pointer;
  }
  .bean-table-tools select:hover { border-color: var(--bean-color-muted); }
  .bean-table-reset {
    flex: 0 0 auto;
    display: inline-grid;
    place-items: center;
    inline-size: 2.5rem;
    padding-inline: 0;
    font-size: 1.15rem;
    line-height: 1;
  }
  .bean-table-mobile-sort { display: none; }
  .bean-code-tools button, .bean-back-top { padding: var(--bean-space-xs) var(--bean-space-sm); font: inherit; cursor: pointer; }
  .bean-table-sort {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 1em;
    column-gap: 0.25em;
    align-items: center;
    inline-size: 100%;
    min-inline-size: 0;
    min-block-size: 2.25rem;
    border: 0;
    padding: 0;
    color: inherit;
    background: transparent;
    font: inherit;
    font-weight: 700;
    line-height: 1.3;
    text-align: inherit;
    cursor: pointer;
  }
  .bean-table-sort__label { min-inline-size: 0; overflow-wrap: anywhere; }
  .bean-table-sort::after { content: ""; display: block; color: var(--bean-color-muted); font-size: 0.75em; line-height: 1; text-align: center; }
  .bean-table-sort[data-sort-direction="asc"]::after { content: "▲"; }
  .bean-table-sort[data-sort-direction="desc"]::after { content: "▼"; }
  .bean-table, .bean-content table {
    inline-size: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    font-variant-numeric: tabular-nums;
  }
  :is(.bean-table, .bean-content table) th,
  :is(.bean-table, .bean-content table) td {
    padding: var(--bean-space-xs) var(--bean-space-sm);
    border-block-end: 1px solid var(--bean-color-border);
    text-align: start;
    vertical-align: middle;
  }
  :is(.bean-table, .bean-content table) th { padding-block: var(--bean-space-2xs); color: var(--bean-color-muted); background: var(--bean-color-surface); }
  .bean-table :is(th, td) { padding-block: 0; }
  .bean-table-cell { display: flex; align-items: center; min-block-size: 2.25rem; line-height: 1.35; }
  .bean-table tbody tr:nth-child(even) { background: color-mix(in srgb, var(--bean-color-surface) 55%, var(--bean-color-bg)); }
  .bean-table tbody tr:hover { background: color-mix(in srgb, var(--bean-color-link) 7%, var(--bean-color-bg)); }
  .bean-table tbody tr:last-child > * { border-block-end: 0; }
  .bean-table-scroll > .bean-table { margin-block: 0; }
  .bean-card, .backlinks, .bean-attachments {
    border: 1px solid var(--bean-color-border);
    border-radius: var(--bean-radius);
    padding: var(--bean-space);
  }
  .bean-cards, .bean-gallery {
    display: grid;
    gap: var(--bean-space);
    grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr));
    margin-block: var(--bean-space);
  }
  .bean-card { background: var(--bean-color-surface); }
  .bean-card h3 { margin-block: var(--bean-space-sm) 0; }
  .bean-card-meta { display: flex; flex-wrap: wrap; gap: var(--bean-space-xs) var(--bean-space-sm); color: var(--bean-color-muted); }
  .bean-gallery-item { margin: 0; }
  .bean-gallery-item img { display: block; inline-size: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--bean-radius); }
  .bean-gallery-item figcaption { margin-block-start: var(--bean-space-xs); }
  .bean-files { display: grid; gap: var(--bean-space-xs); padding: 0; list-style: none; }
  .bean-files li { display: flex; flex-wrap: wrap; gap: var(--bean-space-xs); align-items: baseline; }
  .bean-file-ext, .bean-file-size, .bean-file-dim { color: var(--bean-color-muted); font-size: 0.875rem; }
  .bean-file-ext { padding-inline: var(--bean-space-xs); border: 1px solid var(--bean-color-border); border-radius: var(--bean-radius); text-transform: uppercase; }
  .bean-attachments { margin-block-start: var(--bean-space-lg); }
  .bean-attachments h2 { margin-block-start: 0; }
  .bean-embed { margin-inline: 0; padding-inline-start: var(--bean-space); border-inline-start: 0.25rem solid var(--bean-color-border); }
  .bean-embed footer { margin-block-start: var(--bean-space-sm); font-size: 0.875rem; }
  .bean-inline, .bean-count { font-variant-numeric: tabular-nums; }
  .bean-code-tools { display: flex; justify-content: flex-end; gap: var(--bean-space-sm); align-items: center; margin-block-end: calc(-1 * var(--bean-space-xs)); }
  pre[data-wrap="true"] { white-space: pre-wrap; overflow-wrap: anywhere; }
  .bean-heading-anchor { color: var(--bean-color-muted); font-family: var(--bean-font-ui); font-size: 0.7em; text-decoration: none; opacity: 0; }
  :is(h2, h3, h4, h5, h6):hover .bean-heading-anchor, .bean-heading-anchor:focus-visible { opacity: 1; }
  .bean-back-top { position: fixed; inset-inline-end: var(--bean-space); inset-block-end: var(--bean-space); z-index: 10; border: 1px solid var(--bean-color-border); border-radius: var(--bean-radius); background: var(--bean-color-surface); box-shadow: var(--bean-shadow); }
  .bean-lightbox { inline-size: min(90vw, var(--bean-measure-wide)); max-block-size: 90vh; border: 1px solid var(--bean-color-border); border-radius: var(--bean-radius); background: var(--bean-color-bg); color: var(--bean-color-text); box-shadow: var(--bean-shadow); }
  .bean-lightbox::backdrop { background: rgb(0 0 0 / 70%); }
  .bean-lightbox figure { display: grid; place-items: center; margin: 0; }
  .bean-lightbox img { max-block-size: 75vh; }
  .bean-lightbox-close { float: inline-end; }
  :where(button, input, select, textarea, a):focus-visible { outline: 2px solid var(--bean-color-focus); outline-offset: 2px; }
  .backlinks {
    margin-block-start: var(--bean-space-lg);
  }
  .backlinks h2 {
    margin-block: 0 var(--bean-space-sm);
    font-size: 1.125rem;
  }
  .backlinks ol {
    margin-block: 0;
    padding-inline-start: var(--bean-list-indent);
  }
  .backlinks li + li {
    margin-block-start: var(--bean-space-xs);
  }
  .backlinks__link {
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.18em;
  }
  .backlinks__types {
    margin-inline-start: var(--bean-space-sm);
    color: var(--bean-color-muted);
    font-size: 0.875em;
  }
  .backlinks__type + .backlinks__type::before {
    content: ", ";
  }
  .bean-prevnext {
    display: grid;
    gap: var(--bean-space-sm);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-block-start: var(--bean-space-lg);
  }
  .bean-prevnext a {
    display: grid;
    padding: var(--bean-space-sm);
    border: 1px solid var(--bean-color-border);
    color: inherit;
    text-decoration: none;
  }
  .bean-prevnext-next {
    text-align: end;
  }
  .bean-prevnext span {
    color: var(--bean-color-muted);
    font-size: 0.875rem;
  }
  .bean-prevnext strong {
    color: var(--bean-color-link);
  }
  .bean-related {
    margin-block-start: var(--bean-space-lg);
    padding-block-start: var(--bean-space);
    border-block-start: 1px solid var(--bean-color-border);
  }
  .bean-related h2 {
    margin-block: 0 var(--bean-space-sm);
    font-size: 1.125rem;
  }
  .bean-related ul {
    margin-block: 0;
    padding-inline-start: var(--bean-list-indent);
  }
  .bean-search {
    display: grid;
    gap: var(--bean-space);
  }
  .bean-search__form {
    display: grid;
    gap: var(--bean-space-xs);
  }
  .bean-search__input {
    inline-size: 100%;
    min-block-size: 2.5rem;
    padding: var(--bean-space-xs) var(--bean-space-sm);
    border: 1px solid var(--bean-color-border);
    border-radius: var(--bean-radius);
    color: var(--bean-color-text);
    background: var(--bean-color-bg);
    font: inherit;
  }
  .bean-search__status {
    margin: 0;
    color: var(--bean-color-muted);
  }
  .bean-search__results {
    display: grid;
    gap: var(--bean-space-sm);
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .bean-search__result {
    padding-block: var(--bean-space-sm);
    border-block-start: 1px solid var(--bean-color-border);
  }
  .bean-search__result p {
    margin-block: var(--bean-space-xs) 0;
    color: var(--bean-color-muted);
  }
  .bean-search__title {
    font-weight: 700;
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.18em;
  }
}

@layer bean.base {
  @media (max-width: 42rem) {
    .bean-shell-header {
      align-items: stretch;
      gap: var(--bean-space-sm);
      flex-direction: column;
    }
  }

  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto; transition-duration: 0.01ms; animation-duration: 0.01ms; }
  }
}

@layer bean.components {
  @media (max-width: 42rem) {
    .bean-navigation { margin-inline-start: 0; }
    .bean-navigation__list { gap: var(--bean-space-xs) var(--bean-space-sm); }
    .bean-table-tools { align-items: center; }
    .bean-table-tools input { flex: 1 1 8rem; min-inline-size: 8rem; }
    .bean-table-mobile-sort { display: block; flex: 1 1 12rem; min-inline-size: 10rem; }
    .bean-table-wrap[data-bean-ready="table"] .bean-table-scroll { overflow: visible; }
    .bean-table-wrap[data-bean-ready="table"] .bean-table-scroll > .bean-table { inline-size: 100%; min-inline-size: 0; }
    .bean-table-wrap[data-bean-ready="table"] .bean-table thead { display: none; }
    .bean-table-wrap[data-bean-ready="table"] .bean-table,
    .bean-table-wrap[data-bean-ready="table"] .bean-table tbody,
    .bean-table-wrap[data-bean-ready="table"] .bean-table tbody tr,
    .bean-table-wrap[data-bean-ready="table"] .bean-table tbody :is(th, td) { display: block; }
    .bean-table-wrap[data-bean-ready="table"] .bean-table tbody {
      display: grid;
      gap: var(--bean-space-sm);
      padding: var(--bean-space-sm);
      background: var(--bean-color-surface);
    }
    .bean-table-wrap[data-bean-ready="table"] .bean-table tbody tr,
    .bean-table-wrap[data-bean-ready="table"] .bean-table tbody tr:nth-child(even),
    .bean-table-wrap[data-bean-ready="table"] .bean-table tbody tr:hover {
      padding: var(--bean-space-sm);
      border: 1px solid var(--bean-color-border);
      background: var(--bean-color-bg);
    }
    .bean-table-wrap[data-bean-ready="table"] .bean-table tbody tr[hidden] { display: none; }
    .bean-table-wrap[data-bean-ready="table"] .bean-table tbody :is(th, td) { border: 0; padding: 0; }
    .bean-table-wrap[data-bean-ready="table"] .bean-table tbody td {
      display: grid;
      grid-template-columns: minmax(0, auto) minmax(0, 1fr);
      gap: var(--bean-space-2xs) var(--bean-space-xs);
      align-items: baseline;
    }
    .bean-table-wrap[data-bean-ready="table"] .bean-table tbody td::before {
      content: attr(data-label);
      min-inline-size: 0;
      color: var(--bean-color-muted);
      font-size: 0.8125rem;
      font-weight: 600;
      letter-spacing: 0.02em;
      text-transform: uppercase;
      overflow-wrap: anywhere;
    }
    .bean-table-wrap[data-bean-ready="table"] .bean-table-cell { justify-content: flex-end; min-block-size: 0; min-inline-size: 0; text-align: end; overflow-wrap: anywhere; }
    .bean-table-wrap[data-bean-ready="table"] .bean-group-table tbody th[scope="row"] {
      margin-block-end: var(--bean-space-xs);
      padding-block-end: var(--bean-space-xs);
      border-block-end: 1px solid var(--bean-color-border);
    }
    .bean-table-wrap[data-bean-ready="table"] .bean-group-table tbody th[scope="row"] .bean-table-cell { justify-content: flex-start; text-align: start; }
  }

  @media print {
    .skip-link, .bean-table-tools, .bean-code-tools, .bean-heading-anchor, .bean-back-top { display: none; }
  }
}

@layer bean.components {
  .bean-meta-item {
    display: flex;
    flex-direction: column;
    gap: var(--bean-space-2xs);
  }
  .bean-meta-item[data-wide] {
    flex-basis: 100%;
  }
  .bean-meta-item dt {
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--bean-color-muted);
  }
  .bean-meta-item dd {
    margin: 0;
    color: var(--bean-color-text);
  }
  .bean-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--bean-space-2xs) var(--bean-space-xs);
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .bean-chips li {
    display: inline-flex;
    align-items: center;
  }
  .bean-chips a {
    padding-inline: var(--bean-space-xs);
    padding-block: var(--bean-space-2xs);
    border: 1px solid var(--bean-color-border);
    border-radius: var(--bean-radius);
    background: var(--bean-color-surface);
    color: inherit;
    font-size: 0.875rem;
    text-decoration: none;
  }
  .bean-chips a:hover {
    border-color: var(--bean-color-link);
    color: var(--bean-color-link);
  }
  .bean-page-header {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--bean-space-lg);
    align-items: start;
    margin-block-end: var(--bean-space);
  }
  .bean-page-header h1 {
    margin-block-start: 0;
  }
  .bean-page-cover {
    margin: 0;
  }
  .bean-page-cover img {
    display: block;
    max-inline-size: 16rem;
    max-block-size: 16rem;
    border-radius: var(--bean-radius);
    object-fit: cover;
  }
  .bean-titleline {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: var(--bean-space-xs);
  }
  .bean-title-date {
    color: var(--bean-color-muted);
    font-size: 0.55em;
    font-weight: 400;
  }
  .bean-asset {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: var(--bean-space-xs);
  }
}

@layer bean.components {
  @media (max-width: 42rem) {
    .bean-page-header {
      grid-template-columns: 1fr;
    }
    .bean-page-cover img {
      max-inline-size: 100%;
    }
  }
}
@layer site {
  /* Computatorium's site layer: identity and palette, not component ownership. */
  :root {
    --bean-font-ui: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --bean-font-body: var(--bean-font-ui);
    --bean-font-heading: var(--bean-font-ui);
    --bean-font-mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
    --bean-color-bg: #fdfcfe;
    --bean-color-surface: #f5f2f8;
    --bean-color-text: #28242d;
    --bean-color-muted: #68616f;
    --bean-color-border: #d9d4df;
    --bean-color-link: #65439a;
    --bean-color-focus: #65439a;
    --bean-color-danger: #a73545;
    --bean-color-warning: #8a6300;
    --bean-measure: 75em;
    --bean-shadow: 0 0.5rem 1.5rem rgb(40 36 45 / 10%);
    --site-prose-measure: 66ch;
  }

  html {
    color-scheme: light dark;
  }

  body {
    background-image:
      url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='200'%20height='200'%3E%3Cfilter%20id='n'%3E%3CfeTurbulence%20type='fractalNoise'%20baseFrequency='0.8'%20numOctaves='2'%20stitchTiles='stitch'/%3E%3C/filter%3E%3Crect%20width='100%25'%20height='100%25'%20filter='url(%23n)'%20opacity='0.025'/%3E%3C/svg%3E"),
      linear-gradient(180deg, color-mix(in oklab, var(--bean-color-link) 4%, var(--bean-color-bg)) 0, var(--bean-color-bg) 6rem);
  }

  .bean-brand {
    font-size: 1.05rem;
    font-weight: 720;
    letter-spacing: -0.015em;
  }

  .bean-shell-main article > h1 {
    max-inline-size: 42rem;
    font-size: clamp(1.875rem, 3vw, 2.35rem);
    letter-spacing: -0.025em;
  }

  .bean-content > :where(p, ul, ol, dl, blockquote),
  .bean-content > :is(h2, h3, h4, h5, h6) {
    max-inline-size: var(--site-prose-measure);
  }

  @media (max-width: 42rem) {
    .bean-shell-header {
      gap: var(--bean-space-sm);
    }
  }

  @media (prefers-color-scheme: dark) {
    :root {
      --bean-color-bg: #19171c;
      --bean-color-surface: #242127;
      --bean-color-text: #f2eef5;
      --bean-color-muted: #bcb4c2;
      --bean-color-border: #48414f;
      --bean-color-link: #c9b1ef;
      --bean-color-focus: #d4c0f3;
      --bean-color-danger: #ff9cab;
      --bean-color-warning: #e3b341;
      --bean-shadow: 0 0.5rem 1.5rem rgb(0 0 0 / 25%);
    }

    body {
      background-image:
        url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='200'%20height='200'%3E%3Cfilter%20id='n'%3E%3CfeTurbulence%20type='fractalNoise'%20baseFrequency='0.8'%20numOctaves='2'%20stitchTiles='stitch'/%3E%3C/filter%3E%3Crect%20width='100%25'%20height='100%25'%20filter='url(%23n)'%20opacity='0.035'/%3E%3C/svg%3E"),
        linear-gradient(180deg, color-mix(in oklab, var(--bean-color-link) 4%, var(--bean-color-bg)) 0, var(--bean-color-bg) 6rem);
    }
  }
}
