/*
Theme Name: BestExclusive
Description: One design system for the BestExclusive home page and every guide site. Each guide sets its own accent colour; guides lead with the short answer.
Version: 0.2.0
Requires PHP: 7.4
Text Domain: bestexclusive
*/

/*
 * Concept: an answer desk. The one loud thing is the Bricolage headline; the answer itself sits
 * in a tinted slip right under it; the reading column stays calm, set in a typeface built for
 * legibility. Colour comes from each guide's accent, used sparingly.
 */
@font-face { font-family: "Bricolage Grotesque"; font-weight: 200 800; font-display: swap; src: url(fonts/bricolage.woff2) format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible Next"; font-style: normal; font-weight: 200 800; font-display: swap; src: url(fonts/atkinson.woff2) format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible Next"; font-style: italic; font-weight: 200 800; font-display: swap; src: url(fonts/atkinson-italic.woff2) format("woff2"); }

:root {
	--paper: #ffffff;
	--band: #f4f5f8;
	--ink: #15171d;
	--ink-2: #383d49;
	--muted: #5e6472;
	--line: #e3e5ea;
	--accent: #2b45e0;
	--accent-ink: #ffffff;
	--accent-soft: color-mix(in srgb, var(--accent) 9%, #ffffff);
	--accent-line: color-mix(in srgb, var(--accent) 28%, #ffffff);
	--accent-deep: color-mix(in srgb, var(--accent) 78%, #000000);
	--display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
	--text: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--measure: 68ch;
	--radius: 14px;
	--gut: max(20px, env(safe-area-inset-left, 0px));
	--gut-r: max(20px, env(safe-area-inset-right, 0px));
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--text); font-size: 1.125rem; line-height: 1.72; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 4px; }
a:hover { color: var(--accent-deep); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 50; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 8px; }

.wrap { max-width: 1160px; margin: 0 auto; padding-left: var(--gut); padding-right: var(--gut-r); }

h1, h2, h3 { font-family: var(--display); color: var(--ink); text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2.5rem, 6.4vw, 4.4rem); font-weight: 800; line-height: 1.02; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.55rem, 3vw, 2.05rem); font-weight: 760; line-height: 1.12; letter-spacing: -0.02em; }
h3 { font-size: 1.22rem; font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; }
.meta { font-family: var(--display); font-size: 0.95rem; color: var(--muted); font-weight: 500; }

/* ---------- Header ---------- */
.site-head { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 10px 24px; min-height: 66px; flex-wrap: wrap; padding-block: 10px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); font-family: var(--display); }
.brand:hover { color: var(--ink); }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--accent); display: grid; place-items: center; color: var(--accent-ink); font-weight: 800; font-size: 0.95rem; letter-spacing: -0.04em; flex: none; }
.brand-name { font-weight: 780; font-size: 1.28rem; letter-spacing: -0.03em; }
.brand-sub { color: var(--muted); font-weight: 500; font-size: 0.95rem; padding-left: 11px; border-left: 1px solid var(--line); }
.nav { display: flex; gap: 6px; font-family: var(--display); font-size: 0.97rem; font-weight: 600; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.nav::-webkit-scrollbar { display: none; }
.nav a { text-decoration: none; color: var(--ink-2); padding: 7px 13px; border-radius: 999px; white-space: nowrap; }
.nav a:hover { background: var(--band); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-deep); }

/* ---------- Heroes ---------- */
.hero { padding-block: clamp(48px, 9vw, 104px) clamp(32px, 5vw, 56px); }
.hero h1 { max-width: 15ch; }
.hero .lede { font-size: clamp(1.15rem, 2vw, 1.3rem); color: var(--ink-2); max-width: 52ch; margin: 22px 0 0; line-height: 1.6; }
.hero .facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 26px 0 0; padding: 0; list-style: none; font-family: var(--display); font-weight: 600; color: var(--ink-2); font-size: 0.98rem; }
.hero .facts li { display: flex; align-items: center; gap: 8px; }
.hero .facts li::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); }

/* Home hero: the newest real answer, as a slip on a small stack */
.home-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.slip { position: relative; display: grid; gap: 10px; padding: 26px 28px 24px; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; text-decoration: none; color: var(--ink); transform: rotate(-1.6deg); box-shadow: 0 30px 60px -36px rgba(21, 23, 29, .45); transition: transform .25s ease; }
.slip::before, .slip::after { content: ""; position: absolute; inset: 0; border-radius: 18px; border: 1px solid var(--line); background: var(--band); z-index: -1; }
.slip::before { transform: rotate(4deg) translate(10px, 8px); }
.slip::after { transform: rotate(1.8deg) translate(4px, 4px); background: color-mix(in srgb, var(--accent) 7%, #ffffff); }
.slip:hover { transform: rotate(0deg); color: var(--ink); }
.slip-src { display: inline-flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 600; font-size: 0.9rem; color: var(--muted); }
.slip-src i { width: 9px; height: 9px; border-radius: 3px; background: var(--accent); }
.slip strong { font-family: var(--display); font-size: 1.45rem; font-weight: 760; line-height: 1.2; letter-spacing: -0.02em; }
.slip-label { font-family: var(--display); font-weight: 750; font-size: 0.92rem; color: var(--accent-deep); margin-top: 4px; }
.slip-ans { font-size: 1.04rem; line-height: 1.55; color: var(--ink-2); padding-left: 14px; border-left: 4px solid var(--accent); }
.slip-date { font-family: var(--display); font-size: 0.86rem; color: var(--muted); }

.hub-hero { background: var(--accent-soft); border-bottom: 1px solid var(--accent-line); }
.hub-hero .grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: end; }
.start { background: var(--paper); border-radius: var(--radius); padding: 24px 26px; box-shadow: 0 1px 0 var(--accent-line), 0 18px 40px -24px color-mix(in srgb, var(--accent) 45%, transparent); display: grid; gap: 10px; }
.start .label { font-family: var(--display); font-weight: 700; font-size: 0.92rem; color: var(--accent-deep); }
.start a.title { font-family: var(--display); font-weight: 750; font-size: 1.45rem; line-height: 1.2; text-decoration: none; letter-spacing: -0.015em; }
.start a.title:hover { color: var(--accent-deep); }
.start p { margin: 0; color: var(--ink-2); font-size: 1.02rem; line-height: 1.6; }

/* ---------- Sections and lists ---------- */
.section { padding-block: clamp(36px, 6vw, 64px); }
.section.band { background: var(--band); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.section-head .meta { white-space: nowrap; }

.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 14px; }
.cards a { display: grid; gap: 8px; align-content: start; height: 100%; padding: 22px 22px 20px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; transition: border-color .15s, transform .15s; }
.cards a:hover { border-color: var(--accent); transform: translateY(-2px); }
.cards strong { font-family: var(--display); font-size: 1.16rem; font-weight: 700; line-height: 1.28; letter-spacing: -0.01em; color: var(--ink); }
.cards span { color: var(--muted); font-size: 1rem; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cards em { font-style: normal; font-family: var(--display); font-size: 0.88rem; color: var(--muted); font-weight: 500; }

/* Home: latest answers across every guide */
.feed { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.feed li { border-bottom: 1px solid var(--line); }
.feed a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 24px; padding: 20px 0; text-decoration: none; }
.feed .src { grid-column: 1 / -1; display: inline-flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 600; font-size: 0.9rem; color: var(--muted); }
.feed .src i { width: 9px; height: 9px; border-radius: 3px; background: var(--dot, var(--accent)); }
.feed strong { font-family: var(--display); font-size: clamp(1.15rem, 2.2vw, 1.35rem); font-weight: 720; line-height: 1.25; letter-spacing: -0.015em; }
.feed a:hover strong { color: var(--accent-deep); }
.feed .ans { color: var(--ink-2); font-size: 1.02rem; line-height: 1.55; max-width: 70ch; }
.feed time { font-family: var(--display); font-size: 0.88rem; color: var(--muted); align-self: start; white-space: nowrap; }

.sites { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 16px; }
.sites a { display: grid; gap: 10px; height: 100%; padding: 26px; border-radius: var(--radius); text-decoration: none; background: var(--paper); border: 1px solid var(--line); position: relative; overflow: hidden; }
.sites a::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; background: var(--site-accent, var(--accent)); }
.sites a:hover { border-color: var(--site-accent, var(--accent)); }
.sites strong { font-family: var(--display); font-size: 1.5rem; font-weight: 780; letter-spacing: -0.02em; color: var(--ink); }
.sites span { color: var(--ink-2); font-size: 1.02rem; line-height: 1.55; }
.sites em { font-style: normal; font-family: var(--display); font-weight: 600; font-size: 0.92rem; color: var(--muted); }

/* ---------- Guide page ---------- */
.guide-head { padding-block: clamp(32px, 6vw, 64px) 0; }
.crumbs { font-family: var(--display); font-size: 0.95rem; color: var(--muted); margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; list-style: none; font-weight: 500; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent-deep); }
.crumbs li + li::before { content: "/"; margin-right: 6px; opacity: .45; }
.guide-head h1 { font-size: clamp(2.1rem, 5.2vw, 3.5rem); max-width: 20ch; }
.guide-head .meta { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 4px 16px; }

.answer { position: relative; margin: 30px 0 0; padding: 24px 28px 24px 30px; background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: var(--radius); max-width: 760px; }
.answer::before { content: ""; position: absolute; left: -1px; top: 18px; bottom: 18px; width: 5px; border-radius: 0 4px 4px 0; background: var(--accent); }
.answer h2 { font-size: 1.05rem; font-weight: 750; letter-spacing: 0; color: var(--accent-deep); margin-bottom: 6px; }
.answer p { margin: 0; font-size: 1.18rem; line-height: 1.6; color: var(--ink); }

.guide-body { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: clamp(32px, 6vw, 80px); align-items: start; padding-block: 36px 24px; }
.side { position: sticky; top: 92px; display: grid; gap: 22px; font-family: var(--display); }
.side h3 { font-size: 0.95rem; font-weight: 700; color: var(--muted); margin-bottom: 8px; letter-spacing: 0; }
.side ol, .side ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; border-left: 2px solid var(--line); }
.side li a { display: block; padding: 5px 0 5px 14px; margin-left: -2px; border-left: 2px solid transparent; text-decoration: none; color: var(--ink-2); font-size: 0.97rem; line-height: 1.35; font-weight: 500; }
.side li a:hover { color: var(--ink); border-left-color: var(--accent); }
.side li a.on { color: var(--accent-deep); border-left-color: var(--accent); }
.side .sources li { padding: 4px 0 4px 14px; font-size: 0.93rem; color: var(--ink-2); line-height: 1.35; }
.side .sources a { padding: 0; border: 0; margin: 0; display: inline; font-weight: 600; }

.prose { max-width: var(--measure); color: var(--ink-2); min-width: 0; }
.prose > * + * { margin-top: 1.1em; }
.prose > :first-child { margin-top: 0; }
.prose h2 { margin-top: 2em; color: var(--ink); }
.prose h3 { margin-top: 1.6em; color: var(--ink); }
.prose p, .prose ul, .prose ol { margin-bottom: 0; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { padding-left: 0.2em; }
.prose li + li { margin-top: .45em; }
.prose li::marker { color: var(--accent); font-weight: 700; }
.prose strong { color: var(--ink); font-weight: 700; }
.prose em { color: var(--muted); }
.prose a { font-weight: 600; color: var(--ink); }
.prose a:hover { color: var(--accent-deep); }
.prose blockquote { margin-left: 0; padding-left: 18px; border-left: 3px solid var(--accent-line); color: var(--muted); }
.prose table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 1rem; display: block; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; line-height: 1.45; }
.prose th, .prose td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose tr:last-child td { border-bottom: 0; }
.prose thead th { background: var(--band); color: var(--ink); font-family: var(--display); font-weight: 700; font-size: 0.95rem; white-space: nowrap; }
.prose tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--band) 55%, #ffffff); }
.prose td:first-child { color: var(--ink); font-weight: 600; }

.toc-mobile { display: none; margin: 22px 0 0; font-family: var(--display); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; max-width: 760px; }
.toc-mobile summary { cursor: pointer; font-weight: 700; }
.toc-mobile ol { margin: 10px 0 2px; padding-left: 1.2em; display: grid; gap: 6px; }
.toc-mobile a { text-decoration: none; color: var(--ink-2); }

.related { padding-block: 40px 8px; border-top: 1px solid var(--line); margin-top: 32px; }
.disclosure { margin-top: 36px; max-width: var(--measure); font-size: 0.92rem; color: var(--muted); line-height: 1.6; }

/* Partner box: only appears once a real partner link is saved */
.pick { margin: 1.8em 0 0; border: 1.5px solid var(--ink); border-radius: var(--radius); padding: 20px 22px; display: grid; gap: 6px; font-family: var(--display); }
.pick strong { font-size: 1.15rem; color: var(--ink); }
.pick span { color: var(--ink-2); font-family: var(--text); font-size: 1rem; }
.pick a.go { justify-self: start; margin-top: 6px; background: var(--ink); color: #fff; text-decoration: none; padding: 10px 18px; border-radius: 10px; font-weight: 650; }
.pick a.go:hover { background: var(--accent-deep); color: #fff; }
.pick::after { content: "Partner link"; font-size: 0.8rem; color: var(--muted); }

/* Reading progress */
.progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--accent); z-index: 30; }

/* ---------- Pages and lists ---------- */
.page-body { padding-block: 8px 24px; }
.empty { color: var(--muted); font-family: var(--display); padding: 24px 0; }

/* ---------- Footer ---------- */
.site-foot { background: var(--ink); color: #c9ccd4; margin-top: 64px; padding-block: 48px 56px; font-size: 0.98rem; }
.site-foot .wrap { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: 32px; }
.site-foot h3 { color: #ffffff; font-size: 1rem; margin-bottom: 12px; }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-foot a { color: #c9ccd4; text-decoration: none; }
.site-foot a:hover { color: #ffffff; text-decoration: underline; text-decoration-color: var(--accent); }
.site-foot .brand { color: #ffffff; }
.site-foot .brand:hover { color: #ffffff; }
.site-foot .brand-mark { background: #2b45e0; color: #fff; }
.site-foot p { margin: 14px 0 0; max-width: 46ch; line-height: 1.6; }
.site-foot .small { font-size: 0.88rem; color: #9da1ab; margin-top: 18px; }

@media (max-width: 960px) {
	.guide-body { grid-template-columns: minmax(0, 1fr); }
	.side { position: static; }
	.side .toc { display: none; }
	.toc-mobile { display: block; }
	.hub-hero .grid, .home-grid { grid-template-columns: minmax(0, 1fr); }
	.slip { transform: none; margin: 8px 10px 12px 0; }
	.site-foot .wrap { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
	body { font-size: 1.0625rem; }
	.brand-sub { display: none; }
	.site-head .wrap { min-height: 58px; }
	.feed a { grid-template-columns: minmax(0, 1fr); }
	.feed time { order: 3; }
	.answer { padding: 20px 20px 20px 24px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } .progress { display: none; } }
