/*
Theme Name: MappleCare Studio
Description: Independent Apple coverage, troubleshooting and community.
Version: 0.2.3
Requires at least: 6.4
Requires PHP: 8.1
License: GNU General Public License v2 or later
Text Domain: mapplecare
*/

:root {
  color-scheme: light;
  --mc-bg-page: #f5f5f8;
  --mc-bg-surface: #fff;
  --mc-bg-subtle: #ebeeea;
  --mc-ink: #13131a;
  --mc-ink-2: #414c46;
  --mc-ink-muted: #515e56;
  --mc-blue: #4235a3;
  --mc-blue-hover: #302375;
  --mc-blue-soft: #edeafc;
  --mc-teal: #4235a3;
  --mc-border: #dedee8;
  --mc-radius-lg: 22px;
  --mc-shadow: none;
  --mc-font-display: "Geist", system-ui, sans-serif;
  --mc-font-mono: ui-monospace, monospace;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--mc-bg-page); color: var(--mc-ink); font: 16px/1.6 var(--mc-font-display); }
a { color: var(--mc-blue); text-underline-offset: .22em; }
a:hover { color: var(--mc-blue-hover); }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid #497cda; outline-offset: 4px; }
img { max-width: 100%; height: auto; vertical-align: middle; }
button, input { font: inherit; }
button { cursor: pointer; }
h1,h2,h3,h4,p { margin-block: 0 .7em; }
h1,h2,h3 { line-height: 1.12; overflow-wrap: anywhere; }
h1,h2 { letter-spacing: -.045em; }
code, pre { font-family: var(--mc-font-mono); }
pre { overflow: auto; padding: 1rem; background: var(--mc-bg-subtle); border-radius: 10px; }
[hidden] { display: none !important; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.studio-skip:focus { z-index: 10; top: 12px; left: 12px; width: auto; height: auto; clip-path: none; background: white; padding: 12px; }
.mc-container { width: min(100% - 48px, 1220px); margin-inline: auto; }
.mc-header { background: var(--mc-bg-page); border-bottom: 1px solid var(--mc-border); }
.mc-header-inner { min-height: 76px; display: flex; gap: 28px; align-items: center; justify-content: space-between; }
.mc-header a, .mc-footer a { text-decoration: none; }
.mc-brand { display: inline-flex; align-items: center; gap: 9px; color: #24203a; font-size: 23px; font-weight: 750; letter-spacing: -.055em; white-space: nowrap; }
.mc-brand img { flex: none; }
.mc-brand-accent { color: #5540aa; }
.mc-brand--inverse { color: #fff; }
.mc-brand--inverse .mc-brand-accent { color: #c4b3ff; }
.mc-nav-list, .mc-footer-links, .mc-sidebar-list { list-style: none; padding: 0; margin: 0; }
.mc-nav-list { display: flex; align-items: center; gap: 8px 22px; flex-wrap: wrap; }
.mc-nav-list a { display: inline-flex; align-items: center; min-height: 44px; color: var(--mc-ink); font-size: .875rem; font-weight: 600; }
.mc-nav-list a:hover { color: var(--mc-blue); }
.mc-menu-toggle { display: none; padding: 8px 14px; min-height: 44px; background: transparent; border: 1px solid var(--mc-border); border-radius: 8px; }
.mc-btn-primary, .mc-btn-dark, .mc-btn-ghost { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; border-radius: 99px; padding: 8px 16px; background: var(--mc-blue); color: white; text-decoration: none; font-size: .875rem; font-weight: 650; }
.mc-btn-primary:hover, .mc-btn-dark:hover, .mc-btn-ghost:hover { background: var(--mc-blue-hover); color: white; }
.mc-main { padding-block: 28px 84px; }
.studio-hero { position: relative; isolation: isolate; overflow: hidden; min-height: 510px; display: grid; align-items: center; background: #edebf8; border: 1px solid #d0dccf; border-radius: 32px; padding: clamp(30px, 6vw, 76px); }
.studio-hero-copy { position: relative; z-index: 1; max-width: 610px; }
.studio-kicker { color: var(--mc-blue-hover); font-size: .77rem; font-weight: 750; letter-spacing: .085em; text-transform: uppercase; }
.studio-hero h1 { font-size: clamp(2.65rem, 6.7vw, 6rem); line-height: .99; font-weight: 720; letter-spacing: -.075em; margin: .16em 0 .25em; }
.studio-hero-copy > p:not(.studio-kicker) { max-width: 40ch; font-size: clamp(1rem, 1.65vw, 1.24rem); color: #2f4539; }
.studio-search { display: flex; width: min(100%, 500px); gap: 5px; padding: 5px; border: 1px solid #668273; border-radius: 16px; background: white; margin-block: 20px 12px; }
.studio-search input { min-width: 0; flex: 1; color: var(--mc-ink); border: 0; border-radius: 9px; padding: 10px 12px; }
.studio-search button { background: #18392d; border: 0; border-radius: 11px; color: white; padding: 8px 14px; min-height: 44px; font-size: .875rem; font-weight: 650; }
.studio-shortcuts { display: flex; flex-wrap: wrap; gap: 0 20px; }
.studio-shortcuts a { min-height: 44px; display: inline-flex; align-items: center; gap: 5px; color: #1c513e; font-size: .875rem; font-weight: 650; }
.studio-section { margin-top: clamp(35px, 6vw, 76px); }
.mc-section-head { display:flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 19px; }
.mc-section-head h2 { margin: 0; font-size: clamp(1.55rem, 3.8vw, 2.65rem); }
.mc-section-head > a { flex-shrink: 0; font-size: .85rem; font-weight: 650; }
.studio-hubs { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 10px; }
.studio-hubs a { display: flex; flex-direction: column; min-width: 0; padding: 20px 16px; color: var(--mc-ink); text-decoration: none; background: white; border: 1px solid var(--mc-border); border-radius: 19px; }
.studio-hubs a:hover, .studio-discussions a:hover { border-color: var(--mc-blue); }
.studio-hub-icon { margin-bottom: 18px; }
.studio-hubs small, .studio-discussions small, .studio-news-list time { color: var(--mc-ink-muted); }
.studio-news { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(0,1fr); gap: 22px; }
.studio-news-list { padding: 6px 24px; }
.studio-news-list article { padding-block: 21px 13px; }
.studio-news-list article + article { border-top: 1px solid var(--mc-border); }
.studio-news-list time, .studio-discussions time { font-size: .82rem; color: var(--mc-ink-muted); }
.studio-news-list h3 { font-size: 1.15rem; margin-top: 6px; }
.studio-discussions { display:grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.studio-discussions a { display: grid; gap: 6px; align-content: start; padding: 19px; color: var(--mc-ink); text-decoration: none; overflow-wrap: anywhere; }
.mc-archive-hero, .mc-article-main, .mc-sidebar-widget, .mc-forum-cta-box { border: 1px solid var(--mc-border); background: white; border-radius: var(--mc-radius-lg); padding: clamp(17px, 4vw, 42px); }
.mc-archive-hero { margin-bottom: 25px; background: #edebf8; }
.mc-archive-hero h1, .mc-article-main h1 { margin-top: .18em; font-size: clamp(1.95rem,4.8vw,3.55rem); }
.mc-article-layout { display: grid; grid-template-columns: minmax(0,2.6fr) minmax(230px,1fr); gap: 22px; align-items: start; }
.mc-sidebar-stack, .mc-sidebar-list { display: grid; gap: 12px; }
.mc-sidebar-widget { padding: 20px; overflow-wrap: anywhere; }
.mc-breadcrumb, .mc-meta-line, .mc-card-foot { color: var(--mc-ink-muted); font-size: .85rem; margin-bottom: 14px; }
.mc-meta-line { display: flex; flex-wrap: wrap; column-gap: 9px; }
.mc-single-hero { margin: 24px 0; }
.mc-single-hero img { border-radius: 14px; width: 100%; }
.mc-prose { font-size: 1.06rem; line-height: 1.76; overflow-wrap: anywhere; }
.mc-prose :is(h2,h3) { margin-top: 1.5em; }
.mc-prose :is(table,iframe) { max-width: 100%; }
.mc-prose table { display: block; overflow: auto; }
.mc-prose figure { margin-inline: 0; }
.mc-forum-cta-box { margin-top: 28px; padding: 20px; background: #f2effe; }
.mc-cards-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 17px; }
.mc-article-card { background: white; border: 1px solid var(--mc-border); border-radius: 18px; overflow: hidden; }
.mc-card-thumb { display: grid; place-items: center; position: relative; aspect-ratio: 16/9; background: #edebf8; }
.mc-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mc-card-thumb-overlay { position: absolute; bottom: 9px; left: 9px; }
.mc-card-body { padding: 18px; overflow-wrap: anywhere; }
.mc-card-body h3 { font-size: clamp(1.2rem, 2vw, 1.4rem); }
.mc-card-foot { margin: 0; }
.mc-badge { display: inline-block; color: #382985; background: #eeebff; border-radius: 30px; font-size: .76rem; font-weight: 700; padding: 4px 10px; }
.mc-pagination { margin-top: 24px; }
.mc-pagination .page-numbers { display: inline-flex; padding: 8px 11px; }
.mc-footer { padding-block: 40px 22px; color: #efedf8; background: #161526; }
.mc-footer-grid { display: grid; grid-template-columns: 1.3fr repeat(3,1fr); gap: 26px; }
.mc-footer a { color: #efedf8; }
.mc-footer a:hover { text-decoration: underline; }
.mc-footer-links { display: grid; gap: 7px; font-size: .88rem; overflow-wrap: anywhere; }
.mc-footer-disclaimer { display: grid; gap: 5px; border-top: 1px solid #535064; padding-top: 18px; margin-top: 25px; font-size: .82rem; }
@media (max-width: 960px) {
  .studio-hubs { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .mc-header-inner { gap: 15px; }
  .mc-nav-list { gap: 8px 12px; }
  .mc-footer-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 720px) {
  .mc-container { width: calc(100% - 30px); }
  .mc-main { padding-top: 15px; }
  .mc-header-inner { flex-wrap: wrap; min-height: 66px; padding-block: 10px; }
  .mc-menu-toggle { display: block; margin-left: auto; }
  .studio-header-cta { display: none; }
  .mc-nav { width: 100%; }
  .studio-responsive-nav:not(.is-open) { display: none; }
  .studio-hero { min-height: auto; padding: 28px 20px 22px; border-radius: 21px; }
  .studio-hero h1 { font-size: clamp(2.55rem,9vw,4rem); }
  .studio-search input { font-size: 1rem; padding-inline: 8px; }
  .studio-hubs, .mc-cards-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .studio-news, .mc-article-layout { grid-template-columns: minmax(0,1fr); }
  .studio-discussions { grid-template-columns: 1fr; }
  .studio-hubs a { padding: 14px; }
}
@media (max-width: 400px) {
  .mc-section-head { flex-wrap: wrap; }
  .mc-cards-grid, .mc-footer-grid { grid-template-columns: 1fr; }
}
/* Editorial front page */
.studio-hero {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 4.5vw, 66px);
  min-height: 0;
  padding: clamp(24px, 4vw, 56px);
  border-color: #292841;
  background: radial-gradient(ellipse at 12% 5%, #322956, transparent 68%), #151522;
  color: #fff;
}
.studio-hero h1 { font-size: clamp(2.65rem, 5.2vw, 5rem); }
.studio-hero .studio-kicker { color: #d6cdff; }
.studio-hero-copy > p:not(.studio-kicker) { color: #ddd9ef; }
.studio-shortcuts a { color: #e4dcff; }
.studio-search { border-color: #cbc4ee; }
.studio-search button { background: #4235a3; }
.studio-cover {
  min-width: 0;
  min-height: 330px;
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-radius: 21px;
  background: #342957;
}
.studio-cover img, .studio-cover::after { position: absolute; inset: 0; width: 100%; height: 100%; }
.studio-cover img { object-fit: cover; }
.studio-cover::after { content: ""; background: linear-gradient(180deg, #100d1e10 15%, #100d1ecc 62%, #100d1e 100%); }
.studio-cover-copy { position: relative; z-index: 1; padding: clamp(18px, 3vw, 34px); }
.studio-cover h2 { margin: 0; font-size: clamp(1.45rem, 2.8vw, 2.45rem); }
.studio-cover h2 a { color: #fff; text-decoration: none; }
.studio-cover h2 a::after { position: absolute; content: ""; inset: 0; }
.studio-cover h2 a:hover { text-decoration: underline; }
.studio-cover:focus-within { outline: 3px solid #b7a7ff; outline-offset: 4px; }
.studio-hubs a { box-shadow: 0 8px 24px #2117480a; }
.studio-hub-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: #efedfa; }
.studio-news { display: block; }
.studio-news-list { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 15px; padding: 0; }
.studio-news-list article { overflow: hidden; background: white; border: 1px solid var(--mc-border); border-radius: 18px; padding: 0; }
.studio-news-list article + article { border-top: 1px solid var(--mc-border); }
.studio-news-list img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.studio-story-copy { padding: 16px; }
.studio-community { padding: clamp(18px, 4vw, 38px); background: #eeedf6; border-radius: 22px; }
@media (max-width: 900px) {
  .studio-hero { gap: 22px; }
  .studio-cover { min-height: 290px; }
}
@media (max-width: 720px) {
  .studio-hero, .studio-news-list { grid-template-columns: minmax(0,1fr); }
  .studio-cover { min-height: 252px; }
  .studio-news-list article { display: grid; grid-template-columns: minmax(0, 31%) minmax(0, 1fr); align-items: stretch; }
  .studio-news-list article:not(:has(img)) { grid-template-columns: minmax(0, 1fr); }
  .studio-news-list img { height: 100%; }
}
/* Archive and article layouts */
.studio-archive {
  background: radial-gradient(ellipse at top left, #3c2d63, transparent 72%), #171524;
  color: #faf8ff;
  margin-bottom: clamp(22px, 4vw, 44px);
  padding: clamp(24px, 6vw, 70px);
}
.studio-archive .studio-kicker { color: #d6cdff; }
.studio-archive h1 { font-size: clamp(2.4rem, 6.5vw, 5rem); }
.studio-archive :is(p, div:not([class])) { max-width: 62ch; }
.studio-archive a { color: #e6ddff; }
.studio-article-layout { grid-template-columns: minmax(0, 3fr) minmax(240px, 1fr); }
.studio-article-layout .mc-article-main { padding: 0; min-width: 0; }
.studio-article-heading {
  padding: clamp(20px, 4vw, 44px);
  border-radius: 21px 21px 0 0;
  background: radial-gradient(ellipse at top left, #f2edff, transparent 75%), #fbfaff;
}
.studio-article-heading .mc-badge { text-decoration: none; }
.studio-article-heading .mc-meta-line { margin-bottom: 0; }
.studio-article-layout .mc-single-hero { margin: 0; }
.studio-article-layout .mc-single-hero img { border-radius: 0; }
.studio-article-layout .mc-prose { padding: clamp(20px, 4vw, 44px); }
.studio-article-layout .mc-forum-cta-box { margin: 0 clamp(16px, 4vw, 44px) clamp(16px, 4vw, 44px); }
.studio-article-layout .mc-sidebar-widget { border-top: 3px solid #a899e0; }
@media (max-width: 840px) {
  .studio-article-layout { grid-template-columns: minmax(0, 1fr); }
}

.studio-code-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.studio-error-number { font: 700 1.65rem/1.2 var(--mc-font-mono); color: #4235a3; margin-bottom: 10px; overflow-wrap: anywhere; }
.studio-code-grid .mc-article-card { border-top: 3px solid #ad9ce9; }
.studio-code-grid h2 { font-size: 1.25rem; letter-spacing: -.02em; }
.studio-code-grid h2 a { color: var(--mc-ink); text-decoration: none; }
.studio-code-grid h2 a:hover { text-decoration: underline; }
