/* TRYTOREFUTE.ME — brand: white, black, crimson #8B0000 */
:root {
    --ttrf-bg: #ffffff;
    --ttrf-text: #1a1a1a;
    --ttrf-black: #0d0d0d;
    --ttrf-red: #8b0000;
    --ttrf-red-hover: #a40000;
    --ttrf-muted: #5c6670;
    --ttrf-line: #e2e6ea;
    --ttrf-panel: #f6f7f9;
    --font-display: "Bebas Neue", sans-serif;
    --font-body: "Source Sans 3", system-ui, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 62.5%;
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 1.7rem;
    line-height: 1.55;
    color: var(--ttrf-text);
    background: var(--ttrf-bg);
    min-height: 100vh;
}

.skip-link {
    position: absolute;
    left: -9999px;
    z-index: 999;
    padding: 1rem;
    background: var(--ttrf-red);
    color: #fff;
}
.skip-link:focus {
    left: 1rem;
    top: 1rem;
}

/* Header */
.site-header {
    background: var(--ttrf-bg);
    border-bottom: 3px solid var(--ttrf-red);
    box-shadow: 0 4px 24px rgba(139, 0, 0, 0.08);
}

.site-header-inner {
    max-width: 110rem;
    margin: 0 auto;
    padding: 1.6rem 2rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.6rem 2.4rem;
}

.site-logo-link {
    display: block;
    flex-shrink: 0;
    line-height: 0;
    background: #fff;
    border: 2px solid var(--ttrf-line);
    border-radius: 0.4rem;
    padding: 0.4rem;
}

.site-logo-link img {
    width: 10rem;
    height: auto;
    max-height: 10rem;
    object-fit: contain;
    display: block;
}

.site-brand {
    flex: 1;
    min-width: 20rem;
}

.site-title {
    font-family: var(--font-display);
    font-size: clamp(3.2rem, 6vw, 5.6rem);
    line-height: 1;
    letter-spacing: 0.02em;
    text-decoration: none;
    display: inline-block;
    font-style: italic;
}

.site-title-part {
    display: inline-block;
}

.site-title-b {
    color: var(--ttrf-black);
}

.site-title-r {
    color: var(--ttrf-red);
}

.site-title:hover .site-title-b {
    color: var(--ttrf-red);
}

.site-tagline {
    margin: 0.6rem 0 0;
    font-size: 1.5rem;
    color: var(--ttrf-muted);
    font-weight: 600;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem 1.6rem;
    align-items: center;
}

.site-nav a {
    color: var(--ttrf-black);
    font-weight: 700;
    text-decoration: none;
    font-size: 1.5rem;
    border-bottom: 2px solid transparent;
    padding-bottom: 0.2rem;
}

.site-nav a:hover {
    color: var(--ttrf-red);
    border-bottom-color: var(--ttrf-red);
}

.site-header-brush {
    height: 0.6rem;
    background: linear-gradient(
        90deg,
        transparent 0%,
        var(--ttrf-red) 15%,
        var(--ttrf-red) 85%,
        transparent 100%
    );
    opacity: 0.35;
}

/* Main */
.site-main {
    max-width: 72rem;
    margin: 0 auto;
    padding: 3rem 2rem 5rem;
}

.site-main.wide {
    max-width: 110rem;
}

/* Typography */
h1,
h2,
h3 {
    font-family: var(--font-display);
    font-weight: 400;
    letter-spacing: 0.04em;
    line-height: 1.15;
}

h1 {
    font-size: clamp(3.4rem, 5vw, 4.8rem);
    color: var(--ttrf-black);
    margin: 0 0 1.2rem;
    border-left: 5px solid var(--ttrf-red);
    padding-left: 1.2rem;
}

h2 {
    font-size: 2.8rem;
    color: var(--ttrf-red);
    margin: 2.4rem 0 1rem;
}

h3 {
    font-size: 2.2rem;
    margin: 1.6rem 0 0.8rem;
}

a {
    color: var(--ttrf-red);
}

a:hover {
    color: var(--ttrf-red-hover);
}

.muted {
    color: var(--ttrf-muted);
    font-size: 1.45rem;
}

/* Post list */
.post-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.post-card {
    border: 1px solid var(--ttrf-line);
    border-radius: 0.6rem;
    padding: 2rem 2.2rem;
    background: var(--ttrf-panel);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.post-card:hover {
    border-color: rgba(139, 0, 0, 0.35);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}

.post-card h2 {
    margin: 0 0 0.8rem;
    font-size: 2.6rem;
}

.post-card h2 a {
    color: var(--ttrf-black);
    text-decoration: none;
}

.post-card h2 a:hover {
    color: var(--ttrf-red);
}

.post-meta {
    font-size: 1.4rem;
    color: var(--ttrf-muted);
    margin-bottom: 0.8rem;
}

.tag-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tag-pill {
    display: inline-block;
    padding: 0.3rem 0.9rem;
    background: #fff;
    border: 1px solid var(--ttrf-line);
    border-radius: 999px;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--ttrf-red);
    text-decoration: none;
}

.tag-pill:hover {
    background: var(--ttrf-red);
    color: #fff;
    border-color: var(--ttrf-red);
}

/* Home intro */
.home-intro {
    margin: 0 0 2.8rem;
    padding: 2rem 2.2rem;
    border: 1px solid var(--ttrf-line);
    border-radius: 0.5rem;
    background: var(--ttrf-panel);
    max-width: 72rem;
}

.home-intro-kicker {
    margin: 0 0 1.2rem;
    font-size: 1.65rem;
    font-style: italic;
    font-weight: 600;
    color: var(--ttrf-muted);
    line-height: 1.4;
}

.home-intro-hr {
    margin: 1.2rem 0 1.6rem;
}

.home-intro p {
    margin: 0;
    font-size: 1.65rem;
    line-height: 1.55;
}

.home-intro p + p {
    margin-top: 0.55em;
}

.home-intro-closing {
    font-weight: 700;
    color: var(--ttrf-black);
    margin-top: 0.85rem;
    padding-top: 0.65rem;
    border-top: 1px solid var(--ttrf-line);
}

/* Article */
.article-block {
    margin: 2rem 0;
    padding: 2rem;
    border-radius: 0.5rem;
    border: 1px solid var(--ttrf-line);
    background: #fff;
}

.article-block h3 {
    margin-top: 0;
    font-family: var(--font-body);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--ttrf-red);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Plain text via ttrfHtmlFromPlainText(): <p.article-prose-p> + <br> inside each p */
.article-body {
    white-space: normal;
    word-break: break-word;
}

/* Flex + gap between <p> only (not .source-preview: ellipsis <span> follows last <p>) */
.article-prose:not(.source-preview) {
    display: flex;
    flex-direction: column;
    gap: 0.55em;
    align-items: stretch;
}

.article-prose.source-preview .article-prose-p + .article-prose-p {
    margin-top: 0.55em;
}

.article-prose .article-prose-p {
    margin: 0;
    padding: 0;
    line-height: 1.55;
}

.source-preview .source-ellipsis {
    display: inline;
    margin-left: 0.15em;
}

.source-link {
    word-break: break-all;
}

.admin-inline-edit {
    font-weight: 700;
    color: var(--ttrf-red);
}

.source-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.5rem;
    margin-top: 1.25rem;
    padding-top: 1.1rem;
    border-top: 2px solid var(--ttrf-line);
}

.source-read-original {
    font-size: 1.55rem;
    padding: 1rem 2rem;
    box-shadow: 0 2px 12px rgba(139, 0, 0, 0.18);
}

.source-toggle-btn {
    display: inline-block;
    padding: 0;
    margin: 0;
    border: none;
    background: none;
    font: inherit;
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--ttrf-red);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 0.2em;
    align-self: center;
}

.source-toggle-btn:hover {
    color: var(--ttrf-red-hover);
}

.source-ellipsis {
    font-weight: 600;
    color: var(--ttrf-muted);
}

.commentary-signature {
    margin: 1.25rem 0 0;
    padding-top: 1rem;
    border-top: 1px solid var(--ttrf-line);
    font-size: 1.5rem;
    font-style: italic;
    font-weight: 600;
    color: var(--ttrf-muted);
    text-align: right;
}

.commentary-signature a {
    color: var(--ttrf-red);
    text-decoration: none;
    font-style: italic;
}

.commentary-signature a:hover {
    color: var(--ttrf-red-hover);
    text-decoration: underline;
}

.contact-page .contact-lead {
    font-size: 1.75rem;
    line-height: 1.55;
}

.contact-email-block {
    margin: 1.5rem 0;
}

.contact-email-btn {
    font-size: 1.6rem;
    word-break: break-all;
}

/* Forms */
label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--ttrf-black);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="datetime-local"],
textarea,
select {
    width: 100%;
    max-width: 100%;
    padding: 0.75rem 1rem;
    font: inherit;
    border: 1px solid var(--ttrf-line);
    border-radius: 0.4rem;
    background: #fff;
}

textarea {
    min-height: 12rem;
    resize: vertical;
}

button,
.btn {
    display: inline-block;
    padding: 0.85rem 1.8rem;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    border: none;
    border-radius: 0.4rem;
    background: var(--ttrf-red);
    color: #fff;
    text-decoration: none;
}

button:hover,
.btn:hover {
    background: var(--ttrf-red-hover);
}

.btn-secondary {
    background: var(--ttrf-black);
}

.notice {
    padding: 1rem 1.2rem;
    border-radius: 0.4rem;
    margin: 1rem 0;
}

.notice.ok {
    background: #e8f5e9;
    border: 1px solid #4caf50;
    color: #1b5e20;
}

.notice.err {
    background: #ffebee;
    border: 1px solid var(--ttrf-red);
    color: #b71c1c;
}

/* Comments */
.comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.comment-item {
    border-bottom: 1px solid var(--ttrf-line);
    padding: 1.2rem 0;
}

.comment-form {
    margin-top: 2rem;
    padding: 2rem;
    background: var(--ttrf-panel);
    border-radius: 0.5rem;
    border: 1px solid var(--ttrf-line);
}

.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

/* Pagination */
.pager {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-top: 2.5rem;
    flex-wrap: wrap;
}

/* Admin */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1.45rem;
}

.admin-table th,
.admin-table td {
    border: 1px solid var(--ttrf-line);
    padding: 0.75rem 1rem;
    text-align: left;
}

.admin-table th {
    background: var(--ttrf-panel);
    font-weight: 700;
}

.btn-small {
    font-size: 1.35rem;
    padding: 0.5rem 1rem;
}

.admin-comment-list {
    list-style: none;
    margin: 2rem 0 0;
    padding: 0;
}

.admin-comment-card {
    border: 1px solid var(--ttrf-line);
    border-radius: 0.5rem;
    padding: 1.4rem 1.6rem;
    margin-bottom: 1.2rem;
    background: var(--ttrf-panel);
}

.admin-comment-meta {
    margin: 0 0 0.8rem;
    font-size: 1.45rem;
}

.admin-comment-body {
    margin: 0 0 1rem;
    font-size: 1.5rem;
}

.admin-comment-actions {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.tag-status {
    text-transform: uppercase;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--ttrf-muted);
}

.yn-yes {
    color: #2e7d32;
    font-weight: 700;
}

.yn-no {
    color: var(--ttrf-red);
    font-weight: 700;
}

/* Brush divider */
.brush-hr {
    border: none;
    height: 4px;
    margin: 2.5rem 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(139, 0, 0, 0.45) 30%,
        rgba(139, 0, 0, 0.45) 70%,
        transparent
    );
    border-radius: 2px;
}

.site-footer {
    border-top: 1px solid var(--ttrf-line);
    padding: 2rem;
    margin-top: 4rem;
    text-align: center;
    font-size: 1.4rem;
    color: var(--ttrf-muted);
}

.site-footer-inner {
    max-width: 110rem;
    margin: 0 auto;
}

@media (max-width: 600px) {
    .site-header-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}
