/* v155: 收口资料库的编辑型层级，减少卡片感，让原始资料更容易回查。 */
::selection { color: #fffaf2; background: var(--accent); }

button:focus-visible,
[tabindex="0"]:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent-soft);
  outline-offset: 4px;
}

.library-command-title h1,
.section-heading h2,
.utility-intro h1,
.library-detail-title,
.detail-title { text-wrap: balance; }

#library .library-command::after {
  content: "FIELD NOTES  /  AROMA ARCHIVE";
  letter-spacing: .14em;
}

#library .library-quick-search button {
  padding: 7px 0 5px;
  border: 0;
  border-bottom: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  transition: color .18s ease, border-color .18s ease;
}
#library .library-quick-search button:hover,
#library .library-quick-search button:focus-visible {
  border-bottom-color: var(--accent-soft);
}

#library .library-heading > span {
  max-width: 300px;
  white-space: normal;
  line-height: 1.45;
  text-align: right;
}

#library .library-row {
  position: relative;
  isolation: isolate;
}
#library .library-row::before {
  content: "";
  position: absolute;
  inset: 16px auto 16px 0;
  z-index: -1;
  width: 3px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: center;
  transition: transform .2s ease;
}
#library .library-row:hover::before,
#library .library-row:focus-visible::before { transform: scaleY(1); }
#library .library-row:focus-visible { outline-offset: -4px; }
#library .library-type { font-size: 10px; letter-spacing: .08em; }
#library .library-title b { font-weight: 600; line-height: 1.28; }
#library .library-title small { line-height: 1.55; }
#library .library-meta { line-height: 1.55; }
#library .essential-row-facts dd,
#library .carrier-row-facts dd { line-height: 1.62; }

.intro { background: #efede5; }
.intro::after {
  content: "";
  position: absolute;
  inset: 0 0 0 57%;
  z-index: 0;
  background: #dfe5d8;
  clip-path: polygon(11% 0, 100% 0, 100% 100%, 0 100%);
  pointer-events: none;
}
.intro-copy,
.botanical { z-index: 1; }
.botanical span { color: var(--accent); }
.botanical small { color: #65756c; }

.oil-library { background: #fcfbf7; }
.category-rail { background: #f0f1eb; }
.category-button { transition: color .18s ease, border-color .18s ease, padding-left .18s ease; }
.category-button:hover,
.category-button:focus-visible { padding-left: 5px; color: var(--accent); }
.category-button.is-active { padding-left: 5px; }
.oil-row { isolation: isolate; }
.oil-row::after {
  content: "";
  position: absolute;
  inset: 14px auto 14px 0;
  z-index: -1;
  width: 2px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: center;
  transition: transform .2s ease;
}
.oil-row:hover::after,
.oil-row:focus-visible::after { transform: scaleY(1); }
.oil-row:focus-visible { outline: 2px solid var(--accent-soft); outline-offset: -4px; }
.oil-name b { font-weight: 600; }
.oil-tags span {
  padding: 4px 7px;
  border: 1px solid rgba(25, 52, 43, .10);
  border-radius: 3px;
  background: #f0eee5;
}
.oil-tags .flag { border-color: rgba(179, 95, 67, .18); }
.oil-row-open { color: var(--accent); transition: transform .18s ease, color .18s ease; }
.oil-row:hover .oil-row-open,
.oil-row:focus-visible .oil-row-open { transform: translate(2px, -2px); }

.book-evidence-details[open],
.original-note-details[open] { border-top-color: var(--accent); }
.book-evidence-details[open] > summary,
.original-note-details[open] > summary { background: rgba(179, 95, 67, .035); }
.book-evidence-content .topic-map-lead { margin-bottom: 22px; }
.structured-group[open] > summary,
.structured-sources[open] > summary { color: var(--accent); }
.topic-passage-detail[open] {
  margin-inline: -12px;
  padding-inline: 12px;
  border-left: 2px solid var(--accent-soft);
  background: #f4f1e9;
}
.topic-passage-full { padding: 0 0 16px; font-size: 12px; }
.topic-passage-full p { white-space: pre-wrap; }
.structured-note { max-width: 72ch; }
.original-note-content { background: rgba(244, 241, 233, .44); }
.original-note-content .markdown-body { padding: 0 2px; }

.usage-task-nav button { border-top: 2px solid transparent; }
.usage-task-nav button:hover,
.usage-task-nav button:focus-visible { border-top-color: var(--accent); }
.recipe-library .book-recipe-row:hover { box-shadow: inset 3px 0 var(--accent); }
.calculator-result { border-left: 3px solid var(--accent-soft); }

@media (max-width: 680px) {
  .intro { background: #efede5; }
  .intro::after { display: none; }
  .category-button:hover,
  .category-button:focus-visible,
  .category-button.is-active { padding-left: 0; }
  #library .library-heading { display: block; }
  #library .library-heading > span {
    display: block;
    max-width: 100%;
    margin-top: 8px;
    text-align: left;
  }
  #library .library-row::before { inset: 12px auto 12px 0; }
  .topic-passage-detail[open] { margin-inline: -8px; padding-inline: 8px; }
  .topic-passage-full { font-size: 11.5px; line-height: 1.8; }
}
