/* ── PÀGINES D'EINES (eines/*.html): barra superior + iframe ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font-body); background: var(--paper); }

.tool-nav {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  height: 64px;
  padding: 0 clamp(12px, 3vw, 32px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--ink);
  border-bottom: 3px solid var(--gold);
}
.tool-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  min-width: 44px;
  justify-content: center;
  padding: 0 16px;
  border: 1.5px solid var(--rule-dark-strong);
  border-radius: var(--radius-pill);
  color: var(--on-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color .15s, color .15s;
}
.tool-back svg { width: 16px; height: 16px; }
.tool-back:hover { border-color: var(--gold); color: var(--gold); }
.tool-nav-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--white);
}
.tool-club {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  min-width: 44px;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--gold);
  white-space: nowrap;
}
.tool-club img { width: 38px; height: 38px; object-fit: contain; }
.tool-back:focus-visible,
.tool-club:focus-visible { outline: 3px solid var(--focus-on-dark); outline-offset: 3px; }

.tool-frame {
  width: 100%;
  height: calc(100vh - 64px);
  height: calc(100dvh - 64px); /* barres del navegador mòbil */
  border: none;
  display: block;
}

@media (max-width: 640px) {
  .tool-back span,
  .tool-club span { display: none; }
  .tool-back { padding: 0 12px; }
  .tool-nav-title {
    font-size: 20px;
    line-height: 1;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
}
