:root{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#222;background:#fff;font-synthesis:none;--red:#b42318;--muted:#767676}*{box-sizing:border-box}body{margin:0;min-height:100dvh;display:grid;grid-template-columns:240px minmax(0,1fr)}button,input{font:inherit}button{cursor:pointer;background:none;border:0;color:inherit}button:disabled{cursor:default;opacity:.45}button:focus-visible,a:focus-visible{outline:2px solid var(--red);outline-offset:5px}aside{height:100dvh;padding:34px 24px 20px;border-right:1px solid #eee;display:flex;flex-direction:column;position:sticky;top:0;overflow:hidden}aside> :not(#history-scroll){flex-shrink:0}.sidebar-header{margin-bottom:64px}.brand{display:inline-flex;flex-direction:column;align-items:flex-start;gap:4px;flex-shrink:0;text-decoration:none;color:#222;white-space:nowrap}.brand-name{font-size:27px;line-height:1;font-weight:650;letter-spacing:-1.2px}.brand-dot{color:var(--red,#b42318)}.brand-endorsement{font-size:11px;line-height:14px;font-weight:400;letter-spacing:.15px;color:#616161}.brand-parent{font-weight:550;letter-spacing:.1px}.section-heading,.history-label{font-size:10px;letter-spacing:1.4px;color:var(--muted)}.best{display:flex;justify-content:space-between;align-items:baseline;margin:14px 0 40px;font-size:18px;gap:8px}.best .distance{font-size:13px;color:var(--red);white-space:nowrap}.muted{color:var(--muted);font-size:12px}.history-label{display:flex;justify-content:space-between;gap:8px}#count{letter-spacing:0;font-size:11px;text-transform:none}#history-scroll{position:relative;flex:1;min-height:0;margin:12px -8px 0;padding:0 8px;overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;scrollbar-gutter:stable}#history-scroll:focus-visible{outline:2px solid var(--red);outline-offset:-2px}#history{list-style:none;margin:0;padding:0}#history .number{font-size:10px;color:var(--muted)}#history .word{overflow-wrap:anywhere}#history .distance{font-variant-numeric:tabular-nums;font-size:12px;color:var(--muted)}#history li.highlight{background:#fff0ed;outline:6px solid #fff0ed}main{position:relative;min-height:100dvh;display:flex;align-items:center;justify-content:center;padding:70px 48px 56px}.play{width:min(100%,560px);margin-top:-5px}.eyebrow{font-size:10px;letter-spacing:2px;color:var(--muted);margin:0 0 26px}.input-line{display:flex;align-items:center;border-bottom:1px solid #ccc;padding-bottom:15px;gap:14px}.input-line:focus-within{border-color:#333}input{width:100%;min-width:0;font-size:48px;letter-spacing:-1.8px;font-weight:400;outline:none;border:0;background:transparent;color:#222;padding:0}input::placeholder{color:#c4c4c4}#submit{font-size:12px;white-space:nowrap;color:#666;padding:10px 0 10px 10px}#submit span{margin-left:5px;color:#999}#feedback{font-size:16px;color:var(--red);line-height:1.65;min-height:53px;margin:20px 0 8px;overflow-wrap:anywhere}.quiet{font-size:12px;color:var(--muted);padding:6px 0;text-decoration:underline;text-underline-offset:4px}.mobile-toggle,.mobile-close{display:none}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}[hidden]{display:none!important}@media(max-width:760px){body{display:block}aside{position:fixed;width:260px;left:0;top:0;z-index:3;background:white;transform:translateX(-100%);transition:transform .2s ease;visibility:hidden}body.history-open aside{transform:translateX(0);visibility:visible;box-shadow:none}.mobile-toggle{display:block;position:absolute;top:24px;left:24px;font-size:12px;z-index:1;padding:6px 0}.mobile-close{display:inline;font-size:11px;color:var(--muted)}.sidebar-header{display:flex;justify-content:space-between;align-items:center}main{padding:90px 28px 48px}input{font-size:clamp(32px,7.5vw,48px)}.eyebrow{font-size:9px}#feedback{font-size:14px}}@media(prefers-reduced-motion:reduce){aside{transition:none}}

.brand-lockup{min-width:0}
/* Replace the return arrow without moving the Guess button or nearby content. */
#submit{position:relative}
#submit.is-loading span{visibility:hidden}
#submit.is-loading::after{content:"";position:absolute;right:0;top:50%;width:10px;height:10px;margin-top:-5px;border:1.5px solid currentColor;border-right-color:transparent;border-radius:50%;animation:guess-loading .85s linear infinite}
@keyframes guess-loading{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){#submit.is-loading::after{animation:none}}
.brand-tagline{font-size:11px;line-height:1.5;color:var(--muted);margin:8px 0 0;letter-spacing:0}
.sidebar-header .mobile-close{align-self:flex-start}

/* Align the desktop game and sidebar at the top. */
@media(min-width:761px){body:not(.compare-page)>main{align-items:flex-start;padding-top:34px}body:not(.compare-page) .play{margin-top:0}body:not(.compare-page) .eyebrow{display:flex;align-items:center;min-height:32px}}

/* The five closest guesses, ranked beneath the input feedback. */
#closest-guesses{margin:8px 0 28px}#closest-heading{font-size:10px;font-weight:400;letter-spacing:1.4px;color:var(--muted);margin:0 0 10px}#closest-list{list-style:none;margin:0;padding:0}#closest-list .rank{font-size:10px;color:var(--muted);font-variant-numeric:tabular-nums}#closest-list .word{overflow-wrap:anywhere}#closest-list .distance{font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums;white-space:nowrap}#closest-list li:first-child .word,#closest-list li:first-child .distance{color:var(--red)}

/* Shared list rhythm; desktop heading offset follows the center content. */
:root{--guess-row-height:40px;--guess-row-padding:9px;--guess-row-line-height:20px;--guess-row-font-size:14px;--guess-list-gap:10px}
.history-label,#closest-heading{line-height:16px}
#history-scroll{margin-top:var(--guess-list-gap)}
#closest-heading{margin-bottom:var(--guess-list-gap)}
#history li,#closest-list li{display:grid;grid-template-columns:22px minmax(0,1fr) auto;align-items:baseline;gap:10px;min-height:var(--guess-row-height);padding:var(--guess-row-padding) 0;border-bottom:1px solid #f0f0f0;font-size:var(--guess-row-font-size);line-height:var(--guess-row-line-height)}
#history .distance,#closest-list .distance{white-space:nowrap}
@media(min-width:761px){.history-label{margin-top:var(--history-heading-gap,0px)}}

/* Comparison page and shared footer navigation. */

.compare-page{display:block}.compare-header{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:34px 48px}.compare-header .quiet{color:var(--muted)}.compare-main{min-height:calc(100dvh - 105px);padding:48px 28px 90px}.comparison{width:min(100%,600px)}.comparison h1{font-size:36px;font-weight:400;letter-spacing:-1.2px;margin:0 0 16px}.compare-intro{font-size:14px;color:var(--muted);line-height:1.7;margin:0 0 36px}.compare-fields{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:28px}.compare-fields label{display:block;font-size:11px;color:var(--muted);margin-bottom:16px}.compare-fields input{font-size:34px;letter-spacing:-1px}.compare-fields .input-line{padding-bottom:12px}.compare-fields input:disabled{opacity:.5}#compare-submit{margin-top:24px;padding:12px 22px;border:1px solid #ddd;border-radius:4px;font-size:13px}#compare-submit:hover:not(:disabled){border-color:#777}#compare-submit span{margin-left:10px;color:var(--muted)}#compare-result{font-size:18px;color:var(--red);line-height:1.7;min-height:62px;margin:24px 0 32px;overflow-wrap:anywhere}#compare-result strong{font-weight:500;white-space:nowrap}.vector-explanation{border-top:1px solid #eee;padding-top:24px}.vector-explanation h2{font-size:15px;font-weight:500;margin:0 0 12px}.vector-explanation p{font-size:13px;line-height:1.8;color:var(--muted);margin:0 0 12px}@media(max-width:760px){.compare-header{padding:24px 28px}.compare-main{min-height:calc(100dvh - 85px);padding-top:40px}.comparison h1{font-size:30px}}@media(max-width:420px){.compare-fields{grid-template-columns:minmax(0,1fr);gap:24px}}

/* Keep the history usable in short windows and landscape layouts. */
@media(max-height:600px){aside{padding-top:20px;padding-bottom:16px}.sidebar-header{margin-bottom:24px}.best{margin-top:10px;margin-bottom:24px}}

/* Game actions and readable, in-page instructions. */
.game-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px 24px}
.game-actions .quiet{min-height:44px;padding:10px 0;line-height:24px;font-size:13px}
.hint-badge{display:inline-block;margin-left:8px;font-size:9px;line-height:16px;letter-spacing:.4px;color:var(--muted);font-weight:400;vertical-align:middle}
.hint-note{font-size:12px;line-height:1.6;color:var(--muted);margin:4px 0 0}
.how-it-works{margin-top:36px;padding-top:24px;border-top:1px solid #eee}
.how-it-works h2{font-size:20px;font-weight:500;letter-spacing:-.3px;margin:0 0 16px}
.how-it-works p{font-size:14px;line-height:1.6;color:var(--muted);margin:0 0 12px}
.how-it-works strong{font-weight:500;color:#555}
.how-it-works a{color:inherit;text-underline-offset:4px}
#reveal-dialog{width:calc(100% - 40px);max-width:400px;padding:28px;border:1px solid #ddd;border-radius:8px;color:#222;background:#fff}
#reveal-dialog::backdrop{background:rgb(0 0 0 / .25)}
#reveal-dialog h2{font-size:22px;font-weight:500;margin:0 0 12px}
#reveal-dialog p{font-size:14px;line-height:1.6;color:var(--muted);margin:0 0 24px}
#reveal-dialog #reveal-error{color:var(--red);margin-bottom:16px}
.dialog-actions{display:flex;flex-wrap:wrap;gap:12px}
.dialog-actions button{min-height:44px;padding:10px 14px;border:1px solid #ddd;border-radius:4px;font-size:13px}
#reveal-yes{color:var(--red);border-color:var(--red)}

/* Isolated instructional GIF, with explicit motion controls. */
.gameplay-demo{margin:24px 0;max-width:560px}
.gameplay-demo img{display:block;width:100%;height:auto;aspect-ratio:560/460;border:1px solid #eee;border-radius:6px}

.demo-toggle{display:block;width:100%;padding:0;border:0;background:transparent;text-align:inherit}

/* A brief, non-blocking celebration for a newly solved round. */
#feedback.is-win{color:#187443}
.celebration{position:fixed;inset:0;z-index:10;pointer-events:none;overflow:hidden}
.confetti-piece{position:absolute;left:var(--origin);top:60%;width:8px;height:12px;background:var(--confetti-color);border-radius:1px;opacity:0;animation:confetti-celebrate 2.6s var(--delay) ease-out both}
@keyframes confetti-celebrate{0%{opacity:0;transform:translate(0,0) rotate(0deg)}5%{opacity:1}40%{opacity:1;transform:translate(calc(var(--dx) * .5),var(--rise)) rotate(260deg)}100%{opacity:0;transform:translate(var(--dx),var(--fall)) rotate(720deg)}}
@media(prefers-reduced-motion:reduce){.confetti-piece{display:none}}


/* Show the endorsed identity above the game when the sidebar is closed. */
.mobile-header{display:none}
@media(max-width:760px){
  .mobile-header{position:absolute;z-index:1;top:24px;left:28px;right:28px;display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center}
  .mobile-header .brand{grid-column:2;grid-row:1;align-items:center}
  .mobile-header .mobile-toggle{grid-column:3;grid-row:1;justify-self:end;position:static;min-height:44px;padding:10px 0}
  body:not(.compare-page)>main{padding-top:114px}
}
