:root{--text:#08060d;--bg:#fff;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light dark;color:var(--text);background:var(--bg);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font:16px/1.5 system-ui,Segoe UI,Roboto,sans-serif}@media (prefers-color-scheme:dark){:root{--lightningcss-light: ;--lightningcss-dark:initial}}:root[data-theme=dark]{--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--text:#f3f4f6;--bg:#16171d}:root[data-theme=light]{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light}body{margin:0}.theme-toggle{z-index:20;border:1px solid color-mix(in srgb, currentColor 35%, transparent);background:var(--bg);width:2.1rem;height:2.1rem;color:inherit;cursor:pointer;border-radius:50%;justify-content:center;align-items:center;padding:0;display:inline-flex;position:fixed;top:.7rem;right:.7rem;box-shadow:0 1px 6px #0000002e}.theme-toggle:hover{border-color:color-mix(in srgb, currentColor 65%, transparent)}.theme-toggle svg{width:1.15rem;height:1.15rem;display:block}.home{max-width:44rem;margin:2.5rem auto 4rem;padding:0 1.25rem}.home__banner{color:inherit;border:1px solid color-mix(in srgb, currentColor 20%, transparent);background:color-mix(in srgb, currentColor 4%, transparent);border-radius:.5rem;flex-wrap:wrap;align-items:baseline;gap:.35rem .7rem;margin:0 3rem 2.25rem 0;padding:.6rem .9rem;font-size:.85rem;line-height:1.4;text-decoration:none;display:flex}.home__banner:hover{border-color:color-mix(in srgb, currentColor 45%, transparent)}.home__banner span:first-child{opacity:.75}.home__banner-cta{color:var(--tab-active,#c62828);font-weight:600}.home__head{flex-wrap:wrap;align-items:center;gap:.6rem 1rem;display:flex}.home__head h1{margin:0}.home__chip{color:inherit;border:1px solid color-mix(in srgb, currentColor 25%, transparent);background:color-mix(in srgb, currentColor 4%, transparent);white-space:nowrap;border-radius:999px;align-items:center;gap:.4rem;padding:.4rem .75rem;font-size:.85rem;font-weight:600;text-decoration:none;display:inline-flex}.home__chip svg{opacity:.8;display:block}.home__chip:hover{border-color:var(--tab-active,#c62828)}.home__lead{opacity:.85;line-height:1.6}.home__meta{font-size:.9rem}.home__meta a{color:var(--tab-active,#c62828);font-weight:600;text-decoration:none}.home__meta a:hover{text-decoration:underline}.home__list{gap:.75rem;margin-top:2rem;padding:0;list-style:none;display:grid}.home__card{border:1px solid var(--cell-stroke,#ccc);color:inherit;border-radius:.5rem;flex-direction:column;gap:.25rem;padding:.85rem;text-decoration:none;display:flex}a.home__card:hover,a.home__card:hover .home__card-thumb{border-color:var(--tab-active,#c62828)}.home__card-thumb{aspect-ratio:40/21;border:1px solid color-mix(in srgb, currentColor 22%, transparent);background-color:color-mix(in srgb, currentColor 5%, transparent);background-image:var(--thumb-light);background-position:top;background-repeat:no-repeat;background-size:cover;border-radius:.35rem;width:100%;margin-bottom:.55rem;display:block}:root[data-theme=dark] .home__card-thumb{background-image:var(--thumb-dark)}.home__card-name{padding:0 .4rem;font-size:1.05rem;font-weight:600}.home__card-blurb{opacity:.8;padding:0 .4rem;font-size:.9rem}:root{--cell-fill:#fff;--cell-stroke:#1a1a1a;--cell-text:#1a1a1a;--arrow:#1a1a1a;--match:#2e7d32;--match-fill:#d7efd8;--mismatch:#c62828;--mismatch-fill:#f7d5d5;--highlight-fill:#fff3c4;--panel-bg:#f5f5f5;--tab-bg:#e9eef2;--tab-active:#c62828;--tab-active-text:#fff}:root[data-theme=dark]{--cell-fill:#1f2027;--cell-stroke:#c9ccd4;--cell-text:#f3f4f6;--arrow:#f3f4f6;--match:#7bd88f;--match-fill:#2f6b41;--mismatch:#f28b82;--mismatch-fill:#7a3330;--highlight-fill:#6b5f22;--panel-bg:#1c1d23;--tab-bg:#24262e;--tab-active:#f28b82;--tab-active-text:#16171d}.algo{box-sizing:border-box;grid-template-rows:auto 1fr;grid-template-columns:minmax(9rem,12rem) 1fr;gap:.75rem 1.25rem;min-height:100dvh;padding:1.25rem;display:grid}.algo--notabs{grid-template-rows:auto 1fr;grid-template-columns:1fr}.algo__header{grid-column:1/-1}.algo__header h1{margin:0;font-size:1.5rem}.algo__tabs{flex-direction:column;gap:.4rem;display:flex}.algo__tab{text-align:left;border:1px solid var(--cell-stroke);background:var(--tab-bg);color:inherit;font:inherit;cursor:pointer;border-radius:.35rem;padding:.6rem .75rem}.algo__tab:hover{border-color:var(--tab-active);color:var(--tab-active)}.algo__tab[aria-current=true]{background:var(--tab-active);border-color:var(--tab-active);color:var(--tab-active-text)}.algo__panel{grid-template-columns:minmax(16rem,22rem) 1fr;align-items:start;gap:1.5rem;display:grid}.algo__desc{text-align:justify;font-size:.95rem;line-height:1.6}.algo__desc h2{margin:0 0 .5rem;font-size:1.1rem}.algo__desc button{font:inherit;cursor:pointer;padding:.1rem .4rem;font-weight:600}.algo__canvas{--canvas-max-h:min(58vh, 27rem);background:var(--panel-bg);border-radius:.5rem;padding:.5rem;overflow-x:auto}.algo__canvas svg{width:100%;min-width:32rem;height:auto;max-height:var(--canvas-max-h);max-width:calc(var(--canvas-ar,3) * var(--canvas-max-h));margin-inline:auto;display:block}.algo-move{transition:transform .5s}.step-controller{flex-wrap:wrap;align-items:center;gap:.5rem;margin-bottom:.75rem;display:flex}.step-controller button{font:inherit;border:1px solid var(--cell-stroke);background:var(--tab-bg);color:inherit;cursor:pointer;border-radius:.3rem;padding:.35rem .75rem}.step-controller button:disabled{opacity:.4;cursor:not-allowed}.step-controller__count{font-variant-numeric:tabular-nums;opacity:.7}@media (width<=720px){.algo{grid-template-rows:auto auto 1fr;grid-template-columns:1fr}.algo__tabs{flex-flow:wrap}.algo__panel{grid-template-columns:1fr}}@media (prefers-reduced-motion:reduce){.algo-move{transition:none}}.kmp-frame-status{border-left:3px solid var(--tab-active);background:var(--panel-bg);border-radius:0 .3rem .3rem 0;padding:.6rem .75rem}.algo__desc code{background:var(--panel-bg);border-radius:.2rem;padding:.05rem .3rem;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.9em}:root{--flow-node:#737d8d;--flow-node-fill:#fff;--flow-node-text:#232b36;--flow-node-active:var(--tab-active);--flow-node-active-fill:#fce4e4;--flow-node-active-text:#1a1a1a;--flow-edge:#78818f;--flow-edge-active:var(--tab-active);--proof-accent:#3b6fd4;--proof-query:#c07000}:root[data-theme=dark]{--flow-node:#838c9c;--flow-node-fill:#2f333f;--flow-node-text:#d3d8e0;--flow-node-active-fill:#612f2f;--flow-node-active-text:#f3f4f6;--flow-edge:#6b7484;--proof-accent:#8fb4ff;--proof-query:#e0a52e}.manacher-page{flex-direction:column;gap:.85rem;max-width:90rem;display:flex}.manacher-setup{flex-direction:column;gap:.55rem;display:flex}.manacher-setup__top{flex-wrap:wrap;align-items:flex-start;gap:.75rem 2rem;display:flex}.manacher-setup__form{flex-direction:column;gap:.5rem;max-width:28rem;font-size:.92rem;display:flex}.manacher-setup__picker{flex-direction:column;flex:34rem;gap:.35rem;min-width:0;max-width:66rem;font-size:.92rem;display:flex}.manacher-step{border-radius:.3rem;margin:-.1rem -.4rem;padding:.1rem .4rem;line-height:1.5;animation:2s ease-in-out .3s both manacher-step-intro}@keyframes manacher-step-intro{0%,to{background:0 0}45%{background:color-mix(in srgb, var(--highlight-fill) 60%, transparent)}}@media (prefers-reduced-motion:reduce){.manacher-step{animation:none}}.manacher-step__n{background:var(--tab-bg);border:1px solid var(--cell-stroke);letter-spacing:.02em;white-space:nowrap;border-radius:.25rem;margin-right:.4rem;padding:.03em .4em;font-size:.78em;font-weight:700;display:inline-block}.manacher-cta{background:var(--highlight-fill);color:inherit;border-radius:.25rem;padding:.05em .3em;font-weight:700}.manacher-setup form{align-items:center;gap:.5rem;display:flex}.manacher-setup input{font:inherit;border:1px solid var(--cell-stroke);background:var(--cell-fill);color:inherit;letter-spacing:.15em;border-radius:.3rem;width:12rem;padding:.3rem .5rem}.manacher-setup form button{font:inherit;border:1px solid var(--cell-stroke);background:var(--tab-bg);color:inherit;cursor:pointer;border-radius:.3rem;padding:.35rem .9rem;font-weight:600}.manacher-setup form button:disabled{opacity:.4;cursor:not-allowed}.manacher-view{grid-template-columns:minmax(0,6fr) minmax(0,5fr);align-items:start;gap:1.25rem;display:grid}.manacher-flow-wrap,.manacher-stage{background:var(--panel-bg);border-radius:.5rem;min-width:0;padding:.5rem;overflow-x:auto}.manacher-flow{width:100%;min-width:30rem;height:auto;display:block}.manacher-stage .algo__canvas{background:0 0;padding:0}.manacher-stage svg{min-width:34rem}.manacher-caption{border-left:3px solid var(--tab-active);background:var(--cell-fill);border-radius:0 .3rem .3rem 0;min-height:3.4rem;margin:.75rem 0 .5rem;padding:.6rem .75rem;font-size:.9rem}.manacher-derivation{border-left:3px solid var(--proof-accent);background:var(--panel-bg);border-radius:0 .3rem .3rem 0;margin:0 0 .5rem;padding:.55rem .75rem}.manacher-derivation__label{text-transform:uppercase;letter-spacing:.05em;opacity:.65;margin-bottom:.4rem;font-size:.7rem;font-weight:700;display:block}.manacher-derivation ol{flex-direction:column;gap:.25rem;margin:0;padding:0;list-style:none;display:flex}.manacher-derivation li{white-space:pre-wrap;opacity:.55;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.8rem}.manacher-derivation li.is-current{opacity:1;font-weight:700}@media (width<=1100px){.manacher-view{grid-template-columns:1fr}}.manacher-flip-cell{transition:transform .55s}.manacher-spread-cell{transform:translateX(var(--spread-dx));animation:.45s manacher-spread}@keyframes manacher-spread{0%{transform:translate(0)}}.manacher-fade-cell{animation:.4s both manacher-fade}.manacher-fade-delayed{animation-delay:.15s}@keyframes manacher-fade{0%{opacity:0}to{opacity:1}}@media (prefers-reduced-motion:reduce){.manacher-spread-cell,.manacher-fade-cell{animation:none}.manacher-flip-cell{transition:none}}:root{--floyd-hare:#c2410c;--floyd-tort:#1d4ed8;--floyd-tail:#3b82f6;--floyd-arc-x:#c62828;--floyd-arc-rest:#9333ea;--floyd-node-dim:#8a919e}:root[data-theme=dark]{--floyd-hare:#fb923c;--floyd-tort:#60a5fa;--floyd-tail:#60a5fa;--floyd-arc-x:#f28b82;--floyd-arc-rest:#c084fc;--floyd-node-dim:#6b7280}.floyd-page{flex-direction:column;gap:1.25rem;max-width:100%;display:flex}.floyd-steps{flex-direction:column;gap:.75rem;margin:0;padding-left:1.4rem;font-size:.95rem;display:flex}.floyd-steps li{flex-direction:column;gap:.4rem;display:flex}.floyd-steps li.is-disabled{opacity:.45}.floyd-steps form{align-items:center;gap:.5rem;display:flex}.floyd-steps input{font:inherit;border:1px solid var(--cell-stroke);background:var(--cell-fill);color:inherit;letter-spacing:.15em;border-radius:.3rem;width:14rem;padding:.3rem .5rem}.floyd-steps button{font:inherit;border:1px solid var(--cell-stroke);background:var(--tab-bg);color:inherit;cursor:pointer;border-radius:.3rem;padding:.35rem .9rem;font-weight:600}.floyd-steps button:disabled{opacity:.4;cursor:not-allowed}.floyd-picker{flex-wrap:wrap;gap:.3rem;display:flex}.floyd-picker__node{border:1px solid var(--cell-stroke);background:var(--cell-fill);min-width:2rem;color:inherit;font:inherit;cursor:pointer;border-radius:.3rem;flex-direction:column;align-items:center;gap:.1rem;padding:.3rem .35rem;display:flex}.floyd-picker__node:hover:not(:disabled){border-color:var(--tab-active);color:var(--tab-active)}.floyd-picker__node[aria-current=true]{background:var(--tab-active);border-color:var(--tab-active);color:var(--tab-active-text)}.floyd-picker__node:disabled{opacity:.4;cursor:not-allowed}.floyd-picker__char{font-weight:700}.floyd-picker__idx{opacity:.6;font-size:.7rem}.floyd-view{flex-direction:column;gap:.6rem;min-width:0;max-width:100%;display:flex}.floyd-view>*{min-width:0;max-width:100%}.floyd-panel{flex-direction:column;gap:.5rem;min-width:0;display:flex}.floyd-view .algo__canvas{--canvas-max-h:clamp(20rem, calc(100dvh - 21rem), 46rem);background:var(--panel-bg);border-radius:.5rem;padding:.5rem;overflow-x:auto}.floyd-view .algo__canvas svg{min-width:30rem}@media (width>=60rem){.floyd-view{flex-direction:row;align-items:flex-start;gap:1.5rem}.floyd-view .algo__canvas{max-width:calc(var(--canvas-ar,3) * var(--canvas-max-h) + 1rem);flex:4 30rem}.floyd-panel{flex:22rem;max-width:40rem}.floyd-panel .floyd-derivation{max-height:calc(100dvh - 33rem);margin-bottom:0;overflow-y:auto}}.floyd-readout{font-variant-numeric:tabular-nums;gap:1.5rem;font-size:.9rem;display:flex}.floyd-readout strong{font-weight:700}.floyd-dot{vertical-align:middle;border:1px solid var(--cell-stroke);border-radius:50%;width:.7rem;height:.7rem;display:inline-block}.floyd-dot--hare{background:var(--floyd-hare)}.floyd-dot--tort{background:var(--floyd-tort)}.floyd-caption{border-left:3px solid var(--tab-active);background:var(--cell-fill);border-radius:0 .3rem .3rem 0;min-height:2.6rem;margin:.25rem 0 .5rem;padding:.6rem .75rem;font-size:.9rem}.floyd-derivation{border-left:3px solid var(--floyd-arc-rest);background:var(--panel-bg);border-radius:0 .3rem .3rem 0;margin:0 0 .5rem;padding:.55rem .75rem}.floyd-derivation__label{text-transform:uppercase;letter-spacing:.05em;opacity:.65;margin-bottom:.35rem;font-size:.7rem;font-weight:700;display:block}.floyd-derivation__givens{opacity:.8;margin:0 0 .45rem;font-size:.8rem}.floyd-legend{background:var(--cell-fill);border-radius:.3rem;grid-template-columns:repeat(2,minmax(0,1fr));gap:.2rem .8rem;margin:0 0 .6rem;padding:.5rem .6rem;display:grid}.floyd-legend div{align-items:center;gap:.35rem;display:flex}.floyd-legend .floyd-term em{display:none}.floyd-legend span{opacity:.85;font-size:.72rem}@media (width<=560px){.floyd-legend{grid-template-columns:1fr}}.floyd-derivation ol{flex-direction:column;gap:.5rem;margin:0;padding:0;list-style:none;display:flex}.floyd-derivation li{opacity:.5}.floyd-derivation li.is-current{opacity:1}.floyd-eq-row{flex-wrap:wrap;align-items:center;gap:.15rem .25rem;display:flex}.floyd-term{flex-direction:column;align-items:center;line-height:1;display:inline-flex}.floyd-term svg{width:2.3rem;height:1.5rem;display:block}.floyd-term em{opacity:.8;font-size:.68rem;font-style:normal}.floyd-term.is-dim{opacity:.3}.floyd-term.is-dim em{text-decoration:line-through}.floyd-op{font-variant-numeric:tabular-nums;padding-bottom:.7rem;font-size:.85rem}.floyd-eq-tag{text-transform:uppercase;letter-spacing:.05em;opacity:.6;margin-right:.1rem;padding-bottom:.7rem;font-size:.62rem}.floyd-eq-tag--gap{margin-left:.9rem}.about{max-width:52rem;margin:3.5rem auto;padding:0 1.25rem;line-height:1.6}.about__back{opacity:.8;font-size:.9rem}.about__back a,.about a{color:inherit}.about h1{margin:.25rem 0 1rem}.about h2{margin:2.5rem 0 .75rem;font-size:1.2rem}.about h3{margin:0 0 .35rem;font-size:1.02rem}.about__lead{font-size:1.05rem}.about code{background:color-mix(in srgb, currentColor 12%, transparent);border-radius:.25rem;padding:.05rem .3rem;font-size:.9em}.about__table-wrap{overflow-x:auto}.about__table{border-collapse:collapse;width:100%;min-width:40rem;font-size:.9rem}.about__table th,.about__table td{border:1px solid color-mix(in srgb, currentColor 25%, transparent);text-align:left;vertical-align:top;padding:.5rem .7rem}.about__table thead th{background:color-mix(in srgb, currentColor 8%, transparent)}.about__table tbody th{white-space:nowrap;font-weight:600}.about__highlights{gap:1.25rem;padding:0;list-style:none;display:grid}.about__highlights>li>ul{margin:0;padding-left:1.1rem;font-size:.92rem}.about__highlights>li>ul li{margin:.3rem 0}.about__links{padding-left:1.1rem}.about__links li{margin:.35rem 0}
