@font-face {
    font-family: 'Sztos-Thin';
    src: url('/fonts/Sztos-Thin.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

:root {
    --max-content-width: 750px;
    --toc-width: 250px;
    --sidenote-width: 250px;
    --main-font: Georgia, 'Times New Roman', serif;
    --heading-font: Georgia, 'Times New Roman', serif;
    --brand-font: 'Sztos-Thin', Georgia, 'Times New Roman', serif;
    --text-color: #333;
    --link-color: #0066cc;
    --border-color: #e0e0e0;
    --bg-subtle: #f9f9f9;
    --sidenote-color: #666;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--main-font);
    font-size: 17px;
    line-height: 1.6;
    color: var(--text-color);
    background: #fafafa;
}

html {
    scroll-behavior: smooth;
}

hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 2rem 0;
}

/* Site Header */
.site-header {
    position: fixed;
    top: 1rem;
    right: 1.5rem;
    z-index: 100;
}

.site-header a {
    text-decoration: none;
    display: inline-block;
    line-height: 0;
}

.site-icon {
    height: 1.8rem;
    width: auto;
}

/* Mobile article header - centered text, scrolls with page */
.mobile-article-header {
    display: none;
}

@media (max-width: 768px) {
    .site-header {
        display: none;
    }

    .mobile-article-header {
        display: block;
        text-align: center;
        font-family: var(--brand-font);
        font-size: 1.1rem;
        letter-spacing: 0.02em;
        margin-bottom: 1.5rem;
        padding-top: 0.5rem;
        color: var(--text-color);
        text-decoration: none;
    }

    .mobile-article-header:hover {
        color: var(--text-color);
    }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 4.5rem 2rem 2rem;
}

/* Content area - flex layout for TOC + article */
.content-area {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
}

/* Table of Contents - Sticky sidebar */
.toc {
    position: sticky;
    top: 2rem;
    flex: 0 0 var(--toc-width);
    align-self: flex-start;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
    font-size: 0.85em;
    line-height: 1.5;
}

.toc h3 {
    font-family: var(--heading-font);
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #888;
    margin-bottom: 1rem;
    font-weight: normal;
}

.toc ul {
    list-style: none;
}

.toc > ul > li {
    margin: 0.5rem 0;
}

.toc li li {
    margin: 0.3rem 0;
}

/* Indent nested levels */
.toc ul ul {
    padding-left: 1.2rem;
    margin-top: 0.2rem;
}

.toc a {
    color: var(--text-color);
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.2s;
    display: block;
}

/* Style different heading levels */
.toc > ul > li > a {
    font-weight: 500;
    opacity: 0.85;
}

.toc ul ul a {
    font-size: 0.95em;
}

.toc ul ul ul a {
    font-size: 0.9em;
    opacity: 0.6;
}

.toc a:hover,
.toc a.active {
    opacity: 1;
}

/* Banner styling */
.banner-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: -1;
    overflow: hidden;
}

.banner-image {
    width: 100%;
    height: auto;
    display: block;
}

/* Show mobile banner on mobile, desktop banner on desktop */
.mobile-banner {
    display: none;
}

@media (max-width: 473px) {
    .desktop-banner {
        display: none;
    }
    
    .mobile-banner {
        display: block;
    }
}

/* Main Content */
article.content {
}

article.content > header {
    max-width: var(--max-content-width);
    margin-left: calc(var(--toc-width) + 2rem);
}

@media (max-width: 1199px) {
    article.content > header {
        margin-left: 0;
    }
}

article header {
    margin-bottom: 2rem;
}

/* Featured image - newspaper/LessWrong style */
.featured-image {
    margin: 2rem -6rem;
    margin-bottom: 2.5rem;
}

.featured-image img,
.featured-image video {
    width: 100%;
    height: auto;
    display: block;
}

/* Add caption support */
.featured-image figcaption {
    font-size: 0.85rem;
    color: #666;
    font-style: italic;
    text-align: center;
    margin-top: 0.75rem;
    padding: 0 3rem;
}

@media (max-width: 768px) {
    .featured-image {
        margin: 2rem 0;
        margin-bottom: 2rem;
    }

    .featured-image figcaption {
        padding: 0 1rem;
    }
}

article h1 {
    font-family: var(--heading-font);
    font-size: 2.2rem;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.description {
    font-size: 1.1rem;
    color: #666;
    margin: 0.5rem 0 1rem 0;
    line-height: 1.5;
    font-style: italic;
}

.meta {
    font-size: 0.9rem;
    color: #888;
}

.meta .author {
    margin-right: 1rem;
}

/* Article Typography */
.article-content h2 {
    font-family: var(--heading-font);
    font-size: 1.6rem;
    margin: 2rem 0 1rem;
    line-height: 1.3;
    scroll-margin-top: 3rem;
}

.article-content h3 {
    font-family: var(--heading-font);
    font-size: 1.3rem;
    margin: 1.5rem 0 0.75rem;
    line-height: 1.3;
    scroll-margin-top: 3rem;
}

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

.article-content a {
    color: var(--link-color);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.article-content a:hover {
    border-bottom-color: var(--link-color);
}

.article-content blockquote {
    border-left: 3px solid var(--border-color);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #666;
}

.article-content code {
    font-size: 0.85em;
    padding: 0.2em 0.4em;
    background: var(--bg-subtle);
    border-radius: 3px;
    font-family: 'Courier New', monospace;
}

.article-content pre {
    background: var(--bg-subtle);
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.article-content pre code {
    padding: 0;
    background: none;
}

/* Regular images in content - newspaper/LessWrong style */
.article-content p img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 2rem auto;
}

/* Utility image sizes for centered, responsive inline HTML images */
.article-content img.img-sm,
.article-content img.img-md,
.article-content img.img-lg {
    width: 100%;
    height: auto;
    display: block;
    margin: 2rem auto;
}

.article-content img.img-sm {
    max-width: 340px;
}

.article-content img.img-md {
    max-width: 400px;
}

.article-content img.img-lg {
    max-width: 100%;
}

/* Style for image captions - Hugo renders as <em> immediately after images */
.article-content p img + em {
    display: block;
    text-align: center;
    font-size: 0.85rem;
    color: #666;
    margin-top: -1.5rem;
    margin-bottom: 2rem;
    line-height: 1.4;
    font-style: italic;
}

/* Wide image/figure grid — 130% article width on desktop, centered */
.fig-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    width: 130%;
    margin-left: -15%;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.fig-grid img {
    width: 100%;
    height: auto;
    display: block;
    border: 1px solid var(--border-color);
}

@media (max-width: 768px) {
    .fig-grid {
        grid-template-columns: repeat(2, 1fr);
        width: 100%;
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    .fig-grid {
        grid-template-columns: 1fr;
    }
}

/* Captions after raw HTML images and tables (rendered as <p><em>...</em></p>) */
.article-content img + p,
.article-content table + p {
    text-align: center;
    font-size: 0.85rem;
    color: #666;
    line-height: 1.4;
}

/* ── Custom Video Player ── */
.video-player {
    width: fit-content;
    max-width: 100%;
    margin: 2rem auto 2.5rem;
    position: relative;
    outline: none;
    border: 2px solid #222;
    background: #000;
}

/* Offset shadow block — sits behind via wrapper to prevent bleed-through */
.video-player::after {
    content: "";
    display: block;
    box-sizing: border-box;
    background: #444;
    border: 2px solid #222;
    position: absolute;
    top: 4px;
    left: 4px;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.video-player:focus-visible {
    outline: 2px solid #0066cc;
    outline-offset: 4px;
}

.vp-screen {
    position: relative;
    cursor: pointer;
    display: block;
    overflow: hidden;
    line-height: 0;
}

.video-player .vp-screen video {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    margin: 0;
    border: 0;
}

/* Overlay play button */
.vp-overlay-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    opacity: 1;
    transition: opacity 0.25s;
}

.vp-overlay-play svg {
    width: 3.5rem;
    height: 3.5rem;
    color: #fff;
    padding: 0.85rem;
    background: #222;
    border: 2px solid #222;
    box-shadow: 3px 3px 0 0 #444;
    transition: transform 0.1s, box-shadow 0.1s;
}

.vp-overlay-play:hover svg {
    transform: translate(1px, 1px);
    box-shadow: 2px 2px 0 0 #444;
}

.vp-overlay-play:active svg {
    transform: translate(3px, 3px);
    box-shadow: 0 0 0 0 #444;
}

.video-player.is-playing .vp-overlay-play {
    opacity: 0;
    pointer-events: none;
}

/* Controls bar */
.vp-controls {
    display: flex;
    align-items: stretch;
    background: #fff;
    border-top: 2px solid #222;
    font-family: var(--main-font);
    user-select: none;
    height: 38px;
}

.vp-btn {
    background: #fff;
    border: none;
    border-right: 2px solid #222;
    cursor: pointer;
    padding: 0 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #222;
    transition: background 0.08s, box-shadow 0.08s, transform 0.08s;
    box-shadow: inset 0 -2px 0 0 #ddd;
}

.vp-btn:hover {
    background: #f5f5f5;
    box-shadow: inset 0 -2px 0 0 #ccc;
}

.vp-btn:active {
    background: #eee;
    box-shadow: inset 0 2px 0 0 #ccc;
    transform: translateY(1px);
}

.vp-btn svg {
    width: 12px;
    height: 12px;
}

/* Play/pause icon toggle */
.vp-icon-pause { display: none; }
.video-player.is-playing .vp-icon-play { display: none; }
.video-player.is-playing .vp-icon-pause { display: block; }

/* Time display */
.vp-time {
    font-size: 0.72rem;
    color: #222;
    font-weight: bold;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    letter-spacing: 0.02em;
    padding: 0 14px;
    display: flex;
    align-items: center;
    border-right: 2px solid #222;
}

.vp-sep {
    margin: 0 0.25em;
    color: #888;
}

/* Progress bar */
.vp-progress {
    flex: 1;
    padding: 0 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    border-right: 2px solid #222;
}

.vp-progress-track {
    width: 100%;
    height: 3px;
    background: #ddd;
    position: relative;
}

.vp-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    background: #222;
    transition: width 0.05s linear;
}

.vp-progress-fill::after {
    content: "";
    position: absolute;
    right: -4px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: #222;
    border: 1px solid #222;
    box-shadow: 1px 1px 0 0 #444;
    transition: box-shadow 0.08s, transform 0.08s;
}

.vp-progress:active .vp-progress-fill::after {
    transform: translateY(-50%) translate(1px, 1px);
    box-shadow: 0 0 0 0 #444;
}

.vp-progress-hover {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    background: rgba(0, 0, 0, 0.08);
    opacity: 0;
    transition: opacity 0.15s;
    pointer-events: none;
}

.vp-progress:hover .vp-progress-track {
    height: 4px;
}

.vp-progress-tip {
    position: absolute;
    bottom: 10px;
    transform: translateX(-50%);
    background: #222;
    color: #fff;
    font-family: var(--main-font);
    font-size: 0.65rem;
    font-weight: bold;
    font-variant-numeric: tabular-nums;
    padding: 2px 5px;
    border: 1px solid #222;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.1s;
    z-index: 10;
}

/* Volume controls */
.vp-volume {
    display: flex;
    align-items: center;
    border-right: 2px solid #222;
}

.vp-volume .vp-mute-btn {
    border-right: none;
    padding: 0 8px 0 12px;
    box-shadow: none;
    color: #555;
}

.vp-volume .vp-mute-btn:hover {
    background: none;
    box-shadow: none;
    color: #222;
}

.vp-volume .vp-mute-btn:active {
    background: none;
    box-shadow: none;
    transform: none;
    color: #222;
}

.vp-volume .vp-mute-btn svg {
    width: 16px;
    height: 16px;
}

.vp-volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 48px;
    height: 3px;
    background: #ddd;
    outline: none;
    cursor: pointer;
    margin-right: 12px;
}

.vp-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 10px;
    height: 10px;
    background: #222;
    border: 1px solid #222;
    box-shadow: 1px 1px 0 0 #444;
    cursor: pointer;
    transition: box-shadow 0.08s, transform 0.08s;
}

.vp-volume-slider:active::-webkit-slider-thumb {
    box-shadow: 0 0 0 0 #444;
    transform: translate(1px, 1px);
}

.vp-volume-slider::-moz-range-thumb {
    width: 10px;
    height: 10px;
    background: #222;
    border: 1px solid #222;
    box-shadow: 1px 1px 0 0 #444;
    cursor: pointer;
}

.vp-volume-slider:active::-moz-range-thumb {
    box-shadow: 0 0 0 0 #444;
    transform: translate(1px, 1px);
}

/* Mute icon toggle */
.vp-icon-muted { display: none; }
.video-player.is-muted .vp-icon-vol { display: none; }
.video-player.is-muted .vp-icon-muted { display: block; }

/* Fullscreen button */
.vp-fullscreen-btn {
    border-right: none;
}

.vp-fullscreen-btn svg {
    width: 11px;
    height: 11px;
}

/* Fullscreen state */
.video-player:fullscreen {
    background: #000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: none;
}

.video-player:fullscreen::after {
    display: none;
}

.video-player:fullscreen .vp-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px);
}

/* Fallback for plain video embeds */
.article-content video {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 2rem auto;
    border: 2px solid #222;
}

.article-content video + em {
    display: block;
    text-align: center;
    font-size: 0.85rem;
    color: #666;
    margin-top: -1.5rem;
    margin-bottom: 2rem;
    line-height: 1.4;
    font-style: italic;
}

@media (max-width: 768px) {
    .vp-overlay-play svg {
        width: 2.8rem;
        height: 2.8rem;
        padding: 0.65rem;
    }

    .vp-controls {
        height: 34px;
    }

    .vp-btn {
        padding: 0 10px;
    }

    .vp-time {
        font-size: 0.68rem;
        padding: 0 10px;
    }

    .vp-progress {
        padding: 0 10px;
    }

    .vp-volume-slider {
        width: 36px;
    }

    .video-player::after {
        top: 3px;
        left: 3px;
    }
}

/* Audio player — controls-only variant */
.audio-player {
    background: #fff;
    width: 100%;
}

.audio-player .vp-controls {
    border-top: none;
}

/* If Hugo uses figure tags */
.article-content figure {
    margin: 2rem 0;
    text-align: center;
}

.article-content figure img {
    margin: 0 auto;
    max-width: 100%;
    height: auto;
}

.article-content figcaption {
    font-size: 0.85rem;
    color: #666;
    font-style: italic;
    margin-top: 0.75rem;
    line-height: 1.4;
}

/* Sidenotes */
.sidenote {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--sidenote-color);
    transition: background-color 0.2s;
    padding: 0.5rem;
    border-radius: 3px;
    font-style: normal;
    text-align: left;
}

.sidenote-ref {
    font-size: 0.8em;
    vertical-align: super;
    color: var(--link-color);
    cursor: pointer;
    margin-left: -0.2em;
    margin-right: 0.1em;
    transition: background-color 0.2s;
    padding: 0.1em 0.3em;
    border-radius: 2px;
}

/* Hover either ref or sidenote -> highlight both via parent wrapper */
.sidenote-wrapper:hover .sidenote-ref {
    background-color: rgba(0, 102, 204, 0.15);
}

.sidenote-wrapper:hover .sidenote {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Desktop: Sidenotes in right margin - only when viewport is wide enough */
@media (min-width: 1400px) {
    .sidenote {
        position: absolute;
        right: calc(-1 * var(--sidenote-width) - 2rem);
        width: var(--sidenote-width);
        margin-top: -0.5rem;
    }
}

/* Sidenotes inline when not enough room for margin */
@media (max-width: 1399px) {
    .sidenote {
        display: block;
        margin: 2rem 0;
        padding: 0.75rem 0 0.75rem 1rem;
        border-left: 3px solid var(--border-color);
        background: var(--bg-subtle);
    }

    .article-content .sidenote {
        display: none !important;
    }

    .block-footnotes {
        margin: 1rem 0 2rem 0;
        padding: 0.75rem 0 0.75rem 1rem;
        border-left: 3px solid var(--border-color);
        background: var(--bg-subtle);
        font-size: 0.85rem;
        line-height: 1.5;
        color: var(--sidenote-color);
    }

    .block-footnotes p {
        margin: 0.5rem 0;
    }

    .block-footnotes p:first-child {
        margin-top: 0;
    }

    .block-footnotes p:last-child {
        margin-bottom: 0;
    }
}

/* Tablet/Mobile: collapse layout */
@media (max-width: 1199px) {
    .content-area {
        display: block;
    }

    .toc {
        display: none;
    }

    article.content {
        margin: 0 auto;
    }

    article.content > header {
        max-width: var(--max-content-width);
        margin: 0 auto;
    }

    .article-content {
        margin: 0 auto;
    }

    .featured-image {
        margin: 2rem 0;
        margin-bottom: 2rem;
    }
}

/* List/Home Pages */
.list-container,
.home {
    max-width: var(--max-content-width);
    margin: 0 auto;
}

.home header {
    margin-bottom: 3rem;
    text-align: center;
}

.home h1 {
    font-family: var(--heading-font);
}

.site-description {
    font-size: 1.2rem;
    color: #666;
    margin-top: 1rem;
}

.post-item {
    margin: 2rem 0;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.post-item:last-child {
    border-bottom: none;
}

.post-item h2,
.post-item h3 {
    font-family: var(--heading-font);
    margin-bottom: 0.5rem;
}

.post-item h2 a,
.post-item h3 a {
    color: var(--text-color);
    text-decoration: none;
}

.post-item h2 a:hover,
.post-item h3 a:hover {
    color: var(--link-color);
}

.post-item time {
    font-size: 0.9rem;
    color: #888;
}

.summary {
    margin-top: 0.75rem;
    color: #666;
}

/* Lists - prevent jutting out */
.article-content ul,
.article-content ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.article-content li {
    margin: 0.4rem 0;
}

/* Nested lists */
.article-content li ul,
.article-content li ol {
    margin-top: 0.4rem;
    margin-bottom: 0.4rem;
}

/* Table wrapper for scroll */
.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1.5rem 0;
    max-width: 100%;
}

/* Tables */
.article-content table {
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.95em;
    border: 1px solid var(--border-color);
    width: max-content;
    max-width: 100%;
    margin: 1.5rem auto;
}

/* Prevent tables from expanding page width */
.article-content {
    max-width: var(--max-content-width);
    position: relative;
    overflow-x: hidden;
}

.article-content .table-scroll {
    margin: 1.5rem 0;
}

.article-content .table-scroll table {
    margin: 0;
}

.article-content thead {
    background: var(--bg-subtle);
}

.article-content th {
    padding: 0.5rem 0.75rem;
    text-align: left;
    font-weight: 600;
    border-right: 1px solid var(--border-color);
    border-bottom: 2px solid var(--border-color);
}

.article-content th:last-child {
    border-right: none;
}

.article-content td {
    padding: 0.4rem 0.75rem;
    border-bottom: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
}

.article-content td:last-child {
    border-right: none;
}

/* Zebra striping - using td for Safari compatibility */
.article-content tbody tr:nth-child(even) td {
    background: rgba(0, 0, 0, 0.015);
}

.article-content tbody tr:hover td {
    background: rgba(0, 0, 0, 0.04);
}

.article-content tbody tr:last-child td {
    border-bottom: none;
}

@media (max-width: 1400px) {
    .toc {
        font-size: 0.8em;
    }
}

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

.collaborators {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: #888;
}

.collaborators h3 {
    font-family: var(--heading-font);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    font-weight: normal;
}

.collaborators ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.5rem;
}

.collaborators li {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .collaborators ul {
        grid-template-columns: 1fr;
    }
}

/* ── Inline Comment Widget ── */
.draft-banner {
    position: sticky;
    top: 0;
    z-index: 1001;
    background: #fff8b0;
    text-align: center;
    padding: 3px 16px;
    font-family: var(--main-font);
    font-size: 0.72rem;
    color: #665d00;
    letter-spacing: 0.02em;
    border-bottom: 1px solid #e6d94a;
}

.comments-enabled article.content ::selection {
    background: #fff176;
}

.comments-enabled article.content ::-moz-selection {
    background: #fff176;
}


.comment-popover {
    position: absolute;
    z-index: 1000;
    transform: translateX(-50%) translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s;
}

.comment-popover.visible {
    opacity: 1;
    pointer-events: auto;
}

.comment-btn {
    font-family: var(--main-font);
    font-size: 0.78rem;
    background: #222;
    color: #fff;
    border: none;
    padding: 5px 14px;
    cursor: pointer;
    letter-spacing: 0.03em;
}

.comment-btn:hover {
    background: #444;
}

.comment-form {
    background: #fff;
    border: 2px solid #222;
    padding: 14px;
    width: 300px;
    box-shadow: 3px 3px 0 0 #444;
}

.comment-quote {
    font-size: 0.78rem;
    color: #888;
    font-style: italic;
    margin-bottom: 10px;
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.comment-input {
    font-family: var(--main-font);
    font-size: 0.85rem;
    width: 100%;
    border: 1px solid #ddd;
    padding: 8px;
    resize: vertical;
    line-height: 1.4;
    box-sizing: border-box;
}

.comment-input:focus {
    outline: none;
    border-color: #222;
}

.comment-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 10px;
}

.comment-cancel,
.comment-send {
    font-family: var(--main-font);
    font-size: 0.78rem;
    padding: 5px 14px;
    cursor: pointer;
    border: 1px solid #222;
    letter-spacing: 0.03em;
}

.comment-cancel {
    background: #fff;
    color: #222;
}

.comment-cancel:hover {
    background: #f5f5f5;
}

.comment-send {
    background: #222;
    color: #fff;
}

.comment-send:hover {
    background: #444;
}

.comment-send:disabled {
    opacity: 0.7;
    cursor: default;
}

@media (max-width: 768px) {
    .comment-popover {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        transform: none;
    }

    .comment-btn {
        display: block;
        width: 100%;
        padding: 14px 16px;
        font-size: 0.9rem;
        border-top: 2px solid #222;
    }

    .comment-form {
        width: 100%;
        border: none;
        border-top: 2px solid #222;
        box-shadow: none;
    }

    .comment-input {
        font-size: 16px;
    }
}