/* ============================================
   LINGSPEAK BLOG
   Public blog pages, article layout, and private editor
   ============================================ */

:root {
    --blog-ink: #111827;
    --blog-muted: #5b6472;
    --blog-line: #d9e0ea;
    --blog-soft: #f4f7fb;
    --blog-blue: #177ddc;
    --blog-teal: #0f9f8f;
    --blog-coral: #ef6b5a;
    --blog-amber: #f3b23f;
    --blog-font-sans: 'Manrope', 'Raleway', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --blog-font-display: 'Fraunces', 'Raleway', Georgia, serif;
}

.blog-page,
.blog-article-page,
.author-page,
.blog-editor-page {
    background:
        linear-gradient(180deg, #f9fbff 0%, #ffffff 46%, #f6f8fc 100%);
    color: var(--blog-ink);
    font-family: var(--blog-font-sans);
}

.blog-main {
    padding-top: 96px;
}

.blog-gallery-main {
    padding-top: 92px;
}

.blog-hero {
    position: relative;
    padding: clamp(4rem, 7vw, 7rem) 0 clamp(2rem, 4vw, 4rem);
    overflow: hidden;
    isolation: isolate;
}

.blog-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(17, 24, 39, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(17, 24, 39, 0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(to bottom, black 48%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 48%, transparent 100%);
}

.blog-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: center;
}

.blog-kicker,
.article-kicker,
.editor-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: var(--blog-teal);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.blog-kicker::before,
.article-kicker::before,
.editor-kicker::before {
    content: '';
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 50%;
    background: var(--blog-coral);
}

.blog-title,
.article-title,
.editor-title {
    font-family: var(--blog-font-display);
    max-width: 9.5ch;
    margin: 0 0 1.1rem;
    color: var(--blog-ink);
    font-size: clamp(3rem, 7vw, 5.9rem);
    font-weight: 800;
    line-height: 0.98;
    letter-spacing: 0;
}

.blog-title span,
.article-title span {
    color: var(--brand-primary);
}

.blog-intro,
.article-dek,
.editor-intro {
    max-width: 680px;
    color: var(--blog-muted);
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    line-height: 1.75;
}

.blog-feature-media,
.article-hero-media {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid rgba(17, 24, 39, 0.08);
    box-shadow: 0 24px 70px rgba(17, 24, 39, 0.16);
    background: #dbeafe;
}

.blog-feature-media {
    aspect-ratio: 4 / 3;
}

.article-hero-media {
    aspect-ratio: 16 / 8;
    margin-top: clamp(2rem, 4vw, 3.5rem);
}

.blog-feature-media img,
.article-hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-feature-band,
.blog-index-band,
.article-body-band,
.blog-gallery-band {
    padding: clamp(2.5rem, 5vw, 5rem) 0;
}

.blog-gallery-band {
    padding-top: clamp(1rem, 2vw, 1.75rem);
}

.blog-search-shell {
    flex: 0 0 clamp(180px, 22vw, 270px);
    min-width: 180px;
}

.blog-chip-group p {
    color: var(--blog-ink);
    font-size: 0.82rem;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

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

.blog-search-input {
    width: 100%;
    min-height: 38px;
    border: 1px solid var(--blog-line);
    border-radius: 8px;
    padding: 0 1.1rem;
    background: #ffffff;
    color: var(--blog-ink);
    box-shadow: 0 14px 32px rgba(17, 24, 39, 0.08);
    font: inherit;
    font-size: 0.98rem;
    font-weight: 650;
}

.blog-search-input:focus,
.blog-chip:focus-visible {
    outline: 3px solid rgba(23, 125, 220, 0.18);
    border-color: rgba(23, 125, 220, 0.7);
}

.blog-filter-panel {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: clamp(1.25rem, 2.5vw, 2rem);
    padding: 0.6rem;
    border: 1px solid var(--blog-line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.84);
    box-shadow: 0 16px 34px rgba(17, 24, 39, 0.07);
    overflow-x: auto;
    scrollbar-width: thin;
}

.blog-chip-group {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.4rem;
    align-items: center;
    flex: 0 0 auto;
}

.blog-chip-group p {
    width: auto;
    flex: 0 0 auto;
    margin: 0;
}

.blog-chip {
    min-height: 34px;
    border: 1px solid var(--blog-line);
    border-radius: 8px;
    padding: 0.4rem 0.7rem;
    background: #ffffff;
    color: var(--blog-muted);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 800;
    white-space: nowrap;
    cursor: pointer;
    transition: transform var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast);
}

.blog-chip:hover {
    transform: translateY(-1px);
    border-color: rgba(23, 125, 220, 0.45);
    color: var(--blog-ink);
}

.blog-chip.is-active {
    border-color: transparent;
    background: var(--blog-ink);
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(17, 24, 39, 0.16);
}

.blog-gallery-heading {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    margin-bottom: 0.85rem;
}

.blog-result-count {
    margin: 0;
    color: var(--blog-muted);
    font-weight: 800;
}

.blog-feature-link {
    display: grid;
    grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1fr);
    gap: clamp(1.5rem, 3vw, 3rem);
    align-items: center;
    padding: clamp(1rem, 2vw, 1.5rem);
    border: 1px solid var(--blog-line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.84);
    box-shadow: 0 18px 42px rgba(17, 24, 39, 0.08);
    color: inherit;
}

.blog-feature-link:hover {
    color: inherit;
    transform: translateY(-3px);
    box-shadow: 0 22px 52px rgba(17, 24, 39, 0.12);
}

.blog-feature-thumb {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 8px;
    background: #dbeafe;
}

.blog-feature-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-feature-copy {
    min-width: 0;
}

.blog-eyebrow,
.article-meta,
.blog-card-meta {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 0.85rem;
    color: var(--blog-muted);
    font-size: 0.9rem;
    font-weight: 700;
}

.blog-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    background: rgba(23, 125, 220, 0.1);
    color: var(--blog-blue);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.blog-feature-copy h2,
.blog-index-heading {
    font-family: var(--blog-font-display);
    margin: 0 0 0.8rem;
    color: var(--blog-ink);
    font-size: clamp(1.75rem, 3vw, 2.65rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: 0;
}

.blog-feature-copy p,
.blog-card p {
    color: var(--blog-muted);
}

.blog-readmore {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.4rem;
    color: var(--brand-primary);
    font-weight: 800;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.blog-card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: 1.1rem;
    border: 1px solid var(--blog-line);
    border-radius: 8px;
    background: #ffffff;
    color: inherit;
}

.blog-card:hover {
    color: inherit;
    transform: translateY(-2px);
    box-shadow: 0 16px 36px rgba(17, 24, 39, 0.1);
}

.blog-card h3 {
    font-family: var(--blog-font-display);
    margin: 0.75rem 0 0.55rem;
    color: var(--blog-ink);
    font-size: 1.35rem;
    line-height: 1.15;
    letter-spacing: 0;
}

.blog-card h2 {
    font-family: var(--blog-font-display);
    margin: 0.75rem 0 0.55rem;
    color: var(--blog-ink);
    font-size: clamp(1.2rem, 1.8vw, 1.5rem);
    font-weight: 800;
    line-height: 1.16;
    letter-spacing: 0;
}

.blog-grid--gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.blog-grid--gallery .blog-card {
    padding: 0.9rem;
}

.blog-grid--single {
    grid-template-columns: minmax(0, 1fr);
    max-width: 380px;
}

.blog-grid--gallery .blog-card p {
    font-size: 0.95rem;
    line-height: 1.6;
}

.blog-empty-state {
    margin: 1.5rem 0 0;
    padding: 1rem;
    border: 1px solid var(--blog-line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--blog-muted);
    font-weight: 800;
    text-align: center;
}

.blog-gallery-section {
    margin-top: clamp(2rem, 4vw, 3rem);
}

.blog-gallery-section__heading {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: end;
    margin-bottom: 1rem;
}

.blog-gallery-section__heading h2 {
    font-family: var(--blog-font-display);
    margin: 0;
    color: var(--blog-ink);
    font-size: clamp(1.65rem, 3vw, 2.4rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: 0;
}

.blog-gallery-section__heading p {
    max-width: 520px;
    margin: 0;
    color: var(--blog-muted);
    line-height: 1.6;
}

.blog-card-visual {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 8px;
    background: #e8eef7;
    background-size: cover;
    background-position: center;
}

.blog-card-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-card-visual[style*="background-image"] img {
    opacity: 0;
}

.article-hero {
    position: relative;
    padding: clamp(4.5rem, 7vw, 7rem) 0 clamp(1rem, 3vw, 2rem);
    overflow: hidden;
}

.article-backlink {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 1.25rem;
    color: var(--blog-muted);
    font-weight: 800;
}

.article-title {
    max-width: 12.4ch;
    font-size: clamp(2.65rem, 6vw, 5.4rem);
}

.article-meta {
    margin-top: 1.2rem;
}

.article-shell {
    display: grid;
    grid-template-columns: minmax(220px, 280px) minmax(0, 760px);
    gap: clamp(2rem, 4vw, 4rem);
    align-items: start;
}

.article-toc {
    position: sticky;
    top: 104px;
    max-height: calc(100vh - 128px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: rgba(23, 125, 220, 0.45) transparent;
    padding: 1rem;
    border: 1px solid var(--blog-line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
}

.article-toc::-webkit-scrollbar {
    width: 8px;
}

.article-toc::-webkit-scrollbar-track {
    background: transparent;
}

.article-toc::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 999px;
    background: rgba(23, 125, 220, 0.45);
    background-clip: padding-box;
}

.article-toc-title {
    margin: 0 0 0.85rem;
    color: var(--blog-ink);
    font-size: 0.8rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

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

.article-toc-link {
    display: block;
    padding: 0.42rem 0.5rem;
    border-left: 3px solid transparent;
    border-radius: 0 6px 6px 0;
    color: var(--blog-muted);
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.25;
}

.article-toc-link:hover,
.article-toc-link.is-active {
    border-left-color: var(--blog-coral);
    background: rgba(239, 107, 90, 0.08);
    color: var(--blog-ink);
}

.article-toc-link[data-level="3"] {
    margin-left: 0.75rem;
    font-size: 0.86rem;
    font-weight: 650;
}

.article-toc-link[data-level="4"] {
    margin-left: 1.5rem;
    font-size: 0.82rem;
    font-weight: 600;
}

.article-author-link {
    color: inherit;
    font-weight: 800;
    text-decoration: underline;
    text-decoration-color: rgba(23, 125, 220, 0.35);
    text-decoration-thickness: 2px;
    text-underline-offset: 0.2em;
}

.article-author-link:hover {
    color: var(--blog-blue);
    text-decoration-color: currentColor;
}

.author-main {
    padding-top: 96px;
}

.author-hero {
    position: relative;
    padding: clamp(4.5rem, 8vw, 7.5rem) 0 clamp(3rem, 6vw, 5.5rem);
    overflow: hidden;
    isolation: isolate;
}

.author-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(circle at 82% 18%, rgba(15, 159, 143, 0.16), transparent 28%),
        radial-gradient(circle at 15% 32%, rgba(239, 107, 90, 0.14), transparent 25%);
}

.author-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.75fr);
    gap: clamp(2.5rem, 6vw, 5.5rem);
    align-items: center;
}

.author-title {
    max-width: 10ch;
    margin: 0 0 1.25rem;
    color: var(--blog-ink);
    font-family: var(--blog-font-display);
    font-size: clamp(3.2rem, 7vw, 6.4rem);
    font-weight: 800;
    line-height: 0.98;
    letter-spacing: 0;
}

.author-intro {
    max-width: 660px;
    color: var(--blog-muted);
    font-size: clamp(1.08rem, 2vw, 1.3rem);
    line-height: 1.75;
}

.author-portrait {
    position: relative;
    min-height: 420px;
    margin: 0;
    overflow: visible;
    background: transparent;
}

.author-portrait img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 420px;
    object-fit: contain;
    object-position: center;
}

.author-content-band {
    padding: clamp(3rem, 6vw, 6rem) 0;
    background: #fff;
}

.author-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.65fr);
    gap: clamp(2.5rem, 6vw, 5rem);
    align-items: start;
}

.author-copy h2,
.author-side-card h2 {
    margin: 0 0 1rem;
    color: var(--blog-ink);
    font-family: var(--blog-font-display);
    font-size: clamp(2rem, 4vw, 3.25rem);
    line-height: 1.08;
}

.author-copy h2:not(:first-child) {
    margin-top: 2.8rem;
}

.author-copy p {
    color: var(--blog-muted);
    font-size: 1.05rem;
    line-height: 1.85;
}

.author-side-card {
    position: sticky;
    top: 112px;
    padding: clamp(1.4rem, 3vw, 2rem);
    border: 1px solid var(--blog-line);
    border-radius: 8px;
    background: var(--blog-soft);
}

.author-side-card h2 {
    font-size: 1.65rem;
}

.author-facts {
    display: grid;
    gap: 1rem;
    margin: 0 0 1.6rem;
}

.author-facts div {
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--blog-line);
}

.author-facts dt {
    color: var(--blog-teal);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.author-facts dd {
    margin: 0.3rem 0 0;
    color: var(--blog-ink);
    font-weight: 750;
    line-height: 1.5;
}

.author-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.8rem;
}

.author-secondary-link {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    padding: 0 1.1rem;
    border: 1px solid var(--blog-line);
    border-radius: 8px;
    background: #fff;
    color: var(--blog-ink);
    font-weight: 800;
}

.author-secondary-link:hover {
    border-color: var(--blog-blue);
    color: var(--blog-blue);
}

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

.article-content h2,
.article-content h3,
.article-content h4 {
    font-family: var(--blog-font-display);
    scroll-margin-top: 118px;
    letter-spacing: 0;
}

.article-content h2 {
    margin-top: 2.8rem;
    margin-bottom: 1rem;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.1;
}

.article-content h3 {
    margin-top: 2rem;
    margin-bottom: 0.7rem;
    font-size: clamp(1.35rem, 2.4vw, 1.8rem);
    font-weight: 760;
    line-height: 1.18;
}

.article-content h4 {
    margin-top: 1.35rem;
    margin-bottom: 0.5rem;
    color: var(--blog-blue);
    font-size: 1.1rem;
    line-height: 1.2;
}

.article-content p,
.article-content li {
    color: #283344;
    font-size: 1.08rem;
    line-height: 1.82;
}

.article-content p {
    margin-bottom: 1.15rem;
}

.article-content ul,
.article-content ol {
    padding-left: 1.35rem;
    margin: 0.6rem 0 1.35rem;
}

.article-callout {
    margin: 2rem 0;
    padding: 1.25rem;
    border-left: 5px solid var(--blog-teal);
    border-radius: 8px;
    background: rgba(15, 159, 143, 0.08);
}

.article-callout p:last-child {
    margin-bottom: 0;
}

.article-cta-band {
    margin-top: 3rem;
    padding: clamp(1.25rem, 3vw, 2rem);
    border: 1px solid rgba(41, 9, 166, 0.16);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(41, 9, 166, 0.08), rgba(23, 125, 220, 0.08)),
        #ffffff;
}

.article-cta-band h2 {
    margin-top: 0;
}

.editor-main {
    min-height: 100vh;
    padding: clamp(2rem, 4vw, 4rem) 0;
}

.editor-topbar {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    margin-bottom: 2rem;
}

.editor-logo {
    color: var(--brand-primary);
    font-weight: 900;
    letter-spacing: 0;
}

.editor-grid {
    display: grid;
    grid-template-columns: minmax(280px, 430px) minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
}

.editor-panel {
    border: 1px solid var(--blog-line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 16px 38px rgba(17, 24, 39, 0.08);
}

.editor-panel-header {
    padding: 1rem 1.1rem;
    border-bottom: 1px solid var(--blog-line);
}

.editor-panel-header h2 {
    margin: 0;
    font-size: 1rem;
    letter-spacing: 0;
}

.editor-form {
    display: grid;
    gap: 1rem;
    padding: 1.1rem;
}

.editor-field {
    display: grid;
    gap: 0.4rem;
}

.editor-field label {
    color: var(--blog-ink);
    font-size: 0.82rem;
    font-weight: 850;
}

.editor-field input,
.editor-field select,
.editor-field textarea {
    width: 100%;
    border: 1px solid var(--blog-line);
    border-radius: 8px;
    padding: 0.8rem 0.85rem;
    color: var(--blog-ink);
    font: inherit;
    background: #fbfdff;
}

.editor-field textarea {
    min-height: 260px;
    resize: vertical;
    font-family: Consolas, Monaco, monospace;
    font-size: 0.92rem;
}

.editor-actions {
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.editor-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0.7rem 1rem;
    border: 1px solid var(--blog-line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--blog-ink);
    font-weight: 850;
    cursor: pointer;
}

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

.editor-preview-wrap {
    display: grid;
    gap: 1rem;
    padding: 1.1rem;
}

.editor-preview-image {
    display: none;
    width: 100%;
    max-height: 320px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--blog-line);
}

.editor-preview {
    padding: 1rem;
    border: 1px solid var(--blog-line);
    border-radius: 8px;
    background: #ffffff;
}

.editor-preview h1 {
    font-family: var(--blog-font-display);
    margin-bottom: 0.75rem;
    font-size: clamp(2rem, 5vw, 3.4rem);
    line-height: 1;
    letter-spacing: 0;
}

.editor-output {
    min-height: 180px;
    font-family: Consolas, Monaco, monospace;
    font-size: 0.82rem;
}

.home-blog-invite {
    padding: clamp(3rem, 6vw, 5.5rem) 0;
    background:
        linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
    font-family: var(--blog-font-sans);
}

.home-blog-invite__grid {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1fr);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
}

.home-blog-invite__title {
    font-family: var(--blog-font-display);
    max-width: 10ch;
    margin: 0 0 1rem;
    color: var(--blog-ink);
    font-size: clamp(2.6rem, 6vw, 5rem);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: 0;
}

.home-blog-invite__copy {
    max-width: 620px;
    color: var(--blog-muted);
    font-size: clamp(1rem, 2vw, 1.15rem);
    line-height: 1.75;
}

.home-blog-invite__media {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid rgba(17, 24, 39, 0.08);
    box-shadow: 0 24px 70px rgba(17, 24, 39, 0.16);
    background: #dbeafe;
}

.home-blog-invite__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 992px) {
    .blog-hero-grid,
    .blog-feature-link,
    .article-shell,
    .editor-grid,
    .home-blog-invite__grid {
        grid-template-columns: 1fr;
    }

    .blog-title,
    .article-title {
        max-width: 12ch;
    }

    .article-toc {
        position: relative;
        top: auto;
        order: -1;
        max-height: none;
        overflow-y: visible;
        scrollbar-gutter: auto;
    }

    .author-hero-grid,
    .author-content-grid {
        grid-template-columns: 1fr;
    }

    .author-portrait {
        min-height: 360px;
        max-width: 620px;
    }

    .author-portrait img {
        min-height: 360px;
    }

    .author-side-card {
        position: static;
    }

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

    .blog-grid--single {
        max-width: none;
    }
}

@media (max-width: 640px) {
    .blog-main {
        padding-top: 82px;
    }

    .author-main {
        padding-top: 82px;
    }

    .author-title {
        font-size: clamp(2.7rem, 15vw, 4.3rem);
    }

    .author-portrait,
    .author-portrait img {
        min-height: 300px;
    }

    .blog-title,
    .article-title,
    .editor-title {
        font-size: clamp(2.35rem, 14vw, 3.6rem);
    }

    .blog-grid,
    .blog-grid--gallery {
        grid-template-columns: 1fr;
    }

    .blog-gallery-heading {
        align-items: center;
        flex-direction: row;
    }

    .blog-chip-group {
        display: flex;
        align-items: center;
    }

    .blog-chip-group p {
        width: auto;
        flex-basis: auto;
    }

    .blog-chip {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .blog-gallery-section__heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .article-content p,
    .article-content li {
        font-size: 1rem;
    }

    .editor-topbar {
        align-items: flex-start;
        flex-direction: column;
    }
}
