
.skeleton {
    border-radius: 1rem;
    --tw-bg-opacity: 1;
    background-color: rgba(203, 213, 225, var(--tw-bg-opacity)); /* Light gray background */
    will-change: background-position;
    animation: skeleton 1.8s ease-in-out infinite;
    background-image: linear-gradient(105deg, transparent 0, transparent 40%, rgba(229, 231, 235, 1) 50%, transparent 60%, transparent 100%);
    background-size: 200% auto;
    background-repeat: no-repeat;
    background-position-x: -50%;
}

/* Small local replacements for the few DaisyUI primitives used by the app. */
.dropdown {
    position: relative;
}

.dropdown-content {
    position: absolute;
    z-index: 10;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-0.25rem);
    transition: opacity 120ms ease, transform 120ms ease, visibility 120ms;
}

.dropdown-end .dropdown-content {
    right: 0;
}

.dropdown:focus-within .dropdown-content {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.tool-export-menu {
    list-style: none;
}

.tool-export-menu a {
    display: block;
    padding: 0.55rem 0.7rem;
    border-radius: 0.4rem;
    cursor: pointer;
}

.tool-export-menu a:hover,
.tool-export-menu a:focus-visible {
    background: rgba(226, 232, 240, 0.7);
}

.practice-progress {
    overflow: hidden;
    height: 0.75rem;
    border: 0;
    border-radius: 999px;
    background: #e2e8f0;
    color: #16a34a;
}

.practice-progress::-webkit-progress-bar {
    background: #e2e8f0;
}

.practice-progress::-webkit-progress-value {
    background: #16a34a;
}

.practice-progress::-moz-progress-bar {
    background: #16a34a;
}

.steps {
    display: flex;
    align-items: center;
}

.steps .step {
    display: flex;
    flex: 1;
    align-items: center;
    color: #cbd5e1;
}

.steps .step::before {
    width: 100%;
    height: 0.2rem;
    background: currentColor;
    content: "";
}

.steps .step:first-child::before {
    width: 50%;
    margin-left: auto;
}

.steps .step::after {
    flex: none;
    width: 0.85rem;
    height: 0.85rem;
    margin-left: -0.4rem;
    border: 0.18rem solid #ffffff;
    border-radius: 999px;
    background: currentColor;
    box-shadow: 0 0 0 1px currentColor;
    content: "";
}

.steps .step-primary {
    color: #0284c7;
}

@keyframes skeleton {
    to {
        background-position-x: 200%;
    }
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.animate-gradient {
    background-size: 200% 200%;
    animation: gradient 15s ease infinite;
}

@keyframes slowGradientBackground {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

body {
    --tw-bg-opacity: 1;
    background-color: rgb(243 244 246 / var(--tw-bg-opacity));
}

/* Keep brand marks independent from the legacy dashboard image reset. */
.dashboard-brand-logo {
    display: block;
    width: auto;
    height: 2.5rem;
    max-width: 10rem;
    object-fit: contain;
}

.dashboard-brand-logo--compact {
    height: 2.25rem;
    max-width: 9rem;
}

input[type="submit"].bg-gradient-to-tl,
button.bg-gradient-to-tl,
a.bg-gradient-to-tl {
    background-image: linear-gradient(to top left, #7e22ce, #ec4899);
    color: #ffffff;
    border: 0;
}

input[type="submit"].bg-gradient-to-tl:hover,
button.bg-gradient-to-tl:hover,
a.bg-gradient-to-tl:hover {
    background-image: linear-gradient(to top left, #ec4899, #7e22ce);
    color: #ffffff;
}

.form-input,
.form-textarea,
.form-select {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    padding: 0.5rem;
    color: #111827;
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
    border-color: #6366f1;
    box-shadow: 0 0 0 1px #6366f1;
}

.file-input {
    display: inline-flex;
    align-items: center;
    min-height: 3rem;
    padding: 0.5rem 0.75rem;
    color: #374151;
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2.5rem;
    padding: 0.5rem 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: 0.5rem;
    cursor: pointer;
}

.btn-sm {
    min-height: 2rem;
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
}

.btn-outline {
    color: #374151;
    background-color: #ffffff;
    border-color: #d1d5db;
}

.btn-primary {
    color: #ffffff;
    background-color: #4f46e5;
    border-color: #4f46e5;
}

.btn-success {
    color: #ffffff;
    background-color: #16a34a;
    border-color: #16a34a;
}

.btn-warning {
    color: #111827;
    background-color: #facc15;
    border-color: #facc15;
}

.btn-error {
    color: #ffffff;
    background-color: #dc2626;
    border-color: #dc2626;
}

.btn-link,
.btn-active.btn-link {
    min-height: 0;
    padding: 0;
    color: #4f46e5;
    background-color: transparent;
    border-color: transparent;
    text-decoration: underline;
}

@layer components {
    .loader {
        @apply flex flex-col items-center;
    }
}

/* Global glass feedback */
.glass-flash-stack {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 70;
    display: grid;
    width: min(calc(100vw - 2rem), 24rem);
    gap: 0.75rem;
}

.glass-flash {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    padding: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.66);
    border-radius: 8px;
    color: #0f172a;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.6)),
        rgba(255, 255, 255, 0.68);
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.14);
    backdrop-filter: blur(24px) saturate(150%);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
    transition: transform 300ms ease, opacity 300ms ease;
}

.glass-flash__icon,
.glass-flash__close {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 8px;
}

.glass-flash__message {
    min-width: 0;
    flex: 1 1 auto;
    color: #334155;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.45;
}

.glass-flash--notice .glass-flash__icon {
    color: #047857;
    background: rgba(209, 250, 229, 0.86);
}

.glass-flash--error .glass-flash__icon {
    color: #b91c1c;
    background: rgba(254, 226, 226, 0.9);
}

.glass-flash__close {
    border: 0;
    color: #64748b;
    background: rgba(255, 255, 255, 0.52);
    transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.glass-flash__close:hover,
.glass-flash__close:focus-visible {
    transform: translateY(-1px);
    color: #0f172a;
    background: rgba(255, 255, 255, 0.84);
    outline: none;
}

.dashboard-loader-overlay {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(241, 245, 249, 0.52);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition: opacity 300ms ease;
}

.dashboard-loader-overlay.hidden {
    display: none;
}

.dashboard-loader-card {
    display: inline-flex;
    gap: 0.85rem;
    align-items: center;
    min-width: 12rem;
    padding: 1rem 1.1rem;
    border: 1px solid rgba(255, 255, 255, 0.68);
    border-radius: 8px;
    color: #0f172a;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.58)),
        rgba(255, 255, 255, 0.68);
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.16);
    font-size: 0.9rem;
    font-weight: 850;
}

.dashboard-loader-spinner {
    width: 2rem;
    height: 2rem;
    border: 2px solid rgba(14, 165, 233, 0.18);
    border-top-color: #0e7490;
    border-radius: 999px;
    animation: dashboard-loader-spin 900ms linear infinite;
}

@keyframes dashboard-loader-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Shared dashboard liquid-glass UI */
.dashboard-glass-shell {
    width: auto;
    max-width: 100%;
    min-height: 100vh;
    overflow-x: clip;
    color: #0f172a;
    background:
        linear-gradient(135deg, rgba(241, 248, 255, 0.96) 0%, rgba(248, 250, 252, 0.92) 46%, rgba(255, 247, 237, 0.9) 100%),
        linear-gradient(180deg, #ffffff 0%, #eef2f7 100%);
}

.dashboard-glass-shell::before {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    content: "";
    background-image:
        linear-gradient(rgba(15, 23, 42, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.035) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.58), transparent 72%);
}

.dashboard-glass-main {
    position: relative;
    z-index: 1;
}

/* Solid below xl, where the sidebar slides in as an overlay above page
   content -- a translucent/blurred surface there lets the underlying page
   show through and reads as broken. The glass treatment only makes sense
   once xl:left-0 turns it into a permanent rail beside the content. */
.dashboard-glass-shell aside {
    left: 0;
    border-color: rgb(226, 232, 240);
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.14);
}

@media (min-width: 1280px) {
    .dashboard-glass-shell aside {
        border-color: rgba(255, 255, 255, 0.58);
        background: rgba(255, 255, 255, 0.74);
        backdrop-filter: blur(26px) saturate(140%);
        -webkit-backdrop-filter: blur(26px) saturate(140%);
    }
}

.dashboard-glass-shell nav[navbar-main] {
    border-color: rgba(255, 255, 255, 0.58);
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(22px) saturate(140%);
    -webkit-backdrop-filter: blur(22px) saturate(140%);
}

.dashboard-nav-link {
    display: flex;
    align-items: center;
    min-height: 2.75rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #475569;
    font-size: 0.9rem;
    font-weight: 750;
    transition: color 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.dashboard-nav-link:hover,
.dashboard-nav-link:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.7);
    color: #0f172a;
    background: rgba(255, 255, 255, 0.66);
    outline: none;
}

.dashboard-nav-link.is-active {
    border-color: rgba(14, 165, 233, 0.34);
    color: #0f172a;
    background: linear-gradient(135deg, rgba(186, 230, 253, 0.88), rgba(204, 251, 241, 0.72));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76), 0 12px 30px rgba(15, 23, 42, 0.08);
}

.dashboard-nav-link.text-red-600 {
    color: #b91c1c;
}

.dashboard-nav-link.text-red-600:hover,
.dashboard-nav-link.text-red-600:focus-visible {
    border-color: rgba(248, 113, 113, 0.28);
    color: #991b1b;
    background: rgba(254, 226, 226, 0.58);
}

.dashboard-nav-link i {
    width: 1.2rem;
    margin-right: 0.75rem;
    text-align: center;
}

.theme-switch-row {
    justify-content: space-between;
    cursor: pointer;
}

.theme-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: 2.5rem;
    height: 1.4rem;
    flex-shrink: 0;
}

.theme-switch__input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.theme-switch__track {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.45);
    transition: background 160ms ease;
}

.theme-switch__thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.35);
    transition: transform 160ms ease;
}

.theme-switch__input:checked ~ .theme-switch__track {
    background: #0f172a;
}

.theme-switch__input:checked ~ .theme-switch__track .theme-switch__thumb {
    transform: translateX(1.1rem);
}

.theme-switch__input:focus-visible ~ .theme-switch__track {
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.4);
}

.dashboard-glass-panel {
    border: 1px solid rgba(255, 255, 255, 0.62);
    border-radius: 8px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.48)),
        rgba(255, 255, 255, 0.52);
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.1);
    backdrop-filter: blur(24px) saturate(150%);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
}

.dashboard-page-header {
    display: flex;
    width: 100%;
    gap: 1rem;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding: clamp(1rem, 2.5vw, 1.4rem);
    border: 1px solid rgba(255, 255, 255, 0.62);
    border-radius: 8px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.54)),
        linear-gradient(135deg, rgba(14, 165, 233, 0.1), rgba(245, 158, 11, 0.08));
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(24px) saturate(150%);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
}

.dashboard-page-header__copy {
    flex: 1 1 auto;
    max-width: 68rem;
    min-width: 0;
}

.dashboard-page-header__eyebrow {
    margin: 0 0 0.45rem;
    color: #475569;
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0;
    line-height: 1.2;
    text-transform: uppercase;
}

.dashboard-page-header h1 {
    margin: 0;
    color: #0f172a;
    font-size: clamp(1.55rem, 2.4vw, 2.25rem);
    font-weight: 850;
    letter-spacing: 0;
    line-height: 1.08;
}

.dashboard-page-header p:not(.dashboard-page-header__eyebrow) {
    margin: 0.65rem 0 0;
    color: #475569;
    font-size: 0.96rem;
    line-height: 1.65;
}

.dashboard-page-header__actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
    justify-content: flex-end;
}

.dashboard-glass-input {
    min-height: 2.75rem;
    border: 1px solid rgba(203, 213, 225, 0.82);
    border-radius: 8px;
    color: #0f172a;
    background: rgba(255, 255, 255, 0.68);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 10px 24px rgba(15, 23, 42, 0.04);
}

.dashboard-glass-input:focus {
    border-color: rgba(14, 165, 233, 0.75);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.13), inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.dashboard-glass-shell input[type="file"] {
    border-color: rgba(148, 163, 184, 0.86) !important;
    border-radius: 8px !important;
    color: #475569 !important;
    background: rgba(255, 255, 255, 0.58) !important;
}

.dashboard-glass-shell input[type="file"]::file-selector-button {
    margin-right: 0.8rem;
    padding: 0.55rem 0.75rem;
    border: 0;
    border-radius: 8px;
    color: #ffffff;
    background: #0f172a;
    font-weight: 800;
}

.dashboard-glass-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2.55rem;
    padding: 0.58rem 0.9rem;
    border-radius: 8px;
    font-size: 0.86rem;
    font-weight: 850;
    line-height: 1.2;
    text-align: center;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, color 160ms ease;
}

.dashboard-glass-button:hover,
.dashboard-glass-button:focus-visible {
    transform: translateY(-1px);
    outline: none;
}

.dashboard-glass-button:disabled,
.dashboard-glass-button[disabled] {
    cursor: not-allowed;
    opacity: 0.55;
}

.dashboard-glass-button-primary {
    border: 0;
    color: #ffffff;
    background: linear-gradient(135deg, #0f172a, #155e75 52%, #0f766e);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.18);
}

.dashboard-glass-button-primary:hover,
.dashboard-glass-button-primary:focus-visible {
    color: #ffffff;
    background: linear-gradient(135deg, #111827, #0e7490 52%, #0d9488);
    box-shadow: 0 20px 42px rgba(15, 23, 42, 0.2);
}

.dashboard-glass-button-primary.bg-red-600,
.dashboard-glass-button-primary.hover\:bg-red-700 {
    background: linear-gradient(135deg, #991b1b, #dc2626);
}

.dashboard-glass-button-secondary {
    border: 1px solid rgba(255, 255, 255, 0.72);
    color: #0f172a;
    background: rgba(255, 255, 255, 0.62);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 10px 24px rgba(15, 23, 42, 0.07);
}

.dashboard-glass-button-secondary:hover,
.dashboard-glass-button-secondary:focus-visible {
    border-color: rgba(14, 165, 233, 0.35);
    color: #0f172a;
    background: rgba(255, 255, 255, 0.84);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.1);
}

.dashboard-glass-button-secondary.text-red-600,
.dashboard-glass-button-secondary.hover\:text-red-700 {
    color: #b91c1c;
}

.dashboard-glass-button-secondary.text-yellow-600 {
    color: #b45309;
}

.dashboard-glass-shell table {
    color: #334155;
}

.dashboard-glass-shell thead,
.dashboard-glass-shell thead.bg-slate-50 {
    background: rgba(248, 250, 252, 0.62) !important;
}

.dashboard-glass-shell tbody,
.dashboard-glass-shell tbody.bg-white {
    background: rgba(255, 255, 255, 0.42) !important;
}

.dashboard-glass-shell tr {
    border-color: rgba(226, 232, 240, 0.72);
}

.dashboard-glass-shell tr.hover\:bg-slate-50:hover,
.dashboard-glass-shell tr:hover {
    background: rgba(255, 255, 255, 0.58) !important;
}

.dashboard-glass-shell th {
    color: #64748b !important;
    letter-spacing: 0 !important;
}

.dashboard-glass-shell td {
    border-color: rgba(226, 232, 240, 0.72);
}

.dashboard-glass-shell .bg-white:not(aside),
.dashboard-glass-shell header.bg-white,
.dashboard-glass-shell footer.bg-white {
    background-color: rgba(255, 255, 255, 0.56) !important;
}

.dashboard-glass-shell .bg-slate-50,
.dashboard-glass-shell .bg-slate-50\/70 {
    background-color: rgba(248, 250, 252, 0.48) !important;
}

.dashboard-glass-shell .border-slate-100,
.dashboard-glass-shell .border-slate-200,
.dashboard-glass-shell .divide-slate-100 > :not([hidden]) ~ :not([hidden]),
.dashboard-glass-shell .divide-slate-200 > :not([hidden]) ~ :not([hidden]) {
    border-color: rgba(226, 232, 240, 0.72) !important;
}

.dashboard-glass-shell #message_content {
    border-color: rgba(203, 213, 225, 0.82);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.72);
}

.dashboard-glass-shell [data-file-preview-target="preview"] {
    border-color: rgba(226, 232, 240, 0.76) !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, 0.58) !important;
}

.auth-glass-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.25rem;
    color: #0f172a;
    background:
        linear-gradient(135deg, rgba(241, 248, 255, 0.96) 0%, rgba(248, 250, 252, 0.92) 46%, rgba(255, 247, 237, 0.9) 100%),
        linear-gradient(180deg, #ffffff 0%, #eef2f7 100%);
}

.auth-glass-card {
    width: min(100%, 28rem);
    padding: clamp(1.1rem, 4vw, 1.75rem);
    border: 1px solid rgba(255, 255, 255, 0.64);
    border-radius: 8px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.52)),
        rgba(255, 255, 255, 0.58);
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(26px) saturate(150%);
    -webkit-backdrop-filter: blur(26px) saturate(150%);
}

.auth-glass-brand {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 1.25rem;
}

.auth-glass-brand__mark {
    display: block;
    width: 6.75rem;
    height: auto;
    object-fit: contain;
}

.profile-glass-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 8px;
    color: #ffffff;
    background: linear-gradient(135deg, #0f172a, #155e75);
    font-weight: 900;
}

.auth-glass-brand h1,
.profile-glass-hero h1 {
    margin: 0;
    color: #0f172a;
    font-size: 1.5rem;
    font-weight: 850;
    letter-spacing: 0;
    line-height: 1.1;
}

.auth-glass-brand p,
.profile-glass-hero p {
    margin: 0.25rem 0 0;
    color: #64748b;
    font-size: 0.9rem;
}

.auth-glass-form {
    display: grid;
    gap: 1rem;
}

.auth-glass-field label {
    display: block;
    margin-bottom: 0.45rem;
    color: #1e293b;
    font-size: 0.84rem;
    font-weight: 850;
}

.auth-glass-input {
    width: 100%;
    min-height: 2.8rem;
    padding: 0.65rem 0.8rem;
    border: 1px solid rgba(203, 213, 225, 0.82);
    border-radius: 8px;
    color: #0f172a;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 10px 24px rgba(15, 23, 42, 0.04);
}

.auth-glass-submit,
.auth-glass-google {
    width: 100%;
}

.auth-glass-divider {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0.75rem;
    align-items: center;
    margin: 1.25rem 0;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 850;
}

.auth-glass-divider::before,
.auth-glass-divider::after {
    height: 1px;
    content: "";
    background: rgba(203, 213, 225, 0.78);
}

.profile-glass-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.75fr);
    gap: 1rem;
}

.profile-glass-hero {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
}

.profile-glass-list {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
}

.profile-glass-list div {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem;
    border: 1px solid rgba(226, 232, 240, 0.72);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.5);
}

.profile-glass-list span {
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 800;
}

.profile-glass-list strong {
    min-width: 0;
    overflow-wrap: anywhere;
    color: #0f172a;
    font-size: 0.9rem;
    font-weight: 850;
    text-align: right;
}

@media (max-width: 1023px) {
    .profile-glass-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .dashboard-page-header {
        align-items: flex-start;
        flex-direction: column;
        padding: 0.95rem;
    }

    .dashboard-page-header__actions,
    .dashboard-page-header__actions .dashboard-glass-button {
        width: 100%;
    }

    .dashboard-glass-panel {
        border-radius: 8px;
    }

    .dashboard-glass-button {
        min-height: 2.7rem;
    }
}


/* Tools liquid-glass UI */
.tools-glass-shell {
    width: auto !important;
    max-width: 100%;
    min-height: 100vh;
    overflow-x: clip;
    color: #0f172a;
    background:
        linear-gradient(135deg, rgba(241, 248, 255, 0.96) 0%, rgba(248, 250, 252, 0.9) 42%, rgba(255, 247, 237, 0.9) 100%),
        linear-gradient(180deg, #ffffff 0%, #eef2f7 100%);
}

.tools-glass-shell::before {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    content: "";
    background-image:
        linear-gradient(rgba(15, 23, 42, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.035) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.65), transparent 70%);
}

.tools-glass-shell aside {
    left: 0;
    border-color: rgb(226, 232, 240);
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.14);
}

@media (min-width: 1280px) {
    .tools-glass-shell aside {
        border-color: rgba(255, 255, 255, 0.58);
        background: rgba(255, 255, 255, 0.72);
        backdrop-filter: blur(26px) saturate(140%);
        -webkit-backdrop-filter: blur(26px) saturate(140%);
    }
}

.tools-glass-shell nav[navbar-main] {
    border-color: rgba(255, 255, 255, 0.58);
    background: rgba(255, 255, 255, 0.76);
    backdrop-filter: blur(22px) saturate(140%);
    -webkit-backdrop-filter: blur(22px) saturate(140%);
}

.tools-glass-main {
    position: relative;
    z-index: 1;
}

.tools-glass-eyebrow {
    margin: 0;
    color: #475569;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.2;
    text-transform: uppercase;
}

.tools-glass-hero,
.tool-workbench-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(20rem, 0.85fr);
    gap: 1.25rem;
    align-items: stretch;
    margin-bottom: 1.5rem;
}

.tools-glass-hero__copy,
.tool-workbench-hero {
    border: 1px solid rgba(255, 255, 255, 0.62);
    border-radius: 8px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.52)),
        linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(244, 114, 182, 0.08));
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.1);
    backdrop-filter: blur(28px) saturate(150%);
    -webkit-backdrop-filter: blur(28px) saturate(150%);
}

.tools-glass-hero__copy {
    padding: clamp(1.25rem, 3vw, 2.5rem);
}

.tools-glass-hero__copy h1,
.tool-workbench-hero h1 {
    max-width: 46rem;
    margin: 0.65rem 0 0;
    color: #0f172a;
    font-size: clamp(2rem, 4vw, 4.25rem);
    font-weight: 800;
    letter-spacing: 0;
    line-height: 0.98;
}

.tools-glass-hero__copy p:not(.tools-glass-eyebrow),
.tool-workbench-hero p:not(.tools-glass-eyebrow) {
    max-width: 46rem;
    margin-top: 1rem;
    color: #475569;
    font-size: 1rem;
    line-height: 1.7;
}

.tools-glass-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: clamp(1.25rem, 3vw, 2rem);
}

.tools-glass-stats div {
    min-width: 0;
    padding: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.64);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.54);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.tools-glass-stats strong {
    display: block;
    color: #0f172a;
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1;
}

.tools-glass-stats span {
    display: block;
    margin-top: 0.35rem;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 700;
}

.tools-glass-hero__panel,
.tool-glass-panel {
    border: 1px solid rgba(255, 255, 255, 0.62);
    border-radius: 8px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.48)),
        rgba(255, 255, 255, 0.52);
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.1);
    backdrop-filter: blur(24px) saturate(150%);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
}

.tools-glass-hero__panel {
    padding: 1rem;
}

.tools-glass-panel-header,
.tool-glass-panel__header,
.tool-result-toolbar,
.tool-translate-panel {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
}

.tools-glass-panel-header h2,
.tools-glass-section-heading h2,
.tool-glass-panel__header h2,
.tool-result-toolbar h2,
.tool-translate-panel h3,
.speaking-sidebar-panel h2 {
    margin: 0.25rem 0 0;
    color: #0f172a;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0;
}

.tools-glass-pill,
.tools-glass-count {
    display: inline-flex;
    flex: none;
    gap: 0.4rem;
    align-items: center;
    min-height: 2rem;
    padding: 0.35rem 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 999px;
    color: #334155;
    background: rgba(255, 255, 255, 0.62);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
    font-size: 0.78rem;
    font-weight: 800;
    white-space: nowrap;
}

.tools-glass-popular-list {
    display: grid;
    gap: 0.65rem;
    margin-top: 1rem;
}

.tools-glass-popular-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.75rem;
    align-items: center;
    min-height: 4.25rem;
    padding: 0.8rem;
    border: 1px solid rgba(226, 232, 240, 0.72);
    border-radius: 8px;
    color: #0f172a;
    background: rgba(255, 255, 255, 0.52);
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.tools-glass-popular-item:hover,
.tools-glass-popular-item:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(14, 165, 233, 0.38);
    background: rgba(255, 255, 255, 0.76);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.1);
}

.tools-glass-popular-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    color: #0f172a;
    background: linear-gradient(135deg, rgba(125, 211, 252, 0.58), rgba(254, 215, 170, 0.68));
    font-size: 0.8rem;
    font-weight: 900;
}

.tools-glass-popular-meta {
    min-width: 0;
}

.tools-glass-popular-meta strong,
.tools-glass-popular-meta small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tools-glass-popular-meta strong {
    color: #0f172a;
    font-size: 0.92rem;
    font-weight: 800;
}

.tools-glass-popular-meta small {
    margin-top: 0.2rem;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 700;
}

.tools-glass-empty-state {
    display: grid;
    place-items: center;
    min-height: 12rem;
    padding: 1rem;
    color: #64748b;
    text-align: center;
}

.tools-glass-empty-state i {
    margin-bottom: 0.75rem;
    color: #0f172a;
    font-size: 1.5rem;
}

.tools-glass-empty-state p {
    margin: 0;
    color: #0f172a;
    font-weight: 800;
}

.tools-glass-empty-state span {
    margin-top: 0.35rem;
    font-size: 0.86rem;
}

.tools-glass-section {
    margin-top: 1.5rem;
}

.tools-glass-section-heading {
    display: flex;
    gap: 1rem;
    align-items: end;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.tools-glass-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.tools-glass-card {
    min-width: 0;
    height: 100%;
}

.tools-glass-card__link {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 17rem;
    overflow: hidden;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.66);
    border-radius: 8px;
    color: #0f172a;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0.42)),
        rgba(255, 255, 255, 0.54);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(24px) saturate(150%);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.tools-glass-card__link::before {
    position: absolute;
    inset: 0;
    pointer-events: none;
    content: "";
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.14), transparent 38%, rgba(245, 158, 11, 0.12));
    opacity: 0;
    transition: opacity 180ms ease;
}

.tools-glass-card__link:hover,
.tools-glass-card__link:focus-visible {
    transform: translateY(-4px);
    border-color: rgba(14, 165, 233, 0.36);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.58)),
        rgba(255, 255, 255, 0.7);
    box-shadow: 0 26px 70px rgba(15, 23, 42, 0.13);
    outline: none;
}

.tools-glass-card__link:hover::before,
.tools-glass-card__link:focus-visible::before {
    opacity: 1;
}

.tools-glass-card.is-highlighted .tools-glass-card__link {
    border-color: rgba(14, 165, 233, 0.42);
}

.tools-glass-card__topline,
.tools-glass-card__footer,
.speaking-choice-card__inner,
.speaking-part-card__content {
    display: flex;
    gap: 0.85rem;
    align-items: center;
}

.tools-glass-card__topline {
    position: relative;
    z-index: 1;
    justify-content: space-between;
    margin-bottom: 1.1rem;
}

.tools-glass-card__icon,
.tool-result-placeholder__icon,
.speaking-chat-header__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    color: #0f172a;
    background: linear-gradient(135deg, rgba(186, 230, 253, 0.72), rgba(254, 215, 170, 0.78));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82), 0 12px 30px rgba(15, 23, 42, 0.09);
}

.tools-glass-badge {
    display: inline-flex;
    align-items: center;
    min-height: 1.8rem;
    padding: 0.25rem 0.6rem;
    border: 1px solid rgba(14, 165, 233, 0.28);
    border-radius: 999px;
    color: #0369a1;
    background: rgba(224, 242, 254, 0.76);
    font-size: 0.74rem;
    font-weight: 900;
}

.tools-glass-card__content {
    position: relative;
    z-index: 1;
    flex: 1;
    min-width: 0;
}

.tools-glass-card__content p {
    margin: 0 0 0.55rem;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 800;
}

.tools-glass-card__content h3 {
    margin: 0;
    color: #0f172a;
    font-size: 1.02rem;
    font-weight: 850;
    letter-spacing: 0;
    line-height: 1.25;
}

.tools-glass-card__content span {
    display: -webkit-box;
    margin-top: 0.75rem;
    overflow: hidden;
    color: #475569;
    font-size: 0.9rem;
    line-height: 1.6;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
}

.tools-glass-card__footer {
    position: relative;
    z-index: 1;
    justify-content: space-between;
    margin-top: 1rem;
    padding-top: 0.9rem;
    border-top: 1px solid rgba(226, 232, 240, 0.72);
    color: #0f172a;
    font-size: 0.86rem;
    font-weight: 850;
}

.tools-glass-card__footer i,
.tools-glass-popular-item i {
    color: #0ea5e9;
}

.tool-workbench-hero {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    padding: clamp(1.1rem, 2.4vw, 1.75rem);
}

.tool-workbench-hero h1 {
    font-size: clamp(1.85rem, 3.2vw, 3.25rem);
}

.tool-workbench-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: flex-end;
}

.tool-glass-back-link,
.tool-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2.55rem;
    padding: 0.58rem 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 8px;
    color: #0f172a;
    background: rgba(255, 255, 255, 0.62);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 10px 24px rgba(15, 23, 42, 0.07);
    font-size: 0.86rem;
    font-weight: 850;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.tool-glass-back-link:hover,
.tool-glass-back-link:focus-visible,
.tool-action-button:hover,
.tool-action-button:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(14, 165, 233, 0.35);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.1);
    outline: none;
}

.tool-workbench-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(0, 1.38fr);
    gap: 1rem;
    align-items: start;
}

.tool-input-panel,
.tool-result-panel,
.tool-translate-panel,
.tool-glass-skeleton,
.speaking-glass-wizard,
.speaking-sidebar-panel {
    padding: 1rem;
}

.tool-glass-panel__header,
.tool-result-toolbar {
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(226, 232, 240, 0.72);
}

.tool-glass-form {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.tool-glass-field {
    min-width: 0;
}

.tool-glass-field__label {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.45rem;
}

.tool-glass-field__label label {
    color: #1e293b;
    font-size: 0.88rem;
    font-weight: 850;
}

.tool-glass-field__label span {
    color: #64748b;
    font-size: 0.76rem;
    font-weight: 800;
}

.tool-glass-input {
    border-color: rgba(203, 213, 225, 0.8) !important;
    border-radius: 8px !important;
    color: #0f172a !important;
    background: rgba(255, 255, 255, 0.68) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 10px 24px rgba(15, 23, 42, 0.04) !important;
}

.tool-glass-input:focus {
    border-color: rgba(14, 165, 233, 0.75) !important;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.13), inset 0 1px 0 rgba(255, 255, 255, 0.72) !important;
}

.tool-glass-file-input {
    display: block;
    width: 100%;
    min-height: 3.2rem;
    padding: 0.75rem;
    border: 1px dashed rgba(148, 163, 184, 0.86);
    border-radius: 8px;
    color: #475569;
    background: rgba(255, 255, 255, 0.58);
    font-size: 0.9rem;
}

.tool-glass-file-input::file-selector-button {
    margin-right: 0.8rem;
    padding: 0.55rem 0.75rem;
    border: 0;
    border-radius: 8px;
    color: #ffffff;
    background: #0f172a;
    font-weight: 800;
}

.tool-glass-file-preview {
    margin-top: 0.75rem;
    overflow: hidden;
    padding: 0.75rem;
    border: 1px solid rgba(226, 232, 240, 0.82);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.7);
}

.tool-glass-form__actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 0.25rem;
}

.tool-glass-submit {
    border: 0 !important;
    border-radius: 8px !important;
    background: linear-gradient(135deg, #0f172a, #155e75 52%, #0f766e) !important;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.18) !important;
}

.tool-glass-submit:hover,
.tool-glass-submit:focus-visible {
    background: linear-gradient(135deg, #111827, #0e7490 52%, #0d9488) !important;
}

.tool-result-placeholder {
    display: grid;
    place-items: center;
    min-height: 22rem;
    padding: 2rem;
    text-align: center;
}

.tool-result-placeholder__inner {
    max-width: 24rem;
}

.tool-result-placeholder__icon {
    margin: 0 auto 1rem;
}

.tool-result-placeholder h2,
.tool-result-placeholder p {
    margin: 0;
}

.tool-result-placeholder h2 {
    color: #0f172a;
    font-size: 1rem;
    font-weight: 850;
}

.tool-result-placeholder p {
    margin-top: 0.65rem;
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.65;
}

.tool-result-stack {
    display: grid;
    gap: 1rem;
}

.tool-result-actions,
.tool-translate-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

.tool-action-button.is-disabled,
.tool-translate-actions.is-disabled {
    pointer-events: none;
    opacity: 0.5;
}

.tool-export-menu {
    width: 10rem;
    margin-top: 0.5rem;
    padding: 0.5rem;
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.14);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.tool-result-content {
    padding: 1rem;
    color: #1e293b;
}

.tool-result-content :where(h1, h2, h3, h4) {
    color: #0f172a;
    letter-spacing: 0;
}

.tool-translate-panel {
    align-items: center;
}

.tool-glass-skeleton {
    display: grid;
    gap: 1rem;
}

.tool-glass-skeleton__header,
.tool-glass-skeleton__actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
}

.tool-glass-skeleton__body {
    display: grid;
    gap: 0.7rem;
    padding: 1rem;
    border: 1px solid rgba(226, 232, 240, 0.72);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.54);
}

.speaking-glass-hero {
    margin-bottom: 1rem;
}

.speaking-result-shell {
    padding: clamp(1rem, 2.4vw, 1.6rem);
    border: 1px solid rgba(255, 255, 255, 0.62);
    border-radius: 8px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.52)),
        linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(244, 114, 182, 0.08));
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.1);
    backdrop-filter: blur(28px) saturate(150%);
    -webkit-backdrop-filter: blur(28px) saturate(150%);
}

.speaking-glass-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 22rem;
    gap: 1rem;
    align-items: start;
}

.speaking-glass-progress {
    display: grid;
    grid-template-columns: auto minmax(2rem, 1fr) auto minmax(2rem, 1fr) auto;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 1.25rem;
}

.step-indicator {
    display: inline-flex;
    gap: 0.55rem;
    align-items: center;
    min-width: max-content;
    color: #64748b;
}

.step-indicator > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid rgba(203, 213, 225, 0.75);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.58);
    font-size: 0.78rem;
    font-weight: 900;
}

.step-indicator.active > span {
    border-color: rgba(14, 165, 233, 0.36);
    color: #0f172a;
    background: linear-gradient(135deg, rgba(186, 230, 253, 0.9), rgba(204, 251, 241, 0.8));
}

.indicator-label {
    color: inherit;
    font-size: 0.84rem;
    font-weight: 800;
}

.step-connector {
    height: 1px;
    background: linear-gradient(90deg, rgba(148, 163, 184, 0.18), rgba(14, 165, 233, 0.36), rgba(148, 163, 184, 0.18));
}

.speaking-glass-step-heading {
    margin-bottom: 1rem;
}

.speaking-glass-step-heading h2 {
    margin: 0.35rem 0 0;
    color: #0f172a;
    font-size: clamp(1.35rem, 2vw, 1.85rem);
    font-weight: 850;
    letter-spacing: 0;
}

.speaking-goal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.speaking-choice-card,
.speaking-part-card {
    width: 100%;
    min-width: 0;
    border: 1px solid rgba(226, 232, 240, 0.78);
    border-radius: 8px;
    color: #0f172a;
    background: rgba(255, 255, 255, 0.54);
    text-align: left;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.speaking-choice-card:hover,
.speaking-choice-card:focus-visible,
.speaking-part-card:hover,
.speaking-part-card:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(14, 165, 233, 0.36);
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.09);
    outline: none;
}

.speaking-choice-card__inner {
    padding: 1rem;
}

.speaking-choice-card__icon {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.65rem;
    height: 2.65rem;
    border-radius: 8px;
}

.speaking-choice-card h3,
.speaking-choice-card p,
.speaking-part-card h3,
.speaking-part-card p {
    margin: 0;
}

.speaking-choice-card h3,
.speaking-part-card h3 {
    color: #0f172a;
    font-size: 0.95rem;
    font-weight: 850;
    line-height: 1.3;
}

.speaking-choice-card p,
.speaking-part-card p {
    margin-top: 0.25rem;
    color: #64748b;
    font-size: 0.84rem;
    line-height: 1.5;
}

.speaking-format-note {
    margin-bottom: 1rem;
    padding: 0.85rem;
    border: 1px solid rgba(14, 165, 233, 0.22);
    border-radius: 8px;
    color: #075985;
    background: rgba(224, 242, 254, 0.56);
}

.speaking-format-note h3 {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin: 0;
    font-size: 0.9rem;
    font-weight: 850;
}

.speaking-format-note p {
    margin: 0.35rem 0 0;
    font-size: 0.84rem;
    line-height: 1.5;
}

.speaking-part-list {
    display: grid;
    gap: 0.75rem;
}

.speaking-part-card {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem;
}

.part-number {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 8px;
    color: #ffffff;
    background: linear-gradient(135deg, #0f172a, #155e75);
    font-size: 0.86rem;
    font-weight: 900;
}

.part-content {
    min-width: 0;
}

.speaking-back-button {
    display: inline-flex;
    gap: 0.35rem;
    align-items: center;
    margin-top: 1rem;
    color: #475569;
    font-size: 0.9rem;
    font-weight: 850;
}

.speaking-recorder-shell {
    display: flex;
    flex-direction: column;
    min-height: 32rem;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.72);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.42);
}

.speaking-chat-header {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid rgba(226, 232, 240, 0.72);
    background: rgba(255, 255, 255, 0.58);
}

.speaking-chat-header__identity {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    min-width: 0;
}

.speaking-chat-header h2,
.speaking-chat-header p {
    margin: 0;
}

.speaking-chat-header h2 {
    overflow: hidden;
    color: #0f172a;
    font-size: 0.98rem;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.speaking-chat-header p {
    margin-top: 0.2rem;
    overflow: hidden;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.speaking-chat-header__close {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 8px;
    color: #64748b;
    transition: color 160ms ease, background 160ms ease;
}

.speaking-chat-header__close:hover,
.speaking-chat-header__close:focus-visible {
    color: #0f172a;
    background: rgba(255, 255, 255, 0.76);
    outline: none;
}

.speaking-chat-history {
    flex: 1;
    min-height: 18rem;
    overflow-y: auto;
    padding: 1rem;
}

.speaking-question-list {
    display: grid;
    gap: 0.7rem;
}

.speaking-question-list h3 {
    margin: 0 0 0.15rem;
    color: #475569;
    font-size: 0.84rem;
    font-weight: 850;
}

.speaking-question-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.75rem;
    align-items: start;
    padding: 0.85rem;
    border: 1px solid rgba(226, 232, 240, 0.82);
    border-radius: 8px;
    color: #0f172a;
    background: rgba(255, 255, 255, 0.58);
    cursor: pointer;
    transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.speaking-question-card:hover {
    border-color: rgba(14, 165, 233, 0.36);
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
}

.speaking-question-card__radio {
    width: 1rem;
    height: 1rem;
    margin-top: 0.18rem;
    color: #0ea5e9;
    border-color: #94a3b8;
}

.speaking-question-card p {
    margin: 0;
    color: #1e293b;
    font-size: 0.9rem;
    font-weight: 750;
    line-height: 1.5;
}

.speaking-question-card__meta {
    display: flex;
    gap: 0.35rem;
    align-items: center;
    margin-top: 0.35rem;
    color: #64748b;
    font-size: 0.76rem;
    font-weight: 700;
}

.speaking-room-card {
    display: grid;
    gap: 1rem;
}

.speaking-room-card__header,
.speaking-room-card__footer {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    justify-content: space-between;
}

.speaking-room-card__header h3,
.speaking-room-card__header p,
.speaking-room-card__footer p,
.speaking-room-card__prompt p {
    margin: 0;
}

.speaking-room-card__header h3 {
    margin-top: 0.25rem;
    color: #0f172a;
    font-size: 1.1rem;
    font-weight: 850;
}

.speaking-room-card__header p:not(.tools-glass-eyebrow),
.speaking-room-card__footer p {
    margin-top: 0.35rem;
    color: #64748b;
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1.55;
}

.speaking-room-card__timer {
    flex: none;
    display: grid;
    gap: 0.35rem;
    min-width: 9.5rem;
    padding: 0.75rem;
    border: 1px solid rgba(226, 232, 240, 0.82);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.7);
}

.speaking-room-card__timer span,
.speaking-room-card__timer strong {
    display: block;
}

.speaking-room-card__timer span {
    color: #64748b;
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
}

.speaking-room-card__timer strong {
    color: #0f172a;
    font-size: 0.88rem;
    font-weight: 900;
}

.speaking-room-card__prompt {
    padding: 1rem;
    border: 1px solid rgba(14, 165, 233, 0.22);
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(224, 242, 254, 0.72), rgba(240, 253, 250, 0.68));
}

.speaking-room-card__prompt p {
    color: #0f172a;
    font-size: clamp(1rem, 1.6vw, 1.25rem);
    font-weight: 850;
    line-height: 1.55;
}

.speaking-room-card__prep {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.speaking-room-card__prep > div {
    padding: 0.8rem;
    border: 1px solid rgba(226, 232, 240, 0.82);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.58);
}

.speaking-room-card__prep span,
.speaking-room-card__prep strong {
    display: block;
}

.speaking-room-card__prep span {
    color: #64748b;
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
}

.speaking-room-card__prep strong {
    margin-top: 0.2rem;
    color: #0f172a;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 1.05rem;
    font-weight: 900;
}

.speaking-room-card__prep.is-active > div:first-child {
    border-color: rgba(245, 158, 11, 0.32);
    background: rgba(254, 243, 199, 0.72);
}

.speaking-random-button {
    flex: none;
    display: inline-flex;
    gap: 0.45rem;
    align-items: center;
    justify-content: center;
    min-height: 2.35rem;
    padding: 0.55rem 0.75rem;
    border: 1px solid rgba(203, 213, 225, 0.82);
    border-radius: 8px;
    color: #0f172a;
    background: rgba(255, 255, 255, 0.74);
    font-size: 0.84rem;
    font-weight: 850;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.speaking-random-button:hover,
.speaking-random-button:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(14, 165, 233, 0.36);
    background: rgba(255, 255, 255, 0.9);
    outline: none;
}

.speaking-empty-state,
.speaking-inline-error,
.speaking-processing-state {
    display: grid;
    place-items: center;
    min-height: 12rem;
    padding: 1rem;
    color: #64748b;
    text-align: center;
}

.speaking-empty-state svg {
    color: #94a3b8;
}

.speaking-empty-state p,
.speaking-processing-state p {
    margin: 0.65rem 0 0;
    color: #475569;
    font-size: 0.9rem;
    font-weight: 800;
}

.speaking-inline-error {
    min-height: 6rem;
    color: #b91c1c;
    background: rgba(254, 226, 226, 0.62);
    border: 1px solid rgba(248, 113, 113, 0.28);
    border-radius: 8px;
}

.speaking-processing-state {
    min-height: 24rem;
}

.speaking-progress-card {
    display: grid;
    gap: 1rem;
    justify-items: center;
    width: min(100%, 28rem);
}

.speaking-progress-ring {
    display: grid;
    place-items: center;
    width: 6.5rem;
    height: 6.5rem;
    border-radius: 999px;
    color: #0f172a;
    background:
        radial-gradient(circle at center, rgba(255, 255, 255, 0.96) 0 56%, transparent 57%),
        conic-gradient(from 0deg, rgba(14, 165, 233, 0.9), rgba(20, 184, 166, 0.9), rgba(244, 114, 182, 0.55), rgba(14, 165, 233, 0.9));
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.12);
    animation: speaking-progress-spin 2.4s linear infinite;
}

.speaking-progress-ring span {
    font-size: 1.15rem;
    font-weight: 900;
    animation: speaking-progress-counter-spin 2.4s linear infinite;
}

.speaking-progress-copy {
    width: 100%;
}

.speaking-progress-copy p,
.speaking-progress-copy span {
    display: block;
    margin: 0;
    text-align: center;
}

.speaking-progress-copy p {
    color: #0f172a;
    font-size: 1rem;
    font-weight: 850;
}

.speaking-progress-copy span {
    margin-top: 0.65rem;
    color: #64748b;
    font-size: 0.86rem;
    font-weight: 750;
}

.speaking-progress-track {
    overflow: hidden;
    height: 0.7rem;
    margin-top: 0.9rem;
    border: 1px solid rgba(226, 232, 240, 0.86);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.06);
}

.speaking-progress-track div {
    width: 8%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #0ea5e9, #14b8a6, #22c55e);
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.24);
    transition: width 480ms ease;
}

@keyframes speaking-progress-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes speaking-progress-counter-spin {
    to {
        transform: rotate(-360deg);
    }
}

.speaking-recording-dock {
    position: sticky;
    bottom: 0;
    z-index: 5;
    padding: 0.9rem;
    border-top: 1px solid rgba(186, 230, 253, 0.7);
    background:
        radial-gradient(circle at 50% 0%, rgba(56, 189, 248, 0.14), transparent 54%),
        rgba(248, 250, 252, 0.9);
    backdrop-filter: blur(22px) saturate(150%);
    -webkit-backdrop-filter: blur(22px) saturate(150%);
}

.speaking-recording-dock__inner {
    position: relative;
    display: grid;
    grid-template-columns: minmax(4.5rem, 0.75fr) minmax(16rem, 2fr) auto;
    gap: 0.85rem 0.8rem;
    align-items: center;
    max-width: 52rem;
    margin: 0 auto;
    padding: 0.9rem 1rem;
    overflow: hidden;
    border: 1px solid rgba(186, 230, 253, 0.8);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.84);
    box-shadow: 0 18px 48px rgba(14, 116, 144, 0.12), inset 0 1px 0 #ffffff;
}

.speaking-recording-dock__inner::before {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(105deg, transparent 28%, rgba(255, 255, 255, 0.72) 48%, transparent 68%);
    content: "";
    opacity: 0.45;
    transform: translateX(-100%);
    animation: speaking-ai-shimmer 5s ease-in-out infinite;
}

.speaking-recording-dock__header {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 0.55rem;
    align-items: center;
    grid-column: 1 / -1;
    justify-content: space-between;
}

.speaking-ai-badge,
.speaking-privacy-note,
.speaking-record-button-label {
    display: inline-flex;
    gap: 0.4rem;
    align-items: center;
    color: #0369a1;
    font-size: 0.7rem;
    font-weight: 850;
    letter-spacing: 0.025em;
}

.speaking-ai-badge {
    padding: 0.32rem 0.58rem;
    border: 1px solid rgba(125, 211, 252, 0.62);
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(224, 242, 254, 0.95), rgba(204, 251, 241, 0.82));
}

.speaking-privacy-note {
    color: #64748b;
    font-size: 0.66rem;
}

.speaking-visualizer {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    height: 3.6rem;
    gap: 0.24rem;
}

.speaking-visualizer .bar {
    width: 0.28rem;
    min-height: 0.3rem;
    border-radius: 999px;
    background: linear-gradient(180deg, #38bdf8, #0d9488);
    box-shadow: 0 0 14px rgba(14, 165, 233, 0.18);
    opacity: 0.62;
    transform: scaleY(0.28);
    transform-origin: center;
    transition: opacity 180ms ease;
}

.speaking-recording-dock[data-state="recording"] .speaking-visualizer .bar {
    opacity: 1;
    will-change: transform;
    animation: speaking-visualizer-pulse 720ms ease-in-out infinite alternate;
}

.speaking-recording-dock[data-state="recording"] .speaking-visualizer .bar:nth-child(3n + 2) {
    animation-duration: 560ms;
    animation-delay: -180ms;
}

.speaking-recording-dock[data-state="recording"] .speaking-visualizer .bar:nth-child(3n) {
    animation-duration: 880ms;
    animation-delay: -360ms;
}

@keyframes speaking-visualizer-pulse {
    to {
        transform: scaleY(1);
    }
}

.speaking-recording-action {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 0.85rem;
    align-items: center;
    min-width: 16rem;
}

.speaking-record-button-wrap {
    position: relative;
    display: inline-flex;
    flex: none;
}

.pulse-ring {
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: 999px;
    background: rgba(248, 113, 113, 0.3);
    opacity: 0;
}

.pulse-ring.opacity-0 {
    opacity: 0;
}

.pulse-ring.opacity-75 {
    opacity: 0.75;
}

.pulse-ring.animate-ping {
    animation: speaking-ping 1.4s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes speaking-ping {
    75%, 100% {
        transform: scale(1.85);
        opacity: 0;
    }
}

.speaking-record-button {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.85rem;
    height: 3.85rem;
    border: 5px solid rgba(255, 255, 255, 0.92);
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(145deg, #f43f5e, #be123c);
    box-shadow: 0 12px 28px rgba(190, 18, 60, 0.27), 0 0 0 1px rgba(190, 18, 60, 0.12);
    transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.speaking-record-button:hover,
.speaking-record-button:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 22px 42px rgba(190, 18, 60, 0.32);
    outline: none;
}

.speaking-recording-dock[data-state="recording"] .speaking-record-button {
    background: linear-gradient(145deg, #fb7185, #e11d48);
    box-shadow: 0 15px 34px rgba(225, 29, 72, 0.38), 0 0 0 5px rgba(254, 205, 211, 0.6);
}

.speaking-recording-dock[data-state="processing"] .speaking-record-button {
    background: linear-gradient(145deg, #38bdf8, #0d9488);
    box-shadow: 0 15px 34px rgba(13, 148, 136, 0.26);
}

.speaking-record-button.is-disabled,
.speaking-record-button:disabled {
    cursor: not-allowed;
    filter: grayscale(0.4);
    opacity: 0.55;
    transform: none;
    box-shadow: none;
}

.speaking-recording-copy {
    display: grid;
    gap: 0.2rem;
    min-width: 0;
}

.speaking-recording-copy strong {
    color: #0f172a;
    font-size: 0.9rem;
    font-weight: 900;
    line-height: 1.2;
}

.speaking-recording-copy span {
    max-width: 18rem;
    color: #64748b;
    font-size: 0.73rem;
    font-weight: 650;
    line-height: 1.35;
}

.speaking-recording-footer {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    color: #475569;
    font-size: 0.86rem;
    font-weight: 800;
}

.speaking-recording-footer .hidden {
    display: none;
}

.speaking-record-button-label i {
    color: #f43f5e;
    font-size: 0.48rem;
}

.speaking-recording-dock[data-state="recording"] .speaking-record-button-label i {
    animation: speaking-status-pulse 1s ease-in-out infinite;
}

.timer-display {
    display: inline-flex;
    align-items: center;
    min-height: 1.65rem;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    color: #0f172a;
    background: rgba(241, 245, 249, 0.9);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.75rem;
    font-weight: 850;
}

@keyframes speaking-ai-shimmer {
    0%, 60% { transform: translateX(-100%); }
    82%, 100% { transform: translateX(100%); }
}

@keyframes speaking-status-pulse {
    50% { opacity: 0.35; transform: scale(0.75); }
}

.speaking-glass-sidebar {
    display: grid;
    gap: 1rem;
    align-self: start;
}

@media (min-width: 1024px) {
    .speaking-glass-sidebar {
        position: sticky;
        top: 5rem;
    }
}

.speaking-criteria-list,
.speaking-band-list {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
}

.speaking-criteria-item {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    padding: 0.78rem;
    border: 1px solid rgba(226, 232, 240, 0.72);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.52);
}

.speaking-criteria-item span {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 8px;
    color: #0f766e;
    background: rgba(204, 251, 241, 0.72);
}

.speaking-criteria-item strong {
    color: #334155;
    font-size: 0.84rem;
    font-weight: 800;
    line-height: 1.35;
}

.speaking-band-item > div:first-child {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
    color: #64748b;
    font-size: 0.84rem;
    font-weight: 750;
}

.speaking-band-item > div:first-child span:first-child {
    color: #0f172a;
    font-weight: 900;
}

.speaking-band-meter {
    height: 0.45rem;
    margin-top: 0.45rem;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.82);
}

.speaking-band-meter div {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #0ea5e9, #14b8a6, #f59e0b);
}

@media (max-width: 1023px) {
    .tools-glass-hero,
    .tool-workbench-hero,
    .tool-workbench-grid,
    .speaking-glass-layout {
        grid-template-columns: 1fr;
    }

    .tools-glass-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tool-workbench-hero {
        align-items: start;
    }

    .speaking-glass-layout {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 767px) {
    .tools-glass-main {
        padding-top: 1rem;
    }

    .tools-glass-hero__copy,
    .tool-workbench-hero,
    .tools-glass-hero__panel,
    .tool-input-panel,
    .tool-result-panel,
    .tool-translate-panel,
    .tool-glass-skeleton,
    .speaking-glass-wizard,
    .speaking-sidebar-panel {
        padding: 0.9rem;
    }

    .tools-glass-grid,
    .speaking-goal-grid {
        grid-template-columns: 1fr;
    }

    .speaking-recording-dock {
        width: 100%;
        padding: 0.65rem;
        box-sizing: border-box;
    }

    .speaking-recording-dock__inner {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.65rem;
        width: 100%;
        max-width: 100%;
        padding: 0.75rem;
        border-radius: 15px;
        box-sizing: border-box;
    }

    .speaking-visualizer {
        display: none;
    }

    .speaking-recording-dock[data-state="recording"] .speaking-visualizer .bar {
        animation: none;
    }

    .speaking-recording-action {
        width: 100%;
        min-width: 0;
    }

    .speaking-recording-copy span {
        max-width: none;
    }

    .speaking-recording-footer {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .tools-glass-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.5rem;
        margin-top: 1rem;
    }

    .tools-glass-stats div {
        padding: 0.65rem 0.5rem;
    }

    .tools-glass-stats strong {
        font-size: 1.05rem;
    }

    .tools-glass-stats span {
        font-size: 0.7rem;
    }

    .tools-glass-hero__copy h1 {
        font-size: 2rem;
        line-height: 1.05;
    }

    .tools-glass-hero__copy p:not(.tools-glass-eyebrow) {
        margin-top: 0.75rem;
        line-height: 1.55;
    }

    .tools-glass-popular-item {
        min-height: 3.6rem;
        padding: 0.65rem;
    }

    .tools-glass-section-heading,
    .tools-glass-panel-header,
    .tool-glass-panel__header,
    .tool-result-toolbar,
    .tool-translate-panel {
        align-items: flex-start;
        flex-direction: column;
    }

    .tool-workbench-hero__actions,
    .tool-result-actions,
    .tool-translate-actions,
    .tool-action-button,
    .tool-glass-back-link {
        width: 100%;
    }

    .speaking-glass-progress {
        grid-template-columns: 1fr;
        gap: 0.65rem;
    }

    .step-connector {
        display: none;
    }

    .speaking-part-card {
        align-items: flex-start;
    }

    .speaking-room-card__header,
    .speaking-room-card__footer {
        flex-direction: column;
    }

    .speaking-room-card__timer,
    .speaking-random-button {
        width: 100%;
    }

    .speaking-recorder-shell {
        min-height: 30rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .speaking-recording-dock__inner::before,
    .speaking-recording-dock[data-state="recording"] .speaking-visualizer .bar,
    .speaking-recording-dock[data-state="recording"] .speaking-record-button-label i,
    .pulse-ring.animate-ping {
        animation: none;
    }
}

/* IELTS-first discovery and writing feedback */
.tools-glass-hero--focused {
    grid-template-columns: minmax(0, 1.15fr) minmax(19rem, 0.85fr);
}

.tools-glass-practice-steps {
    display: grid;
    gap: 0.7rem;
    margin: 1rem 0 0;
    padding: 0;
    list-style: none;
}

.tools-glass-practice-steps li {
    display: flex;
    gap: 0.65rem;
    align-items: center;
    min-height: 2.65rem;
    padding: 0.55rem 0.7rem;
    border: 1px solid rgba(226, 232, 240, 0.72);
    border-radius: 8px;
    color: #475569;
    background: rgba(255, 255, 255, 0.42);
    font-size: 0.86rem;
    font-weight: 750;
}

.tools-glass-practice-steps span {
    display: inline-flex;
    flex: 0 0 auto;
    width: 1.55rem;
    height: 1.55rem;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #0f172a;
    background: linear-gradient(135deg, rgba(125, 211, 252, 0.72), rgba(254, 215, 170, 0.78));
    font-size: 0.72rem;
    font-weight: 900;
}

/* Jump nav on the tools index. Replaces the old three-step explainer panel:
   every tool group is rendered on the page, so the panel's job is now getting
   you to the right group rather than describing the workflow. */

.tools-glass-jump {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 1rem;
}

.tools-glass-jump a {
    display: inline-flex;
    gap: 0.45rem;
    align-items: center;
    padding: 0.4rem 0.7rem;
    border: 1px solid rgba(226, 232, 240, 0.72);
    border-radius: 999px;
    color: #475569;
    background: rgba(255, 255, 255, 0.42);
    font-size: 0.8rem;
    font-weight: 750;
    text-decoration: none;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.tools-glass-jump a:hover {
    border-color: rgba(59, 130, 246, 0.55);
    color: #1d4ed8;
}

.tools-glass-jump a span {
    display: inline-flex;
    min-width: 1.35rem;
    height: 1.35rem;
    padding: 0 0.3rem;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #0f172a;
    background: linear-gradient(135deg, rgba(125, 211, 252, 0.72), rgba(254, 215, 170, 0.78));
    font-size: 0.7rem;
    font-weight: 900;
}

.dark .tools-glass-jump a {
    border-color: rgba(51, 65, 85, 0.65);
    color: #94a3b8;
    background: rgba(15, 23, 42, 0.5);
}

.dark .tools-glass-jump a:hover {
    border-color: rgba(96, 165, 250, 0.6);
    color: #93c5fd;
}

/* Group headings sit under a sticky topbar, so an anchor jump needs clearance
   or the heading lands behind it. */
.tools-glass-section[id] {
    scroll-margin-top: 5rem;
}

.tools-glass-facts {
    display: grid;
    gap: 0.55rem;
    margin: 1rem 0 0;
    padding: 0;
    list-style: none;
}

.tools-glass-facts li {
    display: flex;
    gap: 0.65rem;
    align-items: center;
    min-height: 2.45rem;
    padding: 0.5rem 0.7rem;
    border: 1px solid rgba(226, 232, 240, 0.72);
    border-radius: 8px;
    color: #475569;
    background: rgba(255, 255, 255, 0.42);
    font-size: 0.84rem;
    font-weight: 700;
}

.tools-glass-facts li > span {
    display: inline-flex;
    flex: 0 0 auto;
    min-width: 1.9rem;
    height: 1.55rem;
    padding: 0 0.35rem;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #0f172a;
    background: linear-gradient(135deg, rgba(125, 211, 252, 0.72), rgba(254, 215, 170, 0.78));
    font-size: 0.76rem;
    font-weight: 900;
}

.dark .tools-glass-facts li {
    border-color: rgba(51, 65, 85, 0.65);
    color: #94a3b8;
    background: rgba(15, 23, 42, 0.5);
}

.tools-glass-feedback-link {
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
    margin-top: 1rem;
    color: #0f172a;
    font-size: 0.86rem;
    font-weight: 850;
}

.tools-glass-feedback-link i {
    color: #0ea5e9;
}

.tools-glass-secondary-tools {
    margin-top: 3.5rem;
    padding-top: 2.5rem;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.tool-ielts-guidance {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(17rem, 0.85fr);
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: clamp(1rem, 2.5vw, 1.5rem);
    border: 1px solid rgba(14, 165, 233, 0.28);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(224, 242, 254, 0.68), rgba(255, 247, 237, 0.58)),
        rgba(255, 255, 255, 0.6);
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

.tool-ielts-guidance h2 {
    margin: 0.4rem 0 0;
    color: #0f172a;
    font-size: clamp(1.2rem, 2vw, 1.55rem);
    font-weight: 850;
    letter-spacing: 0;
    line-height: 1.2;
}

.tool-ielts-guidance p:not(.tools-glass-eyebrow) {
    max-width: 44rem;
    margin: 0.65rem 0 0;
    color: #475569;
    font-size: 0.93rem;
    line-height: 1.62;
}

.tool-ielts-guidance ul {
    display: grid;
    gap: 0.65rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tool-ielts-guidance li {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
    color: #334155;
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1.45;
}

.tool-ielts-guidance li i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 999px;
    color: #0f766e;
    background: rgba(204, 251, 241, 0.82);
    font-size: 0.65rem;
}

@media (max-width: 767px) {
    .tools-glass-hero--focused,
    .tool-ielts-guidance {
        grid-template-columns: 1fr;
    }

    .tools-glass-hero--focused .tools-glass-hero__panel {
        display: none;
    }

    .tool-ielts-guidance {
        gap: 1.15rem;
        padding: 1rem;
    }
}

/* ==========================================================================
   Global dark theme
   Toggled by a `dark` class on <html> (see theme_controller.js). Mirrors
   every "glass" component above with the same structure/shadows/blur,
   substituting a consistent dark-slate palette for the light one:
     surfaces  rgba(255,255,255,X) -> rgba(30,41,59,X) / rgba(51,65,85,X)
     tints     rgba(248,250,252,X) -> rgba(15,23,42,X)
     borders   rgba(226,232,240,X) / rgba(203,213,225,X) -> rgba(51,65,85,0.7)
     text      #0f172a -> #f1f5f9   #1e293b -> #e2e8f0   #334155 -> #cbd5e1
               #475569 -> #94a3b8   #64748b -> #94a3b8
     accents   sky/teal/amber/rose/emerald 50-100 tints -> matching 900-ish
                tints with 300-ish text, same hue
   Box-shadows and backdrop-filter blur/saturate are left as-is; they still
   read correctly against a dark surface.
   ========================================================================== */

.dark body {
    background-color: #020617;
}

/* dashboard/soft-ui-dashboard-tailwind.css sets a plain, unlayered
   `h1, h2, h3, h4, h5, h6 { color: #344767; }` rule. Because Tailwind's own
   utilities live inside `@layer utilities`, this unlayered vendor rule wins
   over every `dark:text-*` utility applied to a heading tag regardless of
   specificity (unlayered CSS always beats layered CSS). Override it directly
   with higher specificity so headings actually turn light in dark mode. */
.dark h1,
.dark h2,
.dark h3,
.dark h4,
.dark h5,
.dark h6 {
    color: #f1f5f9;
}

/* Tailwind v4's `dark:bg-white/80` / `dark:bg-slate-50/70` fractional-opacity
   variants aren't winning the cascade against their light-mode `bg-white/80`
   counterpart under this custom `dark` variant (unlike whole-value variants
   such as `dark:bg-white`, which apply correctly). Cover them directly here
   instead; being unlayered, this reliably wins regardless. */
.dark .bg-white\/80 {
    background-color: rgba(15, 23, 42, 0.8);
}

.dark .bg-white\/90 {
    background-color: rgba(15, 23, 42, 0.9);
}

.dark .bg-slate-50\/70 {
    background-color: rgba(15, 23, 42, 0.7);
}

/* Same cascade quirk affects `hidden`/`dark:block` display toggling, so the
   light/dark logo swap uses dedicated, unlayered classes instead. */
.logo-light {
    display: inline-block;
}

.logo-dark {
    display: none;
}

.dark .logo-light {
    display: none;
}

.dark .logo-dark {
    display: inline-block;
}

.dark .dashboard-glass-shell,
.dark .tools-glass-shell,
.dark .auth-glass-shell {
    color: #f1f5f9;
    background:
        linear-gradient(135deg, rgba(2, 6, 23, 0.97) 0%, rgba(15, 23, 42, 0.95) 46%, rgba(15, 23, 42, 0.92) 100%),
        linear-gradient(180deg, #020617 0%, #0f172a 100%);
}

.dark .dashboard-glass-shell::before,
.dark .tools-glass-shell::before {
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.05) 1px, transparent 1px);
}

.dark .dashboard-glass-shell aside,
.dark .tools-glass-shell aside {
    border-color: rgb(51, 65, 85);
    background: #0f172a;
}

@media (min-width: 1280px) {
    .dark .dashboard-glass-shell aside,
    .dark .tools-glass-shell aside {
        border-color: rgba(51, 65, 85, 0.6);
        background: rgba(15, 23, 42, 0.82);
    }
}

.dark .dashboard-glass-shell nav[navbar-main],
.dark .tools-glass-shell nav[navbar-main] {
    border-color: rgba(51, 65, 85, 0.6);
    background: rgba(15, 23, 42, 0.86);
}

.dark .dashboard-nav-link {
    color: #94a3b8;
}

.dark .dashboard-nav-link:hover,
.dark .dashboard-nav-link:focus-visible {
    border-color: rgba(51, 65, 85, 0.7);
    color: #f1f5f9;
    background: rgba(51, 65, 85, 0.5);
}

.dark .dashboard-nav-link.is-active {
    border-color: rgba(56, 189, 248, 0.4);
    color: #f1f5f9;
    background: linear-gradient(135deg, rgba(14, 116, 144, 0.45), rgba(15, 118, 110, 0.38));
}

.dark .dashboard-nav-link.text-red-600 {
    color: #fca5a5;
}

.dark .dashboard-nav-link.text-red-600:hover,
.dark .dashboard-nav-link.text-red-600:focus-visible {
    border-color: rgba(248, 113, 113, 0.3);
    color: #fecaca;
    background: rgba(127, 29, 29, 0.35);
}

.dark .theme-switch__track {
    background: rgba(71, 85, 105, 0.65);
}

/* The big "glass card" family: same surface treatment everywhere it appears. */
.dark .dashboard-glass-panel,
.dark .dashboard-page-header,
.dark .tool-glass-panel,
.dark .tools-glass-hero__panel,
.dark .tools-glass-hero__copy,
.dark .tool-workbench-hero,
.dark .tools-glass-card__link,
.dark .auth-glass-card,
.dark .glass-flash,
.dark .dashboard-loader-card,
.dark .speaking-result-shell,
.dark .tool-export-menu,
.dark .tool-glass-skeleton__body,
.dark .tools-glass-stats div {
    border-color: rgba(51, 65, 85, 0.65);
    background:
        linear-gradient(145deg, rgba(30, 41, 59, 0.85), rgba(15, 23, 42, 0.7)),
        rgba(15, 23, 42, 0.6);
}

.dark .tools-glass-card__link:hover,
.dark .tools-glass-card__link:focus-visible,
.dark .tools-glass-popular-item:hover,
.dark .tools-glass-popular-item:focus-visible {
    border-color: rgba(56, 189, 248, 0.4);
    background:
        linear-gradient(145deg, rgba(51, 65, 85, 0.85), rgba(30, 41, 59, 0.75)),
        rgba(30, 41, 59, 0.75);
}

.dark .dashboard-page-header__eyebrow,
.dark .tools-glass-eyebrow,
.dark .speaking-question-list h3 {
    color: #94a3b8;
}

.dark .dashboard-page-header h1,
.dark .dashboard-page-header__copy h1,
.dark .tools-glass-hero__copy h1,
.dark .tool-workbench-hero h1,
.dark .tools-glass-stats strong,
.dark .tools-glass-popular-meta strong,
.dark .tools-glass-card__content h3,
.dark .tools-glass-card__footer,
.dark .tools-glass-empty-state i,
.dark .tools-glass-empty-state p,
.dark .tools-glass-panel-header h2,
.dark .tools-glass-section-heading h2,
.dark .tool-glass-panel__header h2,
.dark .tool-result-toolbar h2,
.dark .tool-translate-panel h3,
.dark .speaking-sidebar-panel h2,
.dark .tools-glass-popular-meta,
.dark .speaking-glass-step-heading h2,
.dark .speaking-choice-card h3,
.dark .speaking-part-card h3,
.dark .speaking-chat-header h2,
.dark .speaking-room-card__header h3,
.dark .speaking-room-card__timer strong,
.dark .speaking-room-card__prompt p,
.dark .speaking-room-card__prep strong,
.dark .speaking-progress-ring,
.dark .speaking-progress-copy p,
.dark .speaking-recording-copy strong,
.dark .timer-display,
.dark .speaking-band-item > div:first-child span:first-child,
.dark .tool-result-content :where(h1, h2, h3, h4),
.dark .tool-result-placeholder h2,
.dark .tools-glass-feedback-link,
.dark .tool-ielts-guidance h2,
.dark .profile-glass-list strong,
.dark .glass-flash__icon,
.dark .auth-glass-brand h1,
.dark .profile-glass-hero h1 {
    color: #f1f5f9;
}

.dark .dashboard-page-header p:not(.dashboard-page-header__eyebrow),
.dark .tools-glass-hero__copy p:not(.tools-glass-eyebrow),
.dark .tool-workbench-hero p:not(.tools-glass-eyebrow),
.dark .tools-glass-stats span,
.dark .tools-glass-popular-meta small,
.dark .tools-glass-card__content p,
.dark .tools-glass-empty-state,
.dark .tools-glass-empty-state span,
.dark .speaking-choice-card p,
.dark .speaking-part-card p,
.dark .speaking-back-button,
.dark .speaking-chat-header p,
.dark .speaking-chat-header__close,
.dark .speaking-room-card__header p:not(.tools-glass-eyebrow),
.dark .speaking-room-card__footer p,
.dark .speaking-room-card__timer span,
.dark .speaking-room-card__prep span,
.dark .speaking-empty-state,
.dark .speaking-empty-state p,
.dark .speaking-processing-state p,
.dark .speaking-progress-copy span,
.dark .speaking-recording-copy span,
.dark .speaking-recording-footer,
.dark .speaking-criteria-item strong,
.dark .speaking-band-item > div:first-child,
.dark .tool-result-placeholder p,
.dark .tool-glass-field__label span,
.dark .tool-ielts-guidance p:not(.tools-glass-eyebrow),
.dark .tools-glass-practice-steps li,
.dark .profile-glass-list span,
.dark .glass-flash__message,
.dark .tools-glass-card__content span,
.dark .auth-glass-brand p,
.dark .profile-glass-hero p,
.dark .step-indicator {
    color: #94a3b8;
}

.dark .tool-glass-field__label label,
.dark .auth-glass-field label,
.dark .speaking-question-card p {
    color: #e2e8f0;
}

.dark .speaking-chat-header__close:hover,
.dark .speaking-chat-header__close:focus-visible {
    color: #f1f5f9;
    background: rgba(51, 65, 85, 0.6);
}

/* Inputs */
.dark .dashboard-glass-input,
.dark .auth-glass-input,
.dark .tool-glass-input {
    border-color: rgba(71, 85, 105, 0.75) !important;
    color: #f1f5f9 !important;
    background: rgba(15, 23, 42, 0.65) !important;
}

.dark .dashboard-glass-shell input[type="file"],
.dark .tool-glass-file-input {
    color: #94a3b8 !important;
    background: rgba(15, 23, 42, 0.55) !important;
    border-color: rgba(100, 116, 139, 0.6) !important;
}

.dark .form-input,
.dark .form-textarea,
.dark .form-select,
.dark .file-input {
    color: #f1f5f9;
    background-color: #0f172a;
    border-color: #334155;
}

.dark .auth-glass-divider {
    color: #94a3b8;
}

.dark .auth-glass-divider::before,
.dark .auth-glass-divider::after {
    background: rgba(71, 85, 105, 0.6);
}

/* Secondary buttons / pills / badges */
.dark .dashboard-glass-button-secondary,
.dark .tool-glass-back-link,
.dark .tool-action-button,
.dark .speaking-random-button,
.dark .tools-glass-pill,
.dark .tools-glass-count {
    border-color: rgba(71, 85, 105, 0.75);
    color: #f1f5f9;
    background: rgba(30, 41, 59, 0.65);
}

.dark .dashboard-glass-button-secondary:hover,
.dark .dashboard-glass-button-secondary:focus-visible,
.dark .tool-glass-back-link:hover,
.dark .tool-glass-back-link:focus-visible,
.dark .tool-action-button:hover,
.dark .tool-action-button:focus-visible,
.dark .speaking-random-button:hover,
.dark .speaking-random-button:focus-visible {
    border-color: rgba(56, 189, 248, 0.4);
    color: #f1f5f9;
    background: rgba(51, 65, 85, 0.8);
}

.dark .dashboard-glass-button-secondary.text-red-600,
.dark .dashboard-glass-button-secondary.hover\:text-red-700 {
    color: #fca5a5;
}

.dark .dashboard-glass-button-secondary.text-yellow-600 {
    color: #fcd34d;
}

/* Tables */
.dark .dashboard-glass-shell table {
    color: #cbd5e1;
}

.dark .dashboard-glass-shell thead,
.dark .dashboard-glass-shell thead.bg-slate-50 {
    background: rgba(15, 23, 42, 0.65) !important;
}

.dark .dashboard-glass-shell tbody,
.dark .dashboard-glass-shell tbody.bg-white {
    background: rgba(15, 23, 42, 0.4) !important;
}

.dark .dashboard-glass-shell tr,
.dark .dashboard-glass-shell td {
    border-color: rgba(51, 65, 85, 0.7);
}

.dark .dashboard-glass-shell tr.hover\:bg-slate-50:hover,
.dark .dashboard-glass-shell tr:hover {
    background: rgba(51, 65, 85, 0.45) !important;
}

.dark .dashboard-glass-shell th {
    color: #94a3b8 !important;
}

.dark .dashboard-glass-shell .bg-white:not(aside),
.dark .dashboard-glass-shell header.bg-white,
.dark .dashboard-glass-shell footer.bg-white {
    background-color: rgba(15, 23, 42, 0.55) !important;
}

.dark .dashboard-glass-shell .bg-slate-50,
.dark .dashboard-glass-shell .bg-slate-50\/70 {
    background-color: rgba(15, 23, 42, 0.45) !important;
}

.dark .dashboard-glass-shell .border-slate-100,
.dark .dashboard-glass-shell .border-slate-200,
.dark .dashboard-glass-shell .divide-slate-100 > :not([hidden]) ~ :not([hidden]),
.dark .dashboard-glass-shell .divide-slate-200 > :not([hidden]) ~ :not([hidden]) {
    border-color: rgba(51, 65, 85, 0.7) !important;
}

.dark .dashboard-glass-shell #message_content,
.dark .dashboard-glass-shell [data-file-preview-target="preview"] {
    border-color: rgba(51, 65, 85, 0.7) !important;
    background: rgba(15, 23, 42, 0.6) !important;
}

/* Secondary "raised" surfaces: list rows, meters, timers, small chips. */
.dark .profile-glass-list div,
.dark .tools-glass-popular-item,
.dark .speaking-choice-card,
.dark .speaking-part-card,
.dark .speaking-criteria-item,
.dark .speaking-recorder-shell,
.dark .speaking-question-card,
.dark .speaking-room-card__timer,
.dark .speaking-room-card__prep > div,
.dark .speaking-progress-track,
.dark .step-indicator > span,
.dark .tools-glass-practice-steps li,
.dark .speaking-band-meter {
    border-color: rgba(51, 65, 85, 0.65);
    background: rgba(15, 23, 42, 0.5);
}

.dark .speaking-choice-card:hover,
.dark .speaking-choice-card:focus-visible,
.dark .speaking-part-card:hover,
.dark .speaking-part-card:focus-visible,
.dark .speaking-question-card:hover {
    border-color: rgba(56, 189, 248, 0.4);
    background: rgba(30, 41, 59, 0.75);
}

.dark .step-indicator.active > span {
    border-color: rgba(56, 189, 248, 0.45);
    color: #f1f5f9;
    background: linear-gradient(135deg, rgba(14, 116, 144, 0.5), rgba(15, 118, 110, 0.42));
}

/* Sky/teal/amber/rose accent tints, kept on-hue but darkened. */
.dark .tools-glass-badge,
.dark .speaking-format-note,
.dark .speaking-ai-badge,
.dark .tool-ielts-guidance {
    border-color: rgba(56, 189, 248, 0.32);
    color: #7dd3fc;
    background: rgba(12, 74, 110, 0.4);
}

.dark .speaking-room-card__prompt {
    border-color: rgba(56, 189, 248, 0.3);
    background: linear-gradient(135deg, rgba(12, 74, 110, 0.45), rgba(19, 78, 74, 0.35));
}

.dark .speaking-recording-dock {
    border-color: rgba(56, 189, 248, 0.28);
    background:
        radial-gradient(circle at 50% 0%, rgba(56, 189, 248, 0.12), transparent 54%),
        rgba(2, 6, 23, 0.88);
}

.dark .speaking-recording-dock__inner {
    border-color: rgba(56, 189, 248, 0.35);
    background: rgba(15, 23, 42, 0.9);
    box-shadow: 0 18px 48px rgba(2, 6, 23, 0.5), inset 0 1px 0 rgba(148, 163, 184, 0.14);
}

.dark .speaking-privacy-note {
    color: #94a3b8;
}

.dark .speaking-criteria-item span {
    color: #5eead4;
    background: rgba(19, 78, 74, 0.5);
}

.dark .tool-ielts-guidance li i,
.dark .speaking-glass-progress .step-connector {
    color: #5eead4;
    background: rgba(19, 78, 74, 0.5);
}

.dark .speaking-inline-error {
    color: #fca5a5;
    background: rgba(127, 29, 29, 0.35);
    border-color: rgba(248, 113, 113, 0.32);
}

.dark .glass-flash--notice .glass-flash__icon {
    color: #6ee7b7;
    background: rgba(6, 78, 59, 0.5);
}

.dark .glass-flash--error .glass-flash__icon {
    color: #fca5a5;
    background: rgba(127, 29, 29, 0.45);
}

.dark .glass-flash__close {
    color: #94a3b8;
    background: rgba(30, 41, 59, 0.6);
}

.dark .glass-flash__close:hover,
.dark .glass-flash__close:focus-visible {
    color: #f1f5f9;
    background: rgba(51, 65, 85, 0.75);
}

.dark .dashboard-loader-overlay {
    background: rgba(2, 6, 23, 0.6);
}

.dark .skeleton {
    background-color: rgba(51, 65, 85, 1);
    background-image: linear-gradient(105deg, transparent 0, transparent 40%, rgba(71, 85, 105, 1) 50%, transparent 60%, transparent 100%);
}

.dark .tools-glass-secondary-tools {
    border-top-color: rgba(51, 65, 85, 0.5);
}

/* AI-generated / markdown content: the Tailwind Typography plugin (.prose)
   is not compiled into this build, so these wrappers otherwise render with
   no explicit color and fall back to browser-default black text. Give them
   an explicit light color in dark mode, plus sane defaults for elements a
   Redcarpet/AI response commonly contains. */
.dark .generated-content,
.dark .tool-result-content,
.dark .prose {
    color: #cbd5e1;
}

.dark .generated-content :where(h1, h2, h3, h4, h5, h6),
.dark .tool-result-content :where(h1, h2, h3, h4, h5, h6),
.dark .prose :where(h1, h2, h3, h4, h5, h6) {
    color: #f8fafc;
}

.dark .generated-content strong,
.dark .generated-content b,
.dark .tool-result-content strong,
.dark .tool-result-content b,
.dark .prose strong,
.dark .prose b {
    color: #f1f5f9;
}

.dark .generated-content a,
.dark .tool-result-content a,
.dark .prose a {
    color: #7dd3fc;
}

.dark .generated-content code,
.dark .generated-content pre,
.dark .tool-result-content code,
.dark .tool-result-content pre,
.dark .prose code,
.dark .prose pre {
    color: #e2e8f0;
    background: rgba(51, 65, 85, 0.55);
}

.dark .generated-content blockquote,
.dark .tool-result-content blockquote,
.dark .prose blockquote {
    color: #94a3b8;
    border-color: rgba(71, 85, 105, 0.7);
}

.dark .generated-content table,
.dark .tool-result-content table,
.dark .prose table {
    color: #cbd5e1;
}

.dark .generated-content th,
.dark .generated-content td,
.dark .tool-result-content th,
.dark .tool-result-content td,
.dark .prose th,
.dark .prose td {
    border-color: rgba(71, 85, 105, 0.6);
}

/* Confirm dialog (app/assets/stylesheets/application_dialog.css) is a
   separate stylesheet with its own hardcoded light palette. */
.dark .app-confirm-modal .modal-content {
    color: #e2e8f0;
    background: #0f172a;
    border-color: rgba(71, 85, 105, 0.6);
}

.dark .app-confirm-modal .modal-header,
.dark .app-confirm-modal .modal-footer {
    border-color: rgba(71, 85, 105, 0.6);
}

.dark .app-confirm-modal .modal-title {
    color: #f1f5f9;
}

.dark .app-confirm-modal__eyebrow {
    color: #94a3b8;
}

.dark .app-confirm-modal .modal-body {
    color: #94a3b8;
}

.dark .app-confirm-modal__close {
    color: #94a3b8;
}

.dark .app-confirm-modal__cancel {
    color: #cbd5e1;
    background: #0f172a;
    border-color: rgba(71, 85, 105, 0.7);
}

.dark .app-confirm-modal__close:hover,
.dark .app-confirm-modal__cancel:hover {
    background: rgba(51, 65, 85, 0.6);
}

/* Floating chat launcher button (app/assets/stylesheets/floating_chat.css)
   also has its own hardcoded light palette. */
.dark .floating-chat__button {
    border-color: rgba(56, 189, 248, 0.35);
    background:
        linear-gradient(145deg, rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.9)),
        rgba(15, 23, 42, 0.92);
}

.dark .floating-chat__copy strong {
    color: #f1f5f9;
}

.dark .floating-chat__copy small {
    color: #94a3b8;
}

.dark .floating-chat__grip {
    color: #64748b;
}

/* Link styles for guides and policy pages.
   `application.css` ships an unlayered `a { color: inherit; text-decoration:
   inherit }` reset, and unlayered rules beat anything in Tailwind's
   `@layer utilities` no matter the specificity — so `text-blue-700` and
   `hover:underline` are both dead on anchors. These classes carry the styling
   instead. */

.guide-link {
    color: #1d4ed8;
    text-decoration: none;
}

.guide-link:hover {
    color: #1e40af;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.dark .guide-link {
    color: #60a5fa;
}

.dark .guide-link:hover {
    color: #93c5fd;
}

.guide-crumb {
    color: inherit;
    text-decoration: none;
}

.guide-crumb:hover {
    color: #020617;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.dark .guide-crumb:hover {
    color: #f8fafc;
}

/* Muted text for guides and policy pages.
   `soft-ui-dashboard-tailwind.css` ships unlayered `.text-slate-400/500/700/800`
   utilities that shadow Tailwind's own, so those four classes ignore every
   `dark:` variant and freeze at the soft-ui colour — `text-slate-700
   dark:text-slate-200` renders near-black-on-black. These classes carry the
   muted styles instead. `text-slate-600` and `text-slate-300` are not shadowed
   and remain safe to use directly. */

.guide-meta {
    color: #64748b;
}

.dark .guide-meta {
    color: #94a3b8;
}
.app-confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 1055;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  overflow-x: hidden;
  overflow-y: auto;
  color: inherit;
  background: transparent;
  outline: 0;
}

.app-confirm-modal:not([open]) {
  display: none;
}

.app-confirm-modal::backdrop {
  background-color: rgba(2, 6, 23, 0.58);
}

.app-confirm-modal .modal-dialog {
  position: relative;
  width: auto;
  max-width: 32rem;
  margin: 1.25rem;
  pointer-events: none;
}

.app-confirm-modal .modal-dialog-centered {
  display: flex;
  min-height: calc(100% - 2.5rem);
  align-items: center;
}

.app-confirm-modal .modal-content {
  position: relative;
  display: flex;
  width: 100%;
  flex-direction: column;
  pointer-events: auto;
  color: #0f172a;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 0.75rem;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.25);
  outline: 0;
}

.app-confirm-modal .modal-header,
.app-confirm-modal .modal-footer {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
}

.app-confirm-modal .modal-header {
  justify-content: space-between;
  border-bottom: 1px solid #e2e8f0;
}

.app-confirm-modal .modal-title {
  margin: 0.2rem 0 0;
  color: #0f172a;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.4;
}

.app-confirm-modal__eyebrow {
  margin: 0;
  color: #64748b;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.app-confirm-modal .modal-body {
  position: relative;
  padding: 1.25rem;
  color: #475569;
  font-size: 0.95rem;
  line-height: 1.65;
}

.app-confirm-modal .modal-body p {
  margin: 0;
}

.app-confirm-modal .modal-footer {
  justify-content: flex-end;
  border-top: 1px solid #e2e8f0;
}

.app-confirm-modal__close,
.app-confirm-modal__cancel,
.app-confirm-modal__confirm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  font-weight: 700;
  transition: background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.app-confirm-modal__close {
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  color: #64748b;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
}

.app-confirm-modal__cancel,
.app-confirm-modal__confirm {
  min-height: 2.75rem;
  padding: 0.65rem 1rem;
  border: 1px solid transparent;
}

.app-confirm-modal__cancel {
  color: #334155;
  background: #ffffff;
  border-color: #cbd5e1;
}

.app-confirm-modal__confirm--primary {
  color: #ffffff;
  background: #0369a1;
  border-color: #0369a1;
}

.app-confirm-modal__confirm--danger {
  color: #ffffff;
  background: #be123c;
  border-color: #be123c;
}

.app-confirm-modal__close:hover,
.app-confirm-modal__cancel:hover {
  background: #f1f5f9;
}

.app-confirm-modal__confirm--primary:hover {
  background: #075985;
}

.app-confirm-modal__confirm--danger:hover {
  background: #9f1239;
}

.app-confirm-modal button:focus-visible {
  outline: 3px solid rgba(14, 165, 233, 0.35);
  outline-offset: 2px;
}

@media (min-width: 576px) {
  .app-confirm-modal .modal-dialog {
    margin: 1.75rem auto;
  }

  .app-confirm-modal .modal-dialog-centered {
    min-height: calc(100% - 3.5rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-confirm-modal .modal-dialog {
    transition: none;
  }
}
.floating-chat {
    position: fixed;
    right: 1.1rem;
    bottom: 1.1rem;
    z-index: 45;
    max-width: calc(100vw - 2rem);
}

.floating-chat__button {
    display: inline-flex;
    gap: 0.7rem;
    align-items: center;
    min-height: 3.45rem;
    max-width: min(20rem, calc(100vw - 2rem));
    padding: 0.55rem 0.75rem 0.55rem 0.6rem;
    border: 1px solid rgba(14, 165, 233, 0.32);
    border-radius: 8px;
    color: #0f172a;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(240, 249, 255, 0.86)),
        rgba(255, 255, 255, 0.9);
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.18);
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    cursor: grab;
    touch-action: none;
    -webkit-user-drag: none;
    user-drag: none;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.floating-chat__button:hover,
.floating-chat__button:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(14, 165, 233, 0.52);
    box-shadow: 0 24px 58px rgba(15, 23, 42, 0.22);
    outline: none;
}

.floating-chat.is-dragging .floating-chat__button {
    transform: scale(0.98);
    cursor: grabbing;
}

.floating-chat__icon {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 2.45rem;
    height: 2.45rem;
    border-radius: 8px;
    color: #ffffff;
    background: linear-gradient(135deg, #0ea5e9, #14b8a6);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.36), 0 10px 24px rgba(14, 165, 233, 0.28);
}

.floating-chat__copy {
    display: grid;
    gap: 0.05rem;
    min-width: 0;
}

.floating-chat__copy strong,
.floating-chat__copy small {
    display: block;
    white-space: nowrap;
}

.floating-chat__copy strong {
    color: #0f172a;
    font-size: 0.88rem;
    font-weight: 900;
    line-height: 1.2;
}

.floating-chat__copy small {
    color: #64748b;
    font-size: 0.74rem;
    font-weight: 750;
    line-height: 1.2;
}

.floating-chat__grip {
    display: inline-flex;
    flex: 0 0 auto;
    color: #94a3b8;
    font-size: 0.9rem;
}

.floating-chat--compact .floating-chat__button {
    min-height: 3rem;
    padding: 0.45rem;
}

.floating-chat--compact .floating-chat__copy,
.floating-chat--compact .floating-chat__grip {
    display: none;
}

@media (max-width: 640px) {
    .floating-chat {
        display: none;
    }
}
/*
 * Stylesheet bundle for the reading layout (guides and the trust pages).
 *
 * These pages are the site's organic-search landing pages, so they load the
 * shared chrome they actually render — flash messages, the confirm dialog and
 * the floating chat button — and nothing else. The soft-ui dashboard theme and
 * the nucleo icon fonts in `application.css` are for the app shell; a guide
 * renders none of their classes, so ~83 KB of render-blocking CSS is dropped
 * from the critical path here.
 *
 * If you add a partial to layouts/guide.html.erb, check its styles are reachable
 * from one of the files below.
 *



 */
