:root{--paper:#f7f6f0;--ink:#213d34;--muted:#687a5b;--line:#d9ddd2;--green:#254f40;--gold:#ebc876;--serif:Georgia,'Times New Roman',serif;--sans:system-ui,'Segoe UI',sans-serif}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--paper);color:var(--ink);font-family:var(--sans);font-size:15px;line-height:1.6}a{color:inherit;text-underline-offset:4px}button,input,select{font:inherit}button,a,input,select,summary{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{cursor:wait;opacity:.65}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #7e5b21;outline-offset:4px}button{color:inherit}header,main,footer{max-width:1240px;margin:auto;padding-left:40px;padding-right:40px}.masthead{height:98px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}.brand{display:flex;align-items:center;font-family:var(--serif);font-size:27px;font-weight:bold;text-decoration:none;letter-spacing:-1px}.brand svg{width:39px;height:39px;margin-right:10px;fill:none;stroke:var(--green);stroke-width:1.8;stroke-linecap:round}.brand-dot{font-size:12px;align-self:flex-start;margin:6px 0 0 5px}.masthead nav{display:flex;gap:28px;font-size:13px}.masthead nav a{text-decoration:none}.intro{padding:56px 0 39px;display:flex;justify-content:space-between;align-items:center}.eyebrow{font-size:12px;letter-spacing:1.7px;font-weight:700;margin:0 0 20px}.intro .eyebrow{display:flex;align-items:center;gap:8px}.eyebrow>span{width:6px;height:6px;background:var(--green);border-radius:50%}h1{font-family:var(--serif);font-size:58px;font-weight:400;line-height:1.08;letter-spacing:-2.3px;margin:0}h1 em{color:#687a5b;font-weight:400}.lede{color:var(--muted);font-size:15px;max-width:470px;margin:20px 0 0}.tile-art{position:relative;display:flex;padding:0 5px 32px;margin-top:15px;gap:7px;transform:rotate(-5deg)}.tile-art>span{position:relative;background:#ebe4cf;border:1px solid #d9ddd2;border-bottom:5px solid #d9ddd2;border-radius:6px;height:68px;width:61px;display:grid;place-items:center;font-family:var(--serif);font-size:33px;box-shadow:1px 6px 10px rgba(32,55,40,.08)}.tile-art>span:nth-child(2){transform:translateY(-10px) rotate(6deg)}.tile-art>span:nth-child(4){transform:rotate(9deg);background:#ebc876}.tile-art small{position:absolute;right:6px;bottom:3px;font-size:12px}.tile-art i{position:absolute;bottom:-6px;right:25px;font-family:var(--serif);font-size:15px;color:#687a5b;transform:rotate(5deg)}.workbench{border:1px solid #d9ddd2;border-radius:13px;display:grid;grid-template-columns:410px 1fr;overflow:hidden;box-shadow:0 12px 32px rgba(32,55,40,.08)}.controls{background:#fffefa;padding:29px 30px}.controls>.eyebrow{color:#687a5b;margin-bottom:24px}.modes{border:0;padding:0;margin:0 0 25px;display:grid;gap:9px}.modes legend{position:absolute;clip:rect(0,0,0,0)}.modes label{display:flex;align-items:center;gap:11px;min-height:69px;border:1px solid var(--line);border-radius:7px;padding:10px 13px;cursor:pointer}.modes label:has(:checked){background:#eff1e9;border-color:#687a5b}.modes input{accent-color:var(--green);width:16px;height:16px;margin:0;flex-shrink:0}.modes strong{display:block;font-size:14px;font-weight:600}.modes small{display:block;font-size:12px;color:var(--muted)}
.modes b {
  flex: 0 0 22px;
  height: 22px;
  margin-left: auto;
  overflow: hidden;
  font-size: 0;
  background-color: currentColor;
  -webkit-mask: var(--mode-icon) center / contain no-repeat;
  mask: var(--mode-icon) center / contain no-repeat;
}
.modes input[value="rearrange"] ~ b {
  --mode-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 7h17m-4-4 4 4-4 4M21 17H4m4-4-4 4 4 4' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.modes input[value="pattern"] ~ b {
  --mode-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='1.8'%3E%3Crect x='3.5' y='3.5' width='17' height='17' rx='2'/%3E%3Cpath d='M12 4v16M4 12h16'/%3E%3C/g%3E%3C/svg%3E");
}
form>label,.length-row label{font-size:12px;font-weight:600}.input-wrap{position:relative;margin-top:7px}.input-wrap input{width:100%;height:64px;border:1px solid #aab5a0;background:#fffefa;border-radius:6px;font-family:var(--sans);font-size:27px;letter-spacing:4px;text-transform:uppercase;padding:10px 44px 10px 15px;color:var(--ink)}.input-wrap input::placeholder{font-size:20px;letter-spacing:2px;color:#aab5a0;text-transform:none}.input-wrap button{position:absolute;right:4px;top:10px;width:44px;height:44px;background:none;border:none;font-size:26px;color:#687a5b}.hint{font-size:12px;color:var(--muted);margin:7px 0 17px;line-height:1.6}.length-row{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:21px}.length-row select{max-width:215px;min-width:0;background:#fffefa;border:1px solid #d9ddd2;padding:9px 8px;border-radius:5px;color:var(--ink);font-size:12px;height:44px}.mode-help{font-size:12px;color:var(--muted);line-height:1.6;min-height:36px;margin:9px 0 19px}.solve-button{width:100%;display:flex;justify-content:space-between;align-items:center;background:var(--green);color:#fffefa;border:0;border-radius:6px;padding:13px 18px;font-weight:600;min-height:51px}.solve-button span{font-size:20px}.solve-button:hover{background:#173c2f}#error{background:#fff1e9;border-left:3px solid #85391e;color:#85391e;padding:10px;font-size:12px}.try{display:flex;align-items:center;gap:8px;flex-wrap:wrap;border-top:1px solid var(--line);padding-top:19px;margin-top:23px}.try>span{width:100%;font-size:12px;letter-spacing:1.4px;color:var(--muted);font-weight:700}.try button{border:1px solid #d9ddd2;background:none;border-radius:4px;font-size:12px;letter-spacing:.6px;padding:10px 9px;min-height:40px}.try button:hover{background:#eff1e9}.local-note{margin:17px 0 0;font-size:12px;color:#687a5b}.local-note span{margin-right:6px}.results-panel{background:#eff1e9;padding:29px 30px;position:relative;display:flex;flex-direction:column;min-width:0}.result-top{display:flex;justify-content:space-between;gap:12px;align-items:start}.result-top .eyebrow{color:#687a5b;margin-bottom:0}.count{font-size:12px;color:#687a5b;white-space:nowrap}#dictionary-state{font-size:12px;color:#687a5b;margin-top:17px}#dictionary-state:empty{display:none}#retry,#more{background:#fffefa;border:1px solid #aab5a0;border-radius:5px;padding:11px 18px;min-height:44px;margin-top:15px;align-self:start}#result-summary:empty{display:none}#result-summary h2{font-family:var(--serif);font-size:29px;font-weight:400;line-height:1.2;margin:28px 0 8px}#result-summary p{color:var(--muted);font-size:12px;margin:0 0 18px}.empty{margin:auto;text-align:center;padding:50px 0 60px}.empty-tiles{display:flex;justify-content:center;gap:6px;margin-bottom:30px}.empty-tiles span{border:1px solid #d9ddd2;background:#f7f6f0;font-family:var(--serif);font-size:22px;width:43px;height:49px;border-radius:4px;display:grid;place-items:center;transform:rotate(-7deg)}.empty-tiles span:nth-child(2){background:#ebe4cf;transform:rotate(5deg) translateY(-6px)}.empty-tiles span:last-child{transform:rotate(8deg)}.empty h2{font-family:var(--serif);font-size:33px;line-height:1.2;font-weight:400;letter-spacing:-.6px;margin:0 0 14px}.empty p{font-size:12px;line-height:1.9;color:#687a5b}.hand-note{display:block;font-family:var(--serif);font-size:14px;font-style:italic;color:#aab5a0;margin-top:25px}.dictionary-caveat{font-size:12px;color:#687a5b;border-top:1px solid #d9ddd2;margin:25px 0 0;padding-top:13px;margin-top:auto;padding-bottom:0}.results{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:23px}.word-card{padding:12px 13px;background:#fffefa;border:1px solid #d9ddd2;border-radius:5px;min-width:0}.word{font-weight:600;font-size:18px;letter-spacing:2px;overflow-wrap:anywhere}.word mark{color:#85391e;background:#ebc876;border-radius:2px;padding:0 1px}.word-card p{font-size:12px;line-height:1.6;margin:5px 0 0;color:#687a5b}.word-card strong{color:#7e5b21;font-weight:600}.guide{display:grid;grid-template-columns:1.1fr 1fr 1fr;gap:40px;padding:70px 0 50px;border-bottom:1px solid var(--line)}.section-heading .eyebrow{font-size:12px;color:#687a5b;margin-bottom:16px}h2{font-family:var(--serif);font-size:30px;font-weight:400;line-height:1.25;letter-spacing:-.6px;margin:0 0 18px}.step{font-family:var(--serif);font-size:16px;color:#687a5b;display:block;margin-bottom:11px}h3{font-size:15px;margin:0 0 10px;font-weight:600}.guide article>p{font-size:12px;color:var(--muted);line-height:1.9}.example-line{font-size:12px;letter-spacing:1px;padding-top:8px}.example-line span{padding:0 5px;color:#aab5a0}.guide .hint{font-size:12px}.details-section{display:grid;grid-template-columns:1fr 1fr;gap:100px;padding:55px 0 60px}.details-section p{font-size:12px;color:var(--muted);line-height:1.9;max-width:470px}.details-section .eyebrow{font-size:12px}.source-link{font-size:12px;margin-right:15px;display:inline-block;padding:8px 0}.faq h2{font-size:25px;margin-bottom:20px}details{border-bottom:1px solid var(--line)}summary{font-size:12px;padding:16px 0;cursor:pointer;min-height:48px}details p{margin:0 0 15px}footer{border-top:1px solid var(--line);padding-top:23px;padding-bottom:30px;display:flex;align-items:center;justify-content:space-between;gap:20px;font-size:12px;color:var(--muted)}.footer-brand{font-family:var(--serif);font-size:18px;text-decoration:none;color:var(--ink)}[hidden]{display:none!important}@media(min-width:1000px){.results-panel{max-height:750px;overflow:auto}}@media(max-width:1000px){header,main,footer{padding-left:25px;padding-right:25px}.workbench{grid-template-columns:350px 1fr}.controls,.results-panel{padding:25px 22px}h1{font-size:49px}.tile-art>span{width:44px;height:53px;font-size:25px}.guide{gap:25px}.results{grid-template-columns:1fr}.details-section{gap:45px}}@media(max-width:720px){header,main,footer{padding-left:20px;padding-right:20px}.masthead{height:77px}.brand{font-size:23px}.brand svg{width:32px;margin-right:6px}.masthead nav{gap:0}.masthead nav a{font-size:12px;min-height:44px;display:flex;align-items:center}.masthead nav a:last-of-type{display:none}.intro{padding:34px 0 29px}.intro .eyebrow{font-size:12px;letter-spacing:1.2px;margin-bottom:19px}h1{font-size:40px;letter-spacing:-1.5px}.lede{font-size:13px;margin-top:17px}.tile-art{display:none}.workbench{grid-template-columns:1fr;border-radius:9px}.controls,.results-panel{padding:23px 20px}.modes{gap:8px;margin-bottom:23px}.modes label{min-height:67px}.try button{min-height:44px}.length-row select{max-width:200px;font-size:12px}.results-panel{border-top:1px solid #d9ddd2;min-height:370px}.result-top{gap:6px}.result-top .eyebrow{font-size:12px;letter-spacing:1.2px}.empty{padding:45px 0}.empty h2{font-size:29px}.results{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.word{font-size:16px;letter-spacing:1px}.word-card{padding:10px}.guide{grid-template-columns:1fr;gap:25px;padding:45px 0 25px}.guide h2{font-size:31px}.guide article{border-top:1px solid var(--line);padding-top:20px}.details-section{grid-template-columns:1fr;gap:35px;padding:35px 0}.details-section h2{font-size:29px}footer{flex-wrap:wrap;gap:10px}footer .footer-brand{width:100%}}@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}

.input-tools{display:flex;align-items:start;gap:8px;justify-content:space-between}.input-tools .hint{margin:7px 0 0;max-width:240px}.input-tools button{background:none;border:0;text-decoration:underline;text-underline-offset:3px;min-width:52px;min-height:44px;font-size:12px;white-space:nowrap;padding:5px}.length-row{margin-top:9px}

.modes label:has(:checked){border-color:var(--green)}.input-wrap input::placeholder{color:var(--muted)}.intro{padding:28px 0}.intro .eyebrow:empty{display:none}.info,.field-notes,.feedback{max-width:76ch;margin:40px auto}.info h1{margin:24px 0}.info h2{margin-top:28px}.info p,.field-notes p,.feedback p{line-height:1.65}.actions{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.actions button,.feedback button{min-height:44px;background:var(--paper);border:1px solid var(--green);border-radius:6px;padding:8px 14px}.actions button[aria-pressed=true],.feedback button{background:var(--green);color:var(--paper)}.feedback form{display:grid;gap:8px;max-width:520px}.feedback input,.feedback textarea{font:inherit;border:1px solid var(--muted);border-radius:6px;min-height:44px;padding:9px}.feedback textarea{min-height:84px}.guide,.details-section{scroll-margin-top:16px}.field-notes summary{font-size:16px}.info{padding:12px 0 32px}footer nav{line-height:2}.word-card p,.count,.dictionary-caveat,.local-note,.hint,.hand-note,.empty p,.step,.result-top .eyebrow{color:var(--muted)}.masthead{height:76px}.results-panel{scrollbar-gutter:stable}footer a:hover,.masthead nav a:hover{text-decoration:underline}
@media(max-width:720px){.masthead{height:63px}.intro{padding:18px 0}.intro h1{font-size:32px}.intro h1 br{display:none}.intro h1 em{display:block;font-size:24px}.intro .lede{margin-top:8px}.controls .eyebrow{margin-bottom:12px}.modes{margin-bottom:12px}.modes label{min-height:56px}.mode-help{min-height:0;margin-bottom:10px}.word-card p{font-size:12px}.length-row{flex-wrap:wrap}.count{white-space:normal}.results-panel{scrollbar-gutter:auto}}

:root { color-scheme: light; }

:root[data-theme="dark"] {
    color-scheme: dark;
    --paper: rgb(18 25 22);
    --ink: rgb(233 239 231);
    --muted: rgb(185 202 189);
    --line: rgb(85 105 92);
    --green: rgb(170 214 178);
    --gold: rgb(241 207 130);
    --surface: rgb(29 39 34);
    --field: rgb(21 30 25);
    --panel: rgb(37 49 41);
    --edge: rgb(127 148 131);

  .controls, .word-card, #more, #retry { background: var(--surface); }
  .results-panel, .empty-tiles span { background: var(--panel); }
  .modes label:has(:checked), .try button:hover { background: var(--panel); border-color: var(--green); }
  .workbench, .results-panel, .guide article, .try button, .dictionary-caveat,
  .word-card, .empty-tiles span { border-color: var(--line); }

  .input-wrap input, .length-row select, .length-row option, .feedback input, .feedback textarea {
    background: var(--field);
    color: var(--ink);
    border-color: var(--edge);
  }
  h1 em, .hand-note, .empty p, .count, .controls > .eyebrow, .result-top .eyebrow,
  .section-heading .eyebrow, .input-wrap button, .local-note, .word-card p,
  .dictionary-caveat, .tile-art i, .step, .example-line span, #dictionary-state,
  .input-wrap input::placeholder { color: var(--muted); }

  .solve-button, .feedback button, .actions button[aria-pressed=true] {
    background: var(--green);
    color: var(--field);
  }
  .solve-button:hover, .feedback button:hover { background: var(--ink); }
  .actions button:not([aria-pressed=true]) { color: var(--ink); }
  .word mark, .empty-tiles span:nth-child(2), .tile-art > span:nth-child(4) {
    background: var(--gold);
    color: var(--field);
  }
  .tile-art > span { background: var(--panel); border-color: var(--line); color: var(--ink); }
  .word-card strong { color: var(--gold); }
  #error { background: rgb(59 37 30); color: rgb(255 212 191); border-color: currentColor; }
  :is(button, a, input, select, textarea, summary):focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
}

.masthead nav { align-items: center; }
#theme-toggle {
  display: grid; place-items: center; width: 44px; height: 44px;
  padding: 0; flex: 0 0 44px; border: 0; border-radius: 6px;
  background: transparent; color: var(--muted);
}
#theme-toggle svg { width: 16px; height: 16px; }
#theme-toggle:hover, #theme-toggle:focus-visible { color: var(--ink); }
#theme-toggle .sun, [data-theme="dark"] #theme-toggle .moon { display: none; }
[data-theme="dark"] #theme-toggle .sun { display: inline; }
@media (max-width: 720px) { .masthead nav { gap: 4px; } }
