.mineral-header { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.mineral-header > a:last-child { color: var(--green); font-size: 14px; }
.mineral-main { padding-block: 42px 30px; }
.mineral-title { margin-bottom: 28px; }
.mineral-title h1 { font: 700 clamp(30px, 4.5vw, 54px)/1.18 var(--display); margin-block: 10px; }
.mineral-title > p:not(.eyebrow) { color: var(--muted); }
.lookup-box { background: var(--surface); border: 1px solid var(--edge); border-radius: 6px; padding: 20px; min-width: 0; }
#search-form { display: grid; grid-template-columns: minmax(200px, 1fr) max-content max-content; align-items: end; gap: 12px; }
label { display: block; font-weight: 600; margin-bottom: 4px; }
input, select, textarea, button { font: inherit; color: var(--ink); }
input, select, textarea { width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid #a4b9ad; border-radius: 4px; background: #fff; }
button { min-height: 40px; padding: 6px 12px; border: 1px solid #a4b9ad; border-radius: 4px; background: transparent; cursor: pointer; }
button:hover { background: #eaf0e7; }
button:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #927139; outline-offset: 3px; }
.action { min-height: 44px; background: #1c5646; color: #fff; border-color: #1c5646; font-weight: 600; }
.action:hover { background: #184436; }
.detection-entry { display: inline-flex; align-items: center; margin-block: 10px; padding: 6px 13px; border-radius: 4px; }
.page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.page-actions .detection-entry { margin: 0; }
#copy:disabled { background: #e7eee5; color: var(--muted); border-color: #a4b9ad; cursor: not-allowed; }
.shortcuts { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.shortcuts button { min-height: 36px; font-size: 13px; }
.snapshot, .source-line { margin-top: 10px; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.lookup-status { margin-block: 16px 12px; font-weight: 600; }
.lookup-grid { display: grid; grid-template-columns: minmax(230px, 1fr) minmax(0, 2fr); align-items: start; gap: 16px; }
.lookup-box h2 { font-size: 21px; line-height: 1.35; }
#candidate-list { display: grid; gap: 7px; margin-top: 12px; max-height: min(62vh, 540px); overflow-y: auto; padding: 4px; }
.candidate { text-align: left; padding: 10px; }
.candidate[aria-pressed="true"] { background: #e4ede3; border-color: var(--green); box-shadow: inset 3px 0 var(--green); }
.candidate code, .candidate span { display: block; }
code { font-family: var(--mono); color: var(--green); font-weight: 600; }
.muted { color: var(--muted); }
.details { overflow-wrap: anywhere; }
.details h2 + p { margin-top: 6px; }
#conditions { min-width: 0; margin: 18px 0 0; padding: 10px 14px 14px; border: 1px solid var(--edge); border-radius: 4px; }
#conditions legend { font-weight: 600; padding-inline: 5px; }
#condition-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 185px), 1fr)); gap: 12px; }
.rule-group { margin-top: 20px; border-top: 1px solid var(--edge); padding-top: 14px; }
.rule-group h3 { font-size: 16px; margin-bottom: 8px; }
.rule { padding: 9px 0; border-bottom: 1px solid #e0e7df; }
.rule:last-child { border-bottom: 0; }
.rule > p, .rule > ol { margin: 5px 0; }
.rule ol { padding-left: 25px; }
.limit-profile h4 { margin: 0 0 6px; }
.limit-profile ul { margin: 8px 0; padding-left: 25px; }
.rule-state { display: inline-block; margin-left: 8px; color: #69431e; font-size: 13px; font-weight: 600; }
.rule-state[data-state="matched"] { color: var(--green); }
.rule-state[data-state="excluded"] { color: var(--muted); }
.details a, .mineral-footer a { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.details .detection-entry { color: #fff; text-decoration: none; }
#copy-status, #copy-text { margin-top: 8px; }
#copy-status { font-size: 13px; }
.mineral-footer { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 24px; font-size: 14px; }
@media (max-width: 720px) {
  .mineral-main { padding-top: 25px; }
  .lookup-grid { grid-template-columns: minmax(0, 1fr); }
  .lookup-box { padding: 14px; }
  #search-form { grid-template-columns: minmax(0, 1fr) max-content; }
  .search-field { grid-column: 1 / -1; }
}
