summaryrefslogtreecommitdiff
path: root/public/stylesheets/ccc.css
blob: 5046baac0e1e65fe0950b9285cbc615bdc40bc57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
/* ==========================================================================
   ccc.css — annotated demolition survey (behavior-preserving rewrite)
   ==========================================================================
   Sorted into nine concerns; each banner carries an ASSUMES: line naming
   the tokens and images it depends on. Within any equal-specificity
   collision set, relative source order is preserved verbatim.
   ========================================================================== */

/* ==========================================================================
   1. DESIGN TOKENS
   ==========================================================================
   The desktop layout is a fixed lattice drawn around two images:
   header.png (909px wide, 145px tall) and left_column.png (continues the
   header artwork down the left menu band via a wrapper-covering ::before).
   Change these tokens and the two images must be regenerated — that IS
   the redesign.
   NOTE: custom properties cannot appear in @media conditions, so the
   1015/1016 breakpoint below stays a literal pair. Its provenance is
   unexplained (roughly --page-width plus a margin allowance).
   ========================================================================== */

:root {
  --page-width: 909px;      /* header.png's drawn width; the wrapper.
                               Decomposes: 185 left band (135 col + 50 pad)
                               + 490 center at left 200 + 210 right band
                               (155 col + 55 pad) at left 690. 690 + 210
                               = 900: 9px absorbed silently at the right
                               edge. */
  --header-height: 145px;   /* header.png's pixel height; search box and
                               light-mode toggle hang from its bottom
                               edge. */
  --left-col-width: 135px;  /* left band = this + --left-col-pad = 185px */
  --left-col-pad: 50px;
  --center-left: 200px;     /* 15px gutter beyond the 185px left band */
  --center-width: 490px;
  --right-left: 690px;      /* = --center-left + --center-width */
  --right-width: 155px;     /* right band = this + --right-pad = 210px */
  --right-pad: 55px;
  --search-left: 676px;     /* provenance unknown; sits 14px left of
                               --right-left */
  --toggle-left: 816px;     /* provenance unknown; 140px right of
                               --search-left */
  --burger-right: 54px;     /* provenance unknown */
}

/* ==========================================================================
   2. RESET & DOCUMENT SCAFFOLD
   ==========================================================================
   ASSUMES: nothing from the lattice. Element defaults and generic
   utilities only.
   ========================================================================== */

html {
  height: 100%;
  line-height: 1.6rem;
}

body {
  margin: 0;
  padding: 0;
  text-align: center;
  font-family: Verdana, Helvetica, Arial, sans-serif;
  background-color: Canvas;
  color: color-mix(in srgb, CanvasText, #808080 25%);
  hyphens: auto;
  color-scheme: light dark;

  min-height: 100%;
  height: 100%;
}

img {
  max-width: 100%;
}

pre {
  overflow: auto;
}

li {
    line-height: 1.5rem;
    margin-block-start: 1rem;
    margin-block-end: 1rem;
}

dt {
  font-weight: bold;
  margin-bottom: 1em;
}

dd {
  margin-bottom: 1em;
}

.pagination {
  margin-bottom: .5rem;
}

+ /* Single caller: _headline_image.html.erb's image-count caption
+    ("N Bilder"), shown only when a gallery has more than one image. */
.right {
  text-align: right;
}

.hide-me {
    display: none;
}

/* ==========================================================================
   3. COLOR SCHEME & LIGHT/DARK TOGGLE
   ==========================================================================
   ASSUMES: --header-height, --toggle-left (desktop toggle position);
   header.png and left_column.png (the invert(50%) treatment); the nonced
   inline restore script in the layout that re-checks #light-mode before
   first paint (the JS contract: checkbox id "light-mode", state persisted
   by the script). Symmetric blocks: each scheme inverts when the toggle
   is checked.
   ========================================================================== */

@media (prefers-color-scheme: light) {
    body:has(#light-mode:checked) {
        color-scheme: dark;
    }
    #light-mode + label[for=light-mode]:before { content: '🌙'; }
    #light-mode:checked + label[for=light-mode]:before { content: '☀️'; }

    /* The header images were set in the before times. Let them shine in dark
       mode, too */
    body:has(#light-mode:checked) #header img,
    body:has(#light-mode:checked) div#left_column::before
    {
        filter: invert(50%);
    }
}

@media (prefers-color-scheme: dark) {
    body:has(#light-mode:checked) {
        color-scheme: light;
    }
    #light-mode + label[for=light-mode]:before { content: '☀️'; }
    #light-mode:checked + label[for=light-mode]:before { content: '🌙'; }

    /* The header images were set in the before times. Let them shine in dark
       mode, too */
    body:not(:has(#light-mode:checked)) #header img,
    body:not(:has(#light-mode:checked)) div#left_column::before
    {
        filter: invert(50%);
    }
}

input#light-mode[type="checkbox"] {
    display: none;
}

label[for=light-mode] {
    font-size: 25px;
    user-select: none;
    cursor: pointer;
    filter: grayscale(1) contrast(10%);
}

/* Light and dark mode button magic */
@media(max-width:1015px) {
  div#light-mode-div {
    position: absolute;
    left: 170px;  /* mobile toolbar offset; provenance unknown — anchors to
                     the viewport, not #toolbox (see section 5) */
  }
}

@media(min-width:1016px) {
  div#light-mode-div {
    position: absolute;
    top: var(--header-height);  /* bottom edge of header.png */
    left: var(--toggle-left);
  }
}

/* ==========================================================================
   4. LINKS & HEADINGS
   ==========================================================================
   ASSUMES: nothing from the lattice. Site-wide type and link colors;
   the orange is the one brand color that survives theming.
   ========================================================================== */

a {
  color: #F8921E;
  text-decoration: none;
}

a:hover {
  color: #5b8ca7;
}

h2 {
  font-size: 1.5rem;
  font-family: Helvetica, Arial, sans-serif;
  line-height: 1.75rem;
}

h3 {
  font-size: 1.3rem;
  text-decoration: none;

}

h4 {
  font-size: 1.0rem;
  text-decoration: none;
}

h1, h2, h3 {
  word-wrap: anywhere;
  hyphens:auto;
}

/* ==========================================================================
   5. LAYOUT GRID
   ==========================================================================
   ASSUMES: the full token lattice; header.png (drawn width = --page-width,
   height = --header-height); left_column.png (continues the header art
   down the left band via the ::before at z-index -10).
   KNOWN STRUCTURAL DEBT: all three columns are position:absolute on
   desktop, but #footer lives INSIDE #center_column — a long sidebar can
   overflow past the footer. The column-height assumption is nowhere
   enforced.
   MOBILE ANCHORING: on max-width, #wrapper has no position, so the
   absolutely positioned toolbox children (#burger-div, #search,
   #light-mode-div) anchor to the viewport, not to #toolbox.
   ========================================================================== */

@media(min-width:1016px) {
  div#wrapper {
    position: relative;
    width: var(--page-width);  /* header.png's drawn width */
    margin: 0 auto 0 auto;
    text-align: left;
    min-height: 100%;
  }
  .break-mobile {
      display: block;
  }
}

/* Header */
#header img,
#header > a {
  display: block;
  line-height: 0;
}

div#header img {
  border: none;
}

#left_column {
  line-height: 1.5em;
}

@media(min-width:1016px) {
  div#left_column::before {
	content: " ";
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	box-sizing: border-box;
    background-image: url(/images/left_column.png);
    background-position: top right;
    background-repeat: no-repeat;
	z-index: -10;
  }
  div#left_column {
    position: absolute;
    left: 0px;
    width: var(--left-col-width);
    min-height: 100px;
    text-align: right;
    padding-right: var(--left-col-pad);  /* left band total: 185px */
  }

  div#left_column > a {
    font-size: 0.8rem;
  }
}

div#center_column {
  padding-bottom: 40px;
}

@media(max-width: 1015px) {
div#center_column {
  padding: 0 15px 40px 15px;
}
}

@media(min-width: 1016px) {
  div#center_column {
    position: absolute;
    background-color: Canvas;
    left: var(--center-left);
    width: var(--center-width);
  }
}

@media(min-width:1016px) {
  div#right_column {
    position: absolute;
    background-color: Canvas;
    padding-left: var(--right-pad);
    left: var(--right-left);   /* = center-left + center-width */
    width: var(--right-width); /* right band total: 210px; 690 + 210 = 900,
                                  9px short of --page-width, absorbed
                                  silently */
    height: 100px;
  }
}

/* Mobile toolbar strip. */
@media(max-width:1015px) {
#toolbox {
    height: 30px;
}
}

/* Footer */
#footer {
  border-bottom: 2px solid #aeadad;
  border-top: 2px solid #aeadad;
  bottom: 0;
  color: CanvasText;
}

#footer p {
  margin: .5rem auto;
}

#footer a {
  margin-left: 1rem;
  margin-right: 1rem;
  color: CanvasText;   
}

/* ==========================================================================
   6. MAIN NAVIGATION & BURGER MENU
   ==========================================================================
   ASSUMES: --burger-right; the checkbox-hack markup order in the layout
   (#toolbox precedes #left_column — the `#toolbox ~ #left_column`
   sibling selectors break if the layout reorders them); left_column.png
   behind the desktop nav. Mobile menu is pure CSS: .menu-checkbox state
   drives both the burger-to-X morph and the menu slide.
   COLLISION SET (order preserved): div.main_navigation ul base rule
   before its min-width override — the override's `padding: 0` must win.
   ========================================================================== */

div.main_navigation ul {
  margin-left: 0;
  padding-left: 15px;   /* dead duplicate `padding-left: 0` removed */
  padding-right: 15px;
  text-align: left;
}


@media(max-width:1015px) {
  div.main_navigation li:not(:first-child):before {
    content: '•';
    margin-left: .3rem;
    margin-right: .6rem;
  }

  div.main_navigation li {
    list-style-type: none;
    display: inline-block;
    line-height: .75rem;
  }
}

@media(min-width:1016px) {
  div.main_navigation ul {
    padding: 0;
    text-align: right;
  }

  div.main_navigation li {
    list-style-type: none;
    line-height: 1.45em;
  }
}

div.main_navigation a {
  text-decoration: none;
}

div.main_navigation a.inactive:hover, div#left_column span.inactive:hover {
  color: color-mix(in srgb, CanvasText, #808080 50%);
}

div.main_navigation a.active:before {
  content: "▸";
}

div.main_navigation a.active {
  color: CanvasText;
  text-decoration: none;
}

div.main_navigation a.inactive, div.main_navigation span.inactive, div#left_column span.inactive {
  color: color-mix(in srgb, CanvasText, #808080 25%);
}

.menu-checkbox {
    display: none;
}

.burger-menu {
    display: none;
    cursor: pointer;
}

#burger-div {
    position: absolute;
    right: var(--burger-right);  /* anchors to the viewport on mobile,
                                    see section 5 */
}

/* Mobile styles */
@media (max-width: 1015px) {
    .burger-menu {
		position: absolute;
		display: flex;
		flex-direction: column;
		transition: transform 0.3s ease, opacity 0.3s ease;
	}
	
	.burger-menu span {
	    display: inline-flex;
        width: 26px;
        height: 4px;
        background: color-mix(in srgb, CanvasText, #808080 25%);
        border-radius: 2px;
        margin: 3px 0;
	    transition: max-height 0.5s ease-in-out, opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
    }

  	#left_column .main_navigation {
		width: 100%;
        position: relative;
	}

    #toolbox ~ #left_column .main_navigation ul {
        transition: max-height 0.2s ease-in-out, transform 0.4s ease-in-out, opacity 0.4s ease;
        overflow: hidden;
        text-align: center;
    }

    #toolbox ~ #left_column .main_navigation:first-of-type ul {
	    transform: translateY(-200px);
        max-height: 0;
		opacity: 0;
        z-index: -10;
    }
    
    /* Show menu when checkbox is checked */
    #toolbox:has(.menu-checkbox:checked) ~ #left_column .main_navigation ul {
        max-height: 400px;
        opacity: 1;
        transform: translateY(0);
    }
	
    .menu-checkbox:checked + .burger-menu span:nth-child(1) { transform: translateY(10px) rotate(45deg); }
    .menu-checkbox:checked + .burger-menu span:nth-child(2) { opacity: 0; }
    .menu-checkbox:checked + .burger-menu span:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }
}

/* ==========================================================================
   7. SEARCH
   ==========================================================================
   ASSUMES: --header-height, --search-left (desktop box hangs from
   header.png's bottom edge); viewport anchoring on mobile (section 5).
   ========================================================================== */

/* Search bar */
@media(min-width:1016px) {
  div#search {
    position: absolute;
    top: var(--header-height);  /* bottom edge of header.png */
    left: var(--search-left);
    height: 25px;
    vertical-align: top;
  }
}

@media(max-width:1015px) {
  div#search {
    position: absolute;
    left: 25px;  /* mobile toolbar offset; anchors to the viewport */
    height: 25px;
  }
}

div#search input {
  color: CanvasText !important;
}
div#search input[type=search],
div#search input[type=text] {
  display: block;
  padding: 2px;
  margin: 0px;
  height: 25px;
  width: 132px;
  line-height: 20px;
  border: solid #808080 1px;
  background-color: Canvas;
  border-radius: 5px;
  margin-right: 5px;
  text-indent: 0.5rem;
}

/* ==========================================================================
   8. SIDEBAR WIDGETS (calendar, tags, featured, open erfas)
   ==========================================================================
   ASSUMES: right-column geometry from section 5; div.main_navigation h2
   also picks up the grouped border rule below.
   COLLISION SET (order preserved verbatim): the grouped h2 border rule,
   then the same-specificity div#frontpage_calendar h2 override
   (border-top: none), then the min-width block that re-adds a border-top
   for desktop. Moving the override above the group rule would grow a
   border on the calendar heading.
   ========================================================================== */

div#frontpage_calendar {
  display: none;
  margin-top: 10px;
}

@media(min-width:1016px) {
  div#frontpage_calendar {
    margin-top: 30px;
  }
}

div#frontpage_calendar h2, div#tags h2, div#featured_articles h2, div#open_erfas_today h2, div.main_navigation h2 {
  border-top: 2px solid;
  border-bottom: 2px solid;
  font-size: 1.1em;
  padding-top: 2px;
  padding-bottom: 2px;
}

div#frontpage_calendar h2 {
  display: none;
  border-top: none;
  margin-left: auto;
  margin-right: auto;
  padding-left: 0.5em;
  padding-right: 0.5em;
  margin-top: 0;
}

div#open_erfas_today li {
  margin-top: 8px;
  margin-bottom: 8px;
  line-height: 1.25;
}

div#open_erfas_today .event_time {
  font-style: italic;
  font-family: Georgia;
  color: color-mix(in srgb, CanvasText, #808080);
}

@media(max-width:1015px) {
  div#tags li {
    list-style-type: none;
    display: inline-block;
  }

  div#tags li:not(:first-child):before {
    content: '•';
    margin-left: .3em;
    margin-right: .6em;
  }
}

@media(min-width:1016px) {
  div#frontpage_calendar h2, div#tags h2, div#featured_articles h2, div#open_erfas_today h2 {
    font-size: 1rem;
  }

  div#frontpage_calendar h2 {
    display: block;
    border-top: 2px solid #aeadad;
    padding: 2px 0;
  }

}

div#frontpage_calendar ul, div#tags ul, div#featured_articles ul, div#open_erfas_today ul {
  padding: 0px;
  font-size: 0.9rem;
  line-height: 1.5em;
}

/* ODDITY, kept: per-widget icon paddings — delete when these icons rotate
   out of the featured box */
div#featured_articles #ds_icon img {
  padding-top: 10px;
}

div#featured_articles #events_icon img {
  padding-left: 10px;
}

div#frontpage_calendar li {
  margin-bottom: 20px;
}

div#frontpage_calendar li, div#tags li, div#featured_articles li, div#open_erfas_today li {
  list-style-type: none;
}

div#frontpage_calendar li a, div#tags li a, div#featured_articles li a, div#open_erfas_today li a {
  text-decoration: none;
  color: color-mix(in srgb, CanvasText, #808080 25%);
}

div#frontpage_calendar li a:hover,
div#tags li a:hover,
div#featured_articles li a:hover {
  text-decoration: none;
  color: color-mix(in srgb, CanvasText, #808080 50%);
}

/* We don't want the only colourful thing on the site to be pointing
 * somewhere else */
div#featured_articles img {
  filter: grayscale(1);
}

#tags ul li {
    margin-block-start: 0.5rem;
    margin-block-end: 0.5rem;
}

/* ==========================================================================
   9. ARTICLE CONTENT
   ==========================================================================
   ASSUMES: center-column geometry from section 5; TinyMCE emits the
   inline-image classes (style-src unsafe-inline in the CSP exists partly
   for its img[style] output).
   ========================================================================== */

/* Main section */
.article, .article_partial {
  text-align: left;
}

div#center_column h2 a {
  color: CanvasText;
  text-decoration: none;
}

div#center_column h2 a:hover {
  color: color-mix(in srgb, CanvasText, #808080 50%);
}

div#center_column h2.headline {
  margin-top: 10px;
}

div#center_column .article_partial h2.headline {
  padding-top: 30px;
  margin-bottom: 0.3rem;
  border-top: 2px solid #cccccc;
}

/* except for erfa list */
div#center_column .chapter_partial h2.headline {
  border-top: none;
}

div.article_partial h2 a {
  text-decoration: none;
}

div.article_partial {
  margin-bottom: 30px;
}


div.article_partial p.excerpt {
  color: CanvasText;
}

div.author_and_date {
  font-style: italic;
  font-family: Georgia;
  color: color-mix(in srgb, CanvasText, #808080);
  padding-top: .2rem;
  padding-bottom: .8rem;
}

div.teaser_ruler {
  border-top: 1px solid #CCCCCC;
  border-bottom: 1px dashed #CCCCCC;
  height: 3px;
  margin-top: 30px;
}

.chapter_partial_layout {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.chapter_thumbnail img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

.chapter_partial_content {
  min-width: 0;
}

.inline-image--full {
  width: 100%;
  margin: 1rem 0;
}

.inline-image--half {
  width: 48%;
  margin-bottom: 1rem;
}

.inline-image--left {
  float: left;
  margin-right: 1rem;
}

.inline-image--right {
  float: right;
  margin-left: 1rem;
}

#asset_credits .asset_credit_block {
  display: none;
}

#asset_credits .asset_credit_block.headline_credit {
  display: block;
}

#asset_credits {
  border-top: dotted 1px silver;
}

#asset_credits,
.right {
  font-style: italic;
  font-family: Georgia;
  font-size: 0.9rem;
  color: color-mix(in srgb, CanvasText, #808080);
}

.glightbox-clean .gslide-description {
  background: Canvas !important;
}

.glightbox-clean .gslide-title,
.glightbox-clean .gslide-desc {
  color: CanvasText !important;
}

.headline_document_card {
  display: flex;
  align-items: flex-start;
  gap: 1.5em;
  margin: 1.5em 0;
  text-decoration: none;
}

.headline_document_card_thumb {
  border: 1px solid rgba(128, 128, 128, 0.4);
  box-shadow: 2px 3px 8px rgba(0, 0, 0, 0.25);
  max-width: 180px;
  height: auto;
}

.headline_document_card_info {
  display: flex;
  flex-direction: column;
  gap: 0.3em;
  padding-top: 0.5em;
}

.headline_document_card_titlerow {
  display: flex;
  align-items: center;
  gap: 0.4em;
  font-weight: bold;
}

.headline_document_card_meta {
  font-size: 0.85em;
  font-weight: normal;
  color: rgba(128, 128, 128, 0.95);
}

.related_documents {
  margin-top: 1rem;
}

.related_documents_label {
  font-style: italic;
  font-family: Georgia;
  font-size: 0.9rem;
  color: color-mix(in srgb, CanvasText, #808080);
  margin-bottom: 0.3rem;
}

.related_documents_list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.related_document_link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
}