/* Maakey theme colours. Content palette: Leo's final brief (maakey-final-claude-code.md §8,
   2026-11-28); input and reading-button borders darkened to meet 3:1 (Leo approved). Dark is the
   default; light when the visitor chooses it. The header keeps its own, earlier colours (brief §1:
   header exempt from the palette), see `.mk-header` below. */
:root,
[data-theme="dark"] {
	--mk-bg: #101112;            /* main background, post cards */
	--mk-surface: #191B1C;       /* secondary surface, slider panel, search overlay */
	--mk-footer-bg: #0D0E0F;
	--mk-dropdown: #202223;
	--mk-hover: #242627;
	--mk-input-bg: #191B1C;
	--mk-heading: #F0F0EC;       /* homepage/section headings */
	--mk-card-title: #E8E8E5;
	--mk-excerpt: #A6A6A6;
	--mk-article-title: #FFFFFF;
	--mk-text: #B8B8B8;          /* article body, poetry, general text */
	--mk-subheading: #D6D6D6;
	--mk-bold: #D0D0D0;
	--mk-muted: #929292;         /* dates, captions, footer, footnotes */
	--mk-placeholder: #858585;
	--mk-accent: #B5B88A;        /* olive: categories, read more, focus */
	--mk-accent-text: #B5B88A;
	--mk-link-hover: #D1D4AC;
	--mk-visited: #AAA78D;
	--mk-btn-bg: #B5B88A;
	--mk-btn-text: #101112;
	--mk-btn-hover: #C7CAA0;
	--mk-selection-bg: #444A32;
	--mk-selection-text: #FFFFFF;
	--mk-border: #303234;
	--mk-input-border: #6A6C6E;  /* brief #505254: 2.4:1, below 3:1 */
	--mk-read-btn: #B8B8B8;
	--mk-read-btn-border: #6A6C6E; /* brief #444648: 2.0:1, below 3:1 */
	--mk-slider-active: #B5B88A;
	--mk-slider-track: #444648;
	--mk-disabled: #666666;
	--mk-scrollbar: #454749;
	--mk-quote-bg: #191B1C;
	--mk-quote-text: #C4C4BD;
	--mk-quote-border: #B5B88A;
	--mk-mark-bg: #34392A;
	--mk-mark-text: #D6D8C4;
	--mk-separator: #55584A;
	--mk-success: #91B69A;
	--mk-error: #D28B85;
	--mk-warning: #C9B17A;
	--mk-info: #91A9BD;
	--mk-hero-img: url("../images/hero-dark.webp");
	color-scheme: dark;
}
[data-theme="light"] {
	--mk-bg: #F5F3EE;
	--mk-surface: #EBE9E2;
	--mk-footer-bg: #EBE9E2;
	--mk-dropdown: #FFFFFF;
	--mk-hover: #E4E2DA;
	--mk-input-bg: #FFFFFF;
	--mk-heading: #20211F;
	--mk-card-title: #20211F;
	--mk-excerpt: #62625C;
	--mk-article-title: #000000;
	--mk-text: #000000;
	--mk-subheading: #000000;
	--mk-bold: #000000;
	--mk-muted: #686963;
	--mk-placeholder: #73736D;
	--mk-accent: #62683E;
	--mk-accent-text: #62683E;
	--mk-link-hover: #444B2A;
	--mk-visited: #756B50;
	--mk-btn-bg: #62683E;
	--mk-btn-text: #FFFFFF;
	--mk-btn-hover: #505632;
	--mk-selection-bg: #DDE1C4;
	--mk-selection-text: #000000;
	--mk-border: #D6D4CB;
	--mk-input-border: #858579;  /* brief #96968B: 2.7:1, below 3:1 */
	--mk-read-btn: #000000;
	--mk-read-btn-border: #858579; /* brief #96968B: 2.7:1, below 3:1 */
	--mk-slider-active: #62683E;
	--mk-slider-track: #D6D4CB;
	--mk-disabled: #A6A69E;
	--mk-scrollbar: #BCBCB2;
	--mk-quote-bg: #EBE9E2;
	--mk-quote-text: #000000;
	--mk-quote-border: #62683E;
	--mk-mark-bg: #E5E8D4;
	--mk-mark-text: #000000;
	--mk-separator: #B7B9A4;
	--mk-success: #3D7049;
	--mk-error: #A13D35;
	--mk-warning: #85651E;
	--mk-info: #42677F;
	--mk-hero-img: url("../images/hero-light.webp");
	color-scheme: light;
}
/* Header (logo, menu, search, mode switch): the earlier colours, unchanged (brief §1). */
:root .mk-header, [data-theme="dark"] .mk-header {
	--mk-bg: #0D0F10; --mk-surface: #1A1D1F; --mk-heading: #F2F2E7; --mk-text: #DEDEDE;
	--mk-accent: #C3C77E; --mk-accent-text: #C3C77E; --mk-border: #414548;
}
[data-theme="light"] .mk-header {
	--mk-bg: #F8F6EE; --mk-surface: #FFFFFF; --mk-heading: #1A1D1F; --mk-text: #262626;
	--mk-accent: #656B23; --mk-accent-text: #656B23; --mk-border: #D7D3CA;
}

/* Short and long pages centre the header identically: on a page with a classic scrollbar,
   `100vw - 100%` is the scrollbar width, and the same width on the left keeps the content centred on
   the window. Pages without a scrollbar reserve nothing, so no plain strip at the right edge.
   The coastal photo is painted on the page canvas (html) and centred on the window (50vw), so it does
   not move either. It behaves like `cover` anchored at 40 %, and fades into the page colour over the
   lower part of the hero band (--mk-hero-h). The fade is eased (its slope flattens to zero at the
   end): a straight ramp that stops abruptly reads as a thin line across the photo. */
:root { --mk-hero-h: clamp(300px, 24vw, 400px); --mk-hero-w: max(100vw, calc(var(--mk-hero-h) * 3.7463)); }
html {
	padding-left: calc(100vw - 100%);
	scrollbar-color: var(--mk-scrollbar) var(--mk-bg);
	background:
		linear-gradient(to bottom, transparent calc(var(--mk-hero-h) - 1px), var(--mk-bg) calc(var(--mk-hero-h) - 1px)) 0 0 / 100% 100% repeat-x,
		linear-gradient(to bottom, transparent 36%, color-mix(in srgb, var(--mk-bg) 12%, transparent) 48%, color-mix(in srgb, var(--mk-bg) 32%, transparent) 60%, color-mix(in srgb, var(--mk-bg) 55%, transparent) 70%, color-mix(in srgb, var(--mk-bg) 75%, transparent) 79%, color-mix(in srgb, var(--mk-bg) 90%, transparent) 87%, color-mix(in srgb, var(--mk-bg) 97%, transparent) 94%, var(--mk-bg) 100%) 0 0 / 100% var(--mk-hero-h) repeat-x,
		var(--mk-hero-img) calc(50vw - var(--mk-hero-w) / 2) calc((var(--mk-hero-w) / 3.7463 - var(--mk-hero-h)) * -0.4) / var(--mk-hero-w) auto no-repeat,
		var(--mk-bg);
}
/* Page changes (Chrome/Edge/Safari 18+): the header and the hero photo (page canvas) are the same on
   every page and stay perfectly still; only the content area fades. Fading the whole page (root)
   dimmed the photo for a moment on every click: old and new were both half transparent mid-way. */
@view-transition { navigation: auto; }
.mk-header { view-transition-name: mk-header; }
.mk-main { view-transition-name: mk-main; }
::view-transition-group(root), ::view-transition-old(root), ::view-transition-new(root),
::view-transition-group(mk-header), ::view-transition-old(mk-header), ::view-transition-new(mk-header),
::view-transition-group(mk-main) { animation: none; }
/* The old content is not faded out: drawn at the new page's place it would show the wrong part
   when the visitor had scrolled. The new content fades in over the still page. */
::view-transition-old(root), ::view-transition-old(mk-header), ::view-transition-old(mk-main) { display: none; }
::view-transition-new(mk-main) { animation: mk-fade-in .22s cubic-bezier(.2, .7, .3, 1) both; }
@keyframes mk-fade-in { from { opacity: 0; } }
.mk-nav a, .mk-icon-btn, .mk-card-title a, .mk-more, .mk-cat a { transition: color .15s ease, border-color .15s ease; }
body { background: transparent; color: var(--mk-text); -webkit-font-smoothing: antialiased; }
a { color: var(--mk-accent-text); text-underline-offset: .2em; }
a:hover { color: var(--mk-link-hover); }
:focus-visible { outline: 2px solid var(--mk-accent); outline-offset: 3px; border-radius: 4px; }
.mk-icon { display: block; }
::selection { background: var(--mk-selection-bg); color: var(--mk-selection-text); }
h1, h2, h3, .mk-card-title { text-wrap: balance; }
p { text-wrap: pretty; }
a, button { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.mk-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wp-site-blocks { padding-left: 0; padding-right: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.wp-site-blocks > .mk-main { flex: 1 0 auto; }
.wp-site-blocks > .mk-footer { margin-top: auto; }
.wp-site-blocks > * + * { margin-block-start: 0; }

/* ---------- Hero header ---------- */
.mk-header { position: relative; z-index: 0; }
.mk-hero {
	position: relative;
	box-sizing: border-box;
	min-height: var(--mk-hero-h);
	padding-bottom: 64px;
	background: transparent; /* the photo lives on the canvas (see html) */
}
.mk-hero-inner {
	display: flex; flex-direction: column; align-items: center;
	padding: clamp(.75rem, 1.6vw, 1.4rem) 1.25rem 0;
}
.mk-logo { display: block; width: clamp(175px, 16.5vw, 252px); line-height: 0; }
.mk-logo img { width: 100%; height: auto; }
.mk-logo-on-light, [data-theme="light"] .mk-logo-on-dark { display: none; }
[data-theme="light"] .mk-logo-on-light { display: block; }

.mk-nav { margin-top: clamp(.6rem, 1.6vw, 1.6rem); }
.mk-nav ul { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .25rem clamp(1.2rem, 3.2vw, 2.8rem); list-style: none; margin: 0; padding: 0; }
.mk-nav .mk-nav-tools { display: flex; align-items: center; gap: .15rem; padding-left: clamp(.6rem, 1.6vw, 1.4rem); border-left: 1px solid color-mix(in srgb, var(--mk-heading) 25%, transparent); }
.mk-nav a {
	display: inline-block; padding: .35rem .25rem .45rem;
	color: var(--mk-heading); text-decoration: none; font-weight: 500; font-size: clamp(15px, 1.3vw, 20px);
	border-bottom: 2px solid transparent;
}
.mk-nav a:hover { color: var(--mk-accent); }
.mk-nav a.is-current { color: var(--mk-accent); border-bottom-color: var(--mk-accent); }
.mk-icon-btn {
	display: inline-flex; align-items: center; justify-content: center;
	width: 2.5rem; height: 2.5rem; padding: 0; border: 0; border-radius: 50%;
	background: transparent; color: var(--mk-heading); cursor: pointer; text-decoration: none;
}
.mk-icon-btn:hover { color: var(--mk-accent); }
.mk-when-light, [data-theme="light"] .mk-when-dark { display: none; }
[data-theme="light"] .mk-when-light { display: inline; }

.mk-search { display: flex; gap: .5rem; margin-top: .9rem; width: min(30rem, 100%); }
.mk-search[hidden] { display: none; }
.mk-search input, .mk-search-page input {
	flex: 1; min-width: 0; padding: .6rem .9rem; font: inherit; font-size: 1rem;
	color: var(--mk-text); background: var(--mk-surface); border: 1px solid var(--mk-border); border-radius: 8px;
}
.mk-search button, .mk-search-page .wp-block-search__button {
	padding: .6rem 1.1rem; font: inherit; font-size: 1rem; font-weight: 600; cursor: pointer;
	color: var(--mk-bg); background: var(--mk-accent); border: 0; border-radius: 8px;
}
/* Forms outside the header: content palette. */
.mk-search-page input { color: var(--mk-text); background: var(--mk-input-bg); border-color: var(--mk-input-border); }
.mk-search-page input::placeholder { color: var(--mk-placeholder); opacity: 1; }
.mk-search-page .wp-block-search__button { color: var(--mk-btn-text); background: var(--mk-btn-bg); }
.mk-search-page .wp-block-search__button:hover { background: var(--mk-btn-hover); }
.mk-main :disabled { color: var(--mk-disabled); border-color: var(--mk-disabled); cursor: not-allowed; }

/* ---------- Main column and section titles ---------- */
.mk-main {
	width: min(1120px, 100% - 2 * clamp(20px, 5.5vw, 86px));
	margin: 0 auto; padding-bottom: clamp(2.5rem, 6vw, 5rem);
}
.mk-main { position: relative; z-index: 1; }
.mk-header + .mk-main { margin-top: 0; }
.mk-section-title {
	display: flex; align-items: center; gap: 1.1rem;
	margin: 0 0 clamp(16px, 2vw, 28px); font-family: var(--wp--preset--font-family--serif); font-size: clamp(24px, 2.2vw, 32px); font-weight: 600; line-height: 1.5; color: var(--mk-heading);
}
.mk-section-title::before { content: ""; flex: 0 0 auto; width: 42px; height: 3px; background: var(--mk-accent); border-radius: 2px; }

/* ---------- Post cards ---------- */
.mk-cards { list-style: none; margin: 0; padding: 0; }
.mk-cards > li { padding: clamp(20px, 2.2vw, 30px) 0; border-bottom: 1px solid var(--mk-border); }
.mk-cards > li:first-child { padding-top: clamp(12px, 1.5vw, 20px); }
.mk-cards > li:last-child { border-bottom: 0; }
/* Compact cards (Leo, 2026-11-28): thumbnail column 30 %, same 16:10 crop. */
.mk-card { display: grid; grid-template-columns: 30% minmax(0, 1fr); gap: clamp(20px, 2.6vw, 36px); align-items: center; }
.mk-card-img { margin: 0; }
.mk-card-img a, .mk-card-img img { display: block; }
/* The whole picture at its own proportions (Leo, 2026-11-28): no crop. */
.mk-card-img img { width: 100%; height: auto; border-radius: 8px; background: var(--mk-surface); transition: filter .2s ease; }
.mk-card:hover .mk-card-img img { filter: brightness(1.08); }
.mk-card:not(:has(.mk-card-img)) { grid-template-columns: 1fr; }
.mk-card-body { display: flex; flex-direction: column; gap: .35rem; }
.mk-card-body > * { margin: 0; }
.mk-card-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; font-size: 15px; line-height: 1.6; color: var(--mk-muted); }
.mk-card-meta .mk-cat { font-size: inherit; } /* category and date share one size in the meta row */
.mk-cat a { color: var(--mk-accent-text); text-decoration: none; font-weight: 500; }
.mk-cat a:hover { color: var(--mk-link-hover); text-decoration: underline; }
.mk-date { color: var(--mk-muted); white-space: nowrap; }
.mk-card-title { font-family: var(--wp--preset--font-family--serif); font-size: clamp(20px, 1.7vw, 26px); font-weight: 600; line-height: 1.45; margin: 2px 0 4px !important; }
.mk-card-title a { color: var(--mk-card-title); text-decoration: none; }
.mk-card-title a:hover { color: var(--mk-link-hover); }
/* At most 3 lines on desktop (2 on phones), whatever excerpt the post has. */
.mk-card-excerpt p { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; margin: 0; font-size: 16px; line-height: 1.75; max-width: 36em; color: var(--mk-excerpt); }
.mk-more {
	display: inline-flex; align-items: center; gap: 10px; margin-top: 2px; width: fit-content;
	color: var(--mk-accent-text); font-weight: 500; font-size: 16px; text-decoration: none;
}
.mk-more::after {
	content: ""; width: 1.4rem; height: 1rem; background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 16' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 8h19M15 2l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 16' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 8h19M15 2l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
	transition: transform .15s;
}
.mk-more:hover::after { transform: translateX(3px); }
.mk-pagination { margin-top: 2rem; font-size: 1rem; }
.mk-pagination a { text-decoration: none; border-radius: 6px; padding: .2rem .5rem; }
.mk-pagination a:hover { background: var(--mk-hover); color: var(--mk-link-hover); }
.mk-pagination .current { color: var(--mk-heading); font-weight: 600; padding: .2rem .5rem; }
.mk-empty { color: var(--mk-muted); }

/* ---------- Single post / page ---------- */
.mk-single { max-width: 1040px; }
.mk-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin: 0 0 1.6rem; font-size: .95rem; color: var(--mk-text); }
.mk-breadcrumb a { display: inline-flex; align-items: center; gap: .45rem; text-decoration: none; }
.mk-breadcrumb .mk-icon { width: 18px; height: 18px; }
.mk-breadcrumb > span[aria-hidden] { color: var(--mk-muted); }
.mk-article { max-width: 800px; margin: 0 auto; }
.mk-article > * { margin-top: 0; margin-bottom: 0; }
.mk-article .mk-cat { font-size: 1rem; }
/* Article title 24px on every screen (brief §3); it stays above the body by weight and colour even
   at the largest reading size. */
.mk-article-title { font-family: var(--wp--preset--font-family--serif); font-size: 24px; font-weight: 700; line-height: 1.5; margin: 10px 0 !important; color: var(--mk-article-title); }
.mk-article-date { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; color: var(--mk-muted); font-size: .95rem; margin-bottom: 1.4rem; }
.mk-article-date::before {
	content: ""; width: 18px; height: 18px; background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E") center / contain no-repeat;
}
.mk-article-date p, .mk-article-date div { margin: 0; }
.mk-article-date > .wp-block-post-date { margin: 0; }
/* Reading text: 18px by default, 14-24px from the reading-size control (--mk-read-size on html,
   set before first paint from the saved choice). Only the article body scales. */
.mk-content { font-family: var(--wp--preset--font-family--sans); font-size: var(--mk-read-size, 18px); line-height: 1.9; color: var(--mk-text); overflow-wrap: break-word; } /* long links never widen the page */
.mk-content > * + * { margin-top: 1.1em; }
.mk-content p { margin: 0; }
.mk-content p + p { margin-top: 1.1em; }
.mk-content :is(h1, h2, h3, h4, h5, h6) { font-family: var(--wp--preset--font-family--serif); font-weight: 600; line-height: 1.5; color: var(--mk-subheading); margin-top: 1.8em; }
/* Subheadings grow with the reading size but never past the 24px title. */
.mk-content :is(h1, h2) { font-size: min(1.2em, 24px); }
.mk-content h3 { font-size: min(1.1em, 24px); }
.mk-content :is(h4, h5, h6) { font-size: 1em; }
/* Editor font-size presets follow the reading size too (core sets them in rem with !important). */
.mk-content .has-small-font-size { font-size: .85em !important; }
.mk-content .has-medium-font-size { font-size: 1.1em !important; }
.mk-content .has-large-font-size { font-size: 1.3em !important; }
.mk-content .has-x-large-font-size { font-size: 1.6em !important; }
.mk-content strong, .mk-content b { color: var(--mk-bold); }
.mk-content a { text-decoration: underline; }
.mk-content a:visited { color: var(--mk-visited); }
.mk-content a:hover { color: var(--mk-link-hover); }
.mk-content blockquote { margin-inline: 0; padding: .9em 1.2em; background: var(--mk-quote-bg); color: var(--mk-quote-text); border: 1px solid var(--mk-quote-border); border-radius: 6px; }
.mk-content blockquote cite, .mk-content figcaption, .mk-content .wp-element-caption { color: var(--mk-muted); font-size: .85em; }
.mk-content mark { background: var(--mk-mark-bg); color: var(--mk-mark-text); padding: 0 .15em; border-radius: 2px; }
.mk-content hr, .mk-content .wp-block-separator { border: 0; border-top: 1px solid var(--mk-separator); margin: 2em auto; }
.mk-content ul, .mk-content ol { padding-inline-start: 1.4em; }
/* Poetry keeps its line breaks and the reading font. */
.mk-content .wp-block-verse, .mk-content pre.wp-block-verse { font-family: inherit; font-size: inherit; line-height: inherit; color: inherit; white-space: pre-wrap; overflow-wrap: anywhere; background: none; padding: 0; }
/* Images and galleries placed in the editor: their own colours and proportions, never wider than the column. */
.mk-content img { max-width: 100%; height: auto; border-radius: 8px; }
.mk-content figure { margin-inline: 0; }
.mk-content .wp-block-gallery { gap: .6em; }

/* ---------- Reading-size control (one button, slider on demand) ---------- */
/* Text button in the accent colour: slider icon + எழுத்தளவு, at the end of the date row. */
.mk-article-date > .mk-readsize { margin: 0 0 0 auto; }
.mk-readsize-btn {
	display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 2px;
	font: inherit; line-height: 1.2; color: var(--mk-accent-text); background: transparent; cursor: pointer;
	border: 0; border-radius: 6px;
}
.mk-readsize-btn .mk-icon { width: 18px; height: 18px; }
.mk-readsize-btn:hover, .mk-readsize-btn[aria-expanded="true"] { color: var(--mk-link-hover); }
.mk-readsize-panel {
	position: absolute; top: calc(100% + 8px); right: 0; z-index: 5; box-sizing: border-box;
	width: min(340px, 100%); padding: 12px 14px 10px;
	color: var(--mk-text); background: var(--mk-surface); border: 1px solid var(--mk-border); border-radius: 10px;
}
.mk-readsize-panel[hidden] { display: none; }
.mk-readsize-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; font-size: 14px; }
.mk-readsize-head output { color: var(--mk-muted); font-variant-numeric: tabular-nums; }
.mk-readsize-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; font-size: 12px; color: var(--mk-muted); font-variant-numeric: tabular-nums; }
.mk-readsize-track { position: relative; display: block; }
/* Default (18px) marker: 40 % along the travel of a 20px thumb. */
.mk-readsize-track::before {
	content: ""; position: absolute; top: 50%; left: calc(10px + (100% - 20px) * .4); width: 2px; height: 14px;
	transform: translate(-1px, -50%); background: var(--mk-muted); border-radius: 1px; pointer-events: none;
}
.mk-readsize-range {
	position: relative; display: block; width: 100%; height: 28px; margin: 0; background: transparent; cursor: pointer;
	-webkit-appearance: none; appearance: none; --mk-fill: 40%;
}
.mk-readsize-range::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--mk-slider-active) var(--mk-fill), var(--mk-slider-track) var(--mk-fill)); }
.mk-readsize-range::-moz-range-track { height: 4px; border-radius: 2px; background: var(--mk-slider-track); }
.mk-readsize-range::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--mk-slider-active); }
.mk-readsize-range::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -8px; border-radius: 50%; background: var(--mk-slider-active); border: 2px solid var(--mk-surface); }
.mk-readsize-range::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--mk-slider-active); border: 2px solid var(--mk-surface); }
.mk-readsize-range:focus-visible { outline: none; }
.mk-readsize-range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 2px var(--mk-surface), 0 0 0 4px var(--mk-accent); }
.mk-readsize-range:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 2px var(--mk-surface), 0 0 0 4px var(--mk-accent); }
.mk-article-foot {
	display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem;
	margin-top: 3rem; padding-top: 1.4rem; border-top: 1px solid var(--mk-border);
}
.mk-article-foot a { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; text-decoration: none; }
.mk-next { justify-self: end; text-align: right; }
.mk-share { display: flex; align-items: center; gap: .2rem; }
.mk-share-sep { width: 1px; height: 1.4rem; background: var(--mk-border); margin: 0 .4rem; }
.mk-copy-link.is-done { color: var(--mk-accent); }

/* ---------- Footer (simple) ---------- */
/* The rule spans the whole window: with a classic scrollbar the page content starts after a
   scrollbar-wide left padding on html (see above), so the line reaches back over it. */
.mk-footer { position: relative; background: var(--mk-footer-bg); }
/* The footer band reaches the window's left edge too (same reason as the rule above it). */
.mk-footer { box-shadow: calc((100% - 100vw) / 2) 0 0 0 var(--mk-footer-bg); }
.mk-footer::before { content: ""; position: absolute; top: 0; left: calc((100% - 100vw) / 2); right: 0; border-top: 1px solid var(--mk-border); }
.mk-footer-inner {
	display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap;
	width: min(1200px, 100% - 2 * clamp(1.25rem, 5vw, 3rem)); margin: 0 auto; padding: 1.4rem 0;
}
.mk-footer .mk-logo { width: 110px; }
.mk-footer-copy { margin: 0; color: var(--mk-muted); font-size: .95rem; }
.mk-footer-social { display: flex; gap: .4rem; list-style: none; margin: 0; padding: 0; }
.mk-footer-social a { display: inline-flex; padding: .45rem; color: var(--mk-muted); }
.mk-footer-social a:hover { color: var(--mk-link-hover); }

/* ---------- Small screens ---------- */
@media (max-width: 700px) {
	/* Compact listing like the desktop view: thumbnail left; category, title, date, excerpt and
	   "read more" right (the meta row opens up so the date can follow the title). */
	.mk-cards > li { padding: 14px 0; }
	.mk-cards > li:first-child { padding-top: 6px; }
	.mk-card { grid-template-columns: 32% minmax(0, 1fr); gap: 12px; align-items: start; }
	.mk-card-body { gap: 2px; }
	.mk-card-meta { display: contents; font-size: 13px; }
	.mk-card-meta .mk-cat { order: 1; }
	.mk-card-title { order: 2; font-size: 17px; line-height: 1.45; margin: 0 !important; }
	.mk-card-meta .mk-date { order: 3; font-size: 13px; line-height: 1.5; }
	.mk-card-excerpt { order: 4; }
	.mk-card-excerpt p { font-size: 14px; line-height: 1.65; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
	.mk-more { order: 5; font-size: 14px; gap: 8px; }
	.mk-more::after { width: 1.1rem; }
	/* Header: the desktop arrangement (menu, then search and mode after a divider), only smaller.
	   Sized to fit one row from 360px up (e.g. iPhone 18 Pro 402, iPhone mini 375, small Android
	   360): menu text scales 12.5-14px with the screen, tight padding and gaps. */
	.mk-hero-inner { padding-inline: 8px; }
	.mk-nav a { font-size: clamp(12.5px, 3.6vw, 14px); padding-inline: 2px; }
	.mk-nav ul { gap: 6px clamp(6px, 2.2vw, 12px); }
	.mk-icon-btn { width: 32px; height: 32px; }
	.mk-nav .mk-nav-tools { gap: 0; padding-left: clamp(4px, 1.5vw, 8px); }
	/* Compact hero on phones (Leo, 2026-11-28): same composition as desktop, less height. */
	:root { --mk-hero-h: 196px; }
	.mk-hero { padding-bottom: 20px; }
	.mk-hero-inner { padding-top: 10px; }
	.mk-logo { width: 140px; }
	.mk-nav { margin-top: 4px; }
	.mk-header + .mk-main { margin-top: 0; }
	.mk-section-title { gap: 12px; margin-bottom: 10px; }
	.mk-section-title::before { width: 25px; }
	.mk-article-foot { grid-template-columns: 1fr 1fr; }
	.mk-share { grid-column: 1 / -1; grid-row: 1; justify-content: center; }
	.mk-footer-inner { justify-content: center; text-align: center; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } @view-transition { navigation: none; } ::view-transition-new(mk-main) { animation: none; } }
/* Below 360px the menu and the two buttons no longer fit on one row: the buttons go to a second
   row, centred under the menu (the only departure from the desktop arrangement). */
@media (max-width: 359px) {
	.mk-nav a { font-size: 13px; }
	.mk-nav ul { flex-wrap: wrap; }
	.mk-nav .mk-nav-tools { flex-basis: 100%; justify-content: center; padding-left: 0; border-left: 0; }
}
