/* Integrazione delimitata alle nuove sezioni Studio. */
.sfl-be-duplicate { display: none !important; }
.portable-library .portable-heading .eyebrow { display: none; }
.portable-library .portable-heading h1 { overflow-wrap: normal; }
.portable-library .portable-heading p:not(.eyebrow) { max-width: 66ch; line-height: 1.55; }
.sfl-catalog-note { max-width: 75ch; margin: 2.5rem 0 1rem; padding-top: 1.5rem; border-top: 1px solid #d5dde6; }
.sfl-catalog-note h2 { margin: 0 0 1rem; font-size: 1.5rem; line-height: 1.25; }
.sfl-catalog-note p { margin: .7rem 0 0; line-height: 1.6; }
body.sfl-studio .portable-access > :not(a:first-child):not(.eyebrow):not(h1):not(#sfl-studio-box) { display: none !important; }
body.sfl-studio .portable-access > .eyebrow { display: none !important; }
#sfl-studio-box { max-width: 78rem; }
#sfl-studio-box > p:first-child { max-width: 66ch; font-size: 1.2rem; line-height: 1.55; }
#sfl-studio-box .portable-steps { margin: 1.8rem 0; }
#sfl-studio-box .portable-steps li { min-width: 0; }
#sfl-studio-box .sfl-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin: 1.7rem 0; }
#sfl-studio-box .small { max-width: 90ch; line-height: 1.6; }
#sfl-studio-box h2 { font-size: 1.55rem; line-height: 1.2; margin: 2.4rem 0 1rem; }
.sfl-lista { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: .8rem; }
.sfl-lista a { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: .8rem; align-items: center; min-height: 90px; padding: .7rem; border: 1px solid #d5dde6; border-radius: 8px; text-decoration: none; color: #17374b; background: #fff; }
.sfl-lista a:hover { border-color: #17374b; }
.sfl-lista a:focus-visible, #sfl-studio-box a:focus-visible, #sfl-reader-root a:focus-visible { outline: 3px solid #b82040; outline-offset: 4px; }
.sfl-lista img { width: 56px; height: 74px; object-fit: cover; border-radius: 3px; background: #e8edf4; }
.sfl-lista strong { display: block; line-height: 1.25; overflow-wrap: anywhere; }
.sfl-lista small { display: block; color: #526370; margin-top: .25rem; }
body.sfl-reader main#contenuto > :not(#sfl-reader-root):not(.sfl-exit) { display: none !important; }
body.sfl-privacy main#contenuto > :not(#sfl-privacy-box) { display: none !important; }
#sfl-privacy-box { padding-top: 2.5rem; padding-bottom: 3rem; }
#sfl-privacy-box h1 { line-height: 1.1; }
#sfl-privacy-box h2 { margin-top: 2rem; }
#sfl-reader-root .portable-reader iframe { display: block; width: 100%; min-height: 72vh; height: 78vh; border: 0; }
#sfl-reader-root .portable-reader header { gap: 1rem; align-items: center; }
#sfl-reader-root .portable-reader h1 { margin: 0; color: inherit; font-size: clamp(1rem, 2vw, 1.4rem); line-height: 1.25; overflow-wrap: anywhere; }
#sfl-reader-root .portable-reader header a { display: inline-flex; align-items: center; min-height: 44px; }
#sfl-reader-root .portable-reader details { max-width: 78rem; margin: 1rem auto; padding: 1rem; }
#sfl-reader-root summary { min-height: 44px; cursor: pointer; }
#sfl-reader-root .sfl-not-found { padding-top: 3rem; padding-bottom: 4rem; }
.sfl-shelf { margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid #d5dde6; }
.sfl-shelf .cover-track-grid { padding-top: .5rem; }
.sfl-catalog-state { margin: 1rem 0; line-height: 1.55; color: #526370; }
@media (max-width: 680px) {
  #sfl-studio-box .portable-steps { grid-template-columns: 1fr; }
  #sfl-studio-box .sfl-actions { align-items: flex-start; }
  #sfl-reader-root .portable-reader header { display: flex; flex-wrap: wrap; }
  #sfl-reader-root .portable-reader header h1 { flex: 1 1 100%; order: -1; }
  #sfl-reader-root .portable-reader header a { flex: 1 1 120px; }
  #sfl-reader-root .portable-reader iframe { height: 72vh; min-height: 360px; }
}

/* An explicit route home remains available when the portal header is omitted. */
.sfl-exit {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  padding: 10px max(16px, calc((100% - 78rem) / 2));
  box-sizing: border-box;
  background: #fff;
  border-bottom: 1px solid #d5dde6;
}
.sfl-exit a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 0;
  max-width: 100%;
  padding: 8px 12px;
  box-sizing: border-box;
  border: 1px solid #c4ced9;
  border-radius: 8px;
  background: #fff;
  color: #17374b;
  font-size: 1rem;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  white-space: normal;
  overflow-wrap: anywhere;
}
.sfl-exit a:hover { background: #f0f3f7; border-color: #17374b; }
.sfl-exit a:focus-visible { outline: 3px solid #b82040; outline-offset: 3px; }
body.sfl-studio .portable-access > a:first-child { display: none !important; }
@media (max-width: 600px) {
  .sfl-exit { padding: 8px 12px; }
  .sfl-exit a { flex: 1 1 136px; padding-inline: 8px; }
  .sfl-exit .sfl-exit-home { flex-basis: 200px; }
}
