/* ==========================================================================
   PhotoZone Graphy — Unified Document Stylesheet (plain, light) — v3
   One file for: legal index, Terms, Privacy, Refund, AI Policy, and the whole
   Help Center (help/help.php, articles, search results, 404).

   Patterns taken from GitHub (Primer NavList / TreeView), Docusaurus (Infima)
   and Google / Microsoft docs:
   - white page, system fonts, flat sections, one accent colour
   - sidebar: collapsible topic tree; chevron toggles, the row itself navigates;
     the current page is shown with weight + background + edge (not colour alone)
   - links never underline on hover; they change colour instead
   - text fills the whole column (no narrow measure), small side margins

   In help.php set PZH_INLINE_CSS to false so the old inline CSS stops overriding this file.
   ========================================================================== */

/* ==========================================================================
   1. TOKENS
   ========================================================================== */
:root {
  --canvas: #ffffff;
  --canvas-2: #f6f8fa;
  --canvas-3: #eaeef2;

  --ink: #1f2328;
  --ink2: #3d444d;
  --ink3: #59636e;
  --ink4: #818b98;

  --border: #d1d9e0;
  --border-soft: #e4e8ec;

  --accent: #0b6e5c;           /* brand: buttons, current item, progress bar */
  --accent-ink: #084d40;
  --accent-tint: #0b6e5c14;
  --link: #0969da;
  --link-hover: #0550ae;

  --green: #1a7f37;  --green-tint: #1a7f3710;  --green-border: #1a7f3740;
  --amber: #9a6700;  --amber-tint: #9a67000f;  --amber-border: #9a670040;
  --red: #cf222e;    --red-tint: #cf222e0d;    --red-border: #cf222e40;
  --blue: #0969da;   --blue-tint: #0969da0d;   --blue-border: #0969da40;

  --mark: #fff1a8;             /* search highlight */
  --mark-current: #ffc53d;

  /* names used by older help.php / inline styles */
  --glass-border: var(--border-soft);
  --glass-border-strong: var(--border);
  --glass-shadow: none;
  --accent-tint-strong: #0b6e5c24;
  --accent-ring: #0b6e5c55;
  --shadow-sm: 0 1px 0 rgba(31, 35, 40, .04);
  --shadow-md: 0 8px 24px rgba(31, 35, 40, .14);
  --radius-sm: 6px;
  --radius-md: 6px;
  --radius-lg: 8px;

  --maxw: 1760px;                          /* only matters on very large monitors */
  --edge: clamp(14px, 1.8vw, 28px);        /* page side margin */
  --sidebar-w: clamp(250px, 19vw, 310px);
  --gap: clamp(24px, 3vw, 48px);

  /* The "Menu" button at the top-left is external and floats over the page.
     The sticky sidebar starts below it. Lower the +48px if you want it closer to the navbar. */
  --side-top: calc(var(--pz-h, 64px) + 48px);

  /* Height of the external navbar's bottom button row on phones. The up/down buttons sit above it.
     If they still touch the bar on some phone, raise this number. */
  --mobile-bar: 68px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

/* ==========================================================================
   2. BASE
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--pz-h, 64px) + 20px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink2);
  font-family: var(--font);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

::selection { background: #b6e3ff; color: var(--ink); }

/* links: blue, never underlined (hover changes colour only) */
.content-area a:not([class]),
.legal-hero a:not([class]) { color: var(--link); }
.content-area a:not([class]):hover,
.legal-hero a:not([class]):hover { color: var(--link-hover); }

a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}
.search-input:focus-visible { outline: none; }

.read-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: var(--accent); z-index: 200; transition: width .1s linear; pointer-events: none;
}

.wrap, .docs-wrap {
  width: 100%;
  max-width: calc(var(--maxw) + 2 * var(--edge));
  margin: 0 auto;
  padding: 0 var(--edge);
}

/* decorative icons and the small-phrase strip are not part of this design */
.commitment-strip, .commitment-inner,
.ts-icon, .rc-icon, .rp-icon, .rp-arrow, .mor-icon, .ci-icon, .cc-icon, .doc-icon, .doc-card-top,
.toc-header i, .toc-notice i, .toc-gdpr i, .intro-notice > i, .update-left i, .update-pill-dot,
.ph-meta-chip i, .trust-item i, .trust-strip, .ph-breadcrumb i, .ts-highlight > i, .ts-chevron,
.doc-updated i, .doc-read i, .btn-fill i, .btn-out i, .help-btn i, .hero-eyebrow, .ph-eyebrow,
.ph-icon-visual, .ph-icon-box, .search-neon-svg, .commitment-orb, .commitment-orb-1, .commitment-orb-2,
.ci-desc { display: none !important; }

/* never show scrollbars inside the page's own sidebar */
.toc-sidebar, .toc-card, .toc-body, #toc-body {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.toc-sidebar::-webkit-scrollbar, .toc-card::-webkit-scrollbar,
.toc-body::-webkit-scrollbar, #toc-body::-webkit-scrollbar { display: none; width: 0; height: 0; }

/* ==========================================================================
   3. HEADER BLOCK
   ========================================================================== */
.page-hero, .legal-hero {
  padding: 32px 0 26px;
  background: var(--canvas);
  border-bottom: 1px solid var(--border-soft);
}
.legal-hero { padding: 52px 0 40px; }

.ph-breadcrumb {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  margin-bottom: 14px; font-size: 14px; color: var(--ink3);
}
.ph-breadcrumb a { color: var(--ink3); }
.ph-breadcrumb a:hover { color: var(--link); }
.ph-breadcrumb > *:not(:last-child)::after { content: "/"; margin-left: 6px; color: var(--ink4); }

.page-hero-inner { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }

.ph-title, .legal-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(26px, 3.2vw, 34px); line-height: 1.2; font-weight: 600; letter-spacing: -.01em;
  color: var(--ink);
}
.ph-title em { font-style: normal; }
.ph-sub, .hero-subtitle { margin: 0 0 14px; font-size: 17px; line-height: 1.6; color: var(--ink3); }

.ph-meta { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.ph-meta-chip { padding: 0; border: 0; background: none; font-size: 14px; color: var(--ink3); }
.ph-meta-chip.active-chip { color: var(--green); font-weight: 600; }

/* ==========================================================================
   4. PAGE GRID + SIDEBAR
   ========================================================================== */
.content-area { padding: 32px 0 96px; }

.content-grid { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); gap: var(--gap); align-items: start; }
.terms-main { min-width: 0; }

.toc-sidebar {
  position: sticky; top: var(--side-top); align-self: start;
  display: flex; flex-direction: column; gap: 24px;
  max-height: calc(100vh - var(--side-top) - 16px);
  overflow-y: auto; overscroll-behavior: contain;
}
.toc-card { flex: none; background: none; border: 0; }
.toc-header { padding: 0 10px 8px; border: 0; }
.toc-header-text { font-size: 14px; font-weight: 600; color: var(--ink); }
.toc-body { padding: 0; }

/* every row: 32px high, rounded, no underline */
.toc-link {
  display: block; position: relative;
  padding: 6px 10px; border-radius: 6px;
  font-size: 14px; line-height: 20px; font-weight: 400; color: var(--ink2);
  cursor: pointer;
}
.toc-link:hover { background: var(--canvas-2); color: var(--ink); }
/* current page: bold + grey ground + edge, so it does not depend on colour alone */
.toc-link.active { background: var(--canvas-3); color: var(--ink); font-weight: 600; box-shadow: inset 3px 0 0 var(--accent); }
.toc-link.sub { padding-left: 24px; font-size: 13.5px; color: var(--ink3); }

/* ---- topic tree: topic > subtopic ----
   Chevron on the right toggles; the label navigates (like Primer NavList / TreeView).
   Selectors are deliberately specific so older inline help.php CSS cannot change the arrow. */
.toc-sidebar .hc-tg > summary {
  display: flex; align-items: center; margin: 0; padding: 0;
  list-style: none; cursor: pointer; border-radius: 6px;
}
.toc-sidebar .hc-tg > summary::-webkit-details-marker { display: none; }
.toc-sidebar .hc-tg > summary:hover { background: var(--canvas-2); }
.toc-sidebar .hc-tg > summary .toc-link { flex: 1; min-width: 0; }
.toc-sidebar .hc-tg > summary .toc-link:hover { background: transparent; }
.toc-sidebar .hc-tg > summary .toc-link.active { background: var(--canvas-3); }

.toc-sidebar .hc-tg > summary::after {
  content: ""; flex: none; display: block;
  width: 28px; height: 28px; margin: 0 2px 0 0; padding: 0; border: 0; border-radius: 6px;
  font: 0/0 a;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%2359636e' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px 16px no-repeat;
  transform: rotate(-90deg);
  transition: transform .15s;
}
.toc-sidebar .hc-tg > summary:hover::after { background-color: var(--canvas-3); }
.toc-sidebar .hc-tg[open] > summary::after { transform: none; }

.toc-sidebar .hc-kids { margin: 0 0 2px; padding: 0; border: 0; }
.toc-sidebar .hc-kids .toc-link { padding-left: 26px; font-size: 13.5px; }
.toc-sidebar .hc-kids .hc-kids .toc-link { padding-left: 42px; }
.toc-sidebar .hc-kids .toc-link::before { content: none; }

/* ---- "On this page": a plain list beside a thin line ---- */
#toc-body { padding: 0; border-left: 1px solid var(--border); }
#toc-body .toc-link {
  margin-left: -1px; padding: 5px 12px; border-left: 2px solid transparent; border-radius: 0;
  box-shadow: none; font-size: 13.5px; color: var(--ink3);
}
#toc-body .toc-link:hover { background: none; color: var(--ink); border-left-color: var(--ink4); }
#toc-body .toc-link.active { background: none; color: var(--accent-ink); font-weight: 600; border-left-color: var(--accent); }
#toc-body .toc-link.sub { padding-left: 26px; }

.toc-divider { height: 1px; margin: 16px 0; background: var(--border-soft); }
.toc-notice, .toc-gdpr { padding: 0 12px; margin: 0 0 10px; background: none; border: 0; }
.toc-notice-text, .toc-gdpr-text { font-size: 13px; line-height: 1.55; color: var(--ink3); }
.toc-footer { padding: 0 12px; }
.toc-footer-text { font-size: 13px; line-height: 1.55; color: var(--ink3); }
.toc-footer-text strong { color: var(--ink2); }

/* ==========================================================================
   5. UPDATE BAR · SEARCH · HIGHLIGHTS
   ========================================================================== */
.update-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-bottom: 20px; padding-bottom: 14px; border-bottom: 1px solid var(--border-soft);
}
.update-left { font-size: 14px; color: var(--ink3); min-width: 0; }
.update-left strong { color: var(--ink); font-weight: 600; }
.update-pill { flex: none; padding: 0; border: 0; background: none; font-size: 13px; font-weight: 600; color: var(--green); }

.search-container, .hc-sform { position: relative; }
.search-container { margin-bottom: 24px; }
.hc-sform { margin: 0; }

.search-wrapper {
  position: relative; display: flex; align-items: center; min-height: 44px;
  background: var(--canvas); border: 1px solid var(--border); border-radius: 6px;
}
.search-wrapper:focus-within { border-color: var(--link); box-shadow: 0 0 0 1px var(--link), 0 0 0 4px var(--blue-tint); }
.search-icon { position: absolute; left: 14px; color: var(--ink4); font-size: 14px; pointer-events: none; }
.search-input {
  flex: 1; min-width: 0; height: 42px; padding: 0 12px 0 40px;
  border: 0; background: transparent; outline: 0;
  font: 400 15px var(--font); color: var(--ink);
}
.search-input::placeholder { color: var(--ink4); }
.search-input::-webkit-search-cancel-button { display: none; }

.search-nav { display: flex; align-items: center; gap: 4px; margin-left: 4px; padding: 0 6px 0 10px; border-left: 1px solid var(--border-soft); }
.search-nav-btn {
  display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px;
  border: 1px solid var(--border); border-radius: 6px; background: var(--canvas-2);
  font: 500 13px var(--font); color: var(--ink2); cursor: pointer;
}
.search-nav-btn:hover:not(:disabled) { background: var(--canvas-3); }
.search-nav-btn:disabled { opacity: .45; cursor: not-allowed; }
.search-nav-count { padding: 0 4px; font-size: 13px; color: var(--ink3); white-space: nowrap; font-variant-numeric: tabular-nums; }

.search-clear {
  display: none; flex: none; align-items: center; justify-content: center;
  width: 24px; height: 24px; margin-right: 10px; border: 0; border-radius: 50%;
  background: var(--canvas-3); color: var(--ink3); cursor: pointer;
}
.search-clear:hover { color: var(--ink); }
.search-clear.visible { display: flex; }
.search-stats { margin-top: 8px; font-size: 13px; color: var(--ink3); }

.search-dropdown {
  display: none; position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 80;
  max-height: 380px; overflow-y: auto; padding: 4px;
  background: var(--canvas); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow-md);
}
.search-dropdown-item { padding: 9px 12px; border-radius: 6px; cursor: pointer; }
.search-dropdown-item:hover, .search-dropdown-item.active { background: var(--canvas-2); }
.search-dropdown-item.no-result { color: var(--ink3); font-size: 14px; cursor: default; }
.search-dropdown-item.no-result:hover { background: none; }
.dropdown-section { margin-bottom: 2px; font-size: 12.5px; color: var(--ink3); }
.dropdown-context { font-size: 14px; line-height: 1.5; color: var(--ink2); }
.dropdown-meta { margin-top: 3px; font-size: 12px; color: var(--ink4); }

/* highlights: matched words are bold on light yellow */
mark { background: var(--mark); color: inherit; padding: 0 1px; border-radius: 2px; }
.dropdown-context mark, .hc-res mark { font-weight: 600; color: var(--ink); }

/* inside a page: every match yellow, the current one orange */
mark.search-highlight, .search-highlight { background: var(--mark); color: var(--ink); padding: 0 1px; border-radius: 2px; }
mark.search-highlight.current, .search-highlight.search-highlight-current, .search-highlight-current {
  background: var(--mark-current); color: var(--ink); outline: 2px solid var(--mark-current); outline-offset: 0;
}

/* ==========================================================================
   6. NOTICES
   ========================================================================== */
.intro-notice { margin-bottom: 8px; padding: 14px 16px; background: var(--canvas-2); border: 1px solid var(--border-soft); border-radius: 6px; }
.intro-notice p { margin: 0; font-size: 15px; line-height: 1.65; color: var(--ink2); }
.hc-banner { margin-bottom: 16px; }

/* ==========================================================================
   7. SECTIONS — flat, divided by a line, text fills the full width
   ========================================================================== */
.term-section { margin: 0; padding: 30px 0; background: none; border: 0; border-top: 1px solid var(--border-soft); }
.term-section-header { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; padding: 0; background: none; border: 0; cursor: default; }
.ts-num { flex: none; min-width: 24px; font-size: 14px; font-weight: 500; color: var(--ink4); font-variant-numeric: tabular-nums; }
.ts-title-wrap { flex: 1; min-width: 0; }
.ts-title { margin: 0; font-size: 24px; line-height: 1.3; font-weight: 600; letter-spacing: -.005em; color: var(--ink); }
.ts-sub { margin-top: 4px; font-size: 15px; line-height: 1.5; color: var(--ink3); }
.term-section-body { padding: 0; }

.ts-text, .normal-text p { margin: 0 0 16px; max-width: none; font-size: 16px; line-height: 1.7; color: var(--ink2); }
.ts-text:last-child, .normal-text p:last-child { margin-bottom: 0; }
.ts-text strong, .normal-text strong { color: var(--ink); font-weight: 600; }

.ts-subhead { margin: 28px 0 10px; padding: 0; font-size: 18px; line-height: 1.4; font-weight: 600; color: var(--ink); }
.term-section-body > .ts-subhead:first-child { margin-top: 0; }
.ts-subhead.minor { margin: 20px 0 8px; font-size: 16px; }

.ts-list { max-width: none; margin: 0 0 16px; padding-left: 24px; font-size: 16px; line-height: 1.7; color: var(--ink2); }
.ts-list li { margin-bottom: 6px; }
.ts-list strong { color: var(--ink); font-weight: 600; }

/* callouts: coloured left edge, no icon */
.ts-highlight { margin: 20px 0; padding: 12px 16px; background: var(--canvas-2); border-left: 4px solid var(--ink4); border-radius: 0 6px 6px 0; }
.ts-highlight p { margin: 0 0 8px; font-size: 15px; line-height: 1.65; color: var(--ink2); }
.ts-highlight p:last-child { margin-bottom: 0; }
.ts-highlight strong { color: var(--ink); font-weight: 600; }
.ts-highlight.info    { background: var(--blue-tint);  border-left-color: var(--blue); }
.ts-highlight.success { background: var(--green-tint); border-left-color: var(--green); }
.ts-highlight.warn    { background: var(--amber-tint); border-left-color: var(--amber); }
.ts-highlight.danger  { background: var(--red-tint);   border-left-color: var(--red); }

/* tables */
.ts-table-wrap { margin: 20px 0; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: 6px; }
.ts-table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 14.5px; background: var(--canvas); }
.ts-table thead th { padding: 10px 14px; text-align: left; white-space: nowrap; font-weight: 600; color: var(--ink); background: var(--canvas-2); border-bottom: 1px solid var(--border); }
.ts-table tbody td { padding: 10px 14px; vertical-align: top; line-height: 1.55; color: var(--ink2); border-bottom: 1px solid var(--border-soft); }
.ts-table tbody tr:last-child td { border-bottom: 0; }

/* small labels */
.hl { display: inline-block; padding: 1px 8px; border-radius: 12px; font-size: 12.5px; font-weight: 500; line-height: 1.6; color: var(--ink2); background: var(--canvas-3); }
.hl.red   { background: var(--red-tint);   color: var(--red); }
.hl.green { background: var(--green-tint); color: var(--green); }
.hl.amber { background: var(--amber-tint); color: var(--amber); }

/* two-column info boxes */
.rights-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.right-card { padding: 14px 16px; background: var(--canvas); border: 1px solid var(--border); border-radius: 6px; color: inherit; }
a.right-card:hover { border-color: var(--ink4); background: var(--canvas-2); }
a.right-card:hover .rc-title { color: var(--link-hover); }
.rc-title { margin-bottom: 4px; font-size: 15px; font-weight: 600; color: var(--ink); }
.rc-desc { font-size: 14px; line-height: 1.55; color: var(--ink3); }

.mor-banner { margin-bottom: 8px; padding: 14px 16px; background: var(--canvas-2); border-left: 4px solid var(--accent); border-radius: 0 6px 6px 0; }
.mor-text-title { margin-bottom: 3px; font-size: 15px; font-weight: 600; color: var(--ink); }
.mor-text-desc { font-size: 14.5px; line-height: 1.6; color: var(--ink3); }

/* a real sequence */
.process-steps { display: flex; flex-direction: column; margin-top: 8px; }
.process-step { position: relative; display: flex; gap: 14px; align-items: flex-start; padding: 0 0 20px; }
.process-step:last-child { padding-bottom: 0; }
.process-step::before { content: ""; position: absolute; left: 13px; top: 30px; bottom: 4px; width: 1px; background: var(--border); }
.process-step:last-child::before { display: none; }
.process-step-num {
  flex: none; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: 50%; background: var(--canvas-2);
  font-size: 13px; font-weight: 600; color: var(--ink);
}
.process-step-title { margin: 3px 0 2px; font-size: 16px; font-weight: 600; color: var(--ink); }
.process-step-desc { font-size: 15px; line-height: 1.65; color: var(--ink3); }

/* buttons */
.btn-fill, .btn-out, .help-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 7px 16px; border-radius: 6px;
  font: 600 14px/20px var(--font); cursor: pointer;
}
.btn-fill, .help-btn { background: var(--accent); border: 1px solid var(--accent); color: #fff; }
.btn-fill:hover, .help-btn:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: #fff; }
.btn-out { background: var(--canvas-2); border: 1px solid var(--border); color: var(--ink); }
.btn-out:hover { background: var(--canvas-3); color: var(--ink); }

/* contact + help band: a plain light box */
.contact-card, .help-band { margin-top: 24px; padding: 24px; background: var(--canvas-2); border: 1px solid var(--border-soft); border-radius: 8px; }
.cc-title, .help-band-text h3 { margin: 0 0 6px; font-size: 18px; font-weight: 600; color: var(--ink); }
.cc-sub, .help-band-text p { margin: 0 0 16px; font-size: 15px; line-height: 1.6; color: var(--ink3); }
.help-band-text p { margin-bottom: 0; }
.cc-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.help-band { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.help-band-text { flex: 1 1 340px; min-width: 0; }

/* related + next / previous */
.related-policies { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.rp-card { display: block; padding: 12px 16px; background: var(--canvas); border: 1px solid var(--border); border-radius: 6px; color: inherit; }
.rp-card:hover { border-color: var(--ink4); background: var(--canvas-2); }
.rp-card:hover .rp-title { color: var(--link-hover); }
.rp-title { font-size: 15px; font-weight: 600; color: var(--ink); }
.rp-desc { margin-top: 2px; font-size: 13.5px; line-height: 1.45; color: var(--ink3); }
.hc-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 24px 0; }
.hc-pager .prev { grid-column: 1; }
.hc-pager .next { grid-column: 2; text-align: right; }

/* ==========================================================================
   8. LEGAL INDEX (/legal)
   ========================================================================== */
.docs-section { padding: 32px 0 96px; }
.docs-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.doc-card {
  display: flex; flex-direction: column; justify-content: space-between; gap: 18px;
  padding: 20px; background: var(--canvas); border: 1px solid var(--border); border-radius: 8px; color: inherit;
}
.doc-card:hover { border-color: var(--ink4); background: var(--canvas-2); }
.doc-title { margin-bottom: 6px; font-size: 18px; font-weight: 600; color: var(--link); }
.doc-card:hover .doc-title { color: var(--link-hover); }
.doc-desc { margin: 0; font-size: 15px; line-height: 1.6; color: var(--ink3); }
.doc-status { display: none; }
.doc-meta-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; }
.doc-updated { color: var(--ink3); }
.doc-read { font-weight: 600; color: var(--link); }
[data-reveal] { opacity: 1; transform: none; }

/* ==========================================================================
   9. HELP CENTER — article content
   ========================================================================== */
.term-section.hc-doc { padding: 0; border: 0; }
.hc-doc > .term-section-body { padding: 0; }

.hc-body > *:first-child { margin-top: 0; }
.hc-body::after { content: ""; display: block; clear: both; }
.hc-body p, .hc-body li, .hc-body blockquote { font-size: 16px; line-height: 1.7; color: var(--ink2); }
.hc-body p { max-width: none; }
.hc-body ul, .hc-body ol { margin: 0 0 16px; padding-left: 24px; }
.hc-body li { margin-bottom: 6px; }
.hc-body blockquote { margin: 18px 0; padding: 2px 0 2px 16px; border-left: 4px solid var(--border); color: var(--ink3); }
.hc-body blockquote p:last-child { margin-bottom: 0; }
.hc-body hr { margin: 28px 0; border: 0; border-top: 1px solid var(--border-soft); }
.hc-body img { max-width: 100%; height: auto; }
.hc-body a.btn-fill { color: #fff; }
.hc-body .ts-highlight { margin: 20px 0; }
.hc-body code { padding: 2px 6px; border-radius: 6px; background: var(--canvas-3); color: var(--ink); font: .88em var(--font-mono); }
.hc-body kbd { padding: 1px 6px; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 6px; background: var(--canvas-2); color: var(--ink); font: .84em var(--font-mono); }

.hc-body h2.hc-h2 { margin: 40px 0 14px; padding-bottom: 8px; font-size: 26px; line-height: 1.3; font-weight: 600; color: var(--ink); border-bottom: 1px solid var(--border-soft); }
.hc-body h3.hc-h3 { margin: 30px 0 10px; font-size: 20px; line-height: 1.35; font-weight: 600; color: var(--ink); }
.hc-body h4.hc-h4 { margin: 24px 0 8px; font-size: 16px; font-weight: 600; color: var(--ink); }
.hc-body > h2.hc-h2:first-child, .hc-body > h3.hc-h3:first-child { margin-top: 0; }
.hc-body h3.ts-subhead, .hc-body h4.ts-subhead { display: block; margin: 26px 0 10px; }

/* figures, video, audio, pdf, files */
.hc-fig { max-width: 100%; margin: 24px auto; text-align: center; }
.hc-fig img { display: block; max-width: 100%; height: auto; margin: 0 auto; border: 1px solid var(--border); border-radius: 6px; background: #fff; cursor: zoom-in; }
.hc-fig[style*="width"] img { width: 100%; }
.hc-fig a img { cursor: pointer; }
.hc-fig figcaption { margin-top: 8px; font-size: 14px; line-height: 1.5; color: var(--ink3); }
.hc-fig figcaption:empty { display: none; }
.hc-fig.hc-align-left  { float: left;  margin: 4px 24px 14px 0; text-align: left; }
.hc-fig.hc-align-right { float: right; margin: 4px 0 14px 24px; text-align: left; }

.hc-video { position: relative; max-width: 100%; margin: 24px auto; aspect-ratio: 16 / 9; overflow: hidden; background: #000; border-radius: 6px; }
.hc-video iframe, .hc-video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.hc-vposter { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: #000 center / cover no-repeat; cursor: pointer; }
.hc-vplay { position: absolute; left: 50%; top: 50%; width: 60px; height: 60px; margin: -30px 0 0 -30px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(0, 0, 0, .7); color: #fff; font-size: 20px; }
.hc-vposter:hover .hc-vplay { background: var(--accent); }
.hc-audio { margin: 18px 0; }
.hc-audio audio { width: 100%; }

.hc-pdf { margin: 24px 0; overflow: hidden; background: #fff; border: 1px solid var(--border); border-radius: 6px; }
.hc-pdf-bar { display: flex; align-items: center; gap: 14px; padding: 9px 14px; background: var(--canvas-2); border-bottom: 1px solid var(--border); font-size: 14px; font-weight: 600; color: var(--ink); }
.hc-pdf-bar span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hc-pdf-bar a { font-size: 13px; font-weight: 400; color: var(--link); }
.hc-pdf-bar a:hover { color: var(--link-hover); }
.hc-pdf iframe { display: block; width: 100%; height: 72vh; min-height: 420px; border: 0; }
.hc-pdf > a { display: block; padding: 14px 16px; }

.hc-file { display: block; max-width: 540px; margin: 16px 0; padding: 12px 16px; background: var(--canvas); border: 1px solid var(--border); border-radius: 6px; color: var(--ink) !important; }
.hc-file:hover { border-color: var(--ink4); background: var(--canvas-2); }
.hc-file-name { display: block; font-size: 15px; font-weight: 600; }
.hc-file-meta { display: block; font-size: 13px; color: var(--ink3); }

/* FAQ */
.hc-faq { margin: 0; background: none; border: 0; border-bottom: 1px solid var(--border-soft); }
.hc-faq:first-of-type { border-top: 1px solid var(--border-soft); }
.hc-faq > summary, .hc-faq-q { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 4px; list-style: none; cursor: pointer; font-size: 16px; font-weight: 600; color: var(--ink); }
.hc-faq > summary::-webkit-details-marker { display: none; }
.hc-faq > summary:hover { color: var(--link-hover); }
.hc-faq > summary::after {
  content: ""; flex: none; width: 16px; height: 16px; font: 0/0 a;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%2359636e' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px 16px no-repeat;
  transition: transform .15s;
}
.hc-faq[open] > summary::after { transform: rotate(180deg); }
.hc-faq-a { padding: 0 4px 16px; }
.hc-faq-a > *:last-child { margin-bottom: 0; }

/* numbered steps */
.hc-steps { list-style: none; counter-reset: st; margin: 22px 0; padding: 0 !important; }
.hc-steps > li { counter-increment: st; position: relative; margin: 0; padding: 0 0 20px 46px; }
.hc-steps > li::before {
  content: counter(st); position: absolute; left: 0; top: 0; width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: 50%; background: var(--canvas-2);
  font: 600 13px var(--font); color: var(--ink);
}
.hc-steps > li::after { content: ""; position: absolute; left: 13px; top: 34px; bottom: 4px; width: 1px; background: var(--border); }
.hc-steps > li:last-child::after { display: none; }

/* code: light, like GitHub */
.hc-code { margin: 20px 0; overflow: hidden; background: var(--canvas-2); border: 1px solid var(--border); border-radius: 6px; color: var(--ink); }
.hc-code-head { display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 14px; background: var(--canvas-2); border-bottom: 1px solid var(--border); font: 500 13px var(--font); }
.hc-code-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink3); }
.hc-code-btn { padding: 4px 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--canvas); color: var(--ink); font: 500 13px var(--font); cursor: pointer; }
.hc-code-btn:hover { background: var(--canvas-3); }
.hc-code-btn.run { background: var(--accent); border-color: var(--accent); color: #fff; }
.hc-code pre { margin: 0; padding: 14px 16px; overflow: auto; max-height: 560px; }
.hc-code code, .hc-code .hljs { display: block; padding: 0 !important; background: none !important; color: inherit; border-radius: 0; font: 13px/1.6 var(--font-mono); white-space: pre; tab-size: 2; }
.hc-code-out { background: #fff; border-top: 1px solid var(--border); }
.hc-code-out-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 14px; background: var(--canvas-2); color: var(--ink2); font: 600 13px var(--font); }
.hc-code-out-head button { border: 0; background: none; color: var(--ink2); font: 500 13px var(--font); cursor: pointer; }
.hc-code-out iframe { display: block; width: 100%; height: 300px; border: 0; background: #fff; resize: vertical; }

/* ==========================================================================
   10. HELP CENTER — lists, search results, feedback
   ========================================================================== */
.hc-sec-title { margin: 0; font-size: 18px; font-weight: 600; color: var(--ink); }
.hc-more { display: inline-block; margin-top: 8px; font-size: 14.5px; font-weight: 500; color: var(--link); }
.hc-more:hover { color: var(--link-hover); }

.hc-list-links { margin: 0 0 6px; padding: 0; list-style: none; }
.hc-list-links li { border-top: 1px solid var(--border-soft); }
.hc-list-links li:first-child { border-top: 0; }
.hc-list-links a { display: block; padding: 10px 0; font-size: 15.5px; font-weight: 500; color: var(--link); }
.hc-list-links a:hover { color: var(--link-hover); }
.hc-list-links small { display: block; margin-top: 2px; font-size: 14px; font-weight: 400; line-height: 1.5; color: var(--ink3); }

/* search results: like a search engine — path, blue title, snippet */
.hc-res { display: block; margin: 0 0 26px; padding: 0; }
.hc-res small.c { display: block; margin-bottom: 3px; font-size: 13px; color: var(--ink3); }
.hc-res b { display: block; font-size: 20px; line-height: 1.35; font-weight: 400; color: var(--link); }
.hc-res:hover b { color: var(--link-hover); }
.hc-res p { margin: 4px 0 0; font-size: 15px; line-height: 1.6; color: var(--ink2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* feedback */
.hc-fb { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.hc-fb > p { flex: 1; min-width: 180px; margin: 0; }
.hc-fb button { padding: 6px 16px; border: 1px solid var(--border); border-radius: 6px; background: var(--canvas); font: 500 14px var(--font); color: var(--ink); cursor: pointer; }
.hc-fb button:hover { background: var(--canvas-2); }
.hc-fb .after { display: none; width: 100%; }
.hc-fb textarea { display: block; width: 100%; margin: 8px 0; padding: 8px 12px; border: 1px solid var(--border); border-radius: 6px; resize: vertical; font: 400 14.5px/1.5 var(--font); color: var(--ink); }

.hc-lightbox { position: fixed; inset: 0; z-index: 9999; display: none; align-items: center; justify-content: center; padding: 24px; background: rgba(255, 255, 255, .96); cursor: zoom-out; }
.hc-lightbox.open { display: flex; }
.hc-lightbox img { max-width: 100%; max-height: 100%; border: 1px solid var(--border); border-radius: 6px; background: #fff; }

/* scroll buttons */
.scroll-buttons { position: fixed; right: clamp(10px, 1.4vw, 20px); bottom: 24px; z-index: 150; display: flex; flex-direction: column; gap: 8px; }
.scroll-btn { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: 50%; background: var(--canvas); color: var(--ink3); font-size: 12px; cursor: pointer; }
.scroll-btn:hover { background: var(--canvas-2); color: var(--ink); }

/* ==========================================================================
   11. NO UNDERLINES (last rule on purpose: it also beats leftover inline CSS)
   ========================================================================== */
a, a:hover, a:focus, a:active { text-decoration: none !important; }

/* ==========================================================================
   12. RESPONSIVE
   ========================================================================== */
@media (max-width: 1180px) and (min-width: 1081px) {
  :root { --sidebar-w: 236px; --gap: 28px; }
}

/* tablet and below: the sidebar becomes a small floating topics panel.
   doc-drawer.js creates the little button (top-left, shown while scrolling, hidden after
   3 seconds of no movement), the dimmed backdrop and the panel header. */
.dd-toggle, .dd-backdrop, .dd-head { display: none; }

@media (max-width: 1080px) {
  .content-grid { display: block; }
  .related-policies { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  html.dd-open, html.dd-open body { overflow: hidden; }

  /* keep the up/down buttons above the navbar's bottom row */
  .scroll-buttons { bottom: calc(var(--mobile-bar) + 12px + env(safe-area-inset-bottom, 0px)); }

  /* the panel: anchored under the navbar, never full screen */
  .toc-sidebar {
    position: fixed; z-index: 100010;
    top: calc(var(--pz-h, 64px) + 10px); left: 10px;
    width: min(calc(100vw - 20px), 380px);
    max-height: calc(100vh - var(--pz-h, 64px) - 110px);          /* leaves the mobile navbar's bottom row free */
    max-height: min(560px, calc(100dvh - var(--pz-h, 64px) - 110px));
    margin: 0; padding: 0 0 8px; gap: 0;
    background: var(--canvas); border: 1px solid var(--border); border-radius: 12px;
    box-shadow: 0 12px 32px rgba(31, 35, 40, .2);
    overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
    opacity: 0; visibility: hidden; transform: translateY(-8px) scale(.98); transform-origin: top left;
    transition: opacity .16s ease, transform .16s ease, visibility 0s linear .16s;
  }
  html.dd-open .toc-sidebar { opacity: 1; visibility: visible; transform: none; transition: opacity .16s ease, transform .16s ease, visibility 0s; }

  .dd-head {
    display: flex; flex: none; align-items: center; justify-content: space-between; gap: 12px;
    position: sticky; top: 0; z-index: 2; padding: 10px 10px 10px 16px;
    background: var(--canvas); border-bottom: 1px solid var(--border-soft);
  }
  .dd-title { font-size: 15px; font-weight: 600; color: var(--ink); }
  .dd-close { padding: 5px 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--canvas-2); color: var(--ink); font: 500 14px var(--font); cursor: pointer; }
  .dd-close:hover { background: var(--canvas-3); }

  .toc-sidebar .toc-card { padding: 10px 10px 4px; }
  .toc-sidebar .toc-card + .toc-card { border-top: 1px solid var(--border-soft); }
  .toc-sidebar .toc-header { padding: 4px 8px 6px; }

  .dd-backdrop {
    display: block; position: fixed; inset: 0; z-index: 100000;
    background: rgba(31, 35, 40, .35); opacity: 0; pointer-events: none; transition: opacity .16s;
  }
  html.dd-open .dd-backdrop { opacity: 1; pointer-events: auto; }

  /* the button: top-left under the navbar; fades in on scroll/touch, fades out when idle */
  .dd-toggle {
    display: inline-flex; align-items: center; gap: 9px;
    position: fixed; top: calc(var(--pz-h, 64px) + 10px); left: 10px; z-index: 900;
    padding: 8px 14px; border: 1px solid var(--border); border-radius: 999px;
    background: var(--canvas); color: var(--ink); box-shadow: 0 2px 8px rgba(31, 35, 40, .14);
    font: 600 14px/20px var(--font); cursor: pointer;
    opacity: 0; transform: translateY(-6px); pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
  }
  .dd-toggle::before {                       /* three plain lines */
    content: ""; width: 14px; height: 10px; flex: none;
    background:
      linear-gradient(currentColor, currentColor) 0 0 / 100% 2px no-repeat,
      linear-gradient(currentColor, currentColor) 0 50% / 100% 2px no-repeat,
      linear-gradient(currentColor, currentColor) 0 100% / 100% 2px no-repeat;
  }
  .dd-toggle:hover { background: var(--canvas-2); }
  html.dd-show .dd-toggle, .dd-toggle:focus-visible { opacity: 1; transform: none; pointer-events: auto; }
  html.dd-open .dd-toggle { opacity: 0; pointer-events: none; }

  /* roomier touch rows inside the panel */
  .toc-sidebar .toc-link { padding-top: 9px; padding-bottom: 9px; font-size: 15px; }
  .toc-sidebar .hc-kids .toc-link { font-size: 14.5px; }
  #toc-body .toc-link { padding-top: 8px; padding-bottom: 8px; font-size: 14.5px; }
  .toc-sidebar .hc-tg > summary::after { width: 40px; height: 38px; }
}

@media (max-width: 760px) {
  :root { --edge: 16px; --gap: 20px; }
  .content-area { padding: 24px 0 72px; }
  .rights-grid, .related-policies, .docs-grid { grid-template-columns: minmax(0, 1fr); }
  .update-bar { flex-wrap: wrap; gap: 6px; }
}

@media (max-width: 640px) {
  .page-hero { padding: 24px 0 20px; }
  .legal-hero { padding: 32px 0 26px; }
  .page-hero-inner { flex-direction: column; align-items: flex-start; }
  .ph-breadcrumb { margin-bottom: 10px; font-size: 13px; }
  .ph-sub, .hero-subtitle { font-size: 16px; }

  .search-nav { display: none; }
  .search-input { font-size: 16px; }

  .term-section { padding: 24px 0; }
  .term-section-header { gap: 10px; margin-bottom: 12px; }
  .ts-title { font-size: 21px; }
  .ts-sub { font-size: 14px; }
  .ts-text, .normal-text p, .ts-list, .hc-body p, .hc-body li { font-size: 15.5px; }
  .ts-table { font-size: 13.5px; }
  .ts-table thead th, .ts-table tbody td { padding: 8px 10px; }

  .contact-card, .help-band { padding: 20px 16px; }
  .cc-btns { flex-direction: column; align-items: stretch; }
  .help-btn { width: 100%; }

  .hc-body h2.hc-h2 { font-size: 22px; margin-top: 32px; }
  .hc-body h3.hc-h3 { font-size: 18px; }
  .hc-fig.hc-align-left, .hc-fig.hc-align-right { float: none; margin: 22px auto; }
  .hc-fig[style*="width"] { width: 100% !important; }
  .hc-pdf iframe { height: 60vh; }
  .hc-pager { grid-template-columns: minmax(0, 1fr); }
  .hc-pager .next { grid-column: 1; }
  .hc-res b { font-size: 18px; }

  .scroll-buttons { right: 10px; bottom: calc(var(--mobile-bar) + 12px + env(safe-area-inset-bottom, 0px)); }
  .scroll-btn { width: 34px; height: 34px; }
}

@media (max-width: 380px) {
  :root { --edge: 14px; }
  .ph-title, .legal-hero h1 { font-size: 24px; }
  .ts-title { font-size: 19px; }
}

/* ==========================================================================
   13. MOTION + PRINT
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

@media print {
  .read-progress, .toc-sidebar, .scroll-buttons, .search-container, .contact-card, .help-band,
  .related-policies, .hc-pager, #hcFb, .hc-lightbox, .dd-toggle, .dd-backdrop, .dd-head { display: none !important; }
  .content-grid { display: block; }
  .term-section { break-inside: avoid-page; }
  body { color: #000; }
  a { color: #000 !important; }
}
