/* ==========================================================================
   Android & AI technical blog: shared by the android/ hub and every android article page.
   Dark site chrome (nav, hero, footer from style.css) + a light reading surface.
   Diagrams animate only when in view and never under prefers-reduced-motion.
   ========================================================================== */

:root {
  --ad-bg: #f4f7fb;
  --ad-paper: #ffffff;
  --ad-ink: #1e293b;
  --ad-head: #0b1324;
  --ad-muted: #5b6b82;
  --ad-line: #dfe6f0;
  --ad-soft: #eef4fb;
  --ad-blue: #0369a1;
  --ad-blue-2: #0ea5e9;
  --ad-green: #15803d;
  --ad-amber: #b45309;
  --ad-red: #b91c1c;
  --ad-violet: #6d28d9;
  --ad-code-bg: #0d1424;
  --ad-mono: ui-monospace, SFMono-Regular, 'JetBrains Mono', Menlo, Consolas, 'Liberation Mono', monospace;
  --ad-sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* ---- Hero (dark, matches site) ---- */
.ad-hero { position: relative; padding: 128px 0 54px; overflow: hidden; background: radial-gradient(ellipse 70% 90% at 20% 0%, rgba(14,165,233,.22), transparent 60%), radial-gradient(ellipse 60% 80% at 90% 10%, rgba(34,197,94,.14), transparent 60%), #050b18; }
.ad-hero-in { position: relative; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.ad-crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .84rem; color: #94a3b8; margin-bottom: 18px; }
.ad-crumbs a { color: #7dd3fc; }
.ad-crumbs a:hover { text-decoration: underline; }
.ad-chip { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 99px; font-size: .74rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #bae6fd; background: rgba(14,165,233,.12); border: 1px solid rgba(14,165,233,.35); }
.ad-hero h1 { font-family: var(--font-head, var(--ad-sans)); font-size: clamp(1.9rem, 4.6vw, 3.1rem); font-weight: 800; line-height: 1.14; letter-spacing: -.02em; color: #fff; margin: 16px 0 14px; max-width: 900px; }
.ad-hero .ad-lede { font-size: 1.1rem; line-height: 1.75; color: #cbd5e1; max-width: 760px; margin-bottom: 22px; }
.ad-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.ad-meta span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 10px; font-size: .82rem; color: #cbd5e1; background: rgba(255,255,255,.05); border: 1px solid rgba(148,163,184,.18); }
.ad-meta b { color: #fff; font-weight: 700; }

/* ---- Reading surface ---- */
.ad-main { background: var(--ad-bg); color: var(--ad-ink); font-family: var(--ad-sans); }
.ad-layout { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 40px; max-width: 1180px; margin: 0 auto; padding: 40px 24px 80px; }
.ad-article { min-width: 0; background: var(--ad-paper); border: 1px solid var(--ad-line); border-radius: 20px; padding: 44px clamp(18px, 5vw, 56px); box-shadow: 0 10px 40px rgba(15,23,42,.05); }
.ad-aside { position: sticky; top: 92px; align-self: start; }
.ad-toc { background: var(--ad-paper); border: 1px solid var(--ad-line); border-radius: 16px; padding: 18px; max-height: calc(100vh - 120px); overflow: auto; }
.ad-toc h2 { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ad-muted); margin: 0 0 10px; font-weight: 800; }
.ad-toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.ad-toc a { display: block; padding: 7px 10px; border-radius: 8px; font-size: .86rem; line-height: 1.4; color: #334155; border-left: 2px solid transparent; }
.ad-toc a:hover { background: var(--ad-soft); color: var(--ad-blue); }
.ad-toc a.on { background: var(--ad-soft); color: var(--ad-blue); border-left-color: var(--ad-blue-2); font-weight: 600; }
.ad-toc-inline { display: none; margin: 0 0 28px; border: 1px solid var(--ad-line); border-radius: 14px; background: var(--ad-soft); }
.ad-toc-inline summary { cursor: pointer; padding: 14px 18px; font-weight: 700; color: var(--ad-head); }
.ad-toc-inline ol { margin: 0; padding: 0 18px 16px 38px; display: grid; gap: 6px; }
.ad-toc-inline a { color: var(--ad-blue); font-size: .95rem; }

/* ---- Typography ---- */
.ad-body { font-size: 1.06rem; line-height: 1.8; }
.ad-body > *:first-child { margin-top: 0; }
.ad-body h2 { font-family: var(--font-head, var(--ad-sans)); font-size: clamp(1.4rem, 3vw, 1.8rem); font-weight: 800; color: var(--ad-head); line-height: 1.25; letter-spacing: -.015em; margin: 52px 0 16px; padding-top: 22px; border-top: 1px solid var(--ad-line); scroll-margin-top: 90px; }
.ad-body h3 { font-family: var(--font-head, var(--ad-sans)); font-size: 1.2rem; font-weight: 700; color: var(--ad-head); margin: 32px 0 10px; scroll-margin-top: 90px; }
.ad-body h4 { font-size: 1.02rem; font-weight: 700; color: var(--ad-head); margin: 24px 0 8px; }
.ad-body p { margin: 0 0 18px; color: var(--ad-ink); }
.ad-body a { color: var(--ad-blue); text-decoration: underline; text-decoration-color: rgba(3,105,161,.35); text-underline-offset: 3px; }
.ad-body a:hover { text-decoration-color: var(--ad-blue); }
.ad-body strong { color: var(--ad-head); }
.ad-body ul, .ad-body ol { margin: 0 0 20px; padding-left: 24px; list-style: disc; }
.ad-body ol { list-style: decimal; }
.ad-body .card ul { list-style: disc; padding-left: 20px; }
.ad-body ol.steps { list-style: none; padding-left: 0; }
.ad-body li { margin: 6px 0; }
.ad-body li::marker { color: var(--ad-blue-2); }
.ad-body :not(pre) > code { font-family: var(--ad-mono); font-size: .88em; padding: 2px 6px; border-radius: 6px; background: #eef2f7; color: #0f3d63; border: 1px solid #e2e8f0; word-break: break-word; }
.ad-body hr { border: 0; height: 1px; background: var(--ad-line); margin: 36px 0; }
.ad-lead { font-size: 1.16rem; color: #23324a; }

/* Callouts */
.note, .tip, .warn, .key { margin: 24px 0; padding: 16px 18px 16px 20px; border-radius: 12px; border: 1px solid; border-left-width: 4px; font-size: 1rem; line-height: 1.7; }
.note > :last-child, .tip > :last-child, .warn > :last-child, .key > :last-child { margin-bottom: 0; }
.note { background: #f0f7ff; border-color: #bfdbfe; border-left-color: #2563eb; }
.tip { background: #f0fdf4; border-color: #bbf7d0; border-left-color: #16a34a; }
.warn { background: #fffbeb; border-color: #fde68a; border-left-color: #d97706; }
.key { background: #f5f3ff; border-color: #ddd6fe; border-left-color: #7c3aed; }
.note b:first-child, .tip b:first-child, .warn b:first-child, .key b:first-child { display: block; margin-bottom: 4px; color: var(--ad-head); }

/* Tables */
.table-wrap { overflow-x: auto; margin: 22px 0 28px; border: 1px solid var(--ad-line); border-radius: 12px; }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 560px; }
.table-wrap th, .table-wrap td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--ad-line); }
.table-wrap th { background: #f1f5fb; color: var(--ad-head); font-weight: 700; }
.table-wrap tr:last-child td { border-bottom: 0; }
.table-wrap td:first-child { font-weight: 600; color: var(--ad-head); }
.table-wrap caption { caption-side: bottom; padding: 10px 14px; font-size: .85rem; color: var(--ad-muted); text-align: left; }

/* Steps */
.steps { counter-reset: s; list-style: none; padding: 0 !important; margin: 20px 0 26px; display: grid; gap: 10px; }
.steps > li { counter-increment: s; position: relative; margin: 0; padding: 14px 16px 14px 58px; border: 1px solid var(--ad-line); border-radius: 12px; background: #fbfdff; }
.steps > li::before { content: counter(s); position: absolute; left: 14px; top: 13px; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; font-size: .88rem; color: #fff; background: linear-gradient(135deg, #0284c7, #0ea5e9); }

/* Cards (use cases, pros/cons) */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin: 20px 0 28px; }
.card { border: 1px solid var(--ad-line); border-radius: 14px; padding: 18px; background: #fbfdff; }
.card h3, .card h4 { margin-top: 0 !important; font-size: 1.05rem; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card dl { margin: 0; display: grid; gap: 8px; font-size: .96rem; }
.card dt { font-weight: 700; color: var(--ad-head); font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; }
.card dd { margin: 0 0 4px; }
.usecase { border-left: 4px solid var(--ad-blue-2); }
.pros, .cons { border-top: 4px solid; }
.pros { border-top-color: #16a34a; }
.cons { border-top-color: #dc2626; }

/* Badges */
.lvl { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.lvl-b { background: #dcfce7; color: #166534; }
.lvl-i { background: #dbeafe; color: #1e40af; }
.lvl-a { background: #ede9fe; color: #5b21b6; }

/* ---- Code blocks ---- */
.code { margin: 22px 0 26px; border-radius: 12px; overflow: hidden; background: var(--ad-code-bg); border: 1px solid #1e293b; box-shadow: 0 8px 26px rgba(2,6,23,.12); }
.code figcaption { display: flex; align-items: center; gap: 10px; padding: 9px 12px 9px 16px; background: #131c30; border-bottom: 1px solid #1e293b; font-family: var(--ad-mono); font-size: .8rem; color: #94a3b8; }
.code .file { color: #e2e8f0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.code .lang { margin-left: auto; padding: 2px 8px; border-radius: 6px; background: rgba(148,163,184,.12); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; }
.code .copy { padding: 4px 10px; border-radius: 7px; border: 1px solid #334155; background: transparent; color: #cbd5e1; font: 600 .76rem var(--ad-sans); cursor: pointer; }
.code .copy:hover, .code .copy:focus-visible { background: #1e293b; color: #fff; }
.code pre { margin: 0; padding: 16px 18px; overflow-x: auto; font-family: var(--ad-mono); font-size: .86rem; line-height: 1.65; color: #e2e8f0; tab-size: 4; }
.code code { font-family: inherit; background: none; border: 0; padding: 0; color: inherit; }
.tk-k { color: #c792ea; }
.tk-s { color: #c3e88d; }
.tk-c { color: #7f8ea3; font-style: italic; }
.tk-n { color: #f78c6c; }
.tk-a { color: #ffcb6b; }
.tk-t { color: #82aaff; }
.tk-tag { color: #f07178; }
.tk-at { color: #ffcb6b; }

/* ---- Diagrams ---- */
.diagram { margin: 26px 0 30px; padding: 18px; border: 1px solid var(--ad-line); border-radius: 14px; background: linear-gradient(180deg, #fbfdff, #f5f9ff); }
.diagram svg { display: block; width: 100%; height: auto; font-family: var(--ad-sans); }
.diagram figcaption { margin-top: 12px; font-size: .9rem; color: var(--ad-muted); line-height: 1.6; display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; }
.diagram .replay { flex-shrink: 0; padding: 4px 10px; border-radius: 8px; border: 1px solid var(--ad-line); background: #fff; color: var(--ad-blue); font: 600 .78rem var(--ad-sans); cursor: pointer; }
.diagram .replay:hover { border-color: var(--ad-blue-2); }
.d-box { fill: #ffffff; stroke: #c6d3e3; stroke-width: 1.5; }
.d-blue { fill: #e0f2fe; stroke: #38bdf8; stroke-width: 1.5; }
.d-green { fill: #dcfce7; stroke: #4ade80; stroke-width: 1.5; }
.d-amber { fill: #fef3c7; stroke: #fbbf24; stroke-width: 1.5; }
.d-violet { fill: #ede9fe; stroke: #a78bfa; stroke-width: 1.5; }
.d-red { fill: #fee2e2; stroke: #f87171; stroke-width: 1.5; }
.d-dark { fill: #0f172a; stroke: #0f172a; }
.d-t { fill: #0f172a; font-size: 14px; font-weight: 700; }
.d-s { fill: #475569; font-size: 12px; }
.d-w { fill: #ffffff; font-size: 13px; font-weight: 700; }
.d-line { stroke: #94a3b8; stroke-width: 1.8; fill: none; }
.d-flow { stroke: #0ea5e9; stroke-width: 2.2; fill: none; }
.d-dash { stroke: #94a3b8; stroke-width: 1.6; fill: none; stroke-dasharray: 5 5; }
.d-dot { fill: #0ea5e9; opacity: 0; }
.d-dot.alt { fill: #16a34a; }
.d-dot.warm { fill: #f59e0b; }

@media (prefers-reduced-motion: no-preference) {
  .diagram.anim-ready .d-step { opacity: .18; transition: opacity .5s ease; }
  .diagram.anim-ready.play .d-step { opacity: 1; transition-delay: calc(var(--i, 0) * .55s); }
  .diagram.anim-ready.play .d-flow { stroke-dasharray: 7 7; animation: d-dash 1.1s linear 4; }
  .diagram.anim-ready.play .d-dot { animation: d-move var(--dur, 2.4s) ease-in-out var(--delay, 0s) 2 both; }
}
@keyframes d-dash { to { stroke-dashoffset: -28; } }
@keyframes d-move { 0% { offset-distance: 0%; opacity: 0; } 8% { opacity: 1; } 92% { opacity: 1; } 100% { offset-distance: 100%; opacity: 0; } }

/* ---- FAQ ---- */
.faq { display: grid; gap: 10px; margin: 18px 0 8px; }
.faq details { border: 1px solid var(--ad-line); border-radius: 12px; background: #fbfdff; }
.faq details[open] { border-color: #93c5fd; }
.faq summary { cursor: pointer; padding: 14px 44px 14px 18px; font-weight: 700; color: var(--ad-head); list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 16px; top: 12px; font-size: 1.2rem; color: var(--ad-blue); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 18px 14px; }
.faq details > div > :last-child { margin-bottom: 0; }

/* ---- References, CTA, related ---- */
.ad-refs { margin-top: 44px; padding: 20px 22px; border-radius: 14px; background: #f8fafc; border: 1px solid var(--ad-line); }
.ad-refs h2 { margin: 0 0 10px !important; padding: 0 !important; border: 0 !important; font-size: 1.1rem !important; }
.ad-refs ul { margin: 0; padding-left: 20px; font-size: .95rem; }
.ad-cta { position: relative; overflow: hidden; margin: 44px 0 0; padding: 34px clamp(20px, 4vw, 40px); border-radius: 18px; color: #e2e8f0; background: radial-gradient(ellipse at 100% 0%, rgba(14,165,233,.35), transparent 55%), radial-gradient(ellipse at 0% 100%, rgba(34,197,94,.22), transparent 55%), #0b1324; }
.ad-cta h2 { margin: 0 0 10px !important; padding: 0 !important; border: 0 !important; color: #fff !important; font-size: clamp(1.4rem, 3vw, 1.8rem) !important; }
.ad-cta p { color: #cbd5e1 !important; margin-bottom: 14px; }
.ad-cta .btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.ad-btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: 12px; font-weight: 800; font-size: 1rem; text-decoration: none !important; transition: transform .2s, box-shadow .2s; }
.ad-btn.primary { color: #fff !important; background: linear-gradient(110deg, #0284c7, #0ea5e9); box-shadow: 0 10px 26px rgba(14,165,233,.35); }
.ad-btn.primary:hover { transform: translateY(-2px); }
.ad-btn.ghost { color: #e2e8f0 !important; border: 1px solid rgba(148,163,184,.35); }
.ad-related { margin-top: 40px; }
.ad-related h2 { margin: 0 0 14px !important; padding: 0 !important; border: 0 !important; font-size: 1.25rem !important; }
.ad-related ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.ad-related li { margin: 0; }
.ad-related a { display: block; height: 100%; padding: 16px; border: 1px solid var(--ad-line); border-radius: 12px; background: #fbfdff; text-decoration: none; color: var(--ad-head); font-weight: 700; line-height: 1.45; }
.ad-related a small { display: block; margin-bottom: 4px; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ad-blue); }
.ad-related a:hover { border-color: #7dd3fc; box-shadow: 0 6px 20px rgba(14,165,233,.12); }
.ad-share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 30px; font-size: .9rem; color: var(--ad-muted); }
.ad-share button, .ad-share a { padding: 7px 12px; border-radius: 9px; border: 1px solid var(--ad-line); background: #fff; color: #334155; font: 600 .82rem var(--ad-sans); cursor: pointer; text-decoration: none; }
.ad-share button:hover, .ad-share a:hover { border-color: var(--ad-blue-2); color: var(--ad-blue); }

/* ---- Hub page ---- */
.hub-hero .ad-lede { max-width: 820px; }
.hub-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.hub-search { display: flex; align-items: center; gap: 10px; max-width: 520px; margin-top: 22px; padding: 10px 14px; border-radius: 12px; background: rgba(255,255,255,.06); border: 1px solid rgba(148,163,184,.25); }
.hub-search input { flex: 1; background: transparent; border: 0; outline: 0; color: #fff; font-size: 1rem; font-family: var(--ad-sans); }
.hub-search input::placeholder { color: #94a3b8; }
.hub-jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.hub-jump a { padding: 6px 12px; border-radius: 99px; font-size: .82rem; font-weight: 600; color: #cbd5e1; background: rgba(255,255,255,.05); border: 1px solid rgba(148,163,184,.2); }
.hub-jump a:hover { color: #fff; border-color: #38bdf8; }
.hub-wrap { max-width: 1180px; margin: 0 auto; padding: 40px 24px 80px; }
.hub-sec { margin-bottom: 44px; scroll-margin-top: 90px; }
.hub-sec > h2 { display: flex; align-items: center; gap: 10px; font-family: var(--font-head, var(--ad-sans)); font-size: clamp(1.3rem, 3vw, 1.7rem); color: var(--ad-head); margin: 0 0 6px; }
.hub-sec > p { color: var(--ad-muted); margin: 0 0 16px; max-width: 760px; }
.hub-latest { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.hub-card { display: flex; flex-direction: column; gap: 8px; padding: 20px; border-radius: 14px; background: #fff; border: 1px solid var(--ad-line); color: var(--ad-ink); transition: border-color .2s, box-shadow .2s, transform .2s; }
.hub-card:hover { border-color: #7dd3fc; box-shadow: 0 10px 28px rgba(14,165,233,.12); transform: translateY(-2px); }
.hub-card small { font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ad-blue); }
.hub-card h3 { font-size: 1.06rem; line-height: 1.4; color: var(--ad-head); margin: 0; }
.hub-card p { font-size: .92rem; color: var(--ad-muted); margin: 0; line-height: 1.6; }
.hub-card .more { margin-top: auto; font-size: .86rem; font-weight: 700; color: var(--ad-blue); }
.hub-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 8px; }
.hub-list li { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 10px; background: #fff; border: 1px solid var(--ad-line); font-size: .95rem; line-height: 1.4; }
.hub-list li a { color: var(--ad-head); font-weight: 600; }
.hub-list li a:hover { color: var(--ad-blue); text-decoration: underline; }
.hub-list li.soon { color: #64748b; background: #f8fafc; }
.hub-list li .tag-soon { margin-left: auto; flex-shrink: 0; font-size: .7rem; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: .06em; }
.hub-list li .tag-new { margin-left: auto; flex-shrink: 0; font-size: .7rem; font-weight: 800; color: #15803d; text-transform: uppercase; letter-spacing: .06em; }
.hub-path { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.hub-path .card ol { margin: 0; padding-left: 20px; font-size: .94rem; }
.hub-path .card li { margin: 6px 0; }
.hub-path .card a { color: var(--ad-blue); }
.hub-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.hub-cat { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 14px; background: #fff; border: 1px solid var(--ad-line); color: var(--ad-ink); transition: border-color .2s, box-shadow .2s, transform .2s; }
.hub-cat:hover { border-color: #7dd3fc; box-shadow: 0 10px 28px rgba(14,165,233,.12); transform: translateY(-2px); }
.hub-cat .ico { flex-shrink: 0; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: #e0f2fe; font-size: 1.35rem; }
.hub-cat .txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hub-cat b { font-size: .96rem; line-height: 1.35; color: var(--ad-head); }
.hub-cat small { font-size: .8rem; font-weight: 600; color: var(--ad-muted); }
.hub-list.collapsed > li.extra { display: none; }
.hub-searching .hub-list.collapsed > li.extra:not([hidden]) { display: flex; }
.hub-searching .hub-more { display: none; }
.hub-more { margin-top: 12px; padding: 9px 18px; border-radius: 99px; border: 1px solid #7dd3fc; background: #fff; color: var(--ad-blue); font: 700 .88rem var(--ad-sans); cursor: pointer; }
.hub-more:hover { background: #e0f2fe; }
.hub-empty { display: none; padding: 20px; text-align: center; color: var(--ad-muted); }

/* ---- "Apps built by Yunok Tech" box (sidebar on desktop, inline on smaller screens) ---- */
.ad-aside .ad-toc { max-height: calc(100vh - 380px); min-height: 160px; }
.ad-apps { background: var(--ad-paper); border: 1px solid var(--ad-line); border-radius: 16px; padding: 16px; }
.ad-apps-side { margin-top: 14px; }
.ad-apps-inline { display: none; margin: 36px 0 0; padding: 20px; }
.ad-apps h2 { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ad-muted); margin: 0 0 4px; font-weight: 800; }
.ad-apps > p { font-size: .8rem; color: var(--ad-muted); margin: 0 0 10px; }
.ad-apps ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ad-apps li { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 12px; border: 1px solid var(--ad-line); }
.ad-apps .app-info { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; color: var(--ad-ink); }
.ad-apps img { width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0; object-fit: cover; }
.ad-apps .app-info span { display: flex; flex-direction: column; min-width: 0; }
.ad-apps b { font-size: .9rem; color: var(--ad-head); }
.ad-apps small { font-size: .74rem; line-height: 1.35; color: var(--ad-muted); }
.ad-apps .app-get { flex-shrink: 0; padding: 6px 10px; border-radius: 8px; background: #15803d; color: #fff; font-size: .76rem; font-weight: 700; white-space: nowrap; }
.ad-apps .app-get:hover { background: #166534; }
.ad-apps-all { display: inline-block; margin-top: 10px; font-size: .82rem; font-weight: 700; color: var(--ad-blue); }
.ad-apps-inline ul { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* ---- Responsive ---- */
@media (max-width: 1040px) {
  .ad-layout { grid-template-columns: 1fr; max-width: 860px; }
  .ad-aside { display: none; }
  .ad-toc-inline { display: block; }
  .ad-apps-inline { display: block; }
}
@media (max-width: 640px) {
  .ad-hero { padding: 104px 0 40px; }
  .ad-hero-in, .hub-wrap { padding-left: 16px; padding-right: 16px; }
  .ad-layout { padding: 20px 10px 60px; }
  .ad-article { padding: 26px 16px; border-radius: 14px; }
  .ad-body { font-size: 1.02rem; }
  .code pre { font-size: .8rem; padding: 14px; }
  .hub-list { grid-template-columns: 1fr; }
}
@media print {
  #navbar, .mobile-nav, .ad-aside, .ad-apps, .ad-share, #back-top, footer { display: none !important; }
  .ad-hero { padding: 20px 0; background: #fff; }
  .ad-hero h1, .ad-hero .ad-lede { color: #000; }
}
