/*
 * Public-site responsive layer. Page layout is mostly React inline styles, so
 * mobile overrides target explicit hook classes (hc-*, hcrn-*) set on the
 * reusable components / sections; !important is used only inside these
 * hooks to beat the inline desktop values. Desktop (>900px) is unchanged.
 */
.hcrn-menu-btn { display: none; }
.hcrn-menu-panel[hidden] { display: none !important; }
.hcrn-menu-panel { display: none; }
/* Checkbox rows: whole label is the tap target; the box itself keeps its size. */
.hc-check { min-height: 44px; cursor: pointer; }
/* Horizontal tables / wide mono rows — scroll instead of page overflow. */
.hc-scroll-x { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.hc-pre { white-space: pre-wrap !important; word-break: break-word !important; overflow-wrap: anywhere; }

@media (max-width: 900px) {
  /* Specificity is raised to beat the chrome CSS injected later by shared-ui. */
  header.hcrn-chrome .hcrn-chrome-inner { padding: 0 12px 0 16px; gap: 8px; }
  header.hcrn-chrome .hcrn-chrome-inner .hcrn-chrome-nav { display: none; }
  header.hcrn-chrome .hcrn-chrome-inner .hc-desk-only { display: none !important; }
  header.hcrn-chrome .hcrn-chrome-inner .hcrn-chrome-brand { min-height: 44px; }
  header.hcrn-chrome .hcrn-chrome-actions > a,
  header.hcrn-chrome .hcrn-chrome-actions > button {
    min-height: 44px; box-sizing: border-box; align-items: center; justify-content: center;
  }
  header.hcrn-chrome .hcrn-chrome-actions > a.hc-cta-wide { display: inline-flex !important; }
  header.hcrn-chrome .hc-tap { width: 44px !important; height: 44px !important; }
  .hcrn-menu-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; padding: 0; border-radius: 8px; cursor: pointer;
    background: transparent; border: 1px solid rgba(120,128,140,0.35); color: inherit;
    font: inherit;
  }
  .hcrn-menu-panel {
    display: block; position: absolute; left: 0; right: 0; top: 100%;
    max-height: calc(100vh - 56px); overflow-y: auto; box-sizing: border-box;
    padding: 8px 16px 16px; border-bottom: 1px solid rgba(120,128,140,0.25);
    box-shadow: 0 12px 24px rgba(0,0,0,0.12);
  }
  .hcrn-menu-panel nav { display: flex; flex-direction: column; }
  .hcrn-menu-panel a {
    display: flex; align-items: center; min-height: 44px; box-sizing: border-box;
    padding: 0 8px; text-decoration: none; font-size: 15px; border-radius: 8px;
  }
  .hcrn-menu-panel a[aria-current] { font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
  .hcrn-menu-panel .hcrn-menu-extra { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
  .hcrn-menu-panel .hcrn-menu-extra a { padding: 0 14px; border: 1px solid rgba(120,128,140,0.35); font-weight: 600; font-size: 14px; }

  .hc-sec { padding-left: 20px !important; padding-right: 20px !important; }
  .hc-stack,
  .hc-stack-sm { grid-template-columns: minmax(0, 1fr) !important; gap: 28px !important; }
  .hc-2up { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .hc-3up { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .hc-footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 24px !important; }
  .hc-footer-grid > :first-child { grid-column: 1 / -1; }
  .hc-row-stack { grid-template-columns: 30px minmax(0, 1fr) !important; row-gap: 6px !important; }
  .hc-row-stack > :nth-child(n+3) { grid-column: 2; }
  .hc-row-wrap { grid-template-columns: minmax(0, 1fr) !important; row-gap: 4px !important; }
  .hc-api-row { grid-template-columns: 50px minmax(0, 1fr) !important; row-gap: 2px !important; }
  .hc-api-row > :last-child { grid-column: 2; }
  .hc-req-row { grid-template-columns: 72px minmax(0, 1fr) !important; row-gap: 4px !important; }
  .hc-req-row > :last-child { grid-column: 2; }
  .hc-card-head { flex-direction: column !important; align-items: flex-start !important; }
  .hc-card-head > :last-child { align-items: flex-start !important; }
  .hc-h1 { font-size: clamp(36px, 8.5vw, 60px) !important; line-height: 1.02 !important; }
  .hc-h1s { font-size: clamp(30px, 7vw, 44px) !important; line-height: 1.08 !important; }
  .hc-h2 { font-size: clamp(28px, 6vw, 40px) !important; }
  .hc-copy { min-height: 44px; min-width: 44px; }
  .hc-copypre { padding-right: 76px !important; }
  .hc-codeblock { padding-top: 60px !important; }
  .hc-codeblock .hc-copy { top: 8px !important; right: 8px !important; }
  .hc-pill { white-space: normal !important; }
  .hc-meta { flex-wrap: wrap !important; gap: 6px 12px !important; }
  .hc-shard-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
}

@media (max-width: 560px) {
  header.hcrn-chrome .hcrn-chrome-actions > a.hc-cta-wide.hc-cta-wide { display: none !important; }
  .hc-2up,
  .hc-3up { grid-template-columns: minmax(0, 1fr) !important; }
  .hc-h1s { font-size: 34px !important; line-height: 1.08 !important; }
  .hc-pill { white-space: normal !important; font-size: 9px !important; letter-spacing: 0.04em !important; }
  .hc-footer-grid { grid-template-columns: minmax(0, 1fr) !important; }
}
