
/*
 * Tool system polish: bring visual proof earlier on mobile, make profile
 * navigation scan like chips, and keep quick routes compact.
 */
@media (max-width: 760px) {
  .tool-hero-dossier.card {
    padding: 18px;
  }

  .tool-hero-dossier h1 {
    max-width: 9.5ch;
    font-size: clamp(3rem, 18vw, 4.1rem);
    line-height: 0.94 !important;
  }

  .tool-hero-dossier .tool-hero-summary {
    max-width: 22rem;
    font-size: 1rem;
    line-height: 1.48;
  }

  .tool-dossier-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    border-radius: 8px;
  }

  .tool-dossier-facts div {
    min-height: 82px !important;
    padding: 12px !important;
  }

  .tool-dossier-facts strong {
    display: -webkit-box;
    overflow: hidden;
    font-size: 0.82rem;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
  }

  .tool-hero-actions {
    gap: 8px;
  }

  .tool-hero-actions .button-ghost {
    display: none;
  }

  .tool-hero-footnotes {
    display: none;
  }

  .tool-hero-meta {
    gap: 16px;
    margin-top: 4px;
  }

  .tool-proof-card--hero .tool-proof-surface {
    min-height: 176px;
    aspect-ratio: 16 / 9;
  }

  .tool-dossier-signal {
    padding: 0;
    border: 0;
    background: transparent;
  }

  .tool-dossier-signal .meta-list {
    gap: 0;
    border-top: 1px solid rgba(238, 240, 242, 0.1);
  }

  .tool-dossier-signal .meta-list li {
    grid-template-columns: 86px minmax(0, 1fr) !important;
    gap: 10px;
    min-height: 46px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(238, 240, 242, 0.1);
  }

  .tool-dossier-signal .meta-list li strong {
    font-size: 0.68rem;
    letter-spacing: 0.12em;
  }

  .tool-dossier-signal .meta-list li span {
    font-size: 0.9rem;
    line-height: 1.32;
  }

  .tool-jump-nav.tool-jump-nav-compact {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    margin-top: 14px;
    padding: 0 0 8px;
    border: 0;
    border-radius: 0;
    background: transparent;
    scrollbar-width: none;
  }

  .tool-jump-nav.tool-jump-nav-compact::-webkit-scrollbar {
    display: none;
  }

  .tool-jump-nav.tool-jump-nav-compact a {
    flex: 0 0 auto;
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid rgba(238, 240, 242, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.024);
    font-size: 0.76rem;
  }

  .tool-dossier .tool-disclosure-grid {
    gap: 0;
    border: 0;
    background: transparent;
  }

  .tool-dossier .tool-disclosure-item {
    padding: 13px 0;
    border-bottom: 1px solid rgba(238, 240, 242, 0.1);
    background: transparent;
  }

  .tool-dossier .tool-disclosure-item:last-child {
    border-bottom: 0;
  }

  .tool-dossier .tool-disclosure-item p,
  .tool-dossier-row p {
    font-size: 0.94rem;
    line-height: 1.52;
  }

  .directory-pathways {
    margin-top: 16px;
    padding: 14px 0 8px;
  }

  .directory-pathway-grid {
    display: flex !important;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .directory-pathway-grid::-webkit-scrollbar {
    display: none;
  }

  .directory-pathway-card {
    flex: 0 0 min(82vw, 300px);
    grid-template-columns: 32px minmax(0, 1fr) auto !important;
    min-height: 104px !important;
    align-content: center;
    scroll-snap-align: start;
  }

  .directory-pathway-card .o4-card-icon {
    grid-row: 1 / span 2;
  }

  .directory-pathway-footer {
    grid-column: 3;
    grid-row: 1 / span 2;
    justify-self: end;
    padding-top: 0;
  }

  .directory-pathway-footer .badge {
    min-height: 28px;
    white-space: nowrap;
  }
}

/*
 * Tool profile finishing pass: keep long proof identities contained and make
 * the lower mobile dossier feel like scannable facts instead of stacked boxes.
 */
.tool-proof-fallback-identity,
.tool-proof-fallback-identity strong,
.tool-proof-fallback-identity small {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.tool-proof-fallback-identity small {
  display: block;
}

@media (max-width: 760px) {
  .directory-tool-card .tool-proof-fallback-identity small {
    display: -webkit-box;
    overflow: hidden;
    max-width: 100%;
    line-height: 1.2;
    overflow-wrap: anywhere;
    text-overflow: clip;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .tool-single-shell > section.tool-dossier-panel.card {
    padding: 16px 18px;
    border-radius: 10px;
  }

  .tool-dossier-panel {
    gap: 13px;
  }

  .tool-dossier-panel-head {
    gap: 6px;
  }

  .tool-dossier-panel-head h2 {
    max-width: 13ch;
    font-size: clamp(1.45rem, 7.4vw, 1.9rem);
    line-height: 1.06;
  }

  .tool-dossier-panel-head p:last-child {
    font-size: 0.94rem;
    line-height: 1.45;
  }

  .tool-dossier-matrix {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    border-radius: 10px;
  }

  .tool-dossier-matrix div {
    min-height: 76px;
    padding: 11px 12px;
  }

  .tool-dossier-matrix span {
    font-size: 0.62rem;
    letter-spacing: 0.12em;
  }

  .tool-dossier-matrix strong {
    font-size: 0.85rem;
    line-height: 1.28;
  }

  .tool-dossier-row {
    padding: 12px 0;
  }

  .tool-dossier-row > strong {
    font-size: 0.7rem;
    letter-spacing: 0.1em;
  }

  .tool-related-grid > div {
    padding: 14px;
  }

  .tool-related-grid h3 {
    font-size: 0.86rem;
    line-height: 1.25;
  }
}
