/* Course home (site/index.html only): the robot floor and the chapter list.
   Loaded after course.css and look-blueprint.css.
   Part 1 is the Original look. Part 2 (clearly marked) is the Blueprint look, every rule scoped to
   :root[data-look="blueprint"]; delete Part 2 to remove that look from the home page.
   The canvas reads --draw-style ("original" / "blueprint") and the --floor-* tokens (assets/home.js).
   Light and dark follow the system setting only. */

/* =====================================================================================
   PART 1: ORIGINAL LOOK (default)
   ===================================================================================== */
:root{
  --tint:#f3f4f7;
  --draft:#9ca3af; --anno:#6b7280;
  /* read by home.js */
  --draw-style:original;
  --floor-bg:#fbfbfc; --floor-fine:var(--grid); --floor-major:var(--grid-2);
}
@media (prefers-color-scheme: dark){:root{
  --tint:#0e1117;
  --draft:#5b6273; --anno:#848b99;
  --floor-bg:#0d1016;
}}

body.hm{background:var(--tint);overflow-x:hidden}
.hm .sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.hm a:focus-visible,.hm button:focus-visible,.hm input:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.hwrap{max-width:1120px;margin:0 auto;padding:0 24px}
.hm section,.hm h2{scroll-margin-top:72px}
.hm .home-top{position:sticky;top:0;z-index:20;background:var(--paper)}

/* shared vocabulary (the Blueprint look turns these into drawing marks) */
.hm .anno{font:500 12.5px/1.4 var(--f-mono);color:var(--ink-3)}
.hpart{position:relative;background:var(--panel);border:1px solid var(--rule);border-radius:14px;box-shadow:0 1px 2px rgb(0 0 0 / .04)}
.hm .balloon{display:none}
.hm .dim b,.hm .dim i{display:none}
.hm .dim span{font:13px var(--f-mono);color:var(--ink-3)}
.tblock{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1px;margin:0;background:var(--rule);font-family:var(--f-display)}
.tblock>div{padding:7px 12px 8px;background:var(--panel);min-width:0}
.tblock .wide{grid-column:1/-1}
.tblock .tri{grid-column:span 3}
.tblock .k{display:block;font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-3);line-height:1.35}
.tblock .v{display:block;font:600 14px/1.45 var(--f-mono);color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-variant-numeric:tabular-nums}
.tblock .v small{font:500 12px var(--f-display);color:var(--ink-3);margin-left:4px}
.hbtn{display:inline-flex;align-items:center;gap:8px;font:600 13.5px/1.5 var(--f-display);padding:6px 13px;border:1px solid var(--rule-2);border-radius:8px;background:var(--panel);color:var(--ink);cursor:pointer;white-space:nowrap;text-decoration:none}
.hbtn:hover{border-color:var(--accent)}
.hbtn.go{background:var(--accent);border-color:var(--accent);color:var(--panel);padding:8px 15px;border-radius:9px}
.hbtn.go:hover{filter:brightness(1.08)}
.hbtn[hidden]{display:none}

/* section heads */
.shead{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 16px;margin:0 0 16px}
.shead h2{font-size:22px;font-weight:650}
.shead .rule{display:none}
.shead .anno{margin-left:auto;font-size:13px}

/* ---------- 1. the floor ---------- */
.floor{position:relative;background:var(--floor-bg);border-bottom:1px solid var(--rule);overflow:hidden}
.floor canvas{position:absolute;inset:0;width:100%;height:100%;display:block;cursor:crosshair;touch-action:manipulation}
.floor canvas:focus-visible{outline:2px solid var(--accent);outline-offset:-3px}
.ftext{position:relative;z-index:1;pointer-events:none;padding-top:64px;padding-bottom:160px}
.ftext>*{pointer-events:auto;width:fit-content;max-width:min(100%,600px)}
.ftext .feyebrow{display:block;font:600 12px var(--f-mono);letter-spacing:.08em;text-transform:uppercase;color:var(--accent-ink)}
.ftext h1{font-size:clamp(32px,4.4vw,48px);font-weight:700;letter-spacing:-.025em;margin:12px 0 10px;max-width:min(100%,560px)}
.ftext .dim{margin-bottom:14px}
.ftext .fdek{font-size:18px;color:var(--ink-2);max-width:min(100%,540px);line-height:1.6}
.fblock{position:absolute;z-index:1;right:16px;bottom:16px;width:364px;border:1px solid var(--rule);border-radius:10px;overflow:hidden;box-shadow:0 1px 2px rgb(0 0 0 / .05)}
.fblock .v{font-size:13px}
.fblock .fst .v{color:var(--ink-2);font:500 13px var(--f-mono)}
.fblock .fst .v.go{color:var(--signal)}
.fblock .fst{min-width:0}
.fblock .act{display:flex;align-items:center;justify-content:space-between;gap:10px}
.fblock .act .hbtn{padding:3px 11px;font-size:13px}
.fnotes{display:flex;flex-wrap:wrap;gap:4px 24px;padding:12px max(24px,calc((100% - 1072px)/2));background:var(--paper);border-bottom:1px solid var(--rule);font-size:14px;color:var(--ink-2)}
.fnotes p{flex:1 1 520px;max-width:84ch}
.fnotes .anno{display:none}
.fnotes .kb{color:var(--ink-3)}

/* ---------- 2. chapters (overrides of the older home rules in course.css) ---------- */
.ch-sec{padding:52px 0 0}
.shead .hcount{font:13px var(--f-mono);color:var(--ink-3);text-align:left;min-height:0}
.ctools{display:flex;flex-wrap:wrap;align-items:center;gap:12px 20px;margin:0 0 20px}
.ctools .hsearch{position:relative;display:flex;align-items:center;flex:1 1 360px;max-width:560px;margin:0}
.ctools .hsearch label{position:absolute;left:14px;font:600 11px var(--f-mono);letter-spacing:.06em;text-transform:uppercase;color:var(--ink-3);pointer-events:none}
.ctools .hsearch input{width:100%;font:16px var(--f-display);padding:12px 48px 12px 58px;border:1px solid var(--rule-2);border-radius:12px;background:var(--panel);color:var(--ink);box-shadow:0 1px 2px rgb(0 0 0 / .04)}
.ctools .hsearch input::placeholder{color:var(--ink-3)}
.ctools .hsearch kbd{position:absolute;right:12px;top:50%;transform:translateY(-50%)}
.ctools .vsw-wrap{margin-left:auto}
.seg-label{font:13.5px var(--f-display);color:var(--ink-2)}

.ch-sec .vpills{min-width:0}
.ch-sec .vsoon{white-space:nowrap}
.ch-sec .hmatch{margin:2px 0 0;line-height:1.4}

.ch-sec .hgrid{grid-template-columns:repeat(auto-fill,minmax(min(100%,300px),1fr));grid-auto-rows:1fr;gap:16px;margin-top:0}
.ch-sec .hcard{display:flex;flex-direction:column;gap:8px;min-height:0;padding:18px 20px;min-width:0}
.hcard .htop{display:flex;align-items:center;gap:12px}
.hcard .htop .vic{margin-left:auto;width:36px;height:36px;border-radius:10px}
.ch-sec .hcard .hdek{height:4.5em;min-height:0}
.hcard .hfoot{margin-top:auto;padding-top:4px}
.hcard .hfoot .vpills,.hcard .hfoot .vsoon{margin-top:0;padding-top:0}
.hcard.soon h2 span{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.hcard.soon .vic{color:var(--ink-3);background:var(--panel)}
.ch-sec .vlist{border-color:var(--rule)}
.vrow{position:relative;min-width:0}
.vrow .vchev{width:18px;text-align:center}
.vrow.soon .vchev{visibility:hidden}

@media (max-width:720px){
  .hwrap{padding:0 16px}
  .ftext{padding-top:34px;padding-bottom:300px}
  .ftext .fdek{font-size:16.5px}
  .fblock{left:12px;right:12px;bottom:12px;width:auto}
  .fblock .nm{display:none}
  .fnotes{padding:12px 16px}
  .ch-sec{padding-top:44px}
  .shead .anno{margin-left:0;flex-basis:100%}
  .ctools .vsw-wrap{margin-left:0}
  .ch-sec .hcard{padding:16px 18px}
  .ctools .hsearch kbd{display:none}
}

/* =====================================================================================
   PART 2: BLUEPRINT LOOK (everything scoped to :root[data-look="blueprint"]; delete this part to drop it)
   The page paper, app bar, footer, card crop marks, square corners and tokens come from look-blueprint.css.
   ===================================================================================== */
:root[data-look="blueprint"]{
  --draw-style:blueprint;
  --floor-bg:var(--paper); --floor-fine:var(--bp-fine); --floor-major:var(--bp-major);
}

:root[data-look="blueprint"] .hwrap{max-width:1180px}
:root[data-look="blueprint"] .hm .anno{font:500 11.5px/1.4 var(--f-mono);letter-spacing:.08em;text-transform:uppercase;color:var(--anno)}
/* part card: crop marks just outside its corners */
:root[data-look="blueprint"] .hpart{border:1px solid var(--rule-2);border-radius:2px;box-shadow:none}
:root[data-look="blueprint"] .hpart::before{
  content:"";position:absolute;inset:-9px;pointer-events:none;
  --t:linear-gradient(var(--draft),var(--draft));
  background:
    var(--t) 0 8px/5px 1px no-repeat, var(--t) 8px 0/1px 5px no-repeat,
    var(--t) 100% 8px/5px 1px no-repeat, var(--t) calc(100% - 8px) 0/1px 5px no-repeat,
    var(--t) 0 calc(100% - 8px)/5px 1px no-repeat, var(--t) 8px 100%/1px 5px no-repeat,
    var(--t) 100% calc(100% - 8px)/5px 1px no-repeat, var(--t) calc(100% - 8px) 100%/1px 5px no-repeat;
}
:root[data-look="blueprint"] .hm .balloon{display:inline-grid;place-items:center;flex:none;width:30px;height:30px;border:1.5px solid var(--accent);border-radius:50%;
  font:600 12.5px/1 var(--f-mono);color:var(--accent-ink);background:var(--panel);letter-spacing:0}
/* dimension line |<---- LABEL ---->| */
:root[data-look="blueprint"] .hm .dim{display:flex;align-items:center;height:16px;color:var(--draft);border-inline:1px solid currentColor;min-width:0}
:root[data-look="blueprint"] .hm .dim i{display:block;flex:1;height:1px;background:currentColor;min-width:10px}
:root[data-look="blueprint"] .hm .dim b{display:block;width:7px;height:7px;flex:none;background:currentColor}
:root[data-look="blueprint"] .hm .dim b:first-child{clip-path:polygon(0 50%,100% 0,100% 100%)}
:root[data-look="blueprint"] .hm .dim b:last-child{clip-path:polygon(0 0,100% 50%,0 100%)}
:root[data-look="blueprint"] .hm .dim span{padding:0 10px;font:500 11.5px var(--f-mono);letter-spacing:.06em;text-transform:uppercase;color:var(--anno);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* title block */
:root[data-look="blueprint"] .tblock{border:1.5px solid var(--ink-2);background:var(--rule-2);font-family:var(--f-mono)}
:root[data-look="blueprint"] .tblock>div{padding:5px 10px 6px}
:root[data-look="blueprint"] .tblock .k{font-size:9.5px;letter-spacing:.1em;line-height:1.3}
:root[data-look="blueprint"] .tblock .v{font:600 12.5px/1.45 var(--f-mono)}
:root[data-look="blueprint"] .tblock .v small{font:500 11px var(--f-mono);margin-left:3px}
:root[data-look="blueprint"] .hbtn{font-size:13px;padding:5px 12px;border:1px solid var(--ink-2);border-radius:2px}
:root[data-look="blueprint"] .hbtn:hover{border-color:var(--accent);color:var(--accent-ink)}
:root[data-look="blueprint"] .hbtn.go{padding:5px 12px;border-radius:2px;border-color:var(--accent);color:var(--panel)}
:root[data-look="blueprint"] .hbtn.go:hover{filter:none;background:var(--accent-ink);border-color:var(--accent-ink);color:var(--panel)}

/* section heads: circled number, title, rule */
:root[data-look="blueprint"] .shead{align-items:center;flex-wrap:nowrap;gap:14px;margin:0 0 20px;min-width:0}
:root[data-look="blueprint"] .shead h2{white-space:nowrap}
:root[data-look="blueprint"] .shead .rule{display:block;flex:1;height:1px;background:var(--rule-2);min-width:16px}
:root[data-look="blueprint"] .shead .anno{flex:none;margin-left:0}

/* 1. the floor: a drawing sheet with a heavy border, notes below it */
:root[data-look="blueprint"] .sheet{padding:22px 16px 0}
:root[data-look="blueprint"] .floor{border:1.5px solid var(--ink-2);max-width:1440px;margin:0 auto}
:root[data-look="blueprint"] .floor canvas:focus-visible{outline-offset:-4px}
:root[data-look="blueprint"] .ftext{padding-top:58px;padding-bottom:170px}
:root[data-look="blueprint"] .ftext>*{max-width:min(100%,620px)}
:root[data-look="blueprint"] .ftext .feyebrow{font:500 11.5px/1.4 var(--f-mono);color:var(--anno)}
:root[data-look="blueprint"] .ftext h1{font-size:clamp(34px,4.4vw,54px);line-height:1.06;margin:14px 0 12px}
:root[data-look="blueprint"] .ftext .dim{width:min(100%,520px);margin-bottom:20px}
:root[data-look="blueprint"] .ftext .fdek{line-height:1.65;max-width:min(100%,540px)}
:root[data-look="blueprint"] .ftext h1{max-width:min(100%,560px)}
:root[data-look="blueprint"] .fblock{right:22px;bottom:30px;border:1.5px solid var(--ink-2);border-radius:0;box-shadow:none}
:root[data-look="blueprint"] .fblock .fst .v{font:500 12.5px var(--f-mono)}
:root[data-look="blueprint"] .fblock .act .hbtn{padding:2px 10px;font-size:12.5px}
:root[data-look="blueprint"] .fnotes{max-width:1440px;margin:0 auto;padding:10px 2px 0;background:none;border:0}
:root[data-look="blueprint"] .fnotes .anno{display:inline;margin-right:8px;color:var(--ink-3)}

/* 2. chapters */
:root[data-look="blueprint"] .ch-sec{padding-top:60px}
:root[data-look="blueprint"] .ctools{margin:-4px 0 26px}
:root[data-look="blueprint"] .ctools .hsearch{align-items:stretch;max-width:520px;border:1.5px solid var(--ink-2);background:var(--panel)}
:root[data-look="blueprint"] .ctools .hsearch:focus-within{outline:2px solid var(--accent);outline-offset:2px}
:root[data-look="blueprint"] .ctools .hsearch label{position:static;display:flex;align-items:center;padding:0 12px;border-right:1px solid var(--rule-2);background:var(--sunk);letter-spacing:.12em}
:root[data-look="blueprint"] .ctools .hsearch input{flex:1;min-width:0;border:0;border-radius:0;background:transparent;box-shadow:none;padding:10px 14px;font-family:var(--f-body)}
:root[data-look="blueprint"] .ctools .hsearch input:focus{outline:none}
:root[data-look="blueprint"] .ctools .hsearch kbd{position:static;transform:none;align-self:center;margin-right:10px}
:root[data-look="blueprint"] .seg{border:1.5px solid var(--ink-2)}
:root[data-look="blueprint"] .ch-sec .hgrid{gap:30px;padding:0 9px}
:root[data-look="blueprint"] .ch-sec .hcard{gap:10px}
:root[data-look="blueprint"] .hcard .htop .vic{border:0;background:none}
:root[data-look="blueprint"] .hcard .htop .vic svg{width:26px;height:26px}
:root[data-look="blueprint"] .hcard .hn{font:500 11.5px var(--f-mono);letter-spacing:.08em;color:var(--anno)}
:root[data-look="blueprint"] .hcard .hdek{font-size:14.5px;line-height:1.55;height:4.65em}
:root[data-look="blueprint"] .hcard .hfoot{padding-top:12px;border-top:1px solid var(--rule)}
:root[data-look="blueprint"] .hcard:hover:not(.soon) .balloon{background:var(--accent);color:var(--panel)}
:root[data-look="blueprint"] .hcard.soon{background:transparent}
:root[data-look="blueprint"] .hcard.soon .balloon{border-style:dashed;border-color:var(--draft);color:var(--ink-3);background:var(--paper)}
:root[data-look="blueprint"] .hcard.soon h2{color:var(--ink-3);font-weight:600}
:root[data-look="blueprint"] .hcard.soon .hfoot{border-top-style:dashed;border-top-color:var(--draft)}
:root[data-look="blueprint"] .hcard.soon .vic{background:none}
:root[data-look="blueprint"] .hmatch li::before{content:"→ ";font-family:var(--f-mono);color:var(--ink-3)}
:root[data-look="blueprint"] .hmatch em{font:normal 11px var(--f-mono);letter-spacing:.06em;text-transform:uppercase}
:root[data-look="blueprint"] .ch-sec .vlist{border-color:var(--rule-2)}
:root[data-look="blueprint"] .vrow.soon .vt{font-weight:600}

@media (max-width:720px){
  :root[data-look="blueprint"] .sheet{padding:14px 10px 0}
  :root[data-look="blueprint"] .ftext{padding-top:30px;padding-bottom:300px}
  :root[data-look="blueprint"] .fblock{left:12px;right:12px;bottom:14px;width:auto}
  :root[data-look="blueprint"] .fnotes{padding:10px 6px 0}
  :root[data-look="blueprint"] .ch-sec{padding-top:48px}
  :root[data-look="blueprint"] .shead{gap:10px;flex-wrap:wrap}
  :root[data-look="blueprint"] .shead .anno{flex-basis:100%;order:3;white-space:normal}
  :root[data-look="blueprint"] .shead .rule{order:2}
  :root[data-look="blueprint"] .ch-sec .hgrid{gap:24px}
  :root[data-look="blueprint"] .ch-sec .hcard{padding:16px}
}
@media (max-width:980px) and (min-width:721px){:root[data-look="blueprint"] .fblock{width:300px}}
