/*
 * Base Theme — base layer. Colors come only from --base-* tokens
 * (inc/palette.php); never write a hex here.
 * Inlined by core: keep it small. Component CSS lives with its block.
 */

/* Metric-matched fallback so the Inter swap does not move text (no CLS). */
@font-face{font-family:"Inter Fallback";src:local("Arial"),local("Helvetica Neue"),local("Helvetica");size-adjust:107.06%;ascent-override:90.49%;descent-override:22.56%;line-gap-override:0%}

/* ── Document ─────────────────────────────────────────────────────────── */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%;scroll-padding-top:1rem}
@media (prefers-reduced-motion:no-preference){html{scroll-behavior:smooth}}
body{margin:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;font-feature-settings:"cv11","calt"}
*,*::before,*::after{box-sizing:border-box}
img,svg,video{max-width:100%;height:auto}
svg{vertical-align:middle}
::selection{background:var(--base-primary-container);color:var(--base-on-primary-container)}
:focus-visible{outline:2px solid var(--base-focus);outline-offset:2px;border-radius:4px}
a{text-underline-offset:.18em;text-decoration-thickness:1px}
a:hover{text-decoration-thickness:2px}
hr{border:0;border-top:1px solid var(--base-outline-variant)}
code,kbd,samp{font-family:var(--base-font-mono);font-size:.9em}
:not(pre)>code{padding:.1em .35em;border-radius:6px;background:var(--base-surface-2)}
mark{background:var(--base-warning-container);color:inherit;padding:0 .15em;border-radius:3px}
.num,table td{font-variant-numeric:tabular-nums}

/* ── Accessibility helpers ────────────────────────────────────────────── */
.screen-reader-text{border:0;clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute!important;width:1px;word-wrap:normal!important}
.screen-reader-text:focus{clip-path:none;height:auto;width:auto;margin:0;z-index:100000;top:8px;inset-inline-start:8px;padding:12px 16px;background:var(--base-surface);color:var(--base-text);border-radius:var(--base-radius-s);box-shadow:var(--base-shadow)}
.base-skip{position:absolute;inset-inline-start:8px;top:-100px;z-index:100000;padding:10px 16px;border-radius:var(--base-radius-s);background:var(--base-primary);color:var(--base-on-primary);font-weight:500;text-decoration:none}
.base-skip:focus{top:8px}

/* ── Icons (Lucide sprite from base-core: base_icon()) ────────────────── */
.base-icon{flex:none;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

/* ── Form controls (site-wide baseline; plugin widgets refine) ────────── */
input:where([type=text],[type=search],[type=email],[type=url],[type=tel],[type=number],[type=password],[type=date],[type=time],[type=datetime-local]),select,textarea{
	font:inherit;color:var(--base-text);background:var(--base-surface);border:1px solid var(--base-outline);border-radius:var(--base-radius-s);
	min-height:var(--base-control-h);padding:.5rem .75rem;width:100%;max-width:100%;transition:border-color var(--base-dur) var(--base-ease),box-shadow var(--base-dur) var(--base-ease)}
textarea{min-height:8rem;line-height:1.5;resize:vertical}
input:focus,select:focus,textarea:focus{outline:0;border-color:var(--base-focus);box-shadow:0 0 0 1px var(--base-focus)}
/* Core Search with the button inside: the wrapper draws the border, so it carries the one focus ring. */
.wp-block-search__button-inside .wp-block-search__input:focus{outline:0;border-color:transparent;box-shadow:none}
.wp-block-search__button-inside .wp-block-search__inside-wrapper:focus-within{border-color:var(--base-focus);box-shadow:0 0 0 1px var(--base-focus)}
::placeholder{color:var(--base-text-muted);opacity:.8}
input[type=checkbox],input[type=radio]{accent-color:var(--base-primary);width:1.125rem;height:1.125rem}
label{cursor:default}
input[type=file]{font:inherit;color:var(--base-text-muted);max-width:100%}
input[type=file]::file-selector-button{font:inherit;font-weight:500;margin-inline-end:.75rem;padding:.5rem 1rem;border:1px solid var(--base-outline);border-radius:var(--base-radius-pill);background:var(--base-surface);color:var(--base-text);cursor:pointer}
input[type=file]::file-selector-button:hover{background:var(--base-surface-2)}

/* ── Layout shell ─────────────────────────────────────────────────────── */
.wp-site-blocks{display:flex;flex-direction:column;min-height:100vh;min-height:100dvh}
.wp-site-blocks>main{flex:1 0 auto}
.base-main{padding-top:var(--wp--preset--spacing--50);padding-bottom:var(--wp--preset--spacing--80)}

/* Header */
.base-header{border-bottom:1px solid var(--base-outline-variant);background:var(--base-surface)}
.base-header__bar{display:flex;flex-wrap:wrap;align-items:center;gap:var(--wp--preset--spacing--20) var(--wp--preset--spacing--30);min-height:64px}
.base-header__bar>.base-header__actions{display:flex;align-items:center;gap:var(--wp--preset--spacing--10);margin-inline-start:auto}
/* Desktop: logo · links · (search · mode) on the right. Below 900px the
   links collapse to a menu button, which goes last: logo … search · mode · menu. */
@media (max-width:899px){
	.base-header__bar>.base-nav--header{order:1}
}
/* Phones: one row, never wrapping — the icons flatten into the bar and tighten. */
@media (max-width:599px){
	.base-header__bar>.base-header__actions{display:contents}
	.base-header__bar{flex-wrap:nowrap;column-gap:0}
	.base-header__bar .base-logo{margin-inline-end:auto;min-width:0;overflow:hidden}
}
@media (max-width:400px){
	.base-header .base-hsearch__toggle,.base-header .base-mode,.base-header .base-nav__toggle{width:40px;height:40px}
	.base-header .base-logo{gap:.5rem;font-size:1rem}
	.base-header .base-logo svg,.base-header .base-logo__img{width:auto;height:28px}
}
/* Flow layout gives every later child a top margin; in a centred bar that reads as misalignment. */
.base-header .base-header__bar>*,.base-header .base-header__actions>*{margin-block:0}
.base-logo{display:inline-flex;white-space:nowrap;align-items:center;gap:.625rem;color:var(--base-text);text-decoration:none;font-weight:600;font-size:1.0625rem;letter-spacing:-.015em;min-height:44px}
.base-logo:hover{text-decoration:none}
.base-logo__img{display:block;height:var(--base-logo-h,32px);width:auto}

/* Footer */
.base-footer{margin-top:auto;border-top:1px solid var(--base-outline-variant);background:var(--base-surface-1);color:var(--base-text-muted);font-size:var(--wp--preset--font-size--s)}
.base-footer a{color:var(--base-text-muted);text-decoration:none}
.base-footer a:hover{color:var(--base-text);text-decoration:underline}

/* ── Content rhythm ───────────────────────────────────────────────────── */
.wp-block-post-content>*+h2{margin-top:2.25rem}
.wp-block-post-content>*+h3{margin-top:1.75rem}
/* Prose lists. Post content built from section blocks (class base-sections, added in inc/blocks.php)
   keeps them only on its top-level lists; the :where() keeps today's specificity. */
.wp-block-post-content:where(:not(.base-sections)) :where(ul,ol),.wp-block-post-content.base-sections>:where(ul,ol){padding-inline-start:1.25rem}
.wp-block-post-content:where(:not(.base-sections)) li+li,.wp-block-post-content:where(.base-sections)>:where(ul,ol) li+li{margin-top:.35rem}
/* Section pages: sections sit edge to edge, and headings inside them take their section's color. */
.wp-block-post-content.base-sections>*+*{margin-block-start:0}
.base-sections :where(h1,h2,h3,h4,h5,h6){color:inherit}
.wp-block-table table{border-collapse:collapse;width:100%;font-size:var(--wp--preset--font-size--s)}
.wp-block-table :where(th,td){border:0;border-bottom:1px solid var(--base-outline-variant);padding:.625rem .75rem;text-align:start}
.wp-block-table th{font-weight:600;color:var(--base-text);background:var(--base-surface-1)}
.wp-block-button__link{min-height:var(--base-control-h);display:inline-flex;align-items:center;justify-content:center;gap:.5rem;text-decoration:none}
.wp-block-button.is-style-outline>.wp-block-button__link{background:transparent;color:var(--base-primary);border:1px solid var(--base-outline)}
.wp-block-button.is-style-outline>.wp-block-button__link:hover{background:var(--base-primary-container);color:var(--base-on-primary-container)}
.base-muted{color:var(--base-text-muted)}


/* Cards and surfaces any block can opt into via className */
.is-style-base-card,.base-card{background:var(--base-surface-1);border:1px solid var(--base-outline-variant);border-radius:var(--base-radius-m);padding:var(--wp--preset--spacing--50)}

/* Term / chip pill — tinted from a term color when one is given (--term).
   Ink = term color in light mode, term color lifted towards white in dark
   (--base-ink-keep / --base-ink-target come from the palette, per mode). */
.base-pill{display:inline-flex;align-items:center;gap:.375rem;min-height:28px;padding:.125rem .75rem;border-radius:var(--base-radius-pill);font-size:var(--wp--preset--font-size--xs);font-weight:500;line-height:1.3;text-decoration:none;
	background:color-mix(in oklch,var(--term,var(--base-primary)) 12%,var(--base-surface));color:color-mix(in oklch,var(--term,var(--base-primary)) var(--base-ink-keep),var(--base-ink-target))}
a.base-pill:hover{text-decoration:none;background:color-mix(in oklch,var(--term,var(--base-primary)) 20%,var(--base-surface))}

/* Home page starter hero (templates/front-page.html) */
.base-hero>*+*{margin-block-start:var(--wp--preset--spacing--40)}
.base-hero__lede{font-size:var(--wp--preset--font-size--l);color:var(--base-text-muted)}

/* ── Post lists: core Query Loop (Customize → Blog → list layout) ─────── */
.base-loop .wp-block-post-template{display:grid;gap:var(--wp--preset--spacing--50);margin:0;padding:0;list-style:none}
.base-loop .wp-block-post-template>li{margin:0}
@media (min-width:700px){
	.base-loop:is(.base-loop--grid,.base-loop--featured) .wp-block-post-template{grid-template-columns:repeat(2,minmax(0,1fr))}
	.base-loop--featured .wp-block-post-template>li:first-child{grid-column:1/-1}
	.base-loop--list .base-post-card:has(.base-post-card__image){display:grid;grid-template-columns:minmax(0,2fr) minmax(0,3fr);gap:var(--wp--preset--spacing--50);align-items:start}
}
@media (min-width:1024px){
	.base-loop:is(.base-loop--grid,.base-loop--featured) .wp-block-post-template{grid-template-columns:repeat(var(--base-loop-cols,3),minmax(0,1fr))}
	.base-loop--featured .wp-block-post-template>li:first-child .base-post-card:has(.base-post-card__image){display:grid;grid-template-columns:minmax(0,3fr) minmax(0,2fr);gap:var(--wp--preset--spacing--60);align-items:center}
	.base-loop--featured .wp-block-post-template>li:first-child .base-post-card__title{font-size:var(--wp--preset--font-size--xx-large)}
}
.base-post-card{height:100%;margin:0}
.base-post-card>*,.base-post-card__body>*{margin-block:0}
.base-post-card__image{margin-bottom:var(--wp--preset--spacing--30)!important}
.base-post-card__image img{border-radius:var(--base-radius-m);background:var(--base-surface-2)}
.base-post-card__body{display:flex;flex-direction:column;gap:var(--wp--preset--spacing--20)}
.base-post-card__title{font-size:var(--wp--preset--font-size--l);line-height:1.35}
.base-post-card__title a{color:var(--base-text);text-decoration:none}
.base-post-card__title a:hover{text-decoration:underline}
.base-post-card__excerpt{color:var(--base-text-muted)}
.base-post-card__excerpt p{margin:0}
.base-post-card__meta{font-size:var(--wp--preset--font-size--xs);color:var(--base-text-muted)}
.base-post-card__meta a{color:inherit}
.base-loop .wp-block-query-pagination{margin-top:var(--wp--preset--spacing--60);gap:var(--wp--preset--spacing--30)}
.base-loop .wp-block-query-pagination a{text-decoration:none}

/* ── Store search results (templates/search-products.html): product grid, no dates ── */
.base-product-loop .wp-block-post-template{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--wp--preset--spacing--50) var(--wp--preset--spacing--40);margin:0;padding:0;list-style:none}
@media (min-width:700px){.base-product-loop .wp-block-post-template{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (min-width:1024px){.base-product-loop .wp-block-post-template{grid-template-columns:repeat(4,minmax(0,1fr))}}
.base-product-loop .wp-block-post-template>li{margin:0}
.base-product-card{display:flex;flex-direction:column;gap:var(--wp--preset--spacing--20);height:100%;margin:0}
.base-product-card>*{margin-block:0}
.base-product-card__image{margin-bottom:var(--wp--preset--spacing--20)!important}
.base-product-card__image img{border-radius:var(--base-radius-m);background:var(--base-surface-2)}
.base-product-card__title{font-size:var(--wp--preset--font-size--m);font-weight:500;line-height:1.35}
.base-product-card__title a{color:var(--base-text);text-decoration:none}
.base-product-card__title a:hover{text-decoration:underline}
.base-product-card__price{font-weight:600;color:var(--base-text)}
.base-product-card__price del{color:var(--base-text-muted);font-weight:400}
.base-product-loop .wp-block-query-pagination{margin-top:var(--wp--preset--spacing--60);gap:var(--wp--preset--spacing--30)}
.base-product-loop .wp-block-query-pagination a{text-decoration:none}

/* ── Search form (core markup, blocks/header-search and templates) ────── */
.base-search{display:flex;gap:var(--wp--preset--spacing--20);max-width:40rem}
.base-search input[type=search]{flex:1 1 auto;min-width:0}
.base-search button{flex:none;min-height:var(--base-control-h);padding:0 1.25rem;border:0;border-radius:var(--base-radius-pill);background:var(--base-primary);color:var(--base-on-primary);font:inherit;font-weight:500;cursor:pointer}
.base-search button:hover{background:var(--base-primary-hover)}

/* ── Blog: archive heads, article, prose ─────────────────────────────── */
.base-archive-head{margin-bottom:var(--wp--preset--spacing--60)}
.base-archive-head>*+*{margin-block-start:var(--wp--preset--spacing--30)}
.base-archive-head :where(h1){margin-bottom:0}
.base-archive-head__lede,.base-archive-head .wp-block-term-description{max-width:42rem;margin-top:var(--wp--preset--spacing--20);color:var(--base-text-muted);font-size:var(--wp--preset--font-size--l);line-height:1.55}
.base-archive-head .wp-block-term-description p{margin:0}

.base-article__head{display:flex;flex-direction:column;gap:var(--wp--preset--spacing--30)}
.base-article__head>*{margin:0}
.base-article__head .wp-block-post-title{font-size:var(--wp--preset--font-size--xxx-large);line-height:1.15;letter-spacing:-.025em;text-wrap:pretty}
.base-article__cat{display:flex;flex-wrap:wrap;gap:6px;font-size:var(--wp--preset--font-size--xs);font-weight:500}
.base-article__cat .wp-block-post-terms__separator{display:none}
.base-article__dek{font-size:var(--wp--preset--font-size--l);line-height:1.55;color:var(--base-text-muted)}
.base-article__dek p{margin:0}
.base-article__image img{border-radius:var(--base-radius-m);background:var(--base-surface-2)}
.base-article>.base-blog-layout{margin-block-start:var(--wp--preset--spacing--40)}
.base-article>.base-article__image--top{margin-block-start:var(--wp--preset--spacing--40)}

/* Article width and the sidebar row (inc/sidebar-settings.php, inc/width-settings.php) */
body{--base-article-w:680px;--base-frame-w:1200px;--base-sidebar-w:300px;--base-sidebar-gap:56px}
.base-blog-layout>*,.base-layout>*{margin-block:0}
.base-article__main>*+*{margin-block-start:var(--wp--preset--spacing--50)}
.base-article__main>:first-child{margin-block-start:0}
.base-article__main>.base-post-nav{margin-block-start:var(--wp--preset--spacing--70)}
.base-has-sidebar .base-layout{display:grid;gap:var(--wp--preset--spacing--60)}
@media (min-width:1024px){
	.base-has-sidebar .base-layout{grid-template-columns:minmax(0,1fr) var(--base-sidebar-w);gap:var(--base-sidebar-gap);align-items:start}
	.base-sidebar-left .base-layout{grid-template-columns:var(--base-sidebar-w) minmax(0,1fr)}
	.base-sidebar-left .base-layout>.base-sidebar{order:-1}
	/* A row is the content width plus the sidebar, never wider than the site frame. */
	.base-has-sidebar .base-row{max-width:min(calc(var(--base-main-w,var(--base-article-w)) + var(--base-sidebar-w) + var(--base-sidebar-gap)),var(--base-row-max,var(--base-frame-w)));margin-inline:auto}
	/* Inside the main column, wide and full blocks stay in the column. */
	.base-layout__main>:is(.alignwide,.alignfull){max-width:none;margin-inline:0;width:auto}
}

.base-prose{font-size:1.0625rem;line-height:1.75}
.base-prose>*+*{margin-block-start:1.1em}
.base-prose h2{font-size:var(--wp--preset--font-size--xl);line-height:1.3;letter-spacing:-.015em;scroll-margin-top:1rem}
.base-prose h3{font-size:var(--wp--preset--font-size--l);line-height:1.4}
.base-prose :where(p,li) a{color:var(--base-link,var(--base-primary));text-decoration:underline}
.base-prose blockquote{margin-inline:0;padding-block:.25rem;padding-inline:1.25rem 0;border-inline-start:3px solid var(--base-primary);color:var(--base-text-muted)}
.base-prose :where(figure){margin-inline:0}
.base-prose img{border-radius:var(--base-radius-m)}
.base-prose figcaption{margin-top:.5rem;font-size:var(--wp--preset--font-size--s);color:var(--base-text-muted);text-align:center}


/* Previous / next article */
.base-post-nav{display:grid;gap:12px}
@media (min-width:600px){.base-post-nav{grid-template-columns:1fr 1fr}.base-post-nav .post-navigation-link-next{grid-column:2;text-align:end}}
.base-post-nav>*{margin:0}
.base-post-nav .wp-block-post-navigation-link a{display:flex;flex-direction:column;gap:4px;height:100%;padding:16px 18px;border:1px solid var(--base-outline-variant);border-radius:var(--base-radius-m);color:var(--base-text);font-weight:600;line-height:1.4;text-decoration:none}
.base-post-nav .wp-block-post-navigation-link a:hover{border-color:var(--base-outline);background:var(--base-surface-1)}
.base-post-nav .post-navigation-link__label{font-size:var(--wp--preset--font-size--xs);font-weight:500;color:var(--base-text-muted);text-transform:uppercase;letter-spacing:.06em}

@media (prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important}}
/* Category pill positions (Customize → Blog) */
.base-article__cat:is(span){display:inline-flex;flex-wrap:wrap;gap:6px;font-size:var(--wp--preset--font-size--xs);font-weight:500}
.base-article__cat--below{margin-top:calc(var(--wp--preset--spacing--30) * -.5)}
.base-article__cat--byline{margin:2px 8px 2px 0;vertical-align:middle}
.base-article__cat--byline .base-pill{min-height:22px;padding:0 .625rem}
.base-article__image{position:relative}
.base-article__cat--image{position:absolute;top:16px;inset-inline-start:16px;z-index:1}
.base-article__cat--image .base-pill{background:var(--base-surface);box-shadow:0 1px 3px rgb(0 0 0/.15)}
.base-article__cat--image .base-pill{display:inline-flex;height:auto}
