/* THW Design: Wordle Solver, Word Finder and Word Unscrambler ([thw_word_tool]) and the text sections of their pages.
 * Needs thw-design.css (tokens) and thw-wordle.css (buttons). */
.thw-ds .tl-top{display:flex;flex-direction:column}
.thw-ds .tl-top .hero-h1{font-size:28px;margin:14px 0 10px}
.thw-ds .tl-top .hero{margin-top:22px}
.thw-ds .tl-top .hero p{margin:0 0 10px;font-size:15px;line-height:1.5;color:var(--mut);max-width:68ch}

/* The tool card. */
.thw-ds .tl{position:relative;display:grid;gap:14px;min-width:0;background:var(--surf);border:2.5px solid var(--line);border-radius:16px;padding:14px;box-shadow:5px 5px 0 var(--sh)}
.thw-ds .tl-in,.thw-ds .tl-out,.thw-ds .tl-main,.thw-ds .tl-fields{display:grid;gap:12px;min-width:0}
.thw-ds .tl-out{gap:0}
.thw-ds .tl-group{border:0;margin:0;padding:0;min-width:0}
.thw-ds .tl-lab{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;margin:0 0 7px;padding:0;font:700 15px/1.3 var(--body);color:var(--ink)}
.thw-ds .tl-sub{font-weight:500;font-size:13.5px;color:var(--mut)}
.thw-ds legend.tl-lab{display:block}
.thw-ds .tl-dot{flex:none;display:inline-block;width:18px;height:18px;margin-right:8px;vertical-align:-3px;border-radius:5px;border:2px solid #111;background:var(--g)}
.thw-ds .tl-dot.y{background:var(--y)}.thw-ds .tl-dot.x{background:var(--x)}

/* Inputs: at least 16px text (no zoom on iPhones) and at least 44px tall. */
.thw-ds .tl-boxes{display:grid;grid-template-columns:repeat(5,minmax(0,62px));gap:6px}
.thw-ds .tl-box,.thw-ds .tl-text{margin:0;border:2.5px solid var(--line);background:var(--tE);color:var(--ink);text-transform:uppercase;-webkit-appearance:none;appearance:none;border-radius:10px}
.thw-ds .tl-box{width:100%;height:54px;padding:0 2px;border-radius:9px;font:400 27px/1 var(--display);text-align:center}
.thw-ds .sv-yellow{font-size:17px;letter-spacing:.02em}
.thw-ds .sv-green.is-filled{background:var(--g);color:var(--onTile);border-color:var(--tline);box-shadow:3px 3px 0 var(--sh)}
.thw-ds .sv-yellow.is-filled{background:var(--y);color:var(--onTile);border-color:var(--tline);box-shadow:3px 3px 0 var(--sh)}
.thw-ds .tl-text{display:block;width:100%;min-height:50px;padding:0 14px;font:500 18px/1.2 var(--body);letter-spacing:.08em}
.thw-ds .tl-big{min-height:56px;font:400 26px/1 var(--display);letter-spacing:.14em}
.thw-ds .tl-text::placeholder{color:var(--mut);opacity:.6}
.thw-ds .tl-box:focus,.thw-ds .tl-text:focus{outline:3px solid var(--blue);outline-offset:2px}
.thw-ds .tl-sel{position:relative;display:block}
.thw-ds .tl-sel select{padding-right:44px;text-transform:none;letter-spacing:0;cursor:pointer}
.thw-ds .tl-sel::after{content:"";position:absolute;right:14px;top:50%;width:20px;height:20px;margin-top:-10px;pointer-events:none;background:currentColor;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center/contain no-repeat}
.thw-ds .tl-sel{color:var(--ink)}
.thw-ds input[type=number].tl-text{-moz-appearance:textfield}
.thw-ds .tl-text::-webkit-inner-spin-button,.thw-ds .tl-text::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}

/* Options and buttons. */
.thw-ds .tl-opts{display:flex;flex-wrap:wrap;gap:10px;align-items:stretch}
.thw-ds .tl-check{flex:1 1 100%;display:flex;align-items:center;gap:10px;min-height:48px;padding:8px 12px;border:2px solid var(--line);border-radius:12px;background:var(--surf2);font-size:15px;font-weight:600;line-height:1.3;cursor:pointer}
.thw-ds .tl-check input{flex:none;width:22px;height:22px;margin:0;accent-color:var(--acc);cursor:pointer}
.thw-ds .tl-check:has(input:checked){background:var(--y);color:#111;border-color:#111}
.thw-ds .tl .btn{min-height:50px}
.thw-ds .sv-clear{flex:1 1 auto}
.thw-ds .tl-acts{display:flex;gap:10px}
.thw-ds .tl-acts .btn{flex:1}
.thw-ds .tl-hint{margin:-4px 0 0;font-size:14px;line-height:1.45;color:var(--mut)}
.thw-ds .tl-ex{display:flex;flex-wrap:wrap;align-items:center;gap:8px;font-size:14px;font-weight:600;color:var(--mut)}
.thw-ds .tl-exb{min-height:44px;padding:0 12px;border-radius:10px;border:2px dashed var(--line);background:transparent;color:var(--ink);font:400 17px/1 var(--display);letter-spacing:.06em;text-transform:uppercase;cursor:pointer}
.thw-ds .tl-exb:hover{background:var(--surf2)}
.thw-ds .tl-fields.four{grid-template-columns:repeat(2,minmax(0,1fr))}

/* Results. */
.thw-ds .tl-status{margin:0;font-size:15px;font-weight:600;line-height:1.45}
.thw-ds .tl-status:empty{display:none}
.thw-ds .tl-h{margin:16px 0 8px;font:700 16px/1.3 var(--body)}
.thw-ds .sv-best-list{list-style:none;margin:0;padding:0;display:grid;gap:8px;counter-reset:best}
.thw-ds .sv-best-list li{counter-increment:best;display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;padding:8px 10px;border:2px solid var(--line);border-radius:12px;background:var(--surf2);font-size:14.5px;line-height:1.35}
.thw-ds .sv-best-list li::before{content:counter(best);flex:none;width:28px;height:28px;border-radius:50%;border:2px solid #111;background:var(--acc);color:#111;display:flex;align-items:center;justify-content:center;font:400 16px/1 var(--display)}
.thw-ds .sv-best-list strong{font:400 22px/1 var(--display);letter-spacing:.08em;padding:6px 9px;border-radius:8px;border:2px solid #111;background:var(--surf);color:var(--ink);box-shadow:2px 2px 0 var(--sh)}
.thw-ds .sv-best-list span{flex:1 1 160px;min-width:0;color:var(--mut)}
.thw-ds .tl-words{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:6px}
.thw-ds .sv-words{display:grid;grid-template-columns:repeat(auto-fill,minmax(78px,1fr))}
.thw-ds .sv-words li{padding:9px 4px;border-radius:8px;border:2px solid var(--line);background:var(--surf);font:400 18px/1 var(--display);letter-spacing:.07em;text-align:center}
.thw-ds .sv-words.rare li{background:var(--surf2);border-style:dashed;color:var(--mut)}
.thw-ds .tl-words li{margin:0}
.thw-ds .tl-w{min-height:44px;padding:0 12px;border-radius:9px;border:2px solid var(--line);background:var(--surf);color:var(--ink);font:400 18px/1 var(--display);letter-spacing:.06em;text-transform:uppercase;cursor:pointer;box-shadow:2px 2px 0 var(--sh)}
.thw-ds .tl-w:hover{background:var(--surf2)}
.thw-ds .tl-w:active{transform:translate(2px,2px);box-shadow:none}
.thw-ds .tl-w b{font-weight:400}
.thw-ds .tl-w span{margin-left:6px;font:600 12px/1 var(--body);letter-spacing:0;text-transform:none;color:var(--mut)}
.thw-ds .tl-more{margin-top:10px;padding:0 16px;flex:none}
.thw-ds .wf-morewrap:empty{display:none}
.thw-ds .tl-note{margin:12px 0 0;font-size:14px;color:var(--mut)}
.thw-ds .us-group .tl-h{display:flex;align-items:center;gap:8px}
.thw-ds .us-group .tl-h::before{content:"";flex:none;width:14px;height:14px;border-radius:3px;border:2px solid #111;background:var(--y)}
.thw-ds .us-results:empty{display:none}
.thw-ds .tl-toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);z-index:20;background:var(--ink);color:var(--bg);font-weight:600;font-size:15px;padding:11px 16px;border-radius:10px;white-space:nowrap;pointer-events:none;box-shadow:3px 3px 0 var(--sh)}

/* Text sections of the tool pages. */
.thw-ds .tl-sec ol,.thw-ds .tl-sec ul:not(.links){margin:0 0 12px;padding-left:22px;max-width:68ch}
.thw-ds .tl-sec ul.tips{padding-left:0}
.thw-ds .tl-sec li{margin:0 0 8px}
.thw-ds .tl-sec h3{font-size:18px;margin:18px 0 6px}
.thw-ds .tl-sec .tbl{overflow-x:auto;margin:14px 0 16px;max-width:760px}
.thw-ds .tl-sec .tbl table{width:100%;border-collapse:separate;border-spacing:0;background:var(--surf);border:2.5px solid var(--line);border-radius:12px;box-shadow:4px 4px 0 var(--sh);overflow:hidden;font-size:15px}
.thw-ds .tl-sec .tbl th,.thw-ds .tl-sec .tbl td{text-align:left;padding:10px 12px;border-bottom:2px solid var(--tEb)}
.thw-ds .tl-sec .tbl th{background:var(--surf2);font-weight:700}
.thw-ds .tl-sec .tbl tr:last-child td{border-bottom:0}

@media (min-width:600px){
  .thw-ds .tl-check{flex:1 1 240px}
  .thw-ds .tl-fields{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media (min-width:960px){
  /* H1, then the tool card, then the intro, as on phones and on the games. */
  .thw-ds .tl-top{padding-top:32px}
  .thw-ds .tl-top .hero-h1{font-size:48px;line-height:1;margin:0}
  .thw-ds .tl-top .hero{margin-top:28px}
  .thw-ds .tl-top .hero p{font-size:18px}
  .thw-ds .tl{margin-top:20px;padding:24px 28px;gap:18px;border-width:3px;border-radius:20px;box-shadow:8px 8px 0 var(--sh)}
  /* Solver: the clues on the left, the results beside them. */
  .thw-ds .tl-solver{grid-template-columns:minmax(0,380px) minmax(0,1fr);column-gap:36px;align-items:start}
  .thw-ds .tl-solver .tl-out{padding-left:36px;border-left:2.5px dashed var(--tEb);min-height:100%}
  .thw-ds .tl-solver .tl-check{flex:1 1 100%}
  .thw-ds .tl-main{grid-template-columns:minmax(0,1fr) auto;align-items:end}
  .thw-ds .tl-acts .btn{flex:none;padding:0 24px;min-height:56px}
  .thw-ds .tl-fields.four{grid-template-columns:repeat(4,minmax(0,1fr))}
  .thw-ds .tl-sec{margin-top:72px}
}
