.section {
    position: relative;
}

section {
    margin: auto;
    max-width: 1200px;
    padding: 3em 1.5em;
    overflow: auto;
    height: 100svh;
}

.bottom-nav {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 14px 0;
}

.feed {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 750px;
    margin: 0 auto;
    padding-bottom: 84px;
}

.feed > :last-child {
    padding-bottom: 100px;
}

.feed-card {
    background: white;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.feed-card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.feed-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 700px;
}

.feed-section-title h3 {
    margin: 0;
}

.feed-section-title i {
    color: var(--primary-color);
    font-size: 1.1em;
}

.profile-card-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.profile-card-info h2 {
    font-size: 1.3em;
}

.feed-subtitle {
    color: var(--input-font-color);
    font-size: 0.9em;
}

.thumb.large {
    display: flex;
    align-items: center;
    justify-content: center;
}

.thumb.large .canva {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
}

.thumb.large .canva img {
    width: 70px;
}

.performance-resume {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 15px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
}

.performance-resume > div,
.performance-resume > .stat-link {
    display: flex;
    flex-direction: column;
    text-align: center;
    gap: 4px;
}

.performance-resume > .stat-link {
    text-decoration: none;
    border-radius: 8px;
}

.performance-resume > .stat-link:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 4px;
}

.performance-resume > * span:first-child {
    font-size: 0.8em;
    color: var(--input-font-color);
}

.performance-resume > * span:nth-child(2) {
    font-size: 1.4em;
    font-weight: bold;
    color: var(--primary-color);
}

.performance-radar {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: auto;
}

.suggestions {
    display: flex;
    justify-content: flex-start;
    gap: 15px;
    width: 100%;
    overflow: auto;
    max-width: 750px;
    margin: 0 auto;
}

.suggest-item {
    width: 200px;
    flex-shrink: 0;
    border-radius: 16px;
    background: white;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.suggest-item .feed-card-header {
    margin-bottom: 15px;
    align-items: center;
}

.suggest-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background-color: rgba(55, 164, 115, 0.12);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1em;
}

.suggest-title {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.suggest-rank {
    font-size: 0.8em;
    color: var(--input-font-color);
}

.suggest-title h4 {
    margin: 0;
}

.suggest-cta {
    display: block;
    text-align: center;
    text-decoration: none;
    color: white;
    background-color: var(--primary-color);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.9em;
    margin-top: 15px;
}

.suggest-item .progress {
    height: 30px;
    overflow: hidden;
    width: 100%;
    border-radius: 1em;
    background-color: rgba(0, 0, 0, 0.1);
    position: relative;
}

.suggest-item .progress-filler {
    height: 100%;
    width: 100%;
    background-color: var(--primary-color);
    z-index: 1;
    position: absolute;
}

.suggest-item .progress-text {
    position: absolute;
    width: 100%;
    text-align: center;
    z-index: 2;
    font-weight: bold;
    line-height: 30px;
    color: white;
}

.suggest-item .wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.suggest-time {
    font-size: 0.85em;
    color: var(--input-font-color);
}

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

section.history {
    display: flex;
    flex-direction: column;
    gap: 14px;
    height: auto;
    max-width: none;
    margin: 0;
    padding: 0;
    overflow: visible;
    scroll-margin-top: 16px;
}

.history-results {
    display: flex;
    padding: 4px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.06);
}

.history-results button {
    flex: 1;
    min-width: 0;
    min-height: 40px;
    padding: 0 6px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--input-font-color);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.history-results button[aria-pressed='true'] {
    background: white;
    color: var(--info-font-color);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.history-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.history-tags[hidden] {
    display: none;
}

.history-tags button {
    min-height: 36px;
    padding: 6px 14px;
    border: 1px solid #d6dcd9;
    border-radius: 9999px;
    background: white;
    color: var(--info-font-color);
    font: inherit;
    font-size: 0.9em;
    cursor: pointer;
}

.history-tags button[aria-pressed='true'] {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}

.history-results button:focus-visible,
.history-tags button:focus-visible,
.history-card-link:focus-visible,
.history-action:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.history-list,
.history-items {
    list-style: none;
    margin: 0;
    padding: 0;
}

.history-list,
.history-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.history-list:empty {
    display: none;
}

.history-day {
    margin: 6px 0 10px;
    font-size: 0.85em;
    color: var(--input-font-color);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.history-card {
    min-width: 0;
    border-radius: 16px;
    border-left: 4px solid var(--error-background-color);
    background: white;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.history-card.correct {
    border-left-color: var(--primary-color);
}

.history-card-link {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border-radius: 0 16px 16px 0;
    color: inherit;
    text-decoration: none;
}

.history-badge {
    flex-shrink: 0;
    font-size: 1.3em;
    line-height: 1.2;
    color: var(--error-background-color);
}

.history-card.correct .history-badge {
    color: var(--primary-color);
}

.history-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.history-card-top {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.history-source {
    font-weight: 700;
    color: var(--info-font-color);
}

.history-time {
    flex-shrink: 0;
    font-size: 0.85em;
    color: var(--input-font-color);
}

.history-excerpt {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    overflow-wrap: anywhere;
    color: #23303c;
    line-height: 1.4;
}

.history-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    font-size: 0.85em;
    color: var(--input-font-color);
}

.history-subject {
    font-weight: 700;
    color: var(--primary-color);
}

.history-attempts {
    padding: 2px 8px;
    border-radius: 9999px;
    background: rgba(0, 0, 0, 0.06);
    color: var(--info-font-color);
}

.history-caret {
    flex-shrink: 0;
    margin-top: 4px;
    color: var(--input-font-color);
}

.history-action {
    display: block;
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    background: white;
    color: var(--primary-color);
    font: inherit;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.history-sentinel {
    height: 1px;
}

.history-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 20px;
    border-radius: 16px;
    background: white;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    text-align: center;
    color: var(--info-font-color);
}

.history-message .history-action {
    width: auto;
}

.history-skeleton {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    border-radius: 16px;
    background: white;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.history-skeleton .sk {
    height: 14px;
    border-radius: 6px;
    background: linear-gradient(90deg, #ededed 25%, #f6f6f6 37%, #ededed 63%);
    background-size: 400% 100%;
    animation: sk-shimmer 1.4s ease infinite;
}

.history-skeleton .sk.title {
    width: 45%;
    height: 18px;
}

.history-skeleton .sk.line-short {
    width: 70%;
}

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

@media (prefers-reduced-motion: reduce) {
    .history-skeleton .sk {
        animation: none;
    }
}
