/* Mobile analytics, aligned with the Windows Post analytics screen. */
:root { font-family: "Segoe UI", Arial, Helvetica, sans-serif; background: #101b27; color: #edf3f8; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline-color: #60aeff; }
a { color: #86c5ff; }

.masthead { position: sticky; top: 0; z-index: 20; background: #142332; border-bottom: 2px solid #347fc5; }
.masthead-inner { max-width: 1120px; min-height: 53px; padding: 0 24px; }
.brand { gap: 9px; font-size: 13px; font-weight: 600; }
.brand-mark { display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 0; background: transparent; }
.brand-mark img { display: block; width: 100%; height: 100%; object-fit: contain; }
.private-label, .subtle { color: #a8bdd0; }
.private-label { font-size: 11px; }
.text-button { color: #9ccfff; font-size: 12px; }

main { max-width: 1120px; padding: 24px 24px 64px; }
h1 { margin-bottom: 5px; font-size: 27px; letter-spacing: -.02em; }
h2 { font-size: 15px; }
.subtle { font-size: 12px; }
.page-heading { margin-bottom: 19px; }
.page-heading p { margin-top: 3px; }
.section-heading { margin: 18px 0 9px; }
.primary-button, .secondary-button { min-height: 38px; padding: 7px 13px; border-radius: 7px; font-size: 13px; font-weight: 600; }
.primary-button { border-color: #3287db; background: #2579ca; color: white; }
.secondary-button { border-color: #3b5871; background: #192b3c; color: #e8f1f8; }
.primary-button:hover, .secondary-button:hover { filter: brightness(1.12); }
.gate { border-color: #38546b; border-radius: 9px; background: #17293a; }
.gate p { color: #b6c9d9; }
.message { border-left: 3px solid #c29b61; border-radius: 5px; background: #273647; }
.demo-label { border-color: #627d53; border-radius: 5px; background: #293626; color: #dbeccc; }

.summary-grid { gap: 0; border-bottom: 1px solid #344b60; }
.summary-card { min-width: 0; padding: 0 17px 16px; border: 0; border-right: 1px solid #344b60; border-radius: 0; background: transparent; }
.summary-card:first-child { padding-left: 0; }
.summary-card:last-child { border-right: 0; }
.summary-card span, .metric-card span { color: #a9bed0; }
.summary-card strong { margin-top: 5px; font-size: 26px; }

.filters-disclosure { margin: 17px 0 21px; border: 1px solid #3a566e; border-radius: 7px; background: #192b3c; }
.filters-disclosure:not([open]) > .filters { display: none; }
.filters-disclosure summary { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 9px 13px; cursor: pointer; list-style: none; }
.filters-disclosure summary:focus-visible { outline: 2px solid #60aeff; outline-offset: 3px; }
.filters-disclosure summary::-webkit-details-marker { display: none; }
.filters-disclosure summary::after { content: '⌄'; margin-left: auto; color: #a8bdd0; font-size: 18px; line-height: 1; }
.filters-disclosure[open] summary::after { transform: rotate(180deg); }
.filters-disclosure summary>span:first-child { flex: none; font-size: 13px; font-weight: 600; }
.filter-summary { min-width: 0; overflow: hidden; color: #a8bdd0; font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
.filters-disclosure .filters { gap: 11px; margin: 0; padding: 12px 13px 14px; border-top: 1px solid #344b60; }
.filters label { min-width: 0; color: #a9bed0; font-size: 11px; }
.filters select, .filters input { height: 38px; margin-top: 5px; padding: 0 10px; border-color: #3a566e; border-radius: 6px; background: #192b3c; color: #edf3f8; font-size: 13px; }
.filters input::placeholder { color: #91a9bc; }

.post-list { border-top-color: #344b60; }
.post-row { min-height: 67px; gap: 11px; padding: 8px 3px; border-bottom-color: #2c4053; }
.post-row:hover { background: #172b3e; }
.post-thumb, .detail-image { background: #20374b; color: #b9d6eb; }
.post-thumb { width: 45px; height: 49px; border-radius: 4px; }
.post-copy strong { font-size: 13px; font-weight: 600; }
.post-meta { display: flex; align-items: center; min-width: 0; margin-top: 5px; color: #a7bbcc; font-size: 11px; }
.platform-icon { width: 16px; height: 16px; }
.platform-icon.facebook { color: #6fb1ff; }
.platform-icon.instagram { color: #eca4ce; }
.post-thumb .platform-icon, .detail-image-inner .platform-icon { width: 25px; height: 25px; }
.post-values { min-width: 65px; }
.post-values strong { font-size: 14px; }
.post-values small { margin-top: 4px; color: #94aabd; font-size: 11px; }
.empty { color: #a7bbcc; }
.show-more { margin: 16px auto; }

.detail-toolbar { display: flex; align-items: center; margin-bottom: 8px; }
.detail-toolbar .back-button { padding: 0; color: #8fc7ff; font-size: 13px; }
.detail-icon-row { display: flex; align-items: center; min-height: 44px; white-space: nowrap; }
.detail-platform, .detail-icon-control { display: grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 6px; background: transparent; }
.detail-platform .platform-icon, .detail-icon-control svg { display: block; width: 20px; height: 20px; }
.detail-platform .platform-icon.facebook { border-radius: 50%; background: #357fd6; color: #fff; }
.detail-platform .platform-icon.instagram { padding: 2px; border-radius: 5px; background: linear-gradient(135deg, #7b48c6, #d6448a 55%, #f1a440); color: #fff; }
.detail-icon-control { color: #9ccfff; text-decoration: none; }
.detail-icon-control:hover { background: #203b53; }
.detail-icon-control.is-loading { cursor: progress; }
.detail-icon-control.is-loading .refresh-icon { animation: detail-refresh-spin .8s linear infinite; }
.detail-date { margin-left: auto; color: #a8bdd0; font-size: 11px; font-variant-numeric: tabular-nums; }
@keyframes detail-refresh-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .detail-icon-control.is-loading .refresh-icon { animation: none; } }
.toast { position: fixed; z-index: 30; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); width: max-content; max-width: calc(100vw - 32px); padding: 10px 16px; border: 1px solid #4a657d; border-radius: 8px; background: #1a3043; color: #edf3f8; box-shadow: 0 8px 24px #0008; font-size: 13px; text-align: center; pointer-events: none; opacity: 0; transform: translate(-50%, 12px); transition: opacity .2s ease, transform .2s ease; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }
.detail-intro { gap: 10px; padding: 8px 0 10px; border-bottom: 1px solid #344b60; margin-bottom: 11px; background: #101b27; }
.detail-image { width: 84px; height: 96px; border-radius: 5px; }
.detail-info { flex: 1; min-width: 0; min-height: 96px; display: flex; flex-direction: column; }
.detail-intro h1 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; margin: 0; font-size: 19px; line-height: 1.25; }
.metric-grid { gap: 9px; }
.metric-card { min-width: 0; padding: 13px; border-color: #385168; border-radius: 8px; background: #152637; }
.metric-card strong { margin: 6px 0 5px; font-size: 23px; }
.metric-card small { color: #a8bdd0; }
.metric-card small.positive { color: #88d8af; }
.metric-card small.negative { color: #efaaa5; }
.chart-card { margin-top: 13px; padding: 14px; border-color: #385168; border-radius: 8px; background: #142536; }
.chart-legend { flex-wrap: wrap; gap: 15px; color: #a9bdce; font-size: 11px; }
.legend-mark { background: #4da1ff; }
.legend-mark.peer { background: #9ac8e8; }
.chart-grid { stroke: #344e65; }
.chart-current { stroke: #4da1ff; }
.chart-peer { stroke: #9ac8e8; }
.chart-axis { fill: #a9bdce; }
.chart-end { fill: #4da1ff; }
.loading-spinner { border-top-color: #4da1ff; }

@media (max-width: 700px) {
  .detail-mode main { padding-top: 10px; }
  .detail-mode .detail-toolbar { display: none; }
  .detail-mode .detail-intro { position: sticky; top: 61px; z-index: 19; }
  .masthead-inner { min-height: 49px; padding: 0 15px; }
  main { padding: 19px 15px 56px; }
  h1 { font-size: 23px; }
  .page-heading { margin-bottom: 17px; }
  .summary-grid { gap: 0; }
  .summary-card { padding: 0 10px 12px; }
  .summary-card:first-child { padding-left: 0; }
  .summary-card strong { font-size: 20px; }
  .filters { gap: 9px; }
  .filters select, .filters input { height: 44px; font-size: 16px; }
  .primary-button, .secondary-button { min-height: 44px; }
  .detail-image { width: 64px; height: 84px; }
  .detail-info { min-height: 84px; }
  .detail-intro h1 { font-size: 16px; line-height: 1.2; }
}
@media (max-width: 380px) {
  .brand { font-size: 12px; }
  .post-thumb { width: 40px; height: 45px; }
  .post-row { gap: 8px; }
  .post-copy strong { font-size: 12px; }
  .post-values { min-width: 58px; }
  .post-values strong { font-size: 12px; }
  .metric-card { padding: 10px; }
  .metric-card strong { font-size: 20px; }
}
