:root{--wf-ink: #18202d;--wf-muted: #5a6475;--wf-faint: #98a1b0;--wf-surface: #ffffff;--wf-paper: #f5f6f8;--wf-line: #dfe3e9;--wf-blue: #2350b8;--wf-blue-dark: #183a8a;--wf-blue-soft: #e8eefb;--wf-mark: #fde68a;--wf-mark-deep: #f2c94c;--wf-radius: 12px;--wf-radius-sm: 8px;--wf-shadow: 0 10px 28px rgba(24,32,45,0.08);--wf-focus: 0 0 0 3px rgba(35,80,184,0.25);--wf-mono: ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;--primary: var(--wf-blue);--primary-dark: var(--wf-blue-dark);--border: var(--wf-line);--surface: var(--wf-surface);--shadow-soft: var(--wf-shadow);--surface-muted: var(--wf-paper);--text-main: var(--wf-ink);--text-muted: var(--wf-muted);}
.wf-tool{background: var(--wf-surface);border: 1px solid var(--wf-line);border-radius: var(--wf-radius);box-shadow: var(--wf-shadow);color: var(--wf-ink);overflow: hidden;}
.wf-tool [hidden]{display: none !important;}
.wf-byline{display: flex;flex-wrap: wrap;justify-content: space-between;gap: 0.3rem 1rem;padding: 0.7rem 1.3rem;border-bottom: 1px solid var(--wf-line);font-size: 0.86rem;color: var(--wf-muted);}
.wf-byline-author{font-weight: 600;color: var(--wf-ink);}
.wf-byline .author-link{color: var(--wf-blue);text-decoration: none;}
.wf-byline .author-link:hover{text-decoration: underline;}
.wf-opts{display: flex;flex-wrap: wrap;align-items: center;gap: 0.8rem 1.4rem;padding: 0.9rem 1.3rem;background: var(--wf-paper);border-bottom: 1px solid var(--wf-line);}
.wf-seg{display: inline-flex;border: 1px solid var(--wf-line);border-radius: 999px;background: var(--wf-surface);padding: 3px;}
.wf-seg-btn{border: 0;background: none;color: var(--wf-muted);font-size: 0.88rem;font-weight: 600;padding: 0.35rem 0.85rem;border-radius: 999px;cursor: pointer;}
.wf-seg-btn.is-on{background: var(--wf-blue);color: #fff;}
.wf-seg-btn:focus-visible,.wf-btn:focus-visible,.wf-term:focus-visible,.wf-file:focus-within{outline: none;box-shadow: var(--wf-focus);}
.wf-check{display: inline-flex;align-items: center;gap: 0.4rem;font-size: 0.9rem;color: var(--wf-ink);cursor: pointer;margin: 0;}
.wf-check input{accent-color: var(--wf-blue);width: 16px;height: 16px;}
.wf-min{display: inline-flex;align-items: center;gap: 0.45rem;font-size: 0.9rem;margin: 0;}
.wf-min select,.wf-sort{border: 1px solid var(--wf-line);border-radius: var(--wf-radius-sm);padding: 0.3rem 0.5rem;font-size: 0.88rem;background: var(--wf-surface);color: var(--wf-ink);}
.wf-min select:disabled{opacity: 0.5;}
.wf-body{display: grid;grid-template-columns: minmax(0,5fr) minmax(0,7fr);}
.wf-in{padding: 1.3rem;border-right: 1px solid var(--wf-line);display: flex;flex-direction: column;gap: 0.8rem;}
.wf-out{padding: 1.3rem;display: flex;flex-direction: column;gap: 0.9rem;min-width: 0;}
.wf-label{font-weight: 700;font-size: 0.95rem;margin: 0;}
.wf-text{width: 100%;min-height: 380px;flex: 1;resize: vertical;border: 1px solid var(--wf-line);border-radius: var(--wf-radius-sm);padding: 0.9rem;font-size: 0.97rem;line-height: 1.6;color: var(--wf-ink);background: var(--wf-surface);}
.wf-text:focus{outline: none;border-color: var(--wf-blue);box-shadow: var(--wf-focus);}
.wf-actions{display: flex;flex-wrap: wrap;gap: 0.5rem;}
.wf-btn{border: 1px solid var(--wf-blue);background: var(--wf-blue);color: #fff;font-weight: 600;font-size: 0.9rem;padding: 0.5rem 1rem;border-radius: var(--wf-radius-sm);cursor: pointer;}
.wf-btn:hover{background: var(--wf-blue-dark);border-color: var(--wf-blue-dark);}
.wf-btn-ghost{background: var(--wf-surface);color: var(--wf-blue);}
.wf-btn-ghost:hover{background: var(--wf-blue-soft);color: var(--wf-blue-dark);}
.wf-btn:disabled{opacity: 0.45;cursor: not-allowed;}
.wf-file{position: relative;overflow: hidden;display: inline-flex;align-items: center;margin: 0;}
.wf-file input{position: absolute;inset: 0;opacity: 0;cursor: pointer;}
.wf-hint,.wf-note{font-size: 0.84rem;color: var(--wf-muted);margin: 0;}
.wf-note:empty{display: none;}
.wf-stats{display: grid;grid-template-columns: repeat(5,minmax(0,1fr));gap: 0.5rem;margin: 0;}
.wf-stats div{border: 1px solid var(--wf-line);border-radius: var(--wf-radius-sm);padding: 0.55rem 0.7rem;min-width: 0;}
.wf-stats dt{font-size: 0.72rem;text-transform: uppercase;letter-spacing: 0.05em;color: var(--wf-muted);font-weight: 600;}
.wf-stats dd{margin: 0.15rem 0 0;font-size: 1.15rem;font-weight: 700;font-variant-numeric: tabular-nums;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;}
.wf-stats .wf-top dd{background: var(--wf-mark);border-radius: 4px;padding: 0 0.3rem;display: inline-block;max-width: 100%;}
.wf-tools{display: flex;flex-wrap: wrap;gap: 0.5rem;align-items: center;}
.wf-filter{flex: 1;min-width: 150px;border: 1px solid var(--wf-line);border-radius: var(--wf-radius-sm);padding: 0.4rem 0.7rem;font-size: 0.9rem;}
.wf-filter:focus,.wf-sort:focus,.wf-min select:focus{outline: none;border-color: var(--wf-blue);box-shadow: var(--wf-focus);}
.wf-empty{border: 1px dashed var(--wf-line);border-radius: var(--wf-radius-sm);min-height: 300px;display: flex;align-items: center;justify-content: center;text-align: center;padding: 1.5rem;color: var(--wf-muted);}
.wf-empty p{margin: 0;max-width: 30ch;}
.wf-table-wrap{max-height: 420px;overflow: auto;border: 1px solid var(--wf-line);border-radius: var(--wf-radius-sm);}
.wf-table{width: 100%;border-collapse: collapse;font-size: 0.92rem;}
.wf-table thead th{position: sticky;top: 0;background: var(--wf-paper);font-size: 0.74rem;text-transform: uppercase;letter-spacing: 0.05em;color: var(--wf-muted);text-align: left;padding: 0.5rem 0.7rem;border-bottom: 1px solid var(--wf-line);z-index: 1;}
.wf-table td{padding: 0.35rem 0.7rem;border-bottom: 1px solid var(--wf-paper);vertical-align: middle;}
.wf-row.is-on td{background: #fff8db;}
.wf-rank{color: var(--wf-faint);font-variant-numeric: tabular-nums;width: 3rem;}
.wf-num{font-variant-numeric: tabular-nums;text-align: right;white-space: nowrap;width: 5rem;}
.wf-table th.wf-num{text-align: right;}
.wf-term{border: 0;background: none;padding: 0.1rem 0.25rem;margin-left: -0.25rem;border-radius: 4px;font-weight: 600;color: var(--wf-ink);text-align: left;cursor: pointer;word-break: break-word;}
.wf-term:hover{background: var(--wf-mark);}
.wf-row.is-on .wf-term{background: var(--wf-mark-deep);}
.wf-barcell{width: 28%;min-width: 70px;}
.wf-bar{display: block;height: 8px;border-radius: 4px;background: var(--wf-blue);min-width: 2px;}
.wf-none{text-align: center;color: var(--wf-muted);padding: 1rem !important;}
.wf-foot{display: flex;flex-wrap: wrap;justify-content: space-between;align-items: center;gap: 0.5rem;font-size: 0.84rem;color: var(--wf-muted);}
.wf-ctx-box{border-top: 1px solid var(--wf-line);padding: 1.2rem 1.3rem 1.4rem;background: var(--wf-paper);}
.wf-ctx-head{font-size: 1.05rem;font-weight: 700;margin: 0 0 0.5rem;}
.wf-ctx-empty,.wf-gap{margin: 0 0 0.6rem;color: var(--wf-muted);font-size: 0.92rem;}
.wf-kwic{margin: 0;padding-left: 2.2rem;max-height: 320px;overflow: auto;font-size: 0.94rem;line-height: 1.55;}
.wf-kwic li{padding: 0.3rem 0;border-bottom: 1px solid var(--wf-line);color: var(--wf-muted);}
.wf-kwic li::marker{color: var(--wf-faint);font-variant-numeric: tabular-nums;}
.wf-kwic mark{background: var(--wf-mark);color: var(--wf-ink);font-weight: 700;padding: 0 0.15rem;border-radius: 3px;}
.wf-article{margin: 2.5rem auto 1rem;color: var(--wf-ink);line-height: 1.7;}
.wf-article h2{font-size: 1.5rem;font-weight: 800;margin: 2.2rem 0 0.75rem;letter-spacing: -0.01em;}
.wf-article h2:first-child{margin-top: 0;}
.wf-article p,.wf-article li{color: #333b49;font-size: 1.02rem;}
.wf-article ul{padding-left: 1.2rem;}
.wf-article li{margin-bottom: 0.4rem;}
.wf-article a{color: var(--wf-blue);text-decoration: underline;text-underline-offset: 2px;}
.wf-article code{font-family: var(--wf-mono);font-size: 0.9em;background: var(--wf-paper);border: 1px solid var(--wf-line);border-radius: 4px;padding: 0.05rem 0.3rem;}
.wf-article mark{background: var(--wf-mark);padding: 0 0.2rem;border-radius: 3px;}
.wf-split{display: grid;grid-template-columns: repeat(2,minmax(0,1fr));gap: 1rem;margin: 1rem 0;}
.wf-split figure{margin: 0;border: 1px solid var(--wf-line);border-radius: var(--wf-radius-sm);background: var(--wf-surface);padding: 0.9rem 1rem;}
.wf-split figcaption{font-size: 0.8rem;text-transform: uppercase;letter-spacing: 0.05em;color: var(--wf-muted);font-weight: 700;margin-bottom: 0.4rem;}
.wf-split ol{margin: 0;padding-left: 1.4rem;font-family: var(--wf-mono);font-size: 0.92rem;}
.wf-split li{margin: 0;font-size: 0.92rem;}
.wf-table-plain{width: 100%;border-collapse: collapse;margin: 1rem 0;font-size: 0.95rem;border: 1px solid var(--wf-line);}
.wf-table-plain caption{caption-side: top;font-size: 0.85rem;color: var(--wf-muted);padding-bottom: 0.4rem;}
.wf-table-plain th,.wf-table-plain td{padding: 0.5rem 0.8rem;border-bottom: 1px solid var(--wf-line);text-align: left;}
.wf-table-plain thead th{background: var(--wf-paper);font-size: 0.78rem;text-transform: uppercase;letter-spacing: 0.05em;color: var(--wf-muted);}
.wf-scroll{overflow-x: auto;}
.wf-formula{border-left: 4px solid var(--wf-blue);background: var(--wf-blue-soft);padding: 0.7rem 1rem;border-radius: 0 var(--wf-radius-sm) var(--wf-radius-sm) 0;font-family: var(--wf-mono);font-size: 0.92rem;margin: 1rem 0;}
.wf-limits{list-style: none;padding-left: 0 !important;display: grid;grid-template-columns: repeat(2,minmax(0,1fr));gap: 0.7rem;}
.wf-limits li{margin: 0;padding: 0.8rem 0.95rem;border: 1px solid var(--wf-line);border-top: 3px solid var(--wf-mark-deep);border-radius: var(--wf-radius-sm);background: var(--wf-surface);font-size: 0.97rem;}
@media (max-width: 991px){.wf-stats{grid-template-columns: repeat(3,minmax(0,1fr));}}
@media (max-width: 860px){.wf-body{grid-template-columns: 1fr;}.wf-in{border-right: 0;border-bottom: 1px solid var(--wf-line);}.wf-text{min-height: 220px;}.wf-empty{min-height: 160px;}.wf-limits{grid-template-columns: 1fr;}}
@media (max-width: 560px){.wf-in,.wf-out,.wf-opts,.wf-ctx-box{padding: 1rem;}.wf-stats{grid-template-columns: repeat(2,minmax(0,1fr));}.wf-split{grid-template-columns: 1fr;}.wf-barcell{display: none;}.wf-article h2{font-size: 1.3rem;}}