/* ==========================================================================
   AKALASI AI COMPANION (SKELETON)
   Follows existing design tokens from aka-01-base-and-design-system.css
   ========================================================================== */

.aka-ai-assistant {
    --aka-ai-surface: #fff;
    --aka-ai-border: rgba(44, 62, 80, 0.14);
    --aka-ai-muted: #5f6b76;
    --aka-ai-shadow: var(--aka-shadow-card, 0 8px 24px rgba(0,0,0,0.06));
    width: auto;
    max-width: none;
    margin: 0;
    color: var(--h-dark, #2c3e50);
    font-family: var(--aka-font, 'Open Sans', sans-serif);
}

.aka-ai-assistant-root {
    position: fixed;
    right: max(14px, env(safe-area-inset-right, 0px));
    bottom: max(14px, env(safe-area-inset-bottom, 0px));
    z-index: 999995;
}

/* Pending-tillstånd: göm Mira tills `aka-sticky-header.js` har avgjort
 * om FAB ska dockas in i `.aka-floating-tools` eller stå kvar i default-
 * position. Förhindrar flicker mellan default-cirkel och dockad pill.
 * Scopat strikt till Mira-root så ingen annan FAB påverkas. */
#aka-ai-assistant-root[data-aka-fab-pending] {
    visibility: hidden;
}

.aka-ai-assistant-fab {
    width: 56px;
    height: 56px;
    min-height: 56px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: linear-gradient(150deg, #5f8f84 0%, #3d7268 52%, #2d5a52 100%);
    color: #fff;
    font-family: var(--aka-font, 'Open Sans', sans-serif);
    font-weight: 800;
    cursor: pointer;
    box-shadow: var(--aka-shadow-card, 0 8px 24px rgba(0,0,0,0.06));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.aka-ai-assistant-fab:hover,
.aka-ai-assistant-fab:focus-visible {
    filter: brightness(1.05);
    outline: none;
}

.aka-ai-assistant-fab--photo {
    padding: 0;
}

.aka-ai-assistant-fab__photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 50%;
}

.aka-ai-assistant-fab__icon {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.aka-ai-assistant-fab__icon .aka-mira-avatar-mark--fab {
    width: 30px;
    height: 30px;
}

.aka-ai-assistant-fab__icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.aka-ai-assistant--floating {
    position: absolute;
    right: 0;
    bottom: 62px;
    width: auto;
    max-width: calc(100vw - 32px);
    z-index: 10000020;
}

#aka-ai-assistant-window[hidden] {
	display: none !important;
	visibility: hidden !important;
	pointer-events: none !important;
}

.aka-ai-assistant__close {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(15, 118, 110, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.75);
    color: #0f766e;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.aka-ai-assistant__close:hover,
.aka-ai-assistant__close:focus-visible {
    background: #fff;
    border-color: rgba(13, 148, 136, 0.45);
    color: #0b5f59;
    outline: none;
}

.aka-ai-assistant__close:focus-visible {
    box-shadow: 0 0 0 2px rgba(45, 212, 191, 0.35);
}

.aka-ai-assistant__back-wrap {
	flex: 0 0 auto;
	margin: 0 0 6px;
}

.aka-ai-assistant__back-wrap[hidden] {
	display: none !important;
}

.aka-ai-assistant__back {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	padding: 4px 2px 6px;
	margin: 0;
	border: none;
	background: transparent;
	color: #0f766e;
	font: 600 0.82rem/1.2 var(--aka-font, 'Open Sans', sans-serif);
	cursor: pointer;
	text-decoration: none;
	border-radius: 6px;
}

.aka-ai-assistant__back:hover,
.aka-ai-assistant__back:focus-visible {
	color: #0b5f59;
	text-decoration: underline;
	text-underline-offset: 3px;
	outline: none;
}

.aka-ai-assistant__back-glyph {
	font-size: 0.95rem;
	line-height: 1;
}

.aka-ai-assistant__msg-text {
	margin: 0;
	white-space: pre-wrap;
	word-break: break-word;
	font-size: 0.875rem;
	line-height: 1.45;
	color: #1e293b;
}

.aka-ai-assistant__msg--hits .aka-ai-hit-list__lead,
.aka-ai-assistant__msg--glossary .aka-ai-glossary-hit__body {
	white-space: normal;
}

.aka-ai-hit-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.aka-ai-hit-list__lead {
	margin: 0 0 10px;
	font-weight: 700;
	color: #475569;
	font-size: 0.78rem;
	line-height: 1.4;
}

.aka-ai-hit-list__section {
	margin-top: 8px;
}

.aka-ai-hit-list__section:first-of-type {
	margin-top: 0;
}

.aka-ai-hit-list__sec-title {
	margin: 0 0 4px;
	font-size: 0.7rem;
	font-weight: 700;
	color: #64748b;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.aka-ai-hit-list__sec-rows {
	display: grid;
	gap: 6px;
}

.aka-ai-glossary-hit__intro {
	margin: 0;
	font-size: 0.875rem;
	line-height: 1.45;
	color: #1e293b;
}

.aka-ai-hit {
	display: block;
	text-decoration: none !important;
	border: 1px solid rgba(15, 118, 110, 0.14);
	background: #fff;
	border-radius: 10px;
	padding: 8px 10px;
}

.aka-ai-hit:hover {
    border-color: rgba(26, 188, 156, 0.5);
    background: rgba(26, 188, 156, 0.08);
}

.aka-ai-hit__title {
	display: block;
	color: #203340;
	font-weight: 700;
	line-height: 1.3;
	font-size: 0.84rem;
}

.aka-ai-hit__sub {
	display: block;
	margin-top: 2px;
	color: #64748b;
	font-size: 11px;
}

.aka-ai-assistant__shell {
    background: var(--aka-ai-surface);
    border: 1px solid rgba(15, 118, 110, 0.18);
    border-radius: 22px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

@media (min-width: 641px) {
    .aka-ai-assistant--floating .aka-ai-assistant__shell {
        width: clamp(520px, 36vw, 600px);
        min-height: 560px;
        max-height: calc(100dvh - 160px);
        height: min(640px, calc(100dvh - 140px));
    }
}

@media (max-width: 640px) {
    .aka-ai-assistant__shell {
        height: 100%;
        max-height: calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    }
}

.aka-ai-assistant__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(15, 118, 110, 0.12);
    background: linear-gradient(
        135deg,
        color-mix(in srgb, #fff 92%, var(--color-brand, #1abc9c) 8%) 0%,
        color-mix(in srgb, #f0fdfa 88%, var(--color-brand, #1abc9c) 12%) 100%
    );
    color: #0f172a;
}

.aka-ai-assistant__head-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.aka-ai-assistant__avatar {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    border: 1px solid rgba(15, 118, 110, 0.2);
    background: rgba(255, 255, 255, 0.65);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.aka-ai-assistant__avatar .aka-mira-avatar-mark--head {
    width: 34px;
    height: 34px;
}

.aka-ai-assistant__avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.aka-ai-assistant__title {
    margin: 0;
    font-size: clamp(1rem, 2vw, 1.12rem);
    font-weight: 800;
    line-height: 1.2;
    color: #0f766e;
    letter-spacing: 0.02em;
}

.aka-ai-assistant__badge-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.aka-member-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1;
}

.aka-member-badge--support {
    background: var(--color-brand, #1abc9c);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.45);
}

.aka-member-badge--forum,
.aka-member-badge--comment {
    margin-left: 6px;
    vertical-align: middle;
}

.aka-ai-assistant__body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
	padding: 12px 16px 14px;
	gap: 0;
}

.aka-ai-assistant__starter {
	flex: 0 0 auto;
}

.aka-ai-assistant__home-title {
	margin: 0 0 6px;
	font-size: 1.08rem;
	font-weight: 800;
	color: #0f766e;
	line-height: 1.25;
}

.aka-ai-assistant__home-intro {
	margin: 0;
	color: #475569;
	font-size: 0.93rem;
	line-height: 1.55;
}

.aka-ai-assistant__composer-wrap {
	flex: 0 0 auto;
	margin-top: auto;
	padding-top: 12px;
	border-top: 1px solid rgba(15, 118, 110, 0.1);
	background: linear-gradient(to top, #fff 82%, rgba(255, 255, 255, 0));
}

.aka-ai-assistant__hints {
	margin-bottom: 4px;
}

.aka-ai-assistant__chip-row {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 10px;
}

.aka-ai-assistant__chip {
	border: 1px solid rgba(15, 118, 110, 0.22);
	background: rgba(255, 255, 255, 0.96);
	color: #0f766e !important;
	font-size: 0.78rem;
	font-weight: 700;
	padding: 7px 12px;
	border-radius: 999px;
	cursor: pointer;
	font-family: inherit;
	line-height: 1.2;
	transition: background 0.12s ease, border-color 0.12s ease;
}

.aka-ai-assistant__chip:hover,
.aka-ai-assistant__chip:focus-visible {
	background: #fff;
	border-color: rgba(13, 148, 136, 0.42);
	outline: none;
}

.aka-ai-assistant__examples-kicker {
	margin: 0 0 6px;
	font-size: 0.7rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.07em;
	color: #64748b;
}

.aka-ai-assistant__examples {
	list-style: none;
	margin: 0 0 6px;
	padding: 0;
	display: grid;
	gap: 6px;
}

.aka-ai-assistant__examples li {
	margin: 0;
}

.aka-ai-assistant__example {
	width: 100%;
	text-align: left;
	border: 1px solid rgba(15, 118, 110, 0.14);
	background: color-mix(in srgb, #fff 93%, var(--color-brand, #1abc9c) 7%);
	border-radius: 12px;
	padding: 8px 11px;
	font-size: 0.82rem;
	font-weight: 600;
	color: #1e293b !important;
	cursor: pointer;
	font-family: inherit;
	line-height: 1.35;
	transition: border-color 0.12s ease, background 0.12s ease;
}

.aka-ai-assistant__example:hover,
.aka-ai-assistant__example:focus-visible {
	border-color: rgba(13, 148, 136, 0.35);
	background: #fff;
	outline: none;
}

.aka-ai-assistant__lead {
	margin: 0 0 10px;
	color: var(--aka-ai-muted);
	line-height: 1.5;
	font-size: 0.95rem;
}

.aka-ai-assistant__messages {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 10px;
	flex: 1 1 auto;
	min-height: 0;
	max-height: none;
	overflow-y: auto;
	padding-right: 2px;
	-webkit-overflow-scrolling: touch;
}

/*
 * Rich results (ordlista + vidareträffar): undvik att kolumn-flex krymper meddelanden under
 * innehållshöjd — kombinationen min-height:0 + flex-shrink skapade överlapp mot nästa bubbla.
 * align-items stretch återställer vertikal stapling jämfört med aka-01 flex-end på rad-flex.
 */
#aka-ai-assistant-root .aka-ai-assistant__messages > .aka-ai-assistant__msg {
	flex-shrink: 0 !important;
	min-height: min-content !important;
	align-items: stretch !important;
}

.aka-ai-assistant__msg {
	max-width: 100%;
	align-self: stretch;
	border: 1px solid rgba(15, 118, 110, 0.12);
	background: #f8fafc;
	border-radius: 12px;
	padding: 8px 12px;
	min-height: min-content;
	box-sizing: border-box;
}

.aka-ai-assistant__msg--user {
	align-self: flex-end;
	max-width: 85%;
	background: #fff;
	border-color: rgba(100, 116, 139, 0.22);
	box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06);
}

.aka-ai-assistant__msg--user .aka-ai-assistant__msg-text {
	color: #334155;
	font-weight: 500;
}

.aka-ai-assistant__msg--bot {
	border-left: 2px solid rgba(26, 188, 156, 0.45);
	background: #f1f5f9;
}

.aka-ai-assistant__msg--bot .aka-ai-assistant__msg-text {
	color: #1e293b;
}

.aka-ai-assistant__msg--hits {
	padding: 8px 10px;
	background: #f8fafc;
	border-left: 2px solid rgba(26, 188, 156, 0.35);
}

.aka-ai-assistant__msg--glossary {
	padding: 8px 10px;
	background: #f8fafc;
	border-left: 2px solid rgba(26, 188, 156, 0.35);
}

.aka-ai-assistant__composer {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 10px;
	margin-top: 0;
	padding-top: 6px;
	padding-bottom: calc(4px + env(safe-area-inset-bottom, 0px));
	background: transparent;
	position: static;
	z-index: 3;
}

.aka-ai-assistant__input {
	width: 100%;
	min-height: 48px;
	border-radius: 999px;
	border: 1px solid rgba(15, 118, 110, 0.18);
	padding: 10px 18px;
	box-sizing: border-box;
	color: var(--h-dark, #2c3e50);
	background: #fff;
}

.aka-ai-assistant__input:focus {
	outline: none;
	border-color: var(--color-brand, #1abc9c);
	box-shadow: 0 0 0 3px rgba(26, 188, 156, 0.16);
}

.aka-ai-assistant__send {
	min-height: 48px;
	padding: 10px 20px;
	border-radius: 999px;
	border: none;
	background: var(--color-brand, #1abc9c);
	color: #fff;
	font-weight: 800;
	font-size: 12px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	cursor: pointer;
}

.aka-ai-assistant__send:hover {
	filter: brightness(1.04);
}

.aka-ai-assistant__meta {
	margin-top: 8px;
	margin-bottom: 0;
	font-size: 11px;
	color: #64748b;
	line-height: 1.45;
}

/* Premium teaser/gate (used by [aka_premium_content]) */
.aka-premium-teaser {
    margin: 18px 0;
    padding: 16px;
    border: 1px solid rgba(26, 188, 156, 0.28);
    border-left: 4px solid var(--color-brand, #1abc9c);
    border-radius: var(--aka-radius-card, 20px);
    background: rgba(26, 188, 156, 0.08);
    box-shadow: var(--aka-shadow-card, 0 8px 24px rgba(0,0,0,0.06));
}

.aka-premium-teaser__title {
    margin: 0 0 8px;
    font-size: 1rem;
    font-weight: 800;
    color: var(--h-dark, #2c3e50);
}

.aka-premium-teaser__text {
    margin: 0 0 12px;
    color: #566473;
    line-height: 1.55;
}

.aka-premium-teaser__actions {
    margin: 0;
}

.aka-premium-teaser .aka-btn,
.aka-premium-teaser .aka-btn--primary {
    background: var(--color-brand, #1abc9c) !important;
    color: #fff !important;
    border: 1px solid color-mix(in srgb, var(--color-brand, #1abc9c) 82%, #000) !important;
    box-shadow: var(--aka-shadow-card, 0 8px 24px rgba(0,0,0,0.06));
}

.aka-premium-teaser .aka-btn:hover,
.aka-premium-teaser .aka-btn--primary:hover {
    background: color-mix(in srgb, var(--color-brand, #1abc9c) 88%, #000) !important;
    filter: none;
}

/* Admin debug panel */
.aka-ai-debug-panel {
    position: fixed;
    right: 12px;
    bottom: 12px;
    z-index: 999999;
    width: min(92vw, 340px);
    background: #fff;
    border: 1px solid rgba(44, 62, 80, 0.2);
    border-radius: 14px;
    box-shadow: var(--aka-shadow-card, 0 8px 24px rgba(0,0,0,0.06));
    padding: 12px 12px 10px;
    font-family: var(--aka-font, 'Open Sans', sans-serif);
    color: var(--h-dark, #2c3e50);
}

.aka-ai-debug-panel__title {
    margin: 0 0 8px;
    font-size: 0.95rem;
    font-weight: 800;
}

.aka-ai-debug-panel__list {
    margin: 0;
    padding-left: 16px;
    font-size: 12px;
    line-height: 1.4;
}

.aka-ai-debug-panel__hint {
    margin: 8px 0 0;
    font-size: 11px;
    color: #5d6975;
}

.aka-ai-debug-panel__lang-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
    font-size: 12px;
}

.aka-ai-debug-panel__lang {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    min-height: 24px;
    padding: 2px 7px;
    border: 1px solid rgba(44, 62, 80, 0.25);
    border-radius: 999px;
    text-decoration: none !important;
    color: var(--h-dark, #2c3e50);
    font-weight: 700;
    font-size: 11px;
}

.aka-ai-debug-panel__lang--active {
    background: var(--color-brand, #1abc9c);
    color: #fff;
    border-color: var(--color-brand, #1abc9c);
}

.aka-ai-debug-panel__actions {
    margin: 10px 0 0;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.aka-ai-debug-panel__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--color-brand, #1abc9c);
    color: #fff !important;
    text-decoration: none !important;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.aka-ai-debug-panel__btn--ghost {
    background: #fff;
    color: var(--h-dark, #2c3e50) !important;
    border: 1px solid rgba(44, 62, 80, 0.2);
}

@media (max-width: 900px) {
    .aka-ai-assistant {
        max-width: 100%;
    }
}

/* Mobil bottom sheet (sajtens mobilbreakpoint 1180px) */
.aka-ai-assistant__backdrop {
    display: none;
}

@media (max-width: 1180px) {
    #aka-ai-assistant-root.aka-ai-assistant-root {
        position: fixed;
        right: 0;
        left: auto;
        top: auto;
        bottom: max(108px, calc(16vh + env(safe-area-inset-bottom, 0px)));
        z-index: 10000050;
        width: auto;
        max-width: none;
        transform: none;
    }

    body.aka-page-front #aka-ai-assistant-root.aka-ai-assistant-root:not(.is-open) {
        bottom: max(132px, calc(22vh + env(safe-area-inset-bottom, 0px)));
    }

    /* Edge-tab (Fas 1 prep): smal flik i stället för cirkel-FAB — öppnar samma bottom sheet */
    #aka-ai-assistant-root[data-aka-ai-entry="edge-tab"] .aka-ai-assistant-fab {
        width: 22px;
        min-width: 22px;
        min-height: 72px;
        height: auto;
        max-height: 88px;
        padding: 0;
        border-radius: 14px 0 0 14px;
        border: 1px solid rgba(26, 188, 156, 0.55);
        border-right: 0;
        box-shadow: -6px 0 20px rgba(26, 188, 156, 0.28);
        overflow: hidden;
        opacity: 1;
        z-index: 10000055;
    }

    body.aka-shell-open #aka-ai-assistant-root[data-aka-ai-entry="edge-tab"]:not(.is-open) {
        opacity: 0;
        pointer-events: none;
    }

    @media (max-width: 430px) {
        #aka-ai-assistant-root[data-aka-ai-entry="edge-tab"].aka-ai-assistant-root {
            bottom: max(96px, calc(12vh + env(safe-area-inset-bottom, 0px)));
        }

        body.aka-page-front #aka-ai-assistant-root[data-aka-ai-entry="edge-tab"].aka-ai-assistant-root:not(.is-open) {
            bottom: max(112px, calc(18vh + env(safe-area-inset-bottom, 0px)));
        }
    }

    #aka-ai-assistant-root[data-aka-ai-entry="edge-tab"] .aka-ai-assistant-fab__photo {
        width: 100%;
        height: 100%;
        border-radius: 0;
        object-fit: cover;
        object-position: 75% center;
    }

    #aka-ai-assistant-root[data-aka-ai-entry="edge-tab"] .aka-ai-assistant-fab__icon {
        width: 100%;
        height: 100%;
    }

    #aka-ai-assistant-root[data-aka-ai-entry="edge-tab"] .aka-ai-assistant-fab__icon .aka-mira-avatar-mark--fab {
        width: 100%;
        height: 100%;
    }

    #aka-ai-assistant-root:not([data-aka-ai-entry="edge-tab"]) .aka-ai-assistant-fab {
        width: 48px;
        height: 48px;
        min-height: 48px;
        box-shadow: 0 4px 14px rgba(15, 23, 42, 0.16);
    }

    #aka-ai-assistant-root.is-open {
        inset: 0;
        right: 0;
        bottom: 0;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        pointer-events: none;
    }

    #aka-ai-assistant-root.is-open .aka-ai-assistant-fab {
        opacity: 0;
        pointer-events: none;
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
    }

    #aka-ai-assistant-root .aka-ai-assistant__backdrop {
        display: block;
        position: fixed;
        inset: 0;
        margin: 0;
        padding: 0;
        border: none;
        background: rgba(15, 23, 42, 0.45);
        cursor: pointer;
        z-index: 1;
        pointer-events: auto;
        -webkit-tap-highlight-color: transparent;
    }

    #aka-ai-assistant-root .aka-ai-assistant__backdrop[hidden] {
        display: none !important;
    }

    #aka-ai-assistant-root .aka-ai-assistant--floating {
        position: fixed !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        top: auto !important;
        width: 100% !important;
        max-width: none !important;
        height: auto !important;
        max-height: min(90dvh, var(--aka-ai-sheet-h, 90dvh));
        margin: 0;
        border-radius: 18px 18px 0 0;
        z-index: 2;
        pointer-events: auto;
    }

    #aka-ai-assistant-root .aka-ai-assistant__shell {
        display: flex;
        flex-direction: column;
        min-height: 0;
        max-height: min(90dvh, var(--aka-ai-sheet-h, 90dvh));
        height: min(90dvh, var(--aka-ai-sheet-h, 90dvh));
        border-radius: 18px 18px 0 0;
        border-left: 0;
        border-right: 0;
        border-bottom: 0;
    }

    #aka-ai-assistant-root .aka-ai-assistant__body {
        display: flex;
        flex-direction: column;
        flex: 1 1 auto;
        min-height: 0;
        overflow: hidden;
        padding: 10px 10px max(8px, env(safe-area-inset-bottom, 0px));
    }

    #aka-ai-assistant-root .aka-ai-assistant__messages {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
        gap: 10px;
    }

    #aka-ai-assistant-root .aka-ai-assistant__head {
        padding: 10px 12px 10px;
        flex-shrink: 0;
    }

    #aka-ai-assistant-root .aka-ai-assistant__close {
        width: 42px;
        height: 42px;
        border-radius: 999px;
        font-size: 1.35rem;
    }

    #aka-ai-assistant-root .aka-ai-assistant__composer-wrap {
        flex-shrink: 0;
        padding-top: 8px;
    }

    #aka-ai-assistant-root .aka-ai-assistant__composer {
        grid-template-columns: 1fr auto;
        gap: 8px;
        margin-top: 8px;
        padding-bottom: max(4px, var(--aka-ai-kb, 0px));
    }

    #aka-ai-assistant-root .aka-ai-assistant__send {
        min-height: 44px;
        padding: 10px 14px;
        border-radius: 14px;
        font-size: 11px;
    }

    #aka-ai-assistant-root .aka-ai-assistant__input {
        min-height: 44px;
        padding: 10px 14px;
        font-size: 16px;
    }

    #aka-ai-assistant-root .aka-ai-assistant__meta {
        margin-top: 8px;
        font-size: 11px;
    }
}

body.aka-ai-sheet-open .aka-floating-tools {
    opacity: 0;
    pointer-events: none;
}

/* Mira: svar direkt från ordlistan */
#aka-ai-assistant-root .aka-ai-assistant__msg--glossary .aka-ai-glossary-hit {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 0.4rem;
	position: relative;
	flex: none;
	min-width: 0;
	width: 100%;
	box-sizing: border-box;
	text-align: left;
}

/* Rad med term + kategori (direkt efter tagg-raden) */
#aka-ai-assistant-root .aka-ai-glossary-hit__tag + p {
	margin: 0;
	font-size: 0.875rem;
	line-height: 1.45;
	color: #1e293b;
}

.aka-ai-glossary-hit__tag {
	margin: 0;
	font-size: 9px;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #0f766e;
	line-height: 1.3;
}
.aka-ai-glossary-hit__cat {
    font-weight: 600;
    color: #64748b;
    font-size: 0.88em;
}
.aka-ai-glossary-hit__body {
	margin: 0;
	line-height: 1.45;
	color: #334155;
	font-size: 0.86rem;
	word-break: break-word;
	overflow-wrap: anywhere;
}
.aka-ai-glossary-hit__more {
	margin: 0;
	font-size: 0.88rem;
	line-height: 1.45;
}
.aka-ai-glossary-hit__more a {
    color: #0f766e;
    font-weight: 700;
}

/* Kompaktare startvy på små skärmar (Mira-panel) */
@media (max-width: 480px) {
	.aka-ai-assistant__home-intro {
		font-size: 0.88rem;
		line-height: 1.45;
	}
	.aka-ai-assistant__chip-row {
		gap: 6px;
		margin-bottom: 8px;
	}
	.aka-ai-assistant__chip {
		font-size: 0.74rem;
		padding: 6px 10px;
	}
	.aka-ai-assistant__examples {
		gap: 4px;
	}
	.aka-ai-assistant__example {
		padding: 7px 9px;
		font-size: 0.78rem;
	}
}
