/* Kitlune shared premium tool-page system — light/dark contrast and mobile sizing */
:root{--kt-ink:var(--text);--kt-muted:var(--muted);--kt-line:var(--border);--kt-panel:var(--surface);--kt-soft:var(--soft);--kt-accent:var(--accent);--kt-focus:var(--accent)}
body{background:var(--bg);color:var(--text)}
.header{background:var(--bg)}
.page-hero{padding:clamp(42px,7vw,76px) 0 34px;background:var(--soft);border-bottom:1px solid var(--border)}
.page-hero .eyebrow{display:flex;align-items:center;gap:9px;font-size:.7rem;font-weight:800;letter-spacing:.13em;color:var(--muted)}
.page-hero .dot{width:7px;height:7px;border-radius:50%;background:var(--success);box-shadow:0 0 0 4px color-mix(in srgb,var(--success) 15%,transparent)}
.page-hero h1{margin:13px 0 15px;font-size:clamp(2.25rem,5vw,3.65rem);line-height:1.07;letter-spacing:-.065em;color:var(--text)}
.page-hero .lead{max-width:710px;margin:0;color:var(--muted);font-size:1rem;line-height:1.85}
main .section,.tool-layout,.tool-shell{scroll-margin-top:90px}
.tool-card,.tool-panel,.tool-box,.calculator-card,.result-card,.dropzone,.upload-zone,.tool-workspace,.panel,.stat-card,.output-card{border-color:var(--border)}
:where(.tool-card,.tool-panel,.tool-box,.calculator-card,.result-card,.dropzone,.upload-zone,.tool-workspace,.panel,.stat-card,.output-card){background:var(--surface);color:var(--text)}
:where(label,legend,.field-label,.form-label,.help-text,.tool-description,.muted,.subtle,.result-label,.stat-label){color:var(--muted)}
:where(input:not([type=checkbox]):not([type=radio]):not([type=range]),textarea,select){max-width:100%;background:var(--surface);color:var(--text);border-color:var(--border)}
:where(input,textarea,select)::placeholder{color:var(--muted);opacity:.85}
:where(input,textarea,select,button,a):focus-visible{outline:3px solid color-mix(in srgb,var(--accent) 45%,transparent);outline-offset:3px}
:where(.tool-card,.tool-panel,.tool-box,.calculator-card,.result-card,.tool-workspace,.panel,.stat-card,.output-card) h2,:where(.tool-card,.tool-panel,.tool-box,.calculator-card,.result-card,.tool-workspace,.panel,.stat-card,.output-card) h3{color:var(--text)}
:where(.tool-card,.tool-panel,.tool-box,.calculator-card,.result-card,.tool-workspace,.panel,.stat-card,.output-card) p{color:var(--muted)}
:where(.tool-message,.calc-error,.tool-error){overflow-wrap:anywhere}
:where(.tool-actions,.button-row,.form-actions){display:flex;gap:10px;flex-wrap:wrap}
:where(button,.btn){min-height:42px}
:where(.primary,.btn.primary){background:var(--accent);color:#fff}
:where(.secondary,.btn.secondary){background:var(--surface);color:var(--text);border-color:var(--border)}
:where(.tool-result,.result-panel,.result-summary){background:var(--soft);color:var(--text);border-color:var(--border)}
:where(.tool-result,.result-panel,.result-summary) :where(h2,h3,strong,b,span,p,small,label){color:inherit}
:where(.tool-result,.result-panel,.result-summary) :where(.muted,small,.help-text){color:var(--muted)}
.prose{color:var(--text)}.prose h2,.prose h3{color:var(--text)}.prose p,.prose li{color:var(--muted)}
.footer{background:var(--soft);border-top:1px solid var(--border)}.footer :where(h2,h3){color:var(--text)}.footer :where(p,a,small){color:var(--muted)}
:root[data-theme=dark]{--kt-ink:#f4f4f5;--kt-muted:#c0c0c8;--kt-line:#44444c;--kt-panel:#18181b;--kt-soft:#202023;--kt-accent:#818cf8}
:root[data-theme=dark] .page-hero{background:linear-gradient(130deg,#17191a,#101112);border-color:#34343a}
:root[data-theme=dark] .page-hero h1,:root[data-theme=dark] .page-hero h2,:root[data-theme=dark] .page-hero h3{color:#f4f4f5}
:root[data-theme=dark] .page-hero .lead,:root[data-theme=dark] .page-hero .eyebrow{color:#c4c4cc}
:root[data-theme=dark] :where(.tool-card,.tool-panel,.tool-box,.calculator-card,.result-card,.dropzone,.upload-zone,.tool-workspace,.panel,.stat-card,.output-card){background:#18181b;color:#f4f4f5;border-color:#44444c}
:root[data-theme=dark] :where(.tool-card,.tool-panel,.tool-box,.calculator-card,.result-card,.tool-workspace,.panel,.stat-card,.output-card) :where(h2,h3,h4,strong,b,legend,label){color:#f4f4f5}
:root[data-theme=dark] :where(.tool-card,.tool-panel,.tool-box,.calculator-card,.result-card,.tool-workspace,.panel,.stat-card,.output-card) :where(p,small,.muted,.help-text,.field-label,.form-label,.tool-description,.subtle,.result-label,.stat-label){color:#c4c4cc}
:root[data-theme=dark] :where(input:not([type=checkbox]):not([type=radio]):not([type=range]),textarea,select){background:#111113;color:#f4f4f5;border-color:#52525b}
:root[data-theme=dark] :where(input,textarea,select)::placeholder{color:#a1a1aa}
:root[data-theme=dark] :where(.tool-result,.result-panel,.result-summary){background:#202023;color:#f4f4f5;border-color:#44444c}
:root[data-theme=dark] .footer{background:#18181b;border-color:#3f3f46}
:root[data-theme=dark] .footer :where(h2,h3){color:#f4f4f5}
:root[data-theme=dark] .footer :where(p,a,small){color:#c4c4cc}
@media(max-width:760px){.page-hero{padding:38px 0 27px}.page-hero h1{font-size:clamp(2.1rem,9.5vw,3rem);line-height:1.08;letter-spacing:-.055em}.page-hero .lead{font-size:.98rem;line-height:1.8}.page-hero .wrap{width:calc(100% - 32px)}:where(.tool-card,.tool-panel,.tool-box,.calculator-card,.result-card,.tool-workspace,.panel,.stat-card,.output-card){padding:18px}:where(input:not([type=checkbox]):not([type=radio]):not([type=range]),textarea,select){font-size:16px;min-height:44px}:where(button,.btn){font-size:14px;min-height:44px}.prose{padding-top:30px}}
@media(max-width:420px){.page-hero h1{font-size:2.05rem}.page-hero .lead{font-size:.94rem}.tool-card h2,.tool-panel h2,.calculator-card h2{font-size:1.2rem}}


/* Strong, explicit contrast rules for every tool workspace in both themes. */
.tool-workspace-section{color:var(--text)}
.tool-workspace-section .tool-workspace,
.tool-workspace-section .tool-panel,
.tool-workspace-section .tool-box,
.tool-workspace-section .calculator-card,
.tool-workspace-section .result-card,
.tool-workspace-section .panel,
.tool-workspace-section .stat-card,
.tool-workspace-section .output-card{background:var(--surface);color:var(--text);border-color:var(--border)}
.tool-workspace-section :where(h1,h2,h3,h4,legend,label,strong,b,dt,dd,output){color:var(--text)}
.tool-workspace-section :where(p,small,li,.muted,.subtle,.help-text,.field-label,.form-label,.tool-description,.result-label,.stat-label,.text-status){color:var(--muted)}
.tool-workspace-section :where(input:not([type=checkbox]):not([type=radio]):not([type=range]),textarea,select){background:var(--surface);color:var(--text);border:1px solid var(--border)}
.tool-workspace-section :where(input,textarea,select)::placeholder{color:var(--muted);opacity:1}
:root[data-theme=dark] .tool-workspace-section{color:#f4f4f5}
:root[data-theme=dark] .tool-workspace-section :where(h1,h2,h3,h4,legend,label,strong,b,dt,dd,output){color:#f4f4f5}
:root[data-theme=dark] .tool-workspace-section :where(p,small,li,.muted,.subtle,.help-text,.field-label,.form-label,.tool-description,.result-label,.stat-label,.text-status){color:#c4c4cc}
:root[data-theme=dark] .tool-workspace-section :where(.tool-workspace,.tool-panel,.tool-box,.calculator-card,.result-card,.panel,.stat-card,.output-card,.upload-zone,.dropzone,.tool-result,.result-panel,.result-summary){background:#18181b;color:#f4f4f5;border-color:#52525b}
:root[data-theme=dark] .tool-workspace-section :where(input:not([type=checkbox]):not([type=radio]):not([type=range]),textarea,select){background:#111113;color:#f4f4f5;border-color:#62626b}
:root[data-theme=dark] .tool-workspace-section :where(input,textarea,select)::placeholder{color:#b4b4bd;opacity:1}
:root[data-theme=dark] .tool-workspace-section :where(.tool-result,.result-panel,.result-summary) :where(h1,h2,h3,h4,p,small,span,strong,b,label,output){color:inherit}
