/* Results library (results.html). Only .res__* and .lb__* are styled here.
   Reports are never shown larger than their own pixels: every thumbnail is capped at its width (--w), the viewer at
   the full-size file's width. Nothing starts hidden except the filters (shown by results.js). */

/* ---------- hero ---------- */
.res__hero.hero--service{min-height:0}
.res__hero>.res__top{display:grid;grid-template-columns:minmax(0,1fr);gap:clamp(24px,4vw,48px);align-items:end}
@media (min-width:900px){.res__hero>.res__top{grid-template-columns:minmax(0,1fr) auto}}
/* Round 4: from 900 px the hero fills the first screen (content centred), so the figures band below never starts with its
   heading alone at the foot of the screen and its numbers under the fold (sq at 1440x900): heading and numbers arrive together. */
@media (min-width:900px){.res__hero.hero--service{min-height:100vh;min-height:100svh}.res__hero>.res__top{align-content:center}}
/* Round 5: the same below 900 px (390x844: the band's heading sat alone at the foot of the first screen, every number under
   the fold): the hero fills the first screen with its content centred, so heading and figures arrive together. */
@media (max-width:899px){.res__hero.hero--service{display:grid;align-content:center;min-height:100vh;min-height:100svh}}
.res__intro{min-width:0;container-type:inline-size}
.res__hero .display{font-size:clamp(2.7rem,7.2vw,6.6rem)}
/* the opening sentence held whole with &nbsp; in a translation ("Le campagne passate.") fits the text column (--rk, core.em_fit) */
.res__hero .display[style*="--rk"]{font-size:min(clamp(2.7rem,7.2vw,6.6rem),calc(var(--rk)*1cqi))}
.res__top .pru{width:clamp(150px,22vw,280px)}
@media (max-width:899px){.res__top .pru{order:-1;justify-self:end;width:120px;margin-bottom:-24px}}
.res__badge{font-size:.95rem;font-weight:500;color:var(--peach);margin-bottom:clamp(14px,2vw,22px)}
.res__intro .lede{max-width:52ch}
.res__intro .actions{align-items:center}
/* a long translated button label stays on one line on phones where it can (sq, es-mx at 360) */
@media (max-width:480px){.res__intro .btn{padding-inline:20px}}
.res__privacy{font-size:.95rem;color:var(--muted)}

/* ---------- featured snapshots (paper) ---------- */
.res__feats{display:grid;gap:clamp(36px,5vw,64px);margin-top:clamp(32px,4vw,56px)}
@media (min-width:900px){.res__feats{grid-template-columns:repeat(3,minmax(0,1fr))}}
.res__feat{display:grid;gap:18px;align-content:start}
/* Three columns: type, title and text share rows across the cards (subgrid), so a title that wraps never pushes its
   own text below the others. */
@media (min-width:900px){
  .res__feats{grid-template-rows:auto auto auto 1fr;row-gap:0}
  .res__feat{grid-row:span 4;grid-template-rows:subgrid;row-gap:0}
  .res__feat>div{display:contents}
  .res__feat .res__type{margin-top:18px}
}
/* One column: the frame hugs its report (no 4:3 letterbox with empty bands). */
@media (max-width:899px){.res__feat .res__shot{aspect-ratio:auto}}
.res__feat h3{font-size:clamp(1.6rem,2.6vw,2.3rem)}
.res__feat p{margin-top:10px;color:var(--paper-muted);line-height:1.5}
.paper .res__type{color:#a14d08}

/* ---------- shared: the report itself is the object (no boxed tile); it opens the viewer ----------
   The 4:3 slot only keeps a row's captions on one line; each report stands on the slot's foot, at most its own
   pixels wide, with a hairline edge so white and dark reports both keep their outline. */
.res__shot{display:grid;grid-template:minmax(0,1fr)/minmax(0,1fr);place-items:end start;aspect-ratio:4/3;cursor:zoom-in;border-radius:10px}
.res__shot img{width:auto;height:auto;max-width:min(100%,var(--w));max-height:100%;border-radius:10px;box-shadow:0 0 0 1px #ffffff1f;transition:transform .7s var(--ease),box-shadow .3s}
.paper .res__shot img{box-shadow:0 0 0 1px rgba(10,1,24,.12)}
.res__shot:hover img,.res__shot:focus-visible img{box-shadow:0 0 0 1.5px var(--peach)}
.paper .res__shot:hover img,.paper .res__shot:focus-visible img{box-shadow:0 0 0 1.5px var(--paper-ink)}
@media (max-width:699px){.res__shot{aspect-ratio:auto}}
@media (hover:hover){.motion .res__shot:hover img{transform:scale(.985)}}
.res__type{display:block;font-size:.85rem;font-weight:600;letter-spacing:.02em;color:var(--peach)}

/* ---------- library ---------- */
.res__filters{display:flex;flex-wrap:wrap;gap:8px;margin-top:clamp(24px,3vw,40px)}
.res__filters[hidden]{display:none}
.res__filters button{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:0 16px;border:0;border-radius:999px;background:none;color:#fff;font-size:.95rem;cursor:pointer;box-shadow:inset 0 0 0 1.5px #ffffff4d;transition:box-shadow .25s,background-color .25s,color .25s}
.res__filters button span{font-size:.8rem;color:var(--muted)}
.res__filters button:hover{box-shadow:inset 0 0 0 1.5px var(--peach)}
.res__filters button[aria-pressed=true]{background:#fff;color:var(--base)}
.res__filters button[aria-pressed=true] span{color:var(--paper-muted)}
.res__grid{display:grid;gap:clamp(36px,4vw,56px) clamp(20px,2.4vw,32px);margin-top:clamp(28px,3vw,44px)}
@media (min-width:700px){.res__grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (min-width:1100px){.res__grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
.res__card[hidden]{display:none}
.res__card{padding-top:clamp(16px,2vw,22px);border-top:1px solid #ffffff1f}
.res__body{margin-top:16px}
.res__body h3{margin-top:6px;font-size:clamp(1.3rem,1.9vw,1.6rem);letter-spacing:-.02em}
.res__metrics{display:flex;flex-wrap:wrap;gap:6px 24px;margin:12px 0 0}
.res__metrics div{display:grid}
.res__metrics dt{font-size:.82rem;color:var(--muted)}
.res__metrics dd{margin:0;font-family:var(--heading);font-weight:600;font-size:1.2rem}
.res__period{margin-top:10px;font-size:.88rem;color:var(--muted)}
.res__ctx{margin-top:6px;font-size:.9rem;line-height:1.5;color:var(--muted);max-width:46ch}
/* cards rise in one after another as the grid comes into view (shared data-reveal is not used: 34 items) */
.js.motion .res__card{opacity:0;transform:translateY(24px);transition:opacity .8s var(--ease),transform 1s var(--ease)}
.js.motion .res__grid.in .res__card{opacity:1;transform:none}

/* ---------- viewer ---------- */
.lb{width:min(100vw - 24px,1480px);max-width:none;height:calc(100vh - 24px);max-height:none;padding:0;border:0;border-radius:18px;background:#0a0118;color:#fff;overflow:hidden}
.lb[open]{display:grid;grid-template-rows:auto minmax(0,1fr)}
.lb::backdrop{background:rgba(10,1,24,.9)}
.lb__bar{display:flex;align-items:center;gap:16px;padding:8px 8px 8px 20px}
.lb__count{margin-right:auto;font-size:.9rem;color:var(--muted);font-variant-numeric:tabular-nums}
.lb__zoom{font-size:.9rem}
.lb__close{min-height:44px;padding:0 16px;border:0;border-radius:999px;background:none;color:#fff;font-weight:600;cursor:pointer;box-shadow:inset 0 0 0 1.5px #ffffff80}
.lb__close:hover{box-shadow:inset 0 0 0 1.5px var(--peach)}
.lb__fig{display:grid;grid-template-rows:minmax(0,1fr) auto;gap:12px;min-height:0;padding:0 clamp(12px,6vw,84px) 18px}
.lb__pan{display:contents}
.lb__img{place-self:center;width:auto;height:auto;max-width:min(100%,var(--w,100%));max-height:100%;object-fit:contain;border-radius:8px;background:#181320}
.lb__cap{text-align:center;font-size:.92rem;line-height:1.45;color:var(--ink);max-width:80ch;margin-inline:auto}
.lb__nav{position:absolute;top:50%;width:48px;height:48px;margin-top:-24px;padding:0;border:0;border-radius:50%;background:rgba(24,19,32,.86);cursor:pointer;box-shadow:inset 0 0 0 1.5px #ffffff66}
.lb__nav::before{content:"";position:absolute;left:50%;top:50%;width:11px;height:11px;border-top:2px solid #fff;border-right:2px solid #fff}
.lb__nav--prev{left:10px}.lb__nav--prev::before{transform:translate(-30%,-50%) rotate(-135deg)}
.lb__nav--next{right:10px}.lb__nav--next::before{transform:translate(-70%,-50%) rotate(45deg)}
.lb__nav:hover{box-shadow:inset 0 0 0 1.5px var(--peach)}
@media (max-width:699px){
  .lb{width:100vw;height:100dvh;border-radius:0}
  .lb__fig{padding:0 10px 76px}
  /* Phones: a wide report is shown at a readable height (never above its own pixels) and scrolls sideways; a fade
     at the right edge says there is more. The caption, Zoom and the buttons stay where they are. */
  .lb__pan{display:grid;min-height:0;height:100%;overflow:auto;overscroll-behavior:contain;scrollbar-width:none}
  .lb__pan::-webkit-scrollbar{display:none}
  .lb__pan .lb__img{place-self:center safe center;max-width:none;max-height:none;width:auto;height:min(var(--ph,100%),var(--h))}
  .lb__pan.is-more{-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 44px),transparent);mask-image:linear-gradient(90deg,#000 calc(100% - 44px),transparent)}
  .lb__nav{top:auto;bottom:14px;margin-top:0}
  .lb__nav--prev{left:calc(50% - 58px)}.lb__nav--next{right:calc(50% - 58px)}
}
