/* UK Tech Exits — main stylesheet */
:root {
	--paper: #F4F1EA;
	--paper-2: #FBFAF6;
	--paper-3: #E6E0D2;
	--ink: #14130F;
	--ink-2: #3A372F;
	--ink-3: #4A473F;
	--rule: #D9D3C5;
	--rule-2: #B9B2A2;
	--grey: #6B675E;
	--mint: #8FD3B4;
	--accent: #0B5D40;
	--serif: 'Newsreader', Georgia, 'Times New Roman', serif;
	--sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--mono: 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.5; }
img { max-width: 100%; height: auto; }
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--accent); text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
ul.menu, .chips, .grade-list { list-style: none; margin: 0; padding: 0; }

.wrap { max-width: 1240px; margin: 0 auto; padding-left: 32px; padding-right: 32px; }
.mono { font-family: var(--mono); }
.muted { color: var(--ink-3); }
.muted-strong { color: var(--ink-2); }
.h-serif { font-family: var(--serif); font-weight: 500; }
.label { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin: 0; }
.kicker { margin: 0; font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.arrow { color: var(--accent); }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--paper); padding: 10px 16px; z-index: 100; }
.skip-link:focus { left: 8px; top: 8px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; font-weight: 600; font-size: 14px; }
.btn:hover { text-decoration: none; }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: var(--accent); color: #fff; }
.btn-block { display: flex; justify-content: center; }
.btn-paper, .library .btn-paper { background: var(--paper); color: var(--ink); }
.btn-paper:hover, .library .btn-paper:hover { color: var(--ink); background: #fff; }
.btn-outline-paper { border: 1px solid var(--paper); color: var(--paper); }
.btn-outline-paper:hover { color: var(--paper); background: rgba(255,255,255,.08); }

/* Evidence chips */
.chip { display: inline-block; font-family: var(--mono); font-size: 11px; line-height: 1.6; padding: 1px 7px; white-space: nowrap; border: 1px solid var(--grey); color: var(--ink-2); }
.chip-a { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip-b { border-color: var(--accent); color: var(--accent); }
.library .chip-a { background: var(--mint); border-color: var(--mint); color: var(--ink); }
.library .chip-b { border-color: var(--mint); color: var(--mint); }
.library .chip-c { border-color: #C9C4B8; color: #E8E4D9; }

/* Utility bar */
.utility { border-bottom: 1px solid var(--rule); font-size: 13px; }
.utility-inner { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; justify-content: space-between; padding-top: 10px; padding-bottom: 10px; }
.utility-left, .utility-nav, .utility-nav .menu { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; }
.desk { display: inline-flex; gap: 6px; align-items: center; color: var(--accent); font-weight: 600; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.sister { font-weight: 600; }

/* Masthead */
.masthead { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-end; justify-content: space-between; padding-top: 28px; padding-bottom: 20px; }
.brand { display: flex; flex-direction: column; gap: 6px; }
.site-title { margin: 0; font-family: var(--serif); font-size: clamp(34px, 5vw, 64px); font-weight: 700; line-height: .95; letter-spacing: -.02em; }
.site-title a:hover { color: var(--ink); text-decoration: none; }
.custom-logo { max-height: 72px; width: auto; }
.tagline { margin: 0; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.masthead-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.search-form { display: flex; align-items: center; gap: 8px; border: 1px solid var(--ink); padding: 0 14px; height: 44px; min-width: 260px; background: var(--paper-2); }
.search-form input { border: 0; background: transparent; font: inherit; font-size: 14px; flex: 1; min-width: 0; color: var(--ink); }
.search-form input:focus { outline: none; }
.search-form:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.search-form input::placeholder { color: var(--grey); }

/* Section nav */
.sections { border-top: 3px solid var(--ink); border-bottom: 1px solid var(--ink); }
.sections .menu { display: flex; flex-wrap: wrap; gap: 0 28px; font-weight: 600; font-size: 14px; }
.sections .menu a { display: block; padding: 12px 0; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.sections .menu a:hover { text-decoration: none; border-bottom-color: var(--rule-2); color: var(--ink); }
.sections .current-menu-item > a, .sections .current-menu-parent > a, .sections .current-category-ancestor > a { border-bottom-color: var(--accent); }
.sections .menu-library > a { color: var(--accent); }

/* Exit tape */
.tape { background: var(--ink); color: var(--paper); font-family: var(--mono); font-size: 13px; overflow-x: auto; scrollbar-width: thin; }
.tape-inner { display: flex; gap: 32px; white-space: nowrap; align-items: center; padding-top: 10px; padding-bottom: 10px; }
.tape a { color: var(--paper); }
.tape a:hover { color: var(--mint); }
.tape .arrow, .tape-label { color: var(--mint); }
.tape-label { font-weight: 500; }

/* Front: hero */
.front { padding-top: 40px; display: flex; flex-direction: column; gap: 56px; }
.hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(480px, 100%), 1fr)); gap: 40px; }
.lead { display: flex; flex-direction: column; gap: 20px; }
.lead-text { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.lead-image { display: block; background: var(--paper-3); }
.lead-image img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.hero-solo .lead.has-image { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr)); gap: 40px; align-items: start; max-width: none; }
.hero-solo .lead.has-image .lead-image { order: 2; }
.lead-title, .article-title { margin: 0; font-family: var(--serif); font-size: clamp(26px, 2.8vw, 38px); line-height: 1.04; font-weight: 500; letter-spacing: -.015em; text-wrap: balance; }
.hero-solo { grid-template-columns: minmax(0, 1fr); }
.hero-solo .lead { max-width: 900px; }
.lead-title a:hover { color: var(--ink); text-decoration-thickness: 2px; }
.dek, .dek p { margin: 0; font-size: 16px; color: var(--ink-2); max-width: 60ch; }
.more { font-weight: 600; color: var(--accent); }

.deal-card { margin: 0; border: 1px solid var(--ink); background: var(--paper-2); display: flex; flex-wrap: wrap; overflow: hidden; }
.deal-card > div { flex: 1 1 140px; padding: 16px 18px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); display: flex; flex-direction: column; gap: 4px; margin: 0 -1px -1px 0; }
.deal-card dt { font-size: 12px; color: var(--ink-3); }
.deal-card dd { margin: 0; font-size: 17px; line-height: 1.2; }
.deal-card dd.mono { font-size: 15px; }
.deal-card dd .chip { align-self: flex-start; }

.library { background: var(--ink); color: var(--paper); padding: 32px; display: flex; flex-direction: column; gap: 20px; }
.library a { color: var(--paper); }
.library-top { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.library-label { color: var(--mint); }
.library-sub { color: #C9C4B8; text-transform: none; letter-spacing: 0; }
.library-title { margin: 0; font-family: var(--serif); font-size: clamp(24px, 2.2vw, 30px); line-height: 1.1; font-weight: 500; }
.library p { margin: 0; color: #D6D1C4; }
.figures { margin: 0; border-top: 1px solid #3A372F; }
.figures > div { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 12px 0; border-bottom: 1px solid #3A372F; }
.figures dd { margin: 0; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.figures strong { font-weight: 500; }
.figures-light { border-top-color: var(--ink); margin: 28px 0; }
.figures-light > div { border-bottom-color: var(--rule); }
.library-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Columns: list + rail */
.columns { display: flex; flex-wrap: wrap; gap: 48px; }
.list { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; }
.list-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; border-bottom: 3px solid var(--ink); padding-bottom: 10px; }
.list-head h1, .list-head h2 { margin: 0; font-size: 26px; }
.list-head-lg h1 { font-size: clamp(26px, 3vw, 36px); }
.list-head a { font-size: 14px; font-weight: 600; }
.archive-desc { padding: 16px 0 0; color: var(--ink-2); }
.deal-row { display: grid; grid-template-columns: 132px 80px minmax(0, 1fr) auto; gap: 8px 20px; align-items: start; padding: 18px 0; border-bottom: 1px solid var(--rule); }
.deal-row-thumb { display: block; width: 132px; aspect-ratio: 3 / 2; background: var(--paper-3); overflow: hidden; }
.deal-row-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.thumb-empty { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; font-size: 11px; letter-spacing: .1em; color: var(--grey); }
.deal-row time { padding-top: 3px; }
.deal-row .chip { margin-top: 3px; }
.deal-row-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.deal-row-title { margin: 0; font-family: var(--serif); font-size: 19px; line-height: 1.2; font-weight: 400; }
.deal-row-meta { margin: 0; font-size: 13px; color: var(--ink-3); }
.deal-row time { font-size: 13px; }
.empty { padding: 32px 0; color: var(--ink-2); }

.rail { flex: 1 1 300px; display: flex; flex-direction: column; gap: 32px; }
.box { padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.box h2 { margin: 0; font-size: 21px; }
.box p { margin: 0; font-size: 14px; }
.grades { border: 1px solid var(--ink); background: var(--paper-2); }
.grade-list { display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.grade-list li { display: flex; gap: 12px; align-items: baseline; }
.brief { background: var(--accent); color: #fff; }
.brief .btn-ink:hover { background: #fff; color: var(--ink); }
.brief-form { display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.brief-form input { height: 44px; border: 0; padding: 0 12px; font: inherit; font-size: 15px; }
.brief-form button { height: 44px; border: 0; background: var(--ink); color: var(--paper); font: inherit; font-weight: 600; cursor: pointer; }
.brief-form button:hover { background: #000; }
.sectors { display: flex; flex-direction: column; gap: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips a { display: inline-block; font-size: 13px; padding: 6px 12px; border: 1px solid var(--rule-2); background: var(--paper-2); }
.chips a:hover { border-color: var(--accent); text-decoration: none; }

/* Network band */
.network { background: var(--paper-3); padding: 48px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: 32px; align-items: center; }
.network-copy { display: flex; flex-direction: column; gap: 14px; }
.network h2 { margin: 0; font-size: clamp(24px, 2.4vw, 32px); line-height: 1.05; text-wrap: balance; }
.network p { margin: 0; max-width: 52ch; }
.network-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 16px; }
.net-card { background: var(--paper-2); border: 1px solid var(--ink); padding: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ink-2); }
.net-card strong { font-size: 19px; color: var(--ink); }
.net-card:hover { text-decoration: none; border-color: var(--accent); }
.net-card-ink { background: var(--ink); color: #D6D1C4; }
.net-card-ink strong { color: var(--paper); }
.net-card-ink .label { color: var(--mint); }
.net-card-ink:hover { color: #D6D1C4; }

/* Single */
.single, .listing, .page-main { padding-top: 40px; }
.article-layout { display: flex; flex-wrap: wrap; gap: 48px; }
.article { flex: 999 1 560px; min-width: 0; max-width: 760px; }
.article-head { display: flex; flex-direction: column; gap: 16px; margin-bottom: 28px; }
.byline { margin: 0; font-size: 14px; }
.article-image { margin: 28px 0; }
.entry { font-family: var(--serif); font-size: 18px; line-height: 1.6; margin-top: 28px; }
.entry p { margin: 0 0 1.1em; }
.entry h2, .entry h3 { font-family: var(--serif); font-weight: 500; line-height: 1.2; margin: 1.6em 0 .5em; }
.entry a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.entry blockquote { margin: 1.4em 0; padding: 0 0 0 20px; border-left: 3px solid var(--ink); font-style: italic; }
.entry img, .entry figure { max-width: 100%; height: auto; }
.entry .wp-caption-text, .entry figcaption { font-family: var(--sans); font-size: 13px; color: var(--ink-3); }
.tracker { margin-top: 40px; border-top: 3px solid var(--ink); padding-top: 12px; }
.tracker h2 { margin: 0 0 12px; font-size: 24px; }
.table-scroll { overflow-x: auto; }
.tracker table { width: 100%; border-collapse: collapse; font-size: 14px; }
.tracker th { text-align: left; font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--ink-3); padding: 8px 0; border-bottom: 1px solid var(--ink); }
.tracker td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--rule); vertical-align: baseline; }
.tracker td:last-child { width: 1%; }
.tracker a { color: var(--accent); text-decoration: underline; }
.article-tags { margin-top: 32px; }
.related { margin-top: 64px; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 0 32px; }
.related-card { display: flex; flex-direction: column; gap: 6px; padding: 18px 0; border-bottom: 1px solid var(--rule); font-size: 18px; line-height: 1.25; }
.related-card .mono { font-size: 12px; }
.page-article { max-width: 760px; }
.page-article .search-form { margin-top: 24px; max-width: 420px; }

/* Pagination */
.pagination { margin-top: 32px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 12px; border: 1px solid var(--rule-2); font-family: var(--mono); font-size: 14px; }
.pagination .page-numbers.current { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* Footer */
.site-footer { margin-top: 64px; border-top: 3px solid var(--ink); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 32px; padding-top: 40px; padding-bottom: 40px; font-size: 14px; }
.footer-grid p { margin: 0 0 8px; }
.footer-col .menu { display: flex; flex-direction: column; gap: 8px; }
.footer-col .label { margin-bottom: 10px; }
.footer-name { font-family: var(--serif); font-size: 22px; font-weight: 700; }
.copyright { font-size: 12px; color: var(--ink-3); padding-top: 16px; padding-bottom: 32px; }

/* Small screens */
@media (max-width: 640px) {
	.wrap { padding-left: 18px; padding-right: 18px; }
	.hero-solo .lead.has-image .lead-image { order: -1; }
	.masthead { padding-top: 24px; }
	.search-form { min-width: 0; width: 100%; }
	.masthead-actions { width: 100%; }
	.masthead-actions .btn { width: 100%; justify-content: center; }
	.sections .menu { flex-wrap: nowrap; overflow-x: auto; gap: 0 20px; white-space: nowrap; }
	.deal-row { grid-template-columns: 96px minmax(0, 1fr); gap: 6px 14px; }
	.deal-row-thumb { width: 96px; grid-row: span 3; }
	.deal-row time, .deal-row .chip { justify-self: start; padding-top: 0; margin-top: 0; }
	.library, .network { padding: 24px; }
	.entry { font-size: 17px; }
}

/* Comments */
.comments { margin-top: 48px; border-top: 3px solid var(--ink); padding-top: 12px; }
.comments h2, .comment-reply-title { font-family: var(--serif); font-weight: 500; font-size: 26px; margin: 0 0 16px; }
.comment-list { list-style: none; margin: 0 0 32px; padding: 0; }
.comment-list .comment { padding: 16px 0; border-bottom: 1px solid var(--rule); }
.comment-list .children { list-style: none; padding-left: 24px; }
.comment-meta { font-size: 13px; color: var(--ink-3); }
.comment-form { display: flex; flex-direction: column; gap: 14px; font-size: 14px; }
.comment-form p { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.comment-form .comment-form-cookies-consent { flex-direction: row; gap: 8px; align-items: flex-start; }
.comment-form input[type=text], .comment-form input[type=email], .comment-form input[type=url], .comment-form textarea { font: inherit; font-size: 15px; padding: 10px 12px; border: 1px solid var(--ink); background: var(--paper-2); color: var(--ink); width: 100%; max-width: 560px; }
.comment-form input[type=text], .comment-form input[type=email], .comment-form input[type=url] { min-height: 44px; }
.comment-form .submit { min-height: 44px; padding: 0 20px; border: 0; background: var(--ink); color: var(--paper); font: inherit; font-weight: 600; cursor: pointer; }
.comment-form .submit:hover { background: var(--accent); }
