/*
Theme Name: BugzYard
Theme URI: https://bugzyard.com/
Author: Ahmad
Description: A personal site in sections — diary, notes, lectures, stories, articles, animal rescue and anything you add later — with a place for your own tools and plugins. Every top-level category becomes a switch on a Basys 3–style board at the top of the site. Diary, lectures and photo sections each get their own layout. Urdu paragraphs are set right-to-left in Nastaliq automatically.
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bugzyard
Tags: blog, education, one-column, two-columns, custom-logo, custom-menu, featured-images, rtl-language-support, translation-ready
*/

:root {
	--paper: #f1f4ee;
	--paper-2: #e6ece2;
	--ink: #18241d;
	--muted: #56635b;
	--line: #c9d2c6;
	--board: #1c4a33;
	--board-2: #143826;
	--silk: #e9f0e6;
	--led: #ff4a3d;
	--led-off: #4a1f19;
	--link: #1c6b45;
	--care: #b7791f;
	--home: #c8372d;
	--adopted: #2e7d4f;
	--released: #2f6fa8;
	--memory: #6b746e;
	--sans: "Familjen Grotesk", "Segoe UI", system-ui, sans-serif;
	--serif: "Source Serif 4", "Noto Nastaliq Urdu", Georgia, serif;
	--urdu: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", serif;
	--wrap: 1180px;
	--measure: 68ch;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font: 400 1.125rem/1.7 var(--serif);
	font-optical-sizing: auto;
}
img, video, iframe { max-width: 100%; height: auto; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--led); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3, h4 { font-family: var(--sans); line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 0.5em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 10; background: var(--ink); color: var(--paper); padding: 8px 14px; }
.skip:focus { left: 8px; }

/* ------------------------------------------------------------------ the board (header) */

.band { background: var(--board); color: var(--silk); }
.band a { color: var(--silk); }
.brand { display: flex; align-items: center; gap: 12px; margin: 0; font-family: var(--sans); font-weight: 700; }
.brand a { text-decoration: none; }
.brand .custom-logo { width: auto; height: 40px; border-radius: 6px; }
.band-small { position: relative; }
.band-in { display: flex; align-items: center; gap: 28px; min-height: 76px; }
.band-small .brand { font-size: 1.35rem; flex: 0 0 auto; }
.band-small .board { flex: 1 1 auto; min-width: 0; }

.band-big { padding: 56px 0 40px; }
.hero { display: grid; grid-template-columns: minmax(0, auto) minmax(0, 46ch); gap: 18px 56px; align-items: end; margin-bottom: 40px; }
.band-big .brand { font-size: clamp(2.8rem, 7vw, 5.2rem); line-height: 0.95; letter-spacing: -0.03em; }
.band-big .brand .custom-logo { height: 0.9em; }
.intro { margin: 0; font-size: 1.15rem; line-height: 1.6; color: rgba(233, 240, 230, 0.86); }
.hero-search { margin-top: 28px; max-width: 520px; }

/* switches: a slide switch with an LED above it, like SW0..SW15 on a Basys 3 */
.board ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: thin; scrollbar-color: rgba(233, 240, 230, 0.3) transparent; }
.board a { display: grid; justify-items: center; gap: 6px; padding: 8px 10px 6px; text-decoration: none; border-radius: 6px; }
.board a:hover, .board a:focus-visible { background: rgba(0, 0, 0, 0.14); }
.board .led { width: 12px; height: 6px; border-radius: 2px; background: var(--led-off); transition: background 0.12s, box-shadow 0.12s; }
.board .slide { position: relative; width: 22px; height: 36px; border-radius: 4px; background: #0d1a12; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
.board .knob { position: absolute; left: 3px; right: 3px; bottom: 3px; height: 14px; border-radius: 2px; background: linear-gradient(#e7ebe5, #b9c0b7); transition: bottom 0.12s ease-out; }
.board .lbl { font: 600 0.82rem/1.2 var(--sans); white-space: nowrap; color: var(--silk); }
.board a:hover .knob, .board a:focus-visible .knob, .board .is-on .knob { bottom: 19px; }
.board a:hover .led, .board a:focus-visible .led { background: #b23a2f; }
.board .is-on .led { background: var(--led); box-shadow: 0 0 6px 2px rgba(255, 74, 61, 0.55); }
.board .is-on .lbl { text-decoration: underline; text-underline-offset: 0.3em; }

/* the big board on the home page: a silkscreened block of large switches */
.board-big ul { gap: 10px; padding: 18px 16px 12px; border: 1px solid rgba(233, 240, 230, 0.35); border-radius: 8px; }
.board-big a { gap: 10px; padding: 10px 14px 8px; }
.board-big .led { width: 18px; height: 8px; }
.board-big .slide { width: 34px; height: 58px; border-radius: 6px; }
.board-big .knob { left: 4px; right: 4px; bottom: 4px; height: 22px; border-radius: 3px; }
.board-big a:hover .knob, .board-big a:focus-visible .knob, .board-big .is-on .knob { bottom: 32px; }
.board-big .lbl { font-size: 1rem; }

.search-toggle { flex: 0 0 auto; display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 6px; background: transparent; color: var(--silk); cursor: pointer; }
.search-toggle:hover { background: rgba(0, 0, 0, 0.14); }
.site-search { padding-bottom: 18px; }
.search-form { display: flex; gap: 8px; }
.search-form input { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; font: 1rem var(--sans); background: #fff; color: var(--ink); }
.band .search-form input { border-color: transparent; background: rgba(255, 255, 255, 0.94); }
.search-form button, .btn {
	display: inline-block; padding: 10px 16px; border: 0; border-radius: 6px; cursor: pointer;
	background: var(--ink); color: var(--paper); font: 600 1rem var(--sans); text-decoration: none;
}
.band .search-form button { background: var(--board-2); color: var(--silk); box-shadow: inset 0 0 0 1px rgba(233, 240, 230, 0.35); }
.btn:hover, .search-form button:hover { filter: brightness(1.15); }

/* ------------------------------------------------------------------ home */

.bz-home { padding-top: 48px; padding-bottom: 72px; }
.home-page-text { max-width: var(--measure); margin-bottom: 48px; }
.top-row { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 48px; margin-bottom: 64px; }
.top-row.no-tools { grid-template-columns: minmax(0, var(--measure)); }
.kicker { margin: 0 0 10px; font: 600 0.95rem var(--sans); color: var(--muted); }
.newest h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); letter-spacing: -0.02em; }
.newest h2 a { color: var(--ink); text-decoration: none; }
.newest h2 a:hover { text-decoration: underline; }
.newest-img img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; margin-bottom: 18px; }
.newest .ex { font-size: 1.2rem; max-width: 60ch; }
.newest.empty { padding: 28px; border: 2px dashed var(--line); border-radius: 8px; }

.meta { margin: 0 0 8px; font: 0.92rem/1.4 var(--sans); color: var(--muted); }
.meta a { color: inherit; }
.meta .rt::before { content: ""; display: inline-block; width: 4px; height: 4px; margin: 0 8px 2px; border-radius: 50%; background: currentColor; }

/* your tools and plugins: drawn like a Pmod header strip */
.tools { align-self: start; padding: 22px 22px 8px; background: var(--paper-2); border-radius: 8px; border-top: 6px solid var(--board); }
.tools h2 { font-size: 1.3rem; }
.tools h2 a { color: var(--ink); text-decoration: none; }
.tools ul { list-style: none; margin: 0; padding: 0; }
.tools li { position: relative; padding: 12px 0 12px 22px; border-top: 1px solid var(--line); }
.tools li::before { content: ""; position: absolute; left: 2px; top: 21px; width: 8px; height: 8px; border-radius: 50%; background: var(--paper); box-shadow: 0 0 0 3px #b9873a; }
.tools li > a { font: 700 1.08rem var(--sans); }
.tools li p { margin: 4px 0 0; font-size: 0.98rem; line-height: 1.5; color: var(--muted); }

.sections { display: grid; gap: 0; }
/* one row per section: its name on the left, its latest posts on the right */
.sec-head { align-self: start; }

.sec-head h2 { font-size: 1.6rem; margin-bottom: 4px; }
.sec-head h2 a { color: var(--ink); text-decoration: none; }
.sec-head h2 a:hover { text-decoration: underline; }
.sec-head p { margin: 0; color: var(--muted); font-style: italic; }
.more { display: inline-block; margin-top: 14px; font: 600 0.95rem var(--sans); }

/* ------------------------------------------------------------------ lists of posts */

.items { list-style: none; margin: 0; padding: 0; }
.items .t { font-size: 1.18rem; margin: 0 0 4px; }
.items .t a { color: var(--ink); text-decoration: none; }
.items .t a:hover { text-decoration: underline; color: var(--link); }
.items .ex { margin: 0; color: #2f3b34; }
.items-list .item, .items-stream .item { padding: 14px 0; border-bottom: 1px solid var(--line); }
.items-list .item:first-child, .items-stream .item:first-child { padding-top: 0; }
.items-stream .t { font-size: 1.45rem; }

/* diary: the day is the headline */
.items-diary .item { display: grid; grid-template-columns: 4.2rem minmax(0, 1fr); gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.items-diary .item:first-child { padding-top: 0; }
.items-diary .day { display: grid; justify-items: start; align-content: start; text-decoration: none; color: var(--board); font-family: var(--sans); }
.items-diary .day .d { font-size: 2.1rem; font-weight: 700; line-height: 1; }
.items-diary .day .m { font-size: 0.82rem; color: var(--muted); }

/* lectures: a numbered course, read in order */
.items-lectures { counter-reset: none; }
.items-lectures .item { display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: 14px; position: relative; padding: 10px 0 14px; }
.items-lectures .item:not(:last-child)::after { content: ""; position: absolute; left: calc(1.5rem - 1px); top: 50px; bottom: -6px; width: 2px; background: var(--line); }
.items-lectures .no { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%; border: 2px solid var(--board); font: 700 1.2rem var(--sans); color: var(--board); background: var(--paper); }
.items-lectures .no:empty { border-style: dashed; }
.items-lectures .file { display: inline-block; margin-top: 6px; font: 600 0.92rem var(--sans); }

/* photos first: animals, places, projects */
.items-photos, .items-tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 28px 24px; }
.items-tools { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); margin-top: 32px; }
.items-tools .item { padding: 20px 20px 22px; background: var(--paper-2); border-radius: 8px; border-top: 6px solid var(--board); }
.items-tools .t { font-size: 1.25rem; }
.items-photos .ph, .items-tools .ph { display: block; margin-bottom: 10px; }
.items-photos img, .items-tools img, .items-photos .noimg { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; background: var(--paper-2); }
.items-photos .noimg { background: repeating-linear-gradient(45deg, var(--paper-2) 0 10px, #dde5d9 10px 20px); }
.items-photos .ex { font-size: 1rem; }

.chip { display: inline-block; margin: 0 0 6px; padding: 2px 10px; border-radius: 99px; font: 600 0.8rem/1.6 var(--sans); color: #fff; background: var(--muted); }
.meta .chip { margin: 0 0 0 10px; }
.chip-care { background: var(--care); }
.chip-home { background: var(--home); }
.chip-adopted { background: var(--adopted); }
.chip-released { background: var(--released); }
.chip-memory { background: var(--memory); }

/* ------------------------------------------------------------------ archive pages */

.bz-archive, .bz-single { padding-top: 44px; padding-bottom: 72px; }
.page-head { max-width: var(--measure); margin-bottom: 36px; }
.page-head h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); letter-spacing: -0.02em; }
.page-head .desc, .page-head .desc p { color: var(--muted); font-size: 1.2rem; margin: 0 0 16px; }
.crumb { margin: 0 0 10px; font: 600 0.98rem var(--sans); }
.subs { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding: 0; }
.subs a { display: inline-block; padding: 5px 12px; border-radius: 99px; background: var(--paper-2); font: 600 0.92rem var(--sans); text-decoration: none; color: var(--ink); }
.subs span { color: var(--muted); font-weight: 400; }
.layout-list .items, .layout-diary .items, .layout-lectures .items, .layout-stream .items { max-width: var(--measure); }
.layout-diary .items-diary .t { font-size: 1.35rem; }
.empty-note { color: var(--muted); }
.pagination { margin-top: 40px; font-family: var(--sans); }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 6px; }
.pagination .page-numbers { padding: 6px 12px; border-radius: 6px; text-decoration: none; }
.pagination .current { background: var(--ink); color: var(--paper); }

/* ------------------------------------------------------------------ one post */

.post-head { max-width: var(--measure); margin-bottom: 28px; }
.post-head h1 { font-size: clamp(2.1rem, 5vw, 3.3rem); letter-spacing: -0.02em; }
.diary-date { margin: 0 0 8px; font: 700 1.2rem var(--sans); color: var(--board); }
.post-img { margin: 0 0 32px; }
.post-img img { display: block; width: 100%; max-height: 70vh; object-fit: cover; border-radius: 8px; }
.entry { max-width: var(--measure); font-size: 1.16rem; line-height: 1.75; }
.entry > * { margin-top: 0; margin-bottom: 1.1em; }
.entry h2 { font-size: 1.7rem; margin-top: 1.6em; }
.entry h3 { font-size: 1.35rem; margin-top: 1.4em; }
.entry blockquote { margin-left: 0; padding-left: 20px; border-left: 4px solid var(--board); font-style: italic; color: #2f3b34; }
.entry figure { margin-left: 0; margin-right: 0; }
.entry figcaption { font: 0.9rem var(--sans); color: var(--muted); margin-top: 6px; }
.entry img { border-radius: 6px; }
.entry pre, .entry code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 0.9em; }
.entry pre { padding: 16px 18px; background: #18241d; color: #e9f0e6; border-radius: 6px; overflow-x: auto; line-height: 1.5; }
.entry :not(pre) > code { padding: 1px 5px; background: var(--paper-2); border-radius: 4px; }
.entry table { border-collapse: collapse; width: 100%; font-size: 1rem; }
.entry th, .entry td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: start; }
.entry hr { border: 0; border-top: 2px solid var(--line); margin: 2.4em 0; }
.entry .alignwide { max-width: min(1100px, 92vw); width: min(1100px, 92vw); }
.entry .alignfull { max-width: none; width: 100vw; margin-left: calc(50% - 50vw); }
.entry .aligncenter { margin-left: auto; margin-right: auto; }
.entry .alignleft { float: left; margin: 0.3em 1.4em 1em 0; }
.entry .alignright { float: right; margin: 0.3em 0 1em 1.4em; }

/* Urdu paragraphs (found by assets/site.js): right to left, Nastaliq, more air between lines */
.entry .ur, .items .ur, .ur { font-family: var(--urdu); direction: rtl; text-align: right; line-height: 2.25; font-style: normal; }
.entry p, .entry li, .entry h2, .entry h3, .entry blockquote, .items .t, .items .ex { unicode-bidi: plaintext; text-align: start; }

.post-foot { max-width: var(--measure); margin-top: 32px; }
.tags a { display: inline-block; margin: 0 6px 6px 0; padding: 3px 10px; border-radius: 99px; background: var(--paper-2); font: 0.9rem var(--sans); text-decoration: none; color: var(--ink); }
.below { margin-top: 28px; padding: 22px; background: var(--paper-2); border-radius: 8px; }
.pn { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: var(--measure); margin-top: 48px; }
.pn-a { display: block; padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; color: var(--ink); font: 600 1.05rem/1.35 var(--sans); }
.pn-a span { display: block; margin-bottom: 4px; font-weight: 400; font-size: 0.88rem; color: var(--muted); }
.pn-a.next { grid-column: 2; text-align: end; }
.pn-a:hover { border-color: var(--board); }

.wide .post-head, .wide .entry, .bz-wide .entry, .bz-wide .post-head { max-width: none; }

.comments { max-width: var(--measure); margin-top: 56px; padding-top: 24px; border-top: 3px solid var(--board); }
.comment-list { padding-left: 0; list-style: none; }
.comment-list .children { list-style: none; padding-left: 24px; }
.comment-body { padding: 14px 0; border-bottom: 1px solid var(--line); }
.comment-author { font: 600 1rem var(--sans); display: flex; align-items: center; gap: 8px; }
.comment-author img { border-radius: 50%; }
.comment-metadata { font: 0.85rem var(--sans); }
.comment-metadata a { color: var(--muted); }
.comment-form label { display: block; font: 600 0.95rem var(--sans); }
.comment-form input:not([type=submit]):not([type=checkbox]), .comment-form textarea { width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 6px; font: 1rem var(--serif); background: #fff; }
.comment-form .submit { padding: 10px 18px; border: 0; border-radius: 6px; background: var(--ink); color: var(--paper); font: 600 1rem var(--sans); cursor: pointer; }

/* ------------------------------------------------------------------ footer */

.foot { background: var(--board-2); color: var(--silk); padding: 40px 0 28px; }
.foot a { color: var(--silk); }
.foot-in { display: grid; grid-template-columns: 1fr auto; gap: 18px 40px; align-items: start; }
.foot .brand { font-size: 1.3rem; }
.foot .tagline { margin: 6px 0 0; color: rgba(233, 240, 230, 0.75); }
.foot-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font: 600 1rem var(--sans); }
.foot-widgets { grid-column: 1 / -1; }
.copy { grid-column: 1 / -1; margin: 12px 0 0; font: 0.9rem var(--sans); color: rgba(233, 240, 230, 0.7); }

/* ------------------------------------------------------------------ WordPress bits */

.wp-caption-text, .gallery-caption { font: 0.9rem var(--sans); color: var(--muted); }
.sticky .t::after { content: ""; display: inline-block; width: 8px; height: 8px; margin-left: 8px; border-radius: 50%; background: var(--led); vertical-align: middle; }
.bypostauthor > .comment-body .fn::after { content: " ✓"; color: var(--board); }
.widget { margin-bottom: 20px; }
.widget-title { font-size: 1.1rem; }

/* ------------------------------------------------------------------ small screens */

@media (max-width: 900px) {
	.hero { grid-template-columns: 1fr; }
	.top-row { grid-template-columns: minmax(0, 1fr); }
	.band-in { flex-wrap: wrap; gap: 4px 16px; padding-top: 12px; }
	.band-small .board { order: 3; flex-basis: 100%; margin: 0 -14px; }
	.search-toggle { margin-left: auto; }
}
@media (max-width: 560px) {
	body { font-size: 1.06rem; }
	.wrap { padding-left: 16px; padding-right: 16px; }
	.bz-home { padding-top: 32px; padding-bottom: 56px; }
	.bz-archive, .bz-single { padding-top: 28px; }
	.band-big { padding: 36px 0 28px; }
	.board-big ul { padding: 12px 8px 8px; gap: 2px; }
	.board-big a { padding: 8px 8px 6px; }
	.board-big .slide { width: 28px; height: 48px; }
	.board-big .knob { height: 18px; }
	.board-big a:hover .knob, .board-big a:focus-visible .knob, .board-big .is-on .knob { bottom: 26px; }
	.pn { grid-template-columns: 1fr; }
	.pn-a.next { grid-column: 1; }
	.foot-in { grid-template-columns: 1fr; }
	.entry .alignleft, .entry .alignright { float: none; margin: 0 0 1em; }
}
@media (prefers-reduced-motion: reduce) {
	.board .knob, .board .led { transition: none; }
}
@media print {
	.band, .foot, .pn, .comments, .search-toggle { display: none; }
	body { background: #fff; }
}

/* footer widgets in columns */
.foot-widgets { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px 40px; margin-top: 12px; }
.foot .widget-title, .foot .widget h2 { font-size: 1rem; margin-bottom: 8px; color: rgba(233, 240, 230, 0.75); }
.foot .widget ul { list-style: none; margin: 0; padding: 0; font: 1rem/1.9 var(--sans); }
.foot .widget a { text-decoration: none; }
.foot .widget a:hover { text-decoration: underline; }

/* ------------------------------------------------------------------ picture tiles */

/* the latest posts as a mosaic: the newest one large */
.mosaic { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 210px; gap: 14px; margin-bottom: 64px; }
.mosaic .tile-big { grid-column: span 2; grid-row: span 2; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 230px; gap: 14px; }
.tiles-page { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); grid-auto-rows: 260px; }

.tile { position: relative; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; border-radius: 6px;
	text-decoration: none; color: var(--silk); background-color: var(--sec, var(--board)); }
.tile.no-img { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' fill='none' stroke='white' stroke-opacity='.13' stroke-width='3'%3E%3Cpath d='M0 40h50l20 20h50l20-20h20M0 110h30l20 20h60M80 0v30l-20 20v30M130 160v-40l20-20h10M110 100l20-20V50'/%3E%3Cg fill='white' fill-opacity='.16' stroke='none'%3E%3Ccircle cx='50' cy='40' r='5'/%3E%3Ccircle cx='110' cy='130' r='5'/%3E%3Ccircle cx='60' cy='80' r='5'/%3E%3Ccircle cx='130' cy='50' r='5'/%3E%3Ccircle cx='150' cy='100' r='4'/%3E%3C/g%3E%3C/svg%3E"); background-size: 160px 160px; }
.tile-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile.has-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 20, 14, 0) 35%, rgba(10, 20, 14, 0.82)); }
.tile-body { position: relative; z-index: 1; display: grid; gap: 4px; padding: 16px 18px 15px; min-width: 0; }
.tile-sec { font: 600 0.8rem var(--sans); opacity: 0.85; }
.tile-t { font: 600 1.14rem/1.25 var(--sans); letter-spacing: -0.005em; overflow-wrap: anywhere; }
.tile-big .tile-t { font-size: clamp(1.5rem, 2.6vw, 2.2rem); line-height: 1.12; letter-spacing: -0.02em; }
.tile-ex { font: 0.98rem/1.5 var(--serif); opacity: 0.9; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.tile-big .tile-ex { font-size: 1.12rem; -webkit-line-clamp: 5; max-width: 52ch; }
.tile-date { font: 0.8rem var(--sans); opacity: 0.72; }
.tile .chip { justify-self: start; margin: 0; }
.tile:hover .tile-t, .tile:focus-visible .tile-t { text-decoration: underline; text-underline-offset: 0.15em; }
.tile.is-diary.no-img .tile-day { position: absolute; top: 14px; left: 18px; display: grid; font: 600 0.82rem var(--sans); opacity: 0.85; }
.tile.is-diary.no-img .tile-day b { font-size: 2.6rem; line-height: 1; font-weight: 700; }
.tile-big.is-diary.no-img .tile-day b { font-size: 4rem; }
.tile .ur { line-height: 1.9; }
.tile.is-diary.no-img .tile-date { display: none; }      /* the date is already shown large */

/* tools: screenshots on a strip like the board's Pmod headers */
.tools-row, .sec { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.6fr); gap: 16px 48px; padding: 28px 0 40px; border-top: 3px solid var(--sec, var(--board)); }
.row-head h2 { font-size: 1.6rem; margin-bottom: 4px; }
.row-head h2 a { color: var(--ink); text-decoration: none; }
.row-head p { margin: 0; color: var(--muted); font-style: italic; }
.tool-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.tool-tile { display: grid; grid-template-rows: 150px auto; overflow: hidden; border-radius: 6px; background: var(--paper-2); color: var(--ink); text-decoration: none; }
.tool-tile img { width: 100%; height: 150px; object-fit: cover; image-rendering: pixelated; background: #000; }
.tool-tile:not(.has-img)::before { content: ""; background: var(--board) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' fill='none' stroke='white' stroke-opacity='.13' stroke-width='3'%3E%3Cpath d='M0 40h50l20 20h50l20-20h20M0 110h30l20 20h60M80 0v30l-20 20v30M130 160v-40l20-20h10M110 100l20-20V50'/%3E%3Cg fill='white' fill-opacity='.16' stroke='none'%3E%3Ccircle cx='50' cy='40' r='5'/%3E%3Ccircle cx='110' cy='130' r='5'/%3E%3Ccircle cx='60' cy='80' r='5'/%3E%3Ccircle cx='130' cy='50' r='5'/%3E%3Ccircle cx='150' cy='100' r='4'/%3E%3C/g%3E%3C/svg%3E"); background-size: 160px 160px; }
.tool-body { display: grid; gap: 4px; padding: 14px 16px 16px; border-top: 4px solid var(--board); }
.tool-body .tile-ex { font-size: 0.95rem; opacity: 1; color: var(--muted); -webkit-line-clamp: 3; }
.tool-tile:hover .tile-t { text-decoration: underline; }
.first-post { max-width: var(--measure); padding: 28px; margin-bottom: 56px; border: 2px dashed var(--line); border-radius: 8px; }

@media (max-width: 900px) {
	.mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 180px; }
	.tools-row, .sec { grid-template-columns: minmax(0, 1fr); }
	.tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 200px; }
}
@media (max-width: 560px) {
	.mosaic { gap: 10px; grid-auto-rows: 160px; }
	.tiles, .tiles-page { grid-template-columns: minmax(0, 1fr); grid-auto-rows: 210px; }
	.tile-body { padding: 12px 14px; }
	.tile-t { font-size: 1.02rem; }
	.mosaic .tile:not(.tile-big) .tile-ex { display: none; }
	.mosaic .tile:not(.tile-big) .tile-day { display: none; }
	.mosaic .tile:not(.tile-big).is-diary.no-img .tile-date { display: block; }
}
