/* Shared polish for standalone tool pages. Keeps the newer tools visually consistent. */
body {
  overflow-x: hidden;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: 10px;
  z-index: 1000;
  transform: translateY(-140%);
  padding: 10px 14px;
  border-radius: 12px;
  background: #10214a;
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  transition: transform .16s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 3px solid rgba(46, 87, 232, .72);
  outline-offset: 3px;
}

.tool-site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(245, 248, 255, .86);
  border-bottom: 1px solid rgba(122, 145, 181, .14);
  backdrop-filter: blur(18px);
}

.tool-site-header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 13px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.tool-site-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #10214a;
  text-decoration: none;
}

.tool-brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #2e57e8, #1b43cf);
  box-shadow: 0 12px 28px rgba(46, 87, 232, .22);
}

.tool-brand-bars {
  width: 20px;
  height: 18px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.tool-brand-bars i {
  display: block;
  width: 5px;
  border-radius: 3px 3px 1px 1px;
  background: #fff;
}

.tool-brand-bars i:nth-child(1) { height: 8px; }
.tool-brand-bars i:nth-child(2) { height: 13px; }
.tool-brand-bars i:nth-child(3) { height: 17px; }

.tool-brand-copy strong {
  display: block;
  color: #10214a;
  font: 800 1rem/1.1 Inter, system-ui, sans-serif;
}

.tool-brand-copy span {
  display: block;
  color: #5e7094;
  font-size: .86rem;
}

.tool-site-nav {
  display: flex;
  align-items: center;
  gap: 14px;
}

.tool-site-nav a,
.tool-nav-menu summary {
  color: #5e7094;
  text-decoration: none;
  font-weight: 800;
  font-size: .92rem;
}

.tool-site-nav a:hover,
.tool-nav-menu summary:hover {
  color: #1b43cf;
  text-decoration: none;
}

.tool-site-nav a,
.tool-nav-menu summary,
.btn,
.btn-link,
.tool-button,
.tool-jump-select,
button,
select,
input,
textarea {
  -webkit-tap-highlight-color: rgba(46, 87, 232, .16);
}

.tool-nav-menu {
  position: relative;
}

.tool-nav-menu summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.tool-nav-menu summary::-webkit-details-marker {
  display: none;
}

.tool-nav-menu summary::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  opacity: .7;
}

.tool-nav-menu-panel {
  position: absolute;
  top: calc(100% + 14px);
  right: -8px;
  width: min(88vw, 520px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(122, 145, 181, .18);
  border-radius: 22px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 24px 60px rgba(21, 38, 79, .16);
}

.tool-nav-menu-panel a {
  display: block;
  padding: 13px 14px;
  border: 1px solid rgba(122, 145, 181, .12);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #f7fbff);
  color: #10214a;
}

.tool-nav-menu-panel a:hover {
  background: #eef4ff;
}

.tool-nav-menu-panel a[href="/examples/"] {
  grid-column: 1 / -1;
  border-color: rgba(37, 99, 235, .16);
  background: linear-gradient(180deg, #f8fbff, #eef4ff);
}

.tool-nav-menu-panel span,
.tool-suite-switcher label,
.tool-trust-card span,
.tool-sample-output span {
  display: block;
  color: #66789b;
  font: 800 .68rem/1 Inter, system-ui, sans-serif;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.tool-nav-menu-panel strong {
  display: block;
  margin-top: 5px;
  color: #10214a;
  font: 800 .92rem/1.25 Inter, system-ui, sans-serif;
}

.tool-suite-switcher {
  margin: 0 0 18px;
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 320px) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(122, 145, 181, .18);
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: 0 14px 34px rgba(21, 38, 79, .06);
}

.tool-suite-switcher strong {
  display: block;
  color: #10214a;
  font: 800 1rem/1.3 Inter, system-ui, sans-serif;
}

.tool-suite-switcher p {
  margin: 4px 0 0;
  color: #5e7094;
  font-size: .92rem;
}

.tool-suite-switcher form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.tool-suite-switcher form label {
  grid-column: 1 / -1;
}

.tool-jump-select {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(122, 145, 181, .24);
  border-radius: 14px;
  background: #fff;
  color: #10214a;
  font: 700 .94rem/1 Inter, system-ui, sans-serif;
}

.tool-sample-output,
.tool-trust-block {
  margin-top: 24px;
  padding: 24px;
  border: 1px solid rgba(122, 145, 181, .18);
  border-radius: 28px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: 0 16px 40px rgba(21, 38, 79, .07);
}

.tool-sample-output h2,
.tool-trust-block h2 {
  margin: 8px 0 10px;
  color: #10214a;
  font: 800 1.3rem/1.2 Inter, system-ui, sans-serif;
}

.tool-sample-output p,
.tool-trust-card p {
  margin: 0;
  color: #5e7094;
}

.tool-sample-grid,
.tool-trust-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.tool-sample-card,
.tool-trust-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(122, 145, 181, .16);
  border-radius: 20px;
  background: #fff;
}

.tool-sample-card strong,
.tool-trust-card strong {
  display: block;
  margin: 8px 0 6px;
  color: #10214a;
  font: 800 1rem/1.3 Inter, system-ui, sans-serif;
}

.hero,
.tool-panel,
.card,
.grid-card,
.lane,
.tool-card,
.tool-mini-card {
  min-width: 0;
  overflow: hidden;
}

.breadcrumbs,
.hero p,
.card p,
.grid-card p,
.lane p,
.tool-card p,
.tool-mini-card p,
.tool-list li,
.tool-empty,
.tool-kv,
.hint,
.status {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.tool-panel {
  background: linear-gradient(180deg, #ffffff, #fbfdff);
}

.tool-form {
  align-items: stretch;
}

.tool-input,
.tool-select,
.select,
.input {
  width: 100%;
}

.tool-button,
.btn,
.btn-link {
  white-space: normal;
  text-align: center;
  text-decoration: none;
}

.tool-sample-button {
  margin-top: 12px;
  background: #dbeafe;
  color: #1d4ed8;
  box-shadow: none;
}

.tool-state + .tool-sample-button {
  margin-top: 14px;
}

.tool-button:hover,
.btn-primary:hover {
  filter: brightness(.98);
  text-decoration: none;
}

.btn-secondary:hover,
.btn-link:hover {
  background: #cfe0ff;
  text-decoration: none;
}

.tool-result-grid,
.tool-stack,
.grid,
.queue-list,
.history-list {
  align-items: stretch;
}

.tool-card strong,
.tool-mini-card strong,
.queue-item strong,
.history-item strong {
  max-width: 100%;
}

.tool-section {
  padding-top: 2px;
}

.tool-section + .tool-section {
  margin-top: 26px;
}

.wrap > .grid + .notice,
.wrap > .grid + .note,
.wrap > .grid + footer,
.wrap > .notice + footer,
.wrap > .note + footer,
.wrap > .tool-faq + .tool-footer-nav {
  margin-top: 28px !important;
}

.wrap > .label + .grid,
.wrap > .tool-review-note + .hero {
  margin-top: 0 !important;
}

footer a {
  font-weight: 700;
}

.tool-review-note {
  margin: 0 0 18px;
  color: #66789b;
  font: 800 .74rem/1.4 Inter, system-ui, sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.tool-faq,
.tool-footer-nav {
  margin-top: 26px;
  padding: 24px;
  border: 1px solid rgba(122, 145, 181, .18);
  border-radius: 28px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: 0 16px 40px rgba(21, 38, 79, .07);
}

.tool-faq h2 {
  margin: 0 0 16px;
  color: #10214a;
  font: 800 1.35rem/1.2 Inter, system-ui, sans-serif;
  letter-spacing: -.02em;
}

.tool-faq div {
  padding: 18px 0;
  border-top: 1px solid rgba(122, 145, 181, .14);
}

.tool-faq div:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.tool-faq div:last-child {
  padding-bottom: 0;
}

.tool-faq h3 {
  margin: 0 0 8px;
  color: #10214a;
  font: 800 1rem/1.3 Inter, system-ui, sans-serif;
}

.tool-faq p {
  margin: 0;
  color: #5e7094;
  line-height: 1.7;
}

.tool-footer-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.tool-footer-nav div {
  min-width: 0;
}

.tool-footer-nav strong {
  display: block;
  margin: 0 0 10px;
  color: #10214a;
  font: 800 .78rem/1.2 Inter, system-ui, sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.tool-footer-nav a {
  display: block;
  margin-top: 8px;
  color: #5e7094;
  font-weight: 750;
  line-height: 1.4;
  text-decoration: none;
}

.tool-footer-nav a:hover {
  color: #1b43cf;
  text-decoration: underline;
}

@media (max-width: 720px) {
  .tool-site-header-inner {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .tool-site-nav {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 8px;
  }

  .tool-nav-menu-panel {
    position: fixed;
    left: 12px;
    right: 12px;
    top: 78px;
    width: auto;
    grid-template-columns: 1fr;
    max-height: 72vh;
    overflow: auto;
  }

  .tool-suite-switcher,
  .tool-suite-switcher form,
  .tool-sample-grid,
  .tool-trust-grid,
  .tool-footer-nav {
    grid-template-columns: 1fr;
  }

  .wrap {
    padding-left: 16px;
    padding-right: 16px;
  }

  .cta-row,
  .result-actions,
  .url-picker-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .btn,
  .btn-link,
  .tool-button {
    width: 100%;
  }

  .queue-item,
  .history-item {
    grid-template-columns: 1fr;
  }
}
