/*
Theme Name: Ohrenmail Dark
Description: Dark child theme of Twenty Twenty-Five for ohrenmail.com: near-black layers, one accent, test-record patterns.
Author: OHREN_Lab
Template: twentytwentyfive
Version: 0.2.1
Requires at least: 6.7
Tested up to: 6.7
Requires PHP: 7.2
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ohrenmail-dark
*/

/* ---------- tokens that theme.json cannot express ---------- */
:root {
	--ohren-radius: 12px;
	--ohren-radius-sm: 8px;
	--ohren-line: var(--wp--preset--color--accent-6);
	--ohren-s1: var(--wp--preset--color--accent-5);
	--ohren-s2: var(--wp--preset--color--accent-3);
	--ohren-s3: var(--wp--preset--color--surface-3);
	--ohren-muted: var(--wp--preset--color--accent-4);
	--ohren-accent: var(--wp--preset--color--accent-1);
	--ohren-accent-dim: var(--wp--preset--color--accent-2);
	--ohren-mono: var(--wp--preset--font-family--fira-code);
}

body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: var(--ohren-accent); color: var(--wp--preset--color--base); }
:where(a, button, input, summary):focus-visible { outline: 2px solid var(--ohren-accent); outline-offset: 2px; border-radius: 4px; }

/* ---------- header / footer ---------- */
.ohren-header { border-bottom: 1px solid var(--ohren-line); padding-top: 14px; padding-bottom: 14px; }
.ohren-header .wp-block-navigation a:hover,
.ohren-footer .wp-block-navigation a:hover { color: var(--wp--preset--color--contrast); text-decoration: none; }
.ohren-header .wp-block-navigation .current-menu-item > a { color: var(--wp--preset--color--contrast); }
.ohren-footer { border-top: 1px solid var(--ohren-line); margin-top: 96px; padding-top: 40px; padding-bottom: 48px; color: var(--ohren-muted); }
.ohren-footer .wp-block-site-tagline { font-size: var(--wp--preset--font-size--small); margin: 0; }

/* ---------- home / archive ---------- */
.ohren-hero { padding-top: 56px; padding-bottom: 24px; }
.ohren-hero .wp-block-site-title,
.ohren-hero .wp-block-query-title { font-size: var(--wp--preset--font-size--xx-large); letter-spacing: -0.03em; line-height: 1.05; margin: 0; }
.ohren-hero .wp-block-site-tagline,
.ohren-hero .wp-block-term-description { color: var(--ohren-muted); font-size: var(--wp--preset--font-size--large); max-width: 40ch; margin-top: 12px; }
.ohren-chips { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ohren-chips li { margin: 0; }
.ohren-chips a { display: inline-block; padding: 6px 12px; border: 1px solid var(--ohren-line); border-radius: 999px; color: var(--wp--preset--color--contrast); font-size: var(--wp--preset--font-size--small); background: var(--ohren-s1); }
.ohren-chips a:hover { border-color: var(--ohren-accent); text-decoration: none; }
.ohren-section-label { font-family: var(--ohren-mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ohren-muted); margin-top: 40px; }

.ohren-cards { gap: 16px; }
.ohren-card { height: 100%; display: flex; flex-direction: column; background: var(--ohren-s1); border: 1px solid var(--ohren-line); border-radius: var(--ohren-radius); overflow: hidden; transition: border-color .15s ease, background-color .15s ease; }
.ohren-card:hover { border-color: #3A3A42; background: var(--ohren-s2); }
.ohren-card .wp-block-post-featured-image { margin: 0; border-bottom: 1px solid var(--ohren-line); }
.ohren-card .wp-block-post-featured-image img { display: block; }
.ohren-card__body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.ohren-card__body > * { margin: 0 !important; }
.ohren-card__title { font-size: 1.1875rem; line-height: 1.3; letter-spacing: -0.015em; }
.ohren-card__title a { color: var(--wp--preset--color--contrast); }
.ohren-card__title a:hover { text-decoration: none; color: var(--ohren-accent); }
.ohren-card__excerpt { color: var(--ohren-muted); font-size: 0.9375rem; line-height: 1.6; }
.ohren-card__excerpt .wp-block-post-excerpt__more-text { display: none; }
.ohren-card .ohren-meta { margin-top: auto !important; }
.ohren-kicker a, .ohren-kicker { color: var(--ohren-accent); }
.ohren-kicker .wp-block-post-terms__separator { color: var(--ohren-muted); }

.wp-block-query-pagination { margin-top: 32px; font-family: var(--ohren-mono); font-size: 0.8125rem; }
.wp-block-query-pagination a, .wp-block-query-pagination .current { padding: 6px 10px; border: 1px solid var(--ohren-line); border-radius: var(--ohren-radius-sm); color: var(--wp--preset--color--contrast); }
.wp-block-query-pagination .current { border-color: var(--ohren-accent); color: var(--ohren-accent); }

/* ---------- single post ---------- */
.ohren-post-head { padding-top: 48px; }
.ohren-post-head .wp-block-post-title { margin-top: 12px; }
.ohren-post-meta { color: var(--ohren-muted); gap: 12px; }
.ohren-single .wp-block-post-featured-image img { border-radius: var(--ohren-radius); border: 1px solid var(--ohren-line); }
.ohren-tags a { display: inline-block; padding: 4px 10px; border: 1px solid var(--ohren-line); border-radius: 999px; color: var(--ohren-muted); text-transform: none; letter-spacing: 0; }
.ohren-tags .wp-block-post-terms__separator { display: none; }
.ohren-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.ohren-postnav { border-top: 1px solid var(--ohren-line); padding-top: 24px; font-size: var(--wp--preset--font-size--small); }

/* post body: works for block markup and for imported plain HTML */
.wp-block-post-content h2 { margin-top: 2.4em; }
.wp-block-post-content h3 { margin-top: 1.8em; }
.wp-block-post-content :where(p, li) { color: #D6D6DB; }
.wp-block-post-content a { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--ohren-accent) 45%, transparent); text-underline-offset: 3px; }
.wp-block-post-content a:hover { text-decoration-color: var(--ohren-accent); }
.wp-block-post-content img { border-radius: var(--ohren-radius-sm); height: auto; max-width: 100%; }
.wp-block-post-content figure:not(.wp-block-table) img { border: 1px solid var(--ohren-line); }
.wp-block-post-content :not(pre) > code { font-family: var(--ohren-mono); font-size: 0.875em; background: var(--ohren-s2); border: 1px solid var(--ohren-line); border-radius: 6px; padding: 0.1em 0.35em; }
.wp-block-post-content table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.wp-block-post-content figure.wp-block-table, .wp-block-post-content .ohren-scroll { overflow-x: auto; }
.wp-block-post-content :where(th, td) { border: 1px solid var(--ohren-line); padding: 10px 12px; text-align: left; vertical-align: top; }
.wp-block-post-content thead th, .wp-block-post-content tr:first-child th { background: var(--ohren-s2); font-weight: 600; color: var(--wp--preset--color--contrast); }
.wp-block-post-content tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--ohren-s1) 70%, transparent); }
.wp-block-post-content hr { border: 0; border-top: 1px solid var(--ohren-line); }
.wp-block-post-content blockquote { border-left: 2px solid var(--ohren-accent); margin-left: 0; padding-left: 1.25rem; color: var(--ohren-muted); }

/* ---------- ad slots: reserved space only (AdSense first); empty slot shows nothing ---------- */
.ohren-ad-slot { margin-top: 32px; margin-bottom: 32px; min-height: 280px; display: flex; align-items: center; justify-content: center; }
.ohren-ad-slot--banner { min-height: 100px; }
.ohren-ad-slot:empty, .ohren-ad-slot:not(:has(*)) { display: none; }

/* ---------- shared pattern parts ---------- */
.ohren-notice { background: var(--ohren-s1); border: 1px solid var(--ohren-line); border-radius: var(--ohren-radius-sm); padding: 12px 16px !important; color: var(--ohren-muted); }
.ohren-notice p { margin: 0; color: var(--ohren-muted) !important; }
.ohren-box { background: var(--ohren-s2); border: 1px solid var(--ohren-line); border-radius: var(--ohren-radius); padding: 20px 24px !important; }
.ohren-box > :first-child { margin-top: 0; }
.ohren-box > :last-child { margin-bottom: 0; }
.ohren-box__title { font-family: var(--ohren-mono); font-size: 0.8125rem !important; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ohren-accent) !important; margin-top: 0 !important; }
.ohren-tag { font-family: var(--ohren-mono); font-size: 0.75rem !important; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ohren-accent) !important; margin-bottom: 4px !important; }

/* ---------- imported posts (Blogger / old blogs) carry light-theme inline styles: re-skin them, content untouched ---------- */
.wp-block-post-content code[style] { background: var(--ohren-s2) !important; color: var(--wp--preset--color--contrast) !important; border: 1px solid var(--ohren-line); }
.wp-block-post-content :where(td, th)[style] { border-color: var(--ohren-line) !important; }
.wp-block-post-content table[style] { border-color: var(--ohren-line) !important; }
.wp-block-post-content :where(div[style*="overflow-x"], figure.wp-block-table) { overflow-x: auto; max-width: 100%; }
.wp-block-post-content figcaption[style] { color: var(--ohren-muted); }
.wp-block-post-content :not(pre) > code { overflow-wrap: anywhere; word-break: break-word; }
.wp-block-post-content pre { overflow-x: auto; max-width: 100%; }

/* ---------- 0.2.0 · logo slot (empty until a site logo is set) ---------- */
.ohren-brand { gap: 10px; align-items: center; }
.ohren-brand .wp-block-site-logo img { display: block; height: auto; }

/* ---------- 0.2.0 · card picture fallback (functions.php: first body image, else title card) ---------- */
.ohren-thumb > a { display: block; width: 100%; height: 100%; }
.ohren-thumb--title { position: relative; overflow: hidden; background: linear-gradient(135deg, var(--ohren-s2) 0%, var(--ohren-s1) 75%); }
.ohren-thumb--title::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--ohren-accent); }
.ohren-thumb--title > a { box-sizing: border-box; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 12px; padding: 20px 22px; color: var(--wp--preset--color--contrast); text-decoration: none; }
.ohren-thumb__site { font-family: var(--ohren-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ohren-accent); }
.ohren-thumb__title { font-weight: 700; font-size: 1.15rem; line-height: 1.3; letter-spacing: -0.01em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; min-height: 0; }

/* ---------- Ohrenmail test-log patterns ---------- */
.ohren-testlog { border: 1px solid var(--ohren-line); border-radius: var(--ohren-radius); background: var(--ohren-s1); padding: 20px 24px !important; }
.ohren-testlog table { font-size: 0.9375rem; margin: 0; }
.ohren-testlog :where(th, td) { border: 0 !important; border-top: 1px solid var(--ohren-line) !important; padding: 10px 0 !important; background: transparent !important; }
.ohren-testlog tr:first-child :where(th, td) { border-top: 0 !important; }
.ohren-testlog td:first-child { font-family: var(--ohren-mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ohren-muted); width: 34%; padding-right: 16px !important; }
.ohren-testlog figure { margin: 0; }
.ohren-result { display: inline-block; font-family: var(--ohren-mono); font-size: 0.75rem !important; text-transform: uppercase; letter-spacing: 0.08em; color: var(--wp--preset--color--base) !important; background: var(--ohren-accent); border-radius: 6px; padding: 3px 8px !important; }
.ohren-shots { gap: 16px !important; }
.ohren-shot { background: var(--ohren-s1); border: 1px solid var(--ohren-line); border-radius: var(--ohren-radius); padding: 10px !important; margin: 0; }
.ohren-shot .wp-block-image { margin: 0; }
.ohren-shot .wp-block-image img { border-radius: 8px; border: 1px solid var(--ohren-line); display: block; width: 100%; }
.ohren-shot p { margin: 10px 4px 2px; font-size: 0.875rem; }
.ohren-shot .ohren-shot__meta { font-family: var(--ohren-mono); font-size: 0.6875rem; color: var(--ohren-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 2px; }
