/* ============================================================
   Life At 360 — article.css
   Single article: header, body typography, table of contents,
   sources, author box, tools.

   The reading column is deliberately narrow (720px) — long serif
   measure is the whole point of the theme.
   ============================================================ */

.np-article { max-width: 720px; margin: 0 auto; }

/* ---- Header ---- */
.np-article-kicker {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 1rem;
}
.np-article-kicker a {
    font-family: var(--font-headline);
    color: var(--ink);
}
.np-article-kicker a:hover { color: var(--accent); }

.np-article-header { text-align: center; margin-bottom: 1.6rem; }

.np-article-title {
    font-family: var(--font-headline);
    font-weight: 700;
    font-size: clamp(1.9rem, 4.6vw, 3rem);
    line-height: 1.14;
    margin-bottom: 0.7rem;
}
.np-article-subtitle {
    font-size: 1.15rem;
    line-height: 1.55;
    color: #444;
    margin-bottom: 1.2rem;
    font-weight: 300;
}

.np-article-byline {
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    padding: 0.75rem 0;
    margin-bottom: 1rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.np-article-byline a { color: var(--ink); }
.np-article-byline a:hover { color: var(--accent); }
.np-article-dates {
    color: var(--ink-soft);
    font-size: 0.72rem;
    margin-top: 0.35rem;
}

.np-article-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1.8rem;
}
.np-share-label { color: var(--ink-soft); }
.np-article-tools a { color: var(--ink); }
.np-article-tools a:hover { color: var(--accent); }
.np-tool-btn {
    font-family: var(--font-body);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: none;
    border: 1px solid var(--rule);
    padding: 0.3rem 0.75rem;
    cursor: pointer;
    color: var(--ink-soft);
    transition: border-color 0.2s ease, color 0.2s ease;
}
.np-tool-btn:hover { border-color: var(--accent); color: var(--accent); }
.np-tool-active { border-color: var(--accent); color: var(--accent); }
.inline-form { display: inline; }

/* The hero breaks out of the reading column for impact. */
.np-article-figure {
    margin: 0 0 2rem;
    width: 100vw;
    max-width: min(1170px, 100vw);
    margin-left: 50%;
    transform: translateX(-50%);
}
.np-article-figure img { width: 100%; height: auto; display: block; }
.np-article-figure figcaption {
    font-size: 0.78rem;
    color: var(--ink-soft);
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--rule);
    max-width: 720px;
    margin: 0 auto;
}

/* ---- Table of contents ---- */
.np-toc {
    border: 0;
    border-top: 1px solid var(--rule-strong);
    border-bottom: 1px solid var(--rule-strong);
    background: transparent;
    padding: 1.1rem 0;
    margin: 0 0 2rem;
}
.np-toc-title {
    font-family: var(--font-headline);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--ink);
    margin-bottom: 0.6rem;
}
.np-toc ol { margin: 0; padding-left: 1.2rem; }
.np-toc li { margin: 0.25rem 0; font-size: 0.95rem; }
.np-toc a { color: #333; }
.np-toc a:hover { color: var(--accent); }
.np-toc .toc-h3 { padding-left: 0.9rem; }

/* ---- Body typography ---- */
.article-body {
    font-size: 1.12rem;
    line-height: 1.8;
    color: #111;
    font-weight: 300;
}
.article-body p { margin-bottom: 1.2em; }

/* Drop cap on the opening paragraph — a signature of the theme. */
.article-body > p:first-of-type::first-letter {
    font-family: var(--font-headline);
    font-size: 3.6em;
    line-height: 0.82;
    float: left;
    padding: 0.06em 0.09em 0 0;
    color: var(--ink);
}

.article-body h2, .article-body h3, .article-body h4 {
    font-family: var(--font-headline);
    font-weight: 700;
    line-height: 1.25;
    margin: 1.7em 0 0.55em;
}
.article-body h2 { font-size: 1.55rem; }
.article-body h3 { font-size: 1.25rem; }
.article-body h4 { font-size: 1.08rem; }

.article-body blockquote {
    border: 0;
    border-top: 1px solid var(--ink);
    border-bottom: 1px solid var(--ink);
    padding: 1.2rem 0;
    margin: 1.8em 0;
    font-family: var(--font-headline);
    font-size: 1.35rem;
    line-height: 1.4;
    text-align: center;
    color: var(--ink);
}
.article-body ul, .article-body ol { margin: 0 0 1.2em 1.5em; }
.article-body li { margin-bottom: 0.4em; }
.article-body img { max-width: 100%; height: auto; }
.article-body figure { margin: 1.6em 0; }
.article-body figcaption { font-size: 0.8rem; color: var(--ink-soft); padding-top: 0.4rem; }
.article-body a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.article-body a:hover { color: var(--accent); }
.article-body table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: 0.95rem; }
.article-body th, .article-body td { border: 1px solid var(--rule); padding: 0.55rem 0.7rem; text-align: left; }
.article-body th { background: var(--paper-muted); font-weight: 500; }
.article-body pre {
    background: var(--paper-muted);
    padding: 1rem 1.1rem;
    overflow-x: auto;
    font-size: 0.9rem;
    margin-bottom: 1.2em;
}

/* ---- Sources block (§20) ----
   Attribution is part of the article, not a footnote — it gets a
   heavy top rule so it reads as a deliberate section. */
.np-sources {
    border: 0;
    border-top: 3px solid var(--rule-strong);
    padding: 1.2rem 0 0;
    margin: 2.5rem 0;
    background: transparent;
}
.np-sources h2 {
    font-family: var(--font-headline);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    margin-bottom: 0.8rem;
}
.np-sources ul { list-style: none; }
.np-sources li {
    margin-bottom: 0.5rem;
    font-size: 0.92rem;
    padding-left: 1.1rem;
    position: relative;
    overflow-wrap: anywhere;
}
.np-sources li::before {
    content: "—";
    position: absolute;
    left: 0;
    color: var(--accent);
}
.np-sources a { color: #333; }
.np-sources a:hover { color: var(--accent); }

.np-article-tags { margin: 1.6rem 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* ---- Author box ---- */
.np-author-box {
    display: flex;
    gap: 1.3rem;
    align-items: flex-start;
    border-top: 1px solid var(--rule-strong);
    border-bottom: 1px solid var(--rule-strong);
    padding: 1.5rem 0;
    margin: 2.5rem 0;
}
.np-author-box .np-author-photo { width: 84px; height: 84px; }
.np-author-box-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--accent);
}
.np-author-box-name {
    font-family: var(--font-headline);
    font-weight: 700;
    font-size: 1.25rem;
    margin: 0.3rem 0 0.45rem;
}
.np-author-box-name a { color: var(--ink); }
.np-author-box-name a:hover { color: var(--accent); }
.np-author-box p { font-size: 0.94rem; color: #444; }

/* ---- Comments ---- */
.np-comments { margin-top: 3rem; }
.np-comments-title {
    font-family: var(--font-headline);
    font-weight: 700;
    font-size: 1.3rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding-bottom: 0.7rem;
    border-bottom: 1px solid var(--rule-strong);
    margin-bottom: 1.4rem;
}
.np-comment-list { list-style: none; }
.np-comment { padding-bottom: 1.2rem; margin-bottom: 1.2rem; border-bottom: 1px solid var(--rule); }
.np-comment-head {
    display: flex;
    gap: 0.8rem;
    align-items: baseline;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.4rem;
}
.np-comment-author { font-family: var(--font-headline); color: var(--ink); }
.np-comment-head time { color: var(--ink-soft); }
/* Comment bodies are HTML now, from a whitelist of p/br/emphasis/
   list/quote/link/code. Styled tighter than the article body so a
   long comment never reads as part of the piece itself. */
.np-comment-body { font-size: 0.98rem; line-height: 1.7; }
.np-comment-body > *:last-child { margin-bottom: 0; }
.np-comment-body p { margin-bottom: 0.7em; }
.np-comment-body ul,
.np-comment-body ol { margin: 0.5em 0 0.7em 1.3em; }
.np-comment-body li { margin-bottom: 0.25em; }
.np-comment-body blockquote {
    margin: 0.6em 0;
    padding-left: 0.9rem;
    border-left: 2px solid var(--rule-strong);
    color: var(--ink-soft);
}
.np-comment-body a { text-decoration: underline; }

/* Replies: one level, marked by a rule rather than deep indentation
   so a thread stays readable on a phone. */
.np-comment-replies {
    list-style: none;
    margin: 1rem 0 0 0;
    padding-left: 1.1rem;
    border-left: 2px solid var(--rule);
}
.np-comment-reply { padding-top: 0.9rem; }

.np-comment-actions {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}
.np-comment-action {
    background: none;
    border: 0;
    padding: 0;
    font-family: var(--font-body);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--ink-soft);
    cursor: pointer;
}
.np-comment-action:hover { color: var(--accent); }

.np-report-form {
    margin-top: 0.7rem;
    padding: 0.8rem;
    background: var(--paper-muted);
}
.np-report-form label { display: block; font-size: 0.8rem; margin-bottom: 0.35rem; }
.np-report-form textarea { width: 100%; font-family: var(--font-body); font-size: 0.9rem; }
.np-report-actions { display: flex; align-items: center; gap: 0.8rem; margin-top: 0.5rem; }

.np-replying-to {
    display: flex;
    align-items: baseline;
    gap: 0.8rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--ink-soft);
}
.np-comment-body code {
    background: var(--paper-muted);
    padding: 0.05em 0.3em;
    font-size: 0.9em;
}
.np-comment-report {
    background: none;
    border: 0;
    font-family: var(--font-body);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-soft);
    cursor: pointer;
    padding: 0;
    margin-top: 0.4rem;
}
.np-comment-report:hover { color: var(--accent); }
.np-comment-form { margin-top: 1.6rem; }
.np-comment-form label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}
.np-comment-form textarea {
    width: 100%;
    font-family: var(--font-body);
    font-size: 1rem;
    padding: 0.8rem;
    border: 1px solid var(--rule-strong);
    background: #fff;
    color: var(--ink);
    margin-bottom: 0.8rem;
}
.np-comment-form textarea:focus { outline: 2px solid var(--accent); outline-offset: -2px; }
.np-comment-login { font-size: 0.95rem; color: var(--ink-soft); }
.np-comment-login a { color: var(--ink); text-decoration: underline; }
.field-hint { font-size: 0.78rem; color: var(--ink-soft); margin-top: 0.5rem; }

/* ---- Related ---- */
.np-related {
    max-width: var(--wrap);
    margin: 3.5rem auto 0;
    padding-top: 2.5rem;
    border-top: 1px solid var(--rule-strong);
}

/* Alignment written by the body editor. These three classes are the
   entire set Html::ALLOWED_CLASSES keeps — the sanitizer drops every
   other class and the style attribute outright, so anything else an
   editor pastes in simply will not render. */
.article-body .text-left   { text-align: left; }
.article-body .text-center { text-align: center; }
.article-body .text-right  { text-align: right; }
.article-body figure.text-center { margin-left: auto; margin-right: auto; }
.article-body figure.text-right  { margin-left: auto; margin-right: 0; }
.article-body table.text-center  { margin-left: auto; margin-right: auto; }

@media (max-width: 860px) {
    .np-article-figure { width: 100%; margin-left: 0; transform: none; }
    .article-body { font-size: 1.05rem; }
    .np-author-box { flex-direction: column; }
}
