/* academy.security.krd
   One design system with the monitor: same neutrals, same type, same
   spacing and motion. The difference is the accent — the monitor reads as
   a signal, the academy as the sun — so the two are recognisably one
   organisation without looking like the same page. */
/* Typefaces, served from this host.

   The academy was loading four families from fonts.googleapis.com while
   the monitor next door has served its own since the day it was measured:
   849 KB of font before a word appeared, and every reader's address handed
   to an advertising company as the price of opening the page. A site that
   teaches people not to leak their traffic to third parties should not
   charge them a third party to read the lesson.

   The files, the weights and the unicode ranges are the same ones
   pipeline/bake.py serves, deliberately: two deployments that disagree
   about what a typeface covers is a bug nobody would find for a year.
   All four families are SIL OFL 1.1 and each licence sits beside the
   files in assets/fonts/, as the licence requires.

   font-display:swap — the text arrives first and reflows when the face
   lands, which is the right trade on a slow connection. */
@font-face{font-family:'Archivo';font-style:normal;font-weight:400 900;font-display:swap;src:url('/assets/fonts/archivo-latin.woff2') format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:'IBM Plex Mono';font-style:normal;font-weight:400;font-display:swap;src:url('/assets/fonts/plexmono-400.woff2') format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:'IBM Plex Mono';font-style:normal;font-weight:500;font-display:swap;src:url('/assets/fonts/plexmono-500.woff2') format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:'IBM Plex Mono';font-style:normal;font-weight:600;font-display:swap;src:url('/assets/fonts/plexmono-600.woff2') format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:'Noto Kufi Arabic';font-style:normal;font-weight:400 700;font-display:swap;src:url('/assets/fonts/notokufi-arabic.woff2') format('woff2');unicode-range:U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1}
@font-face{font-family:'Noto Sans Arabic';font-style:normal;font-weight:400 700;font-display:swap;src:url('/assets/fonts/notosansarabic-arabic.woff2') format('woff2');unicode-range:U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1}

:root{
  --ground:#F6F7F9; --sunk:#EDEFF3; --surface:#FFFFFF; --raise:#FFFFFF;
  --rule:#CFD5DD;   --hair:#E3E7EC;
  --ink:#0A0C0F;    --mid:#474F59;  --dim:#656C75;
  --acc:#7A5605;    --acc-f:#7A5605;   /* 6.20:1 on ground, 6.64:1 under white */
  --on-acc:#FFFFFF;
  --good:#2F6B45;   --warn:#8A4D0B;  --bad:#A82A20;
  --f-disp:"Archivo","Helvetica Neue",Arial,sans-serif;
  --f-body:"Archivo","Helvetica Neue",Arial,sans-serif;
  --f-mono:"IBM Plex Mono",ui-monospace,Menlo,monospace;
  --s1:4px;  --s2:8px;  --s3:12px; --s4:16px; --s5:24px;
  --s6:32px; --s7:48px; --s8:64px;
  --r1:4px;  --r2:6px;  --r3:10px; --r4:14px;
  --ease:cubic-bezier(.16,1,.3,1);
  --d1:120ms; --d2:220ms; --d3:380ms;
  --shadow:0 1px 2px rgba(10,12,15,.05), 0 8px 24px -10px rgba(10,12,15,.14);
  --lift:0 1px 2px rgba(10,12,15,.06), 0 18px 44px -14px rgba(10,12,15,.20);
  --veil:rgba(246,247,249,.82); --scrim:rgba(10,12,15,.42);
}
@media (prefers-color-scheme:dark){:root{
  --ground:#0A0B0E; --sunk:#060709; --surface:#101317; --raise:#171B20;
  --rule:#2A2F38;   --hair:#1B1F26;
  --ink:#E7EAEE;    --mid:#9BA3AD;  --dim:#828A95;
  --acc:#E8B33C;    --acc-f:#E8B33C;
  --on-acc:#140E02;
  --good:#5FBE86;   --warn:#DE913F;  --bad:#EF6A5E;
  --veil:rgba(10,11,14,.78); --scrim:rgba(0,0,0,.62);
  --shadow:0 1px 2px rgba(0,0,0,.45), 0 12px 32px -10px rgba(0,0,0,.6);
  --lift:0 1px 2px rgba(0,0,0,.5), 0 22px 52px -14px rgba(0,0,0,.75);
}}
html[dir="rtl"]{--f-disp:"Noto Kufi Arabic",sans-serif;--f-body:"Noto Sans Arabic",sans-serif}
*{box-sizing:border-box}
body{margin:0;background:var(--ground);color:var(--ink);
  font:400 15.5px/1.65 var(--f-body);letter-spacing:-.003em;
  -webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
html[dir="rtl"] body{font-size:15.5px;line-height:1.9;letter-spacing:0}
a{color:inherit}
h1,h2,h3,h4{font-family:var(--f-disp);margin:0;line-height:1.14;text-wrap:balance;
  letter-spacing:-.025em;font-weight:700}
h1{font-variation-settings:"wdth" 106,"wght" 760}
h2{font-variation-settings:"wdth" 104,"wght" 720}
h3,h4{font-variation-settings:"wdth" 100,"wght" 650;letter-spacing:-.016em;line-height:1.3}
html[dir="rtl"] :is(h1,h2,h3,h4){letter-spacing:0;line-height:1.5;font-variation-settings:normal}
:focus-visible{outline:2px solid var(--acc-f);outline-offset:3px;border-radius:var(--r1)}
.seg a:focus-visible,.cell:focus-visible,.mnav-p a:focus-visible{outline-offset:-2px}
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.001ms!important;transition-duration:.001ms!important}
}
.wrap{max-width:1180px;margin:0 auto;padding-inline:clamp(20px,4vw,40px)}
.mono{font-family:var(--f-mono);font-variant-numeric:tabular-nums}
.dim{color:var(--dim)}
.lab{font-family:var(--f-mono);font-size:10px;font-weight:600;letter-spacing:.14em;
  text-transform:uppercase;color:var(--dim)}
html[dir="rtl"] .lab{letter-spacing:.05em}

/* chrome */
.top{position:sticky;top:0;z-index:20;background:var(--veil);
  backdrop-filter:saturate(180%) blur(20px);-webkit-backdrop-filter:saturate(180%) blur(20px);
  border-bottom:1px solid var(--hair)}
.bar{display:flex;align-items:center;gap:clamp(8px,1.8vw,18px);height:60px}
.brand{text-decoration:none;font-family:var(--f-disp);font-size:15px;white-space:nowrap;
  font-variation-settings:"wdth" 100,"wght" 800;letter-spacing:-.03em;direction:ltr}
.brand b{font-weight:800}
.brand span{color:var(--acc);font-family:var(--f-mono);font-size:12.5px;
  font-weight:600;letter-spacing:-.02em}
.nav{display:flex;gap:2px;flex-wrap:wrap}
.nav a{position:relative;text-decoration:none;font-family:var(--f-disp);font-size:13.5px;
  font-variation-settings:"wdth" 100,"wght" 560;color:var(--mid);padding:8px 10px;
  border-radius:var(--r2);transition:color var(--d1)}
.nav a::after{content:"";position:absolute;inset-block-end:2px;inset-inline:10px;height:1.5px;
  background:var(--acc);border-radius:1px;transform:scaleX(0);transform-origin:var(--o,left);
  transition:transform var(--d2) var(--ease)}
html[dir="rtl"] .nav a::after{--o:right}
.nav a:hover{color:var(--ink)}
.nav a:hover::after{transform:scaleX(.55);opacity:.5}
.nav a.admin{color:var(--acc)}
.sp{flex:1}
.seg{display:flex;border:1px solid var(--rule);border-radius:3px;overflow:hidden}
.seg a{text-decoration:none;padding:5px 9px;font-family:var(--f-mono);font-size:11px;color:var(--dim)}
.seg a.on{background:var(--acc-f);color:var(--on-acc);font-weight:600}
.who{font-family:var(--f-mono);font-size:12px;color:var(--dim);text-decoration:none;
  max-width:14ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
main{min-height:66vh;padding-block:clamp(24px,5vh,46px) 60px}
.foot{border-top:1px solid var(--hair);padding-block:22px 34px;font-size:14px}
.foot p{margin:0 0 6px}

/* pieces */
.btn{display:inline-flex;align-items:center;gap:8px;font-family:var(--f-disp);
  font-variation-settings:"wdth" 100,"wght" 620;font-size:14px;line-height:1;
  padding:11px 18px;border-radius:var(--r2);border:1px solid transparent;
  background:var(--acc-f);color:var(--on-acc);text-decoration:none;cursor:pointer;
  transition:transform var(--d1) var(--ease),box-shadow var(--d1),filter var(--d1)}
.btn:hover{filter:brightness(1.06);box-shadow:0 4px 14px -4px color-mix(in srgb,var(--acc-f) 55%,transparent)}
.btn:active{transform:translateY(1px);box-shadow:none}
.btn.ghost{background:var(--surface);color:var(--ink);border-color:var(--rule);box-shadow:var(--shadow)}
.btn.ghost:hover{filter:none;box-shadow:var(--lift)}
.btn.sm{padding:6px 11px;font-size:13px}
.btn.danger{background:var(--bad);border-color:var(--bad);color:#fff}
.btn[disabled]{opacity:.45;cursor:not-allowed}
.grid{display:grid;gap:0;border:1px solid var(--hair);border-radius:var(--r4);
  overflow:hidden;background:var(--surface)}
.g2{grid-template-columns:repeat(auto-fit,minmax(280px,1fr))}
.g3{grid-template-columns:repeat(auto-fit,minmax(210px,1fr))}
.cell{padding:var(--s5);display:flex;flex-direction:column;gap:var(--s2);min-width:0;
  border-inline-start:1px solid var(--hair);border-top:1px solid var(--hair);
  margin-inline-start:-1px;margin-top:-1px;transition:background var(--d1)}
.cell:hover{background:var(--sunk)}
.card{border:1px solid var(--hair);border-radius:var(--r3);background:var(--surface);
  padding:var(--s4) var(--s5);display:flex;flex-direction:column;gap:var(--s2);
  transition:box-shadow var(--d1)}
.card:hover{box-shadow:var(--shadow)}
.pill{font-family:var(--f-mono);font-size:9.5px;font-weight:600;letter-spacing:.1em;
  text-transform:uppercase;border:1px solid currentColor;border-radius:2px;padding:2px 7px}
.head{display:flex;align-items:baseline;gap:var(--s4);margin-bottom:var(--s5)}
.head::after{content:"";flex:1;height:9px;align-self:center;min-width:24px;
  background:
    linear-gradient(var(--rule),var(--rule)) left center/100% 1px no-repeat,
    repeating-linear-gradient(90deg,var(--rule) 0 1px,transparent 1px 32px);
  -webkit-mask-image:linear-gradient(90deg,#000,#000 55%,transparent);
  mask-image:linear-gradient(90deg,#000,#000 55%,transparent);opacity:.85}
html[dir="rtl"] .head::after{
  -webkit-mask-image:linear-gradient(270deg,#000,#000 55%,transparent);
  mask-image:linear-gradient(270deg,#000,#000 55%,transparent)}
.note{border:1px solid var(--hair);border-inline-start:2px solid var(--acc);
  border-radius:var(--r2);background:var(--sunk);padding:var(--s4) var(--s5);margin:var(--s4) 0}
.note.bad{border-color:var(--bad);background:color-mix(in srgb,var(--bad) 10%,transparent)}
.note.warn{border-color:var(--warn);background:color-mix(in srgb,var(--warn) 10%,transparent)}
.bar-track{height:5px;background:var(--hair);border-radius:3px;overflow:hidden}
.bar-track i{display:block;height:100%;background:var(--acc-f)}

/* prose */
.prose{max-width:68ch}
.prose p{margin:0 0 var(--s4);font-size:16px;line-height:1.72}
html[dir="rtl"] .prose p{font-size:16px;line-height:2.0}
.prose h2{margin:30px 0 12px;font-size:22px}
.prose h3{margin:24px 0 10px;font-size:18px}
.prose ul,.prose ol{margin:0 0 16px;padding-inline-start:22px}
.prose li{margin-bottom:7px}
.prose code{font-family:var(--f-mono);font-size:.88em;background:var(--surface);
  padding:1px 5px;border-radius:2px}
.prose pre{background:var(--surface);border:1px solid var(--hair);padding:14px;
  overflow-x:auto;border-radius:3px}
.prose pre code{background:none;padding:0}
.prose blockquote{margin:20px 0;padding-inline-start:18px;border-inline-start:2px solid var(--acc-f)}

/* forms and tables */
form.stack{display:flex;flex-direction:column;gap:14px;max-width:460px}
label{display:flex;flex-direction:column;gap:5px;font-family:var(--f-mono);font-size:10.5px;
  font-weight:600;letter-spacing:.1em;text-transform:uppercase;color:var(--dim)}
input[type=text],input[type=email],input[type=password],input[type=number],select,textarea{
  font:400 16px/1.5 var(--f-body);color:var(--ink);background:var(--ground);
  border:1px solid var(--rule);border-radius:3px;padding:9px 11px;width:100%}
textarea{min-height:110px;resize:vertical}
:is(input,select,textarea):focus{outline:2px solid var(--acc-f);outline-offset:1px;border-color:var(--acc-f)}
table{width:100%;border-collapse:collapse;font-size:14.5px}
th,td{text-align:start;padding:9px 10px;border-bottom:1px solid var(--hair);vertical-align:top}
th{font-family:var(--f-mono);font-size:10px;letter-spacing:.12em;text-transform:uppercase;
  color:var(--dim);font-weight:600}
.scroll{overflow-x:auto}
.opt{display:flex;gap:10px;align-items:flex-start;padding:10px 12px;border:1px solid var(--hair);
  border-radius:3px;cursor:pointer;background:var(--ground)}
.opt:hover{border-color:var(--acc-f)}
.opt input{margin-top:4px;accent-color:var(--acc-f)}
.opt.right{border-color:var(--good);background:color-mix(in srgb,var(--good) 10%,transparent)}
.opt.wrong{border-color:var(--bad);background:color-mix(in srgb,var(--bad) 10%,transparent)}
.stack-sm{display:flex;flex-direction:column;gap:8px}
.row{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
/* mobile navigation
   The nav used to be hidden below 720px with nothing in its place, so the
   academy could not be navigated on a phone at all. A <details> disclosure
   needs no JavaScript, and the page reload on navigation closes it. */
.acct{display:flex;align-items:center;gap:var(--s2)}
.mnav{display:none;position:relative}
.mnav summary{list-style:none;display:grid;place-items:center;width:34px;height:34px;
  border:1px solid var(--rule);border-radius:var(--r2);color:var(--mid);
  background:var(--surface);cursor:pointer}
.mnav summary::-webkit-details-marker{display:none}
.mnav summary svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.7;
  stroke-linecap:round}
.mnav[open] summary{color:var(--ink)}
.mnav-p{position:absolute;inset-block-start:calc(100% + 10px);inset-inline-end:0;
  min-width:min(260px,78vw);display:flex;flex-direction:column;gap:var(--s1);
  padding:var(--s2);background:var(--ground);border:1px solid var(--hair);
  border-radius:var(--r3);box-shadow:var(--lift);z-index:30}
.mnav-p a{text-decoration:none;padding:11px 13px;border-radius:var(--r2);
  font-family:var(--f-disp);font-size:15px;font-variation-settings:"wdth" 100,"wght" 600;
  color:var(--mid);transition:background var(--d1),color var(--d1)}
.mnav-p>a:hover{background:var(--sunk);color:var(--ink)}
.mnav-r{display:flex;flex-wrap:wrap;gap:var(--s2);align-items:center;
  margin-top:var(--s2);padding-top:var(--s3);border-top:1px solid var(--hair)}
.mnav-r .seg{flex:1 0 100%}
.mnav-r .seg a{flex:1;text-align:center;padding:8px 6px}
.mnav-r .btn{flex:1;justify-content:center}
@media (max-width:860px){
  .nav{display:none} .who{display:none}
  .bar>.seg{display:none}
  .acct{display:none}
  .mnav{display:block}
  .bar{height:56px;gap:10px}
}

/* ═══════════ public safety guides ═══════════
   The one part of this site written for somebody who is not studying
   security and did not choose to be here. It has to be scannable, legible
   on a phone, and calm — a person arriving at "my account was stolen" is
   already agitated and does not need a wall of text. */
.ghead{padding:clamp(28px,6vh,52px) 0 8px;max-width:660px}
.ghead h1{font-size:clamp(30px,6vw,46px);letter-spacing:-.035em;line-height:1.1;margin:10px 0 0}
html[dir="rtl"] .ghead h1{letter-spacing:0;line-height:1.35}
.glede{color:var(--mid);font-size:clamp(16px,2.2vw,19px);line-height:1.6;margin:14px 0 0}
.gfacts{display:flex;gap:28px;margin-top:26px;flex-wrap:wrap}
.gfacts span{display:flex;flex-direction:column;gap:2px;font:600 10px/1.4 var(--f-mono);
  letter-spacing:.13em;text-transform:uppercase;color:var(--dim)}
.gfacts b{font:700 26px/1 var(--f-disp);letter-spacing:-.03em;color:var(--acc)}
html[dir="rtl"] .gfacts span{letter-spacing:.04em}

.gcards{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));
  gap:14px;margin:34px 0 0}
.gcard{position:relative;display:flex;flex-direction:column;gap:8px;padding:22px 22px 46px;
  border:1px solid var(--hair);border-radius:10px;background:var(--surface);
  text-decoration:none;color:inherit;overflow:hidden;
  transition:border-color .18s cubic-bezier(.16,1,.3,1),
             transform .18s cubic-bezier(.16,1,.3,1),
             box-shadow .18s cubic-bezier(.16,1,.3,1);
  animation:grise .5s cubic-bezier(.16,1,.3,1) both;
  animation-delay:calc(var(--i,0) * 45ms)}
@keyframes grise{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
.gcard:hover{border-color:color-mix(in srgb,var(--acc) 42%,transparent);
  transform:translateY(-2px);box-shadow:0 1px 2px rgba(10,12,15,.05),0 14px 34px -12px rgba(10,12,15,.18)}
.gcard:focus-visible{outline-offset:-2px}
.gicon{display:grid;place-items:center;width:42px;height:42px;border-radius:9px;
  background:color-mix(in srgb,var(--acc) 10%,transparent);margin-bottom:4px}
.gicon svg{width:21px;height:21px;fill:none;stroke:var(--acc);stroke-width:1.6;
  stroke-linecap:round;stroke-linejoin:round}
.gmeta{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.gmeta em,.gmeta i{font-style:normal;font:600 9.5px/1 var(--f-mono);letter-spacing:.12em;
  text-transform:uppercase}
.gmeta em{color:var(--acc);border:1px solid color-mix(in srgb,var(--acc) 34%,transparent);
  border-radius:4px;padding:4px 7px}
.gmeta i{color:var(--dim)}
html[dir="rtl"] .gmeta em,html[dir="rtl"] .gmeta i{letter-spacing:.03em}
.gcard h2{font-size:17.5px;letter-spacing:-.02em;line-height:1.28;margin:2px 0 0}
html[dir="rtl"] .gcard h2{letter-spacing:0;line-height:1.5}
.gcard p{color:var(--mid);font-size:14px;line-height:1.6;margin:0}
.garrow{position:absolute;inset-inline-end:20px;inset-block-end:18px;color:var(--acc);
  font-size:16px;opacity:0;transform:translateX(-4px);
  transition:opacity .18s,transform .18s}
html[dir="rtl"] .garrow{transform:scaleX(-1) translateX(-4px)}
.gcard:hover .garrow{opacity:1;transform:none}
html[dir="rtl"] .gcard:hover .garrow{transform:scaleX(-1)}

.gnote{color:var(--dim);font-size:13px;line-height:1.7;margin:40px 0 0;max-width:62ch}
.gback{padding-top:24px;font-size:13.5px}
.gback a{color:var(--mid);text-decoration:none}
.gback a:hover{color:var(--ink)}
.gart{max-width:640px;padding-top:18px}
.gart h1{font-size:clamp(27px,5.4vw,40px);letter-spacing:-.035em;line-height:1.12;margin:12px 0 0}
html[dir="rtl"] .gart h1{letter-spacing:0;line-height:1.35}
.gprose{margin-top:26px;font-size:16.5px;line-height:1.72}
.gprose h2{font-size:19px;margin:34px 0 10px;letter-spacing:-.02em}
.gprose h3{font-size:16px;margin:26px 0 8px}
.gprose ul,.gprose ol{padding-inline-start:22px;line-height:1.8}
.gprose li{margin:6px 0}
.gprose blockquote{margin:24px 0;padding:14px 18px;border-inline-start:2px solid var(--acc);
  background:color-mix(in srgb,var(--acc) 6%,transparent);border-radius:0 8px 8px 0;color:var(--mid)}
html[dir="rtl"] .gprose blockquote{border-radius:8px 0 0 8px}
.gprose code{font-family:var(--f-mono);font-size:.9em;background:var(--sunk);
  padding:2px 5px;border-radius:4px}
.gwarn{margin-top:22px;padding:12px 15px;border:1px solid var(--hair);border-radius:8px;
  background:var(--sunk);color:var(--mid);font-size:13.5px}
.gmore{margin-top:52px;padding-top:26px;border-top:1px solid var(--hair);max-width:640px}
.gmore-l{display:grid;gap:8px;margin-top:12px}
.gmore-l a{display:flex;align-items:baseline;gap:12px;padding:13px 15px;border-radius:8px;
  border:1px solid var(--hair);background:var(--surface);text-decoration:none;color:inherit;
  transition:border-color .16s,background .16s}
.gmore-l a:hover{border-color:color-mix(in srgb,var(--acc) 38%,transparent)}
.gmore-l b{font-weight:620;font-size:15px}
.gmore-l i{font-style:normal;margin-inline-start:auto;font:600 9.5px/1 var(--f-mono);
  letter-spacing:.1em;text-transform:uppercase;color:var(--dim);white-space:nowrap}

@media (prefers-reduced-motion:reduce){
  .gcard{animation:none}
  .gcard:hover{transform:none}
  .garrow{opacity:1;transform:none}
}

/* ── the admin panel is not the website ──────────────────────────────────
   The panel used the public chrome exactly, so the one place where a click
   changes what the world sees looked like the page that lists the courses.
   Everything below fires only under [data-admin], so the public site is
   untouched: a darker ground, a warning-coloured accent instead of the
   site's green, the word ADMIN in the bar, and a way back out that says
   where it goes. */
:root[data-admin]{
  --ground:#12151A;--sunk:#0C0F13;--surface:#181C22;--rule:#2C333D;
  --hair:#232932;--ink:#EDF0F4;--mid:#A2ABB6;--dim:#7E8792;
  --acc:#E0A93B;--on-acc:#12151A;
  color-scheme:dark;
}
:root[data-admin] body{background:var(--ground);color:var(--ink)}
:root[data-admin] header.top{
  background:var(--sunk);border-bottom:2px solid var(--acc);position:sticky;top:0;z-index:30}
.adm-badge{
  font:700 10px/1 var(--f-mono,ui-monospace,monospace);letter-spacing:.18em;
  background:var(--acc);color:var(--on-acc);padding:5px 8px;border-radius:5px;
  margin-inline-end:4px;white-space:nowrap}
.adm-nav a{color:var(--mid)}
.adm-nav a:hover{color:var(--ink)}
.adm-nav a[aria-current="page"]{color:var(--acc);font-weight:600}

/* ── figures ──────────────────────────────────────────────────────────── */
.adm-grid{display:grid;gap:12px;margin:0 0 26px;
  grid-template-columns:repeat(auto-fit,minmax(140px,1fr))}
.adm-cell{border:1px solid var(--rule);border-radius:9px;padding:13px 15px;
  background:var(--surface);display:flex;flex-direction:column;gap:4px}
.adm-cell b{font-size:25px;font-weight:700;letter-spacing:-.02em;line-height:1.1}
.adm-cell .lab{font-size:10px;letter-spacing:.14em;text-transform:uppercase;color:var(--dim)}
.adm-two{display:grid;gap:22px;grid-template-columns:repeat(auto-fit,minmax(320px,1fr))}
.adm-sec{border:1px solid var(--rule);border-radius:10px;padding:16px 18px;
  background:var(--surface);margin:0 0 20px}
.adm-sec h2{font-size:14px;margin:0 0 14px;letter-spacing:-.01em}
.adm-sec table{width:100%;border-collapse:collapse;font-size:13px}
.adm-sec th{text-align:start;font:600 9.5px/1 ui-monospace,monospace;
  letter-spacing:.12em;text-transform:uppercase;color:var(--dim);
  padding:0 8px 7px 0;border-bottom:1px solid var(--rule)}
.adm-sec td{padding:7px 8px 7px 0;border-bottom:1px solid var(--hair);
  vertical-align:middle}
.adm-sec tr:last-child td{border-bottom:0}
.adm-num{font-family:ui-monospace,monospace;text-align:end;white-space:nowrap}
.adm-bar{display:block;height:4px;border-radius:3px;background:var(--acc);min-width:2px}
.adm-note{color:var(--dim);font-size:12px;line-height:1.6;margin:10px 0 0}

/* ── figures and instruments ─────────────────────────────────────────
   Everything here is drawn from the tokens above, so a figure follows
   the colour scheme without a second asset and without JavaScript.
   currentColor and var() work inside an inline <svg>; they do not work
   in an <img>, which is most of why these are inline. */
.fig{margin:26px 0;padding:0}
.fig figcaption{margin-top:10px;font-size:13.5px;line-height:1.55;color:var(--dim);
  max-width:68ch}
.fig svg{display:block;max-width:100%;height:auto}
.fig-l{font-family:var(--f-mono);font-size:12px;fill:var(--mid)}
.fig-v{font-family:var(--f-mono);font-size:11.5px;fill:var(--dim)}
.fig-b{fill:var(--rule)}
.fig-ax{font-family:var(--f-mono);font-size:10.5px;letter-spacing:.09em;
  text-transform:uppercase;fill:var(--dim)}
/* The marked row is the one the prose is about. Colour alone would not be
   enough -- the accent is a yellow-brown and these pages are read by people
   who may not separate it from the neutral -- so the mark is also a weight
   change, which survives both colour blindness and a greyscale print. */
.fig-l.is-mark,.fig-v.is-mark,.fig-ax.is-mark{fill:var(--acc);font-weight:600}
.fig-b.is-mark{fill:var(--acc)}

.instr{margin:18px 0 0}
.instr-panel{border:1px solid var(--hair);border-radius:var(--r3);
  background:var(--sunk);padding:12px 14px}
.instr-bar{display:flex;flex-wrap:wrap;align-items:center;gap:var(--s2)}
.instr-lab{font:600 10px/1 var(--f-mono);letter-spacing:.14em;
  text-transform:uppercase;color:var(--dim)}
.instr-pick{font:400 13.5px/1.2 var(--f-body);color:var(--ink);
  background:var(--surface);border:1px solid var(--rule);
  border-radius:var(--r1);padding:5px 8px}
.instr-dir{font:400 12.5px/1.2 var(--f-body);color:var(--acc);
  background:none;border:1px solid var(--rule);border-radius:var(--r1);
  padding:5px 9px;cursor:pointer;transition:border-color var(--d1) var(--ease)}
.instr-dir:hover{border-color:var(--acc)}
.instr-tally{margin-inline-start:auto;font:400 12px/1 var(--f-mono);color:var(--dim)}
.instr-out{margin-top:10px;max-height:360px;overflow-y:auto}
.instr-tbl{width:100%;border-collapse:collapse;font-family:var(--f-mono);
  font-size:12.5px;direction:ltr;text-align:left}
.instr-tbl th{position:sticky;top:0;background:var(--sunk);
  font:600 10px/1 var(--f-mono);letter-spacing:.12em;text-transform:uppercase;
  color:var(--dim);padding:6px 8px;border-bottom:1px solid var(--rule);text-align:left}
.instr-tbl td{padding:4px 8px;border-bottom:1px solid var(--hair);color:var(--mid)}
.instr-tbl tr:last-child td{border-bottom:0}
.instr-n{text-align:right;color:var(--ink)}
.instr-v{word-break:break-all}
.instr-none{margin:8px 0 0;font-size:13.5px;color:var(--dim)}

/* The artefact stays visible under the instrument: it is the evidence, and
   a tool that replaced it would be asking to be trusted. Capped in height
   so a 538-line log is no longer 93% of the page. */
pre.artefact{max-height:420px;overflow:auto;background:var(--surface);
  border:1px solid var(--hair);border-radius:var(--r3);padding:14px;
  font-family:var(--f-mono);font-size:12.5px;line-height:1.6;
  direction:ltr;text-align:left;margin:12px 0 0}
.ex{margin:22px 0}
.ex-prompt{margin:0 0 4px;font-size:15px;color:var(--ink)}
.ex .instr{margin-top:10px}

/* Code is left-to-right on a right-to-left page.
   A shell pipeline rendered RTL puts the prompt on the right and reverses
   the order the commands run in: `awk ... | sort | uniq -c | sort -n $`.
   It is not merely ugly, it is a different pipeline, and a learner copying
   it would be copying something that was never written. unicode-bidi
   isolate keeps the span out of the surrounding paragraph's direction
   without needing a wrapper element in the markup -- which matters,
   because View::md escapes its input and cannot emit one. */
.prose pre,.prose pre code{direction:ltr;text-align:left;unicode-bidi:isolate}
.prose code{direction:ltr;unicode-bidi:isolate}

/* The other four figure kinds. Same tokens, same two-channel marking:
   colour plus weight, so the accent is never the only thing carrying it. */
.fig-rule{stroke:var(--rule);stroke-width:1}
.fig-gap{fill:var(--acc);opacity:.10}
.fig-cell{fill:var(--mid)}
.fig-cell.is-mark{fill:var(--acc)}
.fig-box{fill:var(--sunk);stroke:var(--rule);stroke-width:1}
.fig-box.is-mark{stroke:var(--acc);stroke-width:2}
.fig-edge{stroke:var(--rule);stroke-width:1.4;fill:none}
.fig-arrow{fill:var(--rule)}
.fig-ld .fig-l,.fig-fl .fig-l{font-family:var(--f-body);font-size:13px;fill:var(--ink)}
.fig-gr .fig-l{font-family:var(--f-body);font-size:13px;fill:var(--mid)}
.fig-gr .fig-v{fill:var(--ink);font-size:11px}

/* rank's sortable headers, align's position track, chars' odd lines. */
.instr-sortable{cursor:pointer;user-select:none;white-space:nowrap}
.instr-sortable:hover{color:var(--acc)}
.instr-track{position:relative;height:10px;min-width:120px;border-radius:5px;
  background:var(--hair)}
.instr-dot{position:absolute;top:1px;width:8px;height:8px;border-radius:50%;
  background:var(--acc);margin-inline-start:-4px}
.instr-v.is-odd{color:var(--acc);font-weight:600}

/* value and judge take typed input; order takes a position per row. */
.opt-free{display:block;margin:0}
.opt-free .lab{display:block;margin-bottom:6px}
.in-value{width:100%;max-width:420px;font:400 15px/1.5 var(--f-mono);
  color:var(--ink);background:var(--surface);border:1px solid var(--rule);
  border-radius:var(--r1);padding:8px 10px}
.in-value:focus{outline:2px solid var(--acc);outline-offset:1px}
textarea.in-value{font-family:var(--f-body);max-width:560px;resize:vertical}
.opt-order{display:flex;align-items:center;gap:var(--s3);text-transform:none;
  letter-spacing:0;font-family:var(--f-body);font-size:15.5px;font-weight:400;
  color:var(--ink)}
.opt-order .instr-pick{flex:0 0 auto;min-width:64px}
