/* ===== QR Puppy — Learn / article styles ===== */
.learn-main { max-width: 820px; margin: 0 auto; padding: 24px 20px 10px; }

/* breadcrumbs */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .85rem; font-weight: 800; color: var(--ink-soft); margin: 6px 0 18px; }
.crumbs a { color: var(--brown-dk); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs span { opacity: .6; }

/* article header */
.post-head { margin-bottom: 22px; }
.post-cat { display: inline-block; font-size: .78rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: #fff; background: var(--orange-ink); padding: 4px 12px; border-radius: 999px; }
.post-head h1 { font-size: clamp(1.9rem, 4.6vw, 2.7rem); letter-spacing: -.02em; margin: 14px 0 10px; }
.post-sub { font-size: 1.15rem; color: var(--ink-soft); margin: 0 0 10px; }
.post-meta { font-size: .85rem; font-weight: 800; color: var(--ink-soft); margin: 0; }

/* article body typography */
.post-body { font-size: 1.075rem; line-height: 1.72; color: var(--ink); }
.post-body > *:first-child { margin-top: 0; }
.post-body p { margin: 0 0 1.1em; }
.post-body .lead { font-size: 1.2rem; line-height: 1.6; color: var(--ink); font-weight: 700; }
.post-body h2 { font-size: 1.55rem; letter-spacing: -.01em; margin: 1.8em 0 .5em; padding-top: .3em; }
.post-body h3 { font-size: 1.2rem; margin: 1.5em 0 .4em; }
.post-body a { color: var(--brown-dk); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1.5px; font-weight: 700; }
.post-body a:hover { color: var(--orange); }
.post-body ul, .post-body ol { margin: 0 0 1.2em; padding-left: 1.3em; }
.post-body li { margin: .35em 0; }
.post-body ul { list-style: none; padding-left: 0; }
.post-body ul li { position: relative; padding-left: 1.5em; }
.post-body ul li::before { content: "🐾"; position: absolute; left: 0; font-size: .8em; top: .2em; }
.post-body ol { padding-left: 1.5em; }
.post-body ol li { padding-left: .2em; }
.post-body blockquote { margin: 1.4em 0; padding: 14px 20px; border-left: 4px solid var(--orange); background: var(--cream-2); border-radius: 0 12px 12px 0; font-weight: 700; color: var(--brown-dk); }
.post-body blockquote p:last-child { margin: 0; }
.post-body strong, .post-body b { font-weight: 800; }
.post-body code { background: var(--cream-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .9em; }
.post-body table { width: 100%; border-collapse: collapse; margin: 1.3em 0; font-size: .95rem; display: block; overflow-x: auto; }
.post-body th, .post-body td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; }
.post-body th { background: var(--cream-2); font-weight: 800; }
.post-body figure { margin: 1.4em 0; }
.post-body img { max-width: 100%; height: auto; border-radius: 12px; }

/* FAQ (details/summary) */
.post-body .faq { margin: 2em 0 0; }
.post-body .faq h2 { margin-bottom: .3em; }
.post-body details { border: 1px solid var(--line); border-radius: 12px; padding: 4px 16px; margin: 10px 0; background: var(--card);}
.post-body details[open] { background: var(--cream); }
.post-body summary { font-weight: 800; cursor: pointer; padding: 12px 0; list-style: none; position: relative; padding-right: 28px; }
.post-body summary::-webkit-details-marker { display: none; }
.post-body summary::after { content: "+"; position: absolute; right: 4px; top: 10px; font-size: 1.3rem; color: var(--orange); font-weight: 900; }
.post-body details[open] summary::after { content: "–"; }
.post-body details > div { padding: 0 0 12px; color: var(--ink-soft); }
.post-body details > div p:last-child { margin-bottom: 0; }

/* in-article CTA */
.post-cta { display: flex; align-items: center; gap: 20px; justify-content: space-between; flex-wrap: wrap; margin: 40px 0 10px; background: linear-gradient(160deg, #fff6ee 0%, #ffe9d6 100%); border: 1px solid var(--line); border-radius: var(--r); padding: 24px 26px; }
.post-cta h3 { margin: 0 0 4px; font-size: 1.2rem; }
.post-cta p { margin: 0; color: var(--ink-soft); }

/* related */
.related { max-width: 820px; margin: 34px auto 0; padding: 0 20px; }
.related h2 { font-size: 1.3rem; margin-bottom: 14px; }
.related-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.related-card { display: flex; flex-direction: column; gap: 6px; background: var(--card);border: 1px solid var(--line); border-radius: var(--r-sm); padding: 16px 18px; text-decoration: none; box-shadow: var(--shadow-sm); transition: transform .12s, border-color .12s; }
.related-card:hover { transform: translateY(-3px); border-color: var(--brown); }
.rc-cat { font-size: .72rem; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; color: var(--brown-dk); }
.rc-title { font-weight: 800; color: var(--ink); line-height: 1.3; }

/* ===== Learn hub ===== */
.hub-hero { text-align: center; padding: 26px 0 8px; }
.hub-hero img { filter: drop-shadow(0 8px 16px rgba(120,78,35,.18)); }
.hub-hero h1 { font-size: clamp(2rem, 5vw, 2.9rem); letter-spacing: -.02em; margin: 12px 0 10px; }
.hub-hero p { max-width: 44em; margin: 0 auto; color: var(--ink-soft); font-size: 1.1rem; }
.hub-stat { display: inline-block; margin-top: 16px; font-weight: 800; color: var(--green); background: #e9f6ea; border: 1px solid #cdebcf; padding: 6px 14px; border-radius: 999px; font-size: .9rem; }

.hub-cat { margin-top: 40px; scroll-margin-top: 84px; }
.hub-cat-head h2 { font-size: 1.5rem; margin: 0 0 2px; }
.hub-cat-head p { margin: 0 0 16px; color: var(--ink-soft); }
.hub-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hub-card { display: flex; flex-direction: column; gap: 6px; background: var(--card);border: 1px solid var(--line); border-radius: var(--r); padding: 20px; text-decoration: none; box-shadow: var(--shadow-sm); transition: transform .13s, border-color .13s, box-shadow .13s; }
.hub-card:hover { transform: translateY(-4px); border-color: var(--brown); box-shadow: var(--shadow); }
.hub-card h3 { margin: 0; font-size: 1.12rem; color: var(--ink); line-height: 1.3; }
.hub-card p { margin: 0; color: var(--ink-soft); font-size: .95rem; flex: 1; }
.hub-read { font-weight: 800; color: var(--orange-ink); font-size: .9rem; }

@media (max-width: 680px) {
  .related-grid, .hub-grid { grid-template-columns: 1fr; }
  .post-cta { flex-direction: column; align-items: flex-start; }
}

/* Library search (offline, zero-network filter of the guides on the page) */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hub-search { margin: 18px auto 0; max-width: 520px; }
.hub-search input {
  width: 100%; font: inherit; font-size: 1rem; padding: 12px 18px;
  border: 2px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink);
  box-shadow: var(--shadow-sm); transition: border-color .15s;
}
.hub-search input::placeholder { color: var(--ink-soft); }
.hub-search input:focus-visible { outline: none; border-color: var(--orange); }
.hub-noresults { text-align: center; font-weight: 700; color: var(--ink-soft); margin: 22px 0 0; }
.hub-card[hidden], .hub-cat[hidden] { display: none; }

/* RTL: mirror the article body's list markers, table alignment and FAQ affordance. */
[dir="rtl"] .post-body ul,
[dir="rtl"] .post-body ol { padding-left: 0; padding-right: 1.5em; }
[dir="rtl"] .post-body ul { padding-right: 0; }
[dir="rtl"] .post-body ul li { padding-left: 0; padding-right: 1.5em; }
[dir="rtl"] .post-body ul li::before { left: auto; right: 0; }
[dir="rtl"] .post-body th,
[dir="rtl"] .post-body td { text-align: right; }
[dir="rtl"] .post-body summary { padding-right: 0; padding-left: 28px; }
[dir="rtl"] .post-body summary::after { right: auto; left: 4px; }
[dir="rtl"] .hub-search input { text-align: right; }
