/*
Theme Name: Miniature Masterminds Learning Hub
Theme URI: https://www.miniaturemasterminds.com/
Author: Miniature Masterminds
Description: A bright, kid-friendly WordPress theme for homeschool resources, printables, curriculum, online learning, educational games, books, and activities.
Version: 1.7.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: miniature-masterminds
Tags: education, blog, custom-logo, custom-menu, featured-images, grid-layout, accessibility-ready
*/

:root {
  --mm-blue: #1265a8;
  --mm-blue-dark: #0c4c83;
  --mm-sky: #eaf8ff;
  --mm-green: #45a851;
  --mm-pink: #f24f8f;
  --mm-purple: #8c55e8;
  --mm-orange: #ff7a22;
  --mm-yellow: #ffc94a;
  --mm-teal: #2aa7ad;
  --mm-ink: #15324a;
  --mm-muted: #5d6d79;
  --mm-paper: #ffffff;
  --mm-line: #dcebf4;
  --mm-radius: 22px;
  --mm-shadow: 0 10px 30px rgba(29, 78, 113, .10);
  --mm-content: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--mm-ink);
  background: #f8fcff;
  font-family: ui-rounded, "Arial Rounded MT Bold", "Trebuchet MS", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}
img { max-width: 100%; height: auto; }
a { color: var(--mm-blue); text-decoration: none; }
a:hover { color: var(--mm-pink); }
button, input, select, textarea { font: inherit; }
.screen-reader-text { position:absolute!important; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.screen-reader-text:focus { clip:auto!important; width:auto; height:auto; margin:8px; padding:10px 14px; background:#fff; color:#111; z-index:100000; }

.mm-wrap { width: min(calc(100% - 32px), var(--mm-content)); margin-inline: auto; }
.mm-section { padding: 54px 0; }
.mm-section--soft { background: #eef9ff; }
.mm-section-head { display:flex; align-items:end; justify-content:space-between; gap:20px; margin-bottom:24px; }
.mm-kicker { margin:0 0 6px; color:var(--mm-pink); font-weight:900; text-transform:uppercase; letter-spacing:.08em; font-size:.8rem; }
h1,h2,h3,h4 { line-height:1.15; margin-top:0; }
h1 { font-size:clamp(2.2rem, 4vw, 4.8rem); }
h2 { font-size:clamp(1.75rem, 3vw, 2.8rem); }
h3 { font-size:1.25rem; }

.mm-topbar { background:#fff; border-bottom:1px solid var(--mm-line); }
.mm-topbar__inner { min-height:42px; display:flex; align-items:center; justify-content:center; gap:16px; font-size:.9rem; text-align:center; }
.mm-topbar__message { color:var(--mm-muted); font-weight:700; }

.mm-brand { background:linear-gradient(180deg,#eaf8ff 0,#f8fcff 100%); }
.mm-brand__inner { display:flex; align-items:center; justify-content:flex-start; padding:10px 0; min-height:88px; }
.mm-site-identity { display:flex; gap:18px; align-items:center; min-width:0; }
.custom-logo-link img { max-height:76px; width:auto; display:block; }
.mm-fallback-logo { display:inline-block; font-size:clamp(2rem,4vw,4.4rem); line-height:.9; font-weight:1000; letter-spacing:-.055em; color:#2d1c1c; }
.mm-fallback-logo span { display:block; color:var(--mm-blue); font-size:.4em; letter-spacing:.14em; text-transform:uppercase; margin-top:10px; }

.mm-mainnav { background:var(--mm-blue); position:sticky; top:0; z-index:50; box-shadow:0 4px 14px rgba(4,55,94,.16); }
.mm-nav-inner { width:min(calc(100% - 32px), 1480px); min-height:56px; display:flex; align-items:center; gap:8px; flex-wrap:nowrap; }
.mm-menu-toggle { display:none; border:0; background:#fff; color:var(--mm-blue-dark); border-radius:12px; padding:9px 13px; font-weight:900; cursor:pointer; }
.mm-mainnav ul { margin:0; padding:0; list-style:none; display:flex; align-items:center; flex-wrap:nowrap; gap:0; white-space:nowrap; }
.mm-mainnav .menu { flex:1 1 auto; min-width:0; overflow-x:auto; overflow-y:visible; scrollbar-width:none; -ms-overflow-style:none; }
.mm-mainnav .menu::-webkit-scrollbar { display:none; }
.mm-mainnav li { position:relative; }
.mm-mainnav a { display:block; padding:15px 8px; color:#fff; font-weight:850; font-size:.84rem; border-radius:9px; }
.mm-mainnav a:hover, .mm-mainnav .current-menu-item > a, .mm-mainnav .current_page_item > a { background:rgba(255,255,255,.16); color:#fff; }
.mm-mainnav .sub-menu { display:none; position:absolute; top:100%; left:0; min-width:235px; padding:8px; background:#fff; border-radius:14px; box-shadow:var(--mm-shadow); }
.mm-mainnav .sub-menu a { color:var(--mm-ink); padding:10px 12px; }
.mm-mainnav li:hover > .sub-menu, .mm-mainnav li:focus-within > .sub-menu { display:block; }
.mm-nav-search { margin-left:auto; flex:0 0 210px; min-width:180px; }
.mm-nav-search form { display:flex; background:#fff; border-radius:999px; overflow:hidden; }
.mm-nav-search input[type="search"] { min-width:0; width:100%; padding:9px 13px; border:0; outline:0; }
.mm-nav-search button { width:42px; border:0; cursor:pointer; background:var(--mm-green); color:#fff; font-weight:900; }

.mm-gradebar { background:#fff; border-bottom:1px solid var(--mm-line); }
.mm-grade-grid { display:grid; grid-template-columns:repeat(8,minmax(104px,1fr)); gap:10px; padding:18px 0; overflow-x:auto; }
.mm-grade { min-width:94px; text-align:center; padding:12px 8px 10px; border-radius:16px; color:var(--mm-ink); font-weight:900; border:2px solid rgba(0,0,0,.03); transition:.18s ease; }
.mm-grade:hover { transform:translateY(-3px); box-shadow:var(--mm-shadow); color:var(--mm-ink); }
.mm-grade__bubble { width:52px; height:52px; margin:0 auto 7px; border-radius:50%; background:rgba(255,255,255,.7); display:grid; place-items:center; font-size:1.32rem; }
.mm-grade__mascot { width:72px; height:72px; margin:0 auto 6px; display:grid; place-items:end center; overflow:hidden; }
.mm-grade__mascot img { width:100%; height:100%; object-fit:contain; display:block; }
.mm-grade__label { display:block; line-height:1.15; }
.mm-grade:nth-child(8n+1){background:#fff1df}.mm-grade:nth-child(8n+2){background:#ffe4e6}.mm-grade:nth-child(8n+3){background:#e1f6df}.mm-grade:nth-child(8n+4){background:#fff0bc}.mm-grade:nth-child(8n+5){background:#efe1ff}.mm-grade:nth-child(8n+6){background:#dff6ff}.mm-grade:nth-child(8n+7){background:#ffe0f2}.mm-grade:nth-child(8n+8){background:#e7f5c9}

.mm-hero { position:relative; overflow:hidden; background:linear-gradient(180deg,#dff6ff 0%,#f7fcff 60%,#eaf9e1 100%); }
.mm-hero::before, .mm-hero::after { content:""; position:absolute; border-radius:50%; filter:blur(1px); opacity:.45; }
.mm-hero::before { width:420px; height:420px; left:-150px; bottom:-260px; background:#8bc96d; }
.mm-hero::after { width:520px; height:520px; right:-220px; top:-300px; background:#9bdcf7; }
.mm-hero__inner { position:relative; z-index:1; display:grid; grid-template-columns:minmax(0,1.15fr) minmax(300px,.85fr); gap:54px; align-items:center; min-height:470px; padding:62px 0; }
.mm-hero__copy h1 { color:#0d4e91; margin-bottom:18px; }
.mm-hero__copy p { font-size:1.12rem; max-width:700px; color:#3d596c; }
.mm-checks { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px 16px; margin:24px 0 28px; padding:0; list-style:none; }
.mm-checks li::before { content:"✓"; display:inline-grid; place-items:center; width:23px; height:23px; margin-right:8px; border-radius:50%; background:#e2f7e1; color:#258135; font-weight:1000; }
.mm-actions { display:flex; flex-wrap:wrap; gap:12px; }
.mm-btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; padding:13px 20px; border-radius:999px; font-weight:950; border:2px solid transparent; transition:.18s ease; }
.mm-btn:hover { transform:translateY(-2px); }
.mm-btn--primary { background:var(--mm-pink); color:#fff; box-shadow:0 8px 18px rgba(242,79,143,.25); }
.mm-btn--primary:hover { color:#fff; background:#dd3679; }
.mm-btn--secondary { background:#fff; color:var(--mm-blue); border-color:#bddff0; }
.mm-hero__scene { position:relative; min-height:330px; display:grid; place-items:center; }
.mm-hero__main-art { width:min(100%,520px); max-height:390px; object-fit:contain; display:block; filter:drop-shadow(0 18px 24px rgba(31,96,128,.16)); }
.mm-scene-card { width:min(100%,430px); background:rgba(255,255,255,.88); border:3px solid #fff; border-radius:32px; box-shadow:0 20px 45px rgba(31,96,128,.18); padding:26px; transform:rotate(1deg); }
.mm-scene-card__title { text-align:center; font-size:1.25rem; font-weight:950; margin-bottom:18px; }
.mm-scene-icons { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; }
.mm-scene-icons span { aspect-ratio:1; display:grid; place-items:center; border-radius:22px; font-size:2.1rem; background:#f7fbff; border:1px solid var(--mm-line); overflow:hidden; }
.mm-scene-icons img { width:78%; height:78%; object-fit:contain; display:block; }

.mm-resource-grid { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:16px; }
.mm-resource-card { background:#fff; border:1px solid var(--mm-line); border-radius:var(--mm-radius); padding:20px; box-shadow:0 5px 18px rgba(35,95,130,.07); display:flex; flex-direction:column; min-height:100%; }
.mm-resource-card__art { aspect-ratio:16/10; border-radius:16px; display:grid; place-items:center; font-size:3rem; margin-bottom:14px; overflow:hidden; background:linear-gradient(135deg,#e9f8ff,#fff4d8); }
.mm-resource-card__art img { width:100%; height:100%; object-fit:contain; padding:8px; display:block; }
.mm-resource-card__fallback { font-size:3rem; line-height:1; }
.mm-resource-card h3 { margin-bottom:8px; }
.mm-resource-card p { color:var(--mm-muted); font-size:.93rem; margin-top:0; flex:1; }
.mm-card-link { font-weight:950; color:var(--mm-blue); }
.mm-card-link::after { content:" →"; }

.mm-dashboard { display:grid; grid-template-columns:1.2fr .9fr .9fr; gap:22px; }
.mm-panel { background:#fff; border:1px solid var(--mm-line); border-radius:24px; padding:22px; box-shadow:var(--mm-shadow); }
.mm-panel h2 { font-size:1.4rem; display:flex; align-items:center; gap:9px; margin-bottom:16px; }
.mm-featured-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:13px; }
.mm-mini-card { border:1px solid var(--mm-line); border-radius:16px; overflow:hidden; background:#fff; }
.mm-mini-card img, .mm-mini-placeholder { width:100%; aspect-ratio:16/9; object-fit:cover; display:block; background:#eaf7ff; }
.mm-mini-placeholder { display:grid; place-items:center; font-size:2rem; }
.mm-mini-card__body { padding:11px 12px 13px; }
.mm-mini-card h3 { font-size:.96rem; margin:0; }
.mm-subject-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:10px; }
.mm-subject-chip { min-height:118px; padding:10px 8px 12px; border-radius:14px; text-align:center; background:#f5fbff; border:1px solid var(--mm-line); font-weight:900; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:5px; transition:.18s ease; }
.mm-subject-chip:hover { transform:translateY(-2px); box-shadow:0 6px 16px rgba(35,95,130,.10); }
.mm-subject-chip__icon { width:64px; height:64px; display:grid; place-items:center; }
.mm-subject-chip__icon img { width:100%; height:100%; object-fit:contain; display:block; }
.mm-subject-chip__icon > span { font-size:2rem; line-height:1; }
.mm-subject-chip__label { line-height:1.12; font-size:.88rem; }
.mm-news-list { display:grid; gap:13px; }
.mm-news-item { display:grid; grid-template-columns:74px 1fr; gap:12px; align-items:center; }
.mm-news-item img, .mm-news-thumb { width:74px; height:60px; object-fit:cover; border-radius:12px; background:#eef8ff; }
.mm-news-item h3 { font-size:.92rem; margin:0 0 3px; }
.mm-news-item time { font-size:.78rem; color:var(--mm-muted); }

.mm-content-shell { padding:44px 0 64px; }
.mm-layout { display:grid; grid-template-columns:minmax(0,1fr) 320px; gap:34px; align-items:start; }
.mm-main-card, .mm-sidebar .widget { background:#fff; border:1px solid var(--mm-line); border-radius:22px; box-shadow:var(--mm-shadow); }
.mm-main-card { padding:clamp(20px,4vw,42px); }
.mm-entry-header { margin-bottom:24px; }
.mm-entry-title { margin-bottom:8px; }
.mm-entry-meta { color:var(--mm-muted); font-size:.9rem; }
.mm-entry-content > *:first-child { margin-top:0; }
.mm-entry-content a { text-decoration:underline; text-decoration-thickness:1.5px; text-underline-offset:2px; }
.mm-entry-content img { border-radius:14px; }
.mm-entry-content .wp-block-button__link { text-decoration:none; }
.mm-sidebar { display:grid; gap:18px; }
.mm-sidebar .widget { padding:20px; }
.mm-sidebar .widget-title { font-size:1.15rem; }

.mm-archive-head { padding:42px 0 10px; text-align:center; }
.mm-archive-head p { max-width:720px; margin-inline:auto; color:var(--mm-muted); }
.mm-post-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:22px; padding:28px 0 60px; }
.mm-post-card { background:#fff; border:1px solid var(--mm-line); border-radius:22px; overflow:hidden; box-shadow:0 6px 22px rgba(35,95,130,.08); }
.mm-post-card__thumb { aspect-ratio:16/10; overflow:hidden; background:#eaf8ff; }
.mm-post-card__thumb img { width:100%; height:100%; object-fit:cover; transition:transform .25s ease; }
.mm-post-card:hover .mm-post-card__thumb img { transform:scale(1.025); }
.mm-post-card__body { padding:18px; }
.mm-post-card__body h2 { font-size:1.25rem; margin-bottom:8px; }
.mm-post-card__meta { color:var(--mm-muted); font-size:.82rem; margin-bottom:8px; }
.mm-post-card__excerpt { color:var(--mm-muted); font-size:.94rem; }
.navigation.pagination { grid-column:1/-1; }
.nav-links { display:flex; justify-content:center; flex-wrap:wrap; gap:8px; }
.page-numbers { min-width:42px; height:42px; display:grid; place-items:center; border-radius:12px; background:#fff; border:1px solid var(--mm-line); font-weight:900; }
.page-numbers.current { background:var(--mm-blue); color:#fff; }

.mm-search-hero { background:#eef9ff; padding:34px 0; text-align:center; }
.mm-search-large { max-width:700px; margin:20px auto 0; }
.mm-search-large form { display:flex; background:#fff; border:2px solid #bfe1f1; border-radius:999px; overflow:hidden; box-shadow:var(--mm-shadow); }
.mm-search-large input { flex:1; min-width:0; border:0; padding:14px 18px; outline:0; }
.mm-search-large button { border:0; background:var(--mm-green); color:#fff; padding:0 22px; font-weight:900; cursor:pointer; }

.mm-footer { background:#0c4d7d; color:#dceffd; margin-top:40px; }
.mm-footer a { color:#fff; }
.mm-footer__grid { display:grid; grid-template-columns:1.25fr repeat(3,1fr); gap:34px; padding:48px 0 34px; }
.mm-footer h2, .mm-footer h3 { color:#fff; }
.mm-footer ul { list-style:none; padding:0; margin:0; }
.mm-footer li { margin:7px 0; }
.mm-footer__bottom { border-top:1px solid rgba(255,255,255,.18); padding:18px 0; display:flex; justify-content:space-between; gap:18px; flex-wrap:wrap; font-size:.86rem; }

@media (max-width:1080px) {
  .mm-resource-grid { grid-template-columns:repeat(3,1fr); }
  .mm-dashboard { grid-template-columns:1fr 1fr; }
  .mm-dashboard .mm-panel:first-child { grid-column:1/-1; }
  .mm-layout { grid-template-columns:1fr; }
  .mm-sidebar { grid-template-columns:repeat(2,1fr); }
  .mm-footer__grid { grid-template-columns:repeat(2,1fr); }
}
@media (max-width:820px) {
  .mm-topbar__message { display:none; }
  .mm-topbar__inner { justify-content:flex-end; }
  .mm-menu-toggle { display:inline-block; }
  .mm-nav-inner { width:min(calc(100% - 24px), var(--mm-content)); padding:8px 0; flex-wrap:wrap; }
  .mm-mainnav .menu { display:none; width:100%; order:3; flex-direction:column; align-items:stretch; overflow:visible; white-space:normal; }
  .mm-mainnav.is-open .menu { display:flex; }
  .mm-mainnav li { width:100%; }
  .mm-mainnav a { padding:11px 13px; }
  .mm-mainnav .sub-menu { display:block; position:static; box-shadow:none; padding-left:18px; background:rgba(255,255,255,.08); }
  .mm-mainnav .sub-menu a { color:#fff; }
  .mm-nav-search { flex:1; min-width:180px; }
  .mm-hero__inner { grid-template-columns:1fr; gap:24px; padding:48px 0; }
  .mm-hero__scene { min-height:auto; }
  .mm-checks { grid-template-columns:1fr; }
  .mm-post-grid { grid-template-columns:repeat(2,1fr); }
}
@media (max-width:620px) {
  .mm-wrap { width:min(calc(100% - 22px),var(--mm-content)); }
  .mm-brand__inner { padding:10px 0; min-height:74px; justify-content:flex-start; }
  .custom-logo-link img { max-height:64px; }
  .mm-fallback-logo { font-size:2.4rem; }
  .mm-grade-grid { grid-template-columns:repeat(8,92px); }
  .mm-resource-grid, .mm-dashboard, .mm-post-grid, .mm-sidebar, .mm-footer__grid { grid-template-columns:1fr; }
  .mm-dashboard .mm-panel:first-child { grid-column:auto; }
  .mm-featured-grid { grid-template-columns:1fr 1fr; }
  .mm-section { padding:38px 0; }
  .mm-scene-card { padding:18px; }
  .mm-footer__bottom { flex-direction:column; }
}

/* Enhanced resource archives */
.mm-archive-shell { padding: 34px 0 70px; }
.mm-archive-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0,1.35fr) minmax(300px,.65fr);
  gap: 34px;
  align-items: center;
  padding: clamp(28px,4vw,48px);
  margin-bottom: 30px;
  border: 1px solid #cfe9f5;
  border-radius: 30px;
  background: linear-gradient(135deg,#e9f9ff 0%,#fff8e8 54%,#f2ecff 100%);
  box-shadow: var(--mm-shadow);
}
.mm-archive-hero::before,
.mm-archive-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.mm-archive-hero::before { width: 190px; height: 190px; right: -74px; top: -88px; background: rgba(255,201,74,.22); }
.mm-archive-hero::after { width: 150px; height: 150px; left: -60px; bottom: -85px; background: rgba(80,191,225,.16); }
.mm-archive-hero__copy,
.mm-archive-hero__search { position: relative; z-index: 1; }
.mm-archive-hero h1 { font-size: clamp(2.2rem,4vw,4rem); color: var(--mm-blue-dark); margin-bottom: 12px; }
.mm-archive-description { max-width: 760px; color: var(--mm-muted); font-size: 1.02rem; }
.mm-archive-description p { margin: 0; }
.mm-archive-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.mm-archive-stats span { padding: 8px 12px; border-radius: 999px; background: rgba(255,255,255,.82); border: 1px solid #d9ebf4; color: #496271; font-size: .86rem; font-weight: 750; }
.mm-archive-stats strong { color: var(--mm-blue-dark); }
.mm-archive-hero__search { padding: 22px; border-radius: 22px; background: rgba(255,255,255,.88); border: 1px solid #dcecf4; box-shadow: 0 10px 24px rgba(32,95,130,.08); }
.mm-archive-hero__search h2 { margin-bottom: 7px; font-size: 1.3rem; color: var(--mm-ink); }
.mm-archive-hero__search p { margin: 0 0 14px; color: var(--mm-muted); font-size: .9rem; }
.mm-archive-hero__search .search-form,
.mm-sidebar-search .search-form,
.mm-empty-state .search-form { display:flex; overflow:hidden; background:#fff; border:2px solid #cbe5f1; border-radius:999px; }
.mm-archive-hero__search .search-field,
.mm-sidebar-search .search-field,
.mm-empty-state .search-field { width:100%; min-width:0; border:0; outline:0; padding:11px 14px; background:transparent; }
.mm-archive-hero__search .search-submit,
.mm-sidebar-search .search-submit,
.mm-empty-state .search-submit { border:0; padding: 0 16px; background:var(--mm-green); color:#fff; font-weight:900; cursor:pointer; }

.mm-archive-layout { display:grid; grid-template-columns:minmax(0,1fr) 330px; gap:30px; align-items:start; }
.mm-archive-main { min-width:0; }
.mm-archive-toolbar { display:flex; justify-content:space-between; align-items:center; gap:18px; margin-bottom:18px; padding:15px 18px; background:#fff; border:1px solid var(--mm-line); border-radius:18px; box-shadow:0 5px 18px rgba(35,95,130,.05); }
.mm-archive-toolbar__label { display:block; margin-bottom:2px; color:var(--mm-muted); font-size:.74rem; font-weight:900; letter-spacing:.08em; text-transform:uppercase; }
.mm-archive-all-link { font-size:.9rem; font-weight:900; white-space:nowrap; }
.mm-post-grid--archive { grid-template-columns:repeat(2,minmax(0,1fr)); padding:0; gap:20px; }
.mm-post-card { display:flex; flex-direction:column; min-width:0; transition:transform .18s ease, box-shadow .18s ease; }
.mm-post-card:hover { transform:translateY(-3px); box-shadow:0 12px 28px rgba(35,95,130,.13); }
.mm-post-card__body { display:flex; flex-direction:column; flex:1; }
.mm-post-card__topline { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:9px; }
.mm-post-card__category { display:inline-flex; width:max-content; max-width:68%; padding:5px 9px; border-radius:999px; background:#e8f7ff; color:var(--mm-blue-dark); font-size:.72rem; line-height:1.1; font-weight:950; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mm-post-card__date { flex:0 0 auto; color:#7d8d98; font-size:.73rem; }
.mm-post-card__body h2 { font-size:1.18rem; }
.mm-post-card__body h2 a { color:var(--mm-ink); }
.mm-post-card__body h2 a:hover { color:var(--mm-pink); }
.mm-post-card__excerpt { flex:1; }
.mm-card-link--button { display:inline-flex; width:max-content; margin-top:10px; padding:8px 13px; border-radius:999px; background:#eff8ff; }
.mm-card-placeholder { width:100%; height:100%; min-height:180px; display:grid; place-items:center; padding:20px; background:linear-gradient(135deg,#dff5ff,#fff2ca); }
.mm-card-placeholder span { padding:9px 14px; border-radius:999px; background:rgba(255,255,255,.85); color:var(--mm-blue-dark); font-size:.83rem; font-weight:900; }
.mm-pagination-wrap { margin-top:26px; }
.mm-pagination-wrap .navigation.pagination { margin:0; }
.mm-pagination-wrap .page-numbers { box-shadow:0 4px 12px rgba(35,95,130,.06); }
.mm-pagination-wrap a.page-numbers:hover { background:#e9f7ff; color:var(--mm-blue-dark); }
.mm-empty-state { text-align:center; padding:50px 28px; background:#fff; border:1px solid var(--mm-line); border-radius:24px; box-shadow:var(--mm-shadow); }
.mm-empty-state .search-form { max-width:560px; margin:20px auto 0; }

/* Resource sidebar */
.mm-resource-sidebar { position:sticky; top:78px; align-self:start; }
.mm-sidebar-card { overflow:hidden; }
.mm-resource-sidebar .widget { padding:20px; }
.mm-resource-sidebar .widget p { color:var(--mm-muted); }
.mm-sidebar-eyebrow { margin:0 0 4px!important; color:var(--mm-pink)!important; font-size:.72rem; font-weight:950; letter-spacing:.09em; text-transform:uppercase; }
.mm-resource-sidebar .widget-title { margin-bottom:10px; color:var(--mm-blue-dark); font-size:1.18rem; }
.mm-sidebar-search { background:linear-gradient(155deg,#eefaff,#fff)!important; }
.mm-sidebar-grade-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:7px; }
.mm-sidebar-grade-grid a { min-height:42px; display:grid; place-items:center; padding:7px 5px; border-radius:12px; background:#f0f8fc; border:1px solid #dbeaf2; color:var(--mm-blue-dark); font-size:.82rem; font-weight:950; }
.mm-sidebar-grade-grid a:hover { background:#dff4ff; transform:translateY(-1px); }
.mm-sidebar-grade-grid .mm-sidebar-grade-wide { grid-column:span 2; }
.mm-sidebar-link-list { display:grid; gap:6px; }
.mm-sidebar-link-list a { display:flex; justify-content:space-between; align-items:center; padding:9px 11px; border-radius:12px; color:var(--mm-ink); background:#f8fcff; border:1px solid #e4eff5; font-weight:850; }
.mm-sidebar-link-list a:nth-child(2n) { background:#fffaf0; }
.mm-sidebar-link-list a:hover { border-color:#b9ddeb; color:var(--mm-blue); transform:translateX(2px); }
.mm-sidebar-link-list b { color:var(--mm-pink); font-size:1.2rem; }
.mm-sidebar-more { display:inline-block; margin-top:12px; font-size:.86rem; font-weight:950; }
.mm-sidebar-type-links { display:grid; gap:9px; }
.mm-sidebar-type-links a { display:block; padding:11px 12px; border-radius:14px; border:1px solid var(--mm-line); background:linear-gradient(135deg,#fff,#f5fbff); }
.mm-sidebar-type-links strong { display:block; color:var(--mm-blue-dark); font-size:.9rem; }
.mm-sidebar-type-links small { display:block; margin-top:2px; color:var(--mm-muted); font-size:.76rem; }
.mm-sidebar-type-links a:hover { border-color:#b7ddea; box-shadow:0 5px 15px rgba(35,95,130,.06); }
.mm-sidebar-recent { display:grid; gap:10px; }
.mm-sidebar-recent a { display:grid; grid-template-columns:66px minmax(0,1fr); gap:10px; align-items:center; color:var(--mm-ink); }
.mm-sidebar-recent img,
.mm-sidebar-recent__placeholder { width:66px; height:52px; object-fit:cover; border-radius:10px; background:linear-gradient(135deg,#e4f7ff,#fff1cf); display:block; }
.mm-sidebar-recent strong { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; font-size:.82rem; line-height:1.25; }
.mm-sidebar-recent small { display:block; margin-top:3px; color:var(--mm-muted); font-size:.7rem; }
.mm-sidebar-custom-widgets { display:grid; gap:18px; }
.mm-sidebar-custom-widgets > .widget { margin:0; }

@media (max-width:1080px) {
  .mm-archive-layout { grid-template-columns:minmax(0,1fr) 290px; gap:24px; }
  .mm-post-grid--archive { grid-template-columns:1fr; }
  .mm-resource-sidebar { grid-template-columns:1fr; }
}
@media (max-width:880px) {
  .mm-archive-hero { grid-template-columns:1fr; }
  .mm-archive-layout { grid-template-columns:1fr; }
  .mm-resource-sidebar { position:static; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .mm-sidebar-custom-widgets { grid-column:1/-1; grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:620px) {
  .mm-archive-shell { padding-top:18px; }
  .mm-archive-hero { padding:24px 18px; border-radius:22px; }
  .mm-archive-toolbar { align-items:flex-start; flex-direction:column; }
  .mm-post-grid--archive, .mm-resource-sidebar, .mm-sidebar-custom-widgets { grid-template-columns:1fr; }
  .mm-sidebar-grade-grid { grid-template-columns:repeat(4,1fr); }
  .mm-post-card__topline { align-items:flex-start; }
}
