/* CopyTox Page Layout v1.0 — Blog & Company pages (no sidebar) */

/* ========== PAGE SHELL ========== */
.page-layout {
    padding-top: 64px;
}

.page-main {
    min-height: calc(100vh - 64px - 280px);
}

.wrap {
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: 24px;
}

.serif {
    font-family: 'Fraunces', Georgia, serif;
}

/* ========== NAVBAR ========== */
.pnav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
}

.pnav__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 32px;
}

.pnav__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 700;
    font-size: 1.15rem;
    text-decoration: none;
    flex-shrink: 0;
}

.pnav__brand i {
    font-size: 1.3rem;
    color: var(--accent);
}

.pnav__brand:hover {
    color: var(--text);
}

.pnav__links {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.pnav__links a {
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-2);
    border-radius: var(--r-md);
    transition: color 0.15s, background 0.15s;
    text-decoration: none;
}

.pnav__links a:hover {
    color: var(--text);
    background: var(--surface-2);
}

.pnav__links a.active {
    color: var(--text);
    background: var(--surface-2);
}

.pnav__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.pnav__user {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
}

.pnav__user img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pnav__toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 4px;
    border-radius: var(--r-sm);
}

.pnav__toggle:hover {
    background: rgba(255, 255, 255, 0.08);
}

.pnav__toggle .ph-x {
    display: none;
}

/* ========== BLOG HERO (compact header) ========== */
.blog-hero {
    padding: 32px 0 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.blog-hero__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding-bottom: 28px;
}

.blog-hero__text h1 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.blog-hero__text p {
    color: var(--text-2);
    font-size: 15px;
    margin-top: 6px;
    line-height: 1.5;
}

.blog-hero__count {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    padding: 14px 22px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
}

.blog-hero__num {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
}

.blog-hero__label {
    font-family: var(--f-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ========== BLOG FEED ========== */
.blog-feed {
    padding: 36px 0 clamp(48px, 7vw, 80px);
}

/* ========== BREADCRUMB ========== */
.crumb {
    display: flex;
    align-items: center;
    gap: 9px;
    font-family: var(--f-mono);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.crumb a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.12s;
}

.crumb a:hover {
    color: var(--accent);
}

.crumb__sep {
    opacity: 0.5;
}

.crumb > span:last-child {
    color: var(--text);
}

/* ========== CATEGORY CHIPS ========== */
.cat-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 34px;
}

.cat-chip {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-2);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-full);
    transition: all 0.15s;
    text-decoration: none;
}

.cat-chip:hover {
    border-color: var(--text);
    color: var(--text);
}

.cat-chip.active {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
}

/* ========== BLOG GRID ========== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
}

.blog-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
    transition: transform 0.25s var(--ease), box-shadow 0.25s;
}

.blog-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.blog-card__img {
    display: block;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--surface-2);
}

.blog-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s var(--ease);
}

.blog-card:hover .blog-card__img img {
    transform: scale(1.04);
}

.blog-card__body {
    padding: 20px 22px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card__meta {
    display: flex;
    align-items: center;
    gap: 9px;
    font-family: var(--f-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.blog-card__cat {
    color: var(--accent);
    font-weight: 700;
    text-decoration: none;
}

.blog-card__cat:hover {
    text-decoration: underline;
}

.blog-card__dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--text-muted);
}

.blog-card__body h3 {
    font-size: 19px;
    font-weight: 600;
    line-height: 1.24;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.blog-card__body h3 a {
    color: var(--text);
    text-decoration: none;
}

.blog-card__body h3 a:hover {
    color: var(--accent);
}

.blog-card__excerpt {
    font-size: 14px;
    color: var(--text-2);
    line-height: 1.6;
    flex: 1;
}

.blog-card__read {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-top: 18px;
    transition: gap 0.2s, color 0.15s;
    text-decoration: none;
}

.blog-card__read i.ph {
    color: var(--accent);
    transition: transform 0.2s;
}

.blog-card:hover .blog-card__read {
    color: var(--accent);
}

.blog-card:hover .blog-card__read i.ph {
    transform: translateX(3px);
}

/* ========== ARTICLE HEADER ========== */
.article-header {
    background: var(--surface);
    padding: 32px 0 28px;
    border-bottom: 1px solid var(--border);
}

.article-header__inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.article-header__cat {
    display: inline-flex;
    font-family: var(--f-mono);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent);
    background: var(--accent-soft);
    padding: 5px 12px;
    border-radius: var(--r-full);
    margin-bottom: 12px;
    text-decoration: none;
}

.article-header h1 {
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.025em;
    color: var(--text);
}

.article-header__desc {
    color: var(--text-2);
    font-size: 15px;
    line-height: 1.6;
    margin-top: 10px;
    max-width: 62ch;
}

.article-header__byline {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
}

.article-header__avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-light);
    flex-shrink: 0;
}

.article-header__avatar--initial {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    color: #fff;
    background: var(--accent);
}

.article-header__byline-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.article-header__byline-top {
    display: flex;
    align-items: center;
    gap: 8px;
}

.article-header__author {
    color: var(--text);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
}

.article-header__author:hover {
    color: var(--accent);
}

.article-header__role {
    color: var(--text-muted);
    font-size: 12px;
    padding: 1px 8px;
    background: var(--surface-2);
    border-radius: 10px;
}

.article-header__byline-bottom {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: var(--text-muted);
}

.article-header__dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--text-muted);
    opacity: 0.6;
}

/* ========== ARTICLE LAYOUT (body + TOC) ========== */
.article-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 56px;
    padding-block: clamp(40px, 6vw, 72px) clamp(48px, 7vw, 88px);
    align-items: start;
}

.article-layout > aside {
    position: sticky;
    top: 88px;
}

.article-layout--full {
    display: block;
    max-width: 780px;
}

.article-layout--full .article-body {
    max-width: none;
}

.article-body {
    max-width: 780px;
}

.article-body > *:first-child {
    margin-top: 0;
}

.article-body > *:last-child {
    margin-bottom: 0;
}

.article-body h1,
.article-body h2,
.article-body h3,
.article-body h4,
.article-body h5,
.article-body h6 {
    color: var(--text);
    line-height: 1.2;
    margin-top: 36px;
    margin-bottom: 14px;
    letter-spacing: -0.01em;
}

.article-body h1 {
    font-size: 1.8rem;
    font-weight: 700;
}

.article-body h2 {
    font-size: 1.45rem;
    font-weight: 600;
}

.article-body h3 {
    font-size: 1.15rem;
    font-weight: 600;
}

.article-body p {
    margin-bottom: 18px;
    line-height: 1.8;
    color: var(--text-2);
    font-size: 15.5px;
}

.article-body a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.article-body img {
    border-radius: var(--r-md);
    margin: 24px 0;
}

.article-body ul,
.article-body ol {
    padding-left: 24px;
    margin-bottom: 18px;
    color: var(--text-2);
}

.article-body li {
    margin-bottom: 8px;
    line-height: 1.7;
    font-size: 15px;
}

.article-body blockquote {
    border-left: 3px solid var(--accent);
    padding: 14px 22px;
    background: var(--surface-2);
    border-radius: 0 var(--r-md) var(--r-md) 0;
    margin: 18px 0;
    color: var(--text-2);
    font-style: italic;
}

.article-body pre {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 16px 20px;
    overflow-x: auto;
    margin: 18px 0;
    font-family: var(--f-mono);
    font-size: 14px;
    color: var(--text);
}

.article-body code {
    font-family: var(--f-mono);
    font-size: 0.9em;
    background: var(--surface-2);
    padding: 2px 6px;
    border-radius: 4px;
}

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

/* Article TOC */
.article-toc {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 20px;
}

.article-toc h4 {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.article-toc ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 60vh;
    overflow-y: auto;
}

.article-toc a {
    display: block;
    padding: 6px 12px;
    font-size: 13px;
    color: var(--text-2);
    border-radius: var(--r-sm);
    border-left: 2px solid transparent;
    transition: all 0.15s;
    text-decoration: none;
    line-height: 1.4;
}

.article-toc a:hover,
.article-toc a.active {
    color: var(--accent);
    background: var(--accent-soft);
    border-left-color: var(--accent);
}

/* ========== COMMENTS ========== */
.comment-section__title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.comment-section__desc {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 24px;
}

.comment-form textarea {
    width: 100%;
    min-height: 80px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 12px 14px;
    color: var(--text);
    font-family: var(--f-body);
    font-size: 14px;
    resize: vertical;
}

.comment-form textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.comment-form .btn {
    margin-top: 10px;
}

/* Old comment styles removed — see comments-section below */

/* ========== RELATED ARTICLES ========== */
.related-section {
    padding: clamp(40px, 6vw, 72px) 0;
    border-top: 1px solid var(--border);
}

.related-section .seg-head {
    margin-bottom: 28px;
}

.related-section .blog-grid {
    gap: 20px;
}

/* ========== PROSE PAGES (Privacy, Terms, Disclaimer) ========== */
.prose-hero {
    background: var(--surface);
    padding: 32px 0 28px;
    border-bottom: 1px solid var(--border);
}

.prose-hero__inner {
    position: relative;
}

.prose-hero h1 {
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    font-weight: 600;
    letter-spacing: -0.025em;
    color: var(--text);
    line-height: 1.1;
}

.prose-hero__lead {
    color: var(--text-2);
    font-size: 17px;
    line-height: 1.6;
    margin-top: 14px;
    max-width: 62ch;
}

.prose-page {
    padding: clamp(40px, 6vw, 72px) 0 clamp(48px, 7vw, 88px);
}

.prose-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 56px;
}

.prose-toc {
    position: sticky;
    top: 88px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

.prose-toc h4 {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.prose-toc a {
    display: block;
    font-size: 13px;
    color: var(--text-2);
    padding: 6px 12px;
    border-radius: var(--r-sm);
    border-left: 2px solid transparent;
    transition: all 0.15s;
    text-decoration: none;
    line-height: 1.4;
}

.prose-toc a:hover,
.prose-toc a.active {
    color: var(--accent);
    background: var(--accent-soft);
    border-left-color: var(--accent);
}

.prose-content {
    max-width: 780px;
}

.prose-meta {
    font-family: var(--f-mono);
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 28px;
}

.prose-content h2 {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--text);
    margin-top: 40px;
    margin-bottom: 14px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.prose-content h2:first-of-type {
    border-top: none;
    padding-top: 0;
}

.prose-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin-top: 24px;
    margin-bottom: 8px;
}

.prose-content p {
    color: var(--text-2);
    line-height: 1.75;
    margin-bottom: 16px;
    font-size: 15px;
}

.prose-content ul,
.prose-content ol {
    padding-left: 24px;
    margin-bottom: 16px;
    color: var(--text-2);
}

.prose-content li {
    margin-bottom: 8px;
    line-height: 1.65;
    font-size: 15px;
}

.prose-content ol li {
    list-style-type: decimal;
}

.prose-content a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.prose-content strong {
    color: var(--text);
    font-weight: 600;
}

.inline-link {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.prose-table {
    overflow-x: auto;
    margin: 18px 0;
    border-radius: var(--r-md);
    border: 1px solid var(--border);
}

.prose-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.prose-table th {
    background: var(--surface-2);
    text-align: left;
    padding: 12px 16px;
    font-weight: 600;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.prose-table td {
    padding: 12px 16px;
    color: var(--text-2);
    border-bottom: 1px solid var(--border);
    line-height: 1.5;
}

.prose-table tbody tr:last-child td {
    border-bottom: none;
}

.callout {
    display: flex;
    gap: 14px;
    padding: 18px 22px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    margin: 24px 0;
    font-size: 14px;
    color: var(--text-2);
    line-height: 1.6;
}

.callout i.ph {
    font-size: 20px;
    color: var(--accent);
    flex-shrink: 0;
    margin-top: 2px;
}

.callout p {
    margin: 0;
}

/* ========== AUTHOR HERO (horizontal profile) ========== */
.author-hero {
    padding: 32px 0 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.author-hero__inner {
    padding-bottom: 28px;
}

.author-hero__profile {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-top: 14px;
}

.author-hero__avatar-wrap {
    flex-shrink: 0;
}

.author-hero__avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border-light);
}

.author-hero__avatar--init {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.8rem;
    color: #fff;
    background: var(--accent);
}

.author-hero__info h1 {
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.author-hero__role {
    color: var(--accent);
    font-size: 14px;
    font-weight: 500;
    margin-top: 2px;
}

.author-hero__bio {
    color: var(--text-2);
    font-size: 14px;
    line-height: 1.6;
    margin-top: 6px;
    max-width: 480px;
}

.author-hero__stats {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 10px;
    font-size: 13px;
    color: var(--text-muted);
}

.author-hero__stats i.ph {
    color: var(--accent);
    margin-right: 4px;
}

/* ========== ABOUT PAGE ========== */
.about-hero {
    padding: 32px 0 28px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.about-hero__eyebrow {
    font-family: var(--f-mono);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent);
    margin-bottom: 10px;
}

.about-hero__inner h1 {
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.025em;
    line-height: 1.12;
}

.about-hero__sub {
    color: var(--text-2);
    font-size: 16px;
    line-height: 1.65;
    margin-top: 14px;
    max-width: 62ch;
}

.about-body {
    padding: clamp(40px, 6vw, 64px) 0 clamp(48px, 7vw, 80px);
}

.about-body__content {
    max-width: 720px;
}

.about-body__content h2 {
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.02em;
    margin-top: 48px;
    margin-bottom: 14px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}

.about-body__content h2:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.about-body__content p {
    color: var(--text-2);
    font-size: 15px;
    line-height: 1.75;
    margin-bottom: 14px;
}

.about-body__content strong {
    color: var(--text);
}

.about-body__content ul {
    list-style: none;
    padding: 0;
    margin: 0 0 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.about-body__content li {
    color: var(--text-2);
    font-size: 15px;
    line-height: 1.6;
    padding-left: 24px;
    position: relative;
}

.about-body__content li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.6;
}

.about-body__content a:not(.btn) {
    color: var(--accent);
    text-decoration: none;
}

.about-body__content a:not(.btn):hover {
    text-decoration: underline;
}

.about-body__actions {
    display: flex;
    gap: 12px;
    margin-top: 36px;
    flex-wrap: wrap;
}

.btn--accent {
    background: var(--accent);
    color: #fff;
    border: 1px solid var(--accent);
}

.btn--accent:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: #fff;
}

.btn--lg {
    padding: 12px 28px;
    font-size: 15px;
}

/* ========== CONTACT PAGE ========== */
.contact-hero {
    padding: 32px 0 clamp(28px, 4vw, 44px);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.contact-hero__inner {
}

.contact-hero__eyebrow {
    font-family: var(--f-mono);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent);
    margin-bottom: 8px;
}

.contact-hero__inner h1 {
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.025em;
    line-height: 1.12;
}

.contact-hero__sub {
    color: var(--text-2);
    font-size: 15px;
    line-height: 1.6;
    margin-top: 10px;
}

.contact-main {
    padding: clamp(36px, 5vw, 64px) 0 clamp(48px, 7vw, 80px);
}

.contact-main__layout {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 40px;
    align-items: start;
}

.contact-form {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: 32px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.form-input,
.form-textarea {
    width: 100%;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 10px 14px;
    color: var(--text);
    font-family: var(--f-body);
    font-size: 14px;
    transition: border-color 0.15s;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

.form-group.invalid .form-input,
.form-group.invalid .form-textarea {
    border-color: var(--danger);
}

.form-error {
    display: none;
    font-size: 12px;
    color: var(--danger);
    margin-top: 4px;
}

.form-group.invalid .form-error {
    display: block;
}

.contact-form__note {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 12px;
    text-align: center;
}

.form-success {
    display: none;
    text-align: center;
    padding: 32px 0;
}

.form-success.show {
    display: block;
}

.form-success__icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--success-soft);
    color: var(--success);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 16px;
}

.form-success h2 {
    color: var(--text);
    margin-bottom: 8px;
}

.form-success p {
    color: var(--text-2);
    font-size: 15px;
}

/* FAQ */
.faq-band {
    border-top: 1px solid var(--border);
}

.faq-grid {
    max-width: 720px;
    margin-inline: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    overflow: hidden;
}

.faq-q {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 16px 20px;
    background: var(--surface);
    border: none;
    color: var(--text);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    font-family: var(--f-body);
    gap: 12px;
}

.faq-q:hover {
    background: var(--surface-2);
}

.faq-q i.ph {
    font-size: 14px;
    color: var(--text-muted);
    transition: transform 0.2s;
    flex-shrink: 0;
}

.faq-item.open .faq-q i.ph {
    transform: rotate(180deg);
}

.faq-a {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s;
}

.faq-a p {
    padding: 0 20px 16px;
    font-size: 14px;
    color: var(--text-2);
    line-height: 1.65;
}

.faq-item.open .faq-a {
    max-height: 300px;
}

/* ========== CONTACT SIDEBAR ========== */
.contact-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.contact-info-card,
.contact-faq-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 24px;
}

.contact-info-card h3,
.contact-faq-card h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 18px;
}

.contact-info-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.contact-info-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.contact-info-row:first-of-type {
    padding-top: 0;
}

.contact-info-row > i.ph {
    font-size: 20px;
    color: var(--accent);
    margin-top: 2px;
    flex-shrink: 0;
}

.contact-info-row > div {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.contact-info-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

.contact-info-row > div > span:last-child {
    font-size: 14px;
    color: var(--text-2);
}

/* ========== EMPTY STATE ========== */
.empty-state {
    text-align: center;
    padding: clamp(48px, 8vw, 88px) 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.empty-state__icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--surface-2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.empty-state h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text);
}

.empty-state p {
    color: var(--text-2);
    font-size: 15px;
}

/* ========== PAGINATION ========== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 40px;
    list-style: none;
}

.pagination .page-item .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-2);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    text-decoration: none;
    transition: all 0.15s;
}

.pagination .page-item .page-link:hover {
    background: var(--surface-2);
    color: var(--text);
}

.pagination .page-item.active .page-link {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.pagination .page-item.disabled .page-link {
    opacity: 0.4;
    pointer-events: none;
}

/* ========== SHARED SECTION HELPERS ========== */
.seg {
    position: relative;
}

/* ========== REVEAL ANIMATION ========== */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s, transform 0.5s;
}

.reveal.in {
    opacity: 1;
    transform: none;
}

/* ========== FOOTER ========== */
.pftr {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 56px 0 32px;
    margin-top: 0;
}

.pftr__grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
}

.pftr__logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 700;
    font-size: 1.15rem;
    text-decoration: none;
    margin-bottom: 14px;
}

.pftr__logo i {
    font-size: 1.3rem;
    color: var(--accent);
}

.pftr__logo:hover {
    color: var(--text);
}

.pftr__brand p {
    font-size: 14px;
    color: var(--text-2);
    line-height: 1.6;
    max-width: 280px;
}

.pftr__col h4 {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text);
    margin-bottom: 16px;
}

.pftr__col a {
    display: block;
    font-size: 14px;
    color: var(--text-2);
    padding: 4px 0;
    text-decoration: none;
    transition: color 0.15s;
}

.pftr__col a:hover {
    color: var(--accent);
}

.pftr__bottom {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-muted);
}

.pftr__dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--text-muted);
}

/* ========== SECTION HEAD (with side link) ========== */
.seg-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 44px;
}

.seg-head__text {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.seg-head--center {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
}

.btn--text {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-2);
    text-decoration: none;
    transition: color 0.15s;
}

.btn--text:hover {
    color: var(--accent);
}

.btn--text i.ph {
    transition: transform 0.2s;
}

.btn--text:hover i.ph {
    transform: translateX(3px);
}

/* ========== COMMENTS SECTION ========== */
.comments-section {
    max-width: 820px;
    margin-inline: auto;
}

.comments-head {
    margin-bottom: 26px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.comments-head .label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--f-mono);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.comments-head .label__idx {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--border-light);
    color: var(--text);
    font-size: 12px;
}

.comments-head h2 {
    font-size: clamp(1.4rem, 2.4vw, 1.9rem);
    font-weight: 600;
    color: var(--text);
}

.comment-form {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 16px;
    margin-bottom: 32px;
}

.comment-form textarea {
    width: 100%;
    min-height: 90px;
    resize: vertical;
    border: none;
    outline: none;
    background: none;
    font-size: 14.5px;
    color: var(--text);
    line-height: 1.6;
    font-family: var(--f-body);
}

.comment-form textarea::placeholder {
    color: var(--text-muted);
}

.comment-form textarea:disabled {
    color: var(--text-muted);
    cursor: not-allowed;
}

.comment-form__foot {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.comment-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.comment {
    padding: 22px 0;
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}

.comment__head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.comment__avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--surface-2);
}

.comment__avatar--initial {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    color: #fff;
    background: var(--accent);
}

.comment__name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
}

.comment__date {
    font-size: 12px;
    color: var(--text-muted);
}

.comment__body {
    font-size: 15px;
    color: var(--text-2);
    line-height: 1.7;
    word-break: break-word;
    overflow-wrap: break-word;
}

.comment__actions {
    margin-top: 10px;
}

.comment__reply-btn {
    font-size: 13px;
    color: var(--accent);
    font-weight: 600;
    cursor: pointer;
    background: none;
    border: none;
    font-family: var(--f-body);
}

.comment__login-note {
    font-size: 13px;
    color: var(--text-muted);
}

.comment__reply-form {
    display: none;
    margin-top: 12px;
}

.comment__reply-form.open {
    display: block;
}

.comment__reply-form textarea {
    width: 100%;
    min-height: 70px;
    resize: vertical;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    outline: none;
    font-size: 14px;
    color: var(--text);
    background: var(--surface-2);
    font-family: var(--f-body);
    transition: border-color 0.15s;
    box-sizing: border-box;
    max-width: 100%;
}

.comment__reply-form textarea:focus {
    border-color: var(--accent);
}

.comment__reply-form button {
    margin-top: 10px;
}

.comment__replies {
    margin-left: 52px;
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 100%;
    overflow: hidden;
}

.reply {
    display: flex;
    gap: 12px;
    min-width: 0;
}

.reply > div {
    min-width: 0;
    flex: 1;
}

.reply__avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--surface-2);
}

.reply__avatar--initial {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    color: #fff;
    background: var(--accent);
}

.reply__name {
    font-weight: 600;
    font-size: 13px;
    color: var(--text);
}

.reply__date {
    font-size: 11px;
    color: var(--text-muted);
    margin-left: 8px;
}

.reply__text {
    font-size: 14px;
    color: var(--text-2);
    line-height: 1.6;
    margin-top: 4px;
    word-break: break-word;
    overflow-wrap: break-word;
}

.comments-empty {
    text-align: center;
    padding: 40px 24px;
    background: var(--surface);
    border: 1px dashed var(--border);
    border-radius: var(--r-lg);
    color: var(--text-muted);
}

.comments-empty__icon {
    font-size: 28px;
    display: block;
    margin-bottom: 8px;
}

/* ========== MORE COLLECTIONS / RELATED ========== */
.more-collections {
    border-top: 1px solid var(--border);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
    .contact-main__layout {
        grid-template-columns: 1fr;
    }

    .article-layout {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .article-layout > .article-body {
        order: 2;
    }

    .article-layout > aside {
        order: 1;
        position: static;
        margin-bottom: 28px;
    }

    .article-toc {
        max-height: none;
    }

    .article-toc ul {
        max-height: none;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 4px;
    }

    .article-toc a {
        border-left: none;
        border-bottom: 2px solid transparent;
        padding: 4px 10px;
        font-size: 12px;
    }

    .article-toc a:hover,
    .article-toc a.active {
        border-left-color: transparent;
        border-bottom-color: var(--accent);
    }
}

@media (max-width: 900px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pftr__grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }

    .prose-layout {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .prose-toc {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
        margin-bottom: 28px;
        max-height: none;
        padding-bottom: 20px;
        border-bottom: 1px solid var(--border);
    }

    .prose-toc h4 {
        width: 100%;
        margin-bottom: 6px;
    }

    .prose-toc a {
        border-left: none;
        border-bottom: 2px solid transparent;
        padding: 4px 10px;
        font-size: 12px;
    }

    .prose-toc a:hover,
    .prose-toc a.active {
        border-left: none;
        border-bottom-color: var(--accent);
    }
}

@media (max-width: 768px) {
    .pnav__links {
        display: none;
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 12px 16px;
        gap: 2px;
        z-index: 999;
    }

    .pnav__links.open {
        display: flex;
    }

    .pnav__links a {
        width: 100%;
        padding: 12px 16px;
    }

    .pnav__inner {
        gap: 12px;
    }

    .pnav__actions {
        margin-left: auto;
    }

    .pnav__toggle {
        display: flex;
    }

    .pnav__toggle.open .hamburger-icon {
        display: none;
    }

    .pnav__toggle.open .ph-x {
        display: block;
    }

    .pnav__actions .btn {
        display: none;
    }

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

    .blog-hero__inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .blog-hero__count {
        flex-direction: row;
        gap: 8px;
        padding: 10px 18px;
    }

    .author-hero__profile {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .pftr__grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .article-header__desc {
        font-size: 14px;
    }

    .comments-section {
        padding-inline: 0;
    }

    .comment__replies {
        margin-left: 24px;
    }

    .comment__reply-form textarea {
        min-height: 60px;
    }
}

@media (max-width: 480px) {
    .blog-hero__text h1,
    .contact-hero__inner h1 {
        font-size: 1.7rem;
    }

    .prose-hero h1 {
        font-size: 1.7rem;
    }

    .article-header h1 {
        font-size: 1.7rem;
    }

    .contact-form {
        padding: 20px;
    }

}
