/* Document Extract Studio — Apache Tika */

.tika-root {
  --tika-accent: #0f6e56;
  --tika-accent-2: #147d64;
  --tika-warn: #9a6700;
  --tika-err: #b42318;
  --tika-surface: color-mix(in srgb, var(--surface, #fff) 92%, #0f6e56 8%);
  container-type: inline-size;
  container-name: tika-app;
}

.tika-page {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 4px 2px 24px;
}

.tika-health {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--tika-surface);
  border: 1px solid color-mix(in srgb, var(--tika-accent) 25%, transparent);
}

.tika-health-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
}

.tika-health-text strong { font-size: 13px; }

.tika-status {
  font-size: 13px;
  opacity: 0.85;
}

.tika-muted {
  font-size: 12px;
  opacity: 0.72;
  line-height: 1.45;
}

.tika-error, .tika-warn {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.4;
}

.tika-error {
  background: color-mix(in srgb, var(--tika-err) 12%, transparent);
  color: var(--tika-err);
}

.tika-warn {
  background: color-mix(in srgb, var(--tika-warn) 14%, transparent);
  color: var(--tika-warn);
}

.tika-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 180px;
  padding: 28px 20px;
  border: 1.5px dashed color-mix(in srgb, var(--tika-accent) 45%, var(--border, #ccc));
  border-radius: 12px;
  background: color-mix(in srgb, var(--tika-accent) 6%, transparent);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
}

.tika-drop:hover, .tika-drop.over {
  border-color: var(--tika-accent);
  background: color-mix(in srgb, var(--tika-accent) 12%, transparent);
}

.tika-drop-icon { font-size: 28px; line-height: 1; }
.tika-drop-title { font-weight: 650; font-size: 15px; }
.tika-drop-sub { max-width: 420px; font-size: 12px; opacity: 0.7; }
.tika-drop-cta { font-size: 12px; color: var(--tika-accent); font-weight: 600; margin-top: 4px; }

.tika-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.tika-feature-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tika-feature {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border, rgba(0,0,0,0.08));
  cursor: pointer;
}

.tika-feature:hover {
  background: color-mix(in srgb, var(--tika-accent) 6%, transparent);
}

.tika-feature input { margin-top: 3px; }
.tika-feature strong { font-size: 13px; display: block; margin-bottom: 2px; }

.tika-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.tika-tab {
  border: 1px solid var(--border, rgba(0,0,0,0.12));
  background: transparent;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  cursor: pointer;
  color: inherit;
}

.tika-tab.active {
  background: var(--tika-accent);
  border-color: var(--tika-accent);
  color: #fff;
  font-weight: 600;
}

.tika-pre {
  margin: 0;
  padding: 12px;
  max-height: 420px;
  overflow: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-2, #f4f4f5) 90%, #0f6e56 10%);
}

.tika-code { max-height: none; }

.tika-table-wrap {
  max-height: 420px;
  overflow: auto;
  border-radius: 8px;
  border: 1px solid var(--border, rgba(0,0,0,0.08));
}

.tika-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.tika-table th, .tika-table td {
  text-align: left;
  padding: 7px 10px;
  border-bottom: 1px solid var(--border, rgba(0,0,0,0.06));
  vertical-align: top;
}

.tika-table th {
  width: 38%;
  font-weight: 600;
  background: color-mix(in srgb, var(--tika-accent) 8%, transparent);
}

.tika-detect {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.tika-detect-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  border-radius: 10px;
  border: 1px solid var(--border, rgba(0,0,0,0.08));
}

.tika-result-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--tika-surface);
}

.tika-kv {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border, rgba(0,0,0,0.06));
}

.tika-kv span { opacity: 0.7; }
.tika-kv strong { text-align: right; font-weight: 600; word-break: break-word; }

.tika-history {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tika-history-item {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border, rgba(0,0,0,0.08));
}

.tika-tips {
  margin: 0;
  padding-left: 18px;
  font-size: 12px;
  line-height: 1.5;
}

.tika-h3 {
  margin: 12px 0 6px;
  font-size: 13px;
}

.tika-link {
  display: block;
  font-size: 12px;
  color: var(--tika-accent);
  margin-bottom: 8px;
}

.tika-file-meta { display: flex; flex-direction: column; gap: 4px; }

/* Hub grid */
.tika-hub-root { --tika-accent: #0f6e56; }

.tika-hub-group { margin-bottom: 20px; }
.tika-hub-group-title {
  font-size: 12px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.65;
  margin: 0 0 10px;
}

.tika-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 10px;
}

.tika-hub-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--border, rgba(0,0,0,0.1));
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface, #fff) 95%, var(--tika-accent) 5%);
  cursor: pointer;
  text-align: left;
  color: inherit;
  transition: border-color 0.15s, transform 0.1s;
}

.tika-hub-card:hover {
  border-color: var(--tika-accent);
  transform: translateY(-1px);
}

.tika-hub-card-top {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
}

.tika-hub-icon { font-size: 22px; line-height: 1; }
.tika-hub-name { font-size: 13px; font-weight: 600; }
.tika-hub-status {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 999px;
}
.tika-hub-status--online { background: #d1fae5; color: #065f46; }
.tika-hub-status--offline { background: #fee2e2; color: #991b1b; }
.tika-hub-status--optional { background: #fef3c7; color: #92400e; }
.tika-hub-status--demo { background: #e0e7ff; color: #3730a3; }
.tika-hub-gpl {
  font-size: 9px;
  font-weight: 700;
  color: #92400e;
  background: #fef3c7;
  padding: 1px 5px;
  border-radius: 4px;
}

.tika-subapp-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.tika-back {
  border: none;
  background: transparent;
  color: var(--tika-accent);
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
}
.tika-subapp-title { margin: 0; font-size: 18px; }
.tika-health-chip-inline { display: flex; align-items: center; gap: 6px; margin-left: auto; font-size: 12px; }
.tika-drop-sm { min-height: 100px; padding: 16px; }
.tika-code-inline { font-family: ui-monospace, monospace; font-size: 11px; }

.tika-io-example {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tika-io-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.tika-io-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.65;
}
.tika-io-arrow {
  font-size: 18px;
  opacity: 0.45;
  padding-left: 2px;
}
.tika-pre-preview {
  max-height: 220px;
  overflow: auto;
  margin-top: 8px;
}

.osp-field-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid color-mix(in srgb, currentColor 12%, transparent);
}
.osp-field-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid color-mix(in srgb, currentColor 18%, transparent);
  background: transparent;
  color: inherit;
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  opacity: 0.78;
}
.osp-field-tab:hover { opacity: 1; }
.osp-field-tab.active {
  opacity: 1;
  background: color-mix(in srgb, var(--tika-accent, #2563eb) 14%, transparent);
  border-color: color-mix(in srgb, var(--tika-accent, #2563eb) 45%, transparent);
  color: var(--tika-accent, #2563eb);
}
.osp-field-count {
  font-size: 10px;
  font-weight: 700;
  opacity: 0.65;
  min-width: 1.2em;
  text-align: center;
}
.osp-field-intro {
  margin: 4px 0 12px;
}
.osp-field-intro .tika-hub-group-title { margin-bottom: 2px; }
.tika-hub-status--planned {
  color: #64748b;
  background: color-mix(in srgb, #64748b 12%, transparent);
}
.tika-pipeline-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.tika-install-bar {
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  background: color-mix(in srgb, #f59e0b 14%, transparent);
  color: #92400e;
}

.tika-compare-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 4px;
}

.tika-compare-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  cursor: pointer;
}

.tika-cmp-live { background: color-mix(in srgb, #10b981 8%, transparent); }
.tika-table tbody tr { cursor: pointer; }
.tika-table tbody tr:hover { background: color-mix(in srgb, var(--tika-accent) 8%, transparent); }

@media (max-width: 720px) {
  .tika-pipeline-stats { grid-template-columns: 1fr 1fr; }
  .tika-hub-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Far-right compact function search. Keep the popover unclipped by the
   studio toolbar; pointer-events:auto so a leftover context-gate class on
   .app does not swallow clicks after the overlay is gone. */
.tika-root .st-toolbar {
  overflow: visible;
  position: relative;
  z-index: 20;
  flex-wrap: nowrap;
}
/* ---- Function / concept search (toolbar top-right) ---- */
.tika-root .osp-fnsearch {
  position: relative;
  z-index: 40;
  flex: none;
  flex-shrink: 0;
  align-self: center;
  margin-left: auto;
  pointer-events: auto;
}
.tika-root .osp-fnsearch-field {
  display: flex; align-items: center; gap: 6px;
  height: 22px; width: var(--osp-fn-field-w, 178px); padding: 0 10px 0 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--st-ink, #1f2733) 7%, transparent);
  border: 1px solid color-mix(in srgb, var(--st-ink, #1f2733) 16%, transparent);
  color: var(--st-ink, #1f2733);
  box-sizing: border-box;
  cursor: text;
  transition: background .14s ease, border-color .14s ease, box-shadow .14s ease, width .18s ease, color .14s ease;
}
.tika-root .osp-fnsearch-field:hover {
  background: color-mix(in srgb, var(--st-ink, #1f2733) 11%, transparent);
  border-color: color-mix(in srgb, var(--tika-accent, #0f6e56) 40%, transparent);
}
.tika-root .osp-fnsearch.open .osp-fnsearch-field,
.tika-root .osp-fnsearch-field.on,
.tika-root .osp-fnsearch-field:focus-within {
  background: #fff;
  border-color: var(--tika-accent, #0f6e56);
  color: #1f2733;
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--tika-accent, #0f6e56) 32%, transparent),
    0 8px 22px color-mix(in srgb, #1f2733 12%, transparent);
}
.tika-root .osp-fnsearch-input::placeholder {
  color: color-mix(in srgb, var(--st-ink, #1f2733) 48%, transparent); font-weight: 500;
}
.tika-root .osp-fnsearch.open .osp-fnsearch-input::placeholder,
.tika-root .osp-fnsearch-field.on .osp-fnsearch-input::placeholder,
.tika-root .osp-fnsearch-field:focus-within .osp-fnsearch-input::placeholder {
  color: #6c7686;
}

.tika-root .osp-fnsearch-ic {
  display: inline-flex; align-items: center; justify-content: center;
  color: inherit; opacity: .92; flex: none;
}
.tika-root .osp-fnsearch-ic svg {
  width: 14px; height: 14px; display: block; overflow: visible; stroke-width: 2;
}
.tika-root .osp-fnsearch-input {
  flex: 1; min-width: 0; height: 100%;
  border: 0; background: transparent; color: inherit;
  font: inherit; font-size: 12px; font-weight: 500; outline: none;
  padding: 0; line-height: 1;
}
.tika-root .osp-fnsearch-input::-webkit-search-decoration,
.tika-root .osp-fnsearch-input::-webkit-search-cancel-button { display: none; }

.tika-root .osp-fnsearch-pop {
  --fn-pop-bg: #ffffff;
  --fn-pop-ink: #1f2733;
  --fn-pop-muted: #5c6573;
  --fn-pop-line: #d7dce6;
  --fn-pop-accent: #0f6e56;
  --fn-pop-shadow: 0 22px 56px rgba(16, 32, 72, .28), 0 2px 8px rgba(16, 32, 72, .08);
  display: flex;
  position: absolute; top: calc(100% + 7px); right: 0;
  width: min(540px, calc(100cqi - 24px));
  max-width: min(540px, calc(100cqi - 24px));
  max-height: min(420px, 72vh);
  isolation: isolate;
  color-scheme: light;
  background-color: #ffffff;
  background-image: linear-gradient(180deg, color-mix(in srgb, var(--fn-pop-accent) 9%, transparent), transparent 2.4rem);
  color: var(--fn-pop-ink);
  border: 1px solid var(--fn-pop-line);
  border-radius: 14px;
  box-shadow: var(--fn-pop-shadow);
  z-index: 60;
  overflow: hidden;
  flex-direction: column;
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateY(-6px) scale(.985);
  transform-origin: top right;
  transition: opacity .14s ease, transform .16s ease, visibility 0s linear .16s;
}
.tika-root .osp-fnsearch-pop.on {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: translateY(0) scale(1);
  transition: opacity .14s ease, transform .16s ease, visibility 0s;
}
.tika-root .osp-fnsearch-pop.is-empty {
  width: min(340px, calc(100cqi - 24px));
  max-width: min(340px, calc(100cqi - 24px));
  background-image: none;
  background-color: var(--fn-pop-bg);
}
.tika-root .osp-fnsearch-head {
  display: flex; align-items: baseline; gap: 8px; flex: none;
  padding: 10px 14px 8px;
  border-bottom: 1px solid color-mix(in srgb, var(--fn-pop-line) 85%, transparent);
  background: transparent;
}
.tika-root .osp-fnsearch-title {
  font-size: 10.5px; font-weight: 800; letter-spacing: .72px;
  text-transform: uppercase; color: var(--fn-pop-muted);
}
.tika-root .osp-fnsearch-count {
  margin-left: auto; font-size: 11px; color: var(--fn-pop-muted);
  font-variant-numeric: tabular-nums; font-weight: 600;
}
.tika-root .osp-fnsearch-pop.is-suggest .osp-fnsearch-count { display: none; }
.tika-root .osp-fnsearch-list {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px 6px;
  padding: 8px; overflow: auto; min-height: 0; flex: 1 1 auto;
  background: transparent;
  scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--fn-pop-muted) 45%, transparent) transparent;
}
.tika-root .osp-fnsearch-list::-webkit-scrollbar { width: 8px; height: 8px; }
.tika-root .osp-fnsearch-list::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--fn-pop-muted) 40%, transparent);
  border-radius: 99px; border: 2px solid transparent; background-clip: padding-box;
}
.tika-root .osp-fnsearch-list.cols-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.tika-root .osp-fnsearch-pop.is-empty .osp-fnsearch-list {
  grid-template-columns: minmax(0, 1fr);
  min-height: 168px;
}
.tika-root .osp-fnsearch-item {
  display: flex; align-items: center; gap: 8px;
  width: 100%; min-width: 0; text-align: left;
  border: 1px solid transparent; background: transparent;
  color: var(--fn-pop-ink); border-radius: 10px;
  padding: 6px 8px; cursor: pointer; min-height: 40px;
  box-sizing: border-box; overflow: hidden;
  transition: background .08s ease, border-color .08s ease, color .08s ease, box-shadow .08s ease;
}
.tika-root .osp-fnsearch-item:hover {
  background: color-mix(in srgb, var(--fn-pop-accent) 8%, transparent);
  border-color: color-mix(in srgb, var(--fn-pop-accent) 18%, transparent);
}
.tika-root .osp-fnsearch-item.is-active,
.tika-root .osp-fnsearch-item:hover.is-active {
  background: var(--fn-pop-accent);
  border-color: var(--fn-pop-accent);
  color: #fff;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--fn-pop-accent) 38%, transparent);
}
.tika-root .osp-fnsearch-item-ic {
  flex: none; width: 28px; height: 28px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--fn-pop-accent) 12%, transparent);
  color: var(--fn-pop-accent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--fn-pop-accent) 14%, transparent);
}
.tika-root .osp-fnsearch-item:hover:not(.is-active) .osp-fnsearch-item-ic {
  background: color-mix(in srgb, var(--fn-pop-accent) 18%, transparent);
}
.tika-root .osp-fnsearch-item.is-active .osp-fnsearch-item-ic {
  background: rgba(255,255,255,.18); color: #fff; box-shadow: none;
}
.tika-root .osp-fnsearch-item-ic svg { width: 15px; height: 15px; display: block; overflow: visible; }
.tika-root .osp-fnsearch-item-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.tika-root .osp-fnsearch-item-name {
  font-size: 12.5px; font-weight: 600; line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tika-root .osp-fnsearch-item-hint {
  font-size: 10.5px; color: var(--fn-pop-muted); line-height: 1.25;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tika-root .osp-fnsearch-item.is-active .osp-fnsearch-item-hint { color: rgba(255,255,255,.82); }
.tika-root .osp-fnsearch-empty {
  grid-column: 1 / -1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  gap: 8px; padding: 32px 28px 28px; color: var(--fn-pop-muted);
  min-height: 168px; background: transparent;
}
.tika-root .osp-fnsearch-empty-ic {
  width: 40px; height: 40px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--fn-pop-accent);
  background: color-mix(in srgb, var(--fn-pop-accent) 12%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--fn-pop-accent) 16%, transparent);
}
.tika-root .osp-fnsearch-empty-ic svg { width: 18px; height: 18px; overflow: visible; }
.tika-root .osp-fnsearch-empty strong {
  color: var(--fn-pop-ink); font-size: 13px; font-weight: 700;
  max-width: 100%; overflow-wrap: anywhere;
}
.tika-root .osp-fnsearch-empty p {
  margin: 0; font-size: 12px; line-height: 1.45; max-width: 320px; color: var(--fn-pop-muted);
}
.tika-root .osp-fnsearch-foot {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; flex: none;
  padding: 7px 12px 8px;
  border-top: 1px solid var(--fn-pop-line);
  background: color-mix(in srgb, var(--fn-pop-ink) 2.5%, var(--fn-pop-bg));
  font-size: 10.5px; color: var(--fn-pop-muted);
}
.tika-root .osp-fnsearch-k { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.tika-root .osp-fnsearch-k kbd {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 16px; padding: 0 5px;
  border-radius: 4px; font: 600 10px/1 ui-sans-serif, system-ui, sans-serif;
  color: var(--fn-pop-ink);
  background: color-mix(in srgb, var(--fn-pop-ink) 6%, var(--fn-pop-bg));
  box-shadow: inset 0 0 0 1px var(--fn-pop-line);
}
.tika-root .osp-fnsearch-pop:not(.cols-2) .osp-fnsearch-k-cols,
.tika-root .osp-fnsearch-pop.is-empty .osp-fnsearch-k-move,
.tika-root .osp-fnsearch-pop.is-empty .osp-fnsearch-k-cols,
.tika-root .osp-fnsearch-pop.is-empty .osp-fnsearch-k-open { display: none; }

.dark .tika-root .osp-fnsearch-field,
#os.dark .tika-root .osp-fnsearch-field,
.window[data-app-color-tone="dark"] .tika-root .osp-fnsearch-field {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.18);
  color: #e8ecf3;
}
.dark .tika-root .osp-fnsearch-input::placeholder,
#os.dark .tika-root .osp-fnsearch-input::placeholder,
.window[data-app-color-tone="dark"] .tika-root .osp-fnsearch-input::placeholder {
  color: #9aa5b5;
}
.dark .tika-root .osp-fnsearch.open .osp-fnsearch-field,
.dark .tika-root .osp-fnsearch-field.on,
.dark .tika-root .osp-fnsearch-field:focus-within,
#os.dark .tika-root .osp-fnsearch.open .osp-fnsearch-field,
#os.dark .tika-root .osp-fnsearch-field.on,
#os.dark .tika-root .osp-fnsearch-field:focus-within,
.window[data-app-color-tone="dark"] .tika-root .osp-fnsearch.open .osp-fnsearch-field,
.window[data-app-color-tone="dark"] .tika-root .osp-fnsearch-field.on,
.window[data-app-color-tone="dark"] .tika-root .osp-fnsearch-field:focus-within {
  background: #fff;
  border-color: #3d9b82;
  color: #1f2733;
  box-shadow:
    0 0 0 2px color-mix(in srgb, #3d9b82 45%, transparent),
    0 10px 24px rgba(0, 0, 0, .45);
}
.dark .tika-root .osp-fnsearch.open .osp-fnsearch-input::placeholder,
.dark .tika-root .osp-fnsearch-field.on .osp-fnsearch-input::placeholder,
.dark .tika-root .osp-fnsearch-field:focus-within .osp-fnsearch-input::placeholder,
#os.dark .tika-root .osp-fnsearch.open .osp-fnsearch-input::placeholder,
.window[data-app-color-tone="dark"] .tika-root .osp-fnsearch.open .osp-fnsearch-input::placeholder {
  color: #6c7686;
}

.dark .tika-root .osp-fnsearch-pop,
#os.dark .tika-root .osp-fnsearch-pop,
.window[data-app-color-tone="dark"] .tika-root .osp-fnsearch-pop {
  --fn-pop-bg: #1c212b;
  --fn-pop-ink: #e8ecf3;
  --fn-pop-muted: #9aa5b5;
  --fn-pop-line: #3a4252;
  --fn-pop-accent: #3d9b82;
  --fn-pop-shadow: 0 28px 64px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.06);
  color-scheme: dark;
  background-color: #1c212b;
  color: #e8ecf3;
  border-color: #3a4252;
}
.dark .tika-root .osp-fnsearch-pop.is-empty,
#os.dark .tika-root .osp-fnsearch-pop.is-empty,
.window[data-app-color-tone="dark"] .tika-root .osp-fnsearch-pop.is-empty {
  background-color: #1c212b;
}
.dark .tika-root .osp-fnsearch-item:hover:not(.is-active),
#os.dark .tika-root .osp-fnsearch-item:hover:not(.is-active),
.window[data-app-color-tone="dark"] .tika-root .osp-fnsearch-item:hover:not(.is-active) {
  background: color-mix(in srgb, #3d9b82 18%, transparent);
  border-color: color-mix(in srgb, #3d9b82 28%, transparent);
}
.dark .tika-root .osp-fnsearch-item-ic,
#os.dark .tika-root .osp-fnsearch-item-ic,
.window[data-app-color-tone="dark"] .tika-root .osp-fnsearch-item-ic {
  background: color-mix(in srgb, #3d9b82 18%, transparent);
  color: #7dceb8;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #3d9b82 28%, transparent);
}
.dark .tika-root .osp-fnsearch-empty strong,
#os.dark .tika-root .osp-fnsearch-empty strong,
.window[data-app-color-tone="dark"] .tika-root .osp-fnsearch-empty strong {
  color: #e8ecf3;
}
.dark .tika-root .osp-fnsearch-foot,
#os.dark .tika-root .osp-fnsearch-foot,
.window[data-app-color-tone="dark"] .tika-root .osp-fnsearch-foot {
  background: color-mix(in srgb, #e8ecf3 4%, #1c212b);
  border-top-color: #3a4252;
}
.dark .tika-root .osp-fnsearch-k kbd,
#os.dark .tika-root .osp-fnsearch-k kbd,
.window[data-app-color-tone="dark"] .tika-root .osp-fnsearch-k kbd {
  color: #e8ecf3;
  background: color-mix(in srgb, #e8ecf3 8%, #1c212b);
  box-shadow: inset 0 0 0 1px #3a4252;
}

@media (prefers-reduced-motion: reduce) {
  .tika-root .osp-fnsearch-field,
  .tika-root .osp-fnsearch-pop,
  .tika-root .osp-fnsearch-pop.on,
  .tika-root .osp-fnsearch-item { transition: none; transform: none; }
}

/* Width via custom properties so these beat `.tika-root .osp-fnsearch-field`
   (container queries cannot use `.tika-root` as a descendant of itself). */
@container tika-app (max-width: 1080px) {
  .osp-fnsearch { --osp-fn-field-w: 156px; }
}
@container tika-app (max-width: 920px) {
  .osp-fnsearch { --osp-fn-field-w: 138px; }
  .osp-fnsearch-field { padding: 0 8px 0 7px; }
  .osp-fnsearch-input { font-size: 11.5px; }
}
@container tika-app (max-width: 760px) {
  .osp-fnsearch { --osp-fn-field-w: 32px; }
  .osp-fnsearch-field { padding: 0 8px; gap: 0; }
  .osp-fnsearch-input { width: 0; min-width: 0; padding: 0; opacity: 0; }
  .osp-fnsearch.open,
  .osp-fnsearch:focus-within,
  .osp-fnsearch:has(.osp-fnsearch-field.on) { --osp-fn-field-w: 158px; }
  .osp-fnsearch.open .osp-fnsearch-field,
  .osp-fnsearch:focus-within .osp-fnsearch-field,
  .osp-fnsearch-field.on { gap: 6px; }
  .osp-fnsearch.open .osp-fnsearch-input,
  .osp-fnsearch:focus-within .osp-fnsearch-input,
  .osp-fnsearch-field.on .osp-fnsearch-input {
    width: auto; opacity: 1; pointer-events: auto; flex: 1;
  }
}

@media (max-width: 1080px) { .tika-root .osp-fnsearch { --osp-fn-field-w: 156px; } }
@media (max-width: 920px) {
  .tika-root .osp-fnsearch { --osp-fn-field-w: 138px; }
  .tika-root .osp-fnsearch-field { padding: 0 8px 0 7px; }
  .tika-root .osp-fnsearch-input { font-size: 11.5px; }
}
@media (max-width: 760px) {
  .tika-root .osp-fnsearch { --osp-fn-field-w: 32px; }
  .tika-root .osp-fnsearch-field { padding: 0 8px; gap: 0; }
  .tika-root .osp-fnsearch-input { width: 0; min-width: 0; padding: 0; opacity: 0; }
  .tika-root .osp-fnsearch.open,
  .tika-root .osp-fnsearch:focus-within,
  .tika-root .osp-fnsearch:has(.osp-fnsearch-field.on) { --osp-fn-field-w: 158px; }
  .tika-root .osp-fnsearch.open .osp-fnsearch-field,
  .tika-root .osp-fnsearch:focus-within .osp-fnsearch-field,
  .tika-root .osp-fnsearch-field.on { gap: 6px; }
  .tika-root .osp-fnsearch.open .osp-fnsearch-input,
  .tika-root .osp-fnsearch:focus-within .osp-fnsearch-input,
  .tika-root .osp-fnsearch-field.on .osp-fnsearch-input {
    width: auto; opacity: 1; pointer-events: auto; flex: 1;
  }
}

/* Beat OS per-window color-theme input/surface !important. */
#os .window[data-app-color-theme] .window-body .tika-root input.osp-fnsearch-input:not([type="color"]):not([type="range"]):not([type="file"]):not([type="checkbox"]):not([type="radio"]),
body .window[data-app-color-theme] .window-body .tika-root input.osp-fnsearch-input:not([type="color"]):not([type="range"]):not([type="file"]):not([type="checkbox"]):not([type="radio"]) {
  background: transparent !important;
  color: inherit !important;
  border: 0 !important;
  border-color: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  min-height: 0 !important;
  height: 100% !important;
  line-height: 1 !important;
  outline: none !important;
}
#os .window[data-app-color-theme] .tika-root .osp-fnsearch-input::placeholder,
body .window[data-app-color-theme] .tika-root .osp-fnsearch-input::placeholder {
  color: color-mix(in srgb, var(--st-ink, #1f2733) 48%, transparent) !important;
  opacity: 1;
}
#os .window[data-app-color-theme] .tika-root .osp-fnsearch.open .osp-fnsearch-input::placeholder,
#os .window[data-app-color-theme] .tika-root .osp-fnsearch-field.on .osp-fnsearch-input::placeholder,
#os .window[data-app-color-theme] .tika-root .osp-fnsearch-field:focus-within .osp-fnsearch-input::placeholder,
body .window[data-app-color-theme] .tika-root .osp-fnsearch.open .osp-fnsearch-input::placeholder,
body .window[data-app-color-theme] .tika-root .osp-fnsearch-field.on .osp-fnsearch-input::placeholder,
body .window[data-app-color-theme] .tika-root .osp-fnsearch-field:focus-within .osp-fnsearch-input::placeholder {
  color: #6c7686 !important;
}
#os .window[data-app-color-theme] .tika-root .osp-fnsearch-pop,
body .window[data-app-color-theme] .tika-root .osp-fnsearch-pop {
  background-color: var(--fn-pop-bg, #fff) !important;
  color: var(--fn-pop-ink, #1f2733) !important;
  border-color: var(--fn-pop-line, #d7dce6) !important;
}
#os .window[data-app-color-theme] .tika-root .osp-fnsearch-head,
#os .window[data-app-color-theme] .tika-root .osp-fnsearch-list,
#os .window[data-app-color-theme] .tika-root .osp-fnsearch-empty,
body .window[data-app-color-theme] .tika-root .osp-fnsearch-head,
body .window[data-app-color-theme] .tika-root .osp-fnsearch-list,
body .window[data-app-color-theme] .tika-root .osp-fnsearch-empty {
  background-color: transparent !important;
  color: inherit;
}
#os .window[data-app-color-theme] .tika-root .osp-fnsearch-empty strong,
body .window[data-app-color-theme] .tika-root .osp-fnsearch-empty strong {
  color: var(--fn-pop-ink, #1f2733) !important;
}
#os .window[data-app-color-theme] .tika-root .osp-fnsearch-empty p,
body .window[data-app-color-theme] .tika-root .osp-fnsearch-empty p {
  color: var(--fn-pop-muted, #5c6573) !important;
}
#os .window[data-app-color-theme] .tika-root .osp-fnsearch-foot,
body .window[data-app-color-theme] .tika-root .osp-fnsearch-foot {
  background: color-mix(in srgb, var(--fn-pop-ink) 2.5%, var(--fn-pop-bg)) !important;
  color: var(--fn-pop-muted) !important;
  border-top-color: var(--fn-pop-line) !important;
}
#os .window[data-app-color-theme] .tika-root .osp-fnsearch-k kbd,
body .window[data-app-color-theme] .tika-root .osp-fnsearch-k kbd {
  color: var(--fn-pop-ink) !important;
  background: color-mix(in srgb, var(--fn-pop-ink) 6%, var(--fn-pop-bg)) !important;
  box-shadow: inset 0 0 0 1px var(--fn-pop-line) !important;
}
#os .window[data-app-color-theme] .tika-root .osp-fnsearch-item,
body .window[data-app-color-theme] .tika-root .osp-fnsearch-item {
  background: transparent !important;
  color: var(--fn-pop-ink) !important;
  border-color: transparent !important;
}
#os .window[data-app-color-theme] .tika-root .osp-fnsearch-item:hover,
body .window[data-app-color-theme] .tika-root .osp-fnsearch-item:hover {
  background: color-mix(in srgb, var(--fn-pop-accent) 8%, transparent) !important;
  border-color: color-mix(in srgb, var(--fn-pop-accent) 18%, transparent) !important;
  color: var(--fn-pop-ink) !important;
}
#os .window[data-app-color-theme] .tika-root .osp-fnsearch-item.is-active,
#os .window[data-app-color-theme] .tika-root .osp-fnsearch-item:hover.is-active,
body .window[data-app-color-theme] .tika-root .osp-fnsearch-item.is-active,
body .window[data-app-color-theme] .tika-root .osp-fnsearch-item:hover.is-active {
  background: var(--fn-pop-accent) !important;
  border-color: var(--fn-pop-accent) !important;
  color: #fff !important;
}
#os .window[data-app-color-theme] .tika-root .osp-fnsearch-item.is-active .osp-fnsearch-item-hint,
body .window[data-app-color-theme] .tika-root .osp-fnsearch-item.is-active .osp-fnsearch-item-hint {
  color: rgba(255,255,255,.82) !important;
}
#os.dark .window[data-app-color-theme] .tika-root .osp-fnsearch-pop,
.dark .window[data-app-color-theme] .tika-root .osp-fnsearch-pop,
.window[data-app-color-theme][data-app-color-tone="dark"] .tika-root .osp-fnsearch-pop {
  background-color: #1c212b !important;
  color: #e8ecf3 !important;
  border-color: #3a4252 !important;
}
#os.dark .window[data-app-color-theme] .tika-root .osp-fnsearch-empty strong,
.dark .window[data-app-color-theme] .tika-root .osp-fnsearch-empty strong {
  color: #e8ecf3 !important;
}
#os.dark .window[data-app-color-theme] .tika-root .osp-fnsearch-item:hover:not(.is-active),
.dark .window[data-app-color-theme] .tika-root .osp-fnsearch-item:hover:not(.is-active) {
  background: color-mix(in srgb, #3d9b82 18%, transparent) !important;
  border-color: color-mix(in srgb, #3d9b82 28%, transparent) !important;
  color: #e8ecf3 !important;
}

