/* fwordle.com v2 — mobile-first, Wordle-themed */
*,*::before,*::after{box-sizing:border-box}
*{margin:0;padding:0}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
body{
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  font-size:16px;line-height:1.6;color:#0f172a;
  background:linear-gradient(180deg,#f8fafc 0%,#eef2f7 100%);
  min-height:100vh;display:flex;flex-direction:column;
  -webkit-font-smoothing:antialiased
}
img,svg{max-width:100%;display:block}
a{color:#6aaa64;text-decoration:none}
a:hover{text-decoration:underline}
button{font:inherit;cursor:pointer;border:none;background:none;color:inherit}
input,select,textarea{font:inherit}

/* Layout */
.container{max-width:1100px;margin:0 auto;padding:0 1.25rem;width:100%}
.container-narrow{max-width:760px;margin:0 auto;padding:0 1.25rem;width:100%}
main{flex:1}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}
.hidden{display:none!important}

/* Header */
.site-header{
  background:#fff;border-bottom:1px solid #e2e8f0;
  padding:.875rem 0;position:sticky;top:0;z-index:50;
  backdrop-filter:saturate(180%) blur(8px);
  background:rgba(255,255,255,.92)
}
.site-header .container{display:flex;align-items:center;justify-content:space-between;gap:1rem}
.brand{display:flex;align-items:center;gap:.5rem;font-size:1.25rem;font-weight:900;color:#6aaa64;letter-spacing:-.02em}
.brand-mark{width:32px;height:32px;border-radius:8px;background:#6aaa64;color:#fff;display:inline-flex;align-items:center;justify-content:center;font-size:1rem;font-weight:900}
.brand:hover{opacity:.8;text-decoration:none}

/* Mobile nav */
.nav-toggle{display:flex;flex-direction:column;gap:4px;width:32px;height:32px;align-items:center;justify-content:center;border-radius:6px;background:transparent}
.nav-toggle span{display:block;width:20px;height:2px;background:#0f172a;border-radius:2px;transition:transform .2s,opacity .2s}
.nav-toggle[aria-expanded="true"] span:nth-child(1){transform:translateY(6px) rotate(45deg)}
.nav-toggle[aria-expanded="true"] span:nth-child(2){opacity:0}
.nav-toggle[aria-expanded="true"] span:nth-child(3){transform:translateY(-6px) rotate(-45deg)}
.nav{display:none;position:absolute;top:100%;left:0;right:0;background:#fff;border-bottom:1px solid #e2e8f0;flex-direction:column;padding:.5rem 1.25rem 1rem}
.nav.open{display:flex}
.nav a{color:#475569;font-size:1rem;font-weight:600;padding:.65rem 0;border-bottom:1px solid #f1f5f9}
.nav a:last-child{border-bottom:none}
.nav a:hover{color:#0f172a;text-decoration:none}
.nav a.active{color:#6aaa64}

@media(min-width:768px){
  .nav-toggle{display:none}
  .nav{display:flex;position:static;flex-direction:row;gap:1.5rem;padding:0;border:none;background:transparent}
  .nav a{padding:0;border:none;font-size:.9rem}
}

/* Hero */
.hero{text-align:center;padding:2.5rem 0 1.5rem;background:#fff;border-bottom:1px solid #e2e8f0}
.hero h1{font-size:clamp(1.75rem,5vw,3rem);font-weight:900;letter-spacing:-.025em;line-height:1.15;margin-bottom:.875rem}
.hero h1 .accent{color:#6aaa64}
.hero p{font-size:clamp(1rem,2vw,1.15rem);color:#64748b;max-width:580px;margin:0 auto}
@media(min-width:768px){.hero{padding:3.5rem 0 2rem}}

/* Solver */
.solver{padding:2rem 0}
.mode-toggle-wrap{display:flex;justify-content:center}
.mode-toggle{display:inline-flex;background:#fff;border:1px solid #e2e8f0;border-radius:12px;padding:4px;margin:0 auto 1.5rem;box-shadow:0 1px 3px rgba(0,0,0,.04)}
.mode-btn{padding:.625rem 1rem;border-radius:8px;font-size:.875rem;font-weight:700;color:#64748b;transition:background .15s,color .15s}
.mode-btn.active{background:#6aaa64;color:#fff}

.tiles{display:flex;justify-content:center;gap:6px;margin:0 auto 1rem;max-width:380px}
@media(min-width:480px){.tiles{gap:8px}}
.tile{width:calc((100% - 24px)/5);aspect-ratio:1;border:2px solid #d3d6da;border-radius:6px;background:#fff;font-size:1.75rem;font-weight:800;color:#0f172a;display:flex;align-items:center;justify-content:center;text-transform:uppercase;transition:background .2s,border-color .2s,color .2s,transform .1s}
@media(min-width:480px){.tile{width:calc((100% - 32px)/5);font-size:2rem;border-radius:8px}}
.tile.has-letter{cursor:pointer;border-color:#878a8c}
.tile.gray.has-letter{background:#787c7e;border-color:#787c7e;color:#fff}
.tile.yellow{background:#c9b458;border-color:#c9b458;color:#fff}
.tile.green{background:#6aaa64;border-color:#6aaa64;color:#fff}
.tile.has-letter:active{transform:scale(.96)}

.input-wrap{max-width:380px;margin:0 auto 1rem;text-align:center}
.guess-input{
  width:100%;padding:.75rem 1rem;font-size:1.125rem;font-weight:700;text-align:center;
  letter-spacing:.2em;text-transform:uppercase;border:2px solid #e2e8f0;border-radius:10px;
  background:#fff;outline:none;transition:border-color .15s
}
.guess-input::placeholder{letter-spacing:.05em;color:#94a3b8;font-weight:600}
.guess-input:focus{border-color:#6aaa64}
.guess-input.error{border-color:#dc2626}
.error-msg{font-size:.85rem;color:#dc2626;margin-top:.5rem;font-weight:600;visibility:hidden;min-height:1.25rem}
.error-msg.visible{visibility:visible}

.legend{display:flex;flex-wrap:wrap;justify-content:center;gap:.75rem 1.25rem;font-size:.8rem;color:#475569;margin:.5rem 0 1.5rem;font-weight:600}
.legend-item{display:flex;align-items:center;gap:.4rem}
.dot{width:14px;height:14px;border-radius:3px;display:inline-block}
.dot-gray{background:#787c7e}
.dot-yellow{background:#c9b458}
.dot-green{background:#6aaa64}

.results{max-width:760px;margin:0 auto}
.results-card,.solution-card,.all-words-card{
  background:#fff;border:1px solid #e2e8f0;border-radius:14px;padding:1.5rem;
  margin-bottom:1rem;box-shadow:0 1px 3px rgba(0,0,0,.03)
}
.results-title{font-size:.8rem;font-weight:800;text-transform:uppercase;letter-spacing:.05em;color:#64748b;margin-bottom:.5rem;text-align:center}
.results-count{font-size:2.5rem;font-weight:900;color:#6aaa64;text-align:center;line-height:1}
.results-empty{color:#dc2626;font-weight:700;text-align:center;margin-top:.5rem}
.solution-card h3,.all-words-card h3{font-size:1rem;font-weight:800;margin-bottom:.5rem;color:#0f172a}
.solution-card .sub{font-size:.875rem;color:#64748b;margin-bottom:1rem}
.guess-pills{display:flex;flex-wrap:wrap;gap:.5rem}
.guess-pill{display:inline-flex;padding:.5rem .875rem;background:#6aaa64;color:#fff;border-radius:8px;font-weight:800;font-size:.95rem;letter-spacing:.05em}
.all-words-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(85px,1fr));gap:.4rem;max-height:480px;overflow-y:auto;padding-right:.25rem}
.word-chip{padding:.45rem .5rem;background:#f1f5f9;color:#0f172a;border-radius:6px;font-weight:700;font-size:.85rem;text-align:center;letter-spacing:.05em;transition:background .15s}
.word-chip:hover{background:#e2e8f0}
.reset-btn-wrap{text-align:center;margin-top:1rem}
.reset-btn{padding:.65rem 1.5rem;background:#fff;border:1px solid #cbd5e1;border-radius:10px;font-weight:700;color:#475569;transition:background .15s,border-color .15s}
.reset-btn:hover{background:#f8fafc;border-color:#94a3b8}

/* Solver loading state */
.solver-loading{text-align:center;padding:2rem;color:#64748b;font-size:.9rem}

/* Article pages */
.page-header{background:#fff;border-bottom:1px solid #e2e8f0;padding:2.5rem 0 1.5rem;text-align:center}
.page-header h1{font-size:clamp(1.75rem,4.5vw,2.5rem);font-weight:900;letter-spacing:-.02em;margin-bottom:.5rem;line-height:1.2}
.page-header .meta{font-size:.85rem;color:#64748b;font-weight:600}
.page-header .meta span{color:#0f172a}

article.article{padding:2.5rem 0;max-width:720px}
article.article h2{font-size:1.5rem;font-weight:800;margin:2.5rem 0 1rem;letter-spacing:-.01em;color:#0f172a}
article.article h2:first-child{margin-top:0}
article.article h3{font-size:1.2rem;font-weight:800;margin:1.75rem 0 .75rem;color:#0f172a}
article.article p{margin-bottom:1.125rem;color:#1e293b}
article.article ul,article.article ol{margin:0 0 1.125rem 1.5rem;color:#1e293b}
article.article li{margin-bottom:.5rem}
article.article strong{color:#0f172a;font-weight:700}
article.article blockquote{border-left:4px solid #6aaa64;padding:.75rem 1.25rem;margin:1.5rem 0;background:#f8fafc;border-radius:0 8px 8px 0;color:#1e293b;font-style:italic}
article.article .callout{background:#f0fdf4;border:1px solid #bbf7d0;border-radius:10px;padding:1rem 1.25rem;margin:1.5rem 0}
article.article .callout strong{color:#166534}
article.article .callout p:last-child{margin-bottom:0}
article.article a{color:#6aaa64;font-weight:600;border-bottom:1px solid #bbf7d0}
article.article a:hover{border-bottom-color:#6aaa64;text-decoration:none}

/* FAQ */
.faq-list{max-width:760px;margin:0 auto;padding:0 1.25rem}
.faq-item{background:#fff;border:1px solid #e2e8f0;border-radius:12px;margin-bottom:.75rem;overflow:hidden}
.faq-item summary{padding:1.125rem 1.25rem;cursor:pointer;font-weight:700;color:#0f172a;list-style:none;display:flex;justify-content:space-between;align-items:center;gap:1rem}
.faq-item summary::-webkit-details-marker{display:none}
.faq-item summary::after{content:"+";font-size:1.5rem;font-weight:300;color:#6aaa64;transition:transform .2s}
.faq-item[open] summary::after{transform:rotate(45deg)}
.faq-body{padding:0 1.25rem 1.25rem;color:#1e293b}
.faq-body p{margin-bottom:.75rem}
.faq-body p:last-child{margin-bottom:0}

/* Related articles */
.related{margin-top:3rem;padding-top:2rem;border-top:1px solid #e2e8f0}
.related h3{font-size:.85rem;font-weight:800;text-transform:uppercase;letter-spacing:.05em;color:#64748b;margin-bottom:1rem}
.related-grid{display:grid;grid-template-columns:1fr;gap:1rem}
@media(min-width:640px){.related-grid{grid-template-columns:1fr 1fr}}
.related-card{display:block;padding:1.25rem;background:#fff;border:1px solid #e2e8f0;border-radius:10px;transition:border-color .15s,transform .15s}
.related-card:hover{border-color:#6aaa64;text-decoration:none;transform:translateY(-2px)}
.related-card .label{font-size:.7rem;font-weight:800;text-transform:uppercase;letter-spacing:.05em;color:#6aaa64;margin-bottom:.25rem}
.related-card .title{font-size:.95rem;font-weight:700;color:#0f172a;line-height:1.3}

/* Article index card grid (homepage articles section) */
.guides-section{background:#fff;border-top:1px solid #e2e8f0;padding:3rem 0}
.guides-section .container-narrow h2{font-size:1.5rem;font-weight:800;text-align:center;margin-bottom:.5rem;letter-spacing:-.01em}
.guides-section .container-narrow .lede{text-align:center;color:#64748b;margin-bottom:2rem}
.guides-grid{display:grid;grid-template-columns:1fr;gap:.875rem}
@media(min-width:640px){.guides-grid{grid-template-columns:1fr 1fr}}
.guide-card{display:block;padding:1.25rem;background:#fff;border:1px solid #e2e8f0;border-radius:10px;transition:border-color .15s,transform .15s,box-shadow .15s}
.guide-card:hover{border-color:#6aaa64;text-decoration:none;transform:translateY(-2px);box-shadow:0 6px 16px -8px rgba(106,170,100,.3)}
.guide-card h3{font-size:1rem;font-weight:800;color:#0f172a;margin-bottom:.35rem;line-height:1.3}
.guide-card p{font-size:.875rem;color:#64748b;line-height:1.5}

/* Footer */
.site-footer{background:#fff;border-top:1px solid #e2e8f0;margin-top:4rem;padding:2.5rem 0 1.25rem}
.footer-grid{display:grid;grid-template-columns:1fr 1fr;gap:2rem 1.5rem;margin-bottom:1.75rem}
@media(min-width:768px){.footer-grid{grid-template-columns:2fr 1fr 1fr 1fr}}
.footer-col h4{font-size:.75rem;font-weight:800;text-transform:uppercase;letter-spacing:.05em;color:#0f172a;margin-bottom:.875rem}
.footer-col ul{list-style:none;display:flex;flex-direction:column;gap:.5rem}
.footer-col a{color:#64748b;font-size:.875rem;font-weight:500}
.footer-col a:hover{color:#6aaa64;text-decoration:none}
.footer-col p{font-size:.875rem;color:#64748b}
.footer-bottom{border-top:1px solid #e2e8f0;padding-top:1.25rem;text-align:center;font-size:.8rem;color:#94a3b8}

/* Scrollbar polish */
.all-words-grid::-webkit-scrollbar{width:6px}
.all-words-grid::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:8px}
.all-words-grid::-webkit-scrollbar-thumb:hover{background:#94a3b8}

/* Reduced motion */
@media (prefers-reduced-motion:reduce){*{animation-duration:.01ms!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
