/* PapCam Help Center — shares tokens and components with the landing page (index.html). */
:root {
  --paper: #f7f4ea;
  --paper-2: #fffdf6;
  --ink: #11110f;
  --ink-soft: #41423e;
  --muted: #6a6b62;
  --line: rgba(17, 17, 15, 0.14);
  --line-strong: rgba(17, 17, 15, 0.28);
  --flash: #f6ff4f;
  --flash-deep: #d8e62e;
  --coral: #ff5c48;
  --cyan: #30d5c8;
  --blue: #2537ff;
  --tight: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  min-width: 320px;
  background:
    linear-gradient(90deg, rgba(17, 17, 15, 0.035) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(rgba(17, 17, 15, 0.03) 1px, transparent 1px) 0 0 / 44px 44px,
    radial-gradient(circle at 82% 4%, rgba(48, 213, 200, 0.22), transparent 30vw),
    radial-gradient(circle at 10% 10%, rgba(246, 255, 79, 0.34), transparent 28vw),
    var(--paper);
  color: var(--ink);
  font-family: "Avenir Next", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img, video { display: block; max-width: 100%; height: auto; }
.shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 50; padding: 8px 12px; background: var(--ink); color: var(--paper-2); border-radius: 6px; }
.skip-link:focus { left: 12px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

/* ── Nav (same as landing page) ─────────────────────────────── */
.nav { position: sticky; top: 0; z-index: 20; backdrop-filter: blur(18px); background: rgba(247, 244, 234, 0.82); border-bottom: 1px solid rgba(17, 17, 15, 0.08); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; min-height: 76px; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 900; font-size: 22px; text-decoration: none; }
.brand-mark { position: relative; display: grid; place-items: center; width: 38px; height: 38px; background: var(--flash); border: 2px solid var(--ink); border-radius: 10px; box-shadow: 5px 5px 0 var(--ink); }
.brand-mark::before { content: ""; width: 15px; height: 15px; border: 3px solid var(--ink); border-radius: 50%; background: var(--paper-2); }
.brand-mark::after { content: ""; position: absolute; top: 7px; right: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--coral); border: 2px solid var(--ink); }
.nav-links { display: flex; align-items: center; gap: 26px; color: var(--ink-soft); font-size: 14px; font-weight: 750; }
.nav-links a { text-decoration: none; }
.nav-links a:hover, .nav-links a[aria-current] { color: var(--ink); text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 2px; }
.nav-cta { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border: 2px solid var(--ink); border-radius: 8px; background: var(--ink); color: var(--paper-2); font-weight: 900; text-decoration: none; box-shadow: 4px 4px 0 var(--flash); transition: transform 180ms var(--tight); }
.nav-cta:hover { transform: translate(-2px, -2px); }

/* ── Page header ────────────────────────────────────────────── */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 34px; color: var(--muted); font-size: 14px; font-weight: 700; list-style: none; }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--line-strong); }
.crumbs a { text-decoration: none; color: var(--ink-soft); }
.crumbs a:hover { text-decoration: underline; }
.page-head { padding: 22px 0 34px; }
.page-head h1 { max-width: 860px; font-size: clamp(36px, 5.4vw, 64px); line-height: 1.02; letter-spacing: -0.02em; font-weight: 900; }
.lede { max-width: 720px; margin-top: 18px; color: var(--ink-soft); font-size: clamp(17px, 2vw, 20px); font-weight: 600; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 18px; color: var(--muted); font-size: 14px; font-weight: 700; }
.badge-new { display: inline-flex; align-items: center; padding: 2px 10px; border: 2px solid var(--ink); border-radius: 999px; background: var(--coral); color: #fff; font-size: 12px; font-weight: 900; letter-spacing: .02em; white-space: nowrap; vertical-align: middle; }
h2 .badge-new, li .badge-new { margin-left: 6px; font-size: 11px; padding: 1px 8px; }

/* ── Article layout ─────────────────────────────────────────── */
.layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 56px; padding-bottom: 72px; }
.side { position: sticky; top: 100px; align-self: start; max-height: calc(100vh - 120px); overflow: auto; }
.side h2 { margin: 0 0 10px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 900; }
.side ul { list-style: none; display: grid; gap: 2px; margin-bottom: 26px; }
.side a { display: block; padding: 6px 10px; border-radius: 8px; color: var(--ink-soft); font-size: 14px; font-weight: 700; text-decoration: none; }
.side a:hover { background: rgba(17, 17, 15, .06); color: var(--ink); }
.side a[aria-current] { background: var(--flash); color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }

.article { max-width: 760px; font-size: 17.5px; color: #24251f; }
.article > * + * { margin-top: 18px; }
.article h2 { margin-top: 48px; padding-top: 22px; border-top: 2px solid var(--ink); font-size: clamp(24px, 3vw, 30px); line-height: 1.15; letter-spacing: -0.01em; color: var(--ink); font-weight: 900; }
.article h3 { margin-top: 28px; font-size: 19px; color: var(--ink); font-weight: 850; }
.article a { color: var(--ink); font-weight: 750; text-decoration-color: var(--blue); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.article a:hover { background: var(--flash); }
.article ul { padding-left: 22px; display: grid; gap: 8px; }
.article ul li::marker { color: var(--coral); }
.article strong { color: var(--ink); }
.article code { padding: 1px 6px; border-radius: 5px; background: rgba(17, 17, 15, .07); font-size: .9em; }
kbd { display: inline-block; min-width: 24px; padding: 1px 7px; border: 2px solid var(--ink); border-bottom-width: 3px; border-radius: 6px; background: var(--paper-2); font: 800 .78em/1.4 ui-monospace, "SF Mono", Menlo, monospace; text-align: center; color: var(--ink); }

ol.steps { list-style: none; counter-reset: step; display: grid; gap: 14px; }
ol.steps > li { counter-increment: step; position: relative; padding-left: 50px; min-height: 34px; }
ol.steps > li::before { content: counter(step); position: absolute; left: 0; top: -2px; display: grid; place-items: center; width: 34px; height: 34px; border: 2px solid var(--ink); border-radius: 50%; background: var(--flash); font-weight: 900; font-size: 15px; box-shadow: 3px 3px 0 var(--ink); }

.callout { padding: 16px 18px; border: 2px solid var(--ink); border-radius: 12px; background: var(--paper-2); box-shadow: 5px 5px 0 var(--cyan); }

figure { margin: 26px 0 8px; }
.article figure { margin-top: 26px; }
.shot { overflow: hidden; border: 2px solid var(--ink); border-radius: 14px; background: #0d0f0d; box-shadow: 7px 7px 0 var(--ink); }
.shot--narrow { max-width: 360px; }
figcaption { margin-top: 14px; color: var(--muted); font-size: 14.5px; font-weight: 650; }
.loop { position: relative; }
.loop-tag { position: absolute; top: 12px; left: 12px; z-index: 1; padding: 2px 10px; border-radius: 999px; background: rgba(17, 17, 15, .78); color: #fff; font-size: 12px; font-weight: 800; pointer-events: none; }

table { width: 100%; border-collapse: collapse; border: 2px solid var(--ink); border-radius: 12px; overflow: hidden; background: var(--paper-2); font-size: 16px; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); }
th { background: var(--ink); color: var(--paper-2); font-size: 13px; letter-spacing: .04em; text-transform: uppercase; }
tr:last-child td { border-bottom: 0; }

.faq h3 { margin-top: 22px; }
.faq p { margin-top: 6px; }

/* ── Related + prev/next ────────────────────────────────────── */
.more { margin-top: 56px; }
.more h2 { border-top: 0; padding-top: 0; margin-top: 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; margin-top: 18px; list-style: none; padding: 0 !important; }
.card { display: flex; flex-direction: column; height: 100%; border: 2px solid var(--ink); border-radius: 14px; background: var(--paper-2); text-decoration: none !important; box-shadow: 5px 5px 0 var(--ink); transition: transform 180ms var(--tight), box-shadow 180ms var(--tight); overflow: hidden; }
.card:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink); background: var(--paper-2) !important; }
.card img { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; object-position: 40% 45%; border-bottom: 2px solid var(--ink); background: #0d0f0d; }
.card-body { display: grid; gap: 6px; padding: 14px 16px 16px; }
.card-title { font-size: 17px; font-weight: 900; line-height: 1.25; color: var(--ink); }
.card-text { color: var(--ink-soft); font-size: 14.5px; font-weight: 600; line-height: 1.45; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 40px; }
.pager a { display: grid; gap: 2px; padding: 14px 18px; border: 2px solid var(--ink); border-radius: 12px; background: var(--paper-2); text-decoration: none !important; font-weight: 900 !important; }
.pager a:hover { background: var(--flash) !important; }
.pager span { color: var(--muted); font-size: 13px; font-weight: 800; }
.pager .next { text-align: right; grid-column: 2; }

/* ── Hub ────────────────────────────────────────────────────── */
.hub-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr); gap: 48px; align-items: center; padding-bottom: 40px; }
.quick { counter-reset: q; list-style: none; display: grid; gap: 12px; margin-top: 26px; max-width: 560px; }
.quick li { counter-increment: q; position: relative; padding: 14px 16px 14px 58px; border: 2px solid var(--ink); border-radius: 12px; background: var(--paper-2); font-size: 15.5px; }
.quick li::before { content: counter(q); position: absolute; left: 14px; top: 13px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--flash); border: 2px solid var(--ink); font-weight: 900; }
.quick-title { display: block; font-size: 16.5px; font-weight: 900; color: var(--ink); }
.group { padding: 34px 0 10px; }
.group h2 { font-size: clamp(22px, 3vw, 30px); font-weight: 900; letter-spacing: -0.01em; }
.cta-band { margin: 56px 0 72px; padding: 30px; border: 2px solid var(--ink); border-radius: 18px; background: var(--flash); box-shadow: 8px 8px 0 var(--ink); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.cta-band h2 { font-size: clamp(22px, 3vw, 30px); font-weight: 900; }
.cta-band p { font-weight: 650; color: var(--ink-soft); }

/* ── Footer (same as landing page) ──────────────────────────── */
.footer { padding: 28px 0 38px; color: var(--muted); font-size: 14px; font-weight: 750; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 18px; border-top: 1px solid var(--line); padding-top: 22px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; }
.footer-links a { color: var(--ink-soft); text-decoration: none; }
.footer-links a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; gap: 0; }
  .side { position: static; max-height: none; order: 2; margin-top: 40px; padding-top: 24px; border-top: 2px solid var(--ink); }
  .side .toc { display: none; }
  .hub-hero { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .shell { width: calc(100% - 32px); }
  .nav-inner { min-height: 66px; }
  .nav-links { display: none; }
  .brand { font-size: 20px; }
  .article { font-size: 16.5px; }
  .shot { box-shadow: 4px 4px 0 var(--ink); border-radius: 10px; }
  .pager { grid-template-columns: 1fr; }
  .pager .next { grid-column: auto; }
  th, td { padding: 8px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
