/* Specialist workspaces. Shared controls and surfaces live in styles.css. */
.tools-hero {
  margin-bottom: 1.75rem;
}
.workspace-stamp {
  display: none;
}
.tools-index {
  display: flex;
  overflow-x: auto;
  padding: 0.25rem 0.25rem 0.75rem;
  scrollbar-width: thin;
  scrollbar-color: #a7b99b transparent;
  gap: 0.5rem;
  margin: 0 0 1rem;
}
.tools-index > a {
  flex: 0 0 10.5rem;
  display: grid;
  grid-template-columns: 1.8rem 1fr;
  gap: 0 0.5rem;
  align-items: center;
  padding: 0.75rem;
  min-height: 68px;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: #fff;
  font-size: 0.875rem;
}
.tools-index > a > span {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 0.6rem;
  background: #f0f3e9;
  color: var(--forest);
  font:
    1.1rem/1.5 "Segoe UI",
    Tahoma,
    sans-serif;
}
.tools-index small {
  color: var(--muted);
  font-size: 0.875rem;
}
.tools-index > a[aria-current],
.tools-index > a:hover {
  background: var(--forest);
  border-color: var(--forest);
  color: white;
}
.tools-index > a[aria-current] > span,
.tools-index > a:hover > span {
  background: #ffffff1a;
  color: #dbeac8;
}
.tools-index > a[aria-current] small,
.tools-index > a:hover small {
  color: #d3e0ce;
}
.tool-guidance {
  display: flex;
  align-items: start;
  gap: 0.55rem;
  color: var(--muted);
  font-size: 0.875rem;
  margin: 1rem 0 1.75rem;
}
.tool-guidance .status-dot {
  margin-top: 0.6rem;
}
.tool-guidance p {
  margin: 0;
}
.tool-section {
  scroll-margin-top: 1rem;
  outline: none;
  margin-bottom: 1.75rem;
}
.tool-heading {
  margin-bottom: 1.25rem;
}
.tool-heading > span {
  font-size: 0.875rem;
  color: var(--muted);
}
.tool-heading h2 {
  margin: 0.25rem 0 0.35rem;
  font-size: 1.4rem;
}
.tool-heading p {
  font-size: 0.875rem;
  color: var(--muted);
  margin: 0;
  max-width: 50rem;
  line-height: 2;
}
.tool-panel {
  padding: 1.25rem;
}
.tool-panel label {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 0.65rem;
}
.tool-panel input,
.tool-panel select {
  max-width: 100%;
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.85rem;
  border: 1px solid #d4ddcb;
  border-radius: 0.75rem;
  color: var(--ink);
  background: #fcfdfb;
  font-size: 1rem;
  line-height: 1.7;
}
.tool-panel input:focus,
.tool-panel select:focus {
  border-color: #6c8b6c;
}
.tool-panel input[type="file"] {
  font-size: 0.875rem;
  background: #f3f6ed;
  border-style: dashed;
  padding: 0.75rem;
}
.tool-panel input::file-selector-button {
  min-height: 44px;
  border: 1px solid #cfdbca;
  border-radius: 0.5rem;
  color: var(--forest);
  background: white;
  padding: 0.4rem 0.7rem;
  font:
    0.75rem Tahoma,
    sans-serif;
  margin-left: 0.6rem;
  cursor: pointer;
}
#corpus-import-status {
  font-size: 0.875rem;
  color: var(--forest);
  line-height: 2;
  margin: 0.75rem 0 1.25rem;
}
.tool-aside {
  background: #f6f8f0;
  padding: 1.25rem;
  border-radius: 1rem;
  align-self: start;
}
.tool-aside .btn {
  margin-top: 1rem;
}
.tool-search,
.tool-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.tool-search > input {
  flex: 1 1 14rem;
}
.tool-actions {
  margin-top: 1rem;
}
.tool-actions > select {
  width: auto;
  min-width: 9rem;
}
.tool-actions .tool-inline-label {
  margin: 0;
}
.tool-muted {
  color: var(--muted);
  font-size: 0.875rem;
}
.tool-result {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.tool-result h3 {
  margin: 0 0 1rem;
  font-size: 0.9rem;
}
.tool-result h3 strong {
  color: var(--forest);
  background: var(--mint);
  padding: 0.1rem 0.5rem;
  border-radius: 0.5rem;
}
.tool-result h4 {
  font-size: 0.875rem;
  margin-bottom: 0.85rem;
}
.tool-result-columns {
  display: grid;
  gap: 1.5rem;
}
.tool-result-columns > div {
  min-width: 0;
}
.result-stack {
  display: grid;
  gap: 0.6rem;
  align-content: start;
  max-height: 27rem;
  overflow-y: auto;
}
.result-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.9rem 1rem;
  background: #f7f9f3;
  border: 1px solid #e3e9db;
  border-radius: 0.85rem;
  overflow-wrap: anywhere;
}
.result-item strong {
  font-size: 0.875rem;
  font-weight: 700;
}
.result-item span {
  font-size: 0.875rem;
  color: var(--muted);
  white-space: pre-wrap;
  line-height: 2;
}
.empty-tool {
  padding: 1.5rem 1rem;
  border: 1px dashed #d6dfcc;
  background: #fafbf7;
  border-radius: 0.85rem;
  color: var(--muted);
  text-align: center;
  font-size: 0.875rem;
  line-height: 2;
  margin: 0;
}
.safety-note {
  border-right: 3px solid #b99354;
  border-radius: 0.6rem;
  padding: 0.85rem 1rem;
  background: #faf3e7;
  color: #72582f;
  font-size: 0.875rem;
  line-height: 2.1;
  margin: 1rem 0 0;
}
.small-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}
.small-metrics .result-item strong {
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--forest);
}
.small-metrics .result-item span {
  font-size: 0.875rem;
}
.accuracy-notice {
  border: 1px solid var(--line);
  border-radius: 1rem;
  margin-top: 2rem;
  background: #f0f3e9;
}
.accuracy-notice summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  padding: 1rem 1.25rem;
  min-height: 52px;
  font-size: 0.875rem;
  font-weight: 700;
}
.accuracy-notice summary::-webkit-details-marker {
  display: none;
}
.accuracy-notice[open] summary > span {
  transform: rotate(45deg);
}
.accuracy-notice > div {
  padding: 0 1.25rem 1.25rem;
}
.accuracy-notice p {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 2.1;
}
@media (min-width: 640px) {
  .tools-index {
    display: grid;
    overflow: visible;
    padding: 0;
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .tools-index > a {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    padding: 1rem 0.65rem;
    text-align: center;
  }
  .tools-index > a > span {
    grid-row: auto;
    margin: auto;
  }
  .tools-index small {
    display: block;
  }
  .small-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .tool-panel {
    padding: 1.5rem;
  }
  .tool-result-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1024px) {
  .workspace-stamp {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border: 1px solid #dbe3d0;
    border-radius: 1rem;
    transform: rotate(-3deg);
  }
  .workspace-stamp strong {
    color: #5c7e49;
    font-size: 3rem;
    font-weight: 400;
    line-height: 1;
  }
  .workspace-stamp > span {
    color: var(--muted);
    font-size: 0.875rem;
    line-height: 2;
  }
}
@media (min-width: 1280px) {
  .tools-index > a {
    grid-template-columns: 2rem 1fr;
    text-align: right;
    gap: 0 0.65rem;
    padding: 1rem;
  }
  .tools-index > a > span {
    grid-row: span 2;
  }
  .tool-panel > .two-inputs {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  }
}

.field-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 0.65rem;
}
.tool-panel .file-picker {
  display: grid;
  grid-template-columns: 2rem 1fr;
  column-gap: 0.65rem;
  padding: 1rem;
  border: 1px dashed #adbea0;
  border-radius: 0.85rem;
  background: #f3f6ed;
  cursor: pointer;
}
.file-picker > span {
  grid-row: span 2;
  font-size: 1.5rem;
  color: var(--forest);
}
.file-picker > strong {
  font-size: 0.875rem;
}
.file-picker > small {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 400;
}
.file-picker:hover {
  background: #eaf0e1;
}
.file-picker:has(+ input:focus-visible) {
  outline: 3px solid #4c7860;
  outline-offset: 3px;
}
.tool-panel input[type="file"].sr-only {
  width: 1px;
  min-height: 0;
  padding: 0;
  border: 0;
}
