/* Certificates & Recognition (page-certificate.php). With css/ks-kit.css.
   The school's wall of honour in morning daylight: a pale blue-grey wall, every certificate in a
   frame behind glass, the headline one alone in the only gilt frame under a picture light.
   Nothing slides or fades in: the wall is already hung at first paint, and only the light moves.

   ONE LIGHT, from the reading-start side and above. Everything that depends on it reads
   --sx / --near / --farside / --to-far, so the whole wall mirrors in Kurdish and Arabic while the
   scans themselves are never flipped. Two shadow strengths only (--s1 contact, --s2 soft).

   SCALE: --u is the long side of an A4 sheet on the wall, worked out from the wall's own width
   (container units), so every paper hangs at one scale: a row holds two landscapes and a portrait. */
.ks-cw{
  --wall:#D5DEE6; --cw-deep:#04273F; --cw-ink2:#27475F; --cw-ink3:#3A556D;
  --brass:#C8993A; --brass-l:#E2BF73; --brass-ink:#694E15;
  --s1:rgba(6,30,52,.36); --s2:rgba(6,30,52,.17);
  --sx:1; --near:left; --farside:right; --to-far:to right; --to-near:to left;
  --r:22px; --chf:3px; --m:26px; --mb:34px; --fil:3px; --stp:2px; --bev:2px;
  --gap:clamp(28px,3.2cqw,48px);
  --u:clamp(200px,calc((100cqw - 2 * var(--gap) - 6 * (var(--r) + var(--m))) / 2.74),430px);
  /* the gilt frame: about one and a half times the others, whole on the first screen where the screen allows, never smaller than the others */
  --gr:clamp(24px,3.4svh,34px); --gm:clamp(32px,4.8svh,46px); --gmb:clamp(42px,6.2svh,60px);
  --gw:calc((46cqw - 2 * (var(--gr) + var(--gm))) / .708);
  --gu:max(min(var(--u),var(--gw)),min(calc(var(--u) * 1.5),calc(100svh - 198px - 2 * var(--gr) - var(--gm) - var(--gmb)),var(--gw)));
  /* gilt: the section of the moulding from its outer edge inward (step, ridge, cove, bead, lip), lit and in shade */
  --g-lit:#FFF3CC 0,#F0D588 3.5%,#C79C3E 9%,#9A7222 14%,#5E430F 16.5%,#7E5D18 19%,#CFA548 23%,#F7E4A4 27.5%,#FFF8DC 30%,#E0BC62 34%,#9E7624 41%,#7C5B17 48%,#94701F 55%,#BC9238 63%,#D9B356 70.5%,#694C14 75%,#523A0D 77%,#C59C40 80%,#FDF0C0 84.5%,#D2AA4C 89%,#8C691C 94%,#47320A 100%;
  --g-shade:#4A340C 0,#6A4D14 5%,#7C5C19 10%,#88661D 14%,#4A340C 16.5%,#5A4010 19%,#76571A 23%,#876620 28%,#9C7827 33%,#BC9439 39%,#DDBD68 45%,#EBD08A 49%,#C9A247 56%,#A37B28 64%,#84631D 71%,#4C360C 75%,#5A4010 77%,#8D6A1F 80%,#B38B33 84%,#DDBB66 89%,#A9812B 94%,#4A340C 100%;
  --g-leaf:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='2' seed='9' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .26  0 0 0 0 .16  0 0 0 0 .02  .5 0 0 0 -.14'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  position:relative;color:var(--cw-deep);overflow-x:clip;
  background-color:var(--wall);
  /* fine plaster tooth: it belongs to the wall, so it scrolls with it */
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .02  0 0 0 0 .16  0 0 0 0 .28  .16 0 0 0 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
[dir="rtl"] .ks-cw{--sx:-1;--near:right;--farside:left;--to-far:to left;--to-near:to right}
.ks-cw *,.ks-cw *::before,.ks-cw *::after{box-sizing:border-box}

/* the daylight itself: it stays put while the wall moves under it (sticky, so it never leaves this page's wall) */
.ks-cw-light{position:sticky;top:0;z-index:0;height:100vh;height:100lvh;margin-bottom:-100vh;margin-bottom:-100lvh;pointer-events:none;overflow:hidden;transform:scaleX(var(--sx));
  background:radial-gradient(130% 95% at 0% -8%,rgba(255,255,255,.5),rgba(255,255,255,.14) 42%,rgba(255,255,255,0) 68%),linear-gradient(96deg,rgba(6,58,97,0) 45%,rgba(6,58,97,.075))}
/* one soft patch of window light, two panes wide, thrown across the wall at a slant, clear of the words */
.ks-cw-light i{position:absolute;top:-6vh;left:47vw;width:clamp(220px,23vw,430px);height:96vh;transform:skewX(13deg);transform-origin:0 0;
  background:linear-gradient(180deg,rgba(255,252,240,.95),rgba(255,252,240,.6));
  -webkit-mask-image:linear-gradient(90deg,#000 45%,transparent 48.5% 51.5%,#000 55%),linear-gradient(180deg,#000 26%,transparent 30% 33.5%,#000 37.5%,#000 59%,transparent 63% 66.5%,#000 70.5%,#000 78%,transparent 97%);
  mask-image:linear-gradient(90deg,#000 45%,transparent 48.5% 51.5%,#000 55%),linear-gradient(180deg,#000 26%,transparent 30% 33.5%,#000 37.5%,#000 59%,transparent 63% 66.5%,#000 70.5%,#000 78%,transparent 97%);
  -webkit-mask-composite:source-in;mask-composite:intersect;filter:blur(14px);opacity:.34}

.ks-cert-staff{position:relative;z-index:2;background:#FFF4D6;border-bottom:1px solid #E9D49B;color:#5B4510;font:600 14px/1.5 system-ui,-apple-system,"Segoe UI",sans-serif;padding:12px clamp(18px,5vw,64px);text-align:center;margin-top:96px}
.ks-cert-staff a{color:#063A61;font-weight:800}
.ks-cw-wrap{position:relative;z-index:1;width:min(1560px,calc(100% - 2 * clamp(16px,3vw,30px)));margin-inline:auto;container-type:inline-size}

/* ------------------------------ the first wall ------------------------------ */
.ks-cw-first{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:clamp(36px,6cqw,108px);align-items:center;min-height:min(100svh,900px);padding:128px max(0px,calc((100cqw - 1260px) / 2)) 40px}
.ks-cert-staff ~ .ks-cw-wrap .ks-cw-first{padding-top:44px;min-height:calc(100svh - 150px)}
body.admin-bar .ks-cw{--ks-ab:32px}
@container (min-width:900px){
  .ks-cert-staff ~ .ks-cw-wrap .ks-cw-first{--gu:max(min(var(--u),var(--gw)),min(calc(var(--u) * 1.5),calc(100svh - 256px - var(--ks-ab,0px) - 2 * var(--gr) - var(--gm) - var(--gmb)),var(--gw)))}
}
.ks-cw-intro{max-width:700px}
.ks-cw .ks-crumbs{margin:0 0 22px}
.ks-cw .ks-crumbs a{color:var(--cw-ink2)}
.ks-cw .ks-crumbs [aria-current="page"]{color:var(--brass-ink)}
.ks-cw .ks-cw-title{margin:0;font-family:var(--ks-display);font-weight:430;font-size:clamp(38px,5.3cqw,80px);line-height:1.02;letter-spacing:-.018em;color:var(--cw-deep);text-wrap:balance}
.ks-cw .ks-cw-title em{font-style:italic;font-weight:340;color:var(--brass-ink)}
.ks-cw .ks-cw-lede{margin:26px 0 0;max-width:31em;font-size:clamp(17px,1.35cqw,20px);line-height:1.55;color:var(--cw-ink2);text-wrap:pretty}
.ks-cw .ks-cw-count{text-wrap:balance;margin:18px 0 0;display:flex;align-items:center;gap:12px;font-size:12.5px;font-weight:800;letter-spacing:.14em;text-transform:uppercase;color:var(--brass-ink)}
.ks-cw-count::before{content:"";flex:none;width:34px;height:2px;background:linear-gradient(to bottom,var(--brass-l),var(--brass));box-shadow:calc(var(--sx) * 1px) 1px 1px var(--s2)}

/* the brass plate: the evaluation record, engraved */
.ks-cw-plate{position:relative;margin:38px 0 0;width:fit-content;max-width:min(100%,548px);padding:20px 46px 22px;border-radius:2px;color:#3A2A08;text-align:center;
  background:
    linear-gradient(calc(var(--sx) * 101deg),rgba(255,250,226,0) 14%,rgba(255,250,226,.55) 27%,rgba(255,250,226,.1) 34%,rgba(255,250,226,.32) 40%,rgba(255,250,226,.04) 52%,rgba(70,48,6,.14) 100%),
    repeating-linear-gradient(to bottom,rgba(255,255,255,.07) 0 1px,rgba(255,255,255,0) 1px 2px,rgba(60,40,0,.045) 2px 3px,rgba(255,255,255,0) 3px 5px),
    linear-gradient(to bottom,#E3C177 0%,#CFA347 48%,#BC8F35 100%);
  box-shadow:inset calc(var(--sx) * 1px) 1px 0 rgba(255,246,214,.9),inset calc(var(--sx) * -1px) -1px 0 rgba(84,58,10,.6),calc(var(--sx) * 1px) 1px 2px var(--s1),calc(var(--sx) * 3px) 4px 6px var(--s2)}
.ks-cw-plate::before{content:"";position:absolute;inset:5px;border:1px solid rgba(78,54,8,.42);border-radius:1px;pointer-events:none;box-shadow:calc(var(--sx) * 1px) 1px 0 rgba(255,244,206,.6),inset calc(var(--sx) * 1px) 1px 0 rgba(255,244,206,.6)}
.ks-cw-screw{position:absolute;top:50%;inset-inline-start:17px;width:9px;height:9px;margin-top:-4.5px;border-radius:50%;
  background:radial-gradient(circle at calc(50% - var(--sx) * 14%) 30%,#FFF4CC 0,#DDB964 34%,#9A7426 74%,#5E4410 100%);box-shadow:0 0 0 1px rgba(70,48,6,.5),calc(var(--sx) * 1px) 1px 0 1px rgba(255,244,206,.55)}
.ks-cw-screw::before{content:"";position:absolute;left:1px;right:1px;top:3.75px;height:1.5px;background:rgba(52,36,4,.85);box-shadow:0 1px 0 rgba(255,240,190,.5);transform:rotate(-28deg)}
.ks-cw-screw + .ks-cw-screw{inset-inline-start:auto;inset-inline-end:17px}
.ks-cw-screw + .ks-cw-screw::before{transform:rotate(52deg)}
.ks-cw .ks-cw-plate-h{margin:0;font-family:inherit;font-size:12.5px;font-weight:800;line-height:1.5;letter-spacing:.13em;text-transform:uppercase;color:#4A360C;text-wrap:balance;text-shadow:calc(var(--sx) * .5px) 1px 0 rgba(255,243,200,.62)}
.ks-cw-plate-h::after{content:"";display:block;width:34px;height:1px;margin:10px auto 11px;background:currentColor;opacity:.6;box-shadow:0 1px 0 rgba(255,242,204,.7)}
.ks-cw-facts{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;justify-content:center;align-items:baseline;column-gap:.5em;font-family:var(--ks-display);text-shadow:calc(var(--sx) * .5px) 1px 0 rgba(255,243,200,.55)}
.ks-cw-facts li{font-weight:600;font-size:clamp(21px,1.9cqw,27px);line-height:1.15;letter-spacing:-.008em;font-variant-numeric:lining-nums}
.ks-cw-facts li:nth-child(2)::before{content:"·";content:"·" / "";margin-inline-end:.5em;font-weight:400;opacity:.75}
.ks-cw-facts li:nth-child(3){flex-basis:100%;margin-top:8px;font-weight:420;font-size:clamp(15.5px,1.25cqw,18px);letter-spacing:.004em}
.ks-cw .ks-cw-source{margin:16px 0 0;max-width:38em;font-size:13px;line-height:1.55;color:var(--cw-ink3)}

/* ------------------------------ a framed certificate ------------------------------ */
.ks-cw-piece{position:relative;margin:0;flex:none;--fw:calc(var(--pw) + 2 * var(--m) + 2 * var(--r));width:var(--fw)}
.ks-cw-piece--p{--ph:var(--u);--pw:calc(var(--u) * var(--ar))}
.ks-cw-piece--l{--pw:var(--u);--ph:calc(var(--u) / 1.4142)}
.ks-cw-frame{position:relative;display:block;width:var(--fw);padding:var(--r);text-decoration:none;cursor:zoom-in;transition:box-shadow .25s;
  /* navy lacquer, four rails, each listed from its outer edge to the sight edge (the brass fillet) */
  --nv-top:#86AAC6 0 1px,#1D5682 1px calc(1px + var(--chf)),#0B416B calc(1px + var(--chf)),#0F4974 30%,#062F4E 30% calc(30% + 1px),#12507D calc(30% + 1px),#0C426B 60%,#08385D calc(var(--r) - var(--fil) - var(--stp)),#021624 calc(var(--r) - var(--fil) - var(--stp)) calc(var(--r) - var(--fil)),#6F541C calc(var(--r) - var(--fil)),#9C792C var(--r);
  --nv-near:#6790B0 0 1px,#174E78 1px calc(1px + var(--chf)),#0A3D65 calc(1px + var(--chf)),#0D446E 30%,#052B48 30% calc(30% + 1px),#0F4973 calc(30% + 1px),#0A3D64 60%,#073457 calc(var(--r) - var(--fil) - var(--stp)),#021828 calc(var(--r) - var(--fil) - var(--stp)) calc(var(--r) - var(--fil)),#765A1F calc(var(--r) - var(--fil)),#A27E2F var(--r);
  --nv-far:#010F1B 0 1px,#021929 1px calc(1px + var(--chf)),#03253F calc(1px + var(--chf)),#052C48 30%,#011522 30% calc(30% + 1px),#06324F calc(30% + 1px),#06324F calc(var(--r) - var(--fil) - 1px),#3A709C calc(var(--r) - var(--fil) - 1px) calc(var(--r) - var(--fil)),#F1D592 calc(var(--r) - var(--fil)),#C8993A var(--r);
  --nv-bot:#010B13 0 1px,#01131F 1px calc(1px + var(--chf)),#021D31 calc(1px + var(--chf)),#04253D 30%,#010F1A 30% calc(30% + 1px),#052B47 calc(30% + 1px),#052B47 calc(var(--r) - var(--fil) - 1px),#437AA6 calc(var(--r) - var(--fil) - 1px) calc(var(--r) - var(--fil)),#F6DEA0 calc(var(--r) - var(--fil)),#CFA144 var(--r);
  --rail-top:var(--nv-top);--rail-near:var(--nv-near);--rail-far:var(--nv-far);--rail-bot:var(--nv-bot);
  background:#02182A; /* shows only as the hairline of each mitre */
  box-shadow:calc(var(--sx) * 1px) 2px 3px var(--s1),calc(var(--sx) * 5px) 8px 11px var(--s2)}
/* the four rails: two pseudo-elements, each clipped to a pair of mitred trapezoids, each rail lit by the one light */
.ks-cw-frame::before,.ks-cw-frame::after{content:"";position:absolute;inset:0;z-index:2;pointer-events:none}
.ks-cw-frame::before{
  clip-path:polygon(0 0,100% 0,calc(100% - var(--r)) var(--r),var(--r) var(--r),0 0,0 100%,var(--r) calc(100% - var(--r)),calc(100% - var(--r)) calc(100% - var(--r)),100% 100%,0 100%);
  background:
    linear-gradient(var(--to-far),rgba(255,255,255,0) 9%,rgba(255,255,255,.13) 13%,rgba(255,255,255,.03) 21%,rgba(255,255,255,0) 30%,rgba(0,0,0,0) 60%,rgba(0,0,0,.1)) top / 100% var(--r) no-repeat,
    linear-gradient(to bottom,var(--rail-top)) top / 100% var(--r) no-repeat,
    linear-gradient(to top,var(--rail-bot)) bottom / 100% var(--r) no-repeat}
.ks-cw-frame::after{
  clip-path:polygon(0 0,var(--r) var(--r),var(--r) calc(100% - var(--r)),0 100%,0 0,100% 0,100% 100%,calc(100% - var(--r)) calc(100% - var(--r)),calc(100% - var(--r)) var(--r),100% 0);
  background:
    linear-gradient(to bottom,rgba(255,255,255,.05),rgba(255,255,255,0) 38%,rgba(0,0,0,.1)),
    linear-gradient(var(--to-far),var(--rail-near)) var(--near) / var(--r) 100% no-repeat,
    linear-gradient(var(--to-near),var(--rail-far)) var(--farside) / var(--r) 100% no-repeat}
.ks-cw .ks-cw-frame:focus-visible{outline:3px solid var(--cw-deep);outline-offset:7px;border-radius:0;box-shadow:0 0 0 4px #fff,calc(var(--sx) * 1px) 2px 3px var(--s1),calc(var(--sx) * 5px) 8px 11px var(--s2)}

/* the mount: cream board, a little deeper at the foot, bevel-cut. The cut faces away from the light on the
   top and near edges (grey core, a hairline shadow on the paper) and towards it on the other two (white core) */
.ks-cw-mount{display:block;padding:var(--m) var(--m) var(--mb);background:linear-gradient(calc(var(--sx) * 128deg),#F9F4E9 0%,#F3ECDD 55%,#EDE5D3 100%)}
.ks-cw-win{position:relative;display:block;width:var(--pw);height:var(--ph);overflow:hidden;background:var(--tone,#FBF8F1);
  border:var(--bev) solid;border-top-color:#C3BBA8;border-inline-start-color:#CEC6B3;border-inline-end-color:#FFFEFB;border-bottom-color:#fff}
/* the mount overlaps the outer 2% of the scan, which hides scanner edges */
.ks-cw-win img{position:absolute;left:-2%;top:-2%;width:104%;height:104%;max-width:none;object-fit:cover;display:block}
.ks-cw-win::after{content:"";position:absolute;inset:0;pointer-events:none;box-shadow:inset calc(var(--sx) * 1px) 1px 0 rgba(6,30,52,.2),inset calc(var(--sx) * 2px) 3px 4px -2px var(--s1)}

/* the glass: the rail's own shadow falling across it, and a tall window lying on it. The reflection is clear on
   the mount and never more than about 6% white over the paper; it slides as the frame crosses the screen. */
.ks-cw-glass{position:absolute;inset:var(--r);z-index:1;overflow:hidden;pointer-events:none;transition:background-color .25s;
  background:linear-gradient(calc(var(--sx) * 128deg),rgba(255,255,255,.05),rgba(255,255,255,0) 34%);
  box-shadow:inset calc(var(--sx) * 2px) 2px 3px -1px var(--s1),inset calc(var(--sx) * 6px) 7px 9px -5px var(--s2)}
.ks-cw-glare{position:absolute;inset:0;padding:var(--m) var(--m) var(--mb);
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask:linear-gradient(#000 0 0) content-box exclude,linear-gradient(#000 0 0)}
.ks-cw-glass::before,.ks-cw-glare::before{content:"";position:absolute;inset:-14% -8%;transform:scaleX(var(--sx)) skewX(11deg);transform-origin:50% 0;
  background:linear-gradient(100deg,#EEF6FF,#fff);
  -webkit-mask-image:linear-gradient(90deg,transparent 3%,#000 5.5% 18%,rgba(0,0,0,.2) 18.9% 20.3%,#000 21.2% 34%,transparent 37%),linear-gradient(180deg,transparent 6%,#000 9.5% 32%,rgba(0,0,0,.2) 33% 34.4%,#000 35.4% 57%,rgba(0,0,0,.2) 58% 59.4%,#000 60.4% 76%,transparent 86%);
  mask-image:linear-gradient(90deg,transparent 3%,#000 5.5% 18%,rgba(0,0,0,.2) 18.9% 20.3%,#000 21.2% 34%,transparent 37%),linear-gradient(180deg,transparent 6%,#000 9.5% 32%,rgba(0,0,0,.2) 33% 34.4%,#000 35.4% 57%,rgba(0,0,0,.2) 58% 59.4%,#000 60.4% 76%,transparent 86%);
  -webkit-mask-composite:source-in;mask-composite:intersect;
  translate:calc(var(--sx) * var(--cw-p,0) * 24%) calc(var(--cw-p,0) * -7%)}
.ks-cw-glare::before{opacity:.5}
.ks-cw-glass::before{opacity:.055}
@keyframes ks-cw-pane{from{translate:calc(var(--sx) * 24%) -7%}to{translate:calc(var(--sx) * -24%) 7%}}
@media (prefers-reduced-motion:no-preference){
  @supports (animation-timeline:view()){
    .ks-cw-frame{view-timeline:--ks-cw-pane block}   /* the pane's own passage through the screen */
    .ks-cw-glass::before,.ks-cw-glare::before{animation:ks-cw-pane linear both;animation-timeline:--ks-cw-pane;animation-range:cover 0% cover 100%}
  }
}

@media (hover:hover){
  .ks-cw-frame:hover{box-shadow:calc(var(--sx) * 1px) 2px 3px var(--s1),calc(var(--sx) * 9px) 15px 22px rgba(6,30,52,.26)}
  .ks-cw-frame:hover .ks-cw-glass{background-color:rgba(255,255,255,.07)}
  .ks-cw-piece--gilt .ks-cw-frame:hover{box-shadow:calc(var(--sx) * 2px) 3px 4px var(--s1),calc(var(--sx) * 11px) 17px 24px rgba(6,30,52,.26)}
}

/* the label, set straight on the wall under its own frame */
.ks-cw-cap{display:block;margin-top:20px;padding-inline:2px}
.ks-cw-cap > span{display:block}
.ks-cw-what{font-family:var(--ks-display);font-weight:580;font-size:18.5px;line-height:1.25;color:var(--cw-deep)}
.ks-cw-who{margin-top:4px;font-size:14.5px;line-height:1.45;color:var(--cw-ink2);text-wrap:balance}
.ks-cw-meta{margin-top:8px;font-size:12.5px;font-weight:800;line-height:1.6;letter-spacing:.1em;text-transform:uppercase;color:var(--cw-ink3)}
.ks-cw-meta i{font-style:normal;opacity:.7}
.ks-cw-meta-ph{display:block}
.ks-cw-sum{margin-top:10px;font-size:14px;line-height:1.55;color:var(--cw-ink2);text-wrap:pretty}
.ks-cw-held{margin-top:12px;padding:8px 10px;border-radius:4px;background:#FFF4D6;border:1px solid #E9D49B;color:#5B4510;font:600 12.5px/1.45 system-ui,-apple-system,"Segoe UI",sans-serif;text-align:left}

/* ------------------------------ the gilt frame ------------------------------ */
.ks-cw-piece--gilt{--u:var(--gu);--r:var(--gr);--m:var(--gm);--mb:var(--gmb);--bev:3px;margin-top:46px}
/* what the picture light does: a warm spill on the wall behind the frame's head */
.ks-cw-piece--gilt::before{content:"";position:absolute;z-index:0;pointer-events:none;inset:-86px -64px auto -64px;height:330px;
  background:radial-gradient(ellipse 46% 150px at 50% 84px,rgba(255,229,180,.8),rgba(255,229,180,.3) 52%,rgba(255,229,180,0) 100%);animation:ks-cw-warm 1.8s ease .35s both}
/* the picture light warms up once. It starts dimmer at first paint and only ever adds light */
@keyframes ks-cw-warm{from{opacity:.45}to{opacity:1}}
.ks-cw-piece--gilt .ks-cw-frame{z-index:1;background:#3A2907;--rail-top:var(--g-lit);--rail-near:var(--g-lit);--rail-far:var(--g-shade);--rail-bot:var(--g-shade);
  box-shadow:calc(var(--sx) * 2px) 3px 4px var(--s1),calc(var(--sx) * 7px) 10px 12px var(--s2)}
.ks-cw .ks-cw-piece--gilt .ks-cw-frame:focus-visible{box-shadow:0 0 0 4px #fff,calc(var(--sx) * 2px) 3px 4px var(--s1),calc(var(--sx) * 7px) 10px 12px var(--s2)}
/* gold leaf is never even: grain, a hot stretch under the lamp, darker ends */
.ks-cw-piece--gilt .ks-cw-frame::before{background:
    var(--g-leaf),
    linear-gradient(90deg,rgba(60,38,0,.3),rgba(60,38,0,0) 16%,rgba(255,244,204,.16) 34%,rgba(255,249,224,.5) 50%,rgba(255,244,204,.16) 66%,rgba(60,38,0,0) 84%,rgba(60,38,0,.26)) top / 100% var(--r) no-repeat,
    linear-gradient(var(--to-far),rgba(40,24,0,.1),rgba(255,240,200,.1) 30%,rgba(40,24,0,.12) 62%,rgba(40,24,0,.34)) bottom / 100% var(--r) no-repeat,
    linear-gradient(to bottom,var(--rail-top)) top / 100% var(--r) no-repeat,
    linear-gradient(to top,var(--rail-bot)) bottom / 100% var(--r) no-repeat}
.ks-cw-piece--gilt .ks-cw-frame::after{background:
    var(--g-leaf),
    linear-gradient(180deg,rgba(255,246,214,.16),rgba(255,246,214,0) 26%,rgba(50,30,0,.1) 60%,rgba(50,30,0,.3)) var(--near) / var(--r) 100% no-repeat,
    linear-gradient(0deg,rgba(70,46,0,.14),rgba(70,46,0,.14)) var(--near) / var(--r) 100% no-repeat,
    linear-gradient(180deg,rgba(255,240,200,.26),rgba(255,240,200,.04) 32%,rgba(40,24,0,.1) 64%,rgba(40,24,0,.3)) var(--farside) / var(--r) 100% no-repeat,
    linear-gradient(var(--to-far),var(--rail-near)) var(--near) / var(--r) 100% no-repeat,
    linear-gradient(var(--to-near),var(--rail-far)) var(--farside) / var(--r) 100% no-repeat}
.ks-cw-piece--gilt .ks-cw-mount{background:linear-gradient(calc(var(--sx) * 128deg),#FBF6EB 0%,#F5EEDF 55%,#EEE6D4 100%)}
/* the warm pool down the frame; it only ever adds light */
.ks-cw-pool{position:absolute;inset:0;z-index:3;pointer-events:none;animation:ks-cw-warm 1.8s ease .35s both;
  background:radial-gradient(ellipse 58% 14% at 50% 0%,rgba(255,240,200,.42),rgba(255,240,200,0) 100%),radial-gradient(ellipse 66% 58% at 50% -6%,rgba(255,216,146,.36) 0%,rgba(255,216,146,.2) 34%,rgba(255,216,146,.06) 64%,rgba(255,216,146,0) 86%),linear-gradient(to bottom,rgba(6,30,52,0) 52%,rgba(6,30,52,.07) 100%)}
/* the picture light: a brass hood on one arm that rises from behind the frame */
.ks-cw-lamp{position:absolute;z-index:0;left:0;right:0;bottom:100%;height:46px;pointer-events:none;transform:scaleX(var(--sx))}
.ks-cw-arm{position:absolute;left:50%;width:10px;margin-left:-5px;top:22px;bottom:-12px;background:linear-gradient(90deg,#5E4411,#D9B65F 28%,#FBEBB8 38%,#B98E35 60%,#5E4411);box-shadow:1px 1px 2px var(--s1)}
.ks-cw-arm::after{content:"";position:absolute;left:50%;top:-1px;width:24px;height:8px;margin-left:-12px;border-radius:1px 1px 4px 4px;background:linear-gradient(90deg,#5E4411,#CDA850 26%,#F4DFA0 38%,#A9802B 64%,#543D0E);box-shadow:0 1px 1.5px rgba(40,26,2,.55)}
.ks-cw-tube{position:absolute;left:27%;right:27%;top:3px;height:20px;border-radius:10px 10px 8px 8px;
  background:
    linear-gradient(90deg,rgba(40,26,2,.46),rgba(40,26,2,0) 6%,rgba(255,255,255,0) 17%,rgba(255,253,240,.55) 24%,rgba(255,253,240,.12) 25.5%,rgba(255,253,240,.4) 27%,rgba(255,255,255,0) 35%,rgba(40,26,2,0) 92%,rgba(40,26,2,.5)),
    linear-gradient(180deg,#8A6820 0%,#D2AE55 10%,#FFF6D6 21%,#E8CA7C 31%,#BE9438 50%,#86641C 72%,#5A410F 88%,#7A5B19 100%);
  box-shadow:inset 0 -1.5px 0 rgba(255,230,170,.8),0 3px 5px -1px rgba(255,226,160,.7),1px 2px 3px var(--s1),5px 8px 11px var(--s2)}
.ks-cw-tube::before,.ks-cw-tube::after{content:"";position:absolute;top:0;bottom:0;width:3px;background:linear-gradient(180deg,#6B4E14,#C9A148 22%,#8C691E 55%,#3F2C08);opacity:.75}
.ks-cw-tube::before{left:12px}.ks-cw-tube::after{right:12px}
/* the headline certificate's label is read out and feeds the close view; on the wall the plate says it */
.ks-cw-piece--gilt .ks-cw-cap{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}

/* ------------------------------ the bays ------------------------------ */
.ks-cw-bay{padding-top:clamp(64px,8cqw,112px)}
.ks-cw .ks-cw-bay-title{margin:0 0 clamp(34px,4cqw,56px);font-family:var(--ks-display);font-weight:440;font-size:clamp(25px,2.5cqw,38px);line-height:1.12;letter-spacing:-.012em;color:var(--cw-deep);text-wrap:balance}
.ks-cw-bay-title::after{content:"";display:block;width:46px;height:2px;margin-top:18px;background:linear-gradient(to bottom,var(--brass-l),var(--brass));box-shadow:calc(var(--sx) * 1px) 1px 1px var(--s2)}
/* a row: same scale, same eye-line, same gap. Each frame sits on the row's centre line with its label right under it */
.ks-cw-row{display:flex;flex-wrap:wrap;justify-content:center;align-items:flex-start;column-gap:var(--gap);row-gap:clamp(48px,5cqw,72px)}
.ks-cw-row .ks-cw-piece--l{padding-top:calc((var(--u) - var(--ph)) / 2)}

/* the foot of the wall */
.ks-cw-foot{padding:clamp(64px,8cqw,104px) 0 clamp(48px,6cqw,80px);max-width:44em}
.ks-cw .ks-cw-names{margin:0;font-size:14.5px;line-height:1.65;color:var(--cw-ink3)}
.ks-cw .ks-cw-links{margin:22px 0 0;display:flex;flex-wrap:wrap;gap:20px 34px}
.ks-cw .ks-cw-links .ks-x-link{position:relative;color:var(--cw-deep);border-bottom-color:var(--brass)}
.ks-cw .ks-cw-links .ks-x-link::after{content:"";position:absolute;inset:-10px -6px -9px}
.ks-cw .ks-crumbs a{position:relative}
.ks-cw .ks-crumbs a::after{content:"";position:absolute;inset:-13px -8px}
.ks-cw-skirting{position:relative;z-index:1;height:46px;
  background:
    linear-gradient(180deg,rgba(4,39,63,.45) 0,rgba(4,39,63,0) 4px) 0 100% / 100% 9px no-repeat,
    linear-gradient(180deg,#0A3352,#04273F) 0 100% / 100% 9px no-repeat,
    linear-gradient(180deg,rgba(4,39,63,.16) 0 1px,#FBFCFD 1px 2px,#EEF2F5 2px 9px,rgba(4,39,63,.22) 9px 10px,#F4F7F9 10px 11px,#E6ECF1 11px,#C2CDD7 calc(100% - 9px));
  box-shadow:0 -6px 10px -8px var(--s1)}

/* ------------------------------ Kurdish and Arabic ------------------------------ */
:lang(ckb) .ks-cw *,:lang(ar) .ks-cw *{font-style:normal;letter-spacing:0;text-transform:none}
:is(:lang(ckb),:lang(ar)) .ks-cw .ks-cw-title{font-weight:600;font-size:clamp(31px,4.1cqw,62px);line-height:1.4}
:is(:lang(ckb),:lang(ar)) .ks-cw .ks-cw-lede{line-height:1.9}
:is(:lang(ckb),:lang(ar)) .ks-cw .ks-cw-count{font-size:14px;font-weight:700}
:is(:lang(ckb),:lang(ar)) .ks-cw .ks-cw-plate-h{font-size:14px;font-weight:700;line-height:1.8;letter-spacing:0}
:is(:lang(ckb),:lang(ar)) .ks-cw-facts li{font-weight:700;font-size:clamp(18px,1.6cqw,23px);line-height:1.6}
:is(:lang(ckb),:lang(ar)) .ks-cw-facts li:nth-child(3){font-weight:500;font-size:clamp(14.5px,1.15cqw,16.5px);margin-top:2px}
/* the Kurdish and Arabic facts are longer: one to a line, so no line starts with the dot */
:is(:lang(ckb),:lang(ar)) .ks-cw-facts{flex-direction:column;align-items:center}
:is(:lang(ckb),:lang(ar)) .ks-cw-facts li:nth-child(2)::before{content:none}
:is(:lang(ckb),:lang(ar)) .ks-cw-facts li:nth-child(3){flex-basis:auto;text-wrap:balance}
:is(:lang(ckb),:lang(ar)) .ks-cw .ks-cw-source{font-size:13.5px;line-height:1.85}
:is(:lang(ckb),:lang(ar)) .ks-cw .ks-cw-bay-title{font-weight:600;font-size:clamp(22px,2.1cqw,31px);line-height:1.5}
:is(:lang(ckb),:lang(ar)) .ks-cw-what{font-weight:600;font-size:17px;line-height:1.6}
:is(:lang(ckb),:lang(ar)) .ks-cw-who{font-size:15px;line-height:1.75}
:is(:lang(ckb),:lang(ar)) .ks-cw-meta{font-size:13.5px;font-weight:600}
:is(:lang(ckb),:lang(ar)) .ks-cw-sum{font-size:14.5px;line-height:1.85}
:is(:lang(ckb),:lang(ar)) .ks-cw .ks-cw-names{line-height:1.9}
[dir="rtl"] .ks-cw .ks-crumb-sep{transform:scaleX(-1)}
/* in Kurdish and Arabic the first column of labels starts where the site's back-to-top button sits: it moves to the other corner on this page */
[dir="rtl"] .ks-totop{right:auto;left:clamp(16px,2.5vw,30px)}

/* ------------------------------ narrower walls ------------------------------ */
/* two to a row: a landscape and a portrait fit; two landscapes take a line each */
@container (max-width:1039.98px){
  /* two to a row: the papers are sized so two landscapes fit side by side, so none hangs alone */
  .ks-cw-bay,.ks-cw-first{--r:20px;--m:24px;--mb:30px;--u:clamp(200px,calc((100cqw - var(--gap) - 4 * (var(--r) + var(--m))) / 2),400px)}
  /* the gilt frame is measured against this wall's papers, not the three-to-a-row ones */
  .ks-cw-first{--gu:max(min(var(--u),var(--gw)),min(calc(var(--u) * 1.5),calc(100svh - 198px - 2 * var(--gr) - var(--gm) - var(--gmb)),var(--gw)))}
}
/* the first wall stacks: crumbs, title, the gilt frame, the plate, then the sentence */
@container (max-width:899.98px){
  .ks-cw-first{grid-template-columns:minmax(0,1fr);min-height:0;padding-bottom:8px;--gr:24px;--gm:32px;--gmb:40px;--gu:calc(min(58cqw,420px) / .708)}
  .ks-cw-intro{display:contents}
  .ks-cw .ks-crumbs{order:1;margin-bottom:12px}.ks-cw-title{order:2}
  .ks-cw-piece--gilt{order:3;justify-self:center;margin-top:62px}
  .ks-cw-plate{order:4;margin-top:32px;justify-self:center}.ks-cw .ks-cw-source{order:5;justify-self:center;text-align:center}
  .ks-cw .ks-cw-lede{order:6;margin-top:34px}.ks-cw .ks-cw-count{order:7}
}
@container (min-width:680px) and (max-width:899.98px){
  .ks-cw .ks-cw-lede{margin-inline:auto;text-align:center}
  .ks-cw .ks-cw-count{justify-content:center}
  .ks-cw-piece--gilt{margin-top:88px}
}
/* phones: one frame to a row; the mouldings slim down so the paper keeps the screen */
@container (max-width:679.98px){
  .ks-cw-first,.ks-cw-bay{--r:8px;--chf:1px;--m:13px;--mb:15px;--fil:2px;--stp:1px;--bev:1.5px}
  .ks-cw-first{padding-top:112px;--gr:12px;--gm:14px;--gmb:18px;
    /* the gilt paper is as wide as the screen's height allows, between 72% and 82% of the wall */
    --gu:calc(clamp(72cqw,calc((100svh - 392px) * .708),min(82cqw,380px)) / .708)}
  .ks-cert-staff ~ .ks-cw-wrap .ks-cw-first{padding-top:28px}
  .ks-cw .ks-cw-title{font-size:clamp(30px,9.4cqw,40px);font-weight:470}
  :is(:lang(ckb),:lang(ar)) .ks-cw .ks-cw-title{font-size:clamp(25px,7.4cqw,34px)}
  .ks-cw-piece--gilt{margin-top:58px;--bev:2px}
  :is(:lang(ckb),:lang(ar)) .ks-cw-piece--gilt{margin-top:48px}
  .ks-cw-piece--gilt::before{inset:-70px -10px auto -10px;height:260px;background:radial-gradient(ellipse 50% 120px at 50% 70px,rgba(255,229,180,.8),rgba(255,229,180,.3) 52%,rgba(255,229,180,0) 100%)}
  .ks-cw-lamp{height:38px}.ks-cw-tube{height:15px;top:5px;border-radius:8px 8px 6px 6px}.ks-cw-arm{top:19px;width:7px;margin-left:-3.5px}.ks-cw-arm::after{width:18px;margin-left:-9px;height:6px}
  .ks-cw-piece--gilt .ks-cw-frame{box-shadow:calc(var(--sx) * 1px) 2px 3px var(--s1),calc(var(--sx) * 4px) 7px 10px var(--s2)}
  .ks-cw-plate{margin-top:30px;width:100%;max-width:none;padding:17px 30px 18px}
  .ks-cw-screw{inset-inline-start:11px}.ks-cw-screw + .ks-cw-screw{inset-inline-end:11px}
  .ks-cw .ks-cw-source{text-align:start;justify-self:start}
  .ks-cw-row{flex-direction:column;align-items:center;row-gap:46px}
  .ks-cw-bay .ks-cw-piece--p{--pw:min(80cqw,400px);--ph:calc(var(--pw) / var(--ar))}
  .ks-cw-bay .ks-cw-piece--l{--m:9px;--mb:11px;--pw:min(calc(100cqw - 2 * (var(--r) + var(--m))),540px);--ph:calc(var(--pw) / 1.4142);padding-top:0}
  .ks-cw-frame{box-shadow:calc(var(--sx) * 1px) 1px 2px var(--s1),calc(var(--sx) * 3px) 5px 8px var(--s2)}
  .ks-cw .ks-cw-frame:focus-visible{outline-offset:4px;box-shadow:0 0 0 2px #fff,calc(var(--sx) * 1px) 1px 2px var(--s1),calc(var(--sx) * 3px) 5px 8px var(--s2)}
  .ks-cw-glass{box-shadow:inset calc(var(--sx) * 1px) 1px 2px -1px var(--s1),inset calc(var(--sx) * 3px) 4px 5px -3px var(--s2)}
  .ks-cw-cap{margin-top:16px;padding-inline:4px}
}
/* where the plate cannot hold two facts on a line, each takes its own, so no line starts with the dot */
@container (max-width:439.98px){
  .ks-cw-facts{flex-direction:column;align-items:center}
  .ks-cw-facts li:nth-child(2)::before{content:none}
  .ks-cw-facts li:nth-child(3){flex-basis:auto}
}
/* small screens: the wall light is one soft patch on the far side, with no window bars behind the words */
@media (max-width:760px){
  .ks-cw-light i{left:52vw;width:60vw;-webkit-mask-image:linear-gradient(180deg,#000 40%,transparent 92%);mask-image:linear-gradient(180deg,#000 40%,transparent 92%);-webkit-mask-composite:source-over;mask-composite:add;filter:blur(26px);opacity:.26}
}

/* ------------------------------ the close view: a certificate taken down to read ------------------------------ */
/* the scrollbar's place is kept (and darkened) while a paper is open, so the wall behind does not re-lay out */
html.ks-cw-open{overflow:hidden;scrollbar-gutter:stable;background:#0A2134}
.ks-cw-view{position:fixed;inset:0;width:100%;height:100%;max-width:none;max-height:none;margin:0;padding:0;border:0;background:transparent;color:#fff;overflow:hidden;
  display:none;grid-template-columns:minmax(0,1fr) clamp(300px,26vw,400px);font-family:inherit}
.ks-cw-view[open]{display:grid}
.ks-cw-view::backdrop{background:rgba(3,26,43,.975);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px)}
.ks-cw-stage{min-width:0;min-height:0;display:flex;overflow:auto;padding:clamp(18px,3vw,44px);overscroll-behavior:contain;outline-offset:-4px;touch-action:pan-x pan-y pinch-zoom}
.ks-cw-stage:focus-visible{outline:2px solid var(--brass-l,#E2BF73)}
.ks-cw-sheet{position:relative;flex:none;margin:auto;background:#fff;box-shadow:0 2px 4px rgba(0,0,0,.4),0 18px 44px rgba(0,0,0,.42);cursor:zoom-in}
.ks-cw-stage.is-zoomed .ks-cw-sheet{cursor:zoom-out}
.ks-cw-pic{display:block;width:100%;height:100%;user-select:none;-webkit-user-drag:none}
/* "show where it says that": a gold line drawn under the words, with end ticks. Never a block over the paper */
.ks-cw-mark{position:absolute;height:max(3px,.42%);margin-top:.35%;border-radius:2px;background:#D9A53A;box-shadow:0 0 0 1px rgba(255,255,255,.75),0 2px 6px rgba(80,54,4,.45);transform:scaleX(0);transform-origin:50% 50%;transition:transform .7s cubic-bezier(.2,.7,.2,1)}
.ks-cw-mark::before,.ks-cw-mark::after{content:"";position:absolute;top:-220%;bottom:-220%;width:max(2px,.9%);background:inherit;border-radius:2px;box-shadow:0 0 0 1px rgba(255,255,255,.75)}
.ks-cw-mark::before{left:0}.ks-cw-mark::after{right:0}
.ks-cw-mark.is-on{transform:scaleX(1)}
/* centred while there is room; on a short screen the label starts at the top and scrolls (auto margins, not justify-content) */
.ks-cw-panel{min-width:0;display:flex;flex-direction:column;justify-content:flex-start;padding:clamp(64px,8vh,96px) clamp(22px,2.4vw,40px) clamp(22px,3vh,40px);padding-inline-start:clamp(20px,2vw,32px);overflow:auto;text-align:start}
.ks-cw-panel > :first-child{margin-top:auto}
.ks-cw-panel > .ks-cw-tools{margin-bottom:auto}
/* On a computer the arrows never move: the row is pinned to the foot of the panel, in line with the paper's lower edge,
   whatever the length of the words above it (it used to ride up and down with them, and a second click missed). */
@media (min-width:861px) and (min-height:521px){
  .ks-cw-panel{padding-bottom:0}
  .ks-cw-panel > .ks-cw-tools{margin-top:auto;margin-bottom:0;position:sticky;bottom:0;z-index:1;padding:22px 0 clamp(18px,3vw,44px);background:linear-gradient(180deg,rgba(7,30,47,0),rgba(7,30,47,.94) 20px)}
  .ks-cw-where{margin-bottom:6px}
  /* Close keeps its top corner: fixed to the screen, since the pinned row above would otherwise become its anchor */
  .ks-cw-tools .ks-cw-close{position:fixed}
}
.ks-cw-live{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.ks-cw-pwhat{margin:0;font-family:var(--ks-display);font-weight:520;font-size:clamp(24px,2vw,32px);line-height:1.15;letter-spacing:-.012em;color:#fff}
.ks-cw-pwho{margin:10px 0 0;font-size:15.5px;line-height:1.5;color:rgba(255,255,255,.86)}
.ks-cw-pmeta{margin:12px 0 0;font-size:12.5px;font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:#E2BF73}
.ks-cw-psum{margin:22px 0 0;padding-top:20px;border-top:1px solid rgba(255,255,255,.16);font-size:15.5px;line-height:1.65;color:rgba(255,255,255,.92)}
.ks-cw-pnote{margin:8px 0 0;font-size:12.5px;line-height:1.5;color:rgba(255,255,255,.6)}
.ks-cw-pheld{margin:14px 0 0;padding:8px 10px;border-radius:4px;background:#FFF4D6;color:#5B4510;font:600 12.5px/1.45 system-ui,-apple-system,"Segoe UI",sans-serif;text-align:left}
.ks-cw-where{margin:22px 0 0;align-self:flex-start;display:inline-flex;flex-direction:column;align-items:flex-start;gap:3px;padding:11px 18px 12px;border-radius:10px;border:1.5px solid rgba(226,191,115,.75);background:rgba(226,191,115,.1);color:#fff;font:inherit;text-align:start;cursor:pointer;transition:background-color .25s,border-color .25s}
.ks-cw-where span{font-size:12.5px;font-weight:700;color:rgba(255,255,255,.78)}
.ks-cw-where b{font-family:var(--ks-display);font-weight:600;font-size:19px;line-height:1.3;color:#F0D089}
.ks-cw-where:hover,.ks-cw-where[aria-pressed="true"]{background:rgba(226,191,115,.22);border-color:#E2BF73}
.ks-cw-tools{margin:28px 0 0;display:flex;align-items:center;gap:10px}
.ks-cw-num{margin:0;min-width:5.5em;text-align:center;font-size:13px;font-weight:700;letter-spacing:.04em;font-variant-numeric:tabular-nums;color:rgba(255,255,255,.82)}
.ks-cw-nav,.ks-cw-close{flex:none;display:inline-grid;place-items:center;width:46px;height:46px;border-radius:50%;border:1.5px solid rgba(255,255,255,.34);background:rgba(255,255,255,.06);color:#fff;cursor:pointer;transition:background-color .25s,border-color .25s}
.ks-cw-nav:hover,.ks-cw-close:hover{background:rgba(255,255,255,.16);border-color:rgba(255,255,255,.7)}
.ks-cw-zoom{margin-inline-start:auto}
.ks-cw-close{position:absolute;top:clamp(14px,2.2vh,24px);inset-inline-end:clamp(14px,1.8vw,28px);z-index:2;background:rgba(3,26,43,.7)}
[dir="rtl"] .ks-cw-prev svg,[dir="rtl"] .ks-cw-next svg{transform:scaleX(-1)}
.ks-cw-view :is(button):focus-visible{outline:2.5px solid #E2BF73;outline-offset:3px}
/* the site-wide focus rule would square these off */
.ks-cw-view :is(.ks-cw-nav,.ks-cw-close):focus-visible{border-radius:50%;box-shadow:none}
.ks-cw-view .ks-cw-where:focus-visible{border-radius:10px;box-shadow:none}
.ks-cw-view [hidden]{display:none !important}
/* the paper comes forward: a short rise and fade, once per certificate */
@keyframes ks-cw-rise{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}
.ks-cw-view.is-turn .ks-cw-sheet{animation:ks-cw-rise .26s cubic-bezier(.2,.7,.2,1) both}
:is(:lang(ckb),:lang(ar)) .ks-cw-view *{letter-spacing:0;text-transform:none}
:is(:lang(ckb),:lang(ar)) .ks-cw-pwhat{font-weight:600;font-size:clamp(21px,1.7vw,27px);line-height:1.5}
:is(:lang(ckb),:lang(ar)) .ks-cw-pmeta{font-size:13.5px;font-weight:600}
:is(:lang(ckb),:lang(ar)) .ks-cw-psum{line-height:1.95}
:is(:lang(ckb),:lang(ar)) .ks-cw-where b{font-size:17.5px;line-height:1.6}
@media (max-width:860px),(orientation:landscape) and (max-height:520px){
  /* phones: the paper gets most of the screen; the label is a sheet beneath it, with close, previous, next and zoom in thumb reach at its top */
  .ks-cw-view{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto}
  .ks-cw-view::backdrop{background:rgba(3,26,43,.98)}
  .ks-cw-stage{padding:10px}
  /* the sheet is one fixed height, so its row of buttons is in the same place for every certificate */
  .ks-cw-panel{height:min(38vh,250px);height:min(38svh,250px);padding:12px 18px 18px;border-top:1px solid rgba(255,255,255,.14);
    background:linear-gradient(rgba(3,26,43,0),rgba(3,26,43,.96) 60%) local 0 100% / 100% 30px no-repeat,linear-gradient(rgba(226,191,115,0),rgba(226,191,115,.28)) scroll 0 100% / 100% 12px no-repeat,rgba(3,26,43,.96)}
  .ks-cw-panel > :first-child{margin-top:0}
  .ks-cw-panel > .ks-cw-tools{margin-bottom:12px}
  .ks-cw-tools{order:-3;margin-top:0;gap:8px;position:sticky;top:-12px;z-index:1;padding:8px 0;background:#031A2B}
  .ks-cw-tools .ks-cw-close{position:static}
  .ks-cw-pwhat,.ks-cw-pwho,.ks-cw-pmeta,.ks-cw-pheld{order:-2}
  .ks-cw-where{order:-1;margin:12px 0 0;padding:9px 14px;flex-direction:row;align-items:baseline;gap:8px;flex-wrap:wrap}
  .ks-cw-pwhat{font-size:20px}.ks-cw-pwho{margin-top:4px;font-size:14px}.ks-cw-pmeta{margin-top:6px}
  .ks-cw-psum{margin-top:12px;padding-top:12px;font-size:14.5px}
  .ks-cw-nav,.ks-cw-close{width:44px;height:44px}
}
/* a phone held sideways: paper and label side by side again */
@media (orientation:landscape) and (max-height:520px){
  .ks-cw-view{grid-template-columns:minmax(0,1fr) clamp(300px,44vw,340px);grid-template-rows:minmax(0,1fr)}
  .ks-cw-tools{gap:6px}
  .ks-cw-num{min-width:0;flex:1}
  .ks-cw-stage{padding:10px}
  .ks-cw-panel{height:auto;padding:8px 16px 14px;border-top:0}
  .ks-cw-tools{top:-8px}
}
@media (prefers-reduced-motion:reduce){
  .ks-cw *,.ks-cw *::before,.ks-cw *::after,.ks-cw-view *,.ks-cw-view *::before{animation:none !important;transition:none !important}
}
@supports not (container-type:inline-size){
  .ks-cw{--gap:24px;--r:10px;--m:14px;--mb:18px;--gr:14px;--gm:18px;--gmb:24px;--u:min(78vw,400px);--gu:min(84vw,520px)}
  .ks-cw-first{grid-template-columns:minmax(0,1fr);min-height:0;row-gap:28px;padding-inline:0}
  .ks-cw-piece--gilt{justify-self:center}
  .ks-cw-bay{padding-top:72px}
  .ks-cw-row{flex-direction:column;align-items:center;row-gap:46px}
  .ks-cw-row .ks-cw-piece--l{padding-top:0}
  .ks-cw .ks-cw-title{font-size:clamp(30px,6vw,64px)}
  .ks-cw-first{padding-top:128px;padding-bottom:40px}
  .ks-cert-staff ~ .ks-cw-wrap .ks-cw-first{padding-top:44px}
  .ks-cw-foot{padding:72px 0 56px}
}
@supports not (container-type:inline-size){@media (max-width:679px){.ks-cw-first{padding-top:112px}}}
