:root {
  --t: #37352f;
  --b: #ffffff;
  --hover: #efefef;
  --active: #e9e9e7;
  --line: rgba(55, 53, 47, 0.09);
  --gray: #787774;
  --link: #2383e2;
  --ext: #787774;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body.al-body {
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  background: var(--b);
  color: var(--t);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ---------------------------------------------------------------- top bar */
.al-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}

.al-topbar-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  row-gap: 4px;
  min-height: 52px;
}

.al-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 17px;
  color: var(--t);
  text-decoration: none;
  white-space: nowrap;
}

.al-brand-logo {
  display: block;
  border-radius: 4px;
}

.al-topnav {
  display: none;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
  width: 100%;
  padding: 4px 0 8px;
}
.al-nav-open .al-topnav { display: flex; }

.al-toplink {
  display: inline-block;
  padding: 10px 12px;
  border-radius: 6px;
  color: var(--t);
  text-decoration: none;
  font-size: 15px;
  background: none;
  font-family: inherit;
}
.al-toplink:hover,
.al-toplink.active {
  background: var(--active);
  font-weight: 600;
}

.al-navtoggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  margin-left: auto;
  padding: 10px 8px;
  border: none;
  border-radius: 6px;
  background: none;
  cursor: pointer;
}
.al-navtoggle:hover { background: var(--hover); }
.al-navtoggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 1px;
  background: var(--t);
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.al-nav-open .al-navtoggle-bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.al-nav-open .al-navtoggle-bar:nth-child(2) { opacity: 0; }
.al-nav-open .al-navtoggle-bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------------------------------------------------------------- layout */
.al-main { width: 100%; }

.al-content {
  max-width: 1080px;
  margin: 16px auto;
  padding: 0 14px;
}

.al-title {
  margin: 0 0 22px;
}

.al-page-icon-wrap { margin: 4px 0 12px; }

.al-icon-overlap {
  position: relative;
  margin-top: -42px;
}

.al-page-icon {
  display: block;
  font-size: 58px;
  line-height: 1;
}

img.al-page-icon {
  width: 58px;
  height: 58px;
  border-radius: 6px;
  object-fit: cover;
}

.al-title h1 {
  margin: 0;
  font-weight: 750;
  font-size: 40px;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.al-content h2, .al-content h3, .al-content h4, .al-content h5 {
  margin: 22px 0 8px;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -0.005em;
}
.al-content h2 { font-size: 24px; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.al-content h3 { font-size: 20px; }
.al-content h4 { font-size: 17px; }
.al-content h5 { font-size: 15px; color: var(--gray); text-transform: uppercase; }

.al-content p { margin: 8px 0; white-space: pre-wrap; word-break: break-word; }

.al-content ul, .al-content ol { margin: 6px 0 14px; padding-left: 26px; }
.al-content li { margin: 3px 0; }

.al-content blockquote {
  margin: 12px 0;
  padding: 10px 14px;
  border-left: 3px solid var(--line);
  background: rgba(55, 53, 47, 0.03);
  border-radius: 4px;
}

.al-content table {
  border-collapse: collapse;
  width: 100%;
  max-width: 100%;
  margin: 14px 0;
}
.al-content th, .al-content td {
  border: 1px solid var(--line);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}
.al-content th { font-weight: 650; background: rgba(55, 53, 47, 0.03); }
.al-content table.al-rowhdr td:first-child { font-weight: 650; background: rgba(55, 53, 47, 0.03); }

/* ---------------------------------------------------------------- table columns */

/* .al-nowrap-<bp>-col-<n> rigid columns: nowrap from breakpoint up
   (Bootstrap 5 min-widths); remaining columns absorb the slack.
   Base .al-nowrap-col-<n> applies at every width. */
.al-content .al-nowrap-col-1 th:nth-child(1), .al-content .al-nowrap-col-1 td:nth-child(1) { white-space: nowrap; }
.al-content .al-nowrap-col-2 th:nth-child(2), .al-content .al-nowrap-col-2 td:nth-child(2) { white-space: nowrap; }
.al-content .al-nowrap-col-3 th:nth-child(3), .al-content .al-nowrap-col-3 td:nth-child(3) { white-space: nowrap; }
.al-content .al-nowrap-col-4 th:nth-child(4), .al-content .al-nowrap-col-4 td:nth-child(4) { white-space: nowrap; }
.al-content .al-nowrap-col-5 th:nth-child(5), .al-content .al-nowrap-col-5 td:nth-child(5) { white-space: nowrap; }
.al-content .al-nowrap-col-6 th:nth-child(6), .al-content .al-nowrap-col-6 td:nth-child(6) { white-space: nowrap; }
.al-content .al-nowrap-col-7 th:nth-child(7), .al-content .al-nowrap-col-7 td:nth-child(7) { white-space: nowrap; }
@media (min-width: 576px) {
  .al-content .al-nowrap-sm-col-1 th:nth-child(1), .al-content .al-nowrap-sm-col-1 td:nth-child(1) { white-space: nowrap; }
  .al-content .al-nowrap-sm-col-2 th:nth-child(2), .al-content .al-nowrap-sm-col-2 td:nth-child(2) { white-space: nowrap; }
  .al-content .al-nowrap-sm-col-3 th:nth-child(3), .al-content .al-nowrap-sm-col-3 td:nth-child(3) { white-space: nowrap; }
  .al-content .al-nowrap-sm-col-4 th:nth-child(4), .al-content .al-nowrap-sm-col-4 td:nth-child(4) { white-space: nowrap; }
  .al-content .al-nowrap-sm-col-5 th:nth-child(5), .al-content .al-nowrap-sm-col-5 td:nth-child(5) { white-space: nowrap; }
  .al-content .al-nowrap-sm-col-6 th:nth-child(6), .al-content .al-nowrap-sm-col-6 td:nth-child(6) { white-space: nowrap; }
  .al-content .al-nowrap-sm-col-7 th:nth-child(7), .al-content .al-nowrap-sm-col-7 td:nth-child(7) { white-space: nowrap; }
}
@media (min-width: 768px) {
  .al-content .al-nowrap-md-col-1 th:nth-child(1), .al-content .al-nowrap-md-col-1 td:nth-child(1) { white-space: nowrap; }
  .al-content .al-nowrap-md-col-2 th:nth-child(2), .al-content .al-nowrap-md-col-2 td:nth-child(2) { white-space: nowrap; }
  .al-content .al-nowrap-md-col-3 th:nth-child(3), .al-content .al-nowrap-md-col-3 td:nth-child(3) { white-space: nowrap; }
  .al-content .al-nowrap-md-col-4 th:nth-child(4), .al-content .al-nowrap-md-col-4 td:nth-child(4) { white-space: nowrap; }
  .al-content .al-nowrap-md-col-5 th:nth-child(5), .al-content .al-nowrap-md-col-5 td:nth-child(5) { white-space: nowrap; }
  .al-content .al-nowrap-md-col-6 th:nth-child(6), .al-content .al-nowrap-md-col-6 td:nth-child(6) { white-space: nowrap; }
  .al-content .al-nowrap-md-col-7 th:nth-child(7), .al-content .al-nowrap-md-col-7 td:nth-child(7) { white-space: nowrap; }
}
@media (min-width: 992px) {
  .al-content .al-nowrap-lg-col-1 th:nth-child(1), .al-content .al-nowrap-lg-col-1 td:nth-child(1) { white-space: nowrap; }
  .al-content .al-nowrap-lg-col-2 th:nth-child(2), .al-content .al-nowrap-lg-col-2 td:nth-child(2) { white-space: nowrap; }
  .al-content .al-nowrap-lg-col-3 th:nth-child(3), .al-content .al-nowrap-lg-col-3 td:nth-child(3) { white-space: nowrap; }
  .al-content .al-nowrap-lg-col-4 th:nth-child(4), .al-content .al-nowrap-lg-col-4 td:nth-child(4) { white-space: nowrap; }
  .al-content .al-nowrap-lg-col-5 th:nth-child(5), .al-content .al-nowrap-lg-col-5 td:nth-child(5) { white-space: nowrap; }
  .al-content .al-nowrap-lg-col-6 th:nth-child(6), .al-content .al-nowrap-lg-col-6 td:nth-child(6) { white-space: nowrap; }
  .al-content .al-nowrap-lg-col-7 th:nth-child(7), .al-content .al-nowrap-lg-col-7 td:nth-child(7) { white-space: nowrap; }
}
@media (min-width: 1200px) {
  .al-content .al-nowrap-xl-col-1 th:nth-child(1), .al-content .al-nowrap-xl-col-1 td:nth-child(1) { white-space: nowrap; }
  .al-content .al-nowrap-xl-col-2 th:nth-child(2), .al-content .al-nowrap-xl-col-2 td:nth-child(2) { white-space: nowrap; }
  .al-content .al-nowrap-xl-col-3 th:nth-child(3), .al-content .al-nowrap-xl-col-3 td:nth-child(3) { white-space: nowrap; }
  .al-content .al-nowrap-xl-col-4 th:nth-child(4), .al-content .al-nowrap-xl-col-4 td:nth-child(4) { white-space: nowrap; }
  .al-content .al-nowrap-xl-col-5 th:nth-child(5), .al-content .al-nowrap-xl-col-5 td:nth-child(5) { white-space: nowrap; }
  .al-content .al-nowrap-xl-col-6 th:nth-child(6), .al-content .al-nowrap-xl-col-6 td:nth-child(6) { white-space: nowrap; }
  .al-content .al-nowrap-xl-col-7 th:nth-child(7), .al-content .al-nowrap-xl-col-7 td:nth-child(7) { white-space: nowrap; }
}
@media (min-width: 1400px) {
  .al-content .al-nowrap-xxl-col-1 th:nth-child(1), .al-content .al-nowrap-xxl-col-1 td:nth-child(1) { white-space: nowrap; }
  .al-content .al-nowrap-xxl-col-2 th:nth-child(2), .al-content .al-nowrap-xxl-col-2 td:nth-child(2) { white-space: nowrap; }
  .al-content .al-nowrap-xxl-col-3 th:nth-child(3), .al-content .al-nowrap-xxl-col-3 td:nth-child(3) { white-space: nowrap; }
  .al-content .al-nowrap-xxl-col-4 th:nth-child(4), .al-content .al-nowrap-xxl-col-4 td:nth-child(4) { white-space: nowrap; }
  .al-content .al-nowrap-xxl-col-5 th:nth-child(5), .al-content .al-nowrap-xxl-col-5 td:nth-child(5) { white-space: nowrap; }
  .al-content .al-nowrap-xxl-col-6 th:nth-child(6), .al-content .al-nowrap-xxl-col-6 td:nth-child(6) { white-space: nowrap; }
  .al-content .al-nowrap-xxl-col-7 th:nth-child(7), .al-content .al-nowrap-xxl-col-7 td:nth-child(7) { white-space: nowrap; }
}

.al-content a { color: var(--t); text-decoration-color: rgba(55, 53, 47, 0.3); }

/* internal links: grey block highlight on hover (layout-neutral padding trick) */
.al-content a:not([class])[href^="/"] {
  border-radius: 3px;
  padding: 1px 4px;
  margin: -1px -4px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  transition: background 0.1s ease;
}
.al-content a:not([class])[href^="/"]:hover { background: var(--hover); }

/* external links: dark grey text, decoration matches the text */
.al-content a:not([class])[href^="http"] { color: var(--ext); text-decoration-color: currentcolor; }

.al-content strong { font-weight: 650; }
.al-content img { max-width: 100%; height: auto; border-radius: 4px; }

.al-figure { margin: 16px 0; text-align: center; }
.al-figure img { max-width: 100%; height: auto; border-radius: 4px; }
.al-figure figcaption { color: var(--gray); font-size: 14px; margin-top: 4px; }

.al-img { display: block; margin: 16px 0; }
.al-img-center { margin-left: auto; margin-right: auto; }
.al-img-right { margin-left: auto; }

.al-cover { margin: 0; }
.al-cover img {
  display: block;
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  object-position: center;
}

.al-missing { color: var(--gray); font-style: italic; }

.al-footer {
  border-top: 1px solid var(--line);
  margin: 24px auto;
  padding: 12px 14px;
  max-width: 1080px;
  font-size: 13px;
  color: var(--gray);
}
.al-footer a { color: var(--gray); text-decoration: underline; }
.al-footer p { margin: 6px 0; }

/* ---------------------------------------------------------------- callouts */
.al-callout {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border-radius: 8px;
  padding: 14px 16px;
  margin: 14px 0;
  border: 1px solid rgba(55, 53, 47, 0.13);
  background: rgba(55, 53, 47, 0.045);
}
.al-callout-icon {
  flex: 0 0 auto;
  line-height: 1.6;
}
.al-callout-body {
  flex: 1 1 auto;
  min-width: 0;
}
.al-callout-body > p { margin: 0; }
.al-callout-body > p + p, .al-callout-body > * + * { margin-top: 6px; }
.al-callout-body ul, .al-callout-body ol { margin: 8px 0 0; padding-left: 22px; }
.al-callout-blue { background: #e7f3f8; border-color: rgba(32, 105, 138, 0.2); }
.al-callout-gray, .al-callout-default { background: rgba(55, 53, 47, 0.045); }
.al-callout-teal { background: #e3f6ec; }
.al-callout-yellow { background: #fbf3db; }
.al-callout-green { background: #edf3ec; }
.al-callout-orange { background: #fbedda; }
.al-callout-purple { background: #f5eff7; }
.al-callout-pink { background: #f9eef2; }
.al-callout-red { background: #fdebec; }

/* ---------------------------------------------------------------- bookmark */
.al-bookmark {
  display: block;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0;
  margin: 12px 0;
  color: var(--t);
  overflow: hidden;
  transition: background 0.12s ease, box-shadow 0.12s ease;
}
/* .al-content prefix ties with the plain-external-link rule above (the
   bookmark anchor itself carries no class) so the card keeps color: inherit */
.al-content .al-bookmark a { display: flex; align-items: stretch; color: inherit; text-decoration: none; }
.al-bookmark:hover { background: var(--hover); box-shadow: 0 1px 4px rgba(15, 15, 15, 0.1); cursor: pointer; }
.al-bookmark .al-bm-body { display: block; flex: 1 1 auto; min-width: 0; padding: 12px 14px; }
.al-bookmark .al-bm-cover { display: none; position: relative; flex: 0 0 clamp(120px, 30%, 220px); background: var(--hover); }
.al-bookmark .al-bm-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 576px) {
  .al-bookmark .al-bm-cover { display: block; }
}
.al-bookmark .al-bm-title { display: block; font-size: 17px; font-weight: 500; line-height: 1.45; margin-bottom: 2px; }
.al-bookmark .al-bm-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--t);
  margin-bottom: 6px;
}
.al-bookmark .al-bm-url {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--gray);
  white-space: nowrap;
  overflow: hidden;
}
.al-bookmark .al-bm-icon { width: 16px; height: 16px; border-radius: 3px; flex: 0 0 auto; object-fit: contain; }

/* ---------------------------------------------------------------- file/toggle */
.al-file {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 8px 0;
  padding: 8px 12px;
  border-radius: 6px;
  background: #e3f6ec;
  color: var(--t);
  text-decoration: none;
  font-size: 15px;
}
.al-file:hover { background: #d5f0e4; }
.al-file-gray { background: rgba(55, 53, 47, 0.045); }
.al-file-gray:hover { background: rgba(55, 53, 47, 0.09); }
.al-file-blue { background: #e7f3f8; }
.al-file-blue:hover { background: #d3e9f2; }
.al-file-teal { background: #e3f6ec; }
.al-file-teal:hover { background: #d5f0e4; }
.al-file-yellow { background: #fbf3db; }
.al-file-yellow:hover { background: #f5e9c8; }
.al-file-green { background: #edf3ec; }
.al-file-green:hover { background: #dfe9de; }
.al-file-orange { background: #fbedda; }
.al-file-orange:hover { background: #f4e0bd; }
.al-file-purple { background: #f5eff7; }
.al-file-purple:hover { background: #ebe0ef; }
.al-file-pink { background: #f9eef2; }
.al-file-pink:hover { background: #f0dde6; }
.al-file-red { background: #fdebec; }
.al-file-red:hover { background: #f8d9dc; }
.al-file::before {
  content: "";
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  background: url("/assets/icons/file.svg") no-repeat center / contain;
}
.al-file-name { min-width: 0; word-break: break-word; }
.al-file-size { margin-left: auto; padding-left: 12px; color: var(--gray); font-size: 12px; white-space: nowrap; }

.al-toggle { margin: 12px 0; border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px; }
.al-toggle summary { cursor: pointer; font-weight: 600; padding: 8px 4px; }
.al-toggle[open] summary { border-bottom: 1px solid var(--line); }

.al-subpage { margin: 10px 0; }

/* ---------------------------------------------------------------- highlights */
.mark, .al-hl { border-radius: 3px; padding: 1px 4px; background: #fbf3db; }
.al-hl-yellow { background: #fbf3db; }
.al-hl-teal { background: #9fffb7; }
.al-hl-blue { background: #c9e4ff; }

/* ---------------------------------------------------------------- code */
.al-content :not(pre) > code {
  font-family: SFMono-Regular, Menlo, Consolas, "PT Mono", "Liberation Mono", Monaco, "Courier New", monospace;
  font-size: 85%;
  line-height: normal;
  color: #eb5757;
  background: rgba(135, 131, 120, 0.15);
  border-radius: 4px;
  padding: 0.2em 0.4em;
  word-break: break-word;
}
.al-content pre {
  background: #f7f6f3;
  border-radius: 4px;
  padding: 16px;
  overflow-x: auto;
}
.al-content pre code {
  background: none;
  color: inherit;
  padding: 0;
  border-radius: 0;
}

/* ---------------------------------------------------------------- responsive */

/* desktop restorations: everything above is the mobile default.
   Single md breakpoint, shared with the .al-nowrap-* table utilities.
   The top-bar search box restores in its own section below (it is
   declared after this block, so a rule here would lose the cascade). */
@media (min-width: 768px) {
  .al-topbar-inner { flex-wrap: nowrap; }
  .al-navtoggle { display: none; }
  .al-topnav {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    width: auto;
    padding: 0;
  }
  .al-toplink { padding: 6px 10px; font-size: 14px; }
  .al-content { margin: 40px auto 60px; padding: 0 24px; }
  .al-footer { margin: 40px auto 0; padding: 20px 24px; }
  .al-page-icon { font-size: 70px; }
  img.al-page-icon { width: 70px; height: 70px; }
  .al-icon-overlap { margin-top: -74px; }
}

/* ---------------------------------------------------------------- databases */
[x-cloak] { display: none !important; }

.al-db { margin: 16px 0; }
.al-db-shell { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.al-db-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap; padding: 8px 10px;
  border-bottom: 1px solid var(--line); background: rgba(55, 53, 47, 0.02);
}
.al-db-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.al-db-tab {
  border: none; background: transparent; color: var(--gray);
  font: inherit; font-size: 14px; padding: 4px 10px; border-radius: 5px;
  cursor: pointer;
}
.al-db-tab:hover { background: var(--hover); color: var(--t); }
.al-db-tab-active { background: var(--hover); color: var(--t); font-weight: 600; }
.al-db-search {
  font: inherit; font-size: 14px; color: var(--t);
  border: 1px solid var(--line); border-radius: 5px; padding: 4px 10px;
  min-width: 160px; background: var(--b); margin-left: auto;
}
.al-db-search:focus { outline: 2px solid var(--link); outline-offset: -1px; }
.al-db-scroll { overflow-x: auto; }
.al-db-shell .al-db-table { margin: 0; border: none; }
.al-db-shell .al-db-table th { cursor: pointer; user-select: none; white-space: nowrap; }
.al-db-shell .al-db-table td { word-break: break-word; }
.al-db-shell .al-db-table tbody tr:hover { background: var(--hover); }
.al-db-row-icon,
.al-link-icon {
  width: 1.1em;
  height: 1.1em;
  vertical-align: -0.15em;
  border-radius: 3px;
  object-fit: cover;
}
.al-link-ico { display: inline-block; margin-right: 0.25em; }
.al-db-ico-slot { display: inline-block; width: 1.1em; }
.al-db-has-icons td.al-db-noicon { padding-left: calc(10px + 1.35em); }
.al-db-title-wrap { display: inline-flex; align-items: baseline; gap: 0.25em; }
.al-db-title-wrap .al-db-row-icon { margin-bottom: -0.15em; }
.al-db-group > td {
  font-weight: 650; background: rgba(55, 53, 47, 0.05) !important;
}
.al-db-group > td { padding: 0; }
.al-db-group-toggle {
  display: flex; align-items: center; gap: 6px; width: 100%;
  padding: 6px 4px; border: 0; background: transparent;
  font: inherit; color: inherit; text-align: left; cursor: pointer;
}
.al-db-group-chevron { display: inline-block; font-size: 0.8em; transition: transform 0.15s ease; }
.al-db-group-chevron.al-db-open { transform: rotate(90deg); }
.al-db-group-count { color: var(--gray); font-size: 0.85em; font-weight: 400; }
.al-db-back-wrap { margin: 4px 0 12px; }
.al-db-back { font-size: 14px; }
.al-props { max-width: 720px; }
.al-content a.al-url { color: var(--t); }
.al-url-rest { color: rgba(55, 53, 47, 0.4); }
.al-props th {
  width: 180px; font-weight: 600; text-align: left; vertical-align: top;
  background: rgba(55, 53, 47, 0.03);
}

/* select option chips (Notion light palette) */
.al-chip {
  display: inline-block;
  font-size: 13px;
  line-height: 1.4;
  padding: 0 8px;
  border-radius: 4px;
  white-space: nowrap;
  color: #37352f;
  background: #f1f1ef;
}
.al-content td > .al-chip:first-child { margin-left: 0; }
.al-chip + .al-chip { margin-left: 4px; }
.al-chip-brown { color: #64473a; background: #f4eeee; }
.al-chip-orange { color: #694100; background: #faebdd; }
.al-chip-yellow { color: #57520e; background: #fbf3db; }
.al-chip-green { color: #448361; background: #edf3ec; }
.al-chip-blue { color: #337ea9; background: #e7f3f8; }
.al-chip-purple { color: #6940a5; background: #f6f3f9; }
.al-chip-pink { color: #ad1a72; background: #faf1f5; }
.al-chip-red { color: #c4554d; background: #fdebec; }
.al-db-table td.al-db-nowrap {
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* text-overflow on the cell truncates text but clips atomic inline-block
   chips silently; ellipsize long chips inside the pill instead */
.al-db-table td.al-db-nowrap .al-chip {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------------------------------------------------------------- search */
.al-search {
  position: relative;
  margin-left: auto;
  display: none;
  width: 100%;
  margin-top: 4px;
  padding: 0 0 4px;
}
.al-nav-open .al-search { display: block; }
.al-search[hidden] { display: none; }
.al-search-input {
  font: inherit; font-size: 14px; color: var(--t);
  border: 1px solid var(--line); border-radius: 6px; padding: 5px 10px;
  width: 100%; background: var(--b);
}
.al-search-input:focus { outline: 2px solid var(--link); outline-offset: -1px; }
.al-search-input::placeholder { color: var(--gray); }
.al-search-panel {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  width: auto; max-height: 65vh; overflow-y: auto;
  background: var(--b); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 10px 30px rgba(55, 53, 47, 0.15);
  padding: 4px; z-index: 200;
}
.al-search-panel[hidden] { display: none; }
/* desktop: the box leaves the collapsed menu and sits at the right of
   the top bar; these must come after the base rules above to win. */
@media (min-width: 768px) {
  .al-search { display: block; width: auto; margin-top: 0; padding: 0; }
  .al-search-input { width: 210px; }
  .al-search-panel { left: auto; width: 380px; }
}
.al-search-hint { color: var(--gray); font-size: 13px; padding: 8px 10px; }
.al-search-item {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 8px 10px; border-radius: 6px;
  color: var(--t); text-decoration: none;
}
.al-search-item:hover,
.al-search-item.al-search-active { background: var(--hover); }
.al-search-ico { flex: none; width: 20px; text-align: center; font-size: 15px; line-height: 1.5; }
img.al-search-ico-in {
  width: 16px; height: 16px; border-radius: 3px;
  object-fit: cover; vertical-align: -2px;
}
.al-search-item-main { min-width: 0; }
.al-search-item-title { font-size: 14px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.al-search-item-kind {
  display: inline-block; font-size: 12px; font-weight: 400;
  color: var(--gray); background: var(--hover);
  border-radius: 4px; padding: 0 6px; margin-left: 6px; vertical-align: 1px;
}
.al-search-item:hover .al-search-item-kind,
.al-search-item.al-search-active .al-search-item-kind { background: var(--active); }
.al-search-item-snippet {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13px; color: var(--gray); line-height: 1.45;
}
.al-search-item mark { background: rgba(255, 212, 0, 0.45); color: inherit; padding: 0 1px; border-radius: 2px; }

.al-searchpage { max-width: 720px; }
.al-searchpage[hidden] { display: none; }
.al-searchpage-input {
  font: inherit; font-size: 16px; color: var(--t);
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px;
  width: 100%; background: var(--b);
}
.al-searchpage-input:focus { outline: 2px solid var(--link); outline-offset: -1px; }
.al-searchpage-status { color: var(--gray); font-size: 14px; margin: 12px 2px 0; }
.al-searchpage-results { margin-top: 8px; }
.al-searchpage .al-search-item { padding: 10px 8px; }
.al-searchpage mark { background: rgba(255, 212, 0, 0.45); color: inherit; padding: 0 1px; border-radius: 2px; }
