/**
 * Budvocate v3 — Global Layout, Masthead, Cards & Shared Components (library.css)
 *
 * Clean, unboxed editorial styling with generous negative space.
 * Uses central :root variables from base.css.
 */

/* ==========================================================================
   1. Container & Global Rhythm
   ========================================================================== */

:root {
	--bud-face: "League Gothic", "Arial Narrow", Impact, sans-serif;
}

.bud-melt-defs {
	position: absolute;
}

/* Page-coloured shape that melts into whatever photograph is behind it. Bars just
   outside the shape give the filter an edge to round into; they get clipped away
   and only the curve they leave stays. */
.bud-notch {
	--notch-color: var(--charcoal);
	--notch-room: 26px;
	position: absolute;
	right: 0;
	bottom: 0;
	display: flex;
	align-items: flex-end;
	padding: var(--notch-room) 0 0 var(--notch-room);
	filter: url(#bud-melt);
	transform: translateZ(0);
	pointer-events: none;
}

.bud-notch::before,
.bud-notch::after {
	content: "";
	position: absolute;
	background: var(--notch-color);
}

.bud-notch::before {
	inset: auto -30px -14px 0;
	height: 14px;
}

.bud-notch::after {
	inset: 0 -14px -30px auto;
	width: 14px;
}

.bud-notch i {
	display: block;
	background: var(--notch-color);
}

/* Breadcrumb bar ----------------------------------------------------------- */

.bud-crumbs {
	border-bottom: 1px solid var(--bud-line);
	font-size: 0.82rem;
}

.bud-crumbs ol {
	display: flex;
	align-items: center;
	min-height: 38px;
	margin: 0;
	padding: 0;
	overflow: hidden;
	white-space: nowrap;
	list-style: none;
}

.bud-crumbs li {
	flex: none;
	color: #aeb7af;
}

.bud-crumbs li + li::before {
	content: "/";
	margin: 0 0.55rem;
	color: #6d756e;
}

.bud-crumbs a {
	color: #aeb7af;
	text-decoration: none;
}

.bud-crumbs a:hover {
	color: var(--bud-lime);
}

/* The page you are on gives way first on a narrow screen. */
.bud-crumbs li[aria-current] {
	flex: 0 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	color: #fff;
}

/* Ad spots ----------------------------------------------------------------- */

.bud-ad {
	margin: 0;
}

.bud-ad--article {
	margin-block: 2.25rem;
	padding-block: 0.6rem 1rem;
	border-block: 1px solid var(--bud-line);
}

.bud-ad-label {
	margin: 0 0 0.4rem;
	font-size: 0.74rem;
	line-height: 1.3;
	text-align: center;
	color: #aeb7af;
}

.bud-ad-unit {
	display: grid;
	place-items: center;
	margin-inline: auto;
	max-width: 100%;
	overflow: hidden;
}

.bud-ad--rectangle .bud-ad-unit {
	width: 300px;
	min-height: 250px;
}

.bud-ad--article .bud-ad-unit {
	width: 728px;
	min-height: 90px;
}

.bud-ad-placeholder {
	display: grid;
	place-items: center;
	align-self: stretch;
	justify-self: stretch;
	padding: 0.75rem;
	border-radius: 10px;
	background: var(--bud-surface);
	font-size: 0.82rem;
	line-height: 1.35;
	text-align: center;
	color: #aeb7af;
}

@media (max-width: 760px) {
	.bud-ad--article .bud-ad-unit {
		width: 300px;
		min-height: 250px;
	}
}

/* Icons and score colours --------------------------------------------------- */

.bud-ui-icon {
	display: block;
	flex: none;
}

.bud-tone-high {
	--bud-tone: var(--bud-lime);
}

.bud-tone-mid {
	--bud-tone: #f5b83d;
}

.bud-tone-low {
	--bud-tone: #ff6a5c;
}

/* Like and don't like: a filled badge on the heading, a tick or cross on each line. */
.bud-verdict-head {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.bud-verdict-head::before {
	content: "";
	flex: none;
	width: 1.25em;
	height: 1.25em;
	border-radius: 50%;
	background-color: var(--bud-lime);
	background-position: center;
	background-repeat: no-repeat;
	background-size: 72%;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b0d0b' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}

.bud-verdict-head.is-nope::before {
	background-color: #ff6a5c;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b0d0b' stroke-width='3.4' stroke-linecap='round'%3E%3Cpath d='M6.5 6.5l11 11M17.5 6.5l-11 11'/%3E%3C/svg%3E");
}

.bud-verdict-list li {
	position: relative;
	padding-left: 1.5rem !important;
}

.bud-verdict-list li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.62em;
	width: 1rem;
	height: 1rem;
	background: var(--bud-lime);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%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='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

.bud-verdict-list.is-nope li::before {
	background: #ff6a5c;
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M6.5 6.5l11 11M17.5 6.5l-11 11'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M6.5 6.5l11 11M17.5 6.5l-11 11'/%3E%3C/svg%3E");
}

/* Review cards: the homepage row and the review page rail ------------------- */

.bud-rv-facts {
	display: flex;
	flex-wrap: wrap;
	gap: 0.2rem 0.9rem;
	margin: 0;
	font-size: 0.86rem;
	color: #aeb7af;
}

.bud-rv-facts span {
	display: inline-flex;
	align-items: center;
	gap: 0.32rem;
}

.bud-rv-facts .bud-ui-icon {
	width: 14px;
	height: 14px;
}

.bud-rv-card {
	position: relative;
}

.bud-rv-card-art {
	position: relative;
	aspect-ratio: 16 / 10;
	margin-bottom: 0.7rem;
	overflow: hidden;
	border-radius: 14px;
	border-bottom-right-radius: 0;
	background: var(--bud-panel);
}

.bud-rv-card-art img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	clip-path: polygon(0 0, 100% 0, 100% calc(100% - 24px), calc(100% - 24px) 100%, 0 100%);
	transition: transform 0.4s ease;
}

.bud-rv-card:hover .bud-rv-card-art img {
	transform: scale(1.03);
}

.bud-rv-card-notch {
	--notch-room: 18px;
}

.bud-rv-card-notch i {
	width: 58px;
	height: 44px;
}

.bud-rv-card-score {
	position: absolute;
	right: 0;
	bottom: 0;
	display: grid;
	place-items: center;
	width: 58px;
	height: 44px;
	margin: 0;
	font-family: var(--bud-face);
}

.bud-rv-card-score b {
	font-size: 2.1rem;
	font-weight: 400;
	line-height: 1;
	color: var(--bud-tone);
}

.bud-rv-card h3 {
	margin: 0 0 0.25rem;
	font-family: var(--bud-face);
	font-size: clamp(1.6rem, 2vw, 2rem);
	font-weight: 400;
	line-height: 1;
	letter-spacing: 0;
	text-transform: uppercase;
}

.bud-rv-card h3 a {
	color: #fff;
	text-decoration: none;
	transition: color 0.15s ease;
}

.bud-rv-card:hover h3 a {
	color: var(--bud-lime);
}

/* The whole card is the link; the name is what gets announced. */
.bud-rv-card h3 a::after {
	content: "";
	position: absolute;
	z-index: 3;
	inset: 0;
}

.bud-rv-card h3 a:focus-visible {
	outline: 0;
}

.bud-rv-card h3 a:focus-visible::after {
	outline: 2px solid var(--bud-lime);
	outline-offset: 2px;
	border-radius: 14px;
}

.bud-eyebrow {
	font-family: var(--bud-sans);
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--accent-green2);
	margin: 0 0 0.5rem;
}

/* ==========================================================================
   2. Single-Bar Editorial Masthead (.bud-header)
   ========================================================================== */

.bud-header {
	position: sticky;
	top: 0;
	z-index: 60;
	background: rgba(13, 15, 14, 0.92);
	backdrop-filter: blur(14px);
	border-bottom: 1px solid var(--bud-line);
}

.bud-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 2rem;
	min-height: 76px;
}

.bud-brand {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	text-decoration: none;
	flex-shrink: 0;
}

.bud-brand-word {
	height: 30px;
	width: auto;
	display: block;
}

/* A logo from the Customizer could be any shape, so height rules and width follows. */
.bud-brand-logo {
	display: block;
	width: auto;
	height: 44px;
	max-width: 240px;
	object-fit: contain;
	object-position: left center;
}

.bud-brand-leaf {
	width: 15px;
	height: 15px;
	display: block;
}

.bud-desktop-nav ul {
	display: flex;
	align-items: center;
	gap: 2.25rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.bud-desktop-nav a {
	font-size: 0.92rem;
	font-weight: 500;
	color: var(--bud-muted);
	text-decoration: none;
	padding: 0.35rem 0;
	transition: color 0.15s ease;
}

.bud-desktop-nav a:hover,
.bud-desktop-nav a[aria-current="page"] {
	color: #fff;
}

/* Only holds the mobile menu, so it mustn't take up a flex gap on desktop. */
.bud-header-actions {
	display: none;
	align-items: center;
	gap: 1rem;
}

/* A real field, not a link to one. Takes whatever room the nav leaves. */
.bud-header-search {
	display: flex;
	flex: 0 1 340px;
	align-items: center;
	min-width: 0;
	height: 42px;
	margin-left: auto;
	border: 1px solid var(--bud-line-strong);
	border-radius: 999px;
	background: var(--bud-surface);
	color: var(--bud-muted);
	transition: border-color 0.15s ease;
}

.bud-header-search:hover {
	border-color: #56625a;
}

.bud-header-search:focus-within {
	border-color: var(--bud-lime);
}

.bud-header-search button {
	display: grid;
	flex-shrink: 0;
	place-items: center;
	width: 42px;
	height: 40px;
	padding: 0 0 0 4px;
	border: 0;
	border-radius: 999px 0 0 999px;
	background: transparent;
	color: inherit;
	cursor: pointer;
}

.bud-header-search button:hover {
	color: #fff;
}

.bud-header-search input {
	flex: 1;
	min-width: 0;
	height: 40px;
	padding: 0 1.1rem 0 0;
	border: 0;
	border-radius: 0 999px 999px 0;
	outline: 0;
	background: transparent;
	color: #fff;
	font-size: 0.92rem;
}

.bud-header-search input::placeholder {
	color: var(--bud-muted);
	opacity: 1;
}

/* The browser's own clear button doesn't fit the dark field. */
.bud-header-search input::-webkit-search-cancel-button {
	filter: invert(1) brightness(0.8);
}

/* Mobile Navigation */
.bud-mobile-nav {
	display: none;
	position: relative;
}

.bud-mobile-nav summary {
	list-style: none;
	cursor: pointer;
	padding: 0.45rem 0.85rem;
	border: 1px solid var(--bud-line-strong);
	border-radius: 6px;
	font-size: 0.82rem;
	font-weight: 600;
	color: var(--bud-ink);
}

.bud-mobile-nav summary::-webkit-details-marker {
	display: none;
}

.bud-mobile-nav nav {
	position: absolute;
	right: 0;
	top: calc(100% + 0.5rem);
	width: min(260px, 86vw);
	background: var(--dark-grey2);
	border: 1px solid var(--bud-line-strong);
	border-radius: 8px;
	padding: 0.75rem;
	box-shadow: 0 24px 48px rgba(0, 0, 0, 0.7);
}

.bud-mobile-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.bud-mobile-nav li + li {
	border-top: 1px solid var(--bud-line);
}

.bud-mobile-nav a {
	display: block;
	padding: 0.7rem 0.5rem;
	color: var(--bud-ink);
	text-decoration: none;
	font-size: 0.92rem;
}

/* ==========================================================================
   3. Unboxed Strain Poster Cards (.bud-browse-card)
   ========================================================================== */

.bud-browse-card {
	display: block;
	color: var(--bud-ink);
	text-decoration: none;
	transition: transform 0.2s ease;
}

.bud-browse-card:hover {
	transform: translateY(-4px);
	color: #fff;
}

.bud-browse-art {
	position: relative;
	aspect-ratio: 4 / 3;
	background-color: var(--plate-paper);
	background-image: url('brand/paper-light.jpg');
	background-size: 320px;
	background-blend-mode: multiply;
	border-top: 4px solid var(--accent-green2);
	border-radius: 6px;
	overflow: hidden;
	display: grid;
	place-items: center;
	padding: 1.75rem;
}

.bud-browse-art img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	mix-blend-mode: multiply;
	display: block;
	transition: transform 0.35s ease;
}

.bud-browse-card:hover .bud-browse-art img {
	transform: scale(1.05);
}

.bud-browse-art.is-cutout {
	padding: 1.75rem;
}

.bud-browse-art.is-cutout img {
	object-fit: contain;
	mix-blend-mode: multiply;
}

.bud-browse-art.is-symbol {
	background: var(--plate-paper);
}

.bud-browse-monogram {
	font-family: var(--plate-serif);
	font-size: 4.5rem;
	font-weight: 900;
	letter-spacing: -0.04em;
	color: var(--plate-ink);
	opacity: 0.9;
}

/* Quiet corner periodic stamp */
.bud-element-stamp {
	position: absolute;
	top: 12px;
	left: 14px;
	z-index: 2;
	color: var(--plate-ink);
	font-family: var(--plate-serif);
	font-weight: 900;
	font-size: 1.15rem;
	letter-spacing: -0.03em;
	line-height: 1;
}

.bud-browse-copy {
	padding: 0.9rem 0.1rem 0;
}

.bud-browse-copy h3 {
	font-family: var(--bud-display);
	font-size: 1.2rem;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.015em;
	color: #fff;
	margin: 0;
	transition: color 0.15s ease;
}

.bud-browse-card:hover .bud-browse-copy h3 {
	color: var(--accent-green2);
}

.bud-browse-sub {
	font-size: 0.86rem;
	color: var(--bud-muted);
	margin: 0.3rem 0 0;
	line-height: 1.4;
}

/* ==========================================================================
   4. Clean Review Cards (.bud-review-card)
   ========================================================================== */

.bud-review-card {
	display: block;
}

.bud-review-card-link {
	display: block;
	color: var(--bud-ink);
	text-decoration: none;
}

.bud-review-art {
	position: relative;
	aspect-ratio: 16 / 10;
	background: var(--dark-grey2);
	border-radius: 8px;
	overflow: hidden;
}

.bud-review-art img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.3s ease;
}

.bud-review-card:hover .bud-review-art img {
	transform: scale(1.03);
}

.bud-review-score {
	position: absolute;
	bottom: 12px;
	left: 12px;
	background: rgba(13, 15, 14, 0.9);
	color: var(--accent-green2);
	padding: 0.3rem 0.65rem;
	border-radius: 4px;
	font-family: var(--plate-serif);
	font-size: 1.25rem;
	font-weight: 900;
	line-height: 1;
}

.bud-review-card-body {
	padding: 1rem 0 0;
}

.bud-review-card-body h3 {
	font-family: var(--bud-display);
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.25;
	color: #fff;
	margin: 0 0 0.4rem;
}

.bud-review-card:hover .bud-review-card-body h3 {
	color: var(--accent-green2);
}

.bud-review-card-body p {
	font-size: 0.92rem;
	line-height: 1.55;
	color: var(--bud-muted);
	margin: 0;
}

/* ==========================================================================
   5. Generic Archive / Glossary / Search Shared Styles
   ========================================================================== */

.bud-page-header {
	padding: 4rem 0 2.5rem;
	border-bottom: 1px solid var(--bud-line);
	margin-bottom: 3rem;
}

.bud-page-header h1 {
	font-family: var(--bud-display);
	font-size: clamp(2.4rem, 5vw, 4rem);
	font-weight: 900;
	letter-spacing: -0.03em;
	line-height: 1.02;
	color: #fff;
	margin: 0.25rem 0 0.75rem;
}

.bud-lede {
	font-size: 1.1rem;
	line-height: 1.65;
	color: var(--bud-muted);
	max-width: 60ch;
	margin: 0;
}

.bud-card-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 2.25rem 1.5rem;
}

.bud-card {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	padding: 1.5rem;
	background: var(--dark-grey2);
	border: 1px solid var(--bud-line);
	border-radius: 10px;
	color: var(--bud-ink);
	text-decoration: none;
	transition: border-color 0.2s ease;
}

.bud-card:hover {
	border-color: var(--accent-green2);
	color: #fff;
}

.bud-card h2,
.bud-card h3 {
	font-family: var(--bud-display);
	font-size: 1.2rem;
	font-weight: 700;
	color: #fff;
	margin: 0 0 0.45rem;
}

.bud-card p {
	font-size: 0.9rem;
	color: var(--bud-muted);
	margin: 0;
	line-height: 1.55;
}

.bud-search-form {
	display: flex;
	gap: 0.5rem;
	background: var(--dark-grey2);
	border: 1px solid var(--bud-line-strong);
	border-radius: 8px;
	padding: 0.35rem;
}

.bud-search-form input[type="search"] {
	flex: 1;
	background: transparent;
	border: 0;
	color: #fff;
	padding: 0.65rem 0.9rem;
	font-size: 0.95rem;
	outline: none;
}

.bud-search-form button {
	background: var(--accent-green2);
	color: #071209;
	border: 0;
	border-radius: 6px;
	padding: 0.65rem 1.25rem;
	font-size: 0.82rem;
	font-weight: 700;
	cursor: pointer;
}

/* Glossary Controls */
.bud-glossary-controls {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1rem;
	margin-bottom: 2rem;
}

.bud-glossary-controls input[type="search"] {
	flex: 1;
	min-width: 240px;
	background: var(--dark-grey2);
	border: 1px solid var(--bud-line-strong);
	border-radius: 8px;
	padding: 0.75rem 1rem;
	color: #fff;
}

.bud-az-bar {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	margin-bottom: 2rem;
}

.bud-az-bar a {
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	border: 1px solid var(--bud-line);
	border-radius: 6px;
	color: var(--bud-muted);
	text-decoration: none;
	font-size: 0.8rem;
	font-weight: 600;
}

.bud-az-bar a:hover {
	border-color: var(--accent-green2);
	color: var(--accent-green2);
}

/* Diagnosis / Symptom Checker Archive */
.bud-symptom-picker {
	background: var(--dark-grey2);
	border: 1px solid var(--bud-line);
	border-radius: 10px;
	padding: 1.5rem;
	margin-bottom: 2rem;
}

.bud-symptom-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 0.75rem;
}

.bud-symptom-chip {
	background: var(--charcoal);
	border: 1px solid var(--bud-line-strong);
	border-radius: 6px;
	padding: 0.45rem 0.85rem;
	color: var(--bud-ink);
	font-size: 0.82rem;
	cursor: pointer;
}

.bud-symptom-chip[aria-pressed="true"],
.bud-symptom-chip:hover {
	border-color: var(--accent-green2);
	color: var(--accent-green2);
}

/* ==========================================================================
   6. Minimal Editorial Footer (.bud-site-footer)
   ========================================================================== */

.bud-site-footer {
	background: #080a09;
	border-top: 1px solid var(--bud-line);
	padding: 4.5rem 0 3rem;
	margin-top: 4rem;
}

.bud-footer-grid {
	display: grid;
	grid-template-columns: 1.6fr repeat(4, 1fr);
	gap: 3rem;
	padding-bottom: 3rem;
	border-bottom: 1px solid var(--bud-line);
}

.bud-footer-tagline {
	font-size: 0.92rem;
	line-height: 1.6;
	color: var(--bud-muted);
	max-width: 32ch;
	margin: 1rem 0 0;
}

.bud-footer-col h3 {
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #fff;
	margin: 0 0 1rem;
}

.bud-footer-col ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.6rem;
}

.bud-footer-col a {
	font-size: 0.9rem;
	color: var(--bud-muted);
	text-decoration: none;
}

.bud-footer-col a:hover {
	color: #fff;
}

.bud-footer-bottom {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding-top: 2rem;
	font-size: 0.82rem;
	color: var(--grey);
}

/* ==========================================================================
   7. Responsive Rules
   ========================================================================== */

@media (max-width: 991px) {
	.bud-desktop-nav {
		display: none;
	}

	.bud-header-inner {
		gap: 0.75rem 1rem;
	}

	.bud-mobile-nav {
		display: block;
	}

	.bud-header-actions {
		display: flex;
	}

	.bud-footer-grid {
		grid-template-columns: repeat(4, 1fr);
		gap: 2.5rem 2rem;
	}

	.bud-footer-brand {
		grid-column: 1 / -1;
	}
}

@media (max-width: 640px) {
	html {
		scroll-padding-top: 130px;
	}

	/* Search keeps its own full-width row rather than shrinking to an icon. */
	.bud-header-inner {
		flex-wrap: wrap;
		justify-content: space-between;
		min-height: 0;
		padding-block: 0.7rem;
	}

	.bud-header-search {
		flex: 1 0 100%;
		order: 3;
	}

	.bud-footer-grid {
		grid-template-columns: 1fr 1fr;
		gap: 2rem;
	}
}
