/*
Theme Name: Crochetovia
Theme URI: https://crochetovia.com
Author: Crochetovia Editorial
Description: Pinterest-first crochet & DIY pattern theme. Custom "pattern" CPT, reusable Pattern Card component, multi-pin save gallery, honest editorial credits, affiliate + email funnel hooks. No page builder, no jQuery.
Version: 2.1.0
Requires PHP: 8.0
Requires at least: 6.2
License: GPL-2.0-or-later
Text Domain: crochetovia
Tags: blog, custom-colors, custom-menu, featured-images, translation-ready
*/

/* -------------------------------------------------------------
   1. DESIGN TOKENS  (warm, tactile, yarn-forward)
------------------------------------------------------------- */
:root{
  --c-terracotta:#B34B30;
  --c-terracotta-dark:#943820;
  --c-rose:#d99a8c;
  --c-cream:#fbf6ee;
  --c-oatmeal:#f2e9dc;
  --c-oatmeal-dark:#e6d9c6;
  --c-sage:#547B5F;
  --c-mustard:#d9a441;
  --c-charcoal:#3a332e;
  --c-charcoal-soft:#5d554e;
  --c-line:#e3d7c6;
  --c-white:#fffdf9;

  --font-display:"Fraunces","Playfair Display",Georgia,"Times New Roman",serif;
  --font-body:"Karla","Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;

  --radius-s:8px;
  --radius-m:14px;
  --radius-l:22px;
  --shadow-s:0 1px 2px rgba(58,51,46,.06),0 2px 8px rgba(58,51,46,.05);
  --shadow-m:0 6px 24px rgba(58,51,46,.09);
  --wrap:1180px;
  --wrap-narrow:760px;
}

/* -------------------------------------------------------------
   2. BASE
------------------------------------------------------------- */
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0;
  background:var(--c-cream);
  color:var(--c-charcoal);
  font-family:var(--font-body);
  font-size:1.0625rem;
  line-height:1.7;
  -webkit-font-smoothing:antialiased;
}
img{max-width:100%;height:auto;display:block}
a{color:var(--c-terracotta-dark);text-decoration:none}
a:hover,a:focus{text-decoration:underline}
h1,h2,h3,h4,h5{font-family:var(--font-display);color:var(--c-charcoal);line-height:1.2;margin:0 0 .5em;font-weight:600}
h1{font-size:clamp(2rem,4.4vw,3rem)}
h2{font-size:clamp(1.5rem,3vw,2.05rem)}
h3{font-size:1.3rem}
p{margin:0 0 1.15em}
ul,ol{padding-left:1.25em}
hr{border:0;border-top:1px solid var(--c-line);margin:2.5rem 0}
:focus-visible{outline:3px solid var(--c-sage);outline-offset:2px}
.screen-reader-text{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(1px,1px,1px,1px);white-space:nowrap}
.skip-link{position:absolute;left:-9999px}
.skip-link:focus{left:1rem;top:1rem;z-index:999;background:var(--c-white);padding:.6rem 1rem;border-radius:var(--radius-s)}

.wrap{width:100%;max-width:var(--wrap);margin-inline:auto;padding-inline:1.15rem}
.wrap-narrow{width:100%;max-width:var(--wrap-narrow);margin-inline:auto;padding-inline:1.15rem}
.section{padding:3rem 0}
.section-head{display:flex;align-items:flex-end;justify-content:space-between;gap:1rem;margin-bottom:1.5rem}
.section-head h2{margin:0}
.eyebrow{font-family:var(--font-body);text-transform:uppercase;letter-spacing:.14em;font-size:.74rem;font-weight:700;color:var(--c-sage);margin:0 0 .4rem}

/* -------------------------------------------------------------
   3. BUTTONS
------------------------------------------------------------- */
.btn{
  display:inline-flex;align-items:center;gap:.5rem;
  font-family:var(--font-body);font-weight:700;font-size:.95rem;
  padding:.72rem 1.25rem;border-radius:999px;border:1px solid transparent;
  cursor:pointer;text-decoration:none;transition:background .18s ease,color .18s ease,transform .18s ease;
}
.btn:hover{text-decoration:none;transform:translateY(-1px)}
.btn--primary{background:var(--c-terracotta);color:#fff}
.btn--primary:hover{background:var(--c-terracotta-dark);color:#fff}
.btn--ghost{background:transparent;border-color:var(--c-line);color:var(--c-charcoal)}
.btn--ghost:hover{background:var(--c-oatmeal)}
.btn--sage{background:var(--c-sage);color:#fff}
.btn--block{width:100%;justify-content:center}

/* -------------------------------------------------------------
   4. HEADER / NAV / FOOTER
------------------------------------------------------------- */
.site-header{background:var(--c-white);border-bottom:1px solid var(--c-line);position:sticky;top:0;z-index:50}
.site-header__inner{display:flex;align-items:center;gap:1rem;min-height:68px}
.site-brand{font-family:var(--font-display);font-size:1.5rem;font-weight:700;color:var(--c-charcoal);letter-spacing:-.01em}
.site-brand:hover{text-decoration:none;color:var(--c-terracotta-dark)}
.site-brand small{display:block;font-family:var(--font-body);font-size:.66rem;letter-spacing:.16em;text-transform:uppercase;color:var(--c-charcoal-soft);font-weight:600}
.nav{margin-left:auto}
.nav ul{display:flex;gap:1.35rem;list-style:none;margin:0;padding:0}
.nav a{color:var(--c-charcoal);font-weight:600;font-size:.95rem}
.nav a:hover{color:var(--c-terracotta-dark)}
.nav-toggle{display:none;margin-left:auto;background:none;border:1px solid var(--c-line);border-radius:var(--radius-s);padding:.5rem .7rem;font-weight:700;cursor:pointer}
@media(max-width:900px){
  .nav-toggle{display:block}
  .nav{margin-left:0;flex-basis:100%;display:none;padding-bottom:1rem}
  .nav.is-open{display:block}
  .nav ul{flex-direction:column;gap:.6rem}
  .site-header__inner{flex-wrap:wrap}
}
.site-footer{background:var(--c-charcoal);color:var(--c-oatmeal);margin-top:4rem;padding:2.75rem 0 2rem}
.site-footer a{color:var(--c-oatmeal)}
.footer-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:2rem}
.site-footer h3{color:var(--c-white);font-size:1.05rem}
.site-footer ul{list-style:none;padding:0;margin:0}
.site-footer li{margin-bottom:.4rem}
.footer-legal{border-top:1px solid rgba(255,255,255,.15);margin-top:2rem;padding-top:1.25rem;font-size:.85rem;opacity:.8}

/* -------------------------------------------------------------
   5. CARDS / GRIDS
------------------------------------------------------------- */
.grid{display:grid;gap:1.6rem}
.grid--3{grid-template-columns:repeat(auto-fill,minmax(270px,1fr))}
.grid--4{grid-template-columns:repeat(auto-fill,minmax(220px,1fr))}
.grid--2{grid-template-columns:repeat(auto-fit,minmax(320px,1fr))}

.p-card{background:var(--c-white);border:1px solid var(--c-line);border-radius:var(--radius-m);overflow:hidden;box-shadow:var(--shadow-s);display:flex;flex-direction:column;transition:box-shadow .2s ease,transform .2s ease}
.p-card:hover{box-shadow:var(--shadow-m);transform:translateY(-2px)}
.p-card__media{position:relative;aspect-ratio:4/5;background:var(--c-oatmeal);overflow:hidden}
.p-card__media img{width:100%;height:100%;object-fit:cover}
.p-card__body{padding:1rem 1.05rem 1.2rem}
.p-card__title{font-size:1.12rem;margin:0 0 .35rem}
.p-card__title a{color:var(--c-charcoal)}
.p-card__meta{font-size:.82rem;color:var(--c-charcoal-soft);display:flex;flex-wrap:wrap;gap:.4rem .75rem;margin:0}
.badge{display:inline-block;font-size:.7rem;font-weight:700;text-transform:uppercase;letter-spacing:.08em;padding:.28rem .6rem;border-radius:999px;background:var(--c-oatmeal);color:var(--c-charcoal-soft)}
.badge--beginner{background:#e7efe2;color:#4d6440}
.badge--intermediate{background:#faf0d8;color:#8a6413}
.badge--advanced{background:#f6e0d8;color:#94452a}
.p-card__media .badge{position:absolute;top:.65rem;left:.65rem;background:rgba(255,253,249,.94)}

/* -------------------------------------------------------------
   6. HOMEPAGE HERO
------------------------------------------------------------- */
.hero{background:linear-gradient(180deg,var(--c-oatmeal) 0%,var(--c-cream) 100%);padding:3.5rem 0 3rem;border-bottom:1px solid var(--c-line)}
.hero__grid{display:grid;grid-template-columns:1.05fr .95fr;gap:2.5rem;align-items:center}
@media(max-width:860px){.hero__grid{grid-template-columns:1fr}}
.hero h1{margin-bottom:.6rem}
.hero p.lede{font-size:1.15rem;color:var(--c-charcoal-soft);max-width:46ch}
.hero__media img{border-radius:var(--radius-l);box-shadow:var(--shadow-m);aspect-ratio:4/3;object-fit:cover;width:100%}
.hero__cta{display:flex;gap:.75rem;flex-wrap:wrap;margin-top:1.25rem}

.cat-tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:1.1rem}
.cat-tile{position:relative;display:block;border-radius:var(--radius-m);overflow:hidden;aspect-ratio:3/2;background:var(--c-oatmeal-dark)}
.cat-tile img{width:100%;height:100%;object-fit:cover;transition:transform .35s ease}
.cat-tile:hover img{transform:scale(1.04)}
.cat-tile span{position:absolute;inset:auto 0 0 0;background:linear-gradient(0deg,rgba(58,51,46,.78),transparent);color:#fff;font-family:var(--font-display);font-size:1.2rem;padding:1.6rem .9rem .8rem}
.cat-tile:hover{text-decoration:none}

/* -------------------------------------------------------------
   7. SINGLE PATTERN
------------------------------------------------------------- */
.entry-header{padding:2.25rem 0 1rem}
.breadcrumbs{font-size:.82rem;color:var(--c-charcoal-soft);margin-bottom:.8rem}
.breadcrumbs a{color:var(--c-charcoal-soft)}
.entry-meta{display:flex;flex-wrap:wrap;gap:.5rem .9rem;font-size:.85rem;color:var(--c-charcoal-soft);margin-bottom:1rem}
.entry-hero{margin:0 0 1.75rem;position:relative}
.entry-hero img{border-radius:var(--radius-l);width:100%}
.entry-hero figcaption{font-size:.82rem;color:var(--c-charcoal-soft);margin-top:.5rem}
.entry-content{font-size:1.075rem}
.entry-content h2{margin-top:2.2rem}
.entry-content img{border-radius:var(--radius-m)}

.jump-bar{display:flex;gap:.6rem;flex-wrap:wrap;margin:1.25rem 0 2rem}

/* -------------------------------------------------------------
   8. PATTERN CARD  (structural core)
------------------------------------------------------------- */
.pattern-card {
  background: var(--c-white);
  border: 1px solid #efe9df;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(92, 75, 62, 0.08);
  overflow: hidden;
  margin: 3.5rem 0;
}
.pattern-card__head {
  background: #fdfaf5;
  padding: 2rem 2.5rem;
  border-bottom: 1px solid #efe9df;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: flex-start;
}
.pattern-card__head-main { flex: 1 1 260px; }
.pattern-card__label {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--c-sage);
  margin: 0 0 0.5rem;
}
.pattern-card__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--c-charcoal);
  line-height: 1.2;
}
.pattern-card__actions { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; }
.pattern-card__tested {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #f0f5eb;
  color: #3b572a;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  margin-top: 0.8rem;
}

.pattern-specs {
  list-style: none;
  margin: 0;
  padding: 2.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  border-bottom: 1px solid #efe9df;
  background: linear-gradient(180deg, #ffffff 0%, #fdfcf9 100%);
}
.pattern-specs li { margin: 0; }
.pattern-specs dt, .spec-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 800;
  color: var(--c-sage);
  margin-bottom: 0.25rem;
}
.spec-value {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--c-charcoal);
}

.pattern-section{padding:1.35rem 1.5rem;border-bottom:1px solid var(--c-line)}
.pattern-section:last-child{border-bottom:0}
.pattern-section > h3{font-size:1.15rem;margin:0 0 .8rem;display:flex;align-items:center;gap:.5rem}
.materials-list{list-style:none;padding:0;margin:0}
.materials-list li{padding:.5rem 0 .5rem 1.7rem;border-bottom:1px dashed var(--c-line);position:relative}
.materials-list li:last-child{border-bottom:0}
.materials-list li::before{content:"";position:absolute;left:.25rem;top:1.05rem;width:9px;height:9px;border-radius:50%;background:var(--c-sage)}

.steps{list-style:none;counter-reset:step;padding:0;margin:0}
.steps > li{counter-increment:step;position:relative;padding:0 0 1.1rem 3rem;margin-bottom:1.1rem;border-bottom:1px solid var(--c-line)}
.steps > li:last-child{border-bottom:0;margin-bottom:0;padding-bottom:0}
.steps > li::before{content:counter(step);position:absolute;left:0;top:0;width:2.05rem;height:2.05rem;border-radius:50%;background:var(--c-terracotta);color:#fff;display:grid;place-items:center;font-weight:800;font-size:.92rem;font-family:var(--font-body)}
.steps img{margin-top:.75rem;border-radius:var(--radius-s)}
.step-title{font-weight:700;display:block;margin-bottom:.2rem}

.pattern-notes{background:#faf3e6;border-left:4px solid var(--c-mustard);padding:1rem 1.15rem;border-radius:0 var(--radius-s) var(--radius-s) 0}

details.glossary{border:1px solid var(--c-line);border-radius:var(--radius-s);padding:.75rem 1rem;background:var(--c-cream)}
details.glossary + details.glossary{margin-top:.75rem}
details.glossary summary{cursor:pointer;font-weight:700;font-family:var(--font-body)}

.abbr-table, .term-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1.5rem 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.03);
  border: 1px solid #efe9df;
  font-size: 1.05rem;
}
.abbr-table th, .term-table th {
  background: var(--c-cream);
  color: var(--c-terracotta);
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  padding: 1.25rem 1.5rem;
  text-align: left;
  border-bottom: 1px solid #efe9df;
}
.abbr-table td, .term-table td {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #f6f3ef;
  color: var(--c-charcoal);
  text-align: left;
}
.abbr-table tr:last-child td, .term-table tr:last-child td {
  border-bottom: none;
}
.abbr-table tr:hover td, .term-table tr:hover td {
  background: #fdfaf5;
}
.abbr-table th, .term-table td:first-child {
  font-weight: 700;
  color: var(--c-terracotta);
}
.abbr-table th::before, .term-table td:first-child::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--c-sage);
  border-radius: 50%;
  margin-right: 10px;
  transform: translateY(-2px);
}
.term-note{font-size:.86rem;color:var(--c-charcoal-soft);background:#f6e9e4;border-left:3px solid var(--c-terracotta);padding:.65rem .8rem;border-radius:0 var(--radius-s) var(--radius-s) 0;margin-top:.8rem}

.term-toggle{display:inline-flex;border:1px solid var(--c-line);border-radius:999px;overflow:hidden;background:var(--c-white)}
.term-toggle button{border:0;background:none;padding:.4rem .95rem;font-weight:700;font-size:.85rem;cursor:pointer;color:var(--c-charcoal-soft);font-family:var(--font-body)}
.term-toggle button[aria-pressed="true"]{background:var(--c-terracotta);color:#fff}
.term-col.is-hidden{display:none}

.pdf-block{display:flex;flex-wrap:wrap;align-items:center;gap:.85rem;background:var(--c-oatmeal);padding:1rem 1.5rem}
.pdf-block .price{font-weight:800;font-family:var(--font-display);font-size:1.15rem}

/* -------------------------------------------------------------
   9. PIN SAVE GALLERY
------------------------------------------------------------- */
.pin-gallery{background:var(--c-oatmeal);border-radius:var(--radius-l);padding:1.5rem;margin:2.5rem 0}
.pin-gallery__head{margin-bottom:1rem}
.pin-gallery__head h2{margin:0;font-size:1.4rem}
.pin-gallery__head p{margin:.25rem 0 0;color:var(--c-charcoal-soft);font-size:.95rem}
.pin-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:1.1rem}
.pin-item{position:relative;background:var(--c-white);border-radius:var(--radius-m);overflow:hidden;box-shadow:var(--shadow-s)}
.pin-item img{aspect-ratio:2/3;object-fit:cover;width:100%}
.pin-item__cap{padding:.6rem .7rem;font-size:.82rem;font-weight:600;line-height:1.35}
.pin-save{position:absolute;top:.55rem;right:.55rem;background:#e60023;color:#fff;font-size:.78rem;font-weight:800;padding:.4rem .75rem;border-radius:999px;box-shadow:var(--shadow-s)}
.pin-save:hover{background:#c8001e;color:#fff;text-decoration:none}

/* -------------------------------------------------------------
   10. AFFILIATE / EMAIL / ADS / CREDITS
------------------------------------------------------------- */
.affiliate-block{border:1px solid var(--c-line);border-radius:var(--radius-m);background:var(--c-white);padding:1.35rem;margin:2.25rem 0}
.affiliate-block h2{font-size:1.25rem;margin:0 0 .25rem}
.affiliate-disclosure{font-size:.8rem;color:var(--c-charcoal-soft);background:var(--c-oatmeal);padding:.6rem .8rem;border-radius:var(--radius-s);margin:.6rem 0 1rem}
.affiliate-list{list-style:none;padding:0;margin:0;display:grid;gap:.8rem}
.affiliate-item{display:flex;gap:.9rem;align-items:center;border:1px solid var(--c-line);border-radius:var(--radius-s);padding:.7rem}
.affiliate-item img{width:64px;height:64px;object-fit:cover;border-radius:var(--radius-s);flex:none}
.affiliate-item__body{flex:1}
.affiliate-item__body strong{display:block}
.affiliate-item__body span{font-size:.85rem;color:var(--c-charcoal-soft)}

.email-capture{background:var(--c-sage);color:#fff;border-radius:var(--radius-l);padding:1.75rem;margin:2.5rem 0;text-align:center}
.email-capture h2{color:#fff;margin:0 0 .4rem;font-size:1.5rem}
.email-capture p{margin:0 auto 1.1rem;max-width:48ch;opacity:.95}
.email-capture form{display:flex;gap:.6rem;flex-wrap:wrap;justify-content:center;max-width:480px;margin-inline:auto}
.email-capture input[type=email]{flex:1 1 220px;padding:.75rem 1rem;border-radius:999px;border:0;font-family:var(--font-body);font-size:1rem}
.email-capture .btn--primary{background:var(--c-charcoal)}
.email-capture .btn--primary:hover{background:#231f1c}
.email-capture .fineprint{font-size:.78rem;opacity:.85;margin-top:.8rem}
.email-capture .form-msg{margin-top:.75rem;font-weight:700;min-height:1.2em}

.editorial-credit{border-top:1px solid var(--c-line);border-bottom:1px solid var(--c-line);padding:1.15rem 0;margin:2.25rem 0;font-size:.92rem}
.editorial-credit h2{font-size:1.05rem;margin:0 0 .6rem}
.editorial-credit dl{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:.6rem 1.25rem;margin:0}
.editorial-credit dt{font-size:.7rem;text-transform:uppercase;letter-spacing:.1em;color:var(--c-charcoal-soft);font-weight:700}
.editorial-credit dd{margin:0;font-weight:600}
.editorial-credit .process-link{display:inline-block;margin-top:.8rem;font-size:.85rem}

.ad-slot{margin:3rem auto;text-align:center;min-height:90px;background:var(--c-cream);padding:1.5rem;border-radius:var(--radius-m);border:1px dashed var(--c-sage);position:relative;max-width:100%;overflow:hidden;}
.ad-slot__label{font-size:.7rem;letter-spacing:.1em;text-transform:uppercase;color:var(--c-terracotta);margin-bottom:1rem;font-weight:600;}

/* -------------------------------------------------------------
   11. HUB / ARCHIVE
------------------------------------------------------------- */
.hub-intro{background:var(--c-oatmeal);padding:2.5rem 0;border-bottom:1px solid var(--c-line)}
.hub-intro h1{margin-bottom:.5rem}
.hub-intro p{max-width:70ch;color:var(--c-charcoal-soft);margin-bottom:0}
.filter-bar{display:flex;gap:.5rem;flex-wrap:wrap;margin:1.75rem 0}
.filter-bar button{background:var(--c-white);border:1px solid var(--c-line);border-radius:999px;padding:.45rem 1rem;font-weight:700;font-size:.86rem;cursor:pointer;font-family:var(--font-body);color:var(--c-charcoal-soft)}
.filter-bar button[aria-pressed="true"]{background:var(--c-charcoal);border-color:var(--c-charcoal);color:#fff}
.p-card.is-filtered{display:none}
.pinterest-boards{background:var(--c-white);border:1px solid var(--c-line);border-radius:var(--radius-m);padding:1.5rem;margin:2.5rem 0}

.pagination{display:flex;gap:.5rem;justify-content:center;margin:2.5rem 0;flex-wrap:wrap}
.pagination .page-numbers{padding:.5rem .9rem;border:1px solid var(--c-line);border-radius:var(--radius-s);background:var(--c-white)}
.pagination .current{background:var(--c-charcoal);color:#fff;border-color:var(--c-charcoal)}

.page-body{background:var(--c-white);border:1px solid var(--c-line);border-radius:var(--radius-l);padding:2rem;margin:2rem 0}
/* -------------------------------------------------------------
   9. EDITORIAL TYPOGRAPHY & STEPS UI
------------------------------------------------------------- */
.pattern-article-content > p:first-of-type::first-letter {
  float: left;
  font-family: var(--font-display);
  font-size: 5rem;
  line-height: 0.8;
  padding: 0.2rem 0.5rem 0 0;
  color: var(--c-terracotta);
}

blockquote {
  margin: 2rem 0;
  padding: 1.5rem 2rem;
  background: var(--c-cream);
  border-left: 4px solid var(--c-sage);
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 1.25rem;
  color: var(--c-charcoal);
}


/* -------------------------------------------------------------
   10. CATEGORY CARDS GRID
------------------------------------------------------------- */
.category-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.category-card {
  position: relative;
  display: block;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 4/5;
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.category-card__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.5s ease;
}

.category-card:hover .category-card__bg {
  transform: scale(1.05);
}

.category-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0) 100%);
}

.category-card__content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transform: translateY(0);
  transition: transform 0.3s ease;
}

.category-card__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 2rem;
  color: #ffffff;
  line-height: 1.1;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.category-card__count {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 700;
  opacity: 0.9;
}
/* -------------------------------------------------------------
   11. PREMIUM SIDEBAR & TOC
------------------------------------------------------------- */
.toc-widget {
  background: var(--c-white);
  border: 1px solid #efe9df;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(92, 75, 62, 0.05);
}
.toc-widget h3 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--c-terracotta);
  margin-top: 0;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid #efe9df;
  padding-bottom: 1rem;
}
#sticky-toc {
  list-style: none;
  padding: 0;
  margin: 0;
  border-left: 2px solid #efe9df;
}
#sticky-toc li {
  margin: 0;
  padding: 0;
}
#sticky-toc a {
  display: block;
  padding: 0.6rem 0 0.6rem 1.5rem;
  color: var(--c-charcoal-soft);
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  position: relative;
}
#sticky-toc a::before {
  content: '';
  position: absolute;
  left: -2px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--c-terracotta);
  transform: scaleY(0);
  transition: transform 0.2s ease;
  transform-origin: top;
}
#sticky-toc a:hover {
  color: var(--c-terracotta);
  background: #fcfbfa;
}
#sticky-toc a:hover::before,
#sticky-toc a.active::before {
  transform: scaleY(1);
}
#sticky-toc a.active {
  color: var(--c-terracotta);
  font-weight: 700;
  background: #fdfaf5;
}

/* -------------------------------------------------------------
   12. ENHANCED JUMP BAR
------------------------------------------------------------- */
.jump-bar {
  display: flex;
  gap: 1rem;
  margin: 2rem 0;
  padding-bottom: 2rem;
  border-bottom: 1px solid #efe9df;
}
.jump-bar .btn {
  background: var(--c-white);
  border: 1px solid #efe9df;
  color: var(--c-charcoal);
  border-radius: 999px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.03);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.8rem;
  padding: 0.8rem 1.5rem;
  transition: all 0.3s ease;
}
.jump-bar .btn:hover {
  background: var(--c-cream);
  border-color: var(--c-terracotta);
  color: var(--c-terracotta);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0,0,0,0.06);
}

/* -------------------------------------------------------------
   13. PREMIUM AUTHOR & EMAIL BOXES
------------------------------------------------------------- */
.author-box {
  background: linear-gradient(135deg, #ffffff 0%, #fdfcf9 100%);
  border: 1px solid #efe9df;
  box-shadow: 0 10px 30px rgba(92, 75, 62, 0.05);
  border-radius: 16px;
  padding: 3rem;
  margin: 3rem 0;
}
.author-box__avatar img {
  border: 4px solid var(--c-cream);
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.email-capture {
  background: linear-gradient(135deg, var(--c-sage) 0%, #768d60 100%);
  border-radius: 16px;
  box-shadow: 0 15px 40px rgba(103, 126, 82, 0.2);
  position: relative;
  overflow: hidden;
}
.email-capture::before {
  content: '?';
  position: absolute;
  font-size: 15rem;
  color: #ffffff;
  opacity: 0.05;
  top: -4rem;
  right: -2rem;
  transform: rotate(15deg);
  pointer-events: none;
}
/* -------------------------------------------------------------
   14. ULTRA PREMIUM OVERHAULS (GLASSMORPHISM & TABLES)
------------------------------------------------------------- */
/* Overlapping layout shadows */
.pattern-main-area .pattern-card {
  box-shadow: 0 35px 80px rgba(0,0,0,0.1) !important;
  border: none !important;
  background: rgba(255, 255, 255, 0.98) !important;
  position: relative;
  z-index: 20;
}

/* Premium Table Restyling */
.pattern-article-content table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 2.5rem 0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.04);
  border: 1px solid #efe9df;
}
.pattern-article-content th {
  background: var(--c-cream);
  color: var(--c-terracotta);
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  padding: 1.5rem;
  text-align: left;
  border-bottom: 1px solid #efe9df;
}
.pattern-article-content td {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #f6f3ef;
  color: var(--c-charcoal);
  font-size: 1.05rem;
}
.pattern-article-content tr:last-child td {
  border-bottom: none;
}
.pattern-article-content tr:hover td {
  background: #fdfaf5;
}

/* Pill Badges for Abbreviations */
.pattern-article-content td:first-child {
  font-weight: 700;
  color: var(--c-terracotta);
}
.pattern-article-content td:first-child::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--c-sage);
  border-radius: 50%;
  margin-right: 10px;
  transform: translateY(-2px);
}

/* Micro Animations */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.step-card {
  animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
}
.step-card:nth-child(1) { animation-delay: 0.1s; }
.step-card:nth-child(2) { animation-delay: 0.2s; }
.step-card:nth-child(3) { animation-delay: 0.3s; }
.step-card:nth-child(4) { animation-delay: 0.4s; }
.step-card:nth-child(5) { animation-delay: 0.5s; }
.step-card:nth-child(n+6) { animation-delay: 0.6s; }

/* Specs Grid Enhancements */
.pattern-specs {
  background: #fdfaf5 !important;
  border: 1px solid #efe9df !important;
  border-radius: 12px !important;
  padding: 2.5rem !important;
  margin-bottom: 2.5rem !important;
  box-shadow: inset 0 2px 10px rgba(0,0,0,0.02) !important;
  border-bottom: 1px solid #efe9df !important;
}
.pattern-specs dt, .spec-label {
  color: var(--c-sage) !important;
  font-size: 0.75rem !important;
  font-weight: 800 !important;
}
.pattern-specs .spec-value {
  font-size: 1.15rem;
  color: var(--c-charcoal);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: normal;
}
/* -------------------------------------------------------------
   15. MOBILE STICKY UTILITY BAR
------------------------------------------------------------- */
.mobile-utility-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--c-white);
  border-top: 1px solid #efe9df;
  padding: 1rem;
  box-shadow: 0 -4px 15px rgba(0,0,0,0.05);
  z-index: 9999;
  justify-content: space-around;
  align-items: center;
}
@media (max-width: 767px) {
  .mobile-utility-bar {
    display: flex;
  }
}
.mobile-utility-bar a {
  text-decoration: none;
  color: var(--c-charcoal);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}
.mobile-utility-bar a span {
  font-size: 1.2rem;
  color: var(--c-terracotta);
}

/* -------------------------------------------------------------
   16. STICKY TOC & ACCESSIBILITY TOOLS
------------------------------------------------------------- */
.pattern-sidebar {
  position: sticky;
  top: 2rem;
  width: 300px;
  flex: none;
  align-self: flex-start;
}
.toc-widget {
  background: var(--c-white);
  border: 1px solid var(--c-line);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.02);
}
.toc-widget h3 {
  font-family: var(--font-display);
  color: var(--c-terracotta);
  font-size: 1.25rem;
  margin-top: 0;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--c-cream);
  padding-bottom: 0.5rem;
}
.toc-widget ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.toc-widget li {
  margin-bottom: 0.75rem;
}
.toc-widget a {
  color: var(--c-charcoal);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s;
  display: block;
}
.toc-widget a:hover, .toc-widget a.active {
  color: var(--c-sage);
  font-weight: 600;
}

.accessibility-tools {
  display: flex;
  gap: 10px;
  margin-bottom: 2rem;
  align-items: center;
  justify-content: flex-end;
}
.accessibility-btn {
  background: var(--c-white);
  border: 1px solid var(--c-line);
  color: var(--c-charcoal);
  border-radius: 50px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.2s;
  box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}
.accessibility-btn:hover {
  border-color: var(--c-sage);
  color: var(--c-sage);
  transform: translateY(-2px);
}
.text-large .pattern-article-content,
.text-large .step-card__text,
.text-large .editorial-box p {
  font-size: 1.25rem !important;
  line-height: 1.8 !important;
}
/* -------------------------------------------------------------
   17. DARK MODE (COZY MODE)
------------------------------------------------------------- */
[data-theme="dark"] {
  --c-white: #1a1a1a;
  --c-cream: #242424;
  --c-oatmeal: #1f1f1f;
  --c-charcoal: #f0f0f0;
  --c-charcoal-soft: #cccccc;
  --c-terracotta: #D86B49;
  --c-sage: #9CC2A7;
  --c-line: #333333;
}
[data-theme="dark"] body {
  background-color: var(--c-white);
  color: var(--c-charcoal);
}
[data-theme="dark"] .site-header,
[data-theme="dark"] .mobile-utility-bar {
  background-color: var(--c-white);
  border-color: var(--c-line);
}
[data-theme="dark"] .search-overlay {
  background-color: var(--c-white);
}
[data-theme="dark"] .quick-stats-bar,
[data-theme="dark"] .why-love-box,
[data-theme="dark"] .about-box,
[data-theme="dark"] .before-start-box,
[data-theme="dark"] .tips-box,
[data-theme="dark"] .pattern-card,
[data-theme="dark"] .step-card,
[data-theme="dark"] .author-box,
[data-theme="dark"] .email-capture,
[data-theme="dark"] .pin-gallery,
[data-theme="dark"] .pdf-block,
[data-theme="dark"] .pattern-specs {
  background-color: var(--c-cream) !important;
  border-color: var(--c-line) !important;
  color: var(--c-charcoal);
}
[data-theme="dark"] .abbr-table th, [data-theme="dark"] .term-table th {
  background-color: var(--c-oatmeal);
  border-color: var(--c-line);
}
[data-theme="dark"] .abbr-table td, [data-theme="dark"] .term-table td {
  border-color: var(--c-line);
  color: var(--c-charcoal);
}
[data-theme="dark"] .abbr-table tr:hover td, [data-theme="dark"] .term-table tr:hover td {
  background-color: #2a2a2a;
}
/* -------------------------------------------------------------
   18. INSTRUCTIONS / STEP CARDS
------------------------------------------------------------- */
.steps-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.step-card {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  transition: all 0.3s ease;
}
.step-card:hover {
  border-color: transparent;
  box-shadow: none;
}

.step-card__body {
  flex: none;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  background: var(--c-white);
  border: 1px solid var(--c-line);
  border-radius: 16px;
  padding: 2rem;
  transition: all 0.3s ease;
}
.step-card:hover .step-card__body {
  border-color: var(--c-sage);
  box-shadow: 0 4px 25px rgba(0,0,0,0.04);
}

.step-card__media {
  flex: none;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: var(--c-white);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--c-line);
  padding: 0.75rem; /* Creates a frame effect */
  transition: all 0.3s ease;
}
.step-card:hover .step-card__media {
  border-color: var(--c-sage);
  box-shadow: 0 4px 25px rgba(0,0,0,0.04);
}
.step-card__media img {
  width: 100%;
  height: auto;
  max-height: 500px;
  border-radius: 10px;
  object-fit: cover;
  aspect-ratio: 16/9;
  transition: transform 0.5s ease;
}
.step-card:hover .step-card__media img {
  transform: scale(1.02);
}

.step-card__badge {
  background: var(--c-cream);
  color: var(--c-terracotta);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  display: inline-block;
}

.step-card__title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--c-charcoal);
  margin: 0.5rem 0 0.8rem;
}

.step-card__text {
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--c-charcoal-soft);
}
.step-card__text p:last-child {
  margin-bottom: 0;
}

/* Progress Tracker Overrides */
.step-card.is-completed {
  opacity: 0.55;
  filter: grayscale(80%);
}
.step-card.is-completed .step-card__title {
  text-decoration: line-through;
  color: var(--c-sage);
}

@media print {
        .site-header, .site-footer-new, .sidebar, .editorial-credit, .author-box, .comments-area, .pattern-card__actions, .top-bar, .pattern-tracker-btn { display: none !important; }
        body { background: white !important; color: black !important; }
        .pattern-card { box-shadow: none !important; border: none !important; }
        h2, h3 { page-break-after: avoid; }
        .pattern-step { page-break-inside: avoid; }
}

/* -------------------------------------------------------------
   15. ADVANCED FEATURES (Progress, Wishlist, Calculator)
------------------------------------------------------------- */
/* Reading Progress Bar */
#reading-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--c-sage), var(--c-terracotta));
    width: 0%;
    z-index: 9999;
    transition: width 0.1s ease-out;
}

/* Drawers & Overlays */
.wishlist-drawer, .calc-drawer {
    position: fixed;
    top: 0;
    right: -400px;
    width: 100%;
    max-width: 400px;
    height: 100vh;
    background: #fff;
    box-shadow: -5px 0 30px rgba(0,0,0,0.1);
    z-index: 10000;
    transition: right 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
}
.wishlist-drawer.open, .calc-drawer.open {
    right: 0;
}
.wishlist-overlay, .calc-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.wishlist-overlay.open, .calc-overlay.open {
    opacity: 1;
    visibility: visible;
}
.wishlist-drawer__header, .calc-drawer__header {
    padding: 1.5rem;
    background: #fdfaf5;
    border-bottom: 1px solid #efe9df;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.wishlist-drawer__header h3, .calc-drawer__header h3 {
    margin: 0;
    color: var(--c-charcoal);
    font-size: 1.25rem;
}
.wishlist-drawer__content, .calc-drawer__content {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}
#wishlist-close-btn, #calc-close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--c-charcoal);
}

/* Saved Pattern Item */
.saved-pattern-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f0f0f0;
    align-items: center;
}
.saved-pattern-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
}
.saved-pattern-item h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
}
.saved-pattern-item h4 a {
    color: var(--c-charcoal);
    text-decoration: none;
}
.remove-saved-btn {
    background: none;
    border: none;
    color: #e53e3e;
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

/* Calculator specific */
.stitch-counter-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 12px;
}
.stitch-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--c-terracotta);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(216, 118, 89, 0.3);
}
.stitch-count {
    font-size: 3rem;
    font-weight: 800;
    color: var(--c-charcoal);
    font-variant-numeric: tabular-nums;
    min-width: 80px;
    text-align: center;
}
.save-btn.saved {
    color: red !important;
}
.save-btn.saved svg {
    fill: red;
}

/* -------------------------------------------------------------
   16. MODERN MINIMALIST (Terminology Overrides)
------------------------------------------------------------- */
/* Terminology Tables Premium Style */
details.glossary {
    background: linear-gradient(145deg, #f9fbf9 0%, #fdfcf9 100%);
    border: 1px solid #e2e8e4;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 10px 30px rgba(138, 176, 149, 0.1);
    transition: all 0.3s ease;
}
details.glossary:hover {
    box-shadow: 0 15px 40px rgba(138, 176, 149, 0.15);
}
details.glossary summary {
    font-family: var(--font-display);
    font-size: 1.6rem;
    color: var(--c-sage);
    cursor: pointer;
    font-weight: 700;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
details.glossary summary::-webkit-details-marker {
    display: none;
}
details.glossary summary::before {
    content: '🔖';
    font-size: 1.4rem;
}

/* iOS Style Toggle */
.term-toggle {
    display: inline-flex;
    background: #e9ecea;
    padding: 4px;
    border-radius: 50px;
    margin: 1.5rem 0;
}
.term-toggle button {
    background: transparent;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--c-charcoal-soft);
    cursor: pointer;
    transition: all 0.2s ease;
}
.term-toggle button[aria-pressed="true"] {
    background: #ffffff;
    color: var(--c-sage);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Premium Table */
.term-table, .abbr-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8e4;
}
.term-table th, .abbr-table th {
    background: var(--c-sage) !important;
    color: #ffffff !important;
    font-family: var(--font-display);
    font-size: 1.1rem;
    padding: 1.2rem 1rem !important;
    text-transform: capitalize;
    letter-spacing: 0.02em;
    font-weight: 600;
}
.term-table td, .abbr-table td {
    font-family: var(--font-body);
    font-size: 1.05rem;
    color: var(--c-charcoal);
    padding: 1.2rem 1rem !important;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}
.term-table tr:last-child td, .abbr-table tr:last-child td {
    border-bottom: none;
}
.term-table tbody tr:hover, .abbr-table tbody tr:hover {
    background: #fdfdfd;
}
/* Highlight active column slightly */
td[data-term-col] {
    transition: all 0.3s ease;
}

/* Terminology Note */
.term-note {
    justify-content: space-between;
    align-items: center;
}
.wishlist-drawer__header h3, .calc-drawer__header h3 {
    margin: 0;
    color: var(--c-charcoal);
    font-size: 1.25rem;
}
.wishlist-drawer__content, .calc-drawer__content {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}
#wishlist-close-btn, #calc-close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--c-charcoal);
}

/* Saved Pattern Item */
.saved-pattern-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f0f0f0;
    align-items: center;
}
.saved-pattern-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
}
.saved-pattern-item h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
}
.saved-pattern-item h4 a {
    color: var(--c-charcoal);
    text-decoration: none;
}
.remove-saved-btn {
    background: none;
    border: none;
    color: #e53e3e;
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

/* Calculator specific */
.stitch-counter-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 12px;
}
.stitch-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--c-terracotta);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(216, 118, 89, 0.3);
}
.stitch-count {
    font-size: 3rem;
    font-weight: 800;
    color: var(--c-charcoal);
    font-variant-numeric: tabular-nums;
    min-width: 80px;
    text-align: center;
}
.save-btn.saved {
    color: red !important;
}
.save-btn.saved svg {
    fill: red;
}

/* -------------------------------------------------------------
   16. MODERN MINIMALIST (Terminology Overrides)
------------------------------------------------------------- */
/* Terminology Tables Premium Style */
details.glossary {
    background: linear-gradient(145deg, #f9fbf9 0%, #fdfcf9 100%);
    border: 1px solid #e2e8e4;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 10px 30px rgba(138, 176, 149, 0.1);
    transition: all 0.3s ease;
}
details.glossary:hover {
    box-shadow: 0 15px 40px rgba(138, 176, 149, 0.15);
}
details.glossary summary {
    font-family: var(--font-display);
    font-size: 1.6rem;
    color: var(--c-sage);
    cursor: pointer;
    font-weight: 700;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
details.glossary summary::-webkit-details-marker {
    display: none;
}
details.glossary summary::before {
    content: '🔖';
    font-size: 1.4rem;
}

/* iOS Style Toggle */
.term-toggle {
    display: inline-flex;
    background: #e9ecea;
    padding: 4px;
    border-radius: 50px;
    margin: 1.5rem 0;
}
.term-toggle button {
    background: transparent;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--c-charcoal-soft);
    cursor: pointer;
    transition: all 0.2s ease;
}
.term-toggle button[aria-pressed="true"] {
    background: #ffffff;
    color: var(--c-sage);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Premium Table */
.term-table, .abbr-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8e4;
}
.term-table th, .abbr-table th {
    background: var(--c-sage) !important;
    color: #ffffff !important;
    font-family: var(--font-display);
    font-size: 1.1rem;
    padding: 1.2rem 1rem !important;
    text-transform: capitalize;
    letter-spacing: 0.02em;
    font-weight: 600;
}
.term-table td, .abbr-table td {
    font-family: var(--font-body);
    font-size: 1.05rem;
    color: var(--c-charcoal);
    padding: 1.2rem 1rem !important;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}
.term-table tr:last-child td, .abbr-table tr:last-child td {
    border-bottom: none;
}
.term-table tbody tr:hover, .abbr-table tbody tr:hover {
    background: #fdfdfd;
}
/* Highlight active column slightly */
td[data-term-col] {
    transition: all 0.3s ease;
}

/* Terminology Note */
.term-note {
    background: #fff8f5;
    border-left: 4px solid var(--c-terracotta);
    padding: 1rem 1.5rem;
    border-radius: 0 8px 8px 0;
    margin-top: 1.5rem;
    font-style: italic;
    color: var(--c-charcoal-soft);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* -------------------------------------------------------------
   17. PREMIUM PATTERN SPECS
------------------------------------------------------------- */
/* Head Area */
.pattern-card__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding-bottom: 2rem;
    margin-bottom: 2.5rem;
    border-bottom: 2px solid #f0f0f0;
}
.pattern-card__label {
    color: var(--c-sage);
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 0.5rem;
}
.pattern-card__title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    color: var(--c-charcoal);
    margin: 0 0 0.5rem 0;
    line-height: 1.1;
    letter-spacing: -0.02em;
}
.pattern-card__tested {
    display: inline-block;
    background: #eef5f0;
    color: var(--c-sage);
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
}

/* Print Button */
.pattern-card__actions .btn {
    background: #ffffff;
    color: var(--c-charcoal);
    border: 1px solid #e0e0e0;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    border-radius: 8px;
    padding: 0.8rem 1.2rem;
}
.pattern-card__actions .btn:hover {
    background: #fdfdfd;
    border-color: var(--c-charcoal);
}

/* Specs Grid */
.pattern-specs {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
    gap: 2rem 1.5rem !important;
    background: #fdfaf5 !important;
    border: 1px solid #efe9df !important;
    border-radius: 12px !important;
    padding: 2.5rem !important;
    margin-bottom: 4rem !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02) !important;
}
.pattern-specs li {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.pattern-specs dt, .spec-label {
    color: var(--c-sage) !important;
    font-size: 0.75rem !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.15em !important;
    margin-bottom: 0 !important;
}
.pattern-specs .spec-value, .pattern-specs dd {
    font-family: var(--font-body) !important;
    font-size: 1.15rem !important;
    color: var(--c-charcoal) !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    margin: 0 !important;
}

/* Skill Level Fix */
.pattern-specs li:first-child dd > div {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem !important;
}
.pattern-specs li:first-child dd > div span:first-child {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}
.pattern-specs li:first-child dd > div svg {
    width: 14px;
    height: 14px;
    display: block;
}
