/* Mobile-first pharmacist work surface. Existing green brand retained. */
[hidden] { display: none !important; }
html { scroll-padding-top: 120px; }
body { padding-bottom: calc(86px + env(safe-area-inset-bottom)); font-size: 16px; }
button, input, select, textarea { font: inherit; }
button, .btn, summary { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #0d7d6e; outline-offset: 3px; }
.site-head { padding: 14px 0; background: #075c55; }
.site-head h1 { font-size: 1.45rem; }
.subtitle { margin: 2px 0 6px; font-size: .875rem; }
.source-dates summary { font-size: .8125rem; color: #e0f7f2; cursor: pointer; padding: 5px 0; }
.source-dates .badges { margin-top: 6px; }
.badge { font-size: .75rem; }
main.wrap { display: flex; flex-direction: column; }
.search-box { order: 0; position: sticky; top: 0; z-index: 10; padding: 12px 0 8px; margin: 0; background: var(--bg); }
.search-input-row { display: flex; gap: 8px; align-items: center; }
#q { font-size: 1rem; min-height: 50px; padding: 12px; min-width: 0; }
#search-clear { min-width: 44px; min-height: 48px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 1.4rem; }
.search-options summary { padding: 8px 2px; font-size: .875rem; cursor: pointer; }
.filters { gap: 6px 12px; }
.filters label { display: flex; align-items: center; min-height: 40px; font-size: .875rem; gap: 4px; }
input[type=checkbox] { width: 20px; height: 20px; accent-color: #0d7d6e; }
.workbench { order: 1; margin: 2px 0 12px; padding: 10px; background: #fff; }
.workbench-head > div:first-child { display: none; }
.workbench-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.tool-btn { min-height: 44px; font-size: .875rem; }
#quick { order: 2; }
#status { order: 3; font-size: .875rem; }
#results { order: 4; }
.card { padding: 14px; gap: 12px; border-radius: 12px; }
.brand { font-size: 1.0625rem; line-height: 1.5; }
.type { font-size: .75rem; }
.gen-row { flex-wrap: wrap; }
.generic-link, .copy-btn { min-height: 40px; font-size: .875rem; }
.card-docs, .professional-info { margin: 8px 0; }
.card-docs > summary, .professional-info > summary { min-height: 44px; padding: 8px 0; font-size: .875rem; cursor: pointer; }
.card-docs pre, .t-sec pre, .pi-body p { font-size: .9375rem; line-height: 1.7; overflow-wrap: anywhere; }
.t-src, .meta, .meta .m, .missing-data { font-size: .8125rem; }
.supply-status { font-size: .875rem; }
.supply-status small, .supply-status footer { font-size: .75rem; }
.card-actions { min-width: 190px; gap: 8px; }
.card-actions .btn, .fav { min-height: 44px; font-size: .875rem; white-space: normal; }
.more-actions > summary { padding: 9px 4px; font-size: .875rem; cursor: pointer; }
.more-actions > div { display: grid; gap: 8px; padding-top: 8px; }
.more-actions a { text-decoration: none; text-align: center; }
.di-dialog { width: min(960px,calc(100vw - 24px)); max-height: 90dvh; border-radius: 14px; }
.tool-dialog .di-body { max-height: calc(90dvh - 78px); overflow-y: auto; overscroll-behavior: contain; }
.di-close { flex-shrink: 0; width: 44px; height: 44px; }
.di-head { align-items: center; padding: 12px 14px; }
.di-head h2 { font-size: 1.05rem; }
.di-body { padding: 14px; }
.di-body .btn { min-height: 44px; font-size: .875rem; white-space: normal; }
.di-body input:not([type=checkbox]):not([type=file]), .di-body select, .di-body textarea { font-size: 16px; min-height: 44px; }
.calc-grid label span, .di-purpose span, .di-warning, .tool-help { font-size: .875rem; }
.calc-result, .calc-result small { font-size: .9375rem; }
.di-preview { font-size: .9375rem; max-height: 55dvh; user-select: text; }
.selected-drug { display: flex; gap: 10px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding: 10px 0; }
.selected-drug small { display: block; font-size: .75rem; }
.selected-drug .btn { flex-shrink: 0; }
.comparison-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; margin: 10px 0; }
.comparison-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.comparison-table th, .comparison-table td { min-width: 240px; padding: 12px; text-align: left; vertical-align: top; border: 1px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere; }
.comparison-table th { background: #edf6f3; color: #164e44; }
.comparison-table th:first-child { min-width: 100px; max-width: 130px; position: sticky; left: 0; z-index: 1; }
.compare-scroll-hint { font-size: .8125rem; color: var(--sub); }
.candidate-option { min-height: 44px; display: flex; align-items: center; gap: 8px; }
.compare-candidate { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.compare-candidate span, .compare-candidate small { display: block; font-size: .8125rem; }
.compare-candidate button { flex-shrink: 0; }
.file-button { position: relative; display: inline-flex; align-items: center; cursor: pointer; }
.file-button input { position: absolute; opacity: 0; inset: 0; width: 100%; cursor: pointer; }
.file-button:focus-within { outline: 3px solid var(--accent); }
#cart-list .mini, #cart .link-btn { min-height: 44px; font-size: .875rem; }
.cf-snip { font-size: .9375rem; line-height: 1.7; max-height: none; }
.cf-note, .cf-neutral, .cf-item { font-size: .875rem; }
.cf-scope { font-size: .8125rem; color: #33504b; margin: 0 0 6px; }
.cf-neutral b:first-child { display: block; }
.cf-head small { display: block; font-weight: 400; font-size: .8125rem; margin-top: 2px; }
.cf-entry { border-top: 1px dashed #e5c9b0; padding-top: 6px; margin-top: 6px; }
.cf-basis { margin: 0 0 2px; font-weight: 650; }
.cf-source { margin: 0 0 4px; font-size: .8125rem; color: #33504b; }
.supply-status .stale-age { display: block; font-weight: 700; color: #9a3412; }
.data-stale-banner { background: #fff7ed; border: 1px solid #fdba74; color: #7c2d12; border-radius: 8px; padding: 8px 10px; margin: 8px 0; font-size: .875rem; }
.legacy-badge { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 6px; background: #f1f5f9; color: #334155; font-size: .75rem; }
.retry-btn { margin-top: 6px; }
.mobile-nav { position: fixed; z-index: 30; bottom: 0; left: 0; right: 0; display: flex; justify-content: center; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); background: #fff; box-shadow: 0 -2px 12px #123c3614; border-top: 1px solid #cfe8e2; }
.mobile-nav button { flex: 1; max-width: 160px; min-height: 48px; border: 0; background: #fff; color: #075c55; font-size: .875rem; font-weight: 650; border-radius: 8px; }
.mobile-nav button:hover { background: #edf6f3; }
.mobile-nav span { background: #edf6f3; border-radius: 12px; padding: 1px 6px; }
.toast { bottom: calc(86px + env(safe-area-inset-bottom)); white-space: normal; width: max-content; }
.version-notice { position: fixed; top: 8px; left: 8px; right: 8px; z-index: 40; padding: 10px; border: 1px solid #0d7d6e; border-radius: 10px; background: #fff; box-shadow: 0 3px 20px #0002; font-size: .875rem; }
.version-notice button { min-height: 44px; padding: 4px 12px; border-radius: 7px; background: #0d7d6e; color: #fff; border: 0; }
.connection-notice { position: sticky; bottom: 72px; margin: 8px 12px; background: #fff7ed; color: #9a3412; border: 1px solid #fdba74; padding: 10px; z-index: 20; font-size: .875rem; }
.site-foot .disclaimer { font-size: .8125rem; }
@media (max-width: 600px) {
  .wrap { padding: 0 12px; }
  .workbench-actions { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .tool-btn { width: 100%; padding: 8px; }
  #compare-open, #cart-open, #formulary-open { display: none; }
  .card-main { flex-basis: 100%; }
  .card-actions { width: 100%; min-width: 0; display: grid; grid-template-columns: 1fr 1fr; }
  .card-actions .fav { grid-column: 1; }
  .card-actions .primary { grid-column: 2; grid-row: 1; }
  .card-actions .more-actions { min-width: 0; }
  .card-actions .more-actions summary { min-height: 44px; }
  .di-dialog { width: calc(100vw - 12px); max-height: 94dvh; }
  .tool-dialog .di-body { max-height: calc(94dvh - 78px); }
  .di-actions { display: grid; grid-template-columns: 1fr; }
  .calc-grid { grid-template-columns: 1fr 1fr; }
  .comparison-table th, .comparison-table td { min-width: 210px; }
  .comparison-table th:first-child { min-width: 82px; max-width: 100px; }
  .di-drug { overflow-wrap: anywhere; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }

/* Short introduction and deliberate, device-native sharing. */
.value-copy { margin: 8px 0; font-size: clamp(1.05rem, 2.5vw, 1.4rem); line-height: 1.6; font-weight: 650; }
.intro-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.intro-actions span { font-size: .8125rem; color: #d6f5ec; }
.intro-actions button { background: #fff; color: #075c55; border: 1px solid #fff; }
.first-guide { order: 1; margin: 0 0 14px; border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; background: #fff; font-size: .875rem; line-height: 1.8; }
.first-guide summary { padding: 12px 0; min-height: 44px; cursor: pointer; font-weight: 600; }
.first-guide ol { padding-left: 22px; }
.first-guide p { color: #475569; }
.try-search { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.share-label { display: block; margin-bottom: 6px; }
#share-url { width: 100%; box-sizing: border-box; padding: 12px; border: 1px solid #94a3b8; border-radius: 8px; }
#share-description { overflow-wrap: anywhere; }
#share-status { min-height: 1.5em; }
@media(min-width:700px) { .small-break { display: none; } }

.comparison-different th,.comparison-different td { background:#fff8e6; }
.difference-label { display:block; font-size:.75rem; color:#754700; margin-top:4px; }

.favorites-supply-item { border:1px solid var(--line); border-radius:12px; padding:14px; margin:12px 0; overflow-wrap:anywhere; background:#fff; }
.favorites-supply-item h3 { margin:0 0 6px; font-size:1.05rem; line-height:1.5; }
.favorites-supply-item > p { margin:6px 0; font-size:.875rem; color:#475569; }
.favorites-supply-item > .btn { min-height:44px; width:100%; margin-top:8px; }
