/* Screen-only finishes for the three interactive services. Physical print geometry
   remains entirely in crossword-print.css and the existing print renderer. */
@media screen {
 .services-page:is([data-service-id="crossword"],[data-service-id="ocr"],[data-service-id="wordle"]) :is(input,select,textarea){font-size:16px}
 .services-page:is([data-service-id="crossword"],[data-service-id="ocr"],[data-service-id="wordle"]) :is(button,input,select,textarea,summary,[tabindex]):focus-visible{outline:3px solid var(--design-blue,#073bff);outline-offset:4px}
 .services-page:is([data-service-id="crossword"],[data-service-id="ocr"],[data-service-id="wordle"]) button{min-height:44px;overflow-wrap:anywhere}
 .services-page:is([data-service-id="crossword"],[data-service-id="ocr"]) .service-progress{display:block;width:100%;height:10px;overflow:hidden;border:0;border-radius:10px;background:#e8e5f5;accent-color:var(--design-blue,#073bff)}
 .services-page:is([data-service-id="crossword"],[data-service-id="ocr"]) .service-progress::-webkit-progress-bar{border-radius:10px;background:#e8e5f5}
 .services-page:is([data-service-id="crossword"],[data-service-id="ocr"]) .service-progress::-webkit-progress-value{border-radius:10px;background:var(--design-blue,#073bff)}
 .services-page:is([data-service-id="crossword"],[data-service-id="ocr"]) .service-progress::-moz-progress-bar{border-radius:10px;background:var(--design-blue,#073bff)}

 /* The generator is inserted before the manual form. Both retain DOM order in
    one form column, including when the currently inactive form is hidden. */
 .services-page[data-service-id="crossword"] .service-form-column{display:grid;grid-template-columns:minmax(0,1fr);grid-template-areas:"generator" "manual" "status";gap:0;padding:24px;border:1px solid var(--design-line,#e6e2ed);border-radius:22px;background:var(--design-surface,#fff);box-shadow:var(--design-shadow)}
 .services-page[data-service-id="crossword"] #crosswordGenerator{grid-area:generator;min-width:0;margin:0;padding:0;border:0;border-radius:0;background:transparent}
 .services-page[data-service-id="crossword"] #serviceForm{grid-area:manual;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none}
 .services-page[data-service-id="crossword"] .service-form-column>#serviceStatus{grid-area:status}
 .services-page[data-service-id="crossword"] .service-mode-switch{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 20px;padding:4px;border:1px solid var(--design-line,#e6e2ed);border-radius:14px;background:#f6f4fc}
 .services-page[data-service-id="crossword"] .service-mode-switch button{flex:1 1 120px;min-width:0;padding:10px 12px;border-color:transparent;border-radius:10px;background:transparent;font-size:14px;line-height:1.4;box-shadow:none}
 .services-page[data-service-id="crossword"] .service-mode-switch [aria-pressed="true"]{border-color:#6384ff;background:var(--design-blue,#073bff);color:#fff;box-shadow:0 3px 7px #073bff1a}
 .services-page[data-service-id="crossword"] #crosswordAIForm{min-width:0}
 .services-page[data-service-id="crossword"] #crosswordAIForm h2{margin:0 0 12px;font-size:23px;line-height:1.25;letter-spacing:-.025em;color:var(--design-ink,#171631)}
 .services-page[data-service-id="crossword"] #crosswordAIForm>.service-input-help{margin:0 0 20px;padding:0;border:0;background:transparent;color:var(--design-muted,#625d78);font-size:14px}
 .services-page[data-service-id="crossword"] :is(#ai-topic,#ai-count,#ai-difficulty){width:100%;min-width:0;min-height:46px;border-radius:12px}
 .services-page[data-service-id="crossword"] .difficulty-note{margin:-8px 0 18px;color:var(--design-muted,#625d78);font-size:13px;line-height:1.65}
 .services-page[data-service-id="crossword"] .service-ai-privacy{margin:0 0 18px;padding:12px 14px;border-radius:12px;background:#f0edff;color:#514b73;font-size:12px;line-height:1.65}
 .services-page[data-service-id="crossword"] #crosswordAIForm .service-form-actions{gap:10px}
 .services-page[data-service-id="crossword"] #generateCrossword{width:100%;min-height:46px}
 .services-page[data-service-id="crossword"] .ai-status{margin:14px 0 0;padding:11px 13px;border:1px solid #e2def1;border-radius:11px;background:#f4f2fb;color:var(--design-muted,#625d78);font-size:13px;line-height:1.65}
 .services-page[data-service-id="crossword"] .ai-status:empty{display:none}
 .services-page[data-service-id="crossword"] .ai-status[data-state="success"]{border-color:#bfe5ca;background:#eaf8ed;color:#235e37}
 .services-page[data-service-id="crossword"] .ai-status[data-state="error"]{border-color:#edc4c0;background:#fff0ed;color:#912d31}
 .services-page[data-service-id="crossword"] #crosswordGenerator>button{width:100%;margin:16px 0;color:var(--design-blue,#073bff);font-size:14px}
 .services-page[data-service-id="crossword"] #field-entries{min-height:270px;line-height:1.7}
 .services-page[data-service-id="crossword"] .checkbox-field{padding:12px;border-radius:11px;background:#f7f5fc}
 .services-page[data-service-id="crossword"] .crossword-answer-toggle{display:flex;align-items:center;gap:10px;min-height:44px;color:var(--design-ink,#171631);font-size:14px;line-height:1.5}
 .services-page[data-service-id="crossword"] .crossword-answer-toggle input{flex:0 0 20px;width:20px;height:20px;margin:0;accent-color:var(--design-blue,#073bff)}
 .services-page[data-service-id="crossword"] .crossword-scroll{max-width:100%;min-width:0;margin:16px 0 24px;padding:16px;overflow:auto;overscroll-behavior-x:contain;border:1px solid #e2ddee;border-radius:14px;background:#f6f3ff;scrollbar-width:thin;scrollbar-color:#b8b0d1 #f6f3ff}
 .services-page[data-service-id="crossword"] .crossword{display:table;background:transparent}
 .services-page[data-service-id="crossword"] .crossword-row{display:flex}
 .services-page[data-service-id="crossword"] :is(.crossword-cell,.crossword-gap){width:34px;height:34px;flex:0 0 34px}
 .services-page[data-service-id="crossword"] .crossword-cell{border:1px solid #6b628e;background:#fff;color:var(--design-ink,#171631)}
 .services-page[data-service-id="crossword"] .crossword-cell small{font-size:9px;line-height:1.3;color:#3b3455}
 .services-page[data-service-id="crossword"] .crossword-cell b{font-size:16px;line-height:1}
 .services-page[data-service-id="crossword"] .crossword-gap{background:transparent}
 .services-page[data-service-id="crossword"] #serviceResult>.crossword-clues{margin:10px 0 24px;padding:0;list-style:none;color:#403a5b;font-size:14px;line-height:1.7}
 .services-page[data-service-id="crossword"] .crossword-clues li{padding:8px 0;border-bottom:1px solid #eeebf4;overflow-wrap:anywhere}
 .services-page[data-service-id="crossword"] #serviceResult>.result-note-brief{background:#f0edff;color:#514b73}
 .services-page[data-service-id="crossword"] #serviceResult>.result-method{border-color:var(--design-line,#e6e2ed);background:#faf9ff}

 /* These are the real settings and reactive page estimator, not a paper mockup. */
 .services-page[data-service-id="crossword"] .crossword-print-panel{min-width:0;margin:24px 0 0;padding:20px;border:1px solid #ddd8f0;border-radius:18px;background:#f6f4ff}
 .services-page[data-service-id="crossword"] #crosswordPrintTitle{margin:0 0 10px;color:var(--design-ink,#171631);font-size:21px;line-height:1.3}
 .services-page[data-service-id="crossword"] .crossword-print-help{margin:0 0 16px;color:var(--design-muted,#625d78);font-size:12px;line-height:1.65;font-weight:400;overflow-wrap:anywhere}
 .services-page[data-service-id="crossword"] .crossword-print-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 14px}
 .services-page[data-service-id="crossword"] .crossword-print-field{display:flex;flex-direction:column;gap:8px;min-width:0;color:var(--design-ink,#171631);font-size:13px;line-height:1.5;font-weight:650}
 .services-page[data-service-id="crossword"] .crossword-print-field-title{grid-column:1/-1}
 .services-page[data-service-id="crossword"] .crossword-print-field :is(input,select){width:100%;min-width:0;min-height:46px;padding:11px 12px;border:1px solid #c9c5dc;border-radius:11px;background:#fff;color:var(--design-ink,#171631);font-family:inherit;font-size:16px;line-height:1.5;font-weight:400}
 .services-page[data-service-id="crossword"] .crossword-print-field :is(input,select):disabled{background:#eeebf5;color:#77708c;cursor:default}
 .services-page[data-service-id="crossword"] .crossword-print-field [aria-invalid="true"]{border-color:#ba4347;background:#fffafa;box-shadow:0 0 0 1px #ba4347}
 .services-page[data-service-id="crossword"] .crossword-print-field .crossword-print-help{margin:0}
 .services-page[data-service-id="crossword"] .crossword-print-title-count{color:var(--design-muted,#625d78);font-size:12px;line-height:1.5;font-weight:400;font-variant-numeric:tabular-nums}
 .services-page[data-service-id="crossword"] .crossword-print-title-count[data-over="true"]{color:#912d31;font-weight:650}
 .services-page[data-service-id="crossword"] #crosswordPrintStatus{margin:18px 0 14px;padding:12px 14px;border:1px solid #d4dafa;border-radius:12px;background:#e9edff;color:#343f7a;font-size:14px;line-height:1.65;font-weight:550;overflow-wrap:anywhere}
 .services-page[data-service-id="crossword"] #crosswordPrintStatus[data-kind="warning"]{border-color:#ecd7b9;background:#fff2de;color:#805224}
 .services-page[data-service-id="crossword"] #crosswordPrintStatus[data-kind="error"]{border-color:#edc4c0;background:#fff0ed;color:#912d31}
 .services-page[data-service-id="crossword"] #crosswordPrintButton{width:100%;min-height:46px;margin:0 0 12px;white-space:normal}
 .services-page[data-service-id="crossword"] #crosswordPrintButton+.crossword-print-help{margin:0}
 .services-page[data-service-id="crossword"] #crosswordPdfLink:not([hidden]){display:flex;align-items:center;width:100%;min-width:0;max-width:100%;min-height:44px;margin:0 0 12px;padding:10px 12px;border:1px solid #cec9e4;border-radius:10px;background:#fff;color:var(--design-blue,#073bff);font-size:14px;line-height:1.5;white-space:normal;overflow-wrap:anywhere;text-underline-offset:3px}

 .services-page[data-service-id="ocr"] #field-image{display:block;width:100%;min-width:0;min-height:52px;padding:4px;border:1px solid #c9c5dc;border-radius:12px;background:#faf9ff;color:var(--design-ink,#171631);font-size:16px;line-height:1.6;font-weight:400}
 .services-page[data-service-id="ocr"] #field-image::file-selector-button{min-width:44px;min-height:44px;margin:0 10px 0 0;padding:10px 12px;border:1px solid #d3cde4;border-radius:9px;background:#fff;color:var(--design-ink,#171631);font-family:inherit;font-size:14px;font-weight:550;line-height:1.5;cursor:pointer;box-shadow:0 2px 4px #40334d08}
 .services-page[data-service-id="ocr"] #field-image[aria-invalid="true"]{border-color:#ba4347;background:#fffafa;box-shadow:0 0 0 1px #ba4347}
 .services-page[data-service-id="ocr"] #field-language{width:100%;min-height:46px;border-radius:12px}
 .services-page[data-service-id="ocr"] #imagePreview{display:block;width:100%;max-width:100%;height:auto;max-height:320px;object-fit:contain;margin:18px 0;padding:12px;border:1px solid var(--design-line,#e6e2ed);border-radius:14px;background:#f4f2fa}
 .services-page[data-service-id="ocr"] #serviceProgress{margin:18px 0 12px}
 .services-page[data-service-id="ocr"] #serviceCancel{border-color:#cec8e1;background:#f7f5fc}
 .services-page[data-service-id="ocr"] #serviceResult>.service-output-label{display:block;margin:20px 0 10px;color:var(--design-ink,#171631);font-size:14px;font-weight:650}
 .services-page[data-service-id="ocr"] #serviceOutput{display:block;width:100%;min-height:300px;max-height:none;padding:16px;border:1px solid #aebcff;border-radius:14px;background:#fff;color:var(--design-ink,#171631);font-family:inherit;font-size:17px;line-height:1.8;box-shadow:0 2px 6px #073bff0b;resize:vertical}
 .services-page[data-service-id="ocr"] #serviceOutput[readonly]{border-color:#d7d0e5;background:#f8f6fb;color:var(--design-muted,#625d78);box-shadow:none}
 .services-page[data-service-id="ocr"] #serviceResultActions{gap:10px;margin-top:20px;padding-top:18px;border-color:var(--design-line,#e6e2ed)}
 .services-page[data-service-id="ocr"] #serviceResultActions button{min-height:46px;white-space:normal}
 .services-page[data-service-id="ocr"] .result-note-brief{background:#eef3ff;color:#414b7b}

 .services-page[data-service-id="wordle"] .service-workspace{grid-template-columns:minmax(250px,310px) minmax(0,1fr)}
 .services-page[data-service-id="wordle"] #field-guess{font-size:23px;line-height:1.5;letter-spacing:.07em;text-transform:uppercase}
 .services-page[data-service-id="wordle"] #serviceResult{display:grid;grid-template-columns:minmax(245px,.7fr) minmax(0,1fr);grid-template-areas:"title title" "board legend" "board pending" "board keys" "board check" "status status" "end end" "again again";gap:14px 24px;align-items:start}
 .services-page[data-service-id="wordle"] #serviceResult>h2{grid-area:title;margin-bottom:0}
 .services-page[data-service-id="wordle"] .wordle-grid{grid-area:board;display:grid;grid-template-columns:minmax(0,1fr);gap:7px;width:100%;max-width:310px;margin:0;justify-self:start}
 .services-page[data-service-id="wordle"] .wordle-row{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px}
 .services-page[data-service-id="wordle"] .wordle-cell{width:100%;height:auto;min-height:52px;aspect-ratio:1/1.04;border:1px solid #c4bdd8;border-radius:10px;background:#fff;color:#a49eb5;font-size:26px;font-weight:700;line-height:1;text-transform:uppercase;box-shadow:0 2px 3px #40334d04}
 .services-page[data-service-id="wordle"] .wordle-cell small{right:4px;bottom:3px;font-size:12px;line-height:1;font-weight:700}
 .services-page[data-service-id="wordle"] .wordle-cell.correct{border:2px solid #6abc77;background:#c6f5c0;color:#145c2c}
 .services-page[data-service-id="wordle"] .wordle-cell.present{border:2px solid #dfb74d;background:#ffe393;color:#6c480a}
 .services-page[data-service-id="wordle"] .wordle-cell.absent{border:2px solid #c7c3d3;background:#e0dfeb;color:#514c68}
 .services-page[data-service-id="wordle"] #serviceResult>.result-note:not(#wordleStatus){grid-area:legend;margin:0;padding:12px 14px;border-radius:12px;background:#f0effa;color:#514b73;font-size:13px;line-height:1.65}
 .services-page[data-service-id="wordle"] #wordlePending{grid-area:pending;min-width:0;margin:0;color:var(--design-ink,#171631);font-size:16px;line-height:1.6;font-weight:600;overflow-wrap:anywhere}
 .services-page[data-service-id="wordle"] .wordle-keyboard{grid-area:keys;display:flex;flex-direction:column;gap:5px;min-width:0;max-width:100%;margin:0}
 .services-page[data-service-id="wordle"] .wordle-keyboard>div{display:flex;justify-content:center;gap:4px;margin:0;min-width:0}
 .services-page[data-service-id="wordle"] .wordle-keyboard>div>button{flex:1 1 44px;width:44px;min-width:44px;max-width:52px;min-height:44px;padding:8px 2px;border:1px solid #d7d1e5;border-radius:9px;background:#fff;color:var(--design-ink,#171631);font-size:16px;line-height:1.2;font-weight:600;box-shadow:0 2px 3px #40334d08}
 .services-page[data-service-id="wordle"] .wordle-keyboard>button{align-self:stretch;width:100%;max-width:none;min-height:46px;margin-top:5px;padding:10px 14px;border-color:#d7d1e5;border-radius:11px;background:#f7f5fc;font-size:14px;line-height:1.4}
 .services-page[data-service-id="wordle"] #wordleCheck{grid-area:check;width:100%;min-height:46px;margin:0}
 .services-page[data-service-id="wordle"] #wordleStatus{grid-area:status;margin:0;padding:12px 14px;border:1px solid var(--design-line,#e6e2ed);border-radius:12px;background:#f4f2fb;color:var(--design-muted,#625d78);font-size:14px;line-height:1.65}
 .services-page[data-service-id="wordle"] #serviceResult :is(#wordlePending,#wordleStatus){margin:0}
 .services-page[data-service-id="wordle"] .game-end{grid-area:end;margin:0;padding:16px;border:1px solid #d2d5ef;border-radius:13px;background:#edf0ff;color:var(--design-ink,#171631);font-size:20px;line-height:1.4;font-weight:700}
 .services-page[data-service-id="wordle"] .game-end+button{grid-area:again;width:100%;min-height:46px;border-color:#c6ccec;background:#f1f3ff;color:#263989;font-weight:650}

 .services-page:is([data-service-id="crossword"],[data-service-id="ocr"],[data-service-id="wordle"]) [hidden]{display:none!important}
}

@media screen and (max-width:1279px) {
 .services-page[data-service-id="wordle"] #serviceResult{grid-template-columns:minmax(0,1fr);grid-template-areas:"title" "board" "legend" "pending" "keys" "check" "status" "end" "again";gap:16px}
 .services-page[data-service-id="wordle"] .wordle-grid{justify-self:center}
 .services-page[data-service-id="wordle"] .wordle-keyboard{width:100%;max-width:464px;justify-self:center}
}
@media screen and (min-width:1200px) {
 .services-page[data-service-id="crossword"] .service-workspace{grid-template-columns:minmax(360px,440px) minmax(0,1fr)}
}
@media screen and (max-width:1000px) and (min-width:761px) {
 .services-page[data-service-id="crossword"] .service-form-column{padding:20px}
 .services-page[data-service-id="wordle"] .service-workspace{grid-template-columns:minmax(230px,270px) minmax(0,1fr);gap:20px}
 .services-page[data-service-id="wordle"] .wordle-keyboard{display:grid;grid-template-columns:repeat(auto-fit,minmax(44px,1fr));gap:5px}
 .services-page[data-service-id="wordle"] .wordle-keyboard>div{display:contents}
 .services-page[data-service-id="wordle"] .wordle-keyboard>div>button{width:100%;max-width:none}
 .services-page[data-service-id="wordle"] .wordle-keyboard>button{grid-column:1/-1}
}
@media screen and (max-width:760px) {
 .services-page[data-service-id="crossword"] .service-form-column{padding:20px;border-radius:18px}
 .services-page[data-service-id="crossword"] #crosswordAIForm h2{font-size:22px}
 .services-page[data-service-id="crossword"] #field-entries{min-height:240px}
 .services-page[data-service-id="crossword"] .crossword-scroll{padding:12px;margin:14px 0 22px;border-radius:12px}
 .services-page[data-service-id="crossword"] .crossword-print-panel{padding:16px;border-radius:14px}
 .services-page[data-service-id="crossword"] .crossword-print-fields{grid-template-columns:minmax(0,1fr);gap:16px}
 .services-page[data-service-id="crossword"] #crosswordPrintTitle{font-size:20px}
 .services-page[data-service-id="crossword"] #crosswordPrintButton{padding-inline:10px}
 .services-page[data-service-id="ocr"] #imagePreview{max-height:280px;padding:10px}
 .services-page[data-service-id="ocr"] #serviceOutput{min-height:260px;padding:14px;font-size:16px;line-height:1.75}
 .services-page[data-service-id="ocr"] #serviceResultActions button{flex:1 1 100%}
 .services-page[data-service-id="wordle"] .service-main{padding-inline:10px}
 .services-page[data-service-id="wordle"] .service-intro.design-hero{display:block;padding:14px;min-height:0}
 .services-page[data-service-id="wordle"] .design-hero-copy h1{margin:4px 0 8px;padding-right:76px;font-size:26px;line-height:1.12}
 .services-page[data-service-id="wordle"] .design-hero-copy p{max-width:none;font-size:14px;line-height:1.45}
 .services-page[data-service-id="wordle"] .design-hero-art{position:absolute;top:14px;right:14px;width:64px;height:50px;margin:0}
 .services-page[data-service-id="wordle"] .service-workspace{grid-template-columns:minmax(0,1fr);gap:18px}
 .services-page[data-service-id="wordle"] #serviceForm{padding:14px}
 .services-page[data-service-id="wordle"] #serviceForm .service-field{gap:6px;margin-bottom:12px}
 .services-page[data-service-id="wordle"] #field-guess{min-height:46px;padding:8px 12px;font-size:20px;line-height:1.3}
 .services-page[data-service-id="wordle"] #serviceForm .service-field-hint{line-height:1.5}
 .services-page[data-service-id="wordle"] #serviceForm .service-counter{line-height:1.3}
 .services-page[data-service-id="wordle"] #serviceForm #serviceStatus{margin:10px 0 12px;padding:8px 10px;font-size:12px;line-height:1.5}
 .services-page[data-service-id="wordle"] #serviceForm .service-form-actions{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);gap:8px}
 .services-page[data-service-id="wordle"] #serviceForm .service-form-actions button{min-height:46px;padding:9px 8px;font-size:14px;line-height:1.4}
 .services-page[data-service-id="wordle"] #serviceCancel{grid-column:1/-1}
 .services-page[data-service-id="wordle"] #serviceResult{padding:14px;gap:14px;border-radius:18px}
 .services-page[data-service-id="wordle"] .wordle-grid{max-width:310px;gap:6px}
 .services-page[data-service-id="wordle"] .wordle-row{gap:6px}
 .services-page[data-service-id="wordle"] .wordle-cell{min-height:44px;font-size:24px;border-radius:8px}
 .services-page[data-service-id="wordle"] .wordle-cell small{right:3px;bottom:3px;font-size:11px}
 .services-page[data-service-id="wordle"] .wordle-keyboard{display:grid;grid-template-columns:repeat(auto-fit,minmax(44px,1fr));gap:4px;max-width:344px}
 .services-page[data-service-id="wordle"] .wordle-keyboard>div{display:contents}
 .services-page[data-service-id="wordle"] .wordle-keyboard>div>button{width:100%;min-width:44px;max-width:none;min-height:44px;padding:8px 2px;border-radius:8px}
 .services-page[data-service-id="wordle"] .wordle-keyboard>button{grid-column:1/-1;margin-top:6px}
 .services-page[data-service-id="wordle"] #serviceResult>.result-note:not(#wordleStatus){padding:11px 12px;font-size:12px}
 .services-page[data-service-id="wordle"] #wordleStatus{padding:11px 12px;font-size:13px}
 .services-page[data-service-id="wordle"] .game-end{padding:14px;font-size:19px}
}
@media screen and (prefers-reduced-motion:reduce) {
 .services-page:is([data-service-id="crossword"],[data-service-id="ocr"],[data-service-id="wordle"]) :is(button,input,select,textarea,progress){animation:none!important;transition:none!important;scroll-behavior:auto!important}
}
