/*
 * California58 mobile article repair — staged, NOT live.
 * Load AFTER main.css and other editorial CSS. Do not solve overflow by hiding body overflow.
 */
@media (max-width: 760px) {
  body.single .article-body table.c58-readable-table,
  body.single :is(.entry-content,.post-content) table.c58-readable-table,
  .article-body div[style*="overflow-x:auto"] > table.c58-readable-table {
    display:block !important;
    box-sizing:border-box !important;
    width:100% !important; min-width:0 !important; max-width:100% !important;
    margin:20px 0 !important; overflow:visible !important;
    border:0 !important; border-radius:0 !important; background:transparent !important;
  }
  .article-body div[style*="overflow-x:auto"]:has(>table.c58-readable-table) {
    overflow:visible !important; width:100% !important; max-width:100% !important;
    border:0 !important; background:transparent !important;
  }
  .article-body div[style*="overflow-x:auto"]:has(>table.c58-readable-table)::before { content:none !important; display:none !important; }
  body .article-body table.c58-readable-table thead,
  body :is(.entry-content,.post-content) table.c58-readable-table thead {
    position:absolute !important; height:1px !important; width:1px !important;
    overflow:hidden !important; clip-path:inset(50%) !important; white-space:nowrap !important;
  }
  body :is(.article-body,.entry-content,.post-content) table.c58-readable-table tbody {
    display:block !important; width:100% !important; min-width:0 !important;
  }
  body :is(.article-body,.entry-content,.post-content) table.c58-readable-table tbody tr {
    display:block !important; box-sizing:border-box !important; width:100% !important;
    min-width:0 !important; margin:0 0 13px !important; padding:0 !important;
    border:1px solid #d6e2e8 !important; border-radius:10px !important; background:#fff !important;
    overflow:hidden !important; box-shadow:0 2px 6px rgba(15,37,48,.06) !important;
  }
  body :is(.article-body,.entry-content,.post-content) table.c58-readable-table tbody td {
    display:block !important; box-sizing:border-box !important;
    width:100% !important; min-width:0 !important; max-width:none !important;
    margin:0 !important; padding:11px 15px !important;
    border:0 !important; border-bottom:1px solid #e9eef1 !important;
    font-size:16px !important; line-height:1.55 !important;
    text-align:left !important; overflow-wrap:anywhere !important;
    word-break:normal !important; white-space:normal !important; height:auto !important;
  }
  body :is(.article-body,.entry-content,.post-content) table.c58-readable-table tbody td:last-child {
    border-bottom:0 !important;
  }
  body :is(.article-body,.entry-content,.post-content) table.c58-readable-table tbody td::before {
    content:attr(data-c58-label) !important; display:block !important;
    margin:0 0 5px !important; color:#27516c !important;
    font:750 12px/1.4 system-ui,-apple-system,sans-serif !important;
    text-transform:uppercase !important; letter-spacing:.035em !important;
  }
  :is(.article-body,.entry-content,.post-content) .c58-ig-embed-shell {
    display:block !important; width:100% !important; max-width:100% !important;
    overflow:visible !important; padding:0 !important; margin:18px auto !important;
  }
  .c58-ig-embed-shell blockquote.instagram-media,
  .c58-ig-embed-shell iframe.instagram-media-rendered {
    max-width:100% !important; min-width:0 !important; box-sizing:border-box !important;
  }
  .c58-ig-embed-shell iframe.instagram-media-rendered { display:block !important; max-width:100% !important; /* Instagram SDK owns iframe height: never force auto, initial or 0. */ }
}
/* Persist a real source link if Meta prevents the embed from loading; don't impersonate or rehost content. */
.c58-ig-embed-shell .c58-ig-source-link {display:block;margin:8px 0 0;color:#135879;text-decoration:underline;font:650 13px/1.5 system-ui,sans-serif}
.c58-ig-embed-shell .c58-ig-source-link:focus-visible {outline:3px solid #e8a53a;outline-offset:3px}

/* Only display a compact source fallback when Instagram actually blocks the embed. */
.c58-ig-embed-shell .c58-ig-fallback[hidden] {display:none!important}
.c58-ig-embed-shell .c58-ig-fallback:not([hidden]) {display:block;margin:10px 0 20px;font:600 13px/1.5 system-ui,sans-serif}

/* The Top button remains usable but no longer floats over article prose. */
@media (max-width:760px) {
  html body.single .c58-back-to-top {
    position:static!important;display:block!important;right:auto!important;
    bottom:auto!important;transform:none!important;
    max-width:calc(100% - 32px)!important;min-height:44px!important;
    margin:22px 16px 28px auto!important;box-shadow:none!important;
  }
}
