/* Sylveco Strefa wiedzy - shared styles (tokens from theme sylveco-nowa). All classes prefixed sq-. */
.sq-app, .sq-nav, .sq-previewbar, .sq-toast, .sq-modal, .sq-heart {
  --sq-paper: #fff; --sq-soft: #f4f3f1; --sq-ink: #0e0e0e; --sq-muted: #6b6a68; --sq-line: #e4e3e0;
  --sq-ok: #e0eadf; --sq-ok-b: #2f6b3a; --sq-bad: #f6e3e0; --sq-bad-b: #9b3b32;
  --sq-blush: #f6e3e0; --sq-lilac: #ebe3f2; --sq-powder: #e0ecf1; --sq-sage: #e0eadf; --sq-peach: #fbe5d4; --sq-butter: #f7efcf;
  font-family: inherit; color: var(--sq-ink); box-sizing: border-box;
}
.sq-app *, .sq-app *::before, .sq-app *::after, .sq-nav *, .sq-modal * { box-sizing: border-box; border-radius: 0; }

.sq-previewbar { background: #0e0e0e; color: #fff; text-align: center; font-size: 14px; line-height: 1.3; padding: 8px 12px; position: relative; z-index: 5; margin-top: var(--hh, 0px); }
.sq-previewbar + .sq-app { padding-top: 24px; }
.sq-app { max-width: 1100px; margin: 0 auto; padding: calc(var(--hh, 64px) + 20px) 16px 96px; min-height: 70vh; font-size: 16px; line-height: 1.5; }
.sq-app.sq-narrow, .sq-narrow { max-width: 720px; }
.sq-previewbar ~ .sq-app { padding-top: 24px; }
.sq-app h1 { font-weight: 500; font-size: clamp(1.6rem, 5vw, 2.4rem); line-height: 1.15; margin: 0 0 8px; }
.sq-app h2 { font-weight: 500; font-size: 1.25rem; margin: 24px 0 12px; }
.sq-app p { margin: 0 0 12px; }
.sq-muted { color: var(--sq-muted); font-size: 16px; }
.sq-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sq-noscript { padding: 24px; background: var(--sq-soft); }

.sq-loading { display: flex; justify-content: center; padding: 64px 0; }
.sq-spinner { width: 28px; height: 28px; border: 2px solid var(--sq-line); border-top-color: var(--sq-ink); border-radius: 50% !important; animation: sq-spin .8s linear infinite; }
@keyframes sq-spin { to { transform: rotate(360deg); } }

.sq-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px; background: var(--sq-ink); color: #fff; border: 1px solid var(--sq-ink); font: inherit; font-weight: 500; text-decoration: none; cursor: pointer; text-align: center; transition: background .15s, color .15s; -webkit-tap-highlight-color: transparent; }
.sq-btn:hover { background: #333; color: #fff; }
.sq-btn--ghost { background: transparent; color: var(--sq-ink); }
.sq-btn--ghost:hover { background: var(--sq-soft); color: var(--sq-ink); }
.sq-btn--block { display: flex; width: 100%; }
.sq-btn[disabled], .sq-btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.sq-btn--sm { min-height: 48px; padding: 0 16px; font-size: 16px; }
.sq-app a:focus-visible, .sq-app button:focus-visible, .sq-app input:focus-visible, .sq-nav a:focus-visible, .sq-modal button:focus-visible { outline: 2px solid var(--sq-ink); outline-offset: 2px; }
.sq-app input[type=text], .sq-app input[type=email], .sq-app select { font: inherit; font-size: 16px; min-height: 48px; padding: 0 12px; border: 1px solid var(--sq-ink); background: #fff; width: 100%; }
.sq-field { display: block; margin: 0 0 12px; }
.sq-field > span { display: block; margin-bottom: 4px; }
.sq-check { display: flex; gap: 12px; align-items: center; min-height: 48px; cursor: pointer; margin: 0 0 12px; font-size: 16px; }
.sq-check input { width: 22px; height: 22px; flex: 0 0 22px; accent-color: #0e0e0e; }

.sq-card { background: var(--sq-soft); padding: 16px; }
.sq-card--line { background: #fff; border: 1px solid var(--sq-line); }
.sq-row { display: flex; gap: 12px; align-items: center; }
.sq-row--between { justify-content: space-between; }
.sq-stack > * + * { margin-top: 12px; }
.sq-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; background: var(--sq-ink); color: #fff; font-size: 14px; line-height: 1.5; }
.sq-chip--soft { background: #fff; color: var(--sq-ink); border: 1px solid var(--sq-line); }
.sq-ic { width: 24px; height: 24px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: square; stroke-linejoin: miter; }

.sq-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 700px) { .sq-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .sq-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.sq-tile { display: flex; flex-direction: column; gap: 8px; padding: 16px; background: var(--sq-soft); color: var(--sq-ink); text-decoration: none; min-height: 150px; position: relative; }
.sq-tile:hover { background: #ebeae7; color: var(--sq-ink); }
.sq-tile .sq-ic { width: 32px; height: 32px; }
.sq-tile__name { font-weight: 500; line-height: 1.25; }
.sq-tile__desc { font-size: 16px; color: var(--sq-muted); line-height: 1.35; }
.sq-tile__chip { margin-top: auto; align-self: flex-start; }
.sq-tile--off { opacity: .5; pointer-events: none; }

.sq-progress { height: 4px; background: var(--sq-line); }
.sq-progress > span { display: block; height: 100%; background: var(--sq-ink); transition: width .25s ease; }

.sq-answer { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 12px 16px; margin: 0 0 8px; background: #fff; border: 1px solid var(--sq-line); font: inherit; text-align: left; color: var(--sq-ink); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.sq-answer:hover { border-color: var(--sq-ink); }
.sq-answer.is-selected { border: 2px solid var(--sq-ink); padding: 11px 15px; }
.sq-answer.is-correct { background: var(--sq-ok); border: 2px solid var(--sq-ok-b); padding: 11px 15px; }
.sq-answer.is-wrong { background: var(--sq-bad); border: 2px solid var(--sq-bad-b); padding: 11px 15px; }
.sq-answer[disabled] { cursor: default; }
.sq-answer .sq-ic { margin-left: auto; }

.sq-error { padding: 16px; background: var(--sq-bad); }
.sq-empty { padding: 32px 16px; text-align: center; color: var(--sq-muted); }

/* Bottom navigation (mobile) / top tabs (desktop) */
.sq-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: #fff; border-top: 1px solid var(--sq-line); display: flex; padding-bottom: env(safe-area-inset-bottom); }
.sq-nav a { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 56px; color: var(--sq-muted); text-decoration: none; font-size: 12px; line-height: 1.2; }
.sq-nav a.is-active { color: var(--sq-ink); font-weight: 500; }
.sq-nav a.is-active .sq-ic { stroke-width: 2.2; }
@media (min-width: 1021px) {
  .sq-nav { position: static; border: 0; border-bottom: 1px solid var(--sq-line); max-width: 1100px; margin: 0 auto; padding: 0 16px; justify-content: flex-start; gap: 24px; background: transparent; }
  .sq-nav a { flex: 0 0 auto; flex-direction: row; gap: 8px; font-size: 16px; min-height: 48px; }
  .sq-nav a .sq-ic { width: 20px; height: 20px; }
  .sq-app { padding-bottom: 64px; }
}

/* Heart (favourite) */
.sq-heart { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; background: none; border: 0; padding: 0; cursor: pointer; color: #0e0e0e; -webkit-tap-highlight-color: transparent; }
.sq-heart .sq-ic { width: 22px; height: 22px; }
.sq-heart.is-on { color: #d4202c; }
.sq-heart.is-on .sq-ic { fill: currentColor; }
.sq-heart--abs { position: absolute; top: 0; right: 0; z-index: 3; width: 44px; height: 44px; align-items: flex-start; justify-content: flex-end; padding: 6px 6px 0 0; }
.sq-heart--abs .sq-ic { width: 20px; height: 20px; }

.sq-toast { position: fixed; left: 50%; bottom: 80px; transform: translateX(-50%); z-index: 100; background: #0e0e0e; color: #fff; padding: 12px 20px; max-width: calc(100vw - 32px); font-size: 16px; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.sq-modal { position: fixed; inset: 0; z-index: 110; background: rgba(0,0,0,.45); display: flex; align-items: flex-end; justify-content: center; }
.sq-modal__box { background: #fff; width: 100%; max-width: 520px; max-height: 90vh; overflow: auto; padding: 24px 16px calc(24px + env(safe-area-inset-bottom)); }
@media (min-width: 700px) { .sq-modal { align-items: center; } .sq-modal__box { padding: 24px; } }
.sq-modal__title { font-weight: 500; font-size: 1.25rem; margin: 0 0 12px; }
.sq-modal__actions { display: grid; gap: 8px; margin-top: 16px; }

@media (prefers-reduced-motion: reduce) {
  .sq-app *, .sq-nav *, .sq-modal * { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
.sq-app .sq-btn, .sq-app .sq-answer { scroll-margin-bottom: 88px; }

/* Hearts: no background or frame, only the outline (black) or the filled red heart */
.sq-heart, .sq-heart:hover, .sq-heart:active, .sq-heart:focus { background: none !important; box-shadow: none; }
.sq-heart .sq-ic { stroke-width: 1.8; filter: drop-shadow(0 0 1.5px rgba(255,255,255,.9)); }
.sq-heart.is-on .sq-ic { stroke: #d4202c; }

/* nav: Aktywne składniki dropdown (desktop) */
.sq-nav__dd { position: relative; display: flex; }
.sq-nav__dd-btn { display: flex; flex-direction: row; align-items: center; gap: 8px; min-height: 48px; padding: 0; border: 0; background: none; color: var(--sq-muted); font: inherit; font-size: 16px; cursor: pointer; }
.sq-nav__dd-btn .sq-ic { width: 20px; height: 20px; }
.sq-nav__dd.is-open .sq-nav__dd-btn, .sq-nav__dd-btn:hover { color: var(--sq-ink); }
.sq-nav__panel { position: absolute; top: 100%; left: -16px; z-index: 70; width: min(860px, 92vw); background: #fff; border: 1px solid var(--sq-line); box-shadow: 0 12px 28px rgba(0,0,0,.12); padding: 20px 24px 12px; }
.sq-nav__panel[hidden] { display: none; }
.sq-nav__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 20px 28px; }
.sq-nav .sq-nav__col h4 { margin: 0 0 8px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--sq-ink); border-bottom: 1px solid var(--sq-line); padding-bottom: 6px; }
.sq-nav__col ul { list-style: none; margin: 0; padding: 0; }
.sq-nav .sq-nav__col a, .sq-nav .sq-nav__foot a { min-height: 0; padding: 3px 0; font-size: 15px; display: block; color: var(--sq-ink); }
.sq-nav .sq-nav__col a:hover { text-decoration: underline; }
.sq-nav__foot { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--sq-line); }
.sq-nav .sq-nav__foot a { font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
