@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;450;500;550;600;650;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');
:root{color-scheme:dark;--bg:#111614;--sidebar:#141a17;--panel:#1a211d;--panel-deep:#151b18;--line:#303a32;--line-soft:#293229;--text:#eef1eb;--muted:#a0aba1;--dim:#7a887c;--lime:#c8f27a;--lime-dark:#252f20;--mono:'IBM Plex Mono',ui-monospace,SFMono-Regular,monospace;--sans:'DM Sans',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif}*{box-sizing:border-box}body{margin:0;font-family:var(--sans);font-size:16px;color:var(--text);background:var(--bg);line-height:1.5}button,input,textarea,select{font:inherit}button,a,input,select,summary,[role=button]{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button{color:inherit}a{color:inherit;text-decoration:none}button:disabled{cursor:default;opacity:.35}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,summary:focus-visible,[tabindex]:focus-visible{outline:2px solid var(--lime);outline-offset:4px}button{transition:background .16s,color .16s,border-color .16s}button:hover:not(:disabled){filter:brightness(1.12)}[hidden]{display:none!important}h1,h2,h3,p{margin:0}.icon-defs{position:absolute;width:0;height:0;overflow:hidden}.icon{width:19px;height:19px;stroke:currentColor;stroke-width:1.6;fill:none;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;clip:rect(0,0,0,0);overflow:hidden}.sidebar{position:fixed;top:0;bottom:0;left:0;width:236px;background:var(--sidebar);border-right:1px solid var(--line-soft);padding:33px 20px 20px;display:flex;flex-direction:column;z-index:5}.brand{display:flex;align-items:center;gap:10px;font-size:23px;letter-spacing:-1px;font-weight:700;white-space:nowrap;margin-bottom:58px}.brand-light{font-weight:450}.brand small{display:block;font-family:var(--mono);font-size:9px;letter-spacing:1.55px;font-weight:400;margin-top:3px;color:var(--dim)}.brand-mark{height:37px;width:37px;background:var(--lime);color:#182216;display:flex;align-items:center;justify-content:center;border-radius:10px;font-family:var(--mono);font-size:27px;letter-spacing:-5px;padding-right:5px;line-height:1;transform:rotate(-7deg);font-weight:500}.brand-mark span{transform:rotate(180deg);display:block;margin-left:0}.nav-label{color:var(--dim);font-family:var(--mono);font-size:11px;letter-spacing:1.6px;padding:0 12px 15px}.nav-item{display:flex;align-items:center;gap:12px;width:100%;background:none;border:1px solid transparent;border-radius:7px;padding:11px 12px;font-size:14px;font-weight:500;color:var(--muted);margin-bottom:6px;text-align:left}.nav-item.active{background:#283320;border-color:#35432b;color:var(--lime)}.nav-item:hover{background:#222b24}.nav-count{margin-left:auto;font:11px var(--mono);color:var(--dim)}.nav-indicator{margin-left:auto;width:5px;height:5px;border-radius:50%;background:var(--lime)}.sidebar-note{margin-top:52px;padding:19px 14px 20px;border-top:1px solid var(--line-soft)}.little-symbol{font:32px var(--mono);color:#708264;margin-bottom:13px;letter-spacing:-2px}.little-symbol span{font-size:22px;margin:0 5px;color:#4c5b47}.sidebar-note h3{font-size:16px;font-weight:500;margin-bottom:7px}.sidebar-note p{font-size:14px;line-height:1.7;color:var(--dim);margin-bottom:15px}.text-button{border:0;padding:0;background:transparent;font-size:13px;color:var(--muted);display:inline-flex;align-items:center;gap:7px}.text-button .icon{width:15px;height:15px}.text-button:hover{color:var(--lime)}.sidebar-note .text-button{font-size:12px}.privacy{margin-top:auto;display:flex;gap:10px;padding:20px 4px}.privacy-icon{color:var(--lime);padding-top:2px}.privacy strong{font-size:12px;font-weight:500}.privacy p{font-size:12px;color:var(--dim);line-height:1.65;margin-top:4px}.sidebar-footer{border-top:1px solid var(--line-soft);padding:16px 5px 0;display:flex;justify-content:space-between;font:10px var(--mono);letter-spacing:1.4px;color:#66756a}.app-shell{margin-left:236px}.topbar{height:82px;border-bottom:1px solid var(--line-soft);display:flex;align-items:center;justify-content:space-between;padding:0 42px;gap:16px}.breadcrumb{font-size:13px;display:flex;gap:14px;color:var(--dim);align-items:center}.breadcrumb strong{font-weight:450;color:#c8d0c6}.slash{color:#536054}.topbar-right{display:flex;gap:25px;align-items:center}.local-pill{display:flex;align-items:center;gap:7px;font-size:12px;color:var(--muted)}.local-pill .icon{width:14px;height:14px;color:#a1b587}.help-button{background:transparent;border:0;display:flex;align-items:center;gap:7px;color:#d1d9ce;font-size:13px;padding:6px 0}.help-button .icon{width:16px;height:16px}main{max-width:1460px;margin:auto;padding:42px 42px 24px}.page-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:32px;gap:20px}.eyebrow{font:10px var(--mono);letter-spacing:1.8px;color:var(--muted);display:flex;align-items:center;gap:8px;margin-bottom:13px}.eyebrow>span{width:15px;height:1px;background:var(--lime)}h1{font-size:clamp(28px,2.8vw,42px);line-height:1.2;font-weight:500;letter-spacing:-1.5px;margin-bottom:12px}h1 em{font-style:normal;color:var(--lime)}.page-heading p{font-size:14px;color:var(--muted)}.heading-glyph{display:flex;align-items:center;gap:6px;margin-right:10px;opacity:.8}.heading-glyph span{font:30px var(--mono);color:#52644b;border:1px solid #34432f;padding:6px 12px;border-radius:8px;transform:rotate(-9deg)}.heading-glyph span:last-child{color:#a1bd73;transform:rotate(8deg);margin-left:-17px;background:var(--bg)}.workbench-grid{display:grid;grid-template-columns:1.08fr 1fr;gap:22px;align-items:stretch}.panel{background:var(--panel);border:1px solid var(--line);border-radius:12px;overflow:hidden}.panel-heading{height:61px;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 20px;border-bottom:1px solid var(--line-soft)}.panel-heading h2{display:flex;align-items:center;gap:9px;font-size:15px;font-weight:550;letter-spacing:-.2px}.panel-heading h2 .icon{color:var(--muted);width:17px;height:17px}.subtle-button{display:flex;align-items:center;gap:6px;padding:5px 0;background:transparent;border:0;color:var(--muted);font-size:12px}.subtle-button .icon{width:14px;height:14px;color:#b2c899}.input-panel{display:flex;flex-direction:column;min-height:570px}.input-toolbar{display:flex;justify-content:space-between;align-items:center;padding:13px 20px 0}.input-mode-tabs{display:flex;gap:3px;background:var(--panel-deep);padding:3px;border:1px solid #2c352d;border-radius:7px}.input-mode{background:transparent;border:0;border-radius:4px;padding:6px 14px;font-size:12px;color:var(--muted)}.input-mode.active{background:#333e33;color:var(--text)}.icon-button{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;border:0;background:transparent;border-radius:5px;color:var(--muted)}.icon-button:hover:not(:disabled){background:#333e33;color:var(--text)}.icon-button .icon{width:16px;height:16px}.source-tabs{display:flex;gap:5px;padding:12px 20px 0;overflow-x:auto;min-height:18px}.source-tab{display:flex;align-items:center;gap:5px;max-width:160px;flex-shrink:0;border:1px solid #354033;border-radius:5px;background:#222b23;padding:0 4px 0 9px}.source-tab.active{background:#2a3424;border-color:#5a6d43}.source-tab>button:first-child{background:none;border:none;padding:5px 0;font:11px var(--mono);color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:115px}.source-tab.active>button:first-child{color:var(--lime)}.source-tab .icon-button{width:22px;height:22px}.source-tab .icon{width:12px;height:12px}.text-entry{flex:1;display:flex;flex-direction:column;min-height:300px}.text-entry textarea{width:100%;flex:1;resize:vertical;min-height:265px;background:transparent;border:0;color:#d4dfca;padding:24px 22px;outline-offset:-4px;font:14px/1.9 var(--mono);tab-size:2}.text-entry textarea::placeholder{color:#758174;font-size:13px;line-height:2}.editor-footer{padding:15px 22px;display:flex;align-items:center;justify-content:space-between;border-top:1px solid #283028;font-size:11px;color:var(--dim);gap:10px}.editor-footer .text-button{font-size:11px}.drop-strip{display:flex;align-items:center;gap:11px;margin:0 16px 16px;padding:18px 14px;border:1px dashed #47513e;border-radius:7px;background:#1e261e;cursor:pointer;color:#a8b29f}.drop-strip:hover{background:#242f22;border-color:var(--lime)}.drop-strip>.icon{width:22px;height:22px;color:#9aaf81}.drop-strip>span:nth-child(2){flex:1;font-size:11px}.drop-strip strong{font-weight:550;color:#d3dccc}.drop-strip small{display:block;color:var(--dim);margin-top:4px;font-size:10px}.file-type{border:1px solid #4d5747;border-radius:3px;font:10px var(--mono);padding:4px;transform:rotate(6deg)}.file-type:last-child{transform:rotate(-5deg);margin-left:-5px}.input-panel.dragover{border:1px solid var(--lime);box-shadow:inset 0 0 0 2px #c8f27a33}.file-entry{flex:1;text-align:center;padding:35px 20px}.big-drop-icon{width:50px;height:50px;display:grid;place-items:center;background:#2c3926;color:var(--lime);border-radius:12px;margin:0 auto 18px}.big-drop-icon .icon{width:24px;height:24px}.file-entry h3{font-size:16px;font-weight:500;margin-bottom:8px}.file-entry p{font-size:13px;color:var(--muted);line-height:1.8}.secondary-button{border:1px solid #4b5845;border-radius:6px;background:#283324;padding:9px 15px;color:#d8e5cd;font-size:13px}.file-entry .secondary-button{margin:18px 0}.file-entry .file-limit{font-size:11px}.import-status{margin:0 16px 15px;padding:10px 12px;background:#2c3424;border-radius:6px;font-size:12px;color:#d7dfa5;white-space:pre-line}.right-column{display:flex;flex-direction:column;gap:20px;min-width:0}.mode-toggle{display:flex;gap:2px;background:#111813;border:1px solid #2c352a;border-radius:6px;padding:3px}.mode-toggle button{border:0;background:none;border-radius:3px;padding:5px 10px;font-size:11px;color:var(--muted)}.mode-toggle button.active{background:#35432c;color:var(--lime)}.cipher-body{padding:18px 20px}.field-label{font-size:12px;color:#b5c0ae;display:block;margin-bottom:8px}.select-wrap{position:relative}.select-wrap>.icon{position:absolute;right:12px;top:14px;width:15px;height:15px;pointer-events:none;color:var(--muted)}select{appearance:none;width:100%;background:#202a20;color:#e4edda;border:1px solid #4a5940;border-radius:6px;padding:11px 35px 11px 13px;font-size:14px}select option,select optgroup{background:#202820}.cipher-description{font-size:12px;color:var(--muted);margin-top:9px;line-height:1.65}.cipher-fields{display:flex;gap:12px;flex-wrap:wrap}.cipher-fields:empty{display:none}.cipher-field{flex:1;min-width:120px;margin-top:16px}.cipher-field input{width:100%;background:var(--panel-deep);border:1px solid #46533e;border-radius:5px;padding:9px 11px;color:var(--text);font:13px var(--mono)}.cipher-field select{font-size:13px}.method-details{margin:10px 0 0;font-size:11px;color:#a5b19c}.method-details summary{cursor:pointer;list-style-position:inside}.method-details p{margin-top:8px;padding:10px 12px;background:#232b21;border-radius:5px;line-height:1.7;color:#c0cbb8}.run-button{width:100%;display:flex;justify-content:center;align-items:center;gap:9px;border:0;border-radius:6px;background:var(--lime);color:#1d2c12;font-size:14px;font-weight:650;padding:12px 16px;margin-top:18px;position:relative;box-shadow:0 2px 0 #90b454}.run-button .icon{width:17px;height:17px}.run-button kbd{position:absolute;right:12px;font:10px var(--mono);opacity:.55;font-weight:400}.run-button:active{transform:translateY(1px);box-shadow:none}.result-panel{flex:1;min-height:238px;display:flex;flex-direction:column}.result-panel .panel-heading{height:55px;flex-shrink:0}.result-actions{display:flex;gap:4px}.result-panel h2>span{font:9px var(--mono);letter-spacing:.7px;background:#2d3c25;color:#c8e6a4;padding:3px 6px;border-radius:3px;margin-left:3px}#results{flex:1;padding:0 20px;max-height:470px;overflow:auto}.empty-result{height:100%;min-height:175px;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:20px 10px}.empty-result-symbol{font:28px var(--mono);color:#617554;margin-bottom:12px}.empty-result p{font-size:12px;color:#a6b39d}.empty-result>span:last-child{font-size:11px;color:var(--dim);margin-top:5px}.result-item{padding:16px 0}.result-item+.result-item{border-top:1px solid var(--line)}.result-item h3{font:11px var(--mono);color:var(--muted);margin-bottom:8px;overflow-wrap:anywhere}.result-item pre{font:14px/1.8 var(--mono);margin:0;color:var(--lime);white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word}.result-item.error p{color:#f3b6a0;font-size:13px;line-height:1.6}.result-item.warning p{color:#d6c68a}.result-footer{border-top:1px solid var(--line);padding:11px 20px;display:flex;justify-content:space-between;align-items:center;gap:12px;font-size:10px;color:var(--dim)}.result-footer .text-button{font-size:11px}.explore-section{margin-top:29px}.section-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:14px}.section-heading h2{font-size:14px;font-weight:500}.section-heading .text-button{font-size:11px}.quick-ciphers{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.quick-cipher{background:#182019;border:1px solid #303c2e;border-radius:8px;padding:16px;text-align:left;position:relative;overflow:hidden}.quick-cipher:hover{border-color:#6b7e54;background:#222c20}.cipher-glyph{font:14px var(--mono);color:#9eae86;margin-bottom:15px;height:22px}.cipher-glyph span{color:#53634a;margin:0 5px}.quick-cipher h3{font-size:13px;font-weight:550;margin-bottom:3px}.quick-cipher p{font-size:10px;color:var(--dim)}.main-footer{display:flex;justify-content:space-between;gap:10px;margin-top:27px;color:#7e8b7d;font-size:10px}.library-controls{margin-bottom:26px}.search-field{position:relative;width:100%;max-width:480px;margin-bottom:19px}.search-field .icon{position:absolute;left:14px;top:14px;color:var(--dim);width:17px;height:17px}.search-field input{width:100%;padding:12px 14px 12px 42px;background:var(--panel);border:1px solid var(--line);border-radius:7px;color:var(--text);font-size:14px}.category-filters{display:flex;gap:7px;flex-wrap:wrap}.filter-button{background:var(--panel);border:1px solid var(--line);color:var(--muted);font-size:12px;border-radius:5px;padding:7px 11px}.filter-button.active{color:var(--lime);background:#2a3522;border-color:#52653d}.library-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.library-card{display:flex;flex-direction:column;text-align:left;background:var(--panel);border:1px solid var(--line);border-radius:9px;padding:22px;min-height:205px}.library-card:hover{border-color:#6d8551;background:#20291e}.library-card .category{font:10px var(--mono);color:#9caf88;margin-bottom:12px;letter-spacing:.5px}.library-card h2{font-size:20px;font-weight:500;letter-spacing:-.5px;margin-bottom:9px}.library-card p{font-size:13px;color:var(--muted);line-height:1.65;margin-bottom:18px}.library-card .library-action{font-size:12px;color:var(--lime);margin-top:auto}.history-empty{padding:70px 20px;text-align:center;background:var(--panel);border:1px dashed var(--line);border-radius:12px}.history-empty>.icon{width:32px;height:32px;color:var(--lime);margin-bottom:14px}.history-empty h2{font-size:21px;font-weight:450;margin-bottom:8px}.history-empty p{font-size:14px;color:var(--muted);margin-bottom:20px}.history-card{padding:22px;background:var(--panel);border:1px solid var(--line);border-radius:9px;margin-bottom:12px;display:flex;gap:22px;align-items:center}.history-card>div{min-width:0;flex:1}.history-card h2{font-size:16px;font-weight:500}.history-card small{font-size:11px;color:var(--dim);margin-left:10px}.history-card pre{margin:10px 0 0;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;font:13px var(--mono);color:#bbcba9}.history-card .secondary-button{flex-shrink:0}dialog{width:min(540px,calc(100% - 30px));border:1px solid #46553e;border-radius:14px;background:#1a231c;color:var(--text);padding:26px 30px;box-shadow:0 25px 120px #0009}dialog::backdrop{background:#070d09b8;backdrop-filter:blur(5px)}.dialog-header{display:flex;align-items:center;justify-content:space-between;gap:10px}.dialog-header .eyebrow{margin-bottom:0}dialog h2{font-size:29px;font-weight:450;letter-spacing:-1px;margin:15px 0 25px}.guide-step{display:flex;gap:15px;margin-bottom:23px}.guide-step>.icon{color:var(--lime);width:20px;height:20px;margin-top:3px}.guide-step h3{font-size:15px;font-weight:500;margin-bottom:5px}.guide-step p{font-size:14px;line-height:1.65;color:var(--muted)}.guide-note{display:flex;gap:11px;padding:15px;border:1px solid var(--line);border-radius:7px;background:var(--panel-deep)}.guide-note .icon{color:var(--lime);width:16px;height:16px;margin-top:2px}.guide-note p{font-size:12px;color:var(--muted);line-height:1.75}.toast{position:fixed;bottom:25px;left:calc(50% + 118px);transform:translateX(-50%);z-index:30;background:#334329;border:1px solid #749453;border-radius:8px;box-shadow:0 10px 30px #0005;padding:12px 20px;font-size:14px;color:#e4f5cd;max-width:min(550px,90vw);text-align:center}.importing{opacity:.6;pointer-events:none}
@media(min-width:1550px){main{padding-top:50px}.input-panel{min-height:600px}.text-entry textarea{min-height:320px}.page-heading{margin-bottom:38px}.quick-cipher{padding:20px}.quick-cipher h3{font-size:15px}.quick-cipher p{font-size:12px}}
@media(max-width:1200px){.sidebar{width:210px;padding-left:14px;padding-right:14px}.brand{font-size:21px}.brand small{font-size:8px}.app-shell{margin-left:210px}.topbar{padding:0 28px}main{padding:32px 28px 24px}.workbench-grid{gap:16px;grid-template-columns:1fr 1fr}.panel-heading{padding:0 16px}.panel-heading h2{font-size:14px}.subtle-button{font-size:11px}.mode-toggle button{padding:5px 7px}.cipher-body{padding:16px}.file-type{display:none}.toast{left:calc(50% + 105px)}.quick-cipher{padding:13px}.library-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.heading-glyph{display:none}}
@media(max-width:950px){.sidebar{width:76px;padding:25px 13px}.brand{margin-bottom:38px;justify-content:center}.brand>span:last-child,.nav-label,.nav-item .nav-count,.nav-indicator,.sidebar-note,.privacy,.sidebar-footer{display:none}.nav-item{font-size:0;padding:13px;gap:0;justify-content:center}.nav-item .icon{width:20px;height:20px}.app-shell{margin-left:76px}.topbar{padding:0 24px;height:70px}main{padding:30px 24px 24px}.toast{left:calc(50% + 38px)}.local-pill{font-size:11px}.topbar-right{gap:15px}.quick-ciphers{gap:8px}.quick-cipher p{font-size:10px}}
@media(max-width:700px){.sidebar{position:relative;width:100%;height:auto;padding:16px 20px;flex-direction:row;border-right:0;border-bottom:1px solid var(--line);align-items:center;justify-content:space-between}.brand{margin:0;font-size:21px;gap:9px}.brand>span:last-child{display:block}.brand small{font-size:8px}.brand-mark{width:33px;height:33px;font-size:24px}.sidebar nav{display:flex;gap:3px}.nav-item{margin:0;width:38px;height:38px;padding:10px}.nav-item .icon{width:18px;height:18px}.app-shell{margin-left:0}.topbar{height:53px;padding:0 20px}.topbar-right{gap:12px}.local-pill{font-size:10px}.help-button span{display:none}.breadcrumb{font-size:11px;gap:9px}main{padding:27px 18px 20px}.page-heading{margin-bottom:24px}h1{font-size:30px;letter-spacing:-1.2px}.eyebrow{font-size:8px;letter-spacing:1.4px}.page-heading p{font-size:12px;line-height:1.8;max-width:290px}.workbench-grid{grid-template-columns:1fr;gap:18px}.input-panel{min-height:400px}.text-entry textarea{min-height:185px}.right-column{gap:18px}.quick-ciphers{grid-template-columns:repeat(2,1fr);gap:10px}.quick-cipher{padding:16px}.quick-cipher h3{font-size:14px}.quick-cipher p{font-size:11px}.main-footer{font-size:9px;flex-direction:column;align-items:center;gap:5px}.toast{left:50%;bottom:15px}.library-grid{grid-template-columns:1fr}.history-card{padding:17px;gap:12px}.history-card small{display:block;margin-left:0;margin-top:5px}.history-card .secondary-button{font-size:11px;padding:7px 9px}#history-view .page-heading{align-items:flex-start}#clear-history{font-size:11px;padding:7px 8px;margin-top:26px}.section-heading .text-button{font-size:10px}dialog{padding:22px}.file-entry{padding:25px 18px}.local-pill .icon{width:12px;height:12px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}
/* Comfortable text sizes for the controls used throughout a session. */
.field-label,.cipher-description,.method-details,.subtle-button,.input-mode,.mode-toggle button,.help-button,.breadcrumb{font-size:14px}
.text-entry textarea{font-size:16px}
.text-entry textarea::placeholder{font-size:14px}
.source-tab>button:first-child,.editor-footer,.editor-footer .text-button,.drop-strip>span:nth-child(2),.drop-strip small,.empty-result p,.empty-result>span:last-child,.result-footer,.result-footer .text-button,.quick-cipher p,.section-heading .text-button,.sidebar-note .text-button{font-size:13px}
.source-tab{max-width:190px}.source-tab>button:first-child{max-width:145px}
.quick-cipher h3,.section-heading h2{font-size:15px}
.file-entry p,.file-entry .file-limit,.filter-button,.library-card .library-action,.text-button,.secondary-button{font-size:14px}
.library-card p,.guide-step p{font-size:16px}
.import-status,.result-item.error p{font-size:14px}
@media(max-width:1200px){.subtle-button{font-size:12px}.mode-toggle button{font-size:12px}.panel-heading{gap:8px}.cipher-description{font-size:13px}.drop-strip small{font-size:12px}}
@media(max-width:700px){.breadcrumb{font-size:12px}.page-heading p{font-size:14px}.text-entry textarea{font-size:16px}.subtle-button{font-size:13px}.cipher-description{font-size:14px}.mode-toggle button{font-size:13px}.section-heading .text-button{font-size:12px}.source-tab>button:first-child{font-size:12px}}

@media(max-width:390px){
  .sidebar{padding-inline:12px}
  .sidebar nav{gap:0}
  .nav-item{width:35px}
  .brand{font-size:19px}
  .brand small{letter-spacing:1.15px}
}

.hash-mode {
  color: var(--lime);
  background: var(--lime-dark);
  border: 1px solid #46573a;
  border-radius: 6px;
  padding: 4px 9px;
  font-size: 12px;
}

.cipher-field textarea {
  width: 100%;
  min-height: 72px;
  resize: vertical;
  background: var(--panel-deep);
  border: 1px solid #46533e;
  border-radius: 5px;
  padding: 9px 11px;
  color: var(--text);
  font: 14px/1.5 var(--mono);
}
.frequency-detail { margin-top: 14px; color: var(--muted); font-size: 14px; }
.frequency-detail summary { cursor: pointer; color: var(--lime); }
.frequency-legend { margin-top: 8px; font-size: 12px; }
.frequency-chart {
  display: grid;
  grid-template-columns: repeat(26, minmax(0, 1fr));
  gap: 3px;
  min-width: 270px;
  margin-top: 13px;
  padding: 7px 0 4px;
}
.frequency-column { min-width: 0; display: grid; gap: 4px; text-align: center; font: 9px var(--mono); }
.frequency-track { height: 78px; position: relative; border-bottom: 1px solid var(--line); }
.frequency-bar { position: absolute; inset: auto 0 0; background: #a6cc63; border-radius: 2px 2px 0 0; }
.frequency-marker { position: absolute; left: 50%; width: 4px; height: 4px; border-radius: 50%; background: #f2d0a0; transform: translate(-50%, 50%); }

#result-placeholder { flex-shrink: 0; }
#result-panel { min-width: 0; }
#results { min-height: 0; scrollbar-gutter: stable; }
#results:focus-visible { outline-offset: -3px; }

body:has(#reveal-reader[open]) { overflow: hidden; }
#reveal-reader {
  width: min(1120px, calc(100% - 3rem));
  height: calc(100dvh - 3rem);
  max-width: none;
  max-height: none;
  padding: 0;
  overflow: hidden;
}
#reveal-reader[open] { display: flex; }
#reveal-reader .result-panel {
  --reader-inset: clamp(20px, 4vw, 42px);
  min-height: 0;
  border: 0;
  border-radius: inherit;
}
#reveal-reader .panel-heading {
  min-height: 64px;
  height: auto;
  padding: 8px var(--reader-inset);
  background: var(--panel-deep);
}
#reveal-reader #result-title { margin: 0; font-size: 19px; }
#reveal-reader #results {
  max-height: none;
  padding-inline: var(--reader-inset);
  overscroll-behavior: contain;
}
#reveal-reader .result-item { padding-block: 22px; }
#reveal-reader .result-item pre { font-size: clamp(14px, 1.7vw, 17px); line-height: 1.65; }
#reveal-reader .result-footer {
  flex-shrink: 0;
  padding-inline: var(--reader-inset);
  background: var(--panel-deep);
}
#reveal-reader .icon-button { min-width: 38px; height: 36px; }
.reader-back {
  width: auto;
  padding: 0 9px;
  margin-left: 4px;
  gap: 6px;
  white-space: nowrap;
  font-size: 13px;
  box-shadow: inset 0 0 0 1px var(--line);
}
dialog .toast { left: 50%; }

@media (max-width: 700px) {
  #reveal-reader {
    width: calc(100% - 1rem);
    height: calc(100dvh - 1rem);
    border-radius: 10px;
  }
  #reveal-reader .result-panel { --reader-inset: 12px; }
  #reveal-reader .panel-heading { min-height: 58px; }
  #reveal-reader #result-title { gap: 3px; flex-wrap: wrap; font-size: 16px; }
  #reveal-reader #result-title > span { margin-left: 0; }
  #reveal-reader .icon-button { min-width: 34px; height: 40px; }
  #reveal-reader .result-item { padding-block: 16px; }
  #reveal-reader .reader-back span { display: none; }
}

#book-reference {
  margin-top: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-deep);
}
#book-reference-help {
  margin: 8px 0 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
#book-reference-upload {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
#book-reference-upload .icon { width: 16px; height: 16px; }
#book-reference-status { margin: 10px 0 0; overflow-wrap: anywhere; }

.method-details summary { color: var(--lime); }
#cipher-guide-content {
  margin-top: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-deep);
  color: var(--text);
  line-height: 1.6;
}
.method-steps { margin: 0 0 14px; padding-left: 1.25em; }
.method-steps li + li { margin-top: 8px; }
#cipher-guide-content h3 { margin: 0 0 7px; font-size: 14px; font-weight: 600; }
.method-example { margin: 0; }
.method-example > div {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) minmax(0, 2fr);
  gap: 10px;
  padding: 7px 0;
  border-top: 1px solid var(--line);
}
.method-example dt { color: var(--muted); }
.method-example dd {
  margin: 0;
  font: 13px/1.65 var(--mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.method-reference {
  display: inline-block;
  margin-top: 8px;
  color: var(--lime);
  text-decoration: underline;
  text-underline-offset: 3px;
}
#book-reference:not([hidden]) + .cipher-fields .cipher-field:has(#option-segmentation, #option-indices) {
  flex-basis: 100%;
}

.book-reference-actions, .book-list-pager, .book-list-jump {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
#book-preview-dialog { width: min(700px, calc(100% - 30px)); }
#book-preview-title { margin: 0; font-size: clamp(21px, 4vw, 29px); }
.book-preview-source { display: block; margin-top: 12px; overflow-wrap: anywhere; }
.book-preview-source .select-wrap { margin-top: 4px; }
.book-preview-source select { appearance: auto; }
.book-list-pager { margin: 10px 0; }
.book-list-count { color: var(--muted); font-size: 13px; margin-inline-end: auto; }
.book-list-jump { width: 100%; align-items: end; font-size: 13px; }
.book-list-jump label { display: grid; gap: 3px; color: var(--muted); }
.book-list-jump input {
  width: 112px;
  border: 1px solid var(--line);
  background: var(--panel-deep);
  color: var(--text);
  border-radius: 6px;
  padding: 6px 8px;
}
.book-list-items { margin: 0; padding: 0 0 0 3rem; }
#book-preview-dialog .book-list-items {
  max-height: min(56dvh, 28rem);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.book-list-items li {
  padding: 6px 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  border-top: 1px solid var(--line);
}
.book-list-items li::marker { color: var(--muted); font-variant-numeric: tabular-nums; }
.book-lookup-trace { margin-top: 14px; font-size: 14px; }
.book-lookup-trace summary { color: var(--lime); cursor: pointer; }
.book-lookup-trace .book-list-items { padding-inline-start: 1.6rem; }
.book-lookup-number { color: var(--muted); font-size: 13px; margin-bottom: 2px; }
.book-lookup-trace mark {
  background: var(--lime);
  color: var(--panel-deep);
  border-radius: 3px;
  padding-inline: 2px;
}

.cipher-field:has(#option-alphabet, #option-polarity) {
  min-width: min(100%, 168px);
}
