/* Modern, minimal styling for the voice recorder app */
:root {
    color-scheme: light dark;
    --bg: #f5f7fb;
    --text: #111827;
    --muted: #6b7280;
    --card: #ffffff;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --danger: #dc2626;
    --border: rgba(17, 24, 39, 0.08);
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0f172a;
    --text: #f8fafc;
    --muted: #94a3b8;
    --card: #111827;
    --primary: #60a5fa;
    --primary-dark: #3b82f6;
    --danger: #f87171;
    --border: rgba(148, 163, 184, 0.24);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 2rem 1.5rem;
    gap: 1.5rem;
}

body.menu-open {
    overflow: hidden;
}

body.modal-open {
    overflow: hidden;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.site-header {
    width: min(960px, 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.site-brand {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.01em;
}

.menu-toggle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--card);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 18px 30px -24px rgba(15, 23, 42, 0.35);
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.menu-toggle:hover,
.menu-toggle:focus-visible {
    background: rgba(37, 99, 235, 0.08);
    transform: translateY(-1px);
}

.menu-icon {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
}

.menu-icon span {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: var(--text);
}

.site-menu {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(320px, 85vw);
    background: var(--card);
    box-shadow: -30px 0 60px -30px rgba(15, 23, 42, 0.35);
    display: flex;
    flex-direction: column;
    padding: 1.75rem;
    gap: 1.75rem;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    z-index: 20;
}

.site-menu[hidden] {
    display: none;
}

body.menu-open .site-menu {
    transform: translateX(0);
}

.site-menu__panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    height: 100%;
}

.site-menu__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.site-menu__title {
    font-size: 1.1rem;
    font-weight: 700;
}

.menu-close {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    font-size: 1.5rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.menu-close:hover,
.menu-close:focus-visible {
    background: rgba(37, 99, 235, 0.08);
}

.site-menu__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.site-menu__link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    text-decoration: none;
    color: var(--text);
    background: transparent;
    transition: background 0.2s ease, color 0.2s ease;
}

.site-menu__link:hover,
.site-menu__link:focus-visible {
    background: rgba(37, 99, 235, 0.08);
}

.site-menu__link.is-active {
    background: rgba(37, 99, 235, 0.16);
    color: var(--primary-dark);
}

.theme-toggle {
    justify-content: space-between;
    gap: 0.75rem;
}

.theme-toggle__icon {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 30%, #facc15 0%, #facc15 55%, #f97316 100%);
    box-shadow: 0 0 0 1px rgba(17, 24, 39, 0.12) inset;
    transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

:root[data-theme="dark"] .theme-toggle__icon {
    background: radial-gradient(circle at 30% 30%, #3f4c6b 0%, #64748b 55%, #f8fafc 100%);
    box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.35) inset;
}

.theme-toggle:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3);
}

.theme-toggle[aria-pressed="true"] {
    background: rgba(37, 99, 235, 0.16);
    color: var(--primary-dark);
}

.menu-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.3);
    backdrop-filter: blur(2px);
    z-index: 10;
}

.menu-backdrop[hidden] {
    display: none;
}

.app {
    display: grid;
    gap: 2.5rem;
    width: min(960px, 100%);
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.recorder,
.transcripts {
    background: var(--card);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 20px 45px -24px rgba(15, 23, 42, 0.35);
    border: 1px solid var(--border);
}

.overview {
    width: min(960px, 100%);
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.overview-card {
    background: var(--card);
    border-radius: 20px;
    padding: 2.25rem;
    box-shadow: 0 20px 45px -24px rgba(15, 23, 42, 0.35);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.overview-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.overview-head > div {
    flex: 1 1 260px;
}

.overview-head h1 {
    margin: 0 0 0.5rem;
}

.overview-head p {
    margin: 0;
    color: var(--muted);
}

.overview-search {
    flex: 0 0 320px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.overview-search__input {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    background: #ffffff;
    color: var(--text);
}

.overview-search__input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.overview-search__select {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 0.65rem 1rem;
    font-size: 0.95rem;
    background: #ffffff;
    color: var(--text);
}

.overview-search__select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.overview-search__actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.overview-search__actions .primary {
    flex: 0 0 auto;
}

.tag-form {
    flex: 0 0 320px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tag-form label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--muted);
}

.tag-form input {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tag-form input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.tag-form .primary {
    align-self: flex-end;
}

.overview-summary {
    margin: 0;
    color: var(--muted);
}

.overview-list {
    margin-top: -0.5rem;
}

.pagination {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.pagination__summary {
    color: var(--muted);
    font-size: 0.95rem;
}

.pagination__controls {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pagination__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    padding: 0.45rem 0.85rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.pagination__link:hover,
.pagination__link:focus-visible {
    background: rgba(37, 99, 235, 0.1);
    border-color: rgba(37, 99, 235, 0.4);
}

.pagination__link.is-active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    cursor: default;
}

.pagination__link.is-disabled {
    pointer-events: none;
    opacity: 0.5;
}

.pagination__ellipsis {
    padding: 0 0.35rem;
    color: var(--muted);
    font-size: 1.1rem;
}

.headline h1 {
    margin: 0 0 0.5rem;
    font-size: clamp(2rem, 3vw, 2.4rem);
}

.headline p {
    margin: 0;
    color: var(--muted);
}

.controls {
    margin-top: 1.75rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.tag-selector {
    margin-top: 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.45rem;
}

.tag-selector label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--muted);
}

.tag-selector select {
    width: 100%;
    max-width: 260px;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    background: var(--card);
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.4;
    box-shadow: 0 18px 28px -26px rgba(15, 23, 42, 0.55);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tag-selector select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

button {
    cursor: pointer;
    border: none;
    border-radius: 999px;
    font-weight: 600;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

button.primary {
    background: var(--primary);
    color: white;
    padding: 0.85rem 1.65rem;
    box-shadow: 0 12px 20px -12px rgba(37, 99, 235, 0.6);
}

button.primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

button.primary.danger {
    background: var(--danger);
    box-shadow: 0 12px 20px -12px rgba(220, 38, 38, 0.6);
}

button.ghost {
    background: transparent;
    color: var(--muted);
    padding: 0.45rem 0.9rem;
    border: 1px solid var(--border);
}

.status {\r\n    color: var(--muted);\r\n    font-size: 0.95rem;\r\n}\r\n\r\n.timer {\r\n    font-variant-numeric: tabular-nums;\r\n    font-size: 0.95rem;\r\n    color: var(--primary);\r\n    background: rgba(37, 99, 235, 0.12);\r\n    border-radius: 999px;\r\n    padding: 0.25rem 0.75rem;\r\n}\r\n
.tips {
    margin-top: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 600;
}

.tips .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--danger);
    box-shadow: 0 0 0 rgba(220, 38, 38, 0.6);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.6);
    }
    70% {
        box-shadow: 0 0 0 12px rgba(220, 38, 38, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0);
    }
}

.error {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    background: rgba(220, 38, 38, 0.1);
    color: #991b1b;
}

.flash {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    background: rgba(16, 185, 129, 0.14);
    color: #047857;
    font-weight: 600;
}

.error-list {
    margin: 0;
    padding-left: 1.25rem;
}

.error-list li {
    margin: 0.25rem 0;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.section-head h2 {
    margin: 0;
}

.list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.item {
    padding: 1rem 1.25rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(249, 250, 251, 0.9);
}

.item time {
    display: block;
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 0.45rem;
}

.item p {
    margin: 0;
    line-height: 1.55;
}

.empty {
    padding: 1.2rem 1.5rem;
    border-radius: 16px;
    background: rgba(107, 114, 128, 0.08);
    color: var(--muted);
    font-size: 0.95rem;
}


.schema-card {
    margin-top: 1.5rem;
}

.schema-table {
    margin-top: 1.5rem;
    padding: 1.25rem;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(17, 24, 39, 0.04);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.schema-table__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
}

.schema-table__title {
    margin: 0;
    font-size: 1.05rem;
}

.schema-table__count {
    color: var(--muted);
    font-size: 0.85rem;
}

.schema-grid {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    overflow: hidden;
}

.schema-grid th,
.schema-grid td {
    text-align: left;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border);
}

.schema-grid th {
    background: rgba(37, 99, 235, 0.09);
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--primary-dark);
}

.schema-grid tr:last-child td {
    border-bottom: none;
}

details.schema-sql {
    background: rgba(15, 23, 42, 0.05);
    border-radius: 12px;
    padding: 0.75rem 1rem;
}

details.schema-sql summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--primary-dark);
}

details.schema-sql summary::-webkit-details-marker {
    display: none;
}

details.schema-sql pre {
    margin: 0.75rem 0 0;
    font-family: 'Fira Code', 'Source Code Pro', monospace;
    font-size: 0.75rem;
    line-height: 1.5;
    color: #0f172a;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.75rem;
    border-radius: 8px;
    overflow-x: auto;
}

@media (max-width: 720px) {
    body {
        padding: 1.5rem 1rem;
        gap: 1rem;
    }

    .app {
        gap: 1.5rem;
    }

    .recorder,
    .transcripts {
        padding: 1.5rem;
    }

    .overview-card {
        padding: 1.75rem;
    }

    .overview-head {
        flex-direction: column;
        gap: 1.25rem;
    }

    .overview-search {
        width: 100%;
    }

    .overview-search__actions {
        justify-content: flex-start;
    }

    .tag-form {
        width: 100%;
    }

    .tag-form .primary {
        align-self: stretch;
    }

    .schema-table {
        padding: 1rem;
    }

    .schema-grid th,
    .schema-grid td {
        padding: 0.4rem 0.5rem;
    }

    details.schema-sql pre {
        font-size: 0.7rem;
    }
}


.item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.item-head__actions {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

button.edit-button {
    padding: 0.4rem 0.95rem;
    font-size: 0.85rem;
}

.item-tag {
    margin-bottom: 0.5rem;
}

.tag-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.12);
    color: var(--primary-dark);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.item-tag-editor {
    margin-top: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.tag-select,
.item-tag-editor select {
    width: 100%;
    max-width: 230px;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    background: var(--card);
    color: var(--text);
    font-size: 0.9rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tag-select:focus,
.item-tag-editor select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.item-feedback {
    margin-top: 0.35rem;
    font-size: 0.8rem;
    color: var(--muted);
    min-height: 1rem;
}

.item-feedback.is-error {
    color: #dc2626;
}

.tag-list .item {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tag-list .item-head {
    margin-bottom: 0;
    width: 100%;
}

.tag-list time {
    font-size: 0.85rem;
    color: var(--muted);
}

button.copy-button {
    padding: 0.4rem 0.95rem;
    font-size: 0.85rem;
}

button.copy-button.copied {
    background: var(--primary);
    color: #ffffff;
    border-color: transparent;
}


.editor-layer {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    z-index: 40;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.editor-layer[hidden] {
    display: none;
}

.editor-layer.is-open {
    opacity: 1;
    pointer-events: auto;
}

.editor-layer__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
}

.editor-layer__dialog {
    position: relative;
    z-index: 1;
    width: min(680px, 100%);
    max-height: min(85vh, 720px);
    background: var(--card);
    color: var(--text);
    border-radius: 20px;
    box-shadow: 0 30px 60px -28px rgba(15, 23, 42, 0.5);
    padding: 1.75rem;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.editor-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.editor-form__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.editor-form__head h2 {
    margin: 0;
}

.editor-form__close {
    border-radius: 12px;
    padding: 0.35rem 0.6rem;
}

.editor-form__textarea {
    width: 100%;
    min-height: 220px;
    resize: vertical;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 0.85rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    color: var(--text);
    background: var(--card);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.editor-form__textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.editor-form__error {
    margin: 0;
    min-height: 1rem;
    font-size: 0.85rem;
    color: var(--danger);
}

.editor-form__actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

@media (max-width: 600px) {
    .editor-layer {
        padding: 1rem;
    }

    .editor-layer__dialog {
        width: 100%;
        max-height: 100vh;
        border-radius: 16px;
    }
}

body.login-body {
    background: var(--bg);
    justify-content: center;
    gap: 0;
    padding: 2rem 1.5rem;
}

.login {
    background: var(--card);
    border-radius: 20px;
    padding: 2.5rem;
    width: min(420px, 100%);
    box-shadow: 0 24px 50px -30px rgba(15, 23, 42, 0.4);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.login-subtitle {
    margin: 0;
    color: var(--muted);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.login-form label {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    font-weight: 600;
    color: var(--muted);
}

.login-form input {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.75rem 0.9rem;
    font-size: 1rem;
    background: #ffffff;
    color: var(--text);
}

.login-form input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.login-form button {
    align-self: flex-start;
}

@media (max-width: 720px) {
    .login {
        padding: 2rem;
    }
}


.upload-form {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    align-items: flex-start;
}

.upload-form label {
    font-weight: 600;
    color: var(--muted);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.upload-form input[type="file"] {
    padding: 0.75rem;
    border: 1px dashed var(--border);
    border-radius: 0.85rem;
    background: var(--card);
    color: var(--text);
    width: min(420px, 100%);
}

.upload-form select {
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    background: var(--card);
    color: var(--text);
    min-width: 220px;
}

.upload-form button {
    align-self: flex-start;
}

.upload-status {
    margin-top: 1rem;
    color: var(--muted);
    font-size: 0.95rem;
}

.upload-status.is-error {
    color: var(--danger);
}

.upload-result {
    margin-top: 1.75rem;
    padding: 1.25rem;
    border-radius: 1.1rem;
    border: 1px solid var(--border);
    background: var(--card);
    width: 100%;
    max-width: 720px;
    box-shadow: 0 20px 36px -30px rgba(15, 23, 42, 0.45);
}

.upload-result__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.upload-result__text {
    margin: 0;
    white-space: pre-wrap;
    line-height: 1.55;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin: 0;
    padding: 0;
}

.stats-grid__item {
    border-radius: 1rem;
    padding: 1rem 1.1rem;
    background: rgba(37, 99, 235, 0.08);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

:root[data-theme="dark"] .stats-grid__item {
    background: rgba(96, 165, 250, 0.12);
}

.stats-grid__label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    margin: 0;
}

.stats-grid__value {
    font-size: 1.7rem;
    font-weight: 700;
    margin: 0;
}

.stats-highlight {
    margin-top: 1.25rem;
    font-size: 0.95rem;
}

.stats-highlight strong {
    color: var(--primary);
}

.muted {
    color: var(--muted);
}

.table-wrapper {
    width: 100%;
    overflow-x: auto;
    border-radius: 1rem;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 360px;
}

.stats-table th,
.stats-table td {
    text-align: left;
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
}

.stats-table thead th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    font-weight: 600;
}

.stats-table tbody tr:hover {
    background: rgba(37, 99, 235, 0.08);
}

:root[data-theme="dark"] .stats-table tbody tr:hover {
    background: rgba(96, 165, 250, 0.12);
}

.stats-table tbody tr:last-child th,
.stats-table tbody tr:last-child td {
    border-bottom: none;
}

.stats-list {
    margin: 0;
    padding-left: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stats-list__item {
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 0.85rem 1rem;
    background: var(--card);
}

.stats-list__header {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: baseline;
}

.stats-list__value {
    font-size: 1.2rem;
    font-weight: 600;
}

.stats-list__date {
    font-size: 0.85rem;
    color: var(--muted);
}

.stats-list__meta {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin: 0.35rem 0 0.45rem;
    font-size: 0.85rem;
    color: var(--muted);
}

.stats-list__excerpt {
    margin: 0;
    line-height: 1.5;
}

@media (max-width: 640px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .stats-table {
        min-width: 320px;
    }
}
