/* Escript AI chrome — smoother buttons, a bit of colour variety */
.btn {
    border-radius: 999px;
    border-width: 0;
    font-weight: 600;
    letter-spacing: 0.01em;
    padding: 0.45rem 1.15rem;
    box-shadow: none;
    transition: background-color 0.16s ease, color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}
.btn:hover,
.btn:focus {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(36, 49, 47, 0.12);
}
.btn-success,
.btn-success:not(:disabled):not(.disabled):active {
    background-color: #29423c;
    border-color: #29423c;
    color: #f9f6ef;
}
.btn-success:hover,
.btn-success:focus {
    background-color: #1d332e;
    border-color: #1d332e;
    color: #fff;
}
.btn-primary,
.btn-primary:not(:disabled):not(.disabled):active {
    background-color: #9b4f3a;
    border-color: #9b4f3a;
    color: #f9f6ef;
}
.btn-primary:hover,
.btn-primary:focus {
    background-color: #7e3d2d;
    border-color: #7e3d2d;
    color: #fff;
}
.btn-info,
.btn-info:not(:disabled):not(.disabled):active {
    background-color: #3d6e78;
    border-color: #3d6e78;
    color: #f9f6ef;
}
.navbar-dark .navbar-brand img {
    height: 30px;
    width: auto;
}

.esai-langs {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin: 0;
    max-width: 100%;
}
.esai-langs-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    max-width: 100%;
    min-height: 2.75rem;
    margin: 0;
    border: 0;
    border-radius: 999px;
    padding: 0.3rem 0.8rem;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 0.92rem;
    line-height: 1.2;
    cursor: pointer;
}
.esai-langs-label {
    margin: 0;
    color: inherit;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.72;
    white-space: nowrap;
}
.esai-langs-current {
    min-width: 0;
    overflow: hidden;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.esai-langs-caret {
    flex: 0 0 auto;
    width: 0.45rem;
    height: 0.45rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-0.12rem) rotate(45deg);
}
.esai-langs-toggle:focus-visible,
.esai-langs-list button:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}
.esai-langs-list {
    position: absolute;
    z-index: 1050;
    inset-block-start: calc(100% + 0.25rem);
    inset-inline-end: 0;
    display: block;
    width: max-content;
    min-width: 12rem;
    max-width: min(18rem, calc(100vw - 1rem));
    max-height: min(16rem, 70vh);
    margin: 0;
    padding: 0.35rem;
    overflow: auto;
    list-style: none;
    background: #fffdf8;
    color: #24312f;
    border-radius: 0.75rem;
    box-shadow: 0 10px 28px rgba(36, 49, 47, 0.18);
}
.esai-langs-list[hidden] {
    display: none;
}
.esai-langs-list button {
    display: block;
    width: 100%;
    min-height: 2.75rem;
    border: 0;
    border-radius: 0.5rem;
    padding: 0.4rem 0.7rem;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 0.95rem;
    text-align: start;
    cursor: pointer;
}
.esai-langs-list button[aria-current="true"] {
    background: #29423c;
    color: #f9f6ef;
}
.navbar-dark .esai-langs-toggle {
    background: rgba(244, 239, 230, 0.12);
    color: #f4efe6;
}
.esai-langs-nav {
    display: flex;
    align-items: center;
    max-width: 16rem;
    padding: 0.2rem 0.4rem;
}
html[dir="rtl"] .esai-langs-list {
    text-align: start;
}
html[dir="rtl"] body {
    text-align: start;
}
html[dir="rtl"] .esai-hero,
html[dir="rtl"] .esai-grid,
html[dir="rtl"] .esai-ack {
    direction: rtl;
}
html[dir="rtl"] .esai-script {
    flex-direction: row;
}
.esai-maintained-bar {
    width: 100%;
    flex: 0 0 auto;
    padding: 0.65rem 1.25rem 0.9rem;
    text-align: center;
    font-size: 0.8125rem;
    line-height: 1.45;
    opacity: 0.88;
}
.esai-maintained {
    margin: 0;
}
.esai-maintained a {
    font-weight: 600;
    color: inherit;
    text-underline-offset: 2px;
}
body.homepage .esai-maintained-bar {
    color: #24312f;
    opacity: 1;
    position: static;
}
/* App chrome is flex-row + 100vh; a normal footer becomes a third column. */
body.escr-body:not(.homepage) .esai-maintained-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 20;
    width: auto;
    background: var(--background, #24312f);
    border-top: 1px solid rgba(248, 244, 236, 0.08);
}
body.escr-body:has(#vue-global-nav) .esai-maintained-bar {
    left: 64px;
}
html[dir="rtl"] body.escr-body:has(#vue-global-nav) .esai-maintained-bar {
    left: 0;
    right: 64px;
}
body.escr-body:not(.homepage) main {
    padding-bottom: 4.5rem;
}
