/*
Theme Name: My Thought Spot
Theme URI: https://www.mythoughtspot.com/
Description: Field-journal child theme for My Thought Spot. Ink and rust, IBM Plex.
Template: twentytwentyfive
Version: 1.0.0
Requires at least: 6.7
Requires PHP: 8.0
Text Domain: mythoughtspot
*/

:root {
	--mts-paper: #F3EFE3;
	--mts-card: #FBF9F3;
	--mts-ink: #1E2423;
	--mts-muted: #59605C;
	--mts-line: #D6CFBD;
	--mts-header: #2A2420;
	--mts-accent: #A0441F;
	--mts-on-dark: #E8B08E;
	--mts-mono: "IBM Plex Mono", ui-monospace, monospace;
	--mts-serif: "IBM Plex Serif", Georgia, serif;
}

body { margin: 0; background: var(--mts-paper); }
.wp-site-blocks { padding: 0 !important; }
.wp-site-blocks > * { margin-block-start: 0; }

/* ---------- Header ---------- */
.mts-header { background: var(--mts-header); color: var(--mts-paper); }
.mts-header-inner {
	max-width: 1160px; margin: 0 auto; padding: 36px 32px; box-sizing: border-box;
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px;
}
.mts-brand { display: flex; flex-direction: column; gap: 8px; }
.mts-brand > * { margin: 0 !important; }
.mts-tally { font-family: var(--mts-mono); font-size: 13px; letter-spacing: 2px; color: var(--mts-on-dark); }
.mts-wordmark { font-family: var(--mts-mono); font-size: 40px; font-weight: 600; line-height: 1.1; letter-spacing: -0.5px; }
.mts-wordmark a { color: var(--mts-paper); text-decoration: none; }
.mts-wordmark a:hover { color: var(--mts-on-dark); text-decoration: none; }
.mts-tagline { font-style: italic; font-size: 16px; color: #DDD8CC; }
.mts-nav { display: flex; flex-wrap: wrap; gap: 8px; font-family: var(--mts-mono); font-size: 14px; }
.mts-nav a { color: var(--mts-paper); padding: 8px 12px; border: 1px solid rgba(243, 239, 227, 0.35); text-decoration: none; }
.mts-nav a:hover, .mts-nav a:focus-visible { border-color: var(--mts-on-dark); color: var(--mts-on-dark); }

/* ---------- Layout ---------- */
.mts-wrap {
	max-width: 1160px; margin: 0 auto !important; padding: 48px 32px 64px; box-sizing: border-box;
	display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 52px; align-items: start;
}
.mts-aside { grid-column: 1; grid-row: 1; display: flex; flex-direction: column; gap: 40px; }
.mts-aside > div { display: flex; flex-direction: column; gap: 40px; }
.mts-aside * + * { margin-block-start: 0; }
.mts-main { grid-column: 2; grid-row: 1; display: flex; flex-direction: column; gap: 28px; min-width: 0; }
.mts-main > * { margin: 0 !important; }
@media (max-width: 860px) {
	.mts-wrap { grid-template-columns: minmax(0, 1fr); gap: 48px; padding: 28px 16px 48px; }
	.mts-main, .mts-aside { grid-column: 1; grid-row: auto; }
	.mts-header-inner { padding: 28px 16px; }
	.mts-wordmark { font-size: 30px; }
}

/* ---------- Sidebar ---------- */
.mts-label, .mts-search .wp-block-search__label {
	font-family: var(--mts-mono) !important; font-size: 14px !important; font-weight: 600 !important;
	letter-spacing: 1.5px; color: var(--mts-accent); margin: 0 0 12px !important; line-height: 1.3;
}
.mts-search .wp-block-search__inside-wrapper { border: 0; padding: 0; }
.mts-search .wp-block-search__input {
	font-family: var(--mts-mono); font-size: 14px; padding: 10px 12px; border: 1px solid var(--mts-ink);
	border-radius: 0; background: var(--mts-card); color: var(--mts-ink); width: 100%; box-sizing: border-box;
}
.mts-search .wp-block-search__input::placeholder { color: #6A706C; opacity: 1; font-family: var(--mts-serif); font-style: italic; }
.mts-search .wp-block-search__input:focus { outline: 2px solid var(--mts-accent); outline-offset: 1px; }

.mts-years { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; font-family: var(--mts-mono); font-size: 13px; }
.mts-years a { display: grid; grid-template-columns: 40px minmax(0, 1fr) 36px; gap: 8px; align-items: center; color: var(--mts-ink); text-decoration: none; }
.mts-years .bar { display: block; height: 10px; min-width: 3px; background: var(--mts-accent); }
.mts-years .n { text-align: right; color: var(--mts-muted); }
.mts-years a:hover .y { text-decoration: underline; }
.mts-years a:hover .bar { background: var(--mts-header); }

.mts-topics { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 15px; line-height: 1.5; }
.mts-topics a { color: var(--mts-ink); text-decoration: none; }
.mts-topics a:hover { color: var(--mts-accent); text-decoration: underline; }
.mts-topics .n { font-family: var(--mts-mono); font-size: 12px; color: var(--mts-muted); }
.mts-topics.with-counts { font-size: 18px; gap: 10px 22px; }
.mts-more { margin: 10px 0 0 !important; font-family: var(--mts-mono); font-size: 13px; }
.mts-about { font-size: 15px; line-height: 1.65; margin: 0; }

/* On this day */
.mts-otd ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.mts-otd li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 8px; font-size: 15px; line-height: 1.4; }
.mts-otd .y { font-family: var(--mts-mono); font-size: 13px; color: var(--mts-muted); padding-top: 2px; }
.mts-otd a { color: var(--mts-ink); text-decoration: none; }
.mts-otd a:hover { color: var(--mts-accent); text-decoration: underline; }
.mts-otd .mts-more a { color: var(--mts-accent); }
.mts-otd-note { margin: 0 0 10px !important; font-size: 14px; font-style: italic; color: var(--mts-muted); }

/* ---------- Post cards ---------- */
.mts-cards { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 28px; }
.mts-cards > li { margin: 0; }
.mts-card {
	background: var(--mts-card); border: 1px solid var(--mts-line); padding: 32px; box-sizing: border-box;
	display: flow-root;
}
.mts-card > * { margin-block: 0 14px; }
.mts-card > *:last-child { margin-bottom: 0; }
.mts-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-family: var(--mts-mono); font-size: 13px; color: var(--mts-muted); }
.mts-meta > * { margin: 0 !important; font-size: 13px !important; }
.mts-tags a { color: var(--mts-accent); text-decoration: none; margin-right: 10px; }
.mts-tags a:hover { text-decoration: underline; }
.mts-tags .wp-block-post-terms__separator { display: none; }
.mts-title { text-wrap: pretty; font-family: var(--mts-serif) !important; font-size: 26px !important; font-weight: 600 !important; line-height: 1.25 !important; }
.mts-title a { color: var(--mts-ink); text-decoration: none; }
.mts-title a:hover { color: var(--mts-accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.mts-excerpt p { margin: 0; font-size: 16px; line-height: 1.7; }
.mts-excerpt .wp-block-post-excerpt__more-text { margin-top: 12px; font-family: var(--mts-mono); font-size: 14px; }
.mts-excerpt .wp-block-post-excerpt__more-link { color: var(--mts-accent); text-decoration: none; }
.mts-excerpt .wp-block-post-excerpt__more-link:hover { text-decoration: underline; }

/* Thumbnails: the newest post gets a wide photo, the rest a small one at the side. */
.mts-thumb img { border: 1px solid var(--mts-line); display: block; }
.mts-cards > li:first-child .mts-title { font-size: 34px !important; line-height: 1.2 !important; }
.mts-cards > li:first-child .mts-thumb img { width: 100%; height: 340px; object-fit: cover; }
.mts-cards > li:not(:first-child) .mts-thumb { float: right; width: 200px; margin: 4px 0 12px 24px; }
.mts-cards > li:not(:first-child) .mts-thumb img { width: 200px; height: 140px; object-fit: cover; }
@media (max-width: 600px) {
	.mts-card { padding: 22px 18px; }
	.mts-cards > li:first-child .mts-thumb img { height: 220px; }
	.mts-cards > li:not(:first-child) .mts-thumb { float: none; width: 100%; margin: 0 0 14px; }
	.mts-cards > li:not(:first-child) .mts-thumb img { width: 100%; height: 180px; }
	.mts-title, .mts-cards > li:first-child .mts-title { font-size: 24px !important; }
}

/* Pagination */
.mts-pager { margin-top: 28px !important; font-family: var(--mts-mono); font-size: 14px; gap: 12px; }
.mts-pager a { color: var(--mts-accent); text-decoration: none; }
.mts-pager a:hover { text-decoration: underline; }
.mts-pager .page-numbers { padding: 2px 6px; }
.mts-pager .page-numbers.current { background: var(--mts-header); color: var(--mts-paper); }

/* Random archive entry */
.mts-random { border: 1px dashed var(--mts-accent); padding: 24px 28px; }
.mts-random h2 { font-family: var(--mts-mono); font-size: 14px; font-weight: 600; letter-spacing: 1.5px; color: var(--mts-accent); margin: 0 0 10px; }
.mts-random .t { margin: 0 0 6px; font-size: 22px; font-weight: 600; line-height: 1.3; }
.mts-random .t a { color: var(--mts-ink); text-decoration: none; }
.mts-random .t a:hover { color: var(--mts-accent); text-decoration: underline; }
.mts-random .m { margin: 0; font-family: var(--mts-mono); font-size: 13px; color: var(--mts-muted); }

/* Archive / search headings */
.mts-page-head > * { margin: 0 0 6px; }
.mts-page-head .wp-block-query-title { font-family: var(--mts-mono); font-size: 28px; font-weight: 600; }
.mts-page-head .wp-block-term-description { color: var(--mts-muted); }

/* ---------- Single posts and pages ---------- */
.mts-single .mts-title { font-size: 36px !important; line-height: 1.2 !important; }
.mts-content { font-size: 17px; line-height: 1.75; }
.mts-content > * { margin-block: 0 1.1em; max-width: 100%; }
.mts-content img { max-width: 100%; height: auto; }
.mts-content .alignright, .mts-content img.alignright { float: right; margin: 4px 0 12px 20px; }
.mts-content .alignleft, .mts-content img.alignleft { float: left; margin: 4px 20px 12px 0; }
.mts-content .aligncenter { display: block; margin-inline: auto; }
.mts-content .wp-caption { max-width: 100%; }
.mts-content .wp-caption-text, .mts-content figcaption { font-size: 14px; color: var(--mts-muted); font-style: italic; }
.mts-content blockquote { border-left: 3px solid var(--mts-accent); margin-left: 0; padding-left: 18px; font-style: italic; }
.mts-content pre, .mts-content code { font-family: var(--mts-mono); font-size: 14px; }
.mts-content pre { background: var(--mts-paper); border: 1px solid var(--mts-line); padding: 14px; overflow-x: auto; }
.mts-content h2, .mts-content h3 { margin-top: 1.6em; }
.mts-content iframe, .mts-content video, .mts-content audio { max-width: 100%; }
.mts-post-tags { font-family: var(--mts-mono); font-size: 13px; color: var(--mts-muted); clear: both; }
.mts-post-tags a { color: var(--mts-accent); }

.mts-postnav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; font-family: var(--mts-mono); font-size: 14px; }
.mts-postnav > * { margin: 0 !important; max-width: 48%; }
.mts-postnav .post-navigation-link-previous a::before { content: "< "; }
.mts-postnav .post-navigation-link-next { margin-left: auto !important; text-align: right; }
.mts-postnav .post-navigation-link-next a::after { content: " >"; }
.mts-postnav a { color: var(--mts-accent); text-decoration: none; }
.mts-postnav a:hover { text-decoration: underline; }

/* Comments */
.mts-comments { border-top: 1px solid var(--mts-line); padding-top: 24px; }
.mts-comments .wp-block-comments-title { font-family: var(--mts-mono); font-size: 16px; font-weight: 600; }
.mts-comments ol { padding-left: 0; list-style: none; }
.mts-comments ol ol { padding-left: 28px; }
.mts-comment { border-left: 2px solid var(--mts-line); padding: 4px 0 4px 16px; margin-bottom: 20px; }
.mts-comment .wp-block-comment-author-name { font-weight: 600; font-family: var(--mts-serif); font-size: 15px !important; color: var(--mts-ink); }
.mts-comment .wp-block-comment-content { font-size: 15px; }
.mts-comment .wp-block-comment-content p { margin: 6px 0; }
.mts-comment .wp-block-comment-reply-link { font-family: var(--mts-mono); font-size: 13px; }
.mts-comments input[type="text"], .mts-comments input[type="email"], .mts-comments input[type="url"], .mts-comments textarea {
	font: inherit; font-size: 15px; border: 1px solid var(--mts-ink); border-radius: 0; background: var(--mts-card); padding: 8px 10px; width: 100%; box-sizing: border-box;
}
.mts-comments .wp-block-button__link, .mts-comments input[type="submit"] {
	font-family: var(--mts-mono); font-size: 14px; background: var(--mts-header); color: var(--mts-paper); border: 0; border-radius: 0; padding: 10px 18px; cursor: pointer;
}

/* ---------- Footer ---------- */
.mts-footer { border-top: 1px solid var(--mts-line); }
.mts-footer-line {
	max-width: 1160px; margin: 0 auto; padding: 24px 32px; box-sizing: border-box;
	display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
	font-family: var(--mts-mono); font-size: 13px; color: var(--mts-muted);
}
.mts-footer-line a { color: var(--mts-muted); }

.screen-reader-text {
	border: 0; clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important;
}
