/*
Theme Name: DecorsDeck
Theme URI: https://www.decorsdeck.com
Author: DecorsDeck
Description: Editorial home-decor and DIY theme covering Maintenance, Home Hacks, Decor, DIY, and Garden. Auto-generated table of contents, primary-category tagging, byline/reviewer formatting, and an ad-ready single-post sidebar.
Version: 1.0.2
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: decorsdeck
*/

:root{
  --bg:#F5F7F7; --surface:#FFFFFF; --surface-2:#E9EEEE;
  --ink:#182226; --ink-soft:#54636A; --ink-faint:#7C8A90;
  --brand:#3E7CB1; --brand-ink:#2A5A82; --moss:#3E8F82; --moss-ink:#2C685F; --ocean:#375C99; --ocean-ink:#254173; --berry:#D96B4E; --berry-ink:#A94E36; --sun:#C99A3A; --sun-ink:#8F6D22;
  --line:#DCE4E5; --line-strong:#C7D2D4;
  --tint-brand:#D8E6F0; --tint-moss:#D9ECE7; --tint-ocean:#DBE3F1; --tint-berry:#F6E0D8; --tint-sun:#F1E5C6;
  --ad-bg:#EAEFEE;
  --ring:#182226;
}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --bg:#10161A; --surface:#181F24; --surface-2:#20282E;
    --ink:#E7EEF0; --ink-soft:#B8C3C7; --ink-faint:#899499;
    --brand:#7FB4DD; --brand-ink:#A3CBE8; --moss:#7FC4B7; --moss-ink:#A0D6CB; --ocean:#7B9FD6; --ocean-ink:#9FB9E3; --berry:#E8987C; --berry-ink:#F0B69F; --sun:#DCB65E; --sun-ink:#E8CB8C;
    --line:#293238; --line-strong:#38434A;
    --tint-brand:#1E2E38; --tint-moss:#1C312D; --tint-ocean:#212C40; --tint-berry:#3A2A20; --tint-sun:#38301A;
    --ad-bg:#1C242A;
    --ring:#E7EEF0;
  }
}
:root[data-theme="dark"]{
  --bg:#10161A; --surface:#181F24; --surface-2:#20282E;
  --ink:#E7EEF0; --ink-soft:#B8C3C7; --ink-faint:#899499;
  --brand:#7FB4DD; --brand-ink:#A3CBE8; --moss:#7FC4B7; --moss-ink:#A0D6CB; --ocean:#7B9FD6; --ocean-ink:#9FB9E3; --berry:#E8987C; --berry-ink:#F0B69F; --sun:#DCB65E; --sun-ink:#E8CB8C;
  --line:#293238; --line-strong:#38434A;
  --tint-brand:#1E2E38; --tint-moss:#1C312D; --tint-ocean:#212C40; --tint-berry:#3A2A20; --tint-sun:#38301A;
  --ad-bg:#1C242A;
  --ring:#E7EEF0;
}

*{box-sizing:border-box;}
html,body{margin:0;padding:0;}
/*
 * Safety net: post content comes from a real, arbitrary editorial database
 * (tables, embeds, long unbroken strings) that can't all be predicted and
 * neutralized individually. The specific known causes of horizontal
 * overflow (CSS Grid blowout on the article layout, the pill-scroller's
 * intentional inner scroll) are fixed at their source elsewhere in this
 * file; this just guarantees a future unknown one can't drag the whole
 * page sideways.
 */
html,body{overflow-x:hidden;}
body{background:var(--bg);color:var(--ink);font-family:'Inter',ui-sans-serif,system-ui,sans-serif;font-size:16px;line-height:1.5;-webkit-font-smoothing:antialiased;}
a{color:inherit;text-decoration:none;}
img{max-width:100%;display:block;}
h1,h2,h3{font-family:'Fraunces',Georgia,serif;text-wrap:balance;color:var(--ink);font-weight:600;letter-spacing:-0.01em;margin:0;}
.wrap{max-width:1240px;margin:0 auto;padding:0 28px;}
.skip-link,.screen-reader-text{position:absolute;left:-9999px;top:0;background:var(--ink);color:var(--bg);padding:10px 16px;z-index:100;}
.skip-link:focus{left:12px;top:12px;}
.sr-only{position:absolute;left:-9999px;}
:focus-visible{outline:2px solid var(--brand);outline-offset:2px;}

/* ---------- two-row header ---------- */
.site-header{position:sticky;top:0;z-index:20;background:var(--bg);}
.header-row1{border-bottom:1px solid var(--line);}
.header-row1 .wrap{position:relative;display:flex;align-items:center;justify-content:space-between;padding:3px 28px;gap:16px;}
.logo{font-family:'Fraunces',serif;font-weight:600;font-size:26px;display:flex;align-items:center;gap:10px;flex-shrink:0;}
.logo a{display:flex;align-items:center;gap:10px;}
.logo img{max-height:none;}
/* The brand logo is a transparent WebP, so it sits directly on the light and dark surfaces. */
.logo-img{display:block;height:48px;width:auto;}
.logo-img--footer{height:56px;}
.logo .mark{width:36px;height:36px;border-radius:50% 50% 50% 6px;background:var(--brand);color:#fff;display:grid;place-items:center;flex:none;transform:rotate(-6deg);}
.logo .mark svg{width:19px;height:19px;}
.logo-dark{display:none;}
:root[data-theme="dark"] .has-dark-logo .logo-light{display:none;}
:root[data-theme="dark"] .has-dark-logo .logo-dark{display:block;}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]) .has-dark-logo .logo-light{display:none;}
  :root:not([data-theme="light"]) .has-dark-logo .logo-dark{display:block;}
}
.header-actions{display:flex;align-items:center;gap:10px;flex-shrink:0;}
.search-inline{
  display:flex;align-items:center;gap:8px;background:var(--surface-2);
  border:1px solid transparent;border-radius:999px;padding:9px 16px;width:220px;
  transition:border-color .15s ease,box-shadow .15s ease,background-color .15s ease;
}
.search-inline:hover{border-color:var(--line-strong);}
.search-inline:focus-within{background:var(--surface);border-color:var(--brand);box-shadow:0 0 0 3px var(--tint-brand);}
.search-inline input{border:none;background:transparent;outline:none;font-family:'Inter';font-size:13.5px;flex:1;min-width:0;color:var(--ink);}
.search-inline input::placeholder{color:var(--ink-faint);}
.search-inline svg{width:15px;height:15px;color:var(--ink-faint);flex:none;transition:color .15s ease;}
.search-inline:focus-within svg{color:var(--brand-ink);}
.search-inline button{display:none;}
.icon-btn{display:inline-flex;align-items:center;justify-content:center;background:var(--surface);border:1px solid var(--line-strong);border-radius:999px;width:38px;height:38px;color:var(--ink-soft);cursor:pointer;flex-shrink:0;}
.icon-btn:hover{border-color:var(--brand);color:var(--brand-ink);}
.icon-btn svg{width:16px;height:16px;}
/* .icon-btn sets display:inline-flex above; .search-toggle must come after
   it in source order (equal specificity — later rule wins) so it actually
   stays hidden outside the sub-560px breakpoint that re-enables it below. */
.search-toggle{display:none;}
.theme-toggle .icon-sun{display:none;}
:root[data-theme="dark"] .theme-toggle .icon-sun{display:block;}
:root[data-theme="dark"] .theme-toggle .icon-moon{display:none;}

.header-row2{border-bottom:1px solid var(--line);background:var(--surface);}
.pill-scroller{display:flex;gap:10px;overflow-x:auto;padding:12px 28px;max-width:1240px;margin:0 auto;scrollbar-width:none;}
.pill-scroller::-webkit-scrollbar{display:none;}
.pill-scroller a{flex:none;font-size:13.5px;font-weight:700;padding:8px 16px;border-radius:999px;border:1px solid var(--line-strong);color:var(--ink-soft);display:inline-flex;align-items:center;gap:7px;}
.pill-scroller a svg{width:15px;height:15px;flex:none;}
.pill-scroller a.active{background:var(--ink);border-color:var(--ink);color:var(--bg);}
.pill-scroller a:hover:not(.active){border-color:var(--brand);color:var(--brand-ink);}

/*
 * Mobile search popover (search-inline is hidden below 980px in favor of
 * this). Positioned absolute relative to .header-row1 .wrap (the nearest
 * positioned ancestor with real, non-collapsing width) rather than
 * .search-wrap itself — a wrapper whose only child is display:none on
 * mobile has no width of its own, so left:0/right:0 against it would
 * resolve to a 0-width box instead of a usable popover.
 */
.search-wrap.is-open .search-inline{
  display:flex;position:absolute;top:calc(100% + 10px);left:28px;right:28px;width:auto;z-index:30;
  box-shadow:0 12px 28px rgba(0,0,0,.14);
}

/* ---------- breadcrumb ---------- */
.breadcrumb{font-size:12.5px;color:var(--ink-faint);padding:18px 0 0;}
.breadcrumb a:hover{color:var(--brand-ink);}
.breadcrumb .sep{margin:0 6px;color:var(--line-strong);}

/* ---------- asymmetric hero (front page) ---------- */
.hero{padding:0;}
.hero-split{display:grid;grid-template-columns:1.3fr 1fr;min-height:520px;}
/* opacity transition is the slideshow's crossfade: JS dips opacity to 0,
   swaps the background-image/text while hidden, then fades back in — CSS
   can't interpolate background-image directly, so this fakes the fade. */
.hero-image{background:linear-gradient(160deg,var(--tint-brand),var(--tint-ocean));background-size:cover;background-position:center;display:flex;align-items:center;justify-content:center;color:var(--brand-ink);position:relative;padding:48px;transition:opacity .3s ease;}
.hero-image svg{width:110px;height:110px;opacity:.35;}
.hero-image .badge{position:absolute;bottom:28px;left:28px;background:var(--surface);color:var(--ink);font-size:12.5px;font-weight:700;padding:8px 14px;border-radius:999px;display:flex;align-items:center;gap:7px;}
.hero-list{background:var(--surface);border-left:1px solid var(--line);display:flex;flex-direction:column;}
.hero-list-head{padding:26px 32px 16px;border-bottom:1px solid var(--line);}
.hero-list-head .eyebrow{font-size:11px;letter-spacing:.1em;text-transform:uppercase;color:var(--brand-ink);font-weight:700;}
.hero-list-head h1{font-size:24px;margin-top:8px;line-height:1.2;}
.hero-list-head h1 a{transition:opacity .3s ease;display:inline-block;}
.hero-list-items{flex:1;display:flex;flex-direction:column;}
.hero-list-item{display:flex;gap:14px;padding:18px 32px;border-bottom:1px solid var(--line);align-items:flex-start;transition:background-color .25s ease;}
.hero-list-item:last-child{border-bottom:none;}
.hero-list-item .num{font-family:'Fraunces',serif;font-size:20px;color:var(--line-strong);flex:none;width:26px;transition:color .25s ease;}
.hero-list-item h4{font-family:'Inter';font-size:14.5px;font-weight:700;margin-bottom:4px;}
.hero-list-item p{font-size:12px;color:var(--ink-faint);margin:0;}
/* Highlights whichever article the slideshow is currently showing as the
   featured image/headline, so the list reads like a set of slide
   indicators rather than a static ranking. */
.hero-list-item.is-active{background:var(--tint-brand);}
.hero-list-item.is-active .num{color:var(--brand-ink);}

/* ---------- category sections (front page): masonry feature + list ---------- */
.section{padding:56px 0;border-bottom:1px solid var(--line);}
.section-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:28px;flex-wrap:wrap;gap:12px;}
.section-head .tag{display:inline-flex;align-items:center;gap:9px;font-size:11px;font-weight:800;letter-spacing:.09em;text-transform:uppercase;padding:6px 13px;border-radius:999px;}
.section-head .tag svg{width:14px;height:14px;}
.section-head h2{font-size:26px;margin-top:10px;}
.tag.moss{background:var(--tint-moss);color:var(--moss-ink);}
.tag.ocean{background:var(--tint-ocean);color:var(--ocean-ink);}
.tag.berry{background:var(--tint-berry);color:var(--berry-ink);}
.tag.sun{background:var(--tint-sun);color:var(--sun-ink);}
.tag.brand{background:var(--tint-brand);color:var(--brand-ink);}
.view-all{font-size:13.5px;font-weight:700;color:var(--ink);border-bottom:2px solid var(--ink);padding-bottom:2px;white-space:nowrap;}

.masonry-row{display:grid;grid-template-columns:1.5fr 1fr;gap:24px;}
/* display:flex + .body{flex:1} mirrors the .list-item flex:1 fix below:
   if the grid ever stretches this card taller than the list-stack side
   instead (e.g. a category with unusually long list titles), the body
   absorbs the extra height by centering its content rather than leaving
   blank space below it. */
.feature-card{display:flex;flex-direction:column;background:var(--surface);border:1px solid var(--line);border-radius:4px;overflow:hidden;}
.feature-card .art{aspect-ratio:16/9;background:var(--tint-moss);background-size:cover;background-position:center;flex:none;}
.feature-card.ocean .art{background-color:var(--tint-ocean);}
.feature-card.berry .art{background-color:var(--tint-berry);}
.feature-card.sun .art{background-color:var(--tint-sun);}
.feature-card.brand .art{background-color:var(--tint-brand);}
.feature-card .body{padding:24px;flex:1;display:flex;flex-direction:column;justify-content:center;}
.feature-card h3{font-size:22px;margin-bottom:10px;}
.feature-card p{font-size:14px;color:var(--ink-soft);margin:0 0 14px;}
.feature-card .meta{font-size:12px;color:var(--ink-faint);}

.list-stack{display:flex;flex-direction:column;border:1px solid var(--line);border-radius:4px;overflow:hidden;}
/*
 * The masonry-row grid stretches .feature-card and .list-stack to match
 * each other's height (CSS Grid's default align-items:stretch), but real
 * post titles vary enough in length across categories that a fixed item
 * count won't line up with the feature card's height every time. flex:1
 * lets each row grow evenly to fill whatever height the grid gives the
 * stack, so there's no leftover empty gap regardless of exact post count.
 */
.list-item{display:flex;align-items:center;gap:14px;padding:18px 20px;flex:1;border-bottom:1px solid var(--line);background:var(--surface);}
.list-item:last-child{border-bottom:none;}
.list-item .thumb{width:64px;height:64px;border-radius:4px;background:var(--tint-moss);background-size:cover;background-position:center;flex:none;}
.list-item.ocean .thumb{background-color:var(--tint-ocean);}
.list-item.berry .thumb{background-color:var(--tint-berry);}
.list-item.sun .thumb{background-color:var(--tint-sun);}
.list-item.brand .thumb{background-color:var(--tint-brand);}
.list-item h4{font-family:'Inter';font-size:14.5px;font-weight:700;margin-bottom:5px;line-height:1.3;}
.list-item span{font-size:12px;color:var(--ink-faint);}

/* ---------- category archive page ---------- */
.cat-banner{padding:22px 0 36px;border-bottom:1px solid var(--line);margin-bottom:36px;}
.cat-banner-inner{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;flex-wrap:wrap;}
.cat-banner-head{display:flex;align-items:center;gap:16px;margin-bottom:10px;}
.cat-banner-icon{width:56px;height:56px;border-radius:16px;background:var(--tint-moss);color:var(--moss-ink);display:grid;place-items:center;flex:none;}
.cat-banner-icon svg{width:28px;height:28px;stroke-width:1.8;}
.cat-banner h1{font-size:34px;}
.cat-banner p{font-size:15px;color:var(--ink-soft);max-width:60ch;margin:0;}
.cat-stats{display:flex;gap:22px;flex-wrap:wrap;}
.cat-stats .stat{text-align:right;}
.cat-stats .stat b{display:block;font-family:'Fraunces',serif;font-size:22px;font-weight:600;}
.cat-stats .stat span{font-size:11.5px;color:var(--ink-faint);text-transform:uppercase;letter-spacing:.06em;}

/*
 * The photo variant (borrows the lead post's featured image — see
 * category.php). A dark gradient overlay sits between the photo and the
 * content so title/stat text stays readable regardless of what's in the
 * photo or which color theme is active; everything inside is pinned to
 * white/near-white rather than following the usual --ink tokens.
 */
.cat-banner.has-image{
  position:relative;padding:44px 32px 40px;margin-bottom:36px;border-radius:20px;border-bottom:none;
  background-size:cover;background-position:center;overflow:hidden;color:#fff;
}
.cat-banner.has-image::before{content:'';position:absolute;inset:0;background:linear-gradient(190deg,rgba(10,14,14,.32) 0%,rgba(8,10,10,.62) 65%,rgba(6,8,8,.82) 100%);}
.cat-banner.has-image .cat-banner-inner{position:relative;z-index:1;}
.cat-banner.has-image .cat-banner-icon{background:rgba(255,255,255,.16);color:#fff;backdrop-filter:blur(2px);}
.cat-banner.has-image h1{color:#fff;}
.cat-banner.has-image p{color:rgba(255,255,255,.82);}
.cat-banner.has-image .cat-stats .stat b{color:#fff;}
.cat-banner.has-image .cat-stats .stat span{color:rgba(255,255,255,.7);}

.list-toolbar{display:flex;align-items:center;justify-content:space-between;margin-bottom:24px;flex-wrap:wrap;gap:12px;}
.result-count{font-size:13.5px;color:var(--ink-faint);}

.archive-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:26px;margin-bottom:44px;}
.arch-card{background:var(--surface);border:1px solid var(--line);border-radius:14px;overflow:hidden;display:flex;flex-direction:column;}
.arch-card .art{aspect-ratio:16/10;background:var(--tint-moss);background-size:cover;background-position:center;}
.arch-card .body{padding:18px;display:flex;flex-direction:column;gap:9px;flex:1;}
.arch-card .cat{font-size:10.5px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--moss-ink);}
.arch-card h3{font-family:'Inter';font-size:16px;font-weight:700;line-height:1.35;}
.arch-card p{font-size:13px;color:var(--ink-soft);margin:0;flex:1;}
.arch-card .meta{font-size:12px;color:var(--ink-faint);display:flex;gap:6px;align-items:center;flex-wrap:wrap;}
.arch-card.lead{grid-column:span 2;}
.arch-card.lead .art{aspect-ratio:21/9;}
.arch-card.lead h3{font-size:22px;}

.pagination{display:flex;align-items:center;justify-content:center;gap:6px;padding:20px 0 60px;}
.pagination a,.pagination span{display:inline-flex;align-items:center;justify-content:center;min-width:38px;height:38px;border-radius:9px;font-size:13.5px;font-weight:600;color:var(--ink-soft);border:1px solid transparent;}
.pagination a:hover{border-color:var(--line-strong);color:var(--ink);}
.pagination .current{background:var(--ink);color:var(--bg);}
.pagination .next{width:auto;padding:0 14px;gap:6px;border:1px solid var(--line-strong);}
.pagination .next svg{width:14px;height:14px;}
.no-results{padding:40px 0 60px;color:var(--ink-soft);}

/* ---------- single article ---------- */
.art-header{padding:20px 0 28px;}
.art-header .cat-pill{display:inline-flex;align-items:center;gap:7px;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.07em;color:var(--moss-ink);background:var(--tint-moss);padding:6px 13px;border-radius:999px;margin-bottom:16px;}
.art-header .cat-pill svg{width:14px;height:14px;}
.art-header h1{font-size:38px;line-height:1.15;margin-bottom:18px;}
.art-header .dek{font-size:17px;color:var(--ink-soft);margin:0 0 22px;line-height:1.55;}
.byline{display:flex;align-items:center;gap:14px;flex-wrap:wrap;padding-top:18px;border-top:1px solid var(--line);}
.byline-avatar{width:44px;height:44px;border-radius:50%;background:var(--tint-brand);flex:none;overflow:hidden;}
.byline-avatar img{width:100%;height:100%;object-fit:cover;}
.byline-info{display:flex;flex-direction:column;gap:2px;}
.byline-info .name{font-size:14px;font-weight:700;}
.byline-info .role{font-size:12px;color:var(--ink-faint);}
.byline-meta{margin-left:auto;display:flex;gap:16px;flex-wrap:wrap;font-size:12.5px;color:var(--ink-faint);}
.byline-meta span{display:flex;align-items:center;gap:5px;}
.byline-meta svg{width:14px;height:14px;flex:none;}

.featured-media{max-width:1240px;margin:0 auto 40px;aspect-ratio:21/10;background:linear-gradient(135deg,var(--tint-moss),var(--tint-ocean));background-size:cover;background-position:center;border-radius:4px;display:flex;align-items:center;justify-content:center;color:var(--moss-ink);}
.featured-media svg{width:80px;height:80px;opacity:.3;}
/*
 * The header block (breadcrumb, title, dek, byline) sits inside .wrap and so
 * is inset by its 28px side padding, while .featured-media sits outside .wrap
 * at up to 1240px — so the two never lined up. On desktop the image is
 * narrowed to the same content box as the header text (100% minus the wrap's
 * 56px of horizontal padding, capped at 1184px = 1240 - 56).
 */
@media(min-width:981px){
  .featured-media{width:calc(100% - 56px);max-width:1184px;}
}

/*
 * min-width:0 on both grid items overrides the default automatic minimum
 * size (a grid item's intrinsic min-content width) that CSS Grid otherwise
 * enforces along the inline axis. Without it, wide unshrinkable content
 * from real post bodies — a comparison table, a long unbroken URL, a <pre>
 * block — forces its column's track to grow past the explicit track size,
 * blowing the whole layout (and the page) out horizontally, even inside a
 * grid that has already collapsed to a single column on mobile.
 */
.article-layout{display:grid;grid-template-columns:1fr 340px;gap:56px;align-items:start;padding-bottom:64px;min-width:0;}
/*
 * overflow-wrap:break-word covers the other common source of horizontal
 * overflow in real editorial content: a long unbroken string — most often
 * a raw citation URL used as link text in a references list — that has no
 * spaces for the browser's default wrapping to break on.
 */
.article-body{max-width:720px;min-width:0;overflow-wrap:break-word;word-wrap:break-word;}
/* Any real <table>/<pre>/wide embed from post content scrolls within its
   own box instead of forcing the article column (and the page) wider. */
.article-body table{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;}
.article-body pre{overflow-x:auto;-webkit-overflow-scrolling:touch;}
.article-body iframe,.article-body embed,.article-body video{max-width:100%;}
.article-body p{font-size:17px;line-height:1.75;color:var(--ink);margin:0 0 22px;}
.article-body > p:first-of-type::first-letter{font-family:'Fraunces',serif;font-size:58px;font-weight:600;float:left;line-height:.85;padding:6px 8px 0 0;color:var(--brand-ink);}
.article-body h2{font-size:25px;margin:40px 0 16px;scroll-margin-top:100px;}
.article-body h3{font-size:19px;margin:28px 0 12px;scroll-margin-top:100px;}
.article-body ul,.article-body ol{font-size:16px;color:var(--ink);line-height:1.7;padding-left:22px;margin:0 0 22px;}
.article-body li{margin-bottom:8px;}
.article-body img{border-radius:4px;margin:32px 0;}
.article-body blockquote{border-left:3px solid var(--brand);padding:6px 0 6px 22px;margin:32px 0;font-family:'Fraunces',serif;font-size:22px;font-weight:500;color:var(--ink);line-height:1.4;}

.reviewer-box{margin-top:44px;padding:22px;background:var(--surface-2);border-radius:14px;display:flex;gap:16px;align-items:flex-start;}
.reviewer-box .byline-avatar{width:52px;height:52px;}
.reviewer-box .label{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--moss-ink);margin-bottom:6px;}
.reviewer-box .name{font-size:15px;font-weight:700;margin-bottom:4px;}
.reviewer-box p{font-size:13.5px;color:var(--ink-soft);margin:0;line-height:1.6;}

aside.rail{display:flex;flex-direction:column;gap:24px;position:sticky;top:96px;min-width:0;}
.widget{background:var(--surface);border:1px solid var(--line);border-radius:14px;overflow:hidden;}
.widget-head{padding:14px 18px;border-bottom:1px solid var(--line);font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.07em;color:var(--ink-faint);}
/*
 * The TOC is a <details> element (collapsed by default, no "open"
 * attribute) rather than a JS-toggled panel — native disclosure behavior,
 * keyboard/screen-reader accessible for free, and it still works if JS
 * fails to load. Its <summary> reuses .widget-head's look but needs the
 * default marker suppressed and a custom chevron added in its place.
 */
.widget-toc summary{cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:8px;}
.widget-toc summary::-webkit-details-marker{display:none;}
.widget-toc summary::marker{content:'';}
.widget-toc summary:hover{color:var(--ink);}
.widget-toc-chevron{width:14px;height:14px;flex:none;transition:transform .2s ease;}
.widget-toc[open] .widget-toc-chevron{transform:rotate(180deg);}
.widget-toc:not([open]) .widget-head{border-bottom:none;}
/*
 * display:flex must stay scoped to [open] — an unscoped display value on
 * an author stylesheet overrides the browser's native
 * "details:not([open]) > :not(summary) { display: none; }" UA rule
 * regardless of selector specificity (author origin always wins over
 * user-agent origin), which would silently force the list visible even
 * while the <details> itself is closed.
 */
.widget-toc[open] ul{list-style:none;margin:0;padding:14px 18px;display:flex;flex-direction:column;gap:2px;}
.widget-toc a{display:block;font-size:13.5px;color:var(--ink-soft);padding:7px 10px;border-radius:8px;line-height:1.4;}
.widget-toc a:hover{background:var(--tint-brand);color:var(--brand-ink);}
.widget-toc li.sub a{padding-left:22px;font-size:13px;color:var(--ink-faint);}
.ad-widget{background:var(--ad-bg);border:1px dashed var(--line-strong);border-radius:14px;min-height:280px;display:flex;align-items:center;justify-content:center;font-size:12px;color:var(--ink-faint);text-transform:uppercase;letter-spacing:.08em;text-align:center;padding:16px;}
.widget-popular ul{list-style:none;margin:0;padding:8px;display:flex;flex-direction:column;}
.widget-popular li{display:flex;gap:12px;padding:10px;border-radius:10px;}
.widget-popular li:hover{background:var(--surface-2);}
.widget-popular .thumb{width:56px;height:56px;border-radius:8px;background:var(--tint-ocean);background-size:cover;background-position:center;flex:none;}
.widget-popular h5{font-family:'Inter';font-size:13px;font-weight:700;line-height:1.35;margin:0 0 4px;}
.widget-popular span{font-size:11.5px;color:var(--ink-faint);}

.related{padding:8px 0 56px;border-top:1px solid var(--line);}
.related h2{font-size:22px;margin:36px 0 22px;}
.related-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:22px;}
.related-card{background:var(--surface);border:1px solid var(--line);border-radius:14px;overflow:hidden;}
.related-card .art{aspect-ratio:16/10;background:var(--tint-moss);background-size:cover;background-position:center;}
.related-card .body{padding:16px;}
.related-card h4{font-family:'Inter';font-size:14.5px;font-weight:700;line-height:1.35;margin-bottom:6px;}
.related-card span{font-size:12px;color:var(--ink-faint);}

/* ---------- generic page content (About, Privacy, etc.) ---------- */
.page-content{max-width:760px;padding:24px 0 64px;}
.page-content h1{font-size:32px;margin-bottom:24px;}
.page-content p{font-size:16px;line-height:1.75;color:var(--ink-soft);margin:0 0 20px;}
.page-content h2{font-size:22px;margin:32px 0 14px;}
.page-content ul{color:var(--ink-soft);line-height:1.7;}
.page-content a{color:var(--brand-ink);text-decoration:underline;text-underline-offset:2px;}
.page-content a:hover{color:var(--brand);}
.page-content li{margin-bottom:6px;}
/* Contact Us: content column plus a mailing-address card (stacks on mobile). */
.page-content:has(.contact-layout){max-width:1120px;}
.contact-layout{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:48px;align-items:start;}
.contact-main{max-width:760px;}
.contact-main > :first-child{margin-top:0;}
.contact-card{position:sticky;top:24px;background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:24px;}
.page-content .contact-card h3{font-size:19px;margin:0 0 14px;}
.contact-card address{font-style:normal;font-size:14.5px;line-height:1.75;color:var(--ink-soft);margin:0 0 14px;}
.page-content .contact-card-line{font-size:14.5px;line-height:1.6;margin:0;}
.page-content .contact-card-email{margin-top:16px;padding-top:16px;border-top:1px solid var(--line);}
@media(max-width:980px){
  .contact-layout{grid-template-columns:minmax(0,1fr);gap:8px;}
  .contact-card{position:static;}
}

/* ---------- footer — same surface tokens as the header, so it reads as one continuous shell in both themes ---------- */
.site-footer{background:var(--surface);color:var(--ink);border-top:1px solid var(--line);padding:56px 0 28px;margin-top:0;}
.footer-top{display:flex;justify-content:space-between;align-items:flex-start;gap:40px;padding-bottom:36px;border-bottom:1px solid var(--line);flex-wrap:wrap;}
.footer-brand{max-width:380px;}
.footer-brand p{font-size:13.5px;color:var(--ink-faint);margin-top:14px;line-height:1.6;}
.footer-nav-cols{display:flex;gap:56px;flex-wrap:wrap;}
.footer-col h4{font-size:11.5px;text-transform:uppercase;letter-spacing:.08em;color:var(--ink-faint);margin-bottom:14px;font-weight:700;}
.footer-col ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px;}
.footer-col a{font-size:14px;color:var(--ink-soft);}
.footer-col a:hover{color:var(--brand-ink);}
.footer-bottom-row{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:12px;padding-top:22px;font-size:12.5px;color:var(--ink-faint);}
.footer-bottom-row .legal-links{display:flex;gap:18px;list-style:none;margin:0;padding:0;}
.footer-bottom-row a:hover{color:var(--brand-ink);}

@media(max-width:980px){
  .hero-split{grid-template-columns:1fr;min-height:auto;}
  /*
   * On desktop .hero-image gets its height "for free": as a grid item
   * sitting next to .hero-list in a single row, align-items' default
   * stretch makes it match .hero-list's content height. Once the grid
   * collapses to one column, the two stack as separate rows instead — that
   * stretch relationship is gone, so .hero-image (which has no intrinsic
   * height of its own, only padding) collapsed to a thin sliver. Giving it
   * an explicit aspect-ratio here fixes that independently of row stretch.
   */
  .hero-image{aspect-ratio:16/9;padding:20px;}
  .hero-list{border-left:none;border-top:1px solid var(--line);}
  .masonry-row{grid-template-columns:1fr;}
  .archive-grid{grid-template-columns:repeat(2,1fr);}
  .arch-card.lead{grid-column:span 2;}
  /*
   * On mobile the TOC should sit right under the featured image, ahead of
   * the article body — not trail behind the ad and popular-posts widgets
   * at the very bottom of the sidebar, which is where it landed once
   * .article-layout collapsed to a single column and simply stacked its
   * two grid items (.article-body, then aside.rail) in DOM order.
   *
   * display:contents on aside.rail dissolves its own box so its children
   * become direct items of the .article-layout grid instead of being
   * trapped inside one single "aside.rail" item — each can then be given
   * its own `order` and interleaved with .article-body. Desktop is
   * untouched: aside.rail stays a real sticky flex column there.
   */
  .article-layout{grid-template-columns:1fr;gap:24px;}
  aside.rail{display:contents;}
  .widget-toc{order:1;}
  .article-body{order:2;}
  .ad-widget,.widget-popular{order:3;}
  .related-grid{grid-template-columns:1fr;}
  .featured-media{aspect-ratio:1/1;border-radius:0;}
  .art-header h1{font-size:30px;}
}
/*
 * The persistent inline search bar stays visible down through tablet
 * widths (just narrowing a bit at 760px) — it only switches to the
 * icon + popover pattern on genuinely narrow/phone-class viewports below
 * 560px. It previously swapped at 980px, which is ordinary browser-window
 * width, not just phones, so a second "duplicate" search bar (the popover)
 * appeared to open on top of what looked like a normal desktop view.
 */
@media(max-width:760px){
  .search-inline{width:160px;}
}
@media(max-width:640px){
  .archive-grid{grid-template-columns:1fr;}
  .arch-card.lead{grid-column:span 1;}
  /*
   * Mobile keeps the icon beside the title (.cat-banner-head is a row at
   * every width) and stacks .cat-stats below the head+description block
   * instead of beside it. .cat-stats previously kept its desktop styling
   * here too — a big two-line "11,116 / ARTICLES" block in heading-scale
   * serif type — which on its own line read as a second, oversized title
   * rather than metadata. Restyled compact and inline (number and label
   * on one row, small type) so it reads as a stat, not a heading.
   */
  .cat-banner{padding:18px 0 26px;margin-bottom:26px;}
  .cat-banner.has-image{padding:26px 20px 24px;margin-bottom:26px;}
  .cat-banner-icon{width:44px;height:44px;}
  .cat-banner-icon svg{width:22px;height:22px;}
  /*
   * .cat-banner-inner's 24px gap exists to separate two side-by-side
   * desktop columns (title block, stats block). Stacked as rows on
   * mobile that same 24px reads as a big empty gap instead — especially
   * since most categories here have no description sitting between the
   * title and the stat to justify it. Collapsed to 4px; .cat-banner-head's
   * own margin-bottom (10px) already provides the real separation.
   */
  .cat-banner-inner{flex-direction:column;gap:4px;}
  .cat-stats{width:100%;}
  .cat-stats .stat{display:flex;align-items:baseline;gap:6px;text-align:left;}
  .cat-stats .stat b{font-size:15px;}
  .cat-stats .stat span{font-size:11px;}
  .footer-top{flex-direction:column;}
}
@media(max-width:560px){
  .search-inline{display:none;}
  .search-toggle{display:inline-flex;}
}
/*
 * On narrow phones the logo wordmark ("DecorsDeck", one unbreakable
 * word) plus three 38px icon buttons don't both fit at full size within
 * the header row — the row has no ability to shrink either (icon buttons
 * are fixed-width, the logo can't line-wrap mid-word), so without this the
 * header-actions cluster was pushed ~25-30px past the viewport edge,
 * dragging the whole page into horizontal scroll. Shrinking the wrap's
 * side padding, the icon buttons, and the logo reclaims exactly that much.
 */
@media(max-width:400px){
  .header-row1 .wrap{padding:14px 16px;gap:10px;}
  .logo{font-size:20px;gap:8px;}
  .logo a{gap:8px;}
  .logo .mark{width:30px;height:30px;}
  .logo .mark svg{width:15px;height:15px;}
  .logo-img{height:40px;}
  .logo-img--footer{height:48px;}
  .header-actions{gap:6px;}
  .icon-btn{width:34px;height:34px;}
  .icon-btn svg{width:15px;height:15px;}
}

.advert {
   position: relative;
   margin: 0;
   text-align: center !important;
}
.advert:before {
 content: "Advertisement";
 display: block;
 left: 0;
 height: 20px;
 font-size: 11px;
 line-height: 20px;
 letter-spacing: 1px;
 color: #6f7174;
 top: -20px;
}

.advert:before {
   text-align: center !important
}
div.advertinside:before {
content: 'Advertisement - Continue Reading Below';
display: block;
top: -20px;
left: 0;
height: 20px;
font-size: 11px;
line-height: 20px;
letter-spacing: 1px;
color: #6f7174;
text-align: center;
}

div.advertinside:after {
content: 'Advertisement - Continue Reading Below';
display: block;
top: -20px;
left: 0;
height: 20px;
font-size:11px;
line-height: 20px;
letter-spacing: 1px;
color: #6f7174;
text-align: center;
}
.mn-h-400 {
min-height: 400px
}
div.advertinside {
text-align: center;
background: #f5f5f5;
}
@media (min-width: 1024px) {
.advertmobile {
   display: none;
}
}

@media screen and (max-width:720px) {

.advert {
   position: relative;
   margin: 0;
   text-align: center !important;
}

.advert:before {
   text-align: center !important
}

}

/* ==========================================================================
   Inline Related Reading (function_files/functions-inline-related.php), after the 3rd paragraph.
   --ir-tint / --ir-accent come from the category tone (decorsdeck_get_term_colors), light and dark.
   ========================================================================== */
.article-body .inline-related{clear:both;margin:32px 0;padding:20px 22px 22px;background:var(--ir-tint,var(--tint-moss));border-radius:14px;}
.article-body .inline-related-title{margin:0 0 14px;font-family:'Inter',ui-sans-serif,system-ui,sans-serif;font-size:11px;font-weight:700;letter-spacing:.07em;line-height:1.4;text-transform:uppercase;color:var(--ir-accent,var(--moss-ink));}
.article-body .inline-related-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;}
.article-body .inline-related-item{display:flex;flex-direction:column;min-width:0;overflow:hidden;background:var(--surface);border:1px solid var(--line);border-radius:14px;color:var(--ink);transition:transform .2s ease,border-color .2s ease;}
.article-body .inline-related-item:hover{transform:translateY(-3px);border-color:var(--ir-accent,var(--brand));}
.article-body .inline-related-image{aspect-ratio:16/10;overflow:hidden;background:var(--ir-tint,var(--tint-moss));}
.article-body .inline-related-image img{display:block;width:100%;height:100%;margin:0;border-radius:0;object-fit:cover;}
.article-body .inline-related-body{display:flex;flex-direction:column;gap:6px;padding:14px 14px 16px;}
.article-body .inline-related-name{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;font-family:'Inter',ui-sans-serif,system-ui,sans-serif;font-size:14.5px;font-weight:700;line-height:1.35;}
.article-body .inline-related-item:hover .inline-related-name{color:var(--ir-accent,var(--brand-ink));}
.article-body .inline-related-meta{font-size:12px;color:var(--ink-faint);}
@media(max-width:640px){
  .article-body .inline-related{padding:16px;}
  .article-body .inline-related-grid{grid-template-columns:1fr;gap:10px;}
  .article-body .inline-related-item{flex-direction:row;align-items:center;}
  .article-body .inline-related-image{flex:0 0 96px;aspect-ratio:4/3;}
  .article-body .inline-related-body{padding:10px 14px;gap:4px;}
}
@media (prefers-reduced-motion:reduce){.article-body .inline-related-item{transition:none;}.article-body .inline-related-item:hover{transform:none;}}
@media (max-width: 767px) {
  .hidden-xs {
    display: none !important;
  }
}
