/*
 * Shared visual contract for every StruTools application.
 *
 * Title colours are intentionally declared as fixed product colours rather than Admin-managed
 * theme variables. Administrators can still configure typography, but cannot accidentally turn
 * application names into a different colour or remove the StruTools blue-to-purple identity.
 */
.public-tool-guide {
  grid-column: 1 / -1;
  clear: both;
  min-width: 0;
  margin: 28px 0 12px;
  padding: 24px;
  border: 1px solid var(--border, #dce4f5);
  border-radius: 16px;
  background: var(--surface, #fff);
  color: var(--text, #17213d);
  text-align: left;
}
.public-tool-guide h2 { margin: 0 0 8px; font-size: 20px; line-height: 1.4; }
.public-tool-guide h3 { margin: 0 0 10px; font-size: 15px; line-height: 1.45; }
.public-tool-guide p { margin: 0 0 12px; font-size: 14px; line-height: 1.7; }
.public-tool-guide header { margin-bottom: 20px; }
.public-tool-guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.public-tool-guide a { color: var(--accent, #1765df); text-decoration: underline; text-underline-offset: 3px; }
details.public-tool-guide { padding: 0; }
details.public-tool-guide > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 17px 20px; cursor: pointer; list-style: none; }
details.public-tool-guide > summary::-webkit-details-marker { display: none; }
details.public-tool-guide > summary::after { content: "+"; flex: 0 0 24px; color: var(--accent); font-family: var(--data-font, Arial, sans-serif); font-size: 24px; font-weight: 600; line-height: 1; text-align: center; }
details.public-tool-guide[open] > summary::after { content: "−"; }
details.public-tool-guide > summary h2 { margin: 0; font-size: 16px; font-weight: 650; }
details.public-tool-guide > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; border-radius: 16px; }
.public-tool-guide-body { padding: 0 20px 20px; }
@media (max-width: 1000px) { .public-tool-guide-grid { grid-template-columns: 1fr; } }
@media print { .public-tool-guide { display: none !important; } }

@media screen {
  main h1.app-split-title {
    color: #17213d !important;
    background: none !important;
    -webkit-text-fill-color: #17213d !important;
  }

  main h1.app-split-title .app-title-primary,
  main h1.app-split-title .app-title-accent {
    display: block;
  }

  main h1.app-split-title .app-title-primary {
    color: #17213d !important;
    background: none !important;
    -webkit-text-fill-color: #17213d !important;
  }

  main h1.app-split-title .app-title-accent {
    width: fit-content;
    max-width: 100%;
    margin-top: .06em;
    color: transparent !important;
    background-image: linear-gradient(105deg, #1a73e8 0%, #4f6ff8 42%, #7c4dff 78%, #9b5cff 100%) !important;
    background-size: 100% 100% !important;
    background-clip: text !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    font-style: normal;
  }

  html[data-theme="dark"] main h1.app-split-title,
  html[data-theme="dark"] main h1.app-split-title .app-title-primary {
    color: #f2f6ff !important;
    -webkit-text-fill-color: #f2f6ff !important;
  }

  html[data-theme="dark"] main h1.app-split-title .app-title-accent {
    background-image: linear-gradient(105deg, #8ab4f8 0%, #9b91ff 48%, #c29cff 100%) !important;
  }

  /*
   * The shell adds app-title-kicker to the short line immediately before an application title.
   * New applications therefore inherit the same blue eyebrow without extending this selector.
   */
  main .app-title-copy .app-title-kicker {
    margin: 0 !important;
    color: var(--accent-strong) !important;
    -webkit-text-fill-color: var(--accent-strong) !important;
    background: none !important;
    font-size: .64rem !important;
    font-weight: 900 !important;
    line-height: 1.35 !important;
    letter-spacing: .14em !important;
    text-transform: uppercase;
  }

  main .app-title-copy h1.app-split-title {
    margin: 4px 0 0 !important;
    font-size: clamp(1.9rem, 4vw, 50px) !important;
    line-height: 1.04 !important;
    letter-spacing: var(--heading-letter-spacing) !important;
  }

  main .app-title-copy > p:not(.app-title-kicker) {
    color: var(--muted);
  }
}

@media (forced-colors: active) {
  main h1.app-split-title .app-title-primary {
    color: CanvasText !important;
    -webkit-text-fill-color: CanvasText !important;
  }

  main h1.app-split-title .app-title-accent {
    color: Highlight !important;
    background-image: none !important;
    -webkit-text-fill-color: Highlight !important;
  }
}
