/* =================================================================
   Hotspot Mobile Repair  —  blog pages (loaded after styles.css)
   Post cards live in styles.css because the homepage uses them too.
   ================================================================= */

.skip-link {
    position: absolute;
    left: 12px; top: -60px;
    z-index: 100;
    padding: 10px 16px;
    border-radius: 10px;
    background: var(--ink);
    color: #fff;
    font-weight: 700;
}
.skip-link:focus { top: 12px; text-decoration: none; }

.nav a.is-active, .nav a[aria-current="page"] { color: var(--brand); }

/* ---------- Breadcrumbs ---------- */
.crumbs { padding-top: 22px; }
.crumbs ol {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-wrap: wrap; gap: 6px;
    font-size: .88rem; color: var(--muted);
}
.crumbs li + li::before { content: "›"; margin-right: 6px; color: #b3b8cc; }
.crumbs a { color: var(--ink-3); font-weight: 600; }
.crumbs--light ol { color: rgba(255,255,255,.6); }
.crumbs--light a { color: rgba(255,255,255,.85); }
.crumbs--light li + li::before { color: rgba(255,255,255,.4); }

/* ---------- Post header ---------- */
.post-head { padding-top: 22px; max-width: 1104px; }
.post-head__cat:hover { text-decoration: none; background: rgba(255,61,46,.14); }
.post-head h1 {
    margin: 16px 0 14px;
    max-width: 22ch;
    font-size: clamp(2rem, 3.2vw + .8rem, 3.3rem);
    line-height: 1.08;
}
.post-head__dek { max-width: 62ch; font-size: 1.18rem; color: var(--ink-3); margin-bottom: 18px; }
.post-meta {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px;
    font-size: .92rem; color: var(--muted);
}
.post-meta span + span::before { content: "·"; margin-right: 18px; color: #c3c7d6; }
.post-meta__author { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); }
.post-meta__author a { color: var(--ink); font-weight: 700; }
.post-meta__mark {
    width: 26px; height: 26px; border-radius: 8px;
    display: inline-grid; place-items: center;
    background: linear-gradient(135deg, var(--brand) 0%, #ff7a3d 100%);
}
.post-hero { margin: 26px 0 0; }
.post-hero img {
    width: 100%; height: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    background: var(--ink);
}

/* ---------- Layout ---------- */
.post-layout {
    max-width: 1104px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 56px;
    align-items: start;
    padding-top: 40px;
    padding-bottom: 72px;
}
.post-main { min-width: 0; max-width: 720px; }

/* ---------- Quick answer (the summary AI tools and snippets quote) ---------- */
.quick-answer {
    position: relative;
    padding: 24px 26px 20px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #fff 0%, var(--brand-soft) 100%);
    border: 1px solid rgba(255,61,46,.22);
    margin-bottom: 26px;
}
.quick-answer__label {
    display: inline-flex; align-items: center; gap: 8px;
    margin: 0 0 10px;
    font-size: .78rem; letter-spacing: .12em; text-transform: uppercase;
    color: var(--brand-deep);
}
.quick-answer__label::before {
    content: ""; width: 8px; height: 8px; border-radius: 50%;
    background: var(--brand);
    box-shadow: 0 0 0 4px rgba(255,61,46,.18);
}
.quick-answer__text { font-size: 1.08rem; line-height: 1.65; color: var(--ink); margin-bottom: 14px; }
.quick-answer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.quick-answer__list li {
    position: relative;
    padding-left: 28px;
    font-size: .98rem; line-height: 1.55; color: var(--ink-2);
}
.quick-answer__list li::before {
    content: "";
    position: absolute; left: 0; top: .2em;
    width: 18px; height: 18px; border-radius: 50%;
    background: #16a34a url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7'/%3E%3C/svg%3E") center/12px no-repeat;
}

/* ---------- Table of contents ---------- */
.toc {
    margin-bottom: 36px;
    padding: 18px 22px;
    border-radius: var(--radius);
    background: var(--bg);
    border: 1px solid var(--line);
}
.toc__title { margin: 0 0 8px; font-family: var(--font-display); font-weight: 800; color: var(--ink); }
.toc ol { margin: 0; padding-left: 1.3em; display: grid; gap: 6px; }
.toc li { color: var(--muted); font-size: .96rem; }
.toc a { color: var(--ink-2); font-weight: 500; }
.toc a:hover { color: var(--brand); }

/* ---------- Article text ---------- */
.prose { font-size: 1.07rem; line-height: 1.75; color: var(--ink-2); }
.prose > * + * { margin-top: 1.1em; }
.prose p { margin: 0; color: var(--ink-2); }
.prose h2 {
    margin: 2.1em 0 .1em;
    font-size: clamp(1.5rem, 1.1vw + 1.1rem, 1.95rem);
    scroll-margin-top: 96px;
}
.prose h3 { margin: 1.7em 0 0; font-size: 1.22rem; scroll-margin-top: 96px; }
.prose h2 + *, .prose h3 + * { margin-top: .6em; }
.prose a { color: var(--brand-deep); font-weight: 600; text-decoration: underline; text-decoration-color: rgba(217,37,22,.35); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: currentColor; }
.prose strong { color: var(--ink); }
.prose ul, .prose ol { margin: 0; padding-left: 1.35em; display: grid; gap: .5em; }
.prose li::marker { color: var(--brand); font-weight: 700; }
.prose li > ul, .prose li > ol { margin-top: .5em; }
.prose blockquote {
    margin: 0;
    padding: 4px 0 4px 20px;
    border-left: 4px solid var(--brand);
    font-style: italic;
    color: var(--ink-3);
}

.prose figure { margin: 1.8em 0; }
.prose figure img {
    width: 100%; height: auto;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}
.prose figcaption { margin-top: 10px; font-size: .88rem; line-height: 1.5; color: var(--muted); text-align: center; }

.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.prose table { width: 100%; border-collapse: collapse; font-size: .96rem; line-height: 1.5; background: #fff; }
.prose th {
    padding: 12px 14px;
    background: var(--ink);
    color: #fff;
    text-align: left;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: .9rem;
    white-space: nowrap;
}
.prose td { padding: 11px 14px; border-top: 1px solid var(--line); vertical-align: top; }
.prose tbody tr:nth-child(even) td { background: var(--bg); }
.prose td:first-child { font-weight: 600; color: var(--ink); }

.callout {
    padding: 16px 20px;
    border-radius: var(--radius);
    border-left: 5px solid var(--blue);
    background: #eef4ff;
}
.callout p { margin: 0; font-size: 1rem; line-height: 1.6; }
.callout p + p { margin-top: .6em; }
.callout--warn { border-left-color: #f59e0b; background: #fff7e6; }
.callout--danger { border-left-color: #dc2626; background: #fff1f0; }
.callout--local { border-left-color: var(--brand); background: var(--brand-soft); }
.callout--ok { border-left-color: #16a34a; background: #effaf3; }

/* ---------- Inline call-to-action ---------- */
.cta-inline {
    margin: 2em 0 !important;
    padding: 24px 26px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #0b1024 0%, #1a1f3a 100%);
    color: #fff;
    display: grid;
    gap: 16px;
}
.cta-inline__title { margin: 0 0 4px !important; font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; color: #fff !important; }
.cta-inline p { margin: 0; color: rgba(255,255,255,.78); font-size: 1rem; line-height: 1.55; }
.cta-inline__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cta-inline .btn { text-decoration: none; }
.cta-inline .btn--ghost-dark { --fg: #fff; --bd: rgba(255,255,255,.4); }
.cta-inline .btn--ghost-dark:hover { --bg: #fff; --fg: var(--ink); --bd: #fff; }

/* ---------- FAQ + sources + author ---------- */
.post-faq { margin-top: 56px; }
.post-faq h2 { font-size: clamp(1.5rem, 1.1vw + 1.1rem, 1.95rem); margin-bottom: 14px; scroll-margin-top: 96px; }
.post-faq__item { padding: 18px 0; border-top: 1px solid var(--line); }
.post-faq__item:last-child { border-bottom: 1px solid var(--line); }
.post-faq__item h3 { margin: 0 0 6px; font-size: 1.08rem; line-height: 1.35; }
.post-faq__item p { margin: 0; font-size: 1rem; line-height: 1.65; color: var(--ink-2); }

.post-sources { margin-top: 44px; }
.post-sources h2 { font-size: 1.15rem; margin-bottom: 10px; scroll-margin-top: 96px; }
.post-sources ol { margin: 0; padding-left: 1.3em; display: grid; gap: 6px; font-size: .94rem; }
.post-sources a { color: var(--ink-2); font-weight: 600; text-decoration: underline; text-decoration-color: #c9ccd9; text-underline-offset: 3px; }
.post-sources span { color: var(--muted); }
.post-sources__note { margin: 12px 0 0; font-size: .85rem; color: var(--muted); }

.author-box {
    margin-top: 44px;
    padding: 24px;
    border-radius: var(--radius-lg);
    background: var(--bg);
    border: 1px solid var(--line);
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 18px;
}
.author-box__mark {
    width: 56px; height: 56px; border-radius: 16px;
    display: grid; place-items: center;
    background: linear-gradient(135deg, var(--brand) 0%, #ff7a3d 100%);
    box-shadow: 0 6px 18px rgba(255,61,46,.3);
}
.author-box__eyebrow { margin: 0; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.author-box__name { margin: 2px 0 8px; font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; color: var(--ink); }
.author-box p { font-size: .96rem; line-height: 1.6; }
.author-box__nap { margin: 0; font-size: .9rem; color: var(--muted); }
.author-box__nap a { font-weight: 700; }

/* ---------- Sidebar ---------- */
.post-aside { position: sticky; top: 96px; }
.aside-card {
    padding: 24px 22px;
    border-radius: var(--radius-lg);
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    display: grid;
    gap: 10px;
}
.aside-card__eyebrow { margin: 0; font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--brand-deep); font-weight: 800; }
.aside-card__title { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; line-height: 1.2; color: var(--ink); }
.aside-card__text { margin: 0 0 4px; font-size: .95rem; line-height: 1.55; }
.aside-card .btn { padding: 12px 16px; font-size: .95rem; }
.aside-card__facts { list-style: none; margin: 6px 0 0; padding: 12px 0 0; border-top: 1px solid var(--line); display: grid; gap: 6px; }
.aside-card__facts li { position: relative; padding-left: 22px; font-size: .9rem; font-weight: 600; color: var(--ink-2); }
.aside-card__facts li::before { content: "✓"; position: absolute; left: 0; color: #16a34a; font-weight: 800; }
.aside-card__addr { margin: 0; font-size: .82rem; line-height: 1.5; color: var(--muted); }

/* ---------- Related ---------- */
.related { padding: 72px 0; }
.related__title { text-align: center; margin-bottom: 32px; }

/* ---------- Blog index ---------- */
.blog-hero {
    position: relative;
    overflow: hidden;
    padding: 20px 0 64px;
    color: #fff;
    background:
        radial-gradient(1000px 520px at -10% -30%, rgba(255,61,46,.2) 0%, transparent 60%),
        radial-gradient(800px 500px at 110% 0%, rgba(59,130,246,.2) 0%, transparent 55%),
        linear-gradient(180deg, #0b1024 0%, #131838 100%);
}
.blog-hero .crumbs { padding-top: 0; margin-bottom: 36px; }
.blog-hero .eyebrow { background: rgba(255,255,255,.1); color: #ffd9d5; border: 1px solid rgba(255,255,255,.2); }
.blog-hero h1 { color: #fff; margin: 16px 0 14px; max-width: 18ch; font-size: clamp(2.1rem, 3.6vw + .6rem, 3.5rem); line-height: 1.06; }
.blog-hero__lead { max-width: 60ch; font-size: 1.15rem; color: rgba(255,255,255,.8); }
.blog-topics { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.blog-topics a {
    padding: 9px 16px;
    border-radius: 999px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.2);
    color: #fff;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: .92rem;
}
.blog-topics a:hover { background: var(--brand); border-color: var(--brand); text-decoration: none; }

.blog-cat { padding: 64px 0 8px; scroll-margin-top: 72px; }
.blog-cat + .blog-cat { padding-top: 40px; }
.blog-cat__head { margin-bottom: 24px; max-width: 760px; }
.blog-cat__head h2 { margin-bottom: 6px; font-size: clamp(1.5rem, 1.4vw + 1rem, 2.1rem); }
.blog-cat__head p { margin: 0; }
.blog-cat:last-of-type { padding-bottom: 72px; }
.blog-help { text-align: center; max-width: 720px; }
.blog-help .cta-row { margin-top: 24px; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .post-layout { grid-template-columns: 1fr; gap: 40px; }
    .post-main { max-width: 760px; }
    .post-aside { position: static; max-width: 760px; }
}
@media (max-width: 900px) {
    .post-head h1 { max-width: none; }
    .post-head__dek { font-size: 1.05rem; }
    .post-meta { font-size: .86rem; gap: 4px 16px; }
    .post-meta span + span::before { display: none; }
    .post-meta__author { flex-basis: 100%; }
    .post-hero { margin-top: 20px; }
    .post-hero img { border-radius: var(--radius); }
    .post-layout { padding-top: 28px; padding-bottom: 48px; }
    .prose { font-size: 1.02rem; }
    .quick-answer { padding: 20px 18px 16px; }
    .cta-inline { padding: 20px; }
    .cta-inline__actions .btn { flex: 1 1 100%; }
    .author-box { grid-template-columns: 1fr; }
    .related { padding: 52px 0; }
    .blog-hero { padding-bottom: 48px; }
    .blog-cat { padding-top: 44px; }
}
@media (max-width: 480px) {
    .prose th, .prose td { padding: 10px 12px; }
}
