@import url("design-tokens.css?v=header-user-1");
@import url("scrinio-chrome.css?v=chrome-mode-23");
@import url("home-patron.css?v=cover-progressive-1");

* { box-sizing: border-box; }
html {
  height: 100%;
}
body {
  margin: 0;
  font-family: var(--dl-font);
  background: var(--dl-bg);
  color: var(--dl-ink);
  min-height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); border: 0;
}

/* Legacy Primo aliases → dl-* (home still uses primo-* in some places) */
.primo-header { background: var(--scrinio-blue); color: #fff; }
.primo-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; padding: var(--dl-header-pad-y) var(--dl-header-pad-x); border-bottom: 1px solid rgba(255,255,255,0.15); }
.primo-brand { display: flex; flex-direction: column; text-decoration: none; color: #fff; line-height: 1.15; }
.primo-brand-mark { font-weight: 700; font-size: 1.15rem; letter-spacing: 0.02em; }
.primo-brand-sub { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.04em; opacity: 0.9; }
.primo-nav { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; flex: 1; }
.primo-nav a { color: #fff; text-decoration: none; font-size: var(--dl-nav-size); text-transform: uppercase; letter-spacing: 0.04em; opacity: 0.92; }
.primo-nav a:hover, .primo-nav a.dl-active { opacity: 1; text-decoration: underline; }
.primo-login { margin-left: auto; color: #fff; text-decoration: none; font-size: 0.9rem; font-weight: 600; padding: 0.35rem 0.7rem; border: 1px solid rgba(255,255,255,0.55); border-radius: var(--dl-radius); }
.primo-login:hover { background: rgba(255,255,255,0.12); }
.primo-search-band { max-width: var(--dl-search-max); margin: 0 auto; padding: 1.75rem 1.25rem 1.5rem; display: grid; grid-template-columns: auto 1fr; gap: 1rem 1.5rem; align-items: start; animation: fade-in 0.4s ease-out; }
.primo-search-title { margin: 0.15rem 0 0; font-size: clamp(2rem, 5vw, 2.75rem); font-weight: 300; letter-spacing: 0.04em; text-transform: uppercase; }
.primo-search { width: 100%; }
.primo-search-row { display: flex; background: #fff; border-radius: var(--dl-radius); overflow: hidden; box-shadow: var(--dl-shadow); }
.primo-search-row input[type="search"] { flex: 1; border: 0; padding: var(--dl-search-input-pad); font-size: 1rem; outline: none; color: #222; min-width: 0; }
.primo-go { border: 0; background: var(--scrinio-brown); color: #fff; padding: 0 1rem; cursor: pointer; display: flex; align-items: center; transition: filter 0.15s; }
.primo-go:hover { filter: brightness(1.08); }
.primo-advanced { margin: 0.55rem 0 0; font-size: 0.82rem; opacity: 0.95; }
.primo-advanced a { color: #fff; font-weight: 600; }
.primo-body { max-width: var(--dl-content-max); margin: 0 auto; padding: 1.5rem 1.25rem 2rem; animation: fade-in 0.5s ease-out 0.05s both; }
.primo-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.primo-cols section { background: var(--dl-panel); padding: 1rem 1.1rem; }
.primo-cols h2 { margin: 0 0 0.65rem; font-size: 0.95rem; color: var(--scrinio-blue); }
.primo-cols ul { margin: 0; padding: 0; list-style: none; }
.primo-cols li { margin: 0 0 0.4rem; font-size: 0.9rem; color: var(--dl-muted); }
.primo-cols a { color: var(--dl-link); text-decoration: none; }
.primo-cols a:hover { text-decoration: underline; }
.primo-footer { max-width: var(--dl-content-max); margin: 0 auto 2rem; padding: 0 1.25rem; color: var(--dl-muted); font-size: 0.8rem; }
.welcome { margin: 0 0 1rem; padding: 0.75rem 1rem; background: #f8ecec; border-left: 3px solid var(--scrinio-blue); }
.welcome-title { margin: 0 0 0.2rem; }
.welcome-hint { margin: 0; color: var(--dl-muted); font-size: 0.9rem; }

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 800px) {
  .primo-search-band { grid-template-columns: 1fr; }
  .primo-cols { grid-template-columns: 1fr; }
  .primo-login { margin-left: 0; }
}

/* Guida / doc */
.topbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem;
  padding: 0.75rem 1.25rem; background: var(--scrinio-blue); color: #fff;
}
.topbar-brand { font-weight: 700; color: #fff; text-decoration: none; }
.topbar-nav { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; flex: 1; }
.topbar-nav a { color: rgba(255,255,255,0.92); text-decoration: none; font-size: 0.85rem; }
.topbar-nav a:hover { text-decoration: underline; }
.topbar-end { margin-left: auto; }
.btn {
  display: inline-block; background: #fff; color: var(--scrinio-blue); font-weight: 600;
  text-decoration: none; padding: 0.45rem 0.85rem; border-radius: var(--dl-radius); border: none; cursor: pointer;
}
.btn-sm { font-size: 0.9rem; padding: 0.35rem 0.75rem; }
.btn:hover { filter: brightness(0.97); }
.doc { max-width: 720px; margin: 0 auto; padding: 2rem 1.25rem 3rem; }
.doc h1 { margin-top: 0; color: var(--scrinio-blue); }
.doc h2 { margin-top: 1.75rem; font-size: 1.1rem; color: var(--scrinio-blue-deep); }
.doc p, .doc .lede { color: var(--dl-muted); line-height: 1.55; }
.doc a:not(.btn) { color: var(--dl-link); }
.doc code { font-size: 0.88em; background: #f3f3f3; padding: 0.1rem 0.35rem; }
