

:root {
  --ds-ui: 'Nunito', 'Alegreya Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ds-serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --ds-blue: #1d4ed8;
  --ds-blue-dark: #1e3a8a;
  --ds-blue-soft: #eaf1ff;
  --ds-orange: #f59e0b;
  --ds-orange-dark: #b45309;
  --ds-surface: #ffffff;
  --ds-ink: #1f2937;
  --ds-muted: #5b6678;
  --ds-line: #e2e8f0;
  --ds-line-strong: #cbd5e1;
}

body.active {
  --ds-blue: #60a5fa;
  --ds-blue-dark: #2563eb;
  --ds-blue-soft: rgba(96, 165, 250, 0.14);
  --ds-orange: #fbbf24;
  --ds-orange-dark: #f59e0b;
  --ds-surface: #111c33;
  --ds-ink: #e8edf5;
  --ds-muted: #a7b4c8;
  --ds-line: rgba(148, 163, 184, 0.24);
  --ds-line-strong: rgba(148, 163, 184, 0.4);
}

html,
body {
  overscroll-behavior-y: none;
}

body,
button,
input,
select,
textarea {
  font-family: var(--ds-ui);
}

.pl,
.ml,
.pg {
  font-family: var(--ds-ui);
}

.header .nav .nav-opcions > li > a,
.header .nav .nav-opcions .dropdown-toggle {
  font-weight: 700;
  letter-spacing: 0.1px;
}

.texto-logo,
.texto-logo a {
  margin: 0;
  font-family: var(--ds-ui);
  font-weight: 900;
}

.texto-logo,
body.active .texto-logo {
  color: var(--ds-blue);
  text-shadow: none;
}

.logo-tld {
  color: #d97706;
  font-weight: 800;
}

body.active .logo-tld {
  color: var(--ds-orange);
}

.auth-brand {
  color: var(--ds-blue);
}

.header #login-link {
  border-bottom-width: 4px;
  font-weight: 800;
}

.header #login-link:active {
  transform: translateY(2px);
  border-bottom-width: 2px;
}

.dropdown:not(.user-menu) .dropdown-menu a,
.user-menu #user-dropdown-menu .dropdown-item {
  font-family: var(--ds-ui);
  font-weight: 700;
}

.pl-btn,
.ml-btn,
.pg-btn {
  border-bottom-width: 4px;
  font-weight: 800;
  box-shadow: none;
}

.pl-btn:active,
.ml-btn:active,
.pg-btn:active,
.ml-chip:active {
  transform: translateY(2px);
  border-bottom-width: 2px;
}

.pl-btn-primary,
.ml-btn-primary,
.pg-btn-primary {
  border-color: var(--ds-blue-dark);
}

.pl-btn-ghost,
.ml-btn-ghost,
.pg-btn-ghost {
  border-color: var(--ds-line-strong);
  border-bottom-width: 4px;
}

.pl-btn-light {
  border-color: #cbd5e1;
}

.pl-btn-outline-light {
  border-bottom-width: 4px;
}

.ml-chip {
  border-width: 2px;
  border-bottom-width: 4px;
  font-weight: 800;
}

.ml-chip.is-active {
  border-color: var(--ds-blue-dark);
}

.ml-progress {
  height: 12px;
}

.ml-progress span {
  position: relative;
  background: var(--ds-orange);
}

.ml-progress span::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 6px;
  right: 6px;
  height: 3px;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 999px;
}

.ml-progress-text {
  color: var(--ds-orange-dark);
}

body.active .ml-progress-text {
  color: var(--ds-orange);
}

#myModal.modal {
  width: 340px;
  max-width: calc(100vw - 20px);
  border-radius: 16px;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  
  --pop-read-font: var(--ds-serif);
  --pop-read-fit: 1;
  --pop-pad: 12px;
  --pop-row: 30px; 
}

#myModal[data-rd-font='atkinson'] { --pop-read-font: 'Atkinson Hyperlegible', Verdana, sans-serif; --pop-read-fit: 0.98; }
#myModal[data-rd-font='opendyslexic'] { --pop-read-font: 'OpenDyslexic', Verdana, sans-serif; --pop-read-fit: 0.86; }
#myModal[data-rd-font='comic'] { --pop-read-font: 'Comic Neue', 'Comic Sans MS', cursive; --pop-read-fit: 1.04; }

#myModal.modal.opening {
  animation: translationPopIn 0.14s ease-out both;
}

@keyframes translationPopIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

#myModal .modal-content,
body.active #myModal .modal-content {
  position: relative;
  min-height: 0;
  max-height: none;
  padding: 0;
  overflow: hidden;
  background: var(--ds-surface);
  color: var(--ds-ink);
  border: 1px solid var(--ds-line-strong);
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14), 0 2px 6px rgba(15, 23, 42, 0.06);
  backdrop-filter: none;
  transition: none;
  font-family: var(--ds-ui);
}

body.active #myModal .modal-content {
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.5);
}

#myModal .modal-content:active,
#myModal .modal-content:hover {
  transform: none;
}

#myModal .modal-content::before {
  display: none;
}

#myModal #model-text {
  display: grid;
  grid-template-columns: calc(var(--pop-pad) + var(--pop-row) + 10px) minmax(0, 1fr) auto;
  grid-template-areas:
    'spk en en'
    'es es es'
    'more more more'
    'voice voice save'
    'link link link'
    'notice notice notice';
  align-items: start;
  column-gap: 0;
  padding: 0;
}

#myModal #model-text::before {
  content: '';
  grid-row: 1;
  grid-column: 1 / -1;
  align-self: stretch;
  background: var(--ds-blue-soft);
  border-bottom: 1px solid var(--ds-line);
}

#myModal #model-text::after {
  content: '';
  grid-row: 4;
  grid-column: 1 / -1;
  align-self: start;
  height: 0;
  margin: 0 var(--pop-pad);
  border-top: 1px solid var(--ds-line);
  pointer-events: none;
}

#myModal .modal-content .meaning,
#myModal .modal-content .meaning:hover,
#myModal .modal-content .meaning:active,
body.active #myModal .modal-content .meaning,
body.active #myModal .modal-content .meaning:hover {
  min-height: 0;
  margin: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  transform: none;
  transition: none;
  opacity: 1;
}

#myModal .modal-content .meaning.en,
#myModal .modal-content .meaning.definition,
#myModal .modal-content .meaning.en:hover,
#myModal .modal-content .meaning.definition:hover,
body.active #myModal .modal-content .meaning.en,
body.active #myModal .modal-content .meaning.en:hover {
  grid-area: en;
  align-self: center;
  
  padding: calc(9px + (var(--pop-row) - 1.45em) / 2) 42px 9px 0;
  font-family: var(--pop-read-font);
  font-size: calc(1rem * var(--pop-read-fit));
  font-style: normal;
  font-weight: 400;
  line-height: 1.45;
  color: var(--ds-ink);
  overflow-wrap: anywhere;
  cursor: pointer; 
}

#myModal .modal-content .meaning.es,
#myModal .modal-content .meaning.example,
#myModal .modal-content .meaning.es:hover,
#myModal .modal-content .meaning.example:hover,
body.active #myModal .modal-content .meaning.es,
body.active #myModal .modal-content .meaning.es:hover {
  grid-area: es;
  padding: 9px var(--pop-pad) 10px;
  font-family: var(--ds-ui);
  font-size: 1.06rem;
  font-style: normal;
  font-weight: 800;
  line-height: 1.35;
  color: var(--ds-ink);
  overflow-wrap: anywhere;
}

#myModal #model-text:has(.rd-mean-more) .meaning.es {
  padding-bottom: 3px;
}

#myModal .modal-content .rd-mean-more {
  grid-area: more;
  padding: 0 var(--pop-pad) 10px;
  font-family: var(--ds-ui);
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ds-muted);
  overflow-wrap: anywhere;
}

#myModal .modal-content .rd-mean-label {
  margin-right: 2px;
  font-weight: 800;
}

#myModal .modal-content .rd-mean-opt {
  font-weight: 600;
  color: var(--ds-muted);
}

#myModal .modal-content .rd-mean-note {
  font-size: 0.86em;
  font-weight: 600;
  font-style: italic;
  color: var(--ds-muted);
}

#myModal .modal-content .pronunciation-section,
#myModal .modal-content .save-phrase {
  display: contents;
}

#myModal .modal-content .pronunciation-icon {
  grid-area: spk;
  align-self: start;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--pop-row);
  height: var(--pop-row);
  margin: 9px 0 9px var(--pop-pad);
  padding: 0;
  background: var(--ds-blue);
  color: #fff;
  border: none;
  border-radius: 50%;
  box-shadow: none;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: filter 0.15s ease, background-color 0.15s ease;
}

body.active #myModal .modal-content .pronunciation-icon {
  color: #0b1220;
}

#myModal .modal-content .pronunciation-icon:hover {
  background: var(--ds-blue);
  filter: brightness(1.08);
  transform: none;
  box-shadow: none;
}

#myModal .modal-content .pronunciation-icon:active {
  transform: scale(0.94);
}

#myModal .modal-content .pronunciation-icon.speaking {
  background: var(--ds-orange);
  color: #1a1a1a;
}

#myModal .modal-content .voice-selector {
  display: none;
}

#myModal .save-phrase-btn {
  grid-area: save;
  align-self: center;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 0;
  height: 34px;
  margin: 8px var(--pop-pad) 10px 0;
  padding: 0 13px;
  background: transparent;
  border: 1.5px solid var(--ds-blue);
  border-radius: 999px;
  color: var(--ds-blue);
  font-family: var(--ds-ui);
  font-size: 0.84rem;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: none;
  transform: none;
}

#myModal .save-phrase-btn:hover,
#myModal .save-phrase-btn:focus-visible {
  background: var(--ds-blue-soft);
  transform: none;
}

#myModal .save-phrase-btn.is-saved {
  background: var(--ds-blue);
  border-color: var(--ds-blue);
  color: #fff;
}

body.active #myModal .save-phrase-btn.is-saved {
  color: #0b1220;
}

#myModal .save-phrase-link {
  grid-area: link;
  justify-self: end;
  margin: -4px var(--pop-pad) 12px;
  color: var(--ds-blue);
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
}

#myModal .save-phrase-link:hover {
  text-decoration: underline;
}

#myModal #model-text.has-from-here {
  grid-template-areas:
    'spk en en'
    'es es es'
    'more more more'
    'save save from'
    'link link link'
    'notice notice notice';
}

#myModal #model-text.has-from-here .save-phrase-btn {
  justify-self: stretch;
  justify-content: center;
  min-width: 0;
  margin: 8px 8px 10px var(--pop-pad);
  padding: 0 10px;
}

#myModal .rd-from-here {
  grid-area: from;
  align-self: center;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  margin: 8px var(--pop-pad) 10px 0;
  padding: 0 12px 0 9px;
  background: var(--ds-blue-soft);
  border: 1.5px solid transparent;
  border-radius: 999px;
  color: var(--ds-blue);
  font-family: var(--ds-ui);
  font-size: 0.84rem;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

#myModal .rd-from-here i {
  font-size: 1rem;
}

#myModal .rd-from-here:hover,
#myModal .rd-from-here:focus-visible {
  border-color: var(--ds-blue);
}

#myModal .rd-from-short {
  display: none;
}

@media (max-width: 380px) {
  #myModal .rd-from-long { display: none; }
  #myModal .rd-from-short { display: inline; }
}

@media (pointer: coarse) {
  #myModal .save-phrase-btn,
  #myModal .rd-from-here {
    height: 44px;
    font-size: 0.88rem;
  }
}

#myModal .save-phrase-notice {
  grid-area: notice;
  margin: 0 var(--pop-pad) 12px;
  padding: 9px 11px;
  background: var(--ds-blue-soft);
  border: 0;
  border-radius: 10px;
  color: var(--ds-ink);
  font-size: 0.82rem;
  line-height: 1.4;
}

#myModal .save-phrase-notice a {
  color: var(--ds-blue);
  font-weight: 800;
  text-decoration: none;
}

#myModal .save-phrase-notice a:hover {
  text-decoration: underline;
}

#myModal .close,
body.active #myModal .close {
  position: absolute;
  top: calc(9px + (var(--pop-row) - 36px) / 2);
  right: 8px;
  z-index: 2;
  display: block;
  float: none;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  margin: 0;
  padding: 0;
  color: var(--ds-muted);
  background: transparent;
  border-radius: 50%;
  font-size: 0;
  line-height: 0;
  text-shadow: none;
  opacity: 1;
  cursor: pointer;
  transform: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

#myModal .close::before,
#myModal .close::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 2px;
  margin: -1px 0 0 -7px;
  background: currentColor;
  border-radius: 2px;
  transform: rotate(45deg);
}

#myModal .close::after {
  transform: rotate(-45deg);
}

#myModal .close:hover,
#myModal .close:focus-visible,
body.active #myModal .close:hover {
  background: rgba(148, 163, 184, 0.2);
  color: var(--ds-ink);
  transform: none;
}

@media (max-width: 600px) {
  #myModal.modal {
    width: min(calc(100vw - 20px), 360px);
    max-width: calc(100vw - 20px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  #myModal .close {
    right: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #myModal.modal.opening {
    animation: none;
  }
}

:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid #f5b301;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .modal.opening,
  .modal.closing {
    animation: none !important;
  }
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--ds-ui);
}

body .login-container,
body .register-container,
body .forgot-container {
  border: 2px solid var(--ds-line);
  border-bottom-width: 5px;
  border-radius: 24px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.1);
}

body .login-header h1,
body .register-header h1,
body .forgot-header h1 {
  font-family: var(--ds-ui);
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: var(--ds-ink);
}

body .login-header p,
body .register-header p,
body .forgot-header p {
  font-weight: 600;
  color: var(--ds-muted);
}

body .form-group label {
  font-weight: 800;
  color: var(--ds-ink);
}

body .form-group input {
  border: 2px solid var(--ds-line-strong);
  border-bottom-width: 4px;
  border-radius: 14px;
  font-family: var(--ds-ui);
  font-weight: 600;
}

body .form-group input:focus {
  border-color: var(--ds-blue);
  box-shadow: none;
}

body .login-button,
body .register-button,
body .forgot-button {
  background: var(--ds-blue);
  color: #fff;
  border: 2px solid var(--ds-blue-dark);
  border-bottom-width: 5px;
  border-radius: 14px;
  box-shadow: none;
  font-family: var(--ds-ui);
  font-size: 1.1rem;
  font-weight: 800;
  transition: transform 0.1s ease, filter 0.15s ease;
}

body .login-button:hover:not(:disabled),
body .register-button:hover:not(:disabled),
body .forgot-button:hover:not(:disabled) {
  background: var(--ds-blue);
  filter: brightness(1.08);
  transform: none;
  box-shadow: none;
}

body .login-button:active:not(:disabled),
body .register-button:active:not(:disabled),
body .forgot-button:active:not(:disabled) {
  transform: translateY(3px);
  border-bottom-width: 2px;
}

body .register-link,
body .forgot-link,
body .login-link {
  border: 2px solid var(--ds-line-strong);
  border-bottom-width: 4px;
  border-radius: 14px;
  font-weight: 800;
  background: var(--ds-surface);
  color: var(--ds-blue);
}

body .register-link:hover,
body .forgot-link:hover,
body .login-link:hover {
  background: var(--ds-blue-soft);
  border-color: var(--ds-blue);
}

body .back-link {
  font-weight: 800;
  color: var(--ds-blue);
}

body:not(.is-logged-in) .header .nav .nav-opcions > li.nav-auth-only {
  display: none !important;
}

body.is-logged-in .header .nav .nav-opcions > li.nav-guest-only {
  display: none !important;
}

.header .texto-logo,
.header .texto-logo a {
  flex-shrink: 0;
  white-space: nowrap;
}
@media (min-width: 1121px) and (max-width: 1300px) {
  .header .nav .nav-opcions > li > a:not(#login-link) {
    padding-left: 10px;
    padding-right: 10px;
  }
}

footer.footer.site-footer {
  all: unset !important;
  display: block !important;
  box-sizing: border-box !important;
  width: 100% !important;
  margin-top: auto !important;
  flex-shrink: 0 !important;
  position: relative !important;
  z-index: 10 !important;
  font-family: var(--ds-ui) !important;
  
  background: linear-gradient(to bottom, transparent 0 var(--sf-hill-h), var(--sf-hill) var(--sf-hill-h)) !important;
  color: var(--ds-ink) !important;
  border-top: 0 !important;
  box-shadow: none !important;
  padding: calc(var(--sf-hill-h) + 8px) 24px 16px !important;
}
body.active footer.footer.site-footer {
  background: linear-gradient(to bottom, transparent 0 var(--sf-hill-h), var(--sf-hill) var(--sf-hill-h)) !important;
  color: var(--ds-ink) !important;
  border-top: 0 !important;
  box-shadow: none !important;
}

body:has(.pl),
body:has(.pg) { background-color: #f6f8fc; }
body.active:has(.pl),
body.active:has(.pg) { background-color: #0b1220; }
footer.footer.site-footer { --sf-hill: #dbe6ff; --sf-hill-h: 90px; }
body.active footer.footer.site-footer { --sf-hill: #12244f; }

footer.footer.site-footer .sf-hill {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: var(--sf-hill-h);
  overflow: hidden;
  pointer-events: none;
}
footer.footer.site-footer .sf-hill svg.sf-hill-edge,
body.active footer.footer.site-footer .sf-hill svg.sf-hill-edge {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  color: var(--sf-hill);
}
footer.footer.site-footer .sf-hill svg.sf-rose,
body.active footer.footer.site-footer .sf-hill svg.sf-rose {
  position: absolute;
  left: 12%;
  bottom: 14px;
  width: 16px !important;
  height: 28px !important;
}
footer.footer.site-footer .sf-walk {
  position: absolute;
  left: 2%;
  bottom: 8px;
  animation: sf-walk 40s ease-in-out infinite alternate;
}
footer.footer.site-footer .sf-hill svg.sf-fox,
body.active footer.footer.site-footer .sf-hill svg.sf-fox {
  display: block;
  width: 38px !important;
  height: 44px !important;
  animation: sf-step 0.5s ease-in-out infinite;
}
footer.footer.site-footer .sf-fox-tail {
  transform-box: fill-box;
  transform-origin: 0% 100%;
  animation: sf-tail 1.4s ease-in-out infinite alternate;
}

@keyframes sf-walk { from { left: 2%; } to { left: calc(100% - 50px); } }
@keyframes sf-step { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes sf-tail { from { transform: rotate(-7deg); } to { transform: rotate(9deg); } }

@media (prefers-reduced-motion: reduce) {
  footer.footer.site-footer .sf-walk { animation: none; left: calc(12% + 30px); }
  footer.footer.site-footer .sf-hill svg.sf-fox,
  footer.footer.site-footer .sf-fox-tail { animation: none; }
}
footer.footer.site-footer .sf-inner {
  display: grid !important;
  grid-template-columns: 1.5fr 1.2fr 1.3fr;
  gap: 20px 40px;
  max-width: 1120px;
  margin: 0 auto;
  text-align: left;
}
footer.footer.site-footer p,
body.active footer.footer.site-footer p {
  all: unset !important;
  display: block !important;
  font-family: var(--ds-ui) !important;
  font-size: 0.92rem !important;
  line-height: 1.5 !important;
  color: var(--ds-muted) !important;
  text-shadow: none !important;
}
footer.footer.site-footer h2,
body.active footer.footer.site-footer h2 {
  font-family: var(--ds-ui) !important;
  font-size: 0.78rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  color: var(--ds-ink) !important;
  margin: 0 0 8px !important;
  padding: 0 !important;
  border: 0 !important;
}
footer.footer.site-footer a,
body.active footer.footer.site-footer a {
  all: unset !important;
  cursor: pointer !important;
  box-sizing: border-box !important;
  font-family: var(--ds-ui) !important;
  color: var(--ds-muted) !important;
  filter: none !important;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease !important;
}
footer.footer.site-footer a:hover,
footer.footer.site-footer a:focus-visible,
body.active footer.footer.site-footer a:hover,
body.active footer.footer.site-footer a:focus-visible {
  color: var(--ds-blue) !important;
  transform: none !important;
  filter: none !important;
}
footer.footer.site-footer a:focus-visible {
  outline: 2px solid var(--ds-orange) !important;
  outline-offset: 3px !important;
  border-radius: 6px !important;
}
footer.footer.site-footer .sf-logo,
body.active footer.footer.site-footer .sf-logo {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  font-size: 1.15rem !important;
  font-weight: 800 !important;
  color: var(--ds-ink) !important;
  margin-bottom: 6px !important;
}
footer.footer.site-footer .sf-logo img { width: 32px !important; height: 32px !important; border-radius: 8px !important; }
footer.footer.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px 28px; }
footer.footer.site-footer .sf-links ul { grid-template-columns: repeat(2, max-content); }
footer.footer.site-footer .sf-links a,
body.active footer.footer.site-footer .sf-links a {
  display: inline-block !important;
  padding: 2px 0 !important;
  font-size: 0.95rem !important;
  font-weight: 600 !important;
}
footer.footer.site-footer .social-media {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  padding: 0 !important;
  justify-content: flex-start !important;
  background: none !important;
}
footer.footer.site-footer .social-media a,
body.active footer.footer.site-footer .social-media a {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 38px !important;
  height: 38px !important;
  border: 2px solid var(--ds-line-strong) !important;
  border-bottom-width: 3px !important;
  border-radius: 11px !important;
  background: var(--ds-surface) !important;
  color: var(--ds-ink) !important;
}
footer.footer.site-footer .social-media a:hover,
body.active footer.footer.site-footer .social-media a:hover {
  border-color: var(--ds-orange) !important;
  color: var(--ds-orange-dark) !important;
}
footer.footer.site-footer svg,
body.active footer.footer.site-footer svg {
  width: 20px !important;
  height: 20px !important;
  fill: currentColor !important;
  filter: none !important;
}
footer.footer.site-footer .sf-contact-text { margin: 0 0 10px !important; }

footer.footer.site-footer .sf-bottom {
  display: flex !important;
  justify-content: space-between !important;
  flex-wrap: wrap !important;
  gap: 4px 20px !important;
  max-width: 1120px;
  margin: 18px auto 0;
  padding-top: 12px;
  border-top: 1px solid var(--ds-line-strong);
}
footer.footer.site-footer .sf-bottom p,
body.active footer.footer.site-footer .sf-bottom p {
  font-size: 0.82rem !important;
}
footer.footer.site-footer .sf-bottom .sf-licence {
  flex-basis: 100%;
  margin: 0;
  opacity: 0.8;
  font-size: 0.75rem !important;
  line-height: 1.45 !important;
}
footer.footer.site-footer .sf-bottom .sf-licence a { text-decoration: underline; }

@media (max-width: 1000px) {
  footer.footer.site-footer .sf-inner { grid-template-columns: 1fr 1fr; gap: 16px 32px; }
  footer.footer.site-footer .sf-social {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 2px 24px;
  }
  footer.footer.site-footer .sf-social h2 { grid-column: 1 / -1; margin-bottom: 4px !important; }
  footer.footer.site-footer .sf-social .sf-contact-text { margin: 0 !important; }
}

@media (max-width: 760px) {
  footer.footer.site-footer { --sf-hill-h: 64px; padding: calc(var(--sf-hill-h) + 6px) 16px 12px !important; }
  footer.footer.site-footer .sf-inner { grid-template-columns: 1fr; gap: 12px; }
  footer.footer.site-footer .sf-logo { margin-bottom: 2px !important; font-size: 1.05rem !important; }
  footer.footer.site-footer .sf-logo img { width: 28px !important; height: 28px !important; }
  footer.footer.site-footer .sf-tagline { font-size: 0.88rem !important; }
  
  footer.footer.site-footer .sf-links h2 {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    white-space: nowrap !important;
  }
  footer.footer.site-footer .sf-links ul { display: flex; flex-wrap: wrap; gap: 0 18px; }
  footer.footer.site-footer .sf-links a,
  body.active footer.footer.site-footer .sf-links a { padding: 4px 0 !important; font-size: 0.92rem !important; }
  
  footer.footer.site-footer .sf-tagline,
  footer.footer.site-footer .sf-contact-text,
  footer.footer.site-footer .sf-bottom p { text-wrap: balance !important; }
  footer.footer.site-footer .sf-social { display: block; }
  footer.footer.site-footer .sf-social h2 { margin-bottom: 2px !important; }
  footer.footer.site-footer .sf-social .sf-contact-text { margin: 0 0 8px !important; font-size: 0.85rem !important; }
  footer.footer.site-footer .social-media { gap: 8px !important; }
  footer.footer.site-footer .sf-bottom { flex-direction: column; text-align: left; gap: 2px !important; margin-top: 12px; padding-top: 10px; }
  footer.footer.site-footer .sf-bottom p,
  body.active footer.footer.site-footer .sf-bottom p { font-size: 0.78rem !important; }
  footer.footer.site-footer .sf-bottom .sf-licence { font-size: 0.75rem !important; margin-top: 4px; text-wrap: pretty !important; }
}

@media (max-width: 420px) {
  footer.footer.site-footer .sf-links ul { display: grid; grid-template-columns: repeat(3, max-content); justify-content: space-between; gap: 0 12px; }
}

@media (max-width: 380px) {
  footer.footer.site-footer .social-media {
    gap: 6px !important;
  }
  footer.footer.site-footer .social-media a,
  body.active footer.footer.site-footer .social-media a {
    width: 36px !important;
    height: 36px !important;
  }
  footer.footer.site-footer .social-media svg {
    width: 19px !important;
    height: 19px !important;
  }
}

@media (max-width: 1120px) {
  .header { padding: 0 16px; }

.header label[for="toggle"] {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 44px;
    height: 44px;
    margin: 0 -10px 0 0;
    border-radius: 12px;
    color: var(--ds-ink);
    -webkit-tap-highlight-color: transparent;
  }
  .header label[for="toggle"] .img-menu { display: none; }
  .header label[for="toggle"]::before,
  .header label[for="toggle"]::after {
    content: "";
    position: absolute;
    left: 11px;
    width: 22px;
    height: 2.5px;
    border-radius: 2px;
    background: currentColor;
    transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.2s ease;
  }
  .header label[for="toggle"]::before {
    top: 15px;
    box-shadow: 0 7px 0 currentColor, 0 14px 0 currentColor;
  }
  .header label[for="toggle"]::after { top: 21px; opacity: 0; }
  #toggle:checked + label[for="toggle"]::before {
    top: 21px;
    box-shadow: none;
    transform: rotate(45deg);
  }
  #toggle:checked + label[for="toggle"]::after {
    opacity: 1;
    transform: rotate(-45deg);
  }
  #toggle:focus-visible + label[for="toggle"] {
    outline: 3px solid var(--ds-blue);
    outline-offset: 2px;
  }

body:has(#toggle:checked)::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 999;
  }

.header .nav {
    max-height: calc(100vh - 80px);
    max-height: calc(100dvh - 80px);
    overflow-y: auto;
    overscroll-behavior: contain;
    box-sizing: border-box;
    padding: 4px 16px 20px;
  }
  body .header .nav,
  body.active .header .nav {
    background: var(--ds-surface) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-bottom: 1px solid var(--ds-line) !important;
    box-shadow: 0 18px 32px rgba(15, 23, 42, 0.22) !important;
  }
  body .header .nav .nav-opcions,
  body.active .header .nav .nav-opcions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    margin: 0;
    padding: 0;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  body .header .nav .nav-opcions > li {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    background: transparent;
    transform: none;
    text-shadow: none;
  }

body .header .nav .nav-opcions > li > a,
  body .header .nav .nav-opcions > li > a.dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
    width: 100%;
    min-height: 56px;
    padding: 0 4px !important;
    font-family: var(--ds-ui);
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 0;
    color: var(--ds-ink) !important;
    background: transparent !important;
    border: 0 !important;
    border-bottom: 1px solid var(--ds-line) !important;
    transform: none !important;
  }
  body .header .nav .nav-opcions > li > a:hover,
  body .header .nav .nav-opcions > li > a:active {
    color: var(--ds-blue) !important;
    background: var(--ds-blue-soft) !important;
  }
  body .header .nav .nav-opcions > li > a.active {
    color: var(--ds-blue) !important;
    border-bottom: 1px solid var(--ds-line) !important;
  }

body .header .nav .nav-opcions > li.MDark {
    order: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
    min-height: 60px;
    padding: 0 4px;
    border-bottom: 1px solid var(--ds-line);
  }
  .header .nav .MDark::before {
    content: "Modo oscuro";
    font-family: var(--ds-ui);
    font-size: 18px;
    font-weight: 800;
    color: var(--ds-ink);
  }

body.is-logged-in .header .nav .nav-opcions > li#auth-state {
    order: -1;
    padding: 6px 0;
    border-bottom: 1px solid var(--ds-line);
  }

body .header .nav .nav-opcions > li#auth-state {
    order: 2;
    padding: 16px 0 0;
  }
  body .header .nav .nav-opcions #login-link,
  body.active .header .nav .nav-opcions #login-link {
    display: flex !important;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    height: auto !important;
    line-height: 1.2;
    text-align: center;
    min-height: 52px;
    padding: 0 !important;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 0.2px;
    
    color: var(--ds-ink) !important;
    background: transparent !important;
    border: 2px solid var(--accent-gold, #f59e0b) !important;
    border-bottom-width: 4px !important;
    border-radius: 14px;
    text-shadow: none;
  }
  body.active .header .nav .nav-opcions #login-link {
    color: #f1f5f9 !important;
    background: transparent !important;
    border-color: var(--accent-gold, #f59e0b) !important;
  }
  body .header .nav .nav-opcions #login-link:active {
    transform: translateY(2px) !important;
    border-bottom-width: 2px !important;
  }

body .header .nav .nav-opcions #login-link[style*="display: none"],
  body.active .header .nav .nav-opcions #login-link[style*="display: none"],
  body .header .nav #user-menu[style*="display: none"] {
    display: none !important;
  }

body .header .nav #user-menu {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    height: auto;
  }
  body .header .nav #user-menu .dropdown-trigger {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
    padding: 4px 0;
  }
  
  body .header .nav #user-menu .dropdown-trigger::after {
    content: "Mi cuenta";
    order: 2;
    font-size: 17px;
    font-weight: 800;
    color: var(--ds-ink);
  }
  body .header .nav #user-menu .dropdown-trigger .user-avatar-circle { order: 1; }
  body .header .nav #user-menu .dropdown-trigger .dropdown-arrow { order: 3; margin-left: auto; }
  body .header .nav #user-menu #user-dropdown-menu {
    display: none !important;
    position: static !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 8px 0 0 !important;
    box-sizing: border-box;
    box-shadow: none !important;
  }
  body .header .nav #user-menu #user-dropdown-menu.show { display: block !important; }
}
