/* Fdream's reading skin. Keep column widths, widget areas and menu breakpoints in main.css. */
@font-face {
	font-family: 'Leckerli One';
	src: url('../assets/leckerli-one.woff2') format('woff2');
	font-style: normal;
	font-weight: 400;
	font-display: swap;
}

:root {
	--fd-night: #101918;
	--fd-accent: #00c58a;
	--fd-ink: #eff4f1;
	--fd-meta: #afbfba;
	--fd-paper: #fcfdfb;
	--fd-muted: #53675e;
	--primary-font: system-ui, 'PingFang SC', 'Hiragino Sans GB', sans-serif;
	--heading-color: #14231e;
	--body-color: #293933;
	--primary-color: #066c50; /* Text links on paper need more contrast than a filled button. */
	--primary-color-rgb: 6, 108, 80;
	--fd-button-radius: 32px;
	--fd-button-height: 48px;
	--fd-button-padding: 12px 20px;
	--fd-button-size: 15px;
	--fd-ease: cubic-bezier(.22, 1, .36, 1);
	--fd-feedback: .16s var(--fd-ease);
	--fd-move: .32s var(--fd-ease);
	--fd-night-raised: #172320;
	--fd-night-line: rgba(239, 244, 241, .1);
	--fd-night-line-strong: rgba(239, 244, 241, .14);
	--fd-raised: #f1f5f2;
	--fd-line: #dce7df;
	--fd-line-strong: #c3d2c9;
	--black-color-rgb: 20, 35, 30; /* Retints every template hairline toward ink green. */
}

body:not(.custom-background), .site { background-color: var(--fd-paper); }
.site-header, .site-footer { color: var(--fd-meta); background-color: var(--fd-night); }
/* One sky spans both rows; keep the header unclipped for menus over the article or slider. */
.site-header { position: relative; z-index: 1; isolation: isolate; }
.top-header { position: relative; padding-block: 32px; }
.top-header .container {
	position: relative; z-index: 1;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	grid-template-areas: 'brand motion' 'brand search';
}
.top-header .container::before, .top-header .container::after { content: none; }
.top-header .site-branding { grid-area: brand; }
.top-header .header-left { grid-area: search; }
.fdream-sky { position: absolute; z-index: 0; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.fdream-motion { grid-area: motion; place-self: start end; position: relative; top: -8px; min-height: 28px; padding: 4px 8px; border: 0; border-radius: 8px; font: 13px/1.5 var(--primary-font); letter-spacing: 0; color: var(--fd-meta); background: var(--fd-night); }
.fdream-motion[hidden] { display: none; }
.fdream-motion:hover { background: var(--fd-night); color: var(--fd-ink); }
.site-title { font-size: 34px; line-height: 1.25; }
.site-title a { color: var(--fd-ink); }
.site-branding:not(:has(.custom-logo-link)) .site-title a::before {
	content: ''; display: inline-block; width: .95em; height: .95em;
	margin-inline-end: 10px; vertical-align: -.03em;
	background: url('../assets/emblem.svg') center / contain no-repeat;
}
.site-description { margin-top: 4px; font-size: 14px; color: var(--fd-meta); letter-spacing: 0; }
.header-search .search-submit { filter: brightness(0) invert(1); }
.nav-wrap {
	position: relative;
	z-index: 1;
	background: transparent;
	border: 0;
	-webkit-backdrop-filter: blur(1.5px);
	backdrop-filter: blur(1.5px);
}
.main-navigation ul li ul { background: var(--fd-night-raised); border-color: var(--fd-night-line); }
.main-navigation ul ul li a { border-bottom-color: var(--fd-night-line); }
@media (min-width: 1025px) {
	.main-navigation ul li ul { transition: opacity var(--fd-feedback); }
}
.main-navigation ul li a { color: var(--fd-ink); font-size: 15px; font-weight: 500; letter-spacing: 0; padding-block: 12px; }
.main-navigation ul li:is(:hover, :focus-within, .current-menu-item, .current_page_item, .current-menu-ancestor, .current_page_ancestor) > a,
.site-title a:hover { color: var(--fd-accent); }

.content-area, .widget-area { margin-block: 52px; }
.classic-layout .site-main article { padding-bottom: 32px; margin-bottom: 32px; border-bottom: 1px solid var(--fd-line); }
.classic-layout .site-main article .entry-header { margin-bottom: 16px; }
.classic-layout .site-main article .entry-title, .single .page-header .page-title { font-weight: 600; letter-spacing: -.025em; line-height: 1.4; }
.classic-layout .site-main article .entry-title { font-size: clamp(22px, 2.1vw, 29px); }
.classic-layout .site-main article .entry-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 16px; margin-top: 8px; }
.single .page-header .entry-meta { margin-top: 8px; }
.classic-layout .site-main article .entry-meta > span { margin-inline-end: 0; }
.classic-layout .site-main article .entry-meta > span, .entry-meta > span { font-size: 14px; color: var(--fd-muted); }
.classic-layout .site-main article .entry-meta > span a, .entry-meta > span a { color: var(--fd-muted); }
.entry-meta time, .widget-area .widget_categories { font-variant-numeric: tabular-nums; }
.classic-layout .site-main article .entry-content, .single .site-main .entry-content { font-size: 17px; line-height: 1.85; }
.classic-layout .site-main article .entry-content, .classic-layout .site-main article .entry-content p { margin-top: 16px; }
.entry-content pre { overflow: auto; padding: 16px 20px; background: var(--fd-raised); }
.widget-area .widget:not(:last-child) { margin-bottom: 40px; }
.widget-area .widget .widget-title { font-weight: 600; letter-spacing: 0; margin-bottom: 20px; padding-bottom: 12px; text-align: start; border-bottom: 1px solid var(--fd-line); }
.widget-area .widget .widget-title::after { content: none; }
.widget-area .widget .widget-title span { padding: 0; background: transparent; }
.widget ul li { line-height: 1.65; }
.widget-area :is(.widget_archive, .widget_categories, .widget_meta, .widget_pages, .widget_recent_comments, .widget_recent_entries, .widget_nav_menu) li {
	background-image: none; padding-inline-start: 0;
}
.widget-area .widget ul li:not(:last-child) { margin-bottom: 12px; }
.widget-area .widget ul ul { margin-block-start: 12px; padding-inline-start: 16px; }
.widget-area .blogroll a { overflow-wrap: anywhere; }

/* Index, archive and search entries share the same footer, with or without a sidebar. */
.site-main article .journal-entry-links {
	display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 16px;
	margin-top: 16px;
}
.site-main .journal-read-link {
	display: inline-flex; align-items: center; min-height: var(--fd-button-height); padding-inline-end: 40px;
	color: var(--primary-color); font-size: var(--fd-button-size); font-weight: 500;
	text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px;
	transition: color .16s ease;
}
.site-main .journal-read-link:is(:hover, :focus-visible) { color: var(--heading-color); }
.site-main article .journal-entry-links .tags { margin-top: 0; }
.site-main article .entry-footer .tags :is(span, a) {
	font-size: 14px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--fd-muted);
}

:is(.error404 .site-main .page-content .btn-readmore, .comment-form .submit, .post-password-form input[type='submit']) {
	display: inline-flex; align-items: center; justify-content: center;
	background: var(--fd-accent); color: var(--fd-night); border: 0;
	border-radius: var(--fd-button-radius); min-height: var(--fd-button-height); padding: var(--fd-button-padding);
	font: 500 var(--fd-button-size)/1.55 var(--primary-font); text-transform: none;
	letter-spacing: 0; text-decoration: none;
	transition: transform var(--fd-move);
}
:is(.error404 .site-main .page-content .btn-readmore, .comment-form .submit, .post-password-form input[type='submit']):hover { background: var(--fd-accent); color: var(--fd-night); }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
	:is(.btn-readmore, .comment-form .submit, .post-password-form input[type='submit']):hover { transform: translateY(-2px); }
}
.site .goto-top { color: var(--fd-night); background: var(--fd-accent); border-radius: var(--fd-button-radius); inset-inline-end: 12px; }
.site :is(a, input, button, textarea, select):focus-visible { outline: 2px solid var(--primary-color); outline-offset: 3px; }
.site-header :is(a, input, button):focus-visible { outline-color: var(--fd-accent); }

@media (max-width: 1024px) {
	.top-header { padding-block: 24px; }
	.content-area, .widget-area { margin-block: 32px; }
	.main-navigation .toggle-button, .main-navigation .close, .main-navigation .submenu-toggle { color: var(--fd-ink); }
	.main-navigation .toggle-button, .main-navigation .close {
		border: 0; text-transform: none; letter-spacing: 0; font-weight: 500;
	}
	.main-navigation .toggle-button { min-height: 44px; }
	.main-navigation .toggle-button:hover, .main-navigation .active .close:hover,
	.main-navigation .submenu-toggle:hover { color: var(--fd-accent); }
	.main-navigation .submenu-toggle { transition: color var(--fd-feedback), transform var(--fd-move); }
	.main-navigation .toggle-button .toggle-bar,
	.main-navigation .close .toggle-bar::before, .main-navigation .close .toggle-bar::after {
		background: var(--fd-accent); transition: background-color var(--fd-feedback);
	}
	.main-navigation .toggle-button:hover .toggle-bar { background: var(--fd-ink); }
	.main-navigation ul li a { border-bottom-color: var(--fd-night-line); }
	.main-navigation .mobile-menu {
		background: rgba(16, 25, 24, .90);
		-webkit-backdrop-filter: blur(10px) saturate(115%);
		backdrop-filter: blur(10px) saturate(115%);
	}
}
@media (max-width: 767px) {
	.top-header { padding-block: 20px; }
	.top-header .container {
		grid-template-columns: minmax(0, 1fr) auto;
		grid-template-areas: 'brand motion' 'search search';
	}
	.top-header .header-left { width: auto; }
	.site-title { font-size: 28px; }
	.classic-layout .site-main article { padding-bottom: 24px; margin-bottom: 24px; }
	.single .page-header .page-title { font-size: 26px; }
	.classic-layout .site-main article .entry-content, .single .site-main .entry-content { font-size: 16px; }
}
@media (max-width: 700px) {
	:root { --fd-button-height: 44px; --fd-button-padding: 8px 16px; --fd-button-size: 14px; }
}

/* Selection and highlight: same accent ink as the homepage. */
::selection { background: var(--fd-accent); color: var(--fd-night); }
mark, ins { background: rgba(0, 197, 138, .22); color: inherit; }

/* Links: deep green on paper, ink that warms to the accent in the night header/footer. */
a, .single .post-navigation a span, .single .post-navigation a svg { transition: color var(--fd-feedback); }
:is(.entry-content, .page-content, .comment-content, .entry-summary, .widget_text) a {
	color: var(--primary-color); text-decoration: underline 1px; text-underline-offset: 4px;
}
:is(.entry-content, .page-content, .comment-content, .entry-summary, .widget_text) a:hover {
	color: var(--heading-color); text-decoration: underline 1px;
}
.main-navigation ul li ul a:hover { color: var(--fd-accent); }

/* Inputs: paper-white, one control border, 8px radius, one height. */
input:is([type="text"], [type="email"], [type="url"], [type="password"], [type="search"], [type="number"],
	[type="tel"], [type="date"], [type="month"], [type="week"], [type="time"], [type="datetime"], [type="datetime-local"]),
textarea, select {
	background-color: #fff; /* Leave the select's arrow image intact. */
	border: 1px solid var(--fd-line-strong); border-radius: 8px;
	padding: 8px 12px; height: 48px; font-size: 16px;
	transition: border-color var(--fd-feedback);
}
textarea { height: 150px; padding: 12px; }
select { padding-right: 36px; }
input:focus, textarea:focus, select:focus { border-color: var(--primary-color); }
.comments-area form p :is(input[type="text"], input[type="email"], input[type="url"], textarea) { font-size: 16px; }

/* Search forms keep the underline style, but a quiet 1px hairline. The form owns the border. */
.header-search, .site-footer { --fd-search-line: rgba(239, 244, 241, .25); --fd-search-focus: var(--fd-accent); }
.search-form, .header-search .search-form, .search .page-header .search-form, .site-footer .widget_search .search-form {
	border-bottom: 1px solid var(--fd-search-line, var(--fd-line-strong)); transition: border-color var(--fd-feedback);
}
@media (forced-colors: none) {
	/* These fields already show focus through their border or the search underline. */
	.site :is(.search-form .search-field, .comment-form textarea,
		.comment-form input:is([type="text"], [type="email"], [type="url"]),
		.post-password-form input[type="password"]):focus-visible { outline: none; }
}
.search-form:focus-within { --fd-search-line: var(--fd-search-focus, var(--primary-color)); }
.search-form label, .error404 .site-main .search-form label { flex: 1; min-width: 0; }
.search-form .search-field, .header-search .search-form .search-field,
.search .page-header .search-form .search-field, .error404 .site-main .search-form .search-field {
	background: transparent; border: 0; padding: 8px 12px 8px 0; height: 48px; font: 400 16px/1.5 var(--primary-font);
}
.header-search .search-form .search-field, .site-footer .widget_search .search-form .search-field { color: var(--fd-ink); }
.header-search .search-field::placeholder, .site-footer .search-field::placeholder { color: var(--fd-meta); opacity: 1; }
.search-form .search-submit, .search .page-header .search-form .search-submit, .error404 .site-main .search-form .search-submit {
	width: 48px; height: 48px; min-height: 48px;
}

/* Pagination: quiet outlined squares, current page in deep green, no fills. */
.pagination .page-numbers {
	border: 1px solid var(--fd-line-strong); border-radius: 8px;
	color: var(--fd-muted); font-weight: 500; margin: 8px 4px 0 0;
	transition: color var(--fd-feedback), border-color var(--fd-feedback);
}
.pagination .page-numbers:is(.current, :hover, :focus-visible) {
	background: none; border-color: var(--primary-color); color: var(--primary-color);
}
.pagination .page-numbers.dots { border-color: transparent; color: var(--fd-muted); }

/* Tags on single posts: text label plus quiet outlined chips. Fixes unreadable green-on-green. */
.single .site-main article .tags { gap: 8px; }
.single .site-main article .tags span {
	background: none; color: var(--fd-muted); text-transform: none; letter-spacing: 0;
	font-weight: 400; padding: 0; margin: 0;
}
.single .site-main article .tags span::after, .single .site-main article .entry-footer .tags a::after { content: none; }
.single .site-main article .tags a { margin: 0; }

/* Tag cloud, category and edit links share the single-post chips. */
.single .site-main article .tags a, .tagcloud a, .single .site-content > .page-header .category a, .post-edit-link {
	background: none; color: var(--primary-color); border: 1px solid var(--fd-line-strong);
	border-radius: 8px; padding: 4px 12px;
	transition: color var(--fd-feedback), border-color var(--fd-feedback);
}
.tagcloud a { color: var(--fd-muted); margin: 0 4px 8px 0; }
.single .site-content > .page-header .category { margin-bottom: 4px; }
.single .site-content > .page-header .category a { margin: 0 8px 8px 0; }
.single .site-main article .tags a:is(:hover, :focus-visible), .tagcloud a:is(:hover, :focus-visible),
.single .site-content > .page-header .category a:is(:hover, :focus-visible), .post-edit-link:is(:hover, :focus-visible) {
	background: none; border-color: var(--primary-color); color: var(--primary-color);
}

/* Sentence case for tracked-uppercase template labels. */
.comments-area form label:not([for="wp-comment-cookies-consent"]), .comments-area ol li article .reply,
.single .post-navigation a span, .goto-top, .sub-title, .post-share .post-share-title, .post-edit-link,
.single .site-content > .page-header .category a, .site-banner .banner-item .item-content .category,
.site-main article .entry-footer .tags span {
	text-transform: none; letter-spacing: 0;
}
.comments-area form label:not([for="wp-comment-cookies-consent"]) { margin-bottom: 4px; }

/* Type: headings at 600 max, quotes without faux italic or heavy bars. */
.entry-content :is(h1, h2, h3, h4, h5, h6), .comments-area .comment-reply-title, .comments-area .comments-title { font-weight: 600; }
blockquote { font-style: normal; font-weight: 400; border-left: 2px solid var(--fd-line-strong); color: var(--body-color); }
abbr, acronym { border-bottom-color: var(--fd-line-strong); }

/* Accent-tinted washes become the quiet raised surface. */
.page-header { background: var(--fd-raised); border-top-color: var(--fd-line); }
.header-banner-wrap::before { content: none; }
.comments-area ol li article, .single .comments-area ol li article { background: var(--fd-raised); }
.comments-area ol li.bypostauthor > article { border-left: 2px solid var(--primary-color); }
.comments-area ol.comment-list { border-bottom-color: var(--fd-line); }
.post-share .social-list li a, .post-share.sticky-share .social-list li a {
	background: var(--fd-raised); border-radius: 8px; border-color: var(--fd-line);
	transition: color var(--fd-feedback), background-color var(--fd-feedback);
}
.post-share .social-list li a:hover, .post-share.sticky-share .social-list li a:hover { background: var(--primary-color); color: #fff; }

/* Tables: hairlines and a quiet head row instead of a green band. */
.entry-content table :is(th, td) { border-color: var(--fd-line); }
.entry-content .wp-block-table thead { border-bottom: 1px solid var(--fd-line-strong); }
.entry-content .wp-block-table tfoot { border-top: 1px solid var(--fd-line-strong); }
table tr:nth-child(even) { background: var(--fd-raised); }
.wp-block-table.is-style-stripes tbody tr:nth-child(odd) { background: var(--fd-raised); }
.wp-block-table.is-style-stripes tbody tr:nth-child(even) { background: transparent; }
table tr th, .entry-content table tr th {
	background: var(--fd-raised); color: var(--heading-color); font-weight: 600;
	border-bottom: 1px solid var(--fd-line-strong);
}

/* Code blocks share the raised surface and the control radius. Don't override prettify's syntax colors. */
pre { background: var(--fd-raised); border-radius: 8px; }
.entry-content pre.prettyprint { padding: 16px 20px; border-color: var(--fd-line); }
.entry-content pre .linenums > li { background: transparent; }

/* The 404 figure drops its shadow. */
.error404 .site-main .error-num { text-shadow: none; font-weight: 500; }

/* Dark footer: widget and calendar rules in the template set colors directly on their children. */
.site-footer a, .site-footer .widget a, .site-footer .widget .widget-title { color: var(--fd-ink); }
.site-footer a:hover, .site-footer .widget a:hover { color: var(--fd-accent); }
.site-footer .widget .textwidget, .site-footer .widget ul li, .site-footer .bottom-footer,
.site-footer .widget table tr td { color: var(--fd-meta); }
.site-footer .bottom-footer { border-top-color: var(--fd-night-line); }
.bottom-footer .container {
	display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
	text-align: start; overflow-wrap: anywhere;
}
.bottom-footer .container::before, .bottom-footer .container::after { content: none; }
.bottom-footer .privacy-policy-link { flex: none; max-width: 50%; text-align: end; }
.site-footer table tr:nth-child(even), .site-footer .widget table tr th { background: var(--fd-night-raised); }
.site-footer .widget table tr th { color: var(--fd-ink); border-bottom-color: var(--fd-night-line-strong); }
.site-footer .tagcloud a { border-color: var(--fd-night-line-strong); }
.site-footer .tagcloud a:is(:hover, :focus-visible) { border-color: var(--fd-accent); color: var(--fd-accent); }

/* Buttons that the skin already owns keep their pill; everything else quiet. */
button, input[type="button"], input[type="reset"], input[type="submit"] {
	transition: color var(--fd-feedback), background-color var(--fd-feedback), border-color var(--fd-feedback);
}
.site .goto-top { transition: transform var(--fd-move), visibility var(--fd-move); }
.post-share.sticky-share { transition: opacity var(--fd-feedback), visibility var(--fd-feedback); }

/* Template's leftover green inside svg icon swaps becomes the palette deep green. */
.search-form .search-submit:hover, .header-search .search-form .search-submit:hover,
.search .page-header .search-form .search-submit:hover, .site-footer .search-form .search-submit:hover {
	background-image: url('data:image/svg+xml; utf-8, <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="%23066c50" d="M508.5 468.9L387.1 347.5c-2.3-2.3-5.3-3.5-8.5-3.5h-13.2c31.5-36.5 50.6-84 50.6-136C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c52 0 99.5-19.1 136-50.6v13.2c0 3.2 1.3 6.2 3.5 8.5l121.4 121.4c4.7 4.7 12.3 4.7 17 0l22.6-22.6c4.7-4.7 4.7-12.3 0-17zM208 368c-88.4 0-160-71.6-160-160S119.6 48 208 48s160 71.6 160 160-71.6 160-160 160z"></path></svg>');
}
.comments-area ol li article .reply .comment-reply-link {
	background-image: url('data:image/svg+xml; utf-8, <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="%23066c50" d="M511.563,434.259c-1.728-142.329-124.42-258.242-277.087-263.419V95.999c0-17.645-14.342-31.999-31.974-31.999 c-7.931,0-15.591,3.042-21.524,8.562c0,0-134.828,124.829-173.609,163.755C2.623,241.109,0,248.088,0,255.994 c0,7.906,2.623,14.885,7.369,19.687c38.781,38.915,173.609,163.745,173.609,163.745c5.933,5.521,13.593,8.562,21.524,8.562 c17.631,0,31.974-14.354,31.974-31.999v-74.591c153.479,2.156,255.792,50.603,255.792,95.924c0,5.896,4.767,10.666,10.658,10.666 c0.167,0.021,0.333,0.01,0.416,0c5.891,0,10.658-4.771,10.658-10.666C512,436.259,511.854,435.228,511.563,434.259z"></path></svg>');
}
