/* Social > Overview > How it is doing (js/social-glance.js, Kate, 23 Nov 2026). Built from docs/mockups/social-overview.html.
   Every part has the sg- prefix. Colours are the shell's own tokens; the Instagram colour is set by the script (socCols) as --sg-ig. */
.sg .sg-tools{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.sg-d{font-weight:700;white-space:nowrap}.sg-d.up{color:var(--good,#3E7A5E)}.sg-d.down{color:var(--bad,#A03C3C)}
.sg-ans{margin-top:6px;padding:14px 16px;border:1px solid var(--border);border-radius:14px;background:var(--surface)}
.sg-big{font-family:var(--serif,Georgia,serif);font-size:22px;line-height:1.3;margin-top:4px}
.sg-ask{margin:8px 0 0;font-size:14px;color:var(--muted)}
.sg-tiles{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:10px}
.sg-tile{background:var(--surface);border:1px solid var(--border);border-radius:14px;padding:12px 14px;min-height:104px;display:flex;flex-direction:column;gap:2px}
.sg-l{font-size:13px;color:var(--muted)}
.sg-v{font-family:var(--serif,Georgia,serif);font-size:30px;line-height:1.1;font-variant-numeric:tabular-nums}
.sg-c{font-size:13px;color:var(--muted)}
.sg-grid{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);gap:10px;margin-top:10px}
.sg-grid.sg-g3{grid-template-columns:repeat(3,minmax(0,1fr));margin-top:6px}
.sg-card{padding:14px 16px;min-width:0;border:1px solid var(--border);border-radius:14px;background:var(--surface)}
.sg-card h4{font-size:17px;margin:0 0 2px;font-family:var(--serif,Georgia,serif);font-weight:500}
.sg-hint{margin:0 0 10px;font-size:13px;color:var(--muted)}
.sg-sec{margin-top:22px}
.sg-sec h3{font-size:20px;margin:0 0 4px;font-family:var(--serif,Georgia,serif);font-weight:500}
.sg-mh{margin:8px 0 2px;font-size:13px;font-weight:600}
.sg-tag{display:inline-block;font-size:12px;border-radius:999px;padding:2px 10px;white-space:nowrap;background:var(--surface2,var(--surface));color:var(--muted)}
.sg-tag.warn{background:var(--warn-bg,#FBF3E2);color:var(--warn,#8A5F12)}
.sg-tag.stand{border:1px dashed var(--muted2,var(--muted));background:none}
.sg-row{display:grid;grid-template-columns:150px minmax(0,1fr) 78px 62px;gap:10px;align-items:center;padding:8px 10px;margin:0 -10px;border:1px solid transparent;border-radius:12px;position:relative;outline:none;transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease,background .15s ease}
.sg-row.sg-r2{grid-template-columns:96px minmax(0,1fr) 66px 58px}
.sg-nm{font-size:14px;line-height:1.25}
.sg-nm small{display:block;color:var(--muted2,var(--muted));font-size:12.5px}
.sg-trk{height:6px;border-radius:999px;background:var(--surface2,var(--border));position:relative}
.sg-fill{position:absolute;left:0;top:0;bottom:0;border-radius:999px;background:var(--c);transition:filter .15s ease,box-shadow .15s ease}
.sg-tick{position:absolute;top:-4px;bottom:-4px;width:2px;border-radius:2px;background:var(--text);opacity:.55}
.sg-row > .dn,.sg-row > span:nth-child(3){justify-self:end;font-weight:700;text-align:right;font-variant-numeric:tabular-nums}
.sg-n{justify-self:end;text-align:right;color:var(--muted);font-size:13.5px;font-variant-numeric:tabular-nums}
.sg-n .dn{font-weight:400}
.sg-stack{display:flex;height:10px;gap:3px;margin:4px 0 10px}
.sg-seg2{flex:var(--n);min-width:4px;border-radius:999px;background:var(--c);transition:transform .15s ease,filter .15s ease,box-shadow .15s ease}
.sg-cols{display:grid;gap:8px;align-items:end;height:212px}
.sg-col{color:var(--text);font:inherit;display:flex;flex-direction:column;justify-content:flex-end;align-items:stretch;gap:4px;height:100%;border:1px solid transparent;border-radius:10px;padding:4px 2px;background:none;cursor:pointer;outline:none;transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease}
.sg-cv{font-size:12.5px;font-weight:700;text-align:center;font-variant-numeric:tabular-nums}
.sg-cb{border-radius:6px 6px 3px 3px;background:var(--c);min-height:3px;transition:filter .15s ease,box-shadow .15s ease}
.sg-cl{font-size:12.5px;color:var(--muted);text-align:center;white-space:nowrap}
.sg-weekrows{display:none}
.sg-item{display:grid;grid-template-columns:44px minmax(0,1fr) auto;gap:12px;align-items:center;padding:10px;margin:0 -10px;border:1px solid transparent;border-radius:12px;position:relative;outline:none;transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease}
.sg-bd{width:44px;height:44px;border-radius:12px;background:var(--c);color:#fff;display:grid;place-items:center;font-size:13px;font-weight:700}
html[data-theme="dark"] .sg-bd{color:#1A1A1A}
.sg-it{font-weight:600;font-size:15px;line-height:1.3}
.sg-is{font-size:13.5px;color:var(--muted);margin-top:1px}
.sg-flag{margin-top:6px}
.sg-go{display:flex;flex-direction:column;align-items:flex-end;gap:6px}
.sg-big2{font-family:var(--serif,Georgia,serif);font-size:22px;font-variant-numeric:tabular-nums;line-height:1}
.sg-mini{min-height:32px;display:inline-flex;align-items:center;text-decoration:none}
/* Dark mode (Kate, 23 Nov 2026: "its dark mode so why are the fonts dark"): a button does not inherit the page colour, so the week bars' figures and labels say it. */
.sg-cv{color:var(--text)}
.sg-cl{color:var(--muted)}
/* lift, ring and glow on every bar that answers (hover, keyboard focus) */
@media (hover:hover){
  .sg-row.lit,.sg-col.lit,.sg-item.lit{transform:translateY(-3px);border-color:var(--c);background:var(--surface);box-shadow:0 0 0 1px var(--c),0 8px 22px -8px var(--c)}
  .sg-row.lit .sg-fill,.sg-col.lit .sg-cb,.sg-seg2.lit{filter:brightness(1.15);box-shadow:0 0 12px var(--c)}
  .sg-seg2.lit{transform:translateY(-2px)}
}
.sg-row:focus-visible,.sg-col:focus-visible,.sg-item:focus-visible{border-color:var(--c);box-shadow:0 0 0 1px var(--c),0 8px 22px -8px var(--c)}
@media (prefers-reduced-motion:reduce){.sg-row.lit,.sg-col.lit,.sg-item.lit,.sg-seg2.lit{transform:none}.sg-row,.sg-col,.sg-item,.sg-seg2{transition:none}}
.sg-tip{position:fixed;z-index:200;max-width:340px;background:var(--surface);color:var(--text);border:1px solid var(--text);border-radius:16px;box-shadow:0 12px 40px rgba(0,0,0,.28);padding:10px 14px;font-size:13.5px;line-height:1.4;pointer-events:none}
.sg-tip b{display:block;margin-bottom:2px}
.sg-tip[hidden]{display:none}
.sg-tip.tap{left:10px;right:10px;top:auto;bottom:10px;max-width:none}
@media (max-width:1000px){.sg-tiles{grid-template-columns:repeat(2,minmax(0,1fr))}.sg-grid,.sg-grid.sg-g3{grid-template-columns:minmax(0,1fr)}}
@media (max-width:760px){
  .sg-tile{min-height:112px}
  .sg-card{padding:12px}
  .sg-big{font-size:19px}
  .sg-row,.sg-row.sg-r2{grid-template-columns:minmax(0,1fr) auto auto;min-height:44px;gap:4px 10px;margin:0 -6px}
  .sg-row .sg-nm{grid-column:1/-1}
  .sg-row .sg-trk{grid-column:1/-1;grid-row:2}
  .sg-row.lit,.sg-col.lit,.sg-item.lit{transform:none}
  .sg-cols{display:none}.sg-weekrows{display:block}
  .sg-item{grid-template-columns:44px minmax(0,1fr);margin:0 -6px}
  .sg-go{grid-column:1/-1;flex-direction:row;justify-content:space-between;align-items:center}
  .sg-mini{min-height:44px}
  .sg .dn{min-height:44px;min-width:44px;display:inline-flex;align-items:center;justify-content:flex-end}
  .sg-cl,.sg-cv,.sg-hint,.sg-is,.sg-tag,.sg-nm small,.sg-l,.sg-c,.sg-mh,.sg-n{font-size:13px}
}
/* The apps' own marks (js/social.js socLogo): the platform colour on a plain background, the tile's text colour on a platform-coloured tile. */
.soc-lg{display:inline-flex;width:1.1em;height:1.1em;vertical-align:-.18em;margin-right:.45em;flex:none}
.soc-lg svg{width:100%;height:100%;display:block}
.sg-bd .soc-lg{width:26px;height:26px;margin:0}
.sg-item > div{min-width:0}
.sg-it,.sg-is,.sg-nm{overflow-wrap:anywhere}
/* The platform switch on Scheduled or by hand (Kate, 23 Nov 2026): five buttons, so it wraps on a phone instead of running off the screen. */
.sg-pf{flex-wrap:wrap;max-width:100%;margin:0 0 10px}
@media (max-width:760px){.sg-pf button{flex:1 1 auto;min-height:44px}}

/* The popup behind a bar or a point on Scheduled or by hand (social-glance.js, Kate 23 Nov 2026). Same look as the Content Calendar's post panel
   (social-calendar.css): platform badge and date head, picture, number tiles, Open on the app. A centred window; a sheet from the bottom on a phone. */
.sgp-scrim{position:fixed;inset:0;background:rgba(0,0,0,.45);z-index:1090}
.sgp{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);width:min(620px,calc(100vw - 32px));max-height:min(86vh,820px);display:flex;flex-direction:column;background:var(--surface);color:var(--text);border:1px solid var(--border);border-radius:14px;box-shadow:0 18px 60px rgba(0,0,0,.35);z-index:1100;overflow:hidden}
.sgp :focus-visible{outline:3px solid var(--accent,var(--text));outline-offset:2px;border-radius:6px}
.sgp-ph{display:flex;align-items:center;gap:10px;padding:14px 16px;border-bottom:1px solid var(--border);flex:none}
.sgp-b{flex:none;width:32px;height:32px;border-radius:9px;background:var(--c);color:var(--bf);font-weight:700;font-size:12px;display:grid;place-items:center}
.sgp-ph .when{flex:1;min-width:0}
.sgp-ph .when b{display:block;font-size:16px}
.sgp-ph .when span{font-size:13.5px;color:var(--muted)}
.sgp-x{width:44px;height:44px;border-radius:999px;border:1px solid var(--border);background:var(--surface);color:var(--text);display:grid;place-items:center;font-size:22px;line-height:1;padding:0;cursor:pointer;flex:none}
.sgp-x:hover{background:var(--surface2)}
.sgp-pb{padding:14px 16px 18px;display:flex;flex-direction:column;gap:12px;overflow-y:auto;overscroll-behavior:contain}
.sgp-pb>*{flex:none}
.sgp-seg{align-self:flex-start;flex-wrap:wrap}
.sgp-seg button{min-height:44px}
.sgp-seg button span{opacity:.7;font-variant-numeric:tabular-nums;margin-left:2px}
.sgp-card{display:grid;grid-template-columns:96px minmax(0,1fr);gap:14px;padding:12px;border:1px solid var(--border);border-left:4px solid var(--c);border-radius:12px;background:var(--surface)}
.sgp-th{position:relative;display:block;border-radius:10px;overflow:hidden;background:var(--g);aspect-ratio:4/5;align-self:start}
.sgp-card.story .sgp-th{aspect-ratio:9/16}
.sgp-th img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.sgp-card.one{grid-template-columns:minmax(0,1fr)}
.sgp-card.one .sgp-th{width:100%;max-width:272px;margin:0 auto;max-height:340px}
.sgp-cb{min-width:0;display:flex;flex-direction:column;gap:10px}
.sgp-r1{display:flex;align-items:center;gap:6px 10px;flex-wrap:wrap;font-size:13.5px;color:var(--muted)}
.sgp-r1 b{color:var(--text);font-size:15px}
.sgp-cap{margin:0;color:var(--muted);font-size:15px;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}
.sgp-card.one .sgp-cap{display:block}
.sgp-nums{display:grid;grid-template-columns:repeat(auto-fit,minmax(92px,1fr));gap:8px}
.sgp-num{border:1px solid var(--border);border-radius:12px;padding:8px 12px;background:var(--surface)}
.sgp-num .v{font-size:22px;line-height:1.1;font-weight:600;font-variant-numeric:tabular-nums}
.sgp-num .l{font-size:13px;color:var(--muted)}
.sgp-open{text-align:center;text-decoration:none;display:flex;align-items:center;justify-content:center;min-height:44px}
.sgp-none{margin:0;font-size:14.5px;color:var(--muted)}
@media(max-width:720px){
  .sgp{left:0;right:0;top:auto;bottom:0;transform:none;width:auto;max-height:86vh;border-radius:18px 18px 0 0}
  .sgp-card{grid-template-columns:72px minmax(0,1fr);gap:10px}
}
.sgp-note{margin:0;padding:10px 14px;border-radius:12px;background:var(--surface2);color:var(--muted);font-size:14px}
/* The UAE | Bahrain switch beside the Social tabs (Kate, 23 Nov 2026): on the right of the tab row, wrapping under it on a phone. */
.soc-bar{display:flex;flex-wrap:wrap;align-items:center;gap:10px}
.soc-br{margin-left:auto}
@media (max-width:760px){.soc-br{margin-left:0}.soc-br button{min-height:44px}}

/* The cards above Scheduled or by hand on each platform tab (Kate, 24 Nov 2026: "i need to know the views and reach by hand and by schedule"): posts scheduled in Metricool,
   posts by hand and the stories, each with how many, views, reach and the average of each. Two cards on TikTok (no stories), three on Instagram and Facebook. */
.sg-cmp{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px;margin:2px 0 14px}
.sg-cc{background:var(--surface);border:1px solid var(--border);border-top:4px solid var(--c);border-radius:14px;padding:10px 14px 12px;min-width:0}
.sg-cch{display:flex;align-items:center;gap:8px;font-weight:700;font-size:14px;margin-bottom:6px}
.sg-cch i{width:12px;height:12px;border-radius:4px;background:var(--c);flex:none}
.sg-ccr{display:flex;justify-content:space-between;align-items:baseline;gap:10px;padding:5px 0;border-top:1px solid var(--border);font-size:13.5px}
.sg-ccr:first-of-type{border-top:0}
.sg-ccr span{color:var(--muted)}
.sg-ccr b{font-size:16px;font-variant-numeric:tabular-nums;text-align:right}
.sg-cc .sg-hint{margin:6px 0 0}
@media (max-width:760px){.sg-cmp{grid-template-columns:minmax(0,1fr)}.sg-ccr{min-height:44px;align-items:center}}
.sg-dot{display:inline-block;width:12px;height:12px;border-radius:4px;margin-right:8px;vertical-align:-1px}
/* The Visual view of Scheduled or by hand (Kate, 24 Nov 2026): one bar graph, one x axis, five groups of bars. */
.sg-cbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:0 0 6px}
.sg-ckey{display:flex;gap:16px;flex-wrap:wrap;font-size:13px;color:var(--muted);margin-left:auto}
.sg-ckey span{display:inline-flex;align-items:center;gap:7px}
.sg-ckey i{width:14px;height:14px;border-radius:4px;display:inline-block}
.sg-cmpc{position:relative;height:380px;margin-top:6px}
.sg-csay{margin:10px 0 0;font-size:14px}
@media (max-width:760px){.sg-ckey{margin-left:0}.sg-cmpc{height:400px}}
