[Question]
  [
Make a program that takes a length and list of intervals and outputs a ruler of that length with longer ticks for each interval using the line drawing characters `┌ ┬ ┐ │ ╵`
* The first row of the output should begin with the tick for 0 with `┌` and end with a tick for the length with `┐`, with a `┬` being used for every character in between. There will be a total of `length` + 1 line drawing characters in this first row.
* A tick should be lengthened vertically by half-character increments using `╵` and `│` based on the input intervals.
* Intervals are listed from smallest to largest, relative to the interval before it. To elaborate:
	+ The first interval tells how many base ticks (the first row - one character per tick) are in the second-smallest interval (the smallest interval being 1). For example, [3] will lengthen every third tick by a half-character.
	+ The second and subsequent intervals are in terms of the next smallest interval. For example [3, 5] will lengthen every 15th base tick by a full character and [3, 5, 2] will lengthen every 30th base tick by a character and a half.
	+ A sub-interval of 1 is valid and effectively means that the last interval lines are lengthened by a full character instead of a half-character.
* The example test cases should help to clarify how this works.
## Examples/Test Cases
3, []:
```
┌┬┬┐
```
9, [3]:
```
┌┬┬┬┬┬┬┬┬┐
╵  ╵  ╵  ╵
```
30, [5, 2]:
```
┌┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┐
│    ╵    │    ╵    │    ╵    │
```
32, [4, 2, 2, 2]:
```
┌┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┐
│   ╵   │   ╵   │   ╵   │   ╵   │
│               ╵               │
```
48, [5, 3, 2]
```
┌┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┐
│    ╵    ╵    │    ╵    ╵    │    ╵    ╵    │
╵                             ╵
```
24, [7, 3]
```
┌┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┐
│      ╵      ╵      │
```
17, [3, 2, 1]
```
┌┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┐
│  ╵  │  ╵  │  ╵
╵     ╵     ╵
```
1, [23, 19, 13, 11, 7, 5, 3, 2, 1]
```
┌┐
│
│
│
│
╵
```
## Other Rules/Notes
* Input and output can use any convenient format
* The ruler doesn't have to end on a major tick
* The interval list may be empty
* The zeroth tick is *always* within all intervals.
* You may assume the ruler length and intervals will always be a positive integers less than 120
* Trailing whitespace is fine, but leading whitespace is not.
* Any fixed-single-wide space is allowed as a spacing character if you, for some reason, want to use something other than ASCII spaces.
Happy Golfing!
  
[Answer]
# [JavaScript (Node.js)](https://nodejs.org), 123 bytes
```
l=>g=([p,q,...t],h='┌'.padEnd(l,'┬')+`┐
`)=>p?h+g(t,h.replace(/\S/g,c=>'╵│ '[c>'╴'||++i%p?2:i/p%q<1|0],i=-1)):h
```
[Try it online!](https://tio.run/##NY69boMwFEZ3nsJLhC0cE0OitGlNpjxBR9dSLPNbWeCA1Ympc4cO6Vt0bF@IF6EGEulK9ztHn679Jt9lp9rK2HXdpNmYs1GzpGCQG3zBhBArcMn84frpEyPTU51CjR3@@Cg4D9cv74xYYo5lUECLS9JmRkuVwfD1JSywYok/fP8N1w/gczXlX7/vg6BamWN0qEKzujzTfiNwxdYUoUM52qyzSnYZYIB7PMaAC4E9/uhCPKd44@IOg2ihyNHW0TKz2z4sjfguIlfgeydmovvp1tyni3AcOUHdI3TaTrjO7cKtJbz7z0jetCepSgi5xsAKBFgCVFN3jc6IbgqYQ42gRQg9jf8 "JavaScript (Node.js) – Try It Online")
Use this function as `f(20)([5, 2])`.
---
Thanks Arnauld, saves 4 bytes.
[Answer]
# [Perl 6](https://github.com/nxadm/rakudo-pkg), ~~130 122 102~~ 92 bytes
*-10 bytes thanks to nwellnhof!*
```
{'┌'~'┬'x$^a-1~'┐',|map {[~] <<' '╵ │>>[:1[$_ X%%@_]for 0..$a]},batch [\*] @^b: 2}
```
[Try it online!](https://tio.run/##Zc69DoIwEAfw3ae4ASySSmhB8ZPwGCa1mGIkDhqNOkhQBmcHB3wLV1@IF8GDuDVN2ub/6/XuuDnthvU@g24Kc6hzUpVPUuD@IVcjVn3W3F@E3vbqCLkoJMxmBEj1/kJVPsJQTJgwVrAwzWgl08MJXMcxlLzTRF3WWxBLW0IUJxPg9zq1PApC9hz8y7Kds8p6005qjTH0qBZ7LuYDynXgCD7lzdLQH7VVgJ105D5igKgJC9ohAL9mOqJxRIaTsubEAN//u2gV9Q8 "Perl 6 – Try It Online")
Ah yes, much shorter than my previous method. This is an anonymous code block that returns a list of lines.
### Explanation:
```
{                                                   }   # Anonymous code block
 '┌'~'┬'x$^a-1~'┐',     # Return the first line
 |[\*] @^b          # Get the cumulative product of the input list
              .batch(2) # And split it into pairs
  .map:{                                      }  # Map each pair to
                                    for 0..$a    # For each interval
                        :1[$_ X%%@_]    # Whether it is divisible by none of the pair, one of the pair, or both
            <<' '╵ │>>[                     ]      # Map to a list of characters
        [~]        # And join
```
[Answer]
# Dyalog APL, ~~66~~ ~~64~~ ~~58~~ 52 [bytes](https://github.com/abrudz/SBCS)
```
{'┌┐'@0⍵@0⍉('┬│',⎕UCS 9589)/⍤1⍨1,⍉0 2⊤⊥¨⍨0=(⍵+1)⍴⍳⍺}
```
[Try it online!](https://tio.run/##JYs9CsJAEIX7PcV0STDizm5CjCAIHkE8gKARQV3xpxCxsRAUVyxiaadgYac2lh5lLhInkYHH45vvdSbDcnfZGZp@RsfzwND2JLOEc@VQeqD05DQk2XceO5fRg9KN47PabrYgDquxVyF7RbJ39FmRoGh/pf3te2ck6y5vS@iRfZF9kv2ss4zsAxLQSri@9rjFQkGYE8klv@D/VqALHlSFhoiLCgRCThPASJC9wHQxnoFZzMEkMOqNzHRZK/hfC3mFCKgBY1DF7Ac "APL (Dyalog Unicode) – Try It Online")
~~¯2~~ ~~¯8~~ ¯14 bytes thanks to [ngn](https://codegolf.stackexchange.com/users/24908/ngn)!
[Answer]
# [Python 3](https://docs.python.org/3/), ~~173~~ 172 bytes
```
def f(w,n):
 print('┌'+'┬'*~-w+'┐');R=r=range(w+1)
 for i,j in zip(*[iter(n+[0])]*2):a=r[::i];r=j*[0]and a[::j];print(''.join(' ╵│'[(v in a)+(v in r)]for v in R))
```
[Try it online!](https://tio.run/##vZOxboMwEIZ3P8WJxTbQKkCqtESsPEBWxIAUkprBICtq1A4dMndgoG/RtS@UF0kPMCSUKoqUKujAx1m6@@4/u3jdPOfSOxyW6QpWbGtL7hMolJAbRvfVB7Xw@0XN97tt7ZWUzxeBClQi1ynbWg4nsMoVCDsDIeFNFMyMxCZVTFrRJOax6XI/CVTk@yKeqyAzMZrIJSQYyeK5LkTvs1xIRmH/@b2vdjRiL3W6hFuto3hcV2n8BecNbNjB1tQgOSEh82yIYk4MwyDIjuCNlU0gZE@46423x1YS5AAYfHQOb4JJHmxwL8lzpSFGtQPQDLic/@sIXSScImFrN@Ac0rZAF/pdhyePbug00vc2fWzV927Z2NVj@3Ne54NkrMJIJa2Ji7OOZqjJvwtSHqfT4xydfijOrL5XzWlzrmHQ5doLN/J6RU7WDgDruwjg4AV36hUDyKTPyS@qpsrwbRMdfgA "Python 3 – Try It Online")
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E/wiki/Commands), 51 [bytes](https://github.com/Adriandmen/05AB1E/wiki/Codepage)
```
ÝεyIηPÖO2‰•5·W4•2äç×SI¯Qiεõ}}•áΣ=Yô•3äçy¹QyĀ+èš}ζJ»
```
Not too happy with the `I¯Qiεõ}}` as work-around for empty input-lists.. And can definitely be golfed at some other parts as well..
NOTE: Uses compressed integers converted to the required characters, because using the required characters directly means I'll have to count the entire program in UTF-8, increasing it by too much for all 05AB1E's builtin characters as well.
[Try it online](https://tio.run/##yy9OTMpM/f//8NxzWys9z20PODzN3@hRw4ZHDYtMD20PNwHSRoeXHF5@eHqw56H1gZnnth7eWlsLFD288Nxi28jDW4BMY5CCykM7AyuPNGgfXnF0Ye25bV6Hdv//b8wVHQsA) or [verify all test cases](https://tio.run/##yy9OTMpM/V9Waa9kpaCkU5kQ6hL2//Dcc1srI85tDzg8zd/oUcOGRw2LTA9tDzcB0kaHlxxefnh6cMSh9YGZ57Ye3lpbCxQ9vPDcYtvIw1uATGOQgsrIwMojDdqHVxxdWHtum9eh3f91Dm2z/x8dbawTHRuroxBtqRNtDGYYG@hEm@oYQdhGOtEmOkYgCOabWIDkjKE8IxOdaHMdEzDb0ByoH6jOEMLTiTYy1jG01DEEkoY65jqmOiZAbUDJWAA).
**Explanation:**
```
Ý             # Create a list in the range [0, first (implicit) input-integer]
 ε            # Map each value `y` to:
   Iη         #  Get the prefixes of the second input-list
     P        #  Get the product of each prefix
  y   Ö       #  Check for each if its evenly dividing the value `y`
       O      #  Take the sum of that
        2‰    #  And then the divmod 2
  •5·W4•      #  Push compressed integer 94749589
        2ä    #  Split into two equal-sized parts: [9474,9589]
          ç   #  Convert each to a character: ["│","╵"]
           ×  #  Repeat each based on the divmod 2 result
            S #  And convert it to a flattened list of characters
  I¯Qi   }    #  If the second input-list was empty:
      εõ}     #   Map each list to an empty string
              #   (for some reason `€õ` doesn't work here..)
  •áΣ=Yô•     #  Push compressed integer 948495169488
         3ä   #  Split into three equal-sized parts: [9484,9516,9488]
           ç  #  Convert each to a character: ["┌","┬","┐"]
  y¹Q         #  Check if the value `y` is equal to the first input-integer
              #  (1 if truthy; 0 if falsey)
     yĀ       #  Check if the value `y` is NOT 0 (1 if truthy; 0 if falsey)
       +      #  Add both checks together
        è     #  Use it to index into the list ["┌","┬","┐"]
         š    #  And prepend the result in front of the other characters
 }ζ           # After the map: zip/transpose; swapping rows and columns (with space filler)
   J          # Join every inner list together to a single string
    »         # Join the lines with newline delimiter (and output implicitly)
```
[See this 05AB1E tip of mine (section *How to compress large integers?*)](https://codegolf.stackexchange.com/a/166851/52210) to understand why `•5·W4•` is `94749589` and `•áΣ=Yô•` is `948495169488`.
[Answer]
# [Charcoal](https://github.com/somebody1234/Charcoal), 50 bytes
```
≔ＥηΠ…η⊕κη⪫┐┌×┬⊖θ↙↓ＥＥ⊕θΣＥη¬﹪ιλ⁺×│⊘ι×╵﹪ι²‖
```
[Try it online!](https://tio.run/##S85ILErOT8z5/9@xuDgzPU/DN7FAI0NHIaAoP6U0uUTDuTI5J9U5Ix8s6JmXXJSam5pXkpqika0JBDoKGZrWXAFFmXklGl75mXkaSo@mTHg0pUdJRyEkMze1GMRfA@S4pCI0FoI0WnP55pelali55Jfn@aSmlcBNAYvoKIBcAcLINhYCrQsuzYW50C@/RMMX6MicfI1MHYUcTYh7AnJKizXgdjcB7fZIzCkD6s4EycIkpm4FSiA0G2lC3BSUmpaTCvS0pvX//9EmFjoK0aY6CsZA@djY/7plOQA "Charcoal – Try It Online") Link is to verbose version of code. Box-drawing characters have a 3 byte representation in Charcoal, so the above string is only 40 characters long. Explanation:
```
≔ＥηΠ…η⊕κη
```
Calculate the cumulative product of the intervals.
```
⪫┐┌×┬⊖θ↙
```
Print the first row of tick marks. The left and right characters are the wrong way around because the result is reflected later.
```
↓ＥＥ⊕θΣＥη¬﹪ιλ⁺×│⊘ι×╵﹪ι²
```
Calculate the number of intervals that are a factor of each tick mark. Generate a string of `│`s of half that length and add `╵` for odd lengths. Print each string downwards with subsequent strings in previous columns, i.e. reverse order.
```
‖
```
Reflect everything to get the ruler in left-to-right order.
[Answer]
# [Canvas](https://github.com/dzaima/Canvas), ~~42~~ ~~41~~ 40 [bytes](https://github.com/dzaima/Canvas/blob/master/files/chartable.md)
```
┐”┬”┌”Ｏ⁸╷×ｏｏ╵（０）⁷｛＊Ｊ╵；∔｝ｍ｛２ｎ“╵”×；“│”××］⤢
```
[Try it here!](https://dzaima.github.io/Canvas/?u=JXUyNTEwJXUyMDFEJXUyNTJDJXUyMDFEJXUyNTBDJXUyMDFEJXVGRjJGJXUyMDc4JXUyNTc3JUQ3JXVGRjRGJXVGRjRGJXUyNTc1JXVGRjA4JXVGRjEwJXVGRjA5JXUyMDc3JXVGRjVCJXVGRjBBJXVGRjJBJXUyNTc1JXVGRjFCJXUyMjE0JXVGRjVEJXVGRjREJXVGRjVCJXVGRjEyJXVGRjRFJXUyMDFDJXUyNTc1JXUyMDFEJUQ3JXVGRjFCJXUyMDFDJXUyNTAyJXUyMDFEJUQ3JUQ3JXVGRjNEJXUyOTIy,i=MzIlMEElNUI0JTJDJTIwMiUyQyUyMDIlMkMlMjAyJTVE,v=8) ([with a font that monospaces the output](https://dzaima.github.io/Canvas/?u=JXUyNTEwJXUyMDFEJXUyNTJDJXUyMDFEJXUyNTBDJXUyMDFEJXVGRjJGJXUyMDc4JXUyNTc3JUQ3JXVGRjRGJXVGRjRGJXUyNTc1JXVGRjA4JXVGRjEwJXVGRjA5JXUyMDc3JXVGRjVCJXVGRjBBJXVGRjJBJXUyNTc1JXVGRjFCJXUyMjE0JXVGRjVEJXVGRjREJXVGRjVCJXVGRjEyJXVGRjRFJXUyMDFDJXUyNTc1JXUyMDFEJUQ3JXVGRjFCJXUyMDFDJXUyNTAyJXUyMDFEJUQ3JUQ3JXVGRjNEJXUyOTIycmVzdWx0LnN0eWxlLmZvbnQlM0QlMjIxMnB4JTIwRGVqYVZ1JTIwU2FucyUyME1vbm8lMjIlM0JVJXVGRjAz,i=MzIlMEElNUI0JTJDJTIwMiUyQyUyMDIlMkMlMjAyJTVE,v=8))
[Answer]
# [Emacs Lisp](https://www.gnu.org/software/emacs/), 303 bytes
```
(defun f(a)(princ'┌)(dotimes(i(1-(car a)))(princ'┬))(princ'┐)(let((m 1))(while(cadr a)(let((q(caadr a))(w (cadadr a)))(princ"\n")(dotimes(i(1+(car a)))(cond((if w(= 0(mod i(* m q w))))(princ'│))((= 0(mod i (* m q)))(princ'╵))(t(princ" "))))(setq m(* m q(if w w 1)))(setcdr a`(,(cddadr a)))))))
```
Use this function as `(f '(30 (5 2)))`.
Better readable version:
```
(defun f (a)
  (princ '┌)
  (dotimes (i (1- (car a)))
    (princ '┬))
  (princ '┐)
  (let ((m 1))
    (while (cadr a)
      (let ((q (caadr a)) (w (cadadr a)))
    (princ "\n")
    (dotimes (i (1+ (car a)))
      (cond ((if w (= 0 (mod i (* m q w))))
        (princ '│))
       ((= 0 (mod i (* m q)))
        (princ '╵))
       (t
        (princ " "))))
    (setq m (* m q (if w w 1)))
    (setcdr a `(,(cddadr a)))))))
```
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), ~~42~~ 41 [bytes](https://github.com/DennisMitchell/jelly/wiki/Code-page)
```
‘Rm×\}Ṭ€+2/
⁽!ṣ;“½¥÷I‘ÄỌṙ-;⁶
Ḷ¬;.Ḥ~W;ñị¢Y
```
A full program.  
**[Try it online!](https://tio.run/##AWEAnv9qZWxsef//4oCYUm1QxqR94bms4oKsKzIvCuKBvSHhuaM74oCcwr3CpcO3SeKAmMOE4buM4bmZLTvigbYK4bi2wqw7LuG4pH5XO8Ox4buLwqJZ////MzL/WzQsMiwyLDJd "Jelly – Try It Online")**
Or see a [test-suite](https://tio.run/##y0rNyan8//9Rw4yg3MPTY2of7lzzqGmNtpE@16PGvYoPdy62ftQw59DeQ0sPb/cEKjrc8nB3z8OdM3WtHzVu43q4Y9uhNdZ6D3csqQu3Njza8HB396FFkf@PTnq4c4bO4eX6kZpZjxr3Hdp2aNv//9HRxjoK0bGxQMISiI3BLGMDIGGqo2AE4RkBCRMgD4LAYiYWEBXGMAEjoIJoc6AAmGdoDtIHVm8IEQApAQoYAi0xBNFAAaAaqAlgVbEA "Jelly – Try It Online")  
Note: this code has been altered from a full program -- `ñ` (next link as a dyad) has been replaced with `1ŀ` (link at index 1 as a dyad) to allow it to be called multiple times by the footer.
### How?
```
‘Rm×\}Ṭ€+2/ - Link 1, lower interval tick types: length; intervals  e.g. 7; [3,2]
‘           - increment length                                           8
 R          - range                                                      [1,2,3,4,5,6,7,8]
     }      - use right argument for this monad as if it were a dyad:
   ×\       -   cumulative reduce by multiplication                      [3,6]
  m         - modulo slice (vectorises)                                  [[1,4,7],[1,7]]
      Ṭ€    - untruth €ach                               [[1,0,0,1,0,0,1],[1,0,0,0,0,0,1]]
        +2/ - pairwise reduce with addition                              [[2,0,0,1,0,0,2]]
            -   -- yielding a list of types for each row of characters below the first
            -      where 0 is a space, 1 is a short tick-mark and 2 is a long tick-mark
⁽!ṣ;“½¥÷I‘ÄỌṙ-;⁶ - Link 2, make character set: no arguments
⁽!ṣ              - literal 9474
    “½¥÷I‘       - list of code-page indices   = [10,4,28,73]
   ;             - concatenate              [9474,10,4,28,73]
          Ä      - cumulative addition      [9474,9484,9488,9516,9589]
           Ọ     - to characters            "│┌┐┬╵"
            ṙ-   - rotate left by -1        "╵│┌┐┬"
               ⁶ - literal space character  ' '
              ;  - concatenate              "╵│┌┐┬ "
Ḷ¬;.Ḥ~W;ñị¢Y - Main link: length, L; intervals, I
Ḷ            - lowered range         [ 0, 1, 2, ..., L-1]
 ¬           - logical Not           [ 1, 0, 0, ..., 0]
   .         - literal 0.5
  ;          - concatenate           [ 1, 0, 0, ..., 0, 0.5]
    Ḥ        - double                [ 2, 0, 0, ..., 0, 1]
     ~       - bitwise NOT           [-3,-1,-1, ...,-1,-2]
      W      - wrap that in a list  [[-3,-1,-1, ...,-1,-2]]
        ñ    - call next Link (1) as a dyad (f(L, I))
       ;     - (left) concatenated with (right)
          ¢  - call last Link (2) as a nilad (f())
         ị   - (left) index into (right)  (1-indexed and modular)
           Y - join with newline characters
             - implicit print
```
[Answer]
# [Ruby](https://www.ruby-lang.org/), 126 bytes
```
->l,i{y=1;[?┌+?┬*~-l+?┐]+i.each_slice(2).map{|j,k|x=y*j;y=k&&x*k;(0..l).map{|z|'│╵ '[(z%x<=>0)+(k ?z%y<=>0:1)]}*''}}
```
[Try it online!](https://tio.run/##NY9LbsMgFEXnWQUT/4llIFXSuiQLQahKrET1J1JUN5KxcQcdd9BBuotOuyFvxH1gR0Jwz@HqId6uBzWe@LjcVjjvFCep2A23rwi23/BjWZnwLaM8Pu6z15e6yrOjT4P4vL90usClbrgKi1Tx0nWbsEz9JI6r@brV3nD7HH7@kCf81mme@TYJIr9Eu9ZRBp5IIPvQ8/p@FIJhJKTEC/EIgdnEEogPGNGJKNAKaFrWrTZTg90FhYJYg7BE1maW7ZNJAFMQBB4h5gQBnXmCbS2k/Wqna5zry/W9RicBUaYm9@M/ "Ruby – Try It Online")
Looks rather verbose with all that `each_slice` stuff, but will do for now, unless I manage to find a golfier approach.
Takes input as `l` for length and `i` for intervals, returns an array of strings. 
[Answer]
# [R](https://www.r-project.org/), ~~175~~ 170 bytes
```
function(l,i,`&`=rep)rbind(c('┌','┬'&l-1,'┐'),if(i)sapply(rowSums(!outer(0:l,cumprod(i),`%%`)),function(j,x=j%/%2,y=j%%2)c('│'&x,'╵'&y,' '&(1+sum(1|i))/2-x-y)))
```
[Try it online!](https://tio.run/##bZDBTsMwDIbvPEU4tLGFy5Z009hEn4IjIHXrWilTm0ZpK1qJE2cOHOAtuPJCvMhwd5iQ1kPi@P/s31b8sRD30bHobNaa2kJJhtIwTXzu0O@M3UMG8vfzXRLf3zIsIzW@PiSSKcBgs3WuHMDXLw9d1cB13bW5h/mmpKyrnK/3XENpEKSIdB5yoD45BLNA08Ax0Hia8SbDnr2/fmQ4kBQyBHXTdBWoV4M401EfDYh4dD5v2@HWeWNbXl2cXSsURe3BCGOF2lheiSXMti1Uj4aeST5ZSU3uEinx6r8LFBDTHC/ENcWXYjynDJakcQJpRgvSk3Bxd@qLJ6FeMFyN4y6QWjHiLlJTkJmOSag1nzEqEisSSxKcaM7HD/sD "R – Try It Online")
Takes empty intervals as `0`, returns a matrix of characters. TIO link displays the output pretty-printed.
[Answer]
# [Haskell](https://www.haskell.org/), ~~167~~ ~~164~~ 149 bytes
```
n%l=unlines$("┌"++([2..n]>>"┬")++"┐"):[do p<-[0..n];let(j#a)b|1>p`rem`product(take j l)=a|1>0=b in(i-1)#(i#"│"$"╵")$" "|i<-[1,3..length l]]
```
[Try it online!](https://tio.run/##ZY4xTsMwFIZ3TvHkpJKtpFFsB5UCyQnYGKNIdalF3bpulDpbJ2YGBrgFKxfqRcJz6ZIi2Xry9@n9v9fqsNXWDoOb2LJ31jh9iCk5fb6TJKG1yDLXVBW@vwlLEpwfhN3Xqz20j9M6D/bBak83kWLLI6/aRad3i7bbr/oXT73aatiAZaVCl5dLMI6aKWcRNRFmvZGYnL5@CIsJkKPBRJ7KLLPavfo12KYZdso4KAH7bqDt/bPvnhzEABImUDdjNg9MjqHMA7xNQVxxEXiB/O@MbXF32ZL/lCiCmqEacz47t5/T@NXHeFACHZ/jDZOngBGXgrAw/AI "Haskell – Try It Online") Slightly golfed different approach by [Οurous](https://codegolf.stackexchange.com/users/18730/%ce%9furous).
---
```
n%l|let c=take(n+1).cycle;m&(x:y:r)=c('│':init([1..y]>>(m*x)!" "++"╵"))++'\n':(m*x*y)&r;m&[x]=c$'╵':(m*x)!" ";m&e=[]='┌':n!"┬"++"┐\n"++1&l
n!s=[2..n]>>s
```
[Try it online!](https://tio.run/##ZY4xboMwFIb3nOKBEozjyKqBKg2Vc4JuHQkDcpGKYpwIqARSp84dOtBbdO2FuAh9JllIJVt@@j69//drVh9zrcfRrPS7zhtQssmOuW@YoFx1SuePpee3cRdXVCqfDP0HiQtTNH4iOO/S/d4v1y11XHAZc4fvX5dSxsjBkNiKdUe9ChOSNpVqSdBf@LSAPJdJKjH0k8TGcYf@Z0rpvw4GB@HphXFqmQScG2yqxzIrDEh4OcECzm/Nc1M9GVgChLCCJJ2znWXhHIZ3Ft5vILjhgeUR8suZ2@jhuhX@U0Fk1RbVnIvt1D6liZuPCasCdGKH175iAxhxLbAL4x8 "Haskell – Try It Online") There are still some redundancies which look like they could be exploited, but so far they withstood all further golfing attempts.
---
[Answer]
# [PowerShell](https://github.com/TryItOnline/TioSetup/wiki/Powershell), 152 bytes
```
param($t,$i)"┌$('┬'*--$t)┐"
$i|%{$s=++$s*$_-1;$p=".(.{$s}|.*$)"
if($r){$r-replace$p,'│$1';rv r}else{$r=' '*($t+2)-replace$p,'╵$1'}}
if($r){$r}
```
[Try it online!](https://tio.run/##1VXdTsIwFL7fUzTNwa2wEbdhUMkSnsBXMIglLg6d3UCTsRuuueAC38JbX4gXwdNuyPidCWhi06zdOadfv/P1L3x@5SJ64EGwgB7xSLIIO6LTNyA2wWd0PpuAoc9nH3rVsiBm89mUauCPKglEXq0GURVuLbsFoUfrRh2N6aheBUY1v2eAYAkIS/Aw6HQ5hCbijMHWW2JIRMqDiKPb04lexdlqDluLfP/EyDRd4aSLVNPahqaZhmuStsFMQggiTpCcqlOdSeeVdLrSW3Ru16luaqRQ5JSErH0yQPdcIl6YxCkHPbJucsp4zcayVaSwOfyXU3Yk5QZSzqrS6nep709gI5GM6w/75XDFkstQtCwVaVzmi@gu5fgDNU6l3uYW2Ln2pca94FuqlakqRylVnYZUtYmqnvhoHDoIBUarTpahImU31Q2gdr59xFIfXo3sjtjRK5N5s81JS84Okrbx/rJlixZMJN@xeSZZIocO2U6y/zoeZZISMTIiFZKogRD73cebQf@OC5OA/xRzMewEEfb5W8i7Mb/Hhwxus1jBo0EQo@EM37fCyMJAFUjBoHkwtfgL/cai7HrfjLQ4hZYuvgA "PowerShell – Try It Online")
Unrolled:
```
param($ticks,$intervals)
"┌$('┬'*--$ticks)┐"                         # implicit output
$intervals|%{
    $step=++$step*$_-1
    $pattern=".(.{$step}|.*$)"
    if($row){
        $row-replace$pattern,'│$1'          # implicit output
        Remove-Variable row
    }else{
        $row=' '*($ticks+2)-replace$pattern,'╵$1'
    }
}
if($row){$row}                              # implicit output
```
[Answer]
# [C# (Visual C# Interactive Compiler)](http://www.mono-project.com/docs/about-mono/releases/5.0.0/#csc), 204 bytes
```
a=>b=>{Write("┌"+"┐\n".PadLeft(++a,'┬'));for(int i=1;;i++,WriteLine())for(int j=0;j<a;){var m=b.Select((c,d)=>b.Take(d+1).Aggregate((e,f)=>e*f)).Count(c=>j++%c<1);Write(m<1|i>m?" ":m<2?"╵":"|");}}
```
[Try it online!](https://tio.run/##NY@9TsMwHMR3niKyhOp/HSwCU@uPqkJiyoBEJYbC4Dp25EAcKXFhSPMGDAzlLVh5obxIcEEsJ51OP92d7i5056bbvdfc@ZCudXCN57nrwslLKa2YlJA7IfuH1gWD0Xh8RyTqx6NH9E4VubEBE6LS2Xj8mgEw27Q4sokTGWOOkPQXzJ03GOA/rMQlq7hi0L@qNqnFjt6bF6MDxjotIBbSjXo2uCAZ0HVZtqZUsRyb1MbQzC0AvWn2PmAtZEXIueYZsL@FNc8OTtYrlKBlza9WaPz8Rkt0QMCGYWJnFi8Ae/O2feqvB7ppTmfjMjb9AA "C# (Visual C# Interactive Compiler) – Try It Online")
Outputs, but gets stuck in an infinite loop.
[Answer]
# [Clean](https://github.com/Ourous/curated-clean-linux), ~~221~~ ~~201~~ ~~195~~ 162 bytes
```
import StdEnv
$n l=[["┌":repeatn(n-1)"┬"]++["┐"]:[[if(?(i-1))if(?i&&l%(i,i)>[])"│""╵"" "\\p<-[0..n],let?j=1>p rem(prod(l%(0,j)))
]\\i<-[1,3..length l]]]
```
[Try it online!](https://tio.run/##NY@xTgMxEET7fMXKCpGtOKccKZAiLmmgQKJACp3PheX4gk/2@uQzCFpqCgr4C1p@KB/C4STQ7c68kWa0MwoHH7aPzoBXFgfruxATbNL2Gp9GYwRXCUH2H29kGU1nVEKKs5Jl5YvI6fRgvRO5FMI2dE1tttjhspOJO6OWW7YS8kC/ErL//CYESF13lzMxLwqU3Jm0bqty1UE0nnYxbGmOzXnLGBvJuraZLPmiKJzBXXoAJ6Ucmhg83JvnBH9ltVN9f1RoGyxy0AG1SoyDxT4p1OaEb1K0uBttksqhCo5w7oMEQh7f/ceAjqG8ALHg57yUbPjRjVO7fpjd3A5XL6i81afnzqnUhOh/AQ "Clean – Try It Online")
Returns a list of lists of UTF-8 characters (as strings, since Clean has no innate UTF-8 support).
Works by generating the first line, then taking the product of prefixes of the list provided in groups of two, and checks which mark to draw based on whether the product divides the current character position.
Ungolfed:
```
$ n l
    = [
        ["┌": repeatn (n - 1) "┬"] ++ ["┐"]:
        [
            [
                if(? (i - 1))
                    if(? i && l%(i, i) > [])
                        "│"
                        "╵"
                    " "
                \\ p <- [0..n]
                , let
                    ? j = 1 > p rem (prod (l%(0, j)))
            ]
            \\ i <- [1, 3.. length l]
        ]
    ]
```
]