:root{
  --bg:#f3f6fb;
  --surface:#ffffff;
  --surface-2:#f8fafc;
  --text:#18212f;
  --muted:#667085;
  --line:#e7ecf3;
  --primary:#4568f2;
  --primary-strong:#3554d6;
  --primary-soft:#eef3ff;
  --accent:#18a0a6;
  --success:#14b86a;
  --warning:#f59e0b;
  --danger:#e5484d;
  --shadow-sm:0 6px 18px rgba(20, 28, 45, .06);
  --shadow-md:0 14px 38px rgba(20, 28, 45, .1);
  --radius-sm:10px;
  --radius-md:16px;
  --radius-lg:22px;
  --sidebar-width:300px;
  --content-max:1120px;
}

*,
*::before,
*::after{
  box-sizing:border-box;
}

html{
  scroll-behavior:smooth;
}

body.page-body{
  margin:0;
  background:radial-gradient(circle at top left, #f8fbff 0, #f3f6fb 36%, #eef3f9 100%);
  color:var(--text);
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  line-height:1.55;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}

a{
  color:var(--primary-strong);
  text-decoration:none;
}

a:hover{
  text-decoration:underline;
}

img{
  max-width:100%;
  display:block;
}

button,
input,
select,
textarea{
  font:inherit;
}

.page-shell{
  display:grid;
  grid-template-columns:var(--sidebar-width) minmax(0,1fr);
  min-height:100vh;
}

.main-content{
  min-width:0;
  padding:24px;
}

.sidebar{
  position:sticky;
  top:0;
  height:100vh;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  overflow:auto;
  background:rgba(255,255,255,.88);
  backdrop-filter:blur(16px);
  border-inline-end:1px solid rgba(231,236,243,.9);
  padding:20px 18px 18px;
  z-index:40;
}

.sidebar-main{
  display:block;
}

.sidebar-footer{
  margin-top:20px;
  padding-top:14px;
  border-top:1px solid var(--line);
}

.sidebar-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:18px;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  font-weight:800;
  color:var(--text);
  text-decoration:none !important;
  min-width:0;
}

.brand-mark{
  width:42px;
  height:42px;
  border-radius:14px;
  display:grid;
  place-items:center;
  color:#fff;
  font-weight:900;
  background:linear-gradient(135deg,var(--primary),#7d9cff);
  box-shadow:0 10px 22px rgba(69,104,242,.24);
  flex:0 0 auto;
}

.brand-text{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.sidebar-close{
  display:none;
  width:40px;
  height:40px;
  border:none;
  border-radius:12px;
  background:var(--surface-2);
  color:var(--text);
  cursor:pointer;
  font-size:1.35rem;
}

.sidebar-nav{
  display:grid;
  gap:8px;
}

.sidebar-nav-top{
  margin:18px 0 18px;
}

.sidebar-link{
  display:flex;
  align-items:center;
  gap:10px;
  padding:11px 13px;
  border-radius:12px;
  color:var(--text);
  font-weight:700;
  background:transparent;
  transition:background-color .2s ease, transform .15s ease, color .2s ease;
}

.sidebar-link:hover{
  background:var(--primary-soft);
  color:var(--primary-strong);
  text-decoration:none;
  transform:translateY(-1px);
}

.sidebar-link-icon{
  width:20px;
  height:20px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:var(--primary-strong);
  flex:0 0 auto;
}

.sidebar-link-icon svg{
  width:20px;
  height:20px;
  display:block;
}

.sidebar-section{
  margin-top:18px;
  padding:16px;
  border-radius:18px;
  background:linear-gradient(180deg,#ffffff, #fbfcff);
  border:1px solid var(--line);
  box-shadow:var(--shadow-sm);
}

.sidebar-title{
  margin:0 0 14px;
  font-size:1rem;
  line-height:1.2;
  display:flex;
  align-items:center;
  gap:10px;
}

.sidebar-overlay{
  position:fixed;
  inset:0;
  background:rgba(15,23,42,.45);
  opacity:0;
  visibility:hidden;
  transition:opacity .2s ease, visibility .2s ease;
  z-index:30;
}

.page-body.sidebar-open .sidebar-overlay{
  opacity:1;
  visibility:visible;
}

.page-body.sidebar-open{
  overflow:hidden;
}

.topbar{
  display:none;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-bottom:18px;
}

.menu-toggle{
  width:46px;
  height:46px;
  border:none;
  border-radius:14px;
  background:var(--surface);
  box-shadow:var(--shadow-sm);
  color:var(--text);
  cursor:pointer;
  font-size:1.25rem;
}

.brand-mobile{
  flex:1 1 auto;
  min-width:0;
}

.breadcrumb{
  max-width:var(--content-max);
  margin:0 auto 18px;
  color:var(--muted);
  font-size:.95rem;
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
}

.breadcrumb a{
  color:var(--muted);
}

.breadcrumb-icon{
  margin-inline-end:6px;
}

.breadcrumb-sep{
  opacity:.6;
}

.hero-card,
.content-card,
.ad-card{
  max-width:var(--content-max);
  margin:0 auto 22px;
  background:rgba(255,255,255,.92);
  border:1px solid rgba(231,236,243,.92);
  border-radius:var(--radius-lg);
  box-shadow:var(--shadow-md);
}

.hero-card{
  padding:30px 28px;
  position:relative;
  overflow:hidden;
}

.hero-card::after{
  content:"";
  position:absolute;
  inset:auto -120px -120px auto;
  width:280px;
  height:280px;
  border-radius:50%;
  background:radial-gradient(circle, rgba(69,104,242,.13), rgba(69,104,242,0));
  pointer-events:none;
}

.eyebrow{
  margin:0 0 10px;
  color:var(--primary-strong);
  font-weight:800;
  letter-spacing:.02em;
  text-transform:uppercase;
  font-size:.82rem;
}

.hero-card h1{
  margin:0 0 12px;
  font-size:clamp(1.8rem, 3vw, 2.7rem);
  line-height:1.15;
}

.hero-intro{
  margin:0 0 18px;
  max-width:820px;
  color:#38465b;
  font-size:1.05rem;
}

.definition-link{
  margin:10px 0 0;
  color:#415066;
}

.hero-actions{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-top:22px;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:46px;
  padding:12px 18px;
  border:none;
  border-radius:999px;
  font-weight:800;
  cursor:pointer;
  text-decoration:none !important;
  transition:transform .15s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease, opacity .2s ease;
}

.btn:hover{
  transform:translateY(-1px);
}

.btn:disabled{
  opacity:.65;
  cursor:not-allowed;
  transform:none;
}

.btn-primary{
  background:linear-gradient(135deg,var(--primary),#6283ff);
  color:#fff;
  box-shadow:0 14px 26px rgba(69,104,242,.22);
}

.btn-primary:hover{
  background:linear-gradient(135deg,var(--primary-strong),#5676f7);
}

.btn-secondary{
  background:var(--primary-soft);
  color:var(--primary-strong);
}

.btn-secondary:hover{
  background:#e4ecff;
}

.btn-icon{
  font-size:1rem;
  line-height:1;
}

.content-card{
  padding:22px 22px 24px;
}

.content-card h2{
  margin:0 0 14px;
  font-size:1.35rem;
  line-height:1.2;
}

.section-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin-bottom:10px;
}

.section-title-icon{
  margin-inline-end:6px;
}

.definition-card .definition-text{
  color:#324053;
  font-size:1.03rem;
}

.sentence-list{
  display:grid;
  gap:16px;
}

.sentence-card{
  background:linear-gradient(180deg,#fff, #fcfdff);
  border:1px solid var(--line);
  border-radius:18px;
  padding:18px 18px 20px;
  box-shadow:var(--shadow-sm);
}

.sentence-card-cta{
  text-align:center;
}

.sentence-text{
  margin:0;
  font-size:1.15rem;
  line-height:1.75;
  color:var(--text);
}

.sentence-line{
  display:flex;
  align-items:flex-start;
  gap:12px;
}

.sentence-number{
  flex:0 0 auto;
  min-width:2ch;
  color:var(--muted);
  font-weight:800;
  font-size:1rem;
  line-height:1.75;
  user-select:none;
}

.sentence-actions{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
  margin-top:12px;
  font-size:.85rem;
}

.action-link{
  display:inline-flex;
  align-items:center;
  gap:5px;
  border:none;
  background:transparent;
  color:var(--primary-strong);
  cursor:pointer;
  padding:0;
  font-weight:700;
  font-size:.85rem;
}

.action-link:hover{
  text-decoration:underline;
}

.action-link-danger{
  color:var(--danger);
}

.action-icon{
  width:14px;
  height:14px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 14px;
  color:currentColor;
  line-height:1;
  font-size:.78rem;
}

.action-icon svg{
  width:14px;
  height:14px;
  display:block;
}

.action-icon-danger{
  color:var(--danger);
  font-weight:900;
}

.action-link.is-copied{
  color:var(--success);
}

.sidebar-link-button{
  width:100%;
  border:none;
  cursor:pointer;
  text-align:start;
  font:inherit;
}

.page-body.images-hidden .sentence-figure{
  display:none;
}

.sentence-word a{
  color:var(--text);
  text-decoration:none;
  border-bottom:2px solid rgba(69,104,242,.28);
  padding-bottom:1px;
}

.sentence-word a:hover{
  color:var(--primary-strong);
  border-bottom-color:rgba(69,104,242,.62);
}

.sentence-actions{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
  margin-top:12px;
  font-size:.9rem;
}

.action-link{
  border:none;
  background:transparent;
  color:var(--primary-strong);
  cursor:pointer;
  padding:0;
  font-weight:700;
  font-size:.9rem;
}

.action-link:hover{
  text-decoration:underline;
}

.action-sep{
  color:#a0a9b8;
  font-size:.85rem;
}

.sentence-actions.desactivado{
  opacity:.55;
  pointer-events:none;
}

.sentence-actions.activado{
  opacity:1;
}

.ajax-result{
  margin-top:14px;
  min-height:0;
  border-radius:16px;
  background:var(--surface-2);
  border:1px dashed var(--line);
  padding:0;
  overflow:hidden;
}

.ajax-result.has-content{
  padding:14px 15px;
}

.ajax-result-large.has-content{
  min-height:80px;
}

.ajax-result.is-loading{
  padding:18px 15px;
}

.loading-box{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:42px;
}

.loading-dots{
  display:flex;
  gap:8px;
}

.loading-dot{
  width:11px;
  height:11px;
  border-radius:50%;
  background:var(--primary);
  animation:loading-bounce 1s infinite ease-in-out;
}

.loading-dot:nth-child(2){ animation-delay:.14s; }
.loading-dot:nth-child(3){ animation-delay:.28s; }

@keyframes loading-bounce{
  0%, 80%, 100%{ transform:scale(.7); opacity:.45; }
  40%{ transform:scale(1); opacity:1; }
}

.sentence-figure{
  margin:16px 0 0;
  border-radius:18px;
  overflow:hidden;
  background:#fff;
  border:1px solid var(--line);
}

.sentence-figure img{
  width:100%;
  height:auto;
  object-fit:cover;
  background:#eef3f8;
}

.share-row{
  padding:14px;
  background:#fff;
  border-top:1px solid var(--line);
}

.share-row-icons{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  justify-content:flex-end;
  align-items:center;
}

.share-circle{
  width:40px;
  height:40px;
  border-radius:50%;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none !important;
  box-shadow:var(--shadow-sm);
  transition:transform .15s ease, box-shadow .2s ease;
  overflow:hidden;
}

.share-circle:hover{
  transform:translateY(-1px);
}

.share-circle svg{
  width:18px;
  height:18px;
  display:block;
  flex:0 0 18px;
  fill:currentColor;
}

.share-circle.facebook svg{
  width:16px;
  height:16px;
}

.share-circle img{
  display:block;
  max-width:18px;
  max-height:18px;
  background:transparent !important;
  border:none !important;
  box-shadow:none !important;
}

.share-circle.pinterest{ background:#dd4b39; color:#fff; }
.share-circle.facebook{ background:#3b5998; color:#fff; }
.share-circle.whatsapp{ background:#4dc247; color:#fff; }
.share-circle.email{ background:#64748b; color:#fff; }

.related-words{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.related-word{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 14px;
  border-radius:999px;
  background:var(--primary-soft);
  color:var(--primary-strong);
  font-weight:700;
  text-decoration:none !important;
  transition:transform .15s ease, background-color .2s ease;
}

.related-word:hover{
  background:#e3ebff;
  transform:translateY(-1px);
}

.letters-grid{
  display:grid;
  gap:10px;
}

.letters-grid-5{
  grid-template-columns:repeat(5, minmax(0,1fr));
}

.letters-grid-10{
  grid-template-columns:repeat(10, minmax(0,1fr));
}

.letter-pill{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:46px;
  border-radius:14px;
  background:#fff;
  border:1px solid var(--line);
  color:var(--text);
  font-weight:800;
  text-decoration:none !important;
  box-shadow:var(--shadow-sm);
  transition:transform .15s ease, border-color .2s ease, color .2s ease, background-color .2s ease;
}

.letter-pill:hover{
  transform:translateY(-1px);
  border-color:#cfd9ea;
  color:var(--primary-strong);
  background:#fbfdff;
}

.estiloul,
.tools-list{
  margin:0;
  padding:0;
  list-style:none;
}

.estiloul li,
.tools-list li{
  margin:0 0 10px;
}

.estiloul a,
.tools-list a{
  display:flex;
  align-items:center;
  gap:10px;
  padding:13px 15px;
  border-radius:14px;
  background:#fff;
  border:1px solid var(--line);
  color:var(--text);
  font-weight:700;
  box-shadow:var(--shadow-sm);
  text-decoration:none !important;
  transition:transform .15s ease, background-color .2s ease, color .2s ease;
  position:relative;
}

.estiloul a:hover,
.tools-list a:hover{
  transform:translateY(-1px);
  background:var(--primary-soft);
  color:var(--primary-strong);
}

.tools-list li:nth-child(1) a::before{ content:"✨"; }
.tools-list li:nth-child(2) a::before{ content:"🔎"; }
.tools-list li:nth-child(3) a::before{ content:"💡"; }
.tools-list li:nth-child(4) a::before{ content:"🧠"; }
.tools-list li:nth-child(5) a::before{ content:"📖"; }
.tools-list li:nth-child(6) a::before{ content:"📝"; }
.tools-list li:nth-child(7) a::before{ content:"♻️"; }
.tools-list li:nth-child(8) a::before{ content:"✅"; }
.tools-list li:nth-child(9) a::before{ content:"🔢"; }

.tools-list a::before{
  width:22px;
  text-align:center;
  flex:0 0 22px;
  font-size:1rem;
}

.ad-card{
  padding:16px;
  overflow:hidden;
}

.ad-wrapper{
  display:flex;
  justify-content:center;
  align-items:center;
  min-height:100px;
}

.ad-300x250,
.ad-728x90,
.ad-970x250{
  display:none !important;
}

@media (max-width:600px){
  .ad-300x250{ display:block !important; }
}
@media (min-width:601px) and (max-width:1199px){
  .ad-728x90{ display:block !important; }
}
@media (min-width:1200px){
  .ad-970x250{ display:block !important; }
}

.site-footer{
  max-width:var(--content-max);
  margin:0 auto 18px;
  padding:24px 6px 6px;
  color:var(--muted);
  text-align:center;
  font-size:.95rem;
}

/* IA SECTION FIXED */
.ai-card{
  padding:24px;
}

.ai-intro{
  margin:0 0 18px;
  color:#425267;
  font-size:1.02rem;
}

#myForm{
  width:100%;
  margin:0;
}

#myForm .form-card{
  background:linear-gradient(180deg,#ffffff,#fbfdff);
  border:1px solid var(--line);
  border-radius:20px;
  box-shadow:var(--shadow-sm);
  padding:20px;
}

.ai-form-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
}

.ai-form-grid .field-full{
  grid-column:1 / -1;
}

.novedades_texto_IA{
  margin:0;
}

#myForm label{
  display:block;
  margin-bottom:8px;
  color:var(--text);
  font-weight:700;
  font-size:.96rem;
}

#myForm textarea,
#myForm select{
  width:100%;
  box-sizing:border-box;
  padding:12px 14px;
  border:1px solid #d9e1ee;
  border-radius:14px;
  background:#fff;
  color:var(--text);
  line-height:1.4;
  outline:none;
  transition:border-color .2s ease, box-shadow .2s ease;
}

#myForm textarea{
  min-height:58px;
  resize:vertical;
}

#myForm textarea::placeholder{
  color:var(--muted);
}

#myForm select{
  appearance:none;
  background-image:url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 8l4 4 4-4' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 12px center;
  background-size:16px;
  padding-right:40px;
}

#myForm textarea:focus,
#myForm select:focus,
#myForm #button2:focus{
  border-color:var(--primary);
  box-shadow:0 0 0 4px rgba(69,104,242,.16);
}

.helper-text{
  display:block;
  margin-top:7px;
  color:var(--muted);
  font-size:.88rem;
}

#myForm #button2{
  min-height:48px;
  border-radius:999px;
  padding-inline:18px;
  background:linear-gradient(135deg,var(--primary),#6283ff);
  color:#fff;
  font-weight:800;
  box-shadow:0 14px 26px rgba(69,104,242,.22);
}

#myForm #button2:hover{
  background:linear-gradient(135deg,var(--primary-strong),#5676f7);
}

#myForm #button2[disabled]{
  opacity:.65;
  cursor:not-allowed;
}

#myForm .resultado{
  margin-top:14px;
  min-height:64px;
  background:#f8fbff;
  border:1px dashed #d9e5f2;
  border-radius:18px;
  padding:10px;
}

.ai-advanced{
  margin-top:6px;
}

.ai-advanced summary{
  list-style:none;
  cursor:pointer;
  user-select:none;
}

.ai-advanced summary::-webkit-details-marker{
  display:none;
}

#myForm #advToggle{
  appearance:none;
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:10px 14px;
  border:1px solid var(--line);
  border-radius:999px;
  background:#fff;
  color:var(--primary-strong);
  font-weight:800;
  transition:background-color .2s ease, border-color .2s ease, color .2s ease;
}

#myForm #advToggle::before{
  content:"+";
  display:grid;
  place-items:center;
  width:20px;
  height:20px;
  border-radius:50%;
  background:rgba(69,104,242,.12);
  color:var(--primary-strong);
  font-weight:900;
}

.ai-advanced[open] #advToggle{
  background:var(--primary);
  color:#fff;
  border-color:var(--primary);
}

.ai-advanced[open] #advToggle::before{
  content:"−";
  background:rgba(255,255,255,.24);
  color:#fff;
}

#myForm #advBox{
  margin-top:12px;
  padding:14px;
  border:1px solid var(--line);
  border-radius:16px;
  background:#fbfcff;
}

.ai-advanced-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
}

.ai-actions{
  margin-top:18px;
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}

.visually-hidden{
  position:absolute !important;
  width:1px !important;
  height:1px !important;
  padding:0 !important;
  margin:-1px !important;
  overflow:hidden !important;
  clip:rect(0 0 0 0) !important;
  border:0 !important;
}

.is-error{
  color:var(--danger);
}

.is-success{
  color:var(--success);
}

@media (max-width:1200px){
  .letters-grid-10{
    grid-template-columns:repeat(6, minmax(0,1fr));
  }
}

@media (max-width:992px){
  .page-shell{
    grid-template-columns:1fr;
  }

  .sidebar{
    position:fixed;
    top:0;
    left:0;
    width:min(88vw, 340px);
    max-width:340px;
    height:100vh;
    transform:translateX(-100%);
    transition:transform .24s ease;
    box-shadow:0 24px 50px rgba(15,23,42,.24);
  }

  html[dir="rtl"] .sidebar{
    left:auto;
    right:0;
    transform:translateX(100%);
  }

  .page-body.sidebar-open .sidebar{
    transform:translateX(0);
  }

  .sidebar-close{
    display:grid;
    place-items:center;
  }

  .topbar{
    display:flex;
    max-width:var(--content-max);
    margin-inline:auto;
  }

  .main-content{
    padding:18px 16px 24px;
  }

  .hero-card,
  .content-card,
  .ad-card{
    margin-bottom:18px;
  }

  .letters-grid-10{
    grid-template-columns:repeat(5, minmax(0,1fr));
  }
}

@media (max-width:680px){
  .hero-card{
    padding:24px 18px;
  }

  .content-card,
  .ai-card{
    padding:18px;
  }

  .sentence-card{
    padding:16px;
  }

  .sentence-line{
    gap:10px;
  }

  .sentence-number{
    min-width:1.8ch;
    font-size:.95rem;
  }

  .sentence-actions{
    gap:6px;
    font-size:.79rem;
  }

  .action-link{
    font-size:.79rem;
  }

  .action-sep{
    font-size:.74rem;
  }

  .share-row-icons{
    justify-content:flex-start;
  }

  .hero-actions{
    flex-direction:column;
    align-items:stretch;
  }

  .hero-actions .btn{
    width:100%;
  }

  .letters-grid-5{
    grid-template-columns:repeat(4, minmax(0,1fr));
  }

  .letters-grid-10{
    grid-template-columns:repeat(4, minmax(0,1fr));
  }

  .ai-form-grid,
  .ai-advanced-grid{
    grid-template-columns:1fr;
  }
}

@media (max-width:420px){
  .brand-mark{
    width:38px;
    height:38px;
    border-radius:12px;
  }

  .sentence-text{
    font-size:1.06rem;
  }

  .letters-grid-5,
  .letters-grid-10{
    grid-template-columns:repeat(3, minmax(0,1fr));
  }
}

@media (prefers-reduced-motion:reduce){
  html{
    scroll-behavior:auto;
  }

  *,
  *::before,
  *::after{
    animation:none !important;
    transition:none !important;
  }
}

/* =========================================================
   HOME + LISTADO POR LETRA
   ========================================================= */

.featured-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:18px;
}

.featured-card{
  background:linear-gradient(180deg,#fff,#fcfdff);
  border:1px solid var(--line);
  border-radius:18px;
  overflow:hidden;
  box-shadow:var(--shadow-sm);
  display:flex;
  flex-direction:column;
}

.featured-thumb{
  display:block;
  aspect-ratio:4 / 3;
  overflow:hidden;
  background:#eef3f8;
}

.featured-thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  transition:transform .25s ease;
}

.featured-card:hover .featured-thumb img{
  transform:scale(1.03);
}

.featured-body{
  padding:16px;
}

.featured-kicker{
  margin:0 0 8px;
  color:var(--primary-strong);
  font-size:.85rem;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.03em;
}

.featured-title{
  margin:0 0 10px;
  font-size:1.12rem;
  line-height:1.25;
}

.featured-title a{
  color:var(--text);
  text-decoration:none !important;
}

.featured-title a:hover{
  color:var(--primary-strong);
}

.featured-snippet{
  margin:0;
  color:#425267;
  line-height:1.6;
}

.word-list-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
  margin:18px 0;
}

.word-link-card{
  display:flex;
  align-items:center;
  min-height:54px;
  padding:14px 16px;
  border-radius:16px;
  background:#fff;
  border:1px solid var(--line);
  box-shadow:var(--shadow-sm);
  text-decoration:none !important;
  transition:transform .15s ease, background-color .2s ease, color .2s ease, border-color .2s ease;
}

.word-link-card:hover{
  transform:translateY(-1px);
  background:var(--primary-soft);
  border-color:#d7e2ff;
  color:var(--primary-strong);
}

.word-link-main{
  font-weight:700;
  color:inherit;
  word-break:break-word;
}

.pagination-list{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:4px 0 12px;
}

.pagination-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:40px;
  padding:8px 14px;
  border-radius:999px;
  background:#fff;
  border:1px solid var(--line);
  box-shadow:var(--shadow-sm);
  color:var(--text);
  text-decoration:none !important;
  font-weight:700;
  transition:transform .15s ease, background-color .2s ease, color .2s ease, border-color .2s ease;
}

.pagination-link:hover{
  transform:translateY(-1px);
  background:var(--primary-soft);
  color:var(--primary-strong);
  border-color:#d7e2ff;
}

.pagination-link.is-current{
  background:linear-gradient(135deg,var(--primary),#6283ff);
  color:#fff;
  border-color:transparent;
}

.language-card p{
  color:#425267;
  line-height:1.75;
}

.language-card a{
  word-break:break-word;
}

@media (max-width:980px){
  .featured-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .word-list-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media (max-width:640px){
  .featured-grid,
  .word-list-grid{
    grid-template-columns:1fr;
  }
}

#tools {
    scroll-margin-top: 80px;
}

.sentence-figure img {
    display: block;
    width: 100%;
    height: auto;
}

/* =========================
   TOC / TABLA DE CONTENIDO
   ========================= */

.toc-card{
  padding:22px;
}

.toc-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));
  gap:12px;
}

.toc-link{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  min-height:58px;
  padding:14px 16px;
  border-radius:16px;
  background:linear-gradient(180deg,#fff,#fcfdff);
  border:1px solid var(--line);
  box-shadow:var(--shadow-sm);
  color:var(--text);
  text-decoration:none !important;
  transition:transform .15s ease, background-color .2s ease, color .2s ease, border-color .2s ease;
}

.toc-link:hover{
  transform:translateY(-1px);
  background:var(--primary-soft);
  border-color:#d7e2ff;
  color:var(--primary-strong);
}

.toc-link-main{
  font-weight:800;
  line-height:1.25;
  word-break:break-word;
}

.toc-link-count,
.count-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:38px;
  min-height:30px;
  padding:4px 10px;
  border-radius:999px;
  background:var(--primary-soft);
  color:var(--primary-strong);
  font-weight:800;
  font-size:.88rem;
  flex:0 0 auto;
}

.section-subtitle{
  margin:0 0 16px;
  color:var(--muted);
  font-size:.95rem;
  font-weight:700;
}

.anchor-target{
  scroll-margin-top:84px;
}

html[dir="rtl"] .toc-link{
  flex-direction:row-reverse;
}

@media (max-width:680px){
  .toc-grid{
    grid-template-columns:1fr;
  }

  .toc-card{
    padding:18px;
  }
}