/* App presentation is scoped to the Wordle root; the dedicated route alone gets
   the two layout resets below. No external fonts or assets. */
body.acaa-kw-page { margin: 0; background: #f7f5ef; }
body.acaa-kw-page #acaa-wordle-main { margin: 0; padding: 0; width: 100%; max-width: none; }
.acaa-kw {
    --kw-paper: #f7f5ef;
    --kw-ink: #23312c;
    --kw-muted: #687068;
    --kw-line: #dcded4;
    --kw-honey: #ad802f;
    --kw-correct: #38664f;
    --kw-present: #966d26;
    --kw-absent: #626b67;
    color: var(--kw-ink);
    background: var(--kw-paper);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    text-align: left;
    padding: 0 24px 28px;
    min-height: 420px;
    isolation: isolate;
    -webkit-font-smoothing: antialiased;
    color-scheme: light;
}
.acaa-kw *, .acaa-kw *::before, .acaa-kw *::after { box-sizing: border-box; }
.acaa-kw [hidden] { display: none !important; }
.acaa-kw :is(h1, h2, h3, p, ul, ol, figure) { padding: 0; margin: 0; }
.acaa-kw :is(button, input, textarea) { font: inherit; letter-spacing: normal; text-transform: none; }
.acaa-kw button { cursor: pointer; box-shadow: none; margin: 0; min-height: 0; }
.acaa-kw button::before, .acaa-kw button::after { display: none; }
.acaa-kw button:disabled { cursor: default; opacity: 1; }
.acaa-kw :is(a, button, input, textarea, summary, [tabindex]):focus-visible {
    outline: 3px solid #9b6b1f;
    outline-offset: 4px;
}
.acaa-kw a { color: inherit; text-decoration: none; }
.acaa-kw a:hover { text-decoration: underline; text-underline-offset: 4px; }
.acaa-kw__shell { max-width: 560px; margin: 0 auto; }
.acaa-kw__top { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 70px; border-bottom: 1px solid var(--kw-line); }
.acaa-kw__brand { display: inline-flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 750; letter-spacing: .14em; }
.acaa-kw__brand-icon { width: 21px; height: 21px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 3px; transform: rotate(-6deg); }
.acaa-kw__brand-icon i { display: block; background: var(--kw-ink); border-radius: 1px; }
.acaa-kw__brand-icon i:last-child { background: #be9650; }
.acaa-kw__text-link { display: inline-block; font-size: 12px; font-weight: 600; line-height: 1.5; }
.acaa-kw__intro { text-align: center; padding: 25px 0 22px; }
.acaa-kw__eyebrow { color: #7a683e; font-size: 10px; font-weight: 750; letter-spacing: .16em; line-height: 1.6; }
.acaa-kw__title { color: var(--kw-ink); font-family: Georgia, "Times New Roman", serif; font-weight: 400; font-size: clamp(38px, 6.5vw, 52px); line-height: 1.18; letter-spacing: -.055em; margin: 5px 0 8px !important; }
.acaa-kw__lede { color: #626b62; font-size: 14px; line-height: 1.5; }
.acaa-kw__modes { display: flex; width: min(320px, 100%); gap: 4px; margin: 0 auto; padding: 4px; border: 1px solid #e1e2d9; background: #eeeee6; border-radius: 10px; }
.acaa-kw__mode { flex: 1; padding: 9px 12px; border: 0; border-radius: 7px; color: #59664f; background: transparent; font-size: 13px !important; font-weight: 650 !important; line-height: 1.5; }
.acaa-kw__mode:hover { background: #e4e6db; color: var(--kw-ink); }
.acaa-kw__mode[aria-pressed="true"] { color: #fff; background: var(--kw-ink); box-shadow: 0 1px 2px #17231d1a; }
.acaa-kw__mode-info { text-align: center; font-size: 11px; color: #687068; min-height: 38px; padding: 9px 0 11px !important; }
.acaa-kw summary { cursor: pointer; list-style: none; font-size: 13px; font-weight: 600; line-height: 1.6; }
.acaa-kw summary::-webkit-details-marker { display: none; }
.acaa-kw summary::after { content: "+"; float: right; font-size: 17px; line-height: 1.2; font-weight: 400; color: #606c59; }
.acaa-kw details[open] > summary::after { content: "−"; }
.acaa-kw__how { border-top: 1px solid var(--kw-line); border-bottom: 1px solid var(--kw-line); }
.acaa-kw__how > summary { padding: 10px 0; }
.acaa-kw__summary-hint { float: right; margin-right: 16px; font-size: 11px; font-weight: 400; color: #606c59; }
.acaa-kw__guide { padding: 7px 0 17px; font-size: 13px; color: #4a584d; }
.acaa-kw__guide p + p { margin-top: 11px; }
.acaa-kw__guide-legend { display: grid; gap: 7px; margin: 14px 0; }
.acaa-kw__guide-line { display: flex; gap: 10px; align-items: center; }
.acaa-kw__sample { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: 4px; color: #fff; font-size: 16px; font-weight: 650; }
.acaa-kw__sample--correct { background: var(--kw-correct); }
.acaa-kw__sample--present { background: var(--kw-present); }
.acaa-kw__sample--absent { background: var(--kw-absent); }
.acaa-kw__play { padding-top: 18px; }
.acaa-kw__board-header { display: flex; align-items: center; justify-content: space-between; max-width: 290px; margin: 0 auto 11px; font-size: 10px; font-weight: 650; line-height: 1.5; letter-spacing: .1em; }
.acaa-kw__round { color: #6b735f; }
.acaa-kw__day-label { color: #606c59; text-transform: uppercase; font-size: 10px; }
.acaa-kw__board { width: min(290px, 100%); margin: 0 auto; display: grid; gap: 6px; border-radius: 3px; outline-offset: 7px !important; }
.acaa-kw__board:focus:not(:focus-visible) { outline: none; }
.acaa-kw__row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.acaa-kw__tile { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 1; width: 100%; border: 1.5px solid #dfe1d8; border-radius: 5px; background: #faf9f5; color: var(--kw-ink); line-height: 1; user-select: none; }
.acaa-kw__tile-letter { font-size: 28px; font-weight: 650; transform: translateY(-1px); }
.acaa-kw__tile-mark { position: absolute; bottom: 4px; right: 5px; font-size: 10px; font-weight: 700; line-height: 1; }
.acaa-kw__tile--active { border-color: #bfc7b9; }
.acaa-kw__tile--filled { border-color: #788b79; background: #fffef9; }
.acaa-kw__tile--correct { border-color: var(--kw-correct); background: var(--kw-correct); color: #fff; }
.acaa-kw__tile--present { border-color: var(--kw-present); background: var(--kw-present); color: #fff; }
.acaa-kw__tile--absent { border-color: var(--kw-absent); background: var(--kw-absent); color: #fff; }
.acaa-kw__message { max-width: 440px; min-height: 53px; padding: 12px 4px 10px !important; margin: 0 auto !important; text-align: center; font-size: 12px; line-height: 1.6; color: #52624f; }
.acaa-kw__message--error { color: #935324; }
.acaa-kw__keyboard { max-width: 440px; margin: 0 auto; touch-action: manipulation; }
.acaa-kw__key-row { display: flex; gap: 5px; justify-content: center; margin-bottom: 6px; }
.acaa-kw__key { position: relative; flex: 1 1 0; max-width: 44px; height: 43px; padding: 0 2px; border: 1px solid #d9ddd2; border-bottom-width: 2px; border-radius: 5px; color: var(--kw-ink); background: #e9ece3; font-size: 19px !important; font-weight: 600 !important; line-height: 1; -webkit-tap-highlight-color: transparent; }
.acaa-kw__key:hover:not(:disabled) { background: #dce2d5; border-color: #bfc9b7; }
.acaa-kw__key:active:not(:disabled) { transform: translateY(1px); }
.acaa-kw__key-letter { display: inline-block; transform: translateY(-1px); }
.acaa-kw__key-mark { position: absolute; bottom: 3px; right: 4px; font-size: 8px; }
.acaa-kw__key--action { max-width: 65px; flex-grow: 1.6; font-size: 11px !important; font-weight: 650 !important; }
.acaa-kw__key--delete { font-size: 20px !important; }
.acaa-kw__key--correct, .acaa-kw__key--correct:hover:not(:disabled) { background: var(--kw-correct); border-color: var(--kw-correct); color: #fff; }
.acaa-kw__key--present, .acaa-kw__key--present:hover:not(:disabled) { background: var(--kw-present); border-color: var(--kw-present); color: #fff; }
.acaa-kw__key--absent, .acaa-kw__key--absent:hover:not(:disabled) { background: #626b67; border-color: #626b67; color: #fff; }
.acaa-kw__special { margin-top: 11px; }
.acaa-kw__special-label { display: block; color: #7b6840; text-align: center; font-size: 10px; line-height: 1.6; letter-spacing: .15em; font-weight: 700; margin-bottom: 5px; }
.acaa-kw__key-row--special .acaa-kw__key { background: #f0e9d9; border-color: #e2d7be; }
.acaa-kw__key-row--special .acaa-kw__key:hover:not(:disabled) { background: #e8dcc3; border-color: #c5b282; }
.acaa-kw__key-row--special .acaa-kw__key--correct, .acaa-kw__key-row--special .acaa-kw__key--correct:hover:not(:disabled) { background: var(--kw-correct); border-color: var(--kw-correct); }
.acaa-kw__key-row--special .acaa-kw__key--present, .acaa-kw__key-row--special .acaa-kw__key--present:hover:not(:disabled) { background: var(--kw-present); border-color: var(--kw-present); }
.acaa-kw__key-row--special .acaa-kw__key--absent, .acaa-kw__key-row--special .acaa-kw__key--absent:hover:not(:disabled) { background: var(--kw-absent); border-color: var(--kw-absent); }
.acaa-kw__native { max-width: 440px; margin: 14px auto 0; }
.acaa-kw__native > summary { font-size: 10px; font-weight: 400; color: #606c59; text-align: center; padding: 5px 18px; }
.acaa-kw__native > summary::after { font-size: 12px; }
.acaa-kw__native label { display: block; font-size: 12px; margin: 12px 0 5px; }
.acaa-kw__native-field { display: flex; gap: 8px; }
.acaa-kw__input { width: 100%; min-width: 0; min-height: 42px; padding: 8px 12px; color: var(--kw-ink); background: #fffef9; border: 1px solid #b9c3b3; border-radius: 5px; font-size: 18px !important; }
.acaa-kw__input-hint { display: block; color: #606c59; font-size: 10px; margin-top: 6px; }
.acaa-kw__button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 11px 18px; border: 1px solid #bdc5b7; border-radius: 6px; color: var(--kw-ink); background: transparent; font-size: 12px !important; font-weight: 650 !important; line-height: 1.5; text-decoration: none; }
.acaa-kw__button:hover { background: #e8ecdf; color: var(--kw-ink); border-color: #a9b49e; }
.acaa-kw__button--primary { color: #fff; background: var(--kw-ink); border-color: var(--kw-ink); }
.acaa-kw__button--primary:hover { color: #fff; background: #3b4f43; border-color: #3b4f43; }
.acaa-kw__button--small { padding: 8px 13px; white-space: nowrap; }
.acaa-kw__result { border: 1px solid #d5dccd; background: #f0f2e9; border-radius: 10px; padding: 22px 24px; margin: 23px 0 0; }
.acaa-kw__result-top { display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.acaa-kw__result-top .acaa-kw__eyebrow { color: #596a48; font-size: 10px; letter-spacing: .13em; }
.acaa-kw__score { border: 1px solid #ccd5c0; border-radius: 20px; color: #62724f; font-size: 10px; font-weight: 600; padding: 2px 10px; white-space: nowrap; }
.acaa-kw__answer { color: var(--kw-ink); font-size: 41px; font-weight: 600; line-height: 1.3; letter-spacing: .02em; margin: 9px 0 16px !important; }
.acaa-kw__meaning-label { color: #606c59; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; margin-bottom: 5px !important; }
.acaa-kw__meaning { color: #30432f; font-family: Georgia, "Times New Roman", serif; font-size: 23px; line-height: 1.4; }
.acaa-kw__definition + .acaa-kw__definition { margin-top: 16px; }
.acaa-kw__citation { display: block; color: #606c59; font-size: 11px; line-height: 1.6; font-style: normal; margin-top: 8px; overflow-wrap: anywhere; }
.acaa-kw__word-notes { border-top: 1px solid #d7dfcf; margin-top: 17px; padding-top: 10px; font-size: 12px; color: #596750; }
.acaa-kw__word-notes summary { font-size: 11px; font-weight: 500; }
.acaa-kw__word-notes p { margin-top: 10px; }
.acaa-kw__note-label { font-size: 10px; color: #606c59; }
.acaa-kw__result-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 21px; }
.acaa-kw__result-note { color: #606c59; font-size: 10px; line-height: 1.6; margin-top: 12px !important; }
.acaa-kw__share-fallback { margin: 18px 0; }
.acaa-kw__share-fallback label { display: block; font-size: 12px; margin-bottom: 7px; }
.acaa-kw__share-text { width: 100%; padding: 12px; color: var(--kw-ink); background: #fffef9; border: 1px solid #bbc7b3; border-radius: 6px; font-size: 14px !important; line-height: 1.6; resize: vertical; }
.acaa-kw__stats { border-top: 1px solid var(--kw-line); margin-top: 24px; padding-top: 12px; }
.acaa-kw__stats > summary { font-size: 12px; }
.acaa-kw__stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 20px 0 12px; }
.acaa-kw__stat { text-align: center; }
.acaa-kw__stat strong { display: block; font-size: 27px; font-weight: 500; line-height: 1.4; }
.acaa-kw__stat span { display: block; color: #606c59; font-size: 10px; }
.acaa-kw__stats-note { color: #606c59; font-size: 11px; line-height: 1.7; margin-top: 3px !important; }
.acaa-kw__footer { text-align: center; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--kw-line); }
.acaa-kw__saved { color: #606c59; font-size: 10px; letter-spacing: .01em; }
.acaa-kw__warning { color: #885522; background: #f2e8d2; border: 1px solid #dfcba4; border-radius: 6px; padding: 10px 13px !important; margin-top: 12px !important; font-size: 12px; text-align: left; }
.acaa-kw__boot { text-align: center; padding: 80px 16px !important; color: #606c59; }
.acaa-kw__load-error { max-width: 500px; margin: 0 auto; padding: 70px 0; }
.acaa-kw__load-error h2 { font-family: Georgia, "Times New Roman", serif; font-size: 34px; font-weight: 400; line-height: 1.2; margin: 12px 0; }
.acaa-kw__load-error p:not(.acaa-kw__eyebrow) { color: #677161; margin-bottom: 24px; }
.acaa-kw__load-error .acaa-kw__text-link { margin: 15px 20px; }
@media (min-width: 800px) {
    .acaa-kw { padding-left: 36px; padding-right: 36px; }
    .acaa-kw__intro { padding-top: 30px; }
}
@media (max-width: 420px) {
    .acaa-kw { padding: 0 16px 22px; }
    .acaa-kw__top { min-height: 58px; gap: 10px; }
    .acaa-kw__brand { font-size: 13px; gap: 7px; }
    .acaa-kw__text-link { font-size: 10px; }
    .acaa-kw__intro { padding: 20px 0 19px; }
    .acaa-kw__eyebrow { font-size: 9px; }
    .acaa-kw__lede { font-size: 11px; }
    .acaa-kw__mode-info { font-size: 10px; }
    .acaa-kw__board { max-width: 276px; gap: 5px; }
    .acaa-kw__row { gap: 5px; }
    .acaa-kw__board-header { max-width: 276px; }
    .acaa-kw__tile-letter { font-size: 26px; }
    .acaa-kw__key-row { gap: 4px; }
    .acaa-kw__key { min-width: 0; font-size: 18px !important; height: 44px; }
    .acaa-kw__key--action { font-size: 10px !important; }
    .acaa-kw__key--delete { font-size: 19px !important; }
    .acaa-kw__message { font-size: 11px; min-height: 55px; }
    .acaa-kw__result { padding: 18px; }
    .acaa-kw__result-actions .acaa-kw__button { flex: 1; padding-left: 11px; padding-right: 11px; }
    .acaa-kw__stat strong { font-size: 24px; }
    .acaa-kw__stat span { font-size: 10px; }
}
@media (max-width: 340px) {
    .acaa-kw { padding-left: 12px; padding-right: 12px; }
    .acaa-kw__title { font-size: 36px; }
    .acaa-kw__key-row { gap: 3px; }
    .acaa-kw__summary-hint { display: none; }
    .acaa-kw__result-actions { flex-direction: column; }
}
@media (prefers-reduced-motion: no-preference) {
    .acaa-kw__mode, .acaa-kw__button, .acaa-kw__key { transition: background-color 100ms ease, border-color 100ms ease; }
    .acaa-kw__result { animation: acaa-kw-result-in 180ms ease-out; }
    @keyframes acaa-kw-result-in { from { opacity: .2; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
}
@media (forced-colors: active) {
    .acaa-kw__tile, .acaa-kw__key { border: 1px solid CanvasText; }
    .acaa-kw__tile-mark, .acaa-kw__key-mark { color: CanvasText; }
    .acaa-kw__mode[aria-pressed="true"] { outline: 2px solid Highlight; }
}
