-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
1383 lines (1315 loc) · 156 KB
/
Copy pathindex.html
File metadata and controls
1383 lines (1315 loc) · 156 KB
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
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ASA 101 Flashcards — Basic Keelboat Sailing</title>
<style>
:root {
--navy: #0b2545;
--navy-light: #13315c;
--blue: #2274a5;
--sky: #8da9c4;
--cream: #eef4ed;
--white: #ffffff;
--gold: #e8b04b;
--green: #2e8b57;
--red: #c0392b;
--shadow: 0 8px 30px rgba(11, 37, 69, 0.25);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
background: linear-gradient(160deg, var(--navy) 0%, var(--navy-light) 60%, var(--blue) 100%);
min-height: 100vh;
color: var(--cream);
display: flex;
flex-direction: column;
align-items: center;
padding: 24px 16px 60px;
}
header { text-align: center; margin-bottom: 20px; }
header h1 { font-size: 1.7rem; letter-spacing: 0.5px; }
header h1 .anchor { color: var(--gold); }
header p { color: var(--sky); font-size: 0.95rem; margin-top: 4px; }
.toolbar {
display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
margin-bottom: 18px; max-width: 860px;
}
select, .btn {
background: rgba(255,255,255,0.1);
border: 1px solid rgba(255,255,255,0.25);
color: var(--cream);
padding: 8px 14px;
border-radius: 8px;
font-size: 0.9rem;
cursor: pointer;
transition: background 0.15s;
}
select:hover, .btn:hover { background: rgba(255,255,255,0.2); }
select option { color: #222; }
.btn.active { background: var(--gold); color: var(--navy); border-color: var(--gold); font-weight: 600; }
.btn.primary { background: var(--gold); color: var(--navy); border-color: var(--gold); font-weight: 600; }
.btn.primary:hover { background: #f0be62; }
.stats {
display: flex; gap: 18px; justify-content: center; margin-bottom: 16px;
font-size: 0.85rem; color: var(--sky); flex-wrap: wrap;
}
.stats b { color: var(--cream); }
.stats .known b { color: #7ed6a5; }
.stats .review b { color: #f2b8b0; }
/* ---------- Flashcard ---------- */
.card-area { width: 100%; max-width: 640px; display: none; flex-direction: column; align-items: center; }
.card-area.visible { display: flex; }
.progress-track {
width: 100%; height: 6px; background: rgba(255,255,255,0.15);
border-radius: 3px; margin-bottom: 14px; overflow: hidden;
}
.progress-fill { height: 100%; background: var(--gold); border-radius: 3px; width: 0%; transition: width 0.3s; }
.flashcard {
width: 100%; height: 340px;
perspective: 1200px;
cursor: pointer;
}
.flashcard-inner {
position: relative; width: 100%; height: 100%;
transform-style: preserve-3d;
transition: transform 0.5s;
}
.flashcard.flipped .flashcard-inner { transform: rotateY(180deg); }
.card-face {
position: absolute; inset: 0;
backface-visibility: hidden;
-webkit-backface-visibility: hidden;
border-radius: 16px;
display: flex; flex-direction: column;
justify-content: center; align-items: center;
padding: 32px 36px;
text-align: center;
box-shadow: var(--shadow);
}
.card-front { background: var(--white); color: var(--navy); }
.card-back { background: var(--gold); color: var(--navy); transform: rotateY(180deg); }
.card-category {
position: absolute; top: 16px; left: 0; right: 0;
font-size: 0.72rem; text-transform: uppercase; letter-spacing: 1.5px;
color: var(--blue); font-weight: 600;
}
.card-back .card-category { color: #7a5a17; }
.card-face .content { font-size: 1.35rem; line-height: 1.45; font-weight: 500; overflow-y: auto; max-height: 240px; }
.card-back .content { font-size: 1.15rem; font-weight: 500; }
.card-hint {
position: absolute; bottom: 14px; left: 0; right: 0;
font-size: 0.75rem; color: #9aa8b8;
}
.card-status-badge {
position: absolute; top: 14px; right: 16px;
font-size: 1rem;
}
.nav-row {
display: flex; gap: 10px; margin-top: 18px; align-items: center; flex-wrap: wrap; justify-content: center;
}
.mark-row { display: flex; gap: 10px; margin-top: 12px; }
.btn.know { border-color: var(--green); }
.btn.know:hover, .btn.know.active { background: var(--green); color: white; }
.btn.dontknow { border-color: var(--red); }
.btn.dontknow:hover, .btn.dontknow.active { background: var(--red); color: white; }
.counter { font-size: 0.9rem; color: var(--sky); min-width: 80px; text-align: center; }
.kbd-hints { margin-top: 20px; font-size: 0.75rem; color: var(--sky); text-align: center; line-height: 1.8; }
kbd {
background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.25);
border-radius: 4px; padding: 1px 7px; font-size: 0.72rem; font-family: inherit;
}
/* ---------- Quiz ---------- */
.quiz-area { width: 100%; max-width: 640px; display: none; flex-direction: column; align-items: center; }
.quiz-area.visible { display: flex; }
.quiz-card {
width: 100%; background: var(--white); color: var(--navy);
border-radius: 16px; padding: 30px 34px; box-shadow: var(--shadow);
}
.quiz-question { font-size: 1.15rem; font-weight: 600; line-height: 1.5; margin-bottom: 20px; }
.quiz-category { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--blue); font-weight: 600; margin-bottom: 10px; }
.quiz-options { display: flex; flex-direction: column; gap: 10px; }
.quiz-option {
background: var(--cream); border: 2px solid transparent; border-radius: 10px;
padding: 12px 16px; cursor: pointer; font-size: 0.95rem; line-height: 1.4;
text-align: left; color: var(--navy); transition: border-color 0.15s, background 0.15s;
}
.quiz-option:hover { border-color: var(--blue); }
.quiz-option.correct { background: #d9efe2; border-color: var(--green); font-weight: 600; }
.quiz-option.wrong { background: #f6dedb; border-color: var(--red); }
.quiz-option.selected { background: #dbe9f5; border-color: var(--blue); font-weight: 600; }
.exam-nav { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; align-items: center; }
.exam-nav .spacer { flex: 1; }
.exam-nav .btn { color: var(--navy); border-color: var(--blue); }
.exam-nav .btn:hover { background: var(--cream); }
.exam-nav .btn.finish { background: var(--gold); border-color: var(--gold); font-weight: 600; }
.exam-result-pass { color: var(--green); }
.exam-result-fail { color: var(--red); }
.exam-review-item {
text-align: left; background: var(--cream); border-left: 4px solid var(--red);
border-radius: 8px; padding: 14px 16px; margin-top: 12px; font-size: 0.9rem; line-height: 1.5;
}
.exam-review-item .rq { font-weight: 600; margin-bottom: 6px; }
.exam-review-item .ry { color: var(--red); }
.exam-review-item .rc { color: var(--green); font-weight: 600; }
.exam-review-item .re { color: #445; margin-top: 6px; font-style: italic; }
.match-svg { width: 100%; height: auto; max-height: 280px; display: block; margin: 4px auto 12px; }
.match-row { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.match-num {
flex: 0 0 26px; width: 26px; height: 26px; border-radius: 50%;
background: var(--navy); color: #fff; font-weight: 700; font-size: 0.85rem;
display: flex; align-items: center; justify-content: center;
}
.match-select {
flex: 1; padding: 8px 10px; border-radius: 8px; border: 1px solid #b8c4ce;
background: var(--cream); color: var(--navy); font-size: 0.92rem;
}
.match-note { font-size: 0.8rem; color: #667; margin-top: 10px; font-style: italic; }
.quiz-option:disabled { cursor: default; }
.quiz-feedback { margin-top: 16px; font-size: 0.95rem; font-weight: 600; min-height: 24px; }
.quiz-feedback.good { color: var(--green); }
.quiz-feedback.bad { color: var(--red); }
.quiz-score { margin-top: 14px; font-size: 0.9rem; color: var(--sky); }
.quiz-summary { text-align: center; }
.quiz-summary h2 { color: var(--navy); margin-bottom: 12px; }
.quiz-summary p { color: var(--navy); font-size: 1.05rem; margin-bottom: 20px; }
.done-msg {
background: var(--white); color: var(--navy); border-radius: 16px;
padding: 40px; text-align: center; box-shadow: var(--shadow); width: 100%;
}
.done-msg h2 { margin-bottom: 10px; }
.done-msg p { margin-bottom: 20px; color: #445; }
.site-footer {
margin-top: 44px; max-width: 640px; text-align: center;
font-size: 0.75rem; color: var(--sky); line-height: 1.7;
}
.site-footer a { color: var(--gold); }
@media (max-width: 520px) {
.flashcard { height: 380px; }
.card-face .content { font-size: 1.15rem; }
header h1 { font-size: 1.3rem; }
}
</style>
</head>
<body>
<header>
<h1><span class="anchor">⚓</span> ASA 101 Flashcards</h1>
<p>Basic Keelboat Sailing — study companion</p>
</header>
<div class="toolbar">
<select id="categorySelect" title="Filter by category"></select>
<select id="filterSelect" title="Filter by status">
<option value="all">All cards</option>
<option value="review">Needs review</option>
<option value="unseen">Not yet studied</option>
<option value="known">Known</option>
</select>
<button class="btn" id="shuffleBtn">🔀 Shuffle</button>
<button class="btn active" id="studyModeBtn">📖 Study</button>
<button class="btn" id="quizModeBtn">📝 Quiz</button>
<button class="btn" id="examModeBtn">🎓 Exam</button>
<button class="btn" id="resetBtn" title="Clear saved progress">↺ Reset progress</button>
</div>
<div class="stats">
<span>Deck: <b id="statTotal">0</b> cards</span>
<span class="known">Known: <b id="statKnown">0</b></span>
<span class="review">Needs review: <b id="statReview">0</b></span>
<span>Unseen: <b id="statUnseen">0</b></span>
</div>
<!-- ============ STUDY MODE ============ -->
<div class="card-area visible" id="studyArea">
<div class="progress-track"><div class="progress-fill" id="progressFill"></div></div>
<div class="flashcard" id="flashcard">
<div class="flashcard-inner">
<div class="card-face card-front">
<div class="card-category" id="cardCategory"></div>
<div class="card-status-badge" id="cardBadge"></div>
<div class="content" id="cardQuestion"></div>
<div class="card-hint">click or press space to flip</div>
</div>
<div class="card-face card-back">
<div class="card-category" id="cardCategoryBack"></div>
<div class="content" id="cardAnswer"></div>
<div class="card-hint">click or press space to flip back</div>
</div>
</div>
</div>
<div class="nav-row">
<button class="btn" id="prevBtn">← Prev</button>
<span class="counter" id="cardCounter"></span>
<button class="btn" id="nextBtn">Next →</button>
</div>
<div class="mark-row">
<button class="btn know" id="knowBtn">✓ I know this</button>
<button class="btn dontknow" id="dontKnowBtn">✗ Needs review</button>
</div>
<div class="kbd-hints">
<kbd>space</kbd> flip <kbd>←</kbd>/<kbd>→</kbd> navigate <kbd>k</kbd> know it <kbd>r</kbd> needs review
</div>
</div>
<!-- ============ QUIZ MODE ============ -->
<div class="quiz-area" id="quizArea">
<div class="quiz-card" id="quizCard"></div>
<div class="quiz-score" id="quizScore"></div>
</div>
<!-- ============ EXAM MODE ============ -->
<div class="quiz-area" id="examArea">
<div class="quiz-card" id="examCard"></div>
<div class="quiz-score" id="examStatus"></div>
</div>
<footer class="site-footer">
Unofficial study aid for the ASA 101 (Basic Keelboat Sailing) certification.
Not affiliated with or endorsed by the American Sailing Association.
All questions and diagrams are original content · Open source under the MIT License.
</footer>
<script>
// ==========================================================
// ASA 101 — Basic Keelboat Sailing flashcard deck
// ==========================================================
const DECK = [
// ---------- Boat Parts & Terminology ----------
{ c: "Boat Parts & Terminology", q: "What is the BOW of a boat?", a: "The forward (front) part of the boat." },
{ c: "Boat Parts & Terminology", q: "What is the STERN?", a: "The aft (back) part of the boat." },
{ c: "Boat Parts & Terminology", q: "What do PORT and STARBOARD mean?", a: "Port is the left side of the boat when facing forward (bow); starboard is the right side. Memory aid: 'port' and 'left' both have four letters." },
{ c: "Boat Parts & Terminology", q: "What is the HULL?", a: "The main body or shell of the boat that floats in the water." },
{ c: "Boat Parts & Terminology", q: "What is the KEEL and what two jobs does it do?", a: "A weighted fin extending down from the bottom of the hull. It (1) resists sideways slippage (leeway) and (2) provides ballast to counteract heeling and keep the boat upright." },
{ c: "Boat Parts & Terminology", q: "What is the RUDDER?", a: "The underwater blade at the stern that steers the boat, controlled by the tiller or wheel." },
{ c: "Boat Parts & Terminology", q: "What is the TILLER?", a: "A lever attached to the rudder used to steer the boat. Push the tiller in one direction and the bow turns the opposite direction." },
{ c: "Boat Parts & Terminology", q: "Which way does the bow turn when you push the tiller to starboard?", a: "The bow turns to port. The tiller and the bow always move in opposite directions." },
{ c: "Boat Parts & Terminology", q: "What is the MAST?", a: "The vertical spar that supports the sails." },
{ c: "Boat Parts & Terminology", q: "What is the BOOM?", a: "The horizontal spar attached to the mast that holds the foot (bottom edge) of the mainsail." },
{ c: "Boat Parts & Terminology", q: "What is the COCKPIT?", a: "The recessed area, usually aft, where the crew sits and steers the boat." },
{ c: "Boat Parts & Terminology", q: "What is the CABIN (below deck) area called on a keelboat?", a: "The cabin or saloon — the enclosed living/shelter space below deck, accessed through the companionway." },
{ c: "Boat Parts & Terminology", q: "What is the COMPANIONWAY?", a: "The entryway/stairway leading from the cockpit or deck down into the cabin." },
{ c: "Boat Parts & Terminology", q: "What is FREEBOARD?", a: "The vertical distance from the waterline up to the deck — the part of the hull above the water." },
{ c: "Boat Parts & Terminology", q: "What is DRAFT?", a: "The vertical distance from the waterline to the deepest point of the boat (usually the bottom of the keel). It tells you the minimum water depth the boat needs." },
{ c: "Boat Parts & Terminology", q: "What is the BEAM of a boat?", a: "The width of the boat at its widest point." },
{ c: "Boat Parts & Terminology", q: "What does FORWARD and AFT mean?", a: "Forward means toward the bow; aft means toward the stern." },
{ c: "Boat Parts & Terminology", q: "What do WINDWARD and LEEWARD mean?", a: "Windward is the direction from which the wind is blowing (upwind side); leeward (pronounced 'LOO-erd') is the side away from the wind (downwind side)." },
{ c: "Boat Parts & Terminology", q: "What are LIFELINES?", a: "Cables or lines supported by stanchions around the perimeter of the deck to help keep crew from falling overboard." },
{ c: "Boat Parts & Terminology", q: "What is a CLEAT?", a: "A fitting used to secure a line, typically with figure-eight turns and a locking hitch." },
{ c: "Boat Parts & Terminology", q: "What is a WINCH?", a: "A mechanical drum device that gives crew mechanical advantage to trim (pull in) lines under load, such as jib sheets. Always wrap clockwise." },
{ c: "Boat Parts & Terminology", q: "What is a FAIRLEAD?", a: "A fitting that guides a line in a desired direction, changing its angle smoothly and preventing chafe (e.g., jib sheet fairleads/cars)." },
{ c: "Boat Parts & Terminology", q: "What is the TRANSOM?", a: "The flat (or nearly flat) vertical surface across the stern of the boat." },
{ c: "Boat Parts & Terminology", q: "What is the difference between a LINE and a ROPE on a boat?", a: "Rope is the raw material; once it's aboard and has a job, it's called a line (or a specific name like sheet, halyard, or rode)." },
// ---------- Sails & Rigging ----------
{ c: "Sails & Rigging", q: "What is the MAINSAIL?", a: "The principal sail, set on the mast and boom, behind (aft of) the mast." },
{ c: "Sails & Rigging", q: "What is the JIB?", a: "The triangular headsail set forward of the mast, attached to the forestay. A large overlapping jib is called a genoa." },
{ c: "Sails & Rigging", q: "Name the three corners of a triangular sail.", a: "HEAD (top), TACK (forward lower corner), CLEW (aft lower corner)." },
{ c: "Sails & Rigging", q: "Name the three edges of a triangular sail.", a: "LUFF (forward edge), LEECH (aft edge), FOOT (bottom edge)." },
{ c: "Sails & Rigging", q: "What are BATTENS?", a: "Thin slats inserted into pockets on the leech of the mainsail to help the sail hold its shape." },
{ c: "Sails & Rigging", q: "What is a HALYARD?", a: "A line used to hoist (raise) a sail. The main halyard raises the mainsail; the jib halyard raises the jib." },
{ c: "Sails & Rigging", q: "What is a SHEET?", a: "A line used to trim a sail in or ease it out — controlling the sail's angle to the wind. The mainsheet controls the mainsail; jib sheets control the jib." },
{ c: "Sails & Rigging", q: "What is STANDING RIGGING?", a: "The fixed wires/rods that hold up the mast: the forestay, backstay, and shrouds. It is not adjusted during normal sailing." },
{ c: "Sails & Rigging", q: "What is RUNNING RIGGING?", a: "All the adjustable lines used to hoist, trim, and control the sails: halyards, sheets, outhaul, boom vang, etc." },
{ c: "Sails & Rigging", q: "What are the FORESTAY and BACKSTAY?", a: "Standing rigging wires: the forestay runs from the bow to the upper mast (the jib hanks onto it); the backstay runs from the stern to the masthead. Together they support the mast fore-and-aft." },
{ c: "Sails & Rigging", q: "What are SHROUDS?", a: "Standing rigging wires on each side of the mast that support it laterally (side to side), anchored at the chainplates." },
{ c: "Sails & Rigging", q: "What is the BOOM VANG?", a: "A tackle or rigid strut from the base of the mast to the boom that pulls the boom down, flattening the mainsail and controlling leech twist, especially off the wind." },
{ c: "Sails & Rigging", q: "What is the OUTHAUL?", a: "The line that tensions the foot of the mainsail by pulling the clew aft along the boom. More outhaul = flatter sail." },
{ c: "Sails & Rigging", q: "What is the CUNNINGHAM (or downhaul)?", a: "A line that tensions the luff of the mainsail by pulling down near the tack, flattening the sail and moving draft forward." },
{ c: "Sails & Rigging", q: "What is the TOPPING LIFT?", a: "A line from the masthead to the end of the boom that holds the boom up when the mainsail is not hoisted." },
{ c: "Sails & Rigging", q: "What are TELLTALES and what do they indicate?", a: "Short pieces of yarn or ribbon on the sails (especially near the jib luff) that show airflow. When both windward and leeward telltales stream aft, the sail is trimmed correctly." },
{ c: "Sails & Rigging", q: "Jib telltales: the WINDWARD (inside) telltale is fluttering. What do you do?", a: "Either trim the sail in or bear away (turn away from the wind). Fluttering windward telltale = sail is luffing slightly / under-trimmed." },
{ c: "Sails & Rigging", q: "Jib telltales: the LEEWARD (outside) telltale is fluttering. What do you do?", a: "Either ease the sail out or head up (turn toward the wind). Fluttering leeward telltale = sail is over-trimmed (stalled)." },
{ c: "Sails & Rigging", q: "What is the basic rule of sail trim?", a: "'When in doubt, let it out.' Ease the sail until it just begins to luff, then trim in until the luffing stops." },
{ c: "Sails & Rigging", q: "What does it mean when a sail LUFFS?", a: "The sail flaps or bubbles along its luff because it is under-trimmed for the course, or the boat is pointed too close to the wind." },
{ c: "Sails & Rigging", q: "In what order do you typically hoist and lower sails, and why?", a: "Hoist the mainsail first (head to wind), then the jib. Lower the jib first, then the mainsail. The mainsail helps keep the boat controllable head-to-wind." },
{ c: "Sails & Rigging", q: "What is REEFING?", a: "Reducing the mainsail's area (partially lowering and re-securing it) to depower the boat in strong wind. Rule: reef early — if you're wondering whether to reef, reef." },
// ---------- Points of Sail ----------
{ c: "Points of Sail", q: "What is the NO-SAIL ZONE (or 'no-go zone')?", a: "The area roughly 45° either side of the wind direction where a boat cannot sail. Pointing there causes the sails to luff and the boat to stall (be 'in irons')." },
{ c: "Points of Sail", q: "Name the five points of sail from closest to the wind to farthest.", a: "Close-hauled (~45° to wind), close reach, beam reach (90° to wind), broad reach, and run (directly downwind)." },
{ c: "Points of Sail", q: "What is CLOSE-HAULED?", a: "Sailing as close to the wind as possible (about 45°), with sails trimmed in tight. Also called beating or sailing to weather." },
{ c: "Points of Sail", q: "What is a BEAM REACH?", a: "Sailing with the wind coming directly over the side (beam) of the boat, about 90° to the wind, with sails eased about halfway. Usually the fastest and easiest point of sail." },
{ c: "Points of Sail", q: "What is a BROAD REACH?", a: "Sailing with the wind coming over the aft quarter (between beam reach and run), sails eased well out." },
{ c: "Points of Sail", q: "What is a RUN?", a: "Sailing directly downwind (wind astern), sails let all the way out. Can sail 'wing-on-wing' with jib and main on opposite sides. Requires care to avoid an accidental jibe." },
{ c: "Points of Sail", q: "What is a CLOSE REACH?", a: "The point of sail between close-hauled and a beam reach — sailing toward the wind but not as tight as possible, sails eased slightly." },
{ c: "Points of Sail", q: "What does it mean to HEAD UP?", a: "To turn the bow toward (closer to) the wind. Sails must be trimmed in as you head up." },
{ c: "Points of Sail", q: "What does it mean to BEAR AWAY (fall off)?", a: "To turn the bow away from the wind. Sails should be eased out as you bear away." },
{ c: "Points of Sail", q: "What is being IN IRONS?", a: "Stuck head-to-wind in the no-sail zone with sails luffing and no steerageway. Recover by backing the jib and/or reversing rudder as the boat drifts backward." },
{ c: "Points of Sail", q: "What is HEELING?", a: "The boat leaning (tipping) to leeward under the force of the wind. Controlled by easing sails, heading up, moving crew weight to windward, or reefing." },
{ c: "Points of Sail", q: "You're on STARBOARD TACK. Where is the wind coming from and where is the boom?", a: "Wind comes over the starboard side; the boom (and mainsail) is on the port side. A boat's tack is named for the windward side — opposite the boom." },
{ c: "Points of Sail", q: "What is TACKING (coming about)?", a: "Turning the bow of the boat through the wind so the sails fill on the opposite side. Used to make progress upwind in a zigzag pattern." },
{ c: "Points of Sail", q: "What is JIBING (gybing)?", a: "Turning the stern of the boat through the wind so the sails switch sides. Done when sailing downwind. Must be controlled — the boom swings across quickly." },
{ c: "Points of Sail", q: "What are the standard helm commands for TACKING?", a: "Helm: 'Ready about?' Crew: 'Ready!' Helm: 'Hard-a-lee!' (or 'Helm's a-lee' / 'Tacking') as the turn begins. Crew releases the old jib sheet and trims the new one." },
{ c: "Points of Sail", q: "What are the standard helm commands for JIBING?", a: "Helm: 'Prepare to jibe!' Crew: 'Ready!' Helm: 'Jibe-ho!' The mainsheet is trimmed in before the stern crosses the wind, then eased out on the new side — controlling the boom." },
{ c: "Points of Sail", q: "What is an ACCIDENTAL JIBE and why is it dangerous?", a: "An unplanned jibe when sailing by the lee: the wind catches the back of the mainsail and slams the boom across the cockpit. It can injure crew or damage rigging. Prevent by steering carefully downwind and using a preventer." },
{ c: "Points of Sail", q: "What does SAILING BY THE LEE mean?", a: "Sailing downwind with the wind coming over the same side (quarter) that the boom is on — a risky condition that can lead to an accidental jibe." },
{ c: "Points of Sail", q: "What is BEATING (to windward)?", a: "Making progress upwind by sailing close-hauled on alternating tacks in a zigzag pattern." },
{ c: "Points of Sail", q: "What is the difference between TRUE WIND and APPARENT WIND?", a: "True wind is the actual wind over the water. Apparent wind is the wind you feel on the moving boat — a combination of true wind and the boat's own motion. Apparent wind moves forward and increases as the boat speeds up." },
{ c: "Points of Sail", q: "What is WEATHER HELM?", a: "The boat's tendency to turn up toward the wind, requiring you to hold the tiller to windward. A slight weather helm is desirable; excessive weather helm means the boat is overpowered — ease the main, reef, or flatten sails." },
{ c: "Points of Sail", q: "What is LEEWAY?", a: "The sideways slippage of a boat to leeward as it sails, mostly resisted by the keel." },
// ---------- Rules of the Road ----------
{ c: "Rules of the Road", q: "What do STAND-ON and GIVE-WAY vessel mean?", a: "The stand-on vessel should maintain its course and speed; the give-way vessel must take early and obvious action to keep clear. Both must act to avoid collision if needed." },
{ c: "Rules of the Road", q: "Two sailboats approach on OPPOSITE TACKS. Who has right of way?", a: "The boat on STARBOARD tack is the stand-on vessel. The port-tack boat must give way. ('Port keeps clear.')" },
{ c: "Rules of the Road", q: "Two sailboats approach on the SAME TACK. Who has right of way?", a: "The LEEWARD (downwind) boat is the stand-on vessel. The windward boat must keep clear." },
{ c: "Rules of the Road", q: "A sailboat under sail meets a powerboat in open water. Who normally gives way?", a: "The powerboat is normally the give-way vessel. Exceptions: the sailboat gives way to vessels that are overtaken by it, fishing vessels engaged in fishing, vessels restricted in ability to maneuver, not under command, or constrained by draft (e.g., large ships in a channel)." },
{ c: "Rules of the Road", q: "One vessel is OVERTAKING another. Who gives way?", a: "The overtaking vessel ALWAYS gives way — even if it's a sailboat overtaking a powerboat." },
{ c: "Rules of the Road", q: "Is a sailboat with its engine running and in gear a sailboat or powerboat under the rules?", a: "A powerboat. If the engine is propelling the boat, power rules apply even if sails are up." },
{ c: "Rules of the Road", q: "Two powerboats meet head-on. What should each do?", a: "Each alters course to STARBOARD and they pass port-to-port." },
{ c: "Rules of the Road", q: "Two powerboats are crossing. Who gives way?", a: "The vessel that has the other on its STARBOARD side gives way (like yielding to traffic on your right). Avoid crossing ahead of the stand-on vessel." },
{ c: "Rules of the Road", q: "What should a small sailboat do about large commercial ships in a channel?", a: "Stay well clear. Large ships are constrained by draft, can't maneuver or stop quickly, and may not see you. Cross channels quickly at right angles and never insist on 'rights.'" },
{ c: "Rules of the Road", q: "What is the overriding responsibility rule regardless of right of way?", a: "Every vessel must do whatever is necessary to AVOID A COLLISION — even the stand-on vessel must act if the give-way vessel does not. Maintain a proper lookout at all times." },
{ c: "Rules of the Road", q: "When returning from sea, on which side do you keep RED buoys?", a: "'Red, Right, Returning' — keep red (even-numbered, nun) buoys on your right/starboard side when returning from sea toward harbor; green (odd-numbered, can) buoys on your left." },
{ c: "Rules of the Road", q: "What is a NUN buoy and a CAN buoy?", a: "A nun is a red, cone-topped (pointed) buoy with even numbers — keep to starboard when returning. A can is a green, flat-topped (cylindrical) buoy with odd numbers — keep to port when returning." },
{ c: "Rules of the Road", q: "What does one prolonged blast of a horn signal?", a: "Commonly used when a vessel is departing a dock/berth, or approaching a blind bend or obscured area — 'I am here.' (Prolonged = 4–6 seconds.)" },
{ c: "Rules of the Road", q: "What do five (or more) short horn blasts mean?", a: "Danger / doubt signal: 'I don't understand your intentions' or 'I disagree — danger!'" },
// ---------- Wind & Weather ----------
{ c: "Wind & Weather", q: "How can you tell where the wind is coming from?", a: "Look at the masthead fly/wind indicator, telltales on the shrouds, flags, ripples on the water, other boats at anchor, and feel it on your face. Always know where the wind is." },
{ c: "Wind & Weather", q: "What is a PUFF (gust) and what should you expect when one hits?", a: "A temporary increase in wind, visible as a dark patch of rippled water moving toward you. Expect increased heel — be ready to ease the mainsheet, head up slightly, or hike out." },
{ c: "Wind & Weather", q: "What is a LULL?", a: "A temporary decrease in wind. The boat will stand up (heel less) and slow down; you may need to trim in or bear away slightly." },
{ c: "Wind & Weather", q: "What does a WIND SHIFT mean by 'header' and 'lift' when sailing upwind?", a: "A header shifts the wind toward your bow, forcing you to bear away (or tack). A lift shifts the wind aft, letting you point higher toward your destination." },
{ c: "Wind & Weather", q: "What weather signs suggest an approaching storm or front?", a: "Building dark clouds (especially tall cumulonimbus/thunderheads), sudden wind shifts or increase, dropping temperature and barometer, lightning, and static on AM radio. Head for shelter early." },
{ c: "Wind & Weather", q: "Before heading out, what weather resources should you check?", a: "Marine forecast (VHF weather channels, NOAA), local wind and sea conditions, small craft advisories, and tide/current tables for the area." },
{ c: "Wind & Weather", q: "What is a SMALL CRAFT ADVISORY?", a: "A warning that wind/sea conditions (roughly sustained winds of 22–33 knots, varies by region) are potentially hazardous to small boats. Inexperienced sailors should stay in port." },
{ c: "Wind & Weather", q: "What should you do if caught out in suddenly heavy weather?", a: "Everyone in PFDs; reef or drop sails to reduce power; head for the nearest safe harbor; avoid the no-sail zone and accidental jibes; if lightning, keep crew away from the mast and rigging." },
// ---------- Knots & Lines ----------
{ c: "Knots & Lines", q: "What is the BOWLINE and what is it used for?", a: "The 'king of knots' — makes a fixed loop that won't slip and unties easily even after loading. Used to tie jib sheets to the clew, dock lines to pilings, etc. (Rabbit comes out of the hole, around the tree, back down the hole.)" },
{ c: "Knots & Lines", q: "What is a CLEAT HITCH used for and how is it formed?", a: "Securing a line to a cleat (dock lines, halyards). A full wrap around the base, figure-eight turns over the horns, finished with a locking hitch (flipped loop) so the line leads fair." },
{ c: "Knots & Lines", q: "What is a FIGURE-EIGHT knot used for?", a: "A stopper knot tied at the end of a line (like jib sheets) to keep it from running out through a block or fairlead." },
{ c: "Knots & Lines", q: "What is a CLOVE HITCH used for?", a: "Quickly securing a line to a piling, post, or rail — e.g., hanging fenders from a lifeline. Can slip under varying load, so back it up with half hitches for anything important." },
{ c: "Knots & Lines", q: "What are ROUND TURN AND TWO HALF HITCHES used for?", a: "Securing a line to a ring, post, or rail under load — a round turn takes the strain while you finish the two half hitches. More secure than a clove hitch." },
{ c: "Knots & Lines", q: "What is a SQUARE (REEF) KNOT used for?", a: "Joining the two ends of the SAME line around something — traditionally tying in reef points. Not for joining two different lines under load (it can capsize)." },
{ c: "Knots & Lines", q: "How should you COIL a line?", a: "In even loops (clockwise for most twisted line, figure-eight or straight coils for braided), secured with a wrap, so it's ready to run free without kinks or tangles." },
{ c: "Knots & Lines", q: "Name the basic dock lines used to secure a boat.", a: "Bow line, stern line, and spring lines (forward and aft springs) which keep the boat from surging forward and back along the dock." },
{ c: "Knots & Lines", q: "What do SPRING LINES do?", a: "They run diagonally (roughly parallel to the dock) and prevent the boat from moving forward or aft in its berth. Also used to pivot the boat when departing a dock." },
{ c: "Knots & Lines", q: "What is CHAFE and how do you prevent it?", a: "Wear on a line from rubbing against a surface. Prevent it with fairleads, chafe guards/hose at contact points, and by rigging lines so they don't rub." },
// ---------- Safety ----------
{ c: "Safety", q: "What does PFD stand for and what is the basic legal requirement?", a: "Personal Flotation Device (life jacket). There must be a properly fitting, Coast Guard-approved wearable PFD aboard for every person, readily accessible. Wearing one is the best practice — especially children, non-swimmers, and in rough conditions." },
{ c: "Safety", q: "What is a TYPE IV PFD?", a: "A throwable flotation device (cushion or ring buoy). Boats 16 feet and over must carry at least one, immediately available to throw to a person in the water." },
{ c: "Safety", q: "What are the first three actions when someone falls overboard?", a: "1) Shout 'Crew overboard!' to alert everyone. 2) Throw flotation (Type IV/cushion) to the victim. 3) Assign a spotter to point at the victim continuously and never lose sight of them." },
{ c: "Safety", q: "Describe the FIGURE-EIGHT crew-overboard recovery under sail.", a: "Fall off to a beam reach and sail several boat lengths away; tack (do not jibe); sail back on a broad/beam reach; approach the victim on a CLOSE REACH so you can luff the sails and stop with the victim on the leeward side (or windward per local teaching) near the shrouds." },
{ c: "Safety", q: "Why approach a person in the water on a CLOSE REACH?", a: "On a close reach you can ease sails to slow down or stop, and trim to power up again — full speed control. Approaching downwind or on a run makes it impossible to stop." },
{ c: "Safety", q: "What safety equipment should be aboard for a daysail?", a: "PFDs for all + throwable, sound signal (horn/whistle), fire extinguisher, visual distress signals (flares), first-aid kit, anchor and rode, bilge pump/bailer, VHF radio, navigation lights if out after dark, and a paddle." },
{ c: "Safety", q: "How do you signal distress on VHF radio?", a: "Channel 16: say 'MAYDAY, MAYDAY, MAYDAY,' vessel name, position, nature of emergency, number of people aboard, and description of the boat. Mayday is for life-threatening emergencies only." },
{ c: "Safety", q: "What is HYPOTHERMIA and why does it matter to sailors?", a: "Dangerous lowering of core body temperature from cold water/air exposure. Cold water immersion incapacitates quickly — wear PFDs, dress in layers, and get victims dry and warm gradually." },
{ c: "Safety", q: "What is the danger area on deck when tacking or jibing?", a: "The path of the boom (and mainsheet) across the cockpit. 'Boom!' — keep your head down and stay clear when the boat turns through the wind." },
{ c: "Safety", q: "What should you do BEFORE leaving the dock every time?", a: "Check weather; file a float plan with someone ashore; inspect rigging, safety gear, and bilge; brief the crew on PFDs, boom awareness, and their jobs; and confirm fuel/engine if equipped." },
{ c: "Safety", q: "What is a FLOAT PLAN?", a: "Information left with a responsible person ashore: where you're going, who's aboard, boat description, and when you'll return — so help can be sent if you're overdue." },
{ c: "Safety", q: "When should you reef or reduce sail?", a: "At the FIRST thought of it. 'If you're wondering whether to reef, it's time to reef.' It's far easier to shake out a reef than to tuck one in when overpowered." },
{ c: "Safety", q: "What is the correct way to use a winch safely?", a: "Wrap the line CLOCKWISE (usually 2-3 wraps), keep fingers clear and hands flat when easing, tail the line, and never let loaded line run uncontrolled. Beware overrides." },
{ c: "Safety", q: "Where should crew NEVER put their hands or feet when docking?", a: "Between the boat and the dock or another boat. Use fenders — never body parts — to cushion contact." },
// ---------- Maneuvers & Seamanship ----------
{ c: "Maneuvers & Seamanship", q: "How do you STOP a sailboat?", a: "Turn head-to-wind and let the sails luff (a 'safety position' is also common: close reach with sails eased/luffing). The boat coasts to a stop. There are no brakes — plan your stop with room to coast." },
{ c: "Maneuvers & Seamanship", q: "What is the SAFETY POSITION?", a: "Holding the boat on a close reach with sails completely eased and luffing — the boat sits nearly stopped but with steerageway available by trimming in. Used to pause, sort things out, or wait." },
{ c: "Maneuvers & Seamanship", q: "How should you approach a mooring or dock under sail?", a: "From LEEWARD (downwind), turning up into the wind so the boat luffs and coasts to a stop at the target. Judge momentum so you arrive with just enough way to stop where intended." },
{ c: "Maneuvers & Seamanship", q: "When leaving a dock, what should you consider first?", a: "Wind and current direction relative to the dock: they determine whether to spring off, back out, or sail off, and which lines to release last. Plan the departure before releasing anything." },
{ c: "Maneuvers & Seamanship", q: "What is STEERAGEWAY?", a: "The minimum forward speed through the water needed for the rudder to be effective. Without water flowing past the rudder, you cannot steer." },
{ c: "Maneuvers & Seamanship", q: "What is the proper technique for anchoring?", a: "Head into the wind/current, stop at the chosen spot, lower (never throw) the anchor, fall back while paying out rode, snub to set the anchor, and let out proper scope. Check for dragging with bearings on fixed objects." },
{ c: "Maneuvers & Seamanship", q: "What is SCOPE and what ratio is recommended for anchoring?", a: "The ratio of anchor rode paid out to the depth of water (plus freeboard to the bow chock). Typical recommendation: 5:1 minimum, 7:1 for secure/overnight anchoring." },
{ c: "Maneuvers & Seamanship", q: "What is the RODE?", a: "The anchor line (rope, chain, or a combination) connecting the anchor to the boat." },
{ c: "Maneuvers & Seamanship", q: "Why do sailors use FENDERS?", a: "Cushions hung between the hull and a dock or another boat to prevent damage when berthed or rafting." },
{ c: "Maneuvers & Seamanship", q: "What does it mean to be UNDER WAY?", a: "Not attached to the ground or dock — not anchored, moored, docked, or aground. A boat drifting with no sails up is still under way." },
{ c: "Maneuvers & Seamanship", q: "What is the skipper's responsibility before and during a sail?", a: "The skipper is responsible for the safety of the boat and crew: seaworthiness, safety equipment, weather judgment, crew briefing, and all decisions aboard — including knowing and following the navigation rules." },
{ c: "Maneuvers & Seamanship", q: "What is basic sailing etiquette around other boats?", a: "Give anchored/moored, racing, and working boats room; pass astern of stand-on vessels; keep wakes and noise down near anchorages; offer help to boats in trouble — it's both custom and law to assist mariners in distress." },
// ---------- ADDED: gap-fill against ASA 101 Standards (Jan 2025) ----------
{ c: "Boat Parts & Terminology", q: "What is the GOOSENECK?", a: "The fitting that attaches the forward end of the boom to the mast, allowing the boom to pivot horizontally and vertically." },
{ c: "Boat Parts & Terminology", q: "What are SPREADERS?", a: "Horizontal struts extending sideways from the mast that push the shrouds outboard, widening their angle to the mast so they support it more effectively." },
{ c: "Boat Parts & Terminology", q: "What is a PULPIT?", a: "The raised metal guardrail at the bow (bow pulpit); the equivalent at the stern is the stern pulpit or pushpit. Lifelines run between the pulpits, supported by stanchions." },
{ c: "Boat Parts & Terminology", q: "What does ABEAM mean?", a: "At right angles to the centerline of the boat — off the side, roughly 90 degrees from the bow. Compare AHEAD (in front) and ASTERN (behind)." },
{ c: "Boat Parts & Terminology", q: "What is the difference between the SKIPPER, the HELMSMAN, and the CREW?", a: "The skipper is the person in command, responsible for the vessel and everyone aboard. The helmsman is whoever is steering at the moment. The crew are everyone else aboard working the boat. The skipper may or may not be the helmsman." },
{ c: "Sails & Rigging", q: "What is a BOLT ROPE?", a: "A rope sewn into the luff (and sometimes foot) of a sail that slides into a groove in the mast or boom to hold the sail's edge in place. An alternative to slugs, slides, or hanks." },
{ c: "Sails & Rigging", q: "What is a HANK?", a: "A clip or snap fitting along the luff of a jib that attaches the sail to the forestay. A 'hank-on' jib is clipped to the stay, as opposed to being fed into a roller furler's foil." },
{ c: "Sails & Rigging", q: "What is a BATTEN POCKET?", a: "The sewn sleeve in the sail (usually along the leech of the mainsail) that holds a batten. Battens are inserted into these pockets to support the roach and keep the leech from curling." },
{ c: "Sails & Rigging", q: "What is the TRAVELER?", a: "An athwartships track with a movable car that the mainsheet block attaches to. It controls the sideways (side-to-side) angle of the boom without changing sheet tension — letting you adjust the mainsail's angle of attack independently of leech tension." },
{ c: "Sails & Rigging", q: "What is a SHACKLE?", a: "A metal fitting — usually a U-shaped link closed by a pin — used to connect a line, sail, or block to something. Common types: screw-pin, snap, and twist shackles." },
{ c: "Sails & Rigging", q: "What is a ROLLER FURLER?", a: "A system that rolls the jib around the forestay (on a rotating foil) so it can be deployed or stowed from the cockpit by pulling a furling line, without going forward. Also allows partial furling to reduce sail area." },
{ c: "Sails & Rigging", q: "What is a GENOA and how does it differ from a JIB?", a: "A genoa is a large headsail whose clew overlaps the mast (extends aft of the forestay-to-mast area). A working jib does not overlap. Genoas are sized by percentage (e.g., 150%) of the foretriangle." },
{ c: "Rules of the Road", q: "What does Rule 5, RESPONSIBILITY FOR A LOOK-OUT, require?", a: "Every vessel must at all times maintain a proper look-out by sight AND hearing, as well as by all available means appropriate to the conditions, to make a full appraisal of the situation and risk of collision. This applies to every vessel regardless of size, and it applies at all times — not just when traffic is nearby." },
{ c: "Rules of the Road", q: "Under sail, where is the most common blind spot for a look-out, and what do you do about it?", a: "Behind the headsail (jib/genoa) to leeward. The sail hides a wedge of water on the leeward bow. The fix: regularly head up briefly, have crew look under the foot of the jib, or assign a crew member to check to leeward at intervals." },
{ c: "Rules of the Road", q: "What is the DANGER (doubt) SIGNAL and when do you use it?", a: "Five or more short, rapid blasts on the horn. Used when you doubt that another vessel is taking sufficient action to avoid collision, or when you don't understand her intentions. It means 'I don't understand you / I doubt you are acting to avoid collision.'" },
{ c: "Rules of the Road", q: "You are the stand-on vessel and a boat is closing on you while sounding five short blasts. What does that mean and what should you do?", a: "Five short blasts is the danger signal — the other vessel doubts your intentions or doesn't believe you are avoiding collision. Do not stubbornly stand on. Make your intentions obvious immediately, and if collision is possible, take positive action to avoid it. Rule 2 makes avoiding collision the overriding obligation." },
{ c: "Rules of the Road", q: "What actions should you take when sailing near commercial traffic in a channel?", a: "Stay out of the channel or well to one side. Never assume a large ship can see you or can maneuver — she may be constrained by draft and needs miles to stop. Cross channels quickly and at right angles. Do not cross ahead. Watch for the danger signal (five short blasts). Under sail near ships, be prepared to start the engine and get clear." },
{ c: "Rules of the Road", q: "What is the purpose of LATERAL aids to navigation, and what is the US buoyage rule?", a: "Lateral marks indicate the sides of a navigable channel. The US (IALA-B) rule is 'Red, Right, Returning': when returning from sea (heading upstream / toward harbor), keep RED marks on your starboard side and GREEN marks on your port side." },
{ c: "Rules of the Road", q: "Describe a RED lateral mark: shape, number, and light.", a: "Red, EVEN numbers, and if a buoy it is a NUN (cone/pointed top). If lighted, the light is red. Kept to starboard when returning from sea. Numbers increase as you go upstream." },
{ c: "Rules of the Road", q: "Describe a GREEN lateral mark: shape, number, and light.", a: "Green, ODD numbers, and if a buoy it is a CAN (cylindrical/flat top). If lighted, the light is green. Kept to port when returning from sea." },
{ c: "Rules of the Road", q: "What is a PREFERRED CHANNEL (junction) marker and how do you read it?", a: "A mark at a channel junction with RED and GREEN horizontal bands. The color of the TOP band tells you the preferred channel. Top band RED (a nun) = preferred channel is to starboard, so pass with the mark on your starboard side when returning. Top band GREEN (a can) = preferred channel is to port, so pass with the mark to port. Either side is navigable; the top band just indicates the primary route." },
{ c: "Rules of the Road", q: "What is a SAFE WATER mark and what does it tell you?", a: "Red and WHITE VERTICAL stripes, with a red spherical topmark if any. It marks mid-channel or a fairway — navigable water all around. Often used as a landfall or channel-entrance mark. If lighted, it shows a white Morse 'A' (short-long) flash." },
{ c: "Rules of the Road", q: "What is a SPECIAL PURPOSE mark?", a: "YELLOW. Marks an area or feature described in a chart or notice — anchorages, cable/pipeline areas, spoil grounds, traffic separation, or race courses. It is not primarily for navigation. If lighted, the light is yellow." },
{ c: "Rules of the Road", q: "What are INFORMATION and REGULATORY markers, and what do the shapes mean?", a: "White with orange bands and black lettering. The orange shape carries the message: an open DIAMOND = danger; a diamond with a CROSS inside = boats excluded/keep out; a CIRCLE = a controlled/restricted area (e.g., no wake, speed limit); a SQUARE or rectangle = information (directions, distances, place names)." },
{ c: "Safety", q: "What is the federal Blood Alcohol Content (BAC) limit for operating a vessel?", a: "0.08% BAC. This is the federal standard for boating under the influence (BUI); state limits may be lower, and operators can be cited on other evidence of impairment regardless of BAC. Boating under the influence is a leading contributing factor in fatal recreational boating accidents." },
{ c: "Rules of the Road", q: "You are on PORT tack and you are OVERTAKING a boat on STARBOARD tack. Who gives way?", a: "YOU do. The overtaking rule takes precedence: any vessel overtaking another must keep clear, regardless of tack, regardless of sail vs. power. Tack rules only apply to converging/crossing situations, not overtaking. This is the classic exam trap." },
{ c: "Rules of the Road", q: "What defines an OVERTAKING situation, and why does it matter that it overrides the tack rules?", a: "You are overtaking if you are approaching another vessel from more than 22.5 degrees abaft her beam — i.e., from where you would see only her sternlight at night. Once overtaking, you remain the give-way vessel until you are finally past and clear. A later change of bearing does not turn it into a crossing situation. This overrides port/starboard tack and sail-over-power." },
{ c: "Rules of the Road", q: "Two sailboats on the SAME tack, and you are the WINDWARD boat. Who gives way, and how do you tell?", a: "The WINDWARD boat gives way; the leeward boat stands on. Windward is the boat on the side the wind is coming from — she is upwind of the other. Memory aid: the leeward boat has less room to maneuver (she can't bear away into the other boat), so she stands on." },
{ c: "Rules of the Road", q: "A sailboat under sail is OVERTAKING a powerboat. Who gives way?", a: "The SAILBOAT. Sail-over-power does not apply when overtaking. The overtaking vessel always keeps clear." },
{ c: "Rules of the Road", q: "Name the three situations where a powerboat does NOT have to give way to a sailboat.", a: "(1) The sailboat is overtaking the powerboat. (2) The powerboat is a vessel constrained by her draft, not under command, restricted in ability to maneuver, or engaged in fishing with gear deployed. (3) The sailboat has her engine in gear — she is legally a power-driven vessel, regardless of whether sails are up." },
{ c: "Rules of the Road", q: "What is Rule 2, the RESPONSIBILITY rule, and how does it interact with right of way?", a: "Rule 2 (the 'general prudential rule') says nothing in the rules exonerates any vessel from the consequences of neglecting the rules or of neglecting any precaution required by ordinary practice of seamen or by the special circumstances of the case. Practical meaning: right of way is never a right to collide. The stand-on vessel MUST act to avoid collision when it becomes clear the give-way vessel is not." },
{ c: "Rules of the Road", q: "As the STAND-ON vessel, what are you actually required to do?", a: "Initially, hold your course and speed so the give-way vessel can predict you (Rule 17). If it becomes apparent the give-way vessel is not taking appropriate action, you MAY take action to avoid collision. When collision cannot be avoided by the give-way vessel's action alone, you MUST act. If avoiding by maneuver, a stand-on power vessel should avoid turning to port for a vessel on her own port side." },
{ c: "Safety", q: "What navigation lights must a sailing vessel under 20 meters show at night, and what are the options?", a: "Sidelights (red to port, green to starboard) plus a white sternlight. Under 20m these may be combined into a single tricolor light at the masthead. A sailboat under 20m may ALTERNATIVELY show the sidelights and sternlight in the normal positions plus an optional all-round red-over-green at the masthead — but never the tricolor and the deck-level lights at the same time. Under engine, she is a power-driven vessel and must also show a white masthead (steaming) light forward." },
];
// ==========================================================
// Exam question bank — original questions modeled on the
// ASA 101 written-exam format (multiple choice + true/false).
// a = index of the correct option below; e = explanation.
// ==========================================================
const EXAM_BANK = [
// ---- Terminology & boat parts ----
{ t: "Terminology", q: "True or False: The leeward side of the boat is the side the wind reaches first.", opts: ["True", "False"], a: 1, e: "The wind reaches the WINDWARD side first. Leeward is the downwind side, sheltered from the wind." },
{ t: "Terminology", q: "Which term describes the width of a boat at its widest point?", opts: ["Beam", "Draft", "Freeboard", "Waterline"], a: 0, e: "Beam is the boat's maximum width. Draft is depth below the waterline; freeboard is hull height above it." },
{ t: "Terminology", q: "The minimum depth of water a boat needs in order to float is determined by its:", opts: ["Draft", "Beam", "Freeboard", "Displacement"], a: 0, e: "Draft is the vertical distance from the waterline to the boat's deepest point, usually the bottom of the keel." },
{ t: "Terminology", q: "True or False: A line used to hoist a sail is called a sheet.", opts: ["True", "False"], a: 1, e: "Halyards hoist sails; sheets trim them in and out." },
{ t: "Terminology", q: "What is the aft edge of a triangular sail called?", opts: ["Leech", "Luff", "Foot", "Roach"], a: 0, e: "The leech is the aft edge, the luff is the forward edge, and the foot is the bottom edge." },
{ t: "Terminology", q: "The forward lower corner of the mainsail, attached near the gooseneck, is the:", opts: ["Tack", "Clew", "Head", "Cringle"], a: 0, e: "The tack is the forward lower corner; the clew is the aft lower corner; the head is the top." },
{ t: "Terminology", q: "True or False: 'Aft' means toward the stern of the boat.", opts: ["True", "False"], a: 0, e: "Aft is toward the stern; forward is toward the bow." },
{ t: "Terminology", q: "Which of the following is part of the standing rigging?", opts: ["The shrouds", "The mainsheet", "The jib halyard", "The boom vang"], a: 0, e: "Standing rigging is the fixed wire supporting the mast: shrouds, forestay, and backstay. Sheets, halyards, and the vang are running rigging." },
{ t: "Terminology", q: "When loading a line onto a winch, you should wrap it:", opts: ["Clockwise", "Counterclockwise", "Either direction works", "Over the top of the drum"], a: 0, e: "Winches turn clockwise, so line is always wrapped clockwise around the drum." },
{ t: "Terminology", q: "Pushing the tiller to port makes the bow turn:", opts: ["To starboard", "To port", "Downwind", "It has no effect on the bow"], a: 0, e: "The tiller and bow move in opposite directions — tiller to port steers the bow to starboard." },
// ---- Sail trim & rigging ----
{ t: "Sail Trim", q: "What is the correct basic procedure for trimming a sail on a given course?", opts: ["Ease the sheet until the sail begins to luff, then trim in just until the luffing stops", "Trim the sheet as tight as possible on every point of sail", "Ease the sheet until the boat slows, then cleat it", "Trim until the boat heels 20 degrees"], a: 0, e: "'When in doubt, let it out' — ease to the point of luffing, then trim just enough to stop the luff." },
{ t: "Sail Trim", q: "The windward (inside) telltale on your jib is fluttering. What should you do?", opts: ["Trim the sheet in, or bear away from the wind", "Ease the sheet out, or head closer to the wind", "Drop the jib immediately", "Tighten the backstay"], a: 0, e: "A fluttering windward telltale means the sail is slightly luffing — trim in or bear away to restore smooth flow." },
{ t: "Sail Trim", q: "A stalled, over-trimmed jib is indicated by:", opts: ["The leeward (outside) telltale fluttering or drooping", "The windward telltale streaming straight aft", "Both telltales streaming aft", "The luff of the sail bubbling"], a: 0, e: "When the leeward telltale stalls, air is no longer flowing smoothly on the back of the sail — ease out or head up." },
{ t: "Sail Trim", q: "True or False: When sailing close-hauled, the sails should be eased all the way out.", opts: ["True", "False"], a: 1, e: "Close-hauled sailing requires the sails trimmed in tight. Sails go all the way out on a run." },
{ t: "Sail Trim", q: "Which sail control tensions the foot of the mainsail by pulling the clew aft?", opts: ["The outhaul", "The cunningham", "The topping lift", "The traveler"], a: 0, e: "The outhaul pulls the clew aft along the boom, tensioning the foot and flattening the lower sail." },
{ t: "Sail Trim", q: "The primary job of the boom vang is to:", opts: ["Pull the boom down, controlling sail twist when sailing off the wind", "Hold the boom up when the sail is lowered", "Move the boom fore and aft", "Tension the luff of the jib"], a: 0, e: "Off the wind the mainsheet no longer pulls the boom down, so the vang controls boom height and leech twist." },
{ t: "Sail Trim", q: "When getting under way, which sail is normally hoisted first, and in what position?", opts: ["The mainsail, with the boat head to wind", "The jib, on a beam reach", "The mainsail, on a run", "Both at once, on a close reach"], a: 0, e: "Hoist the main first while head to wind so it luffs freely and the boat remains controllable." },
{ t: "Sail Trim", q: "True or False: If you find yourself wondering whether it's time to reef, it's already time to reef.", opts: ["True", "False"], a: 0, e: "Reef early — it's far easier to shake out an unneeded reef than to tuck one in once overpowered." },
// ---- Points of sail & maneuvers ----
{ t: "Points of Sail", q: "The wind is coming directly over the side of your boat, about 90° off the bow. Your point of sail is a:", opts: ["Beam reach", "Close reach", "Broad reach", "Run"], a: 0, e: "Wind on the beam (90°) is a beam reach — typically the fastest, easiest point of sail." },
{ t: "Points of Sail", q: "The no-sail zone extends approximately how far on either side of the true wind?", opts: ["45 degrees", "10 degrees", "90 degrees", "120 degrees"], a: 0, e: "Boats can't sail closer than about 45° to the wind, creating a roughly 90°-wide no-sail zone." },
{ t: "Points of Sail", q: "Sailing directly downwind with the wind astern is called a:", opts: ["Run", "Beat", "Close reach", "Fetch"], a: 0, e: "A run is sailing straight downwind, sails fully eased — often wing-on-wing." },
{ t: "Points of Sail", q: "Tacking (coming about) means:", opts: ["Turning the bow through the eye of the wind", "Turning the stern through the wind", "Sailing directly downwind", "Letting the sails luff to slow down"], a: 0, e: "In a tack, the bow passes through the wind and the sails fill on the new side." },
{ t: "Points of Sail", q: "Jibing differs from tacking because in a jibe:", opts: ["The stern passes through the wind", "The bow passes through the wind", "The boat ends up head to wind", "The jib is always lowered first"], a: 0, e: "A jibe turns the stern through the wind while sailing downwind — the boom swings across, so it must be controlled." },
{ t: "Points of Sail", q: "The helm calls 'Ready about?' What command follows once the crew is ready?", opts: ["'Hard-a-lee!'", "'Jibe-ho!'", "'Let go and haul!'", "'Ease away!'"], a: 0, e: "'Ready about?' → 'Ready!' → 'Hard-a-lee!' begins the tack. 'Jibe-ho!' is the jibing command." },
{ t: "Points of Sail", q: "True or False: During a controlled jibe, the mainsheet should be trimmed in before the stern crosses the wind, then eased on the new side.", opts: ["True", "False"], a: 0, e: "Centering the boom before the stern crosses the wind prevents it from slamming across the cockpit." },
{ t: "Points of Sail", q: "Your boat is stopped head to wind with sails luffing and won't respond to the helm. You are:", opts: ["In irons", "By the lee", "Hove-to", "In stays trim"], a: 0, e: "That's being 'in irons.' Back the jib and reverse the helm as the boat drifts backward to recover." },
{ t: "Points of Sail", q: "The simplest way to stop a sailboat under sail is to:", opts: ["Turn toward the wind and let the sails luff", "Turn directly downwind", "Drop the anchor while moving", "Push the boom out against the wind"], a: 0, e: "Heading up until the sails luff removes their power and the boat coasts to a stop." },
{ t: "Points of Sail", q: "You are sailing on starboard tack. Where is the boom?", opts: ["Over the port side", "Over the starboard side", "On the centerline", "It depends on the jib"], a: 0, e: "The tack is named for the windward side — wind over starboard means the boom is carried to port." },
{ t: "Points of Sail", q: "Sailing 'by the lee' is risky because:", opts: ["The wind can catch the back of the mainsail and cause an accidental jibe", "The jib will not fill on a run", "It always puts you in irons", "It causes excessive weather helm"], a: 0, e: "By the lee, the wind is on the same quarter as the boom — one small shift can slam the boom across." },
// ---- Right of way ----
{ t: "Right of Way", q: "Two sailboats under sail are converging on opposite tacks. Which boat must give way?", opts: ["The boat on port tack", "The boat on starboard tack", "The smaller boat", "The faster boat"], a: 0, e: "Port-tack gives way; starboard-tack stands on." },
{ t: "Right of Way", q: "Two sailboats are converging on the same tack. Which boat must keep clear?", opts: ["The windward boat", "The leeward boat", "The boat astern of the other", "Whichever boat is larger"], a: 0, e: "On the same tack, the windward (upwind) boat gives way to the leeward boat." },
{ t: "Right of Way", q: "A sailboat under sail is overtaking a slow powerboat. Who must keep clear?", opts: ["The sailboat — an overtaking vessel always gives way", "The powerboat — power gives way to sail", "Neither; both stand on", "The powerboat, but only in a channel"], a: 0, e: "The overtaking rule beats sail-over-power: any overtaking vessel keeps clear until past and clear." },
{ t: "Right of Way", q: "True or False: A sailboat with sails up but its engine engaged and propelling it is treated as a power-driven vessel under the navigation rules.", opts: ["True", "False"], a: 0, e: "If the engine is driving the boat, power rules apply regardless of the sails." },
{ t: "Right of Way", q: "Two power-driven vessels meet head-on. What should each do?", opts: ["Alter course to starboard and pass port side to port side", "Alter course to port and pass starboard to starboard", "The smaller vessel stops", "Both vessels stop and drift"], a: 0, e: "Head-on, both alter to starboard for a port-to-port pass." },
{ t: "Right of Way", q: "Two power-driven vessels are crossing. Which one gives way?", opts: ["The one that has the other on its own starboard side", "The one that has the other on its own port side", "The one heading north", "The one moving faster"], a: 0, e: "Like road traffic yielding to the right: see a vessel crossing from your starboard side, you give way — and avoid crossing ahead of her." },
{ t: "Right of Way", q: "You hear five short, rapid blasts from an approaching vessel. This means:", opts: ["Danger or doubt — your intentions are unclear or unsafe", "I am altering course to starboard", "I intend to overtake you", "I am operating astern propulsion"], a: 0, e: "Five or more short blasts is the danger/doubt signal." },
{ t: "Right of Way", q: "As the stand-on vessel, your initial obligation is to:", opts: ["Hold your course and speed so the give-way vessel can maneuver predictably", "Turn away immediately", "Stop your boat", "Sound one prolonged blast and tack"], a: 0, e: "Stand-on means being predictable — but you must act yourself if the give-way vessel fails to keep clear." },
{ t: "Right of Way", q: "True or False: In a narrow channel, a sailboat should insist on its right of way over a large ship constrained by its draft.", opts: ["True", "False"], a: 1, e: "Never insist. Deep-draft ships can't leave the channel or stop quickly — sailboats must keep clear and cross channels quickly at right angles." },
{ t: "Right of Way", q: "The navigation rules require every vessel to maintain a proper lookout:", opts: ["By sight and hearing, at all times", "Only in fog or darkness", "Only when other traffic is visible", "Only when racing"], a: 0, e: "Rule 5: a constant lookout by sight and hearing (and all available means) is required at all times." },
// ---- Aids to navigation ----
{ t: "Navigation Aids", q: "Returning from sea toward harbor in US waters, you should keep red buoys:", opts: ["On your starboard side", "On your port side", "Directly ahead", "Either side is fine"], a: 0, e: "'Red, Right, Returning' — red marks to starboard when heading in from sea." },
{ t: "Navigation Aids", q: "A green, flat-topped 'can' buoy will be marked with:", opts: ["Odd numbers", "Even numbers", "Letters only", "A white light"], a: 0, e: "Green cans carry odd numbers; red nuns carry even numbers." },
{ t: "Navigation Aids", q: "A buoy with red and white vertical stripes marks:", opts: ["Safe water, such as mid-channel or a fairway", "A wreck", "A no-boating zone", "The port side of the channel"], a: 0, e: "Red-and-white vertical stripes = safe water all around, often at a channel entrance." },
{ t: "Navigation Aids", q: "A white marker displays an orange circle with '5 MPH' inside. This indicates:", opts: ["A controlled or restricted operating area", "Danger — keep well clear", "Boats are excluded entirely", "An anchorage"], a: 0, e: "On regulatory markers, an orange circle means a controlled area (speed limits, no-wake); a crossed diamond means exclusion; an open diamond means danger." },
{ t: "Navigation Aids", q: "At a channel junction you see a banded mark whose TOP band is red. When returning from sea, the preferred channel is followed by:", opts: ["Treating it like a red mark — keeping it on your starboard side", "Treating it like a green mark — keeping it to port", "Passing as close to it as possible", "Anchoring until traffic clears"], a: 0, e: "The top band's color governs: red on top = treat as red ('red, right, returning') for the preferred channel." },
// ---- Safety ----
{ t: "Safety", q: "A crew member falls overboard. Immediately after shouting 'Crew overboard!', the next action is to:", opts: ["Throw flotation to the victim and assign a spotter", "Start the engine", "Lower all sails", "Radio the Coast Guard before anything else"], a: 0, e: "Flotation buys time and the spotter never takes their eyes off the victim while the boat maneuvers." },
{ t: "Safety", q: "When returning to pick up a person in the water under sail, the final approach should be made on a:", opts: ["Close reach, so the sails can be luffed to control speed", "Run, for maximum speed", "Dead downwind course", "Close-hauled course at full trim"], a: 0, e: "A close reach lets you ease sails to stop beside the victim, or trim to regain way — full speed control." },
{ t: "Safety", q: "True or False: There must be a wearable, USCG-approved PFD on board for every person on the boat.", opts: ["True", "False"], a: 0, e: "One properly sized wearable PFD per person, readily accessible, is a legal minimum." },
{ t: "Safety", q: "A Type IV PFD is:", opts: ["A throwable device, required on boats 16 feet and longer", "A child's life jacket", "An inflatable harness", "A foam cushion used only for seating"], a: 0, e: "Type IV is the throwable (ring or cushion); boats 16'+ must carry one immediately at hand." },
{ t: "Safety", q: "A life-threatening emergency at sea is signaled on VHF channel 16 with the spoken word:", opts: ["'MAYDAY' three times", "'PAN-PAN' once", "'SOS' three times", "'EMERGENCY' twice"], a: 0, e: "MAYDAY ×3, then vessel name, position, nature of emergency, people aboard, and description." },
{ t: "Safety", q: "If caught out sailing when lightning threatens, the crew should:", opts: ["Stay away from the mast, rigging, and other metal", "Hold the shrouds for stability", "Gather at the base of the mast", "Swim ashore"], a: 0, e: "The rig can conduct a strike — keep the crew low, dry, and clear of metal, and head for shelter." },
{ t: "Safety", q: "True or False: When coming alongside a dock, crew should use their hands and feet to fend the boat off.", opts: ["True", "False"], a: 1, e: "Never put body parts between boat and dock — that's what fenders are for." },
// ---- Knots & lines ----
{ t: "Knots", q: "Which knot forms a fixed loop that will not slip yet unties easily even after heavy loading?", opts: ["Bowline", "Clove hitch", "Square knot", "Half hitch"], a: 0, e: "The bowline — 'king of knots' — is used for jib sheets, dock lines, and any secure loop." },
{ t: "Knots", q: "The stopper knot tied in the end of a jib sheet to keep it from escaping its block is a:", opts: ["Figure-eight", "Bowline", "Reef knot", "Rolling hitch"], a: 0, e: "The figure-eight is the standard stopper knot." },
{ t: "Knots", q: "The quickest knot for hanging a fender from a lifeline or rail is a:", opts: ["Clove hitch", "Bowline", "Anchor bend", "Sheet bend"], a: 0, e: "The clove hitch is fast to tie and adjust — back it up with a half hitch if it must hold long." },
{ t: "Knots", q: "Spring lines are rigged when docking primarily to:", opts: ["Stop the boat from surging forward and aft along the dock", "Hold the mast upright", "Lift the boom", "Back up the anchor"], a: 0, e: "Bow and stern lines hold the boat near the dock; springs control fore-and-aft movement." },
{ t: "Knots", q: "True or False: A square (reef) knot is the best choice for joining two lines of different sizes under load.", opts: ["True", "False"], a: 1, e: "A square knot can capsize and slip under load, especially with unequal lines — it's for tying the same line around something, like reef points." },
// ---- Weather ----
{ t: "Weather", q: "Which combination of signs most suggests an approaching thunderstorm?", opts: ["Tall dark clouds building, a sudden wind shift, and a falling barometer", "Steady wind, clear skies, and rising pressure", "Morning fog burning off", "Light and variable wind at dusk"], a: 0, e: "Towering cumulonimbus, abrupt shifts, and dropping pressure mean seek shelter early." },
{ t: "Weather", q: "A Small Craft Advisory means:", opts: ["Wind and sea conditions are potentially hazardous for small boats", "All recreational boating is prohibited", "A hurricane is imminent", "Only powerboats may leave harbor"], a: 0, e: "Roughly 22–33 knots of sustained wind (varies by region) — inexperienced crews should stay in port." },
{ t: "Weather", q: "True or False: A dark patch of rippled water moving toward your boat usually signals an approaching puff of stronger wind.", opts: ["True", "False"], a: 0, e: "Gusts darken and ripple the surface — be ready to ease the main, feather up, or hike as it arrives." },
// ---- Terminology & boat parts (expansion) ----
{ t: "Terminology", q: "An object located 'abeam' of your boat is:", opts: ["Off the side, at roughly a right angle to the centerline", "Directly ahead of the bow", "Directly behind the stern", "At the top of the mast"], a: 0, e: "Abeam is 90° off the centerline; ahead is in front, astern is behind." },
{ t: "Terminology", q: "The fitting that connects the forward end of the boom to the mast is the:", opts: ["Gooseneck", "Chainplate", "Fairlead", "Tang"], a: 0, e: "The gooseneck lets the boom pivot both sideways and up-and-down against the mast." },
{ t: "Terminology", q: "Spreaders on a mast serve to:", opts: ["Push the shrouds outboard so they support the mast at a better angle", "Hold the boom level", "Support the lifelines", "Anchor the forestay"], a: 0, e: "By widening the shroud angle, spreaders greatly increase lateral support for the mast." },
{ t: "Terminology", q: "True or False: Freeboard is the part of the hull below the waterline.", opts: ["True", "False"], a: 1, e: "Freeboard is the hull ABOVE the waterline, from water to deck. Below the waterline relates to draft." },
{ t: "Terminology", q: "The person actually steering the boat at any given moment is called the:", opts: ["Helmsman", "Skipper", "Bosun", "Navigator"], a: 0, e: "The helmsman steers; the skipper is the person in command (who may or may not be steering)." },
{ t: "Terminology", q: "True or False: Stanchions are the upright posts that support the lifelines around the deck.", opts: ["True", "False"], a: 0, e: "Lifelines run through stanchions, anchored at the bow and stern pulpits." },
// ---- Sail trim & rigging (expansion) ----
{ t: "Sail Trim", q: "The traveler allows you to adjust:", opts: ["The boom's side-to-side angle without changing mainsheet tension", "The luff tension of the jib", "The mast rake", "The height of the boom when the sail is down"], a: 0, e: "Moving the traveler car changes the mainsail's angle of attack independently of leech tension." },
{ t: "Sail Trim", q: "A roller furling system lets the crew:", opts: ["Deploy or stow the jib from the cockpit by rolling it around the forestay", "Reef the mainsail from the masthead", "Raise the mainsail without a halyard", "Adjust the backstay under load"], a: 0, e: "The jib rolls around a rotating foil on the forestay — no need to go forward on deck." },
{ t: "Sail Trim", q: "True or False: A genoa is a headsail large enough that its clew overlaps the mast.", opts: ["True", "False"], a: 0, e: "Genoas overlap the mast and are sized by foretriangle percentage (e.g., 150%); a working jib does not overlap." },
{ t: "Sail Trim", q: "Which control tensions the LUFF of the mainsail?", opts: ["The cunningham (downhaul)", "The outhaul", "The traveler", "The jib sheet"], a: 0, e: "The cunningham pulls down near the tack to tension the luff; the outhaul tensions the foot." },
{ t: "Sail Trim", q: "Your jib telltales on both sides are streaming straight aft. The sail is:", opts: ["Trimmed correctly for the course", "Over-trimmed and stalled", "Luffing badly", "About to backwind"], a: 0, e: "Both telltales streaming aft indicates smooth airflow over both sides — proper trim." },
{ t: "Sail Trim", q: "Before lowering the mainsail, the crew should first take up on the:", opts: ["Topping lift, so the boom doesn't drop into the cockpit", "Outhaul", "Jib halyard", "Traveler"], a: 0, e: "The topping lift supports the boom once the sail no longer holds it up." },
// ---- Points of sail & maneuvers (expansion) ----
{ t: "Points of Sail", q: "For most boats, the fastest and most comfortable point of sail is a:", opts: ["Beam reach", "Run", "Close-hauled beat", "Dead run by the lee"], a: 0, e: "With wind on the beam the sails work efficiently and the boat is well balanced." },
{ t: "Points of Sail", q: "'Heading up' means turning the bow toward the wind. As you head up, the sails must be:", opts: ["Trimmed in", "Eased out", "Lowered", "Backed to windward"], a: 0, e: "Closer to the wind = tighter trim. Bearing away = ease out." },
{ t: "Points of Sail", q: "As you bear away from close-hauled to a broad reach, you should:", opts: ["Ease the sails progressively as you turn", "Trim the sails in hard", "Keep trim unchanged", "Drop the jib"], a: 0, e: "Sail trim follows the turn: away from the wind, ease; toward the wind, trim." },
{ t: "Points of Sail", q: "True or False: A sailboat can sail in a single straight line from a point directly downwind of its destination to that destination.", opts: ["True", "False"], a: 1, e: "The destination lies in the no-sail zone — the boat must beat upwind in a zigzag of tacks." },
{ t: "Points of Sail", q: "Sailing 'wing-on-wing' means:", opts: ["Running downwind with the jib and mainsail set on opposite sides", "Flying two jibs at once", "Sailing close-hauled with both sails backed", "Heeling with the rail in the water"], a: 0, e: "On a run, the jib is carried on the opposite side from the main to catch clean air." },
{ t: "Points of Sail", q: "The boat is overpowered and constantly rounding up into the wind despite heavy tiller pressure. The best responses include:", opts: ["Easing the mainsheet, flattening sail shape, or reefing", "Trimming the main in harder", "Moving crew weight to leeward", "Bearing away sharply with more sail up"], a: 0, e: "Excessive weather helm means too much power in the main — depower it or reduce sail." },
{ t: "Points of Sail", q: "As a boat accelerates, its apparent wind:", opts: ["Moves forward and increases in strength", "Moves aft and decreases", "Stays exactly the same as true wind", "Disappears on a beam reach"], a: 0, e: "Boat speed adds a headwind component, shifting the felt wind forward and strengthening it." },
{ t: "Points of Sail", q: "True or False: During a tack, the crew releases the loaded jib sheet as the bow passes through the wind and trims the new leeward sheet.", opts: ["True", "False"], a: 0, e: "Release the old working sheet as the jib luffs crossing the wind, then trim on the new side." },
// ---- Right of way & rules (expansion) ----
{ t: "Right of Way", q: "You are considered an overtaking vessel when approaching another boat:", opts: ["From more than 22.5° abaft her beam", "From anywhere ahead of her beam", "Only from directly astern", "Whenever you are moving faster"], a: 0, e: "More than 22.5° abaft the beam — where you'd see only her sternlight at night — makes you overtaking, and you stay give-way until past and clear." },
{ t: "Right of Way", q: "A sailboat under sail approaches a commercial vessel actively engaged in fishing with nets deployed. Who keeps clear?", opts: ["The sailboat", "The fishing vessel", "Whichever is on port tack", "Neither — both stand on"], a: 0, e: "Vessels engaged in fishing with gear deployed rank above sailboats in the rules pecking order." },
{ t: "Right of Way", q: "One prolonged horn blast (4–6 seconds) commonly signals:", opts: ["A vessel leaving a dock or approaching a blind bend", "Immediate danger of collision", "I am turning to port", "Abandon ship"], a: 0, e: "One prolonged blast announces your presence when visibility of traffic is limited — leaving a berth or rounding a blind point." },
{ t: "Right of Way", q: "True or False: Being the stand-on vessel relieves you of any duty to avoid a collision.", opts: ["True", "False"], a: 1, e: "Rule 2: right of way is never a right to collide. The stand-on vessel must act when it's clear the give-way vessel isn't keeping clear." },
{ t: "Right of Way", q: "At night you see a red sidelight, a green sidelight, and a white light above them, all at once, ahead of you. You are looking at:", opts: ["A power-driven vessel coming toward you nearly head-on", "A sailboat crossing left to right", "A vessel at anchor", "A vessel moving away from you"], a: 0, e: "Both sidelights plus a masthead (steaming) light visible together means a power vessel pointed at you — act early." },
{ t: "Right of Way", q: "Under sail alone at night, your boat must display:", opts: ["Red and green sidelights and a white sternlight (no white masthead light)", "A white masthead light and sidelights", "An all-round white light only", "No lights if under 30 feet"], a: 0, e: "The white masthead (steaming) light is only for power-driven operation. Under 20m, the sails-only lights may be combined in a masthead tricolor." },
{ t: "Right of Way", q: "You are the leeward boat of two sailboats on the same tack, converging. You should:", opts: ["Hold your course and speed as the stand-on vessel", "Tack away immediately", "Turn head to wind", "Pass astern of the windward boat"], a: 0, e: "The leeward boat stands on; the windward boat keeps clear. Stay predictable, but be ready to act if she doesn't." },
{ t: "Right of Way", q: "True or False: A sailboat under sail always has right of way over every power-driven vessel.", opts: ["True", "False"], a: 1, e: "Not when the sailboat is overtaking, and not over vessels fishing, constrained by draft, restricted in maneuverability, or not under command." },
// ---- Aids to navigation (expansion) ----
{ t: "Navigation Aids", q: "As you proceed from sea toward a harbor, the numbers on channel buoys:", opts: ["Increase", "Decrease", "Stay the same", "Alternate odd and even on the same side"], a: 0, e: "Numbering starts seaward and increases as you head in — another way to confirm direction of buoyage." },
{ t: "Navigation Aids", q: "A solid yellow buoy marks:", opts: ["A special-purpose area such as an anchorage, cable area, or race course", "The starboard side of the channel", "Safe water mid-channel", "A sunken wreck"], a: 0, e: "Yellow = special purpose; check the chart for what the area actually is." },
{ t: "Navigation Aids", q: "A white regulatory marker showing an open orange diamond means:", opts: ["Danger — such as a rock, shoal, or other hazard", "Controlled area", "Boats keep out", "Information"], a: 0, e: "Open diamond = danger. Diamond with a cross = excluded area. Circle = controlled area. Square = information." },
{ t: "Navigation Aids", q: "A white regulatory marker showing an orange diamond with a cross inside means:", opts: ["Vessels are excluded from the area", "Speed limit ahead", "Safe swimming area for boats", "Channel junction"], a: 0, e: "The crossed diamond excludes boats entirely — swim zones, dams, spillways." },
// ---- Safety (expansion) ----
{ t: "Safety", q: "Legal carriage requirements: wearable PFDs must be ______, and the throwable Type IV must be ______.", opts: ["Readily accessible; immediately available", "Locked below; in a cockpit locker", "Worn at all times; stowed anywhere", "One per boat; one per person"], a: 0, e: "Wearables: readily accessible (not buried or still in wrappers). Throwable: immediately at hand to toss." },
{ t: "Safety", q: "A crew member recovered from cold water is shivering violently. You should:", opts: ["Get them dry, sheltered, and warm them gradually", "Give them alcohol to warm up", "Have them exercise vigorously", "Immerse them in the hottest water available"], a: 0, e: "Treat hypothermia with dry clothes, shelter, and gradual rewarming — no alcohol, no sudden heat." },
{ t: "Safety", q: "When using a fire extinguisher, aim the discharge:", opts: ["At the base of the flames with a sweeping motion", "At the top of the flames", "Above the fire to smother it", "Into the wind"], a: 0, e: "Attack the burning material at the base, sweeping side to side." },
{ t: "Safety", q: "True or False: The skipper is responsible for the safety of the boat and everyone aboard.", opts: ["True", "False"], a: 0, e: "Command carries responsibility: seaworthiness, equipment, weather judgment, and crew safety rest with the skipper." },
{ t: "Safety", q: "The federal blood-alcohol limit for operating a recreational vessel is:", opts: ["0.08%", "0.15%", "0.05%", "There is no limit on the water"], a: 0, e: "0.08% federally (states may be stricter) — and impairment can be cited regardless of BAC." },
{ t: "Safety", q: "Before a daysail, a float plan should be:", opts: ["Left with a responsible person ashore", "Posted on the boat's bulletin board", "Filed with the harbormaster only if racing", "Memorized by the skipper"], a: 0, e: "Someone ashore needs your route, crew, boat description, and return time so help can be sent if you're overdue." },
{ t: "Safety", q: "During any jibe, crew in the cockpit should:", opts: ["Keep their heads below boom level and clear of the mainsheet", "Stand up to watch the sail", "Hold the boom steady by hand", "Move to the foredeck"], a: 0, e: "The boom and mainsheet sweep the cockpit fast in a jibe — stay low and clear." },
// ---- Seamanship: docking, mooring & anchoring ----
{ t: "Seamanship", q: "The preferred way to approach a mooring ball under sail is:", opts: ["From leeward, rounding up into the wind to coast to a stop at the ball", "From windward at full speed", "On a run, dropping the sails at the last moment", "Sideways, drifting down onto it"], a: 0, e: "Approach from downwind and luff up so the boat stops with the bow at the mooring." },
{ t: "Seamanship", q: "For secure overnight anchoring, the recommended scope (rode length to depth-plus-freeboard) is about:", opts: ["7:1", "2:1", "1:1", "20:1"], a: 0, e: "5:1 is a working minimum; 7:1 gives the rode a horizontal pull that helps the anchor dig in and hold." },
{ t: "Seamanship", q: "The correct way to deploy an anchor is to:", opts: ["Lower it under control while the boat falls back downwind, then snub to set it", "Throw it as far from the boat as possible", "Drop it while motoring forward at speed", "Drop anchor and rode in one pile on the bottom"], a: 0, e: "Head up, stop, lower (never throw), pay out rode as you drift back, then snub to dig it in — and check bearings for drag." },
{ t: "Seamanship", q: "Fenders should be positioned:", opts: ["Between the hull and the dock at the contact points", "On the dock itself", "At the masthead", "Trailing astern"], a: 0, e: "Fenders cushion the hull where it would touch the dock or a rafted boat — adjust them for each berth." },
{ t: "Seamanship", q: "True or False: 'Steerageway' means having enough speed through the water for the rudder to steer the boat.", opts: ["True", "False"], a: 0, e: "No water flow over the rudder, no steering — plan maneuvers so you keep steerageway until you intend to stop." },
{ t: "Seamanship", q: "Before casting off any dock lines, the skipper should first:", opts: ["Assess wind and current direction and plan the departure", "Hoist both sails fully", "Release all lines at once", "Push the bow out with a boat hook"], a: 0, e: "Wind and current dictate which lines hold the boat, which to release last, and whether to spring off — plan before releasing." },
// ---- Knots & lines (expansion) ----
{ t: "Knots", q: "A proper cleat hitch is finished with:", opts: ["A locking hitch (a flipped final loop) over the horn", "A bowline through the base", "Ten figure-eight turns", "A double overhand knot"], a: 0, e: "Full turn around the base, figure-eights over the horns, then one locking hitch — neat and jam-free." },
{ t: "Knots", q: "To secure a line to a ring or post while it is under steady load, the best choice is:", opts: ["A round turn and two half hitches", "A square knot", "A slipped overhand", "A clove hitch alone"], a: 0, e: "The round turn takes the strain while you tie the half hitches — secure and controllable under load." },
{ t: "Knots", q: "True or False: A clove hitch never slips, so it needs no backup for long-term use.", opts: ["True", "False"], a: 1, e: "Clove hitches can work loose or slip under varying load — back one up with half hitches for anything that matters." },
// ---- Weather (expansion) ----
{ t: "Weather", q: "A 'north wind' is a wind that:", opts: ["Blows FROM the north", "Blows TOWARD the north", "Circles a high-pressure system", "Only occurs at night"], a: 0, e: "Winds are named for the direction they come FROM — a north wind blows from north to south." },
{ t: "Weather", q: "Sailing upwind, a wind shift that forces you to bear away from your course is called a:", opts: ["Header", "Lift", "Veer", "Gust"], a: 0, e: "A header knocks your bow down; on a beat, a big header is often the cue to tack (it's a lift on the other tack)." },
{ t: "Weather", q: "True or False: A sudden temperature drop combined with a marked wind shift often signals a passing front.", opts: ["True", "False"], a: 0, e: "Fronts commonly bring abrupt shifts, temperature changes, and gusty conditions — be ready to reef or head in." },
// ---- Terminology & boat parts (round 3) ----
{ t: "Terminology", q: "The bilge is:", opts: ["The lowest interior part of the hull, where any water aboard collects", "The forward storage locker", "The top edge of the transom", "The joint between deck and hull"], a: 0, e: "Water finds its way to the bilge — which is why boats carry bilge pumps and you check it before departing." },
{ t: "Terminology", q: "On a boat, a 'block' is:", opts: ["A pulley through which a line runs", "A wooden chock for the anchor", "A type of cleat", "The base of the mast"], a: 0, e: "Blocks change a line's direction and can be combined into tackles for mechanical advantage." },
{ t: "Terminology", q: "The backstay runs from:", opts: ["The masthead down to the stern", "The bow up to the masthead", "The spreaders to the rail", "The boom to the cockpit"], a: 0, e: "The backstay supports the mast from aft; the forestay balances it from forward." },
{ t: "Terminology", q: "True or False: The jib sheets are attached to the clew of the jib.", opts: ["True", "False"], a: 0, e: "Port and starboard jib sheets tie (usually with bowlines) to the clew — the aft lower corner." },
{ t: "Terminology", q: "'Astern' refers to:", opts: ["The area behind the boat, or moving backward", "The area in front of the bow", "The windward rail", "Below decks"], a: 0, e: "Ahead is forward of the bow; astern is behind the stern — 'making sternway' means moving backward." },
// ---- Sail trim (round 3) ----
{ t: "Sail Trim", q: "Sailing on a run, the mainsail should be:", opts: ["Eased well out, roughly perpendicular to the wind", "Trimmed to the centerline", "Halfway in, as on a beam reach", "Lowered completely"], a: 0, e: "Downwind the sail works by drag — let it out square to the wind, watching for an accidental jibe." },
{ t: "Sail Trim", q: "True or False: Increasing outhaul tension flattens the lower mainsail, which helps depower the boat in stronger wind.", opts: ["True", "False"], a: 0, e: "Flatter sails generate less power and less heel — tension the outhaul (and cunningham) as the breeze builds." },
{ t: "Sail Trim", q: "You are 'pinching' (sailing too close to the wind). The usual signs are:", opts: ["The jib luff bubbling and the boat slowing down", "Excessive heel and weather helm", "The leeward telltale stalling", "The boom lifting"], a: 0, e: "Pinching kills speed: the luff starts to collapse and the boat goes flat and slow — bear away slightly." },
{ t: "Sail Trim", q: "To ease a loaded jib sheet from a winch safely:", opts: ["Keep the wraps on the drum and ease with your palm open, controlling the line", "Pull all the wraps off at once", "Grab the line on the sail side of the winch", "Cut the line free"], a: 0, e: "The wraps carry the load; ease around the drum with a flat hand so fingers can't be dragged in." },
// ---- Points of Sail (round 3) ----
{ t: "Points of Sail", q: "You are close-hauled on port tack and complete a tack. You are now:", opts: ["Close-hauled on starboard tack", "On a beam reach, port tack", "Running on starboard tack", "In irons"], a: 0, e: "A tack swaps the windward side but keeps you close-hauled — the classic upwind zigzag." },
{ t: "Points of Sail", q: "To change from a beam reach to a run you would:", opts: ["Bear away and ease the sails out as you turn", "Head up and trim in", "Tack immediately", "Backwind the jib"], a: 0, e: "Turning away from the wind always pairs with easing sail." },
{ t: "Points of Sail", q: "True or False: A boat heels more on a run than on any other point of sail.", opts: ["True", "False"], a: 1, e: "Heel is least on a run since the wind pushes from behind — the risk downwind is the accidental jibe, not heeling." },
{ t: "Points of Sail", q: "As a boat turns from a run all the way up to close-hauled, the crew must:", opts: ["Progressively trim the sails in as the boat heads up", "Progressively ease the sails", "Keep the sails untouched", "Lower the jib"], a: 0, e: "Trim follows the turn: heading up = sheeting in, step by step through each point of sail." },
{ t: "Points of Sail", q: "The helm announces 'Hard-a-lee!' What is physically happening?", opts: ["The tiller is being pushed to leeward to turn the bow through the wind", "The boom is being winched to windward", "The anchor is being lowered", "The jib is being furled"], a: 0, e: "Pushing the tiller to leeward turns the bow to windward, starting the tack." },
// ---- Right of Way (round 3) ----
{ t: "Right of Way", q: "At night you see a single white light ahead and no colored sidelights. It could be:", opts: ["An anchored vessel, or the stern of a vessel you are overtaking", "A power vessel coming straight at you", "A sailboat crossing your bow", "A vessel aground showing distress"], a: 0, e: "An all-round white light marks a vessel at anchor; a sternlight alone means you're approaching from well behind — either way, keep clear." },
{ t: "Right of Way", q: "You are sailing on port tack at night and cannot tell whether a windward sailboat is on port or starboard tack. You should:", opts: ["Assume you must keep clear and stay out of her way", "Hold your course — she must avoid you", "Shine a spotlight at her helm", "Sound five short blasts and stand on"], a: 0, e: "The rules say a port-tack boat that cannot determine a windward boat's tack must keep clear." },
{ t: "Right of Way", q: "True or False: In fog or restricted visibility you should slow to a safe speed and make the required sound signals.", opts: ["True", "False"], a: 0, e: "Safe speed, sharp lookout by ear as well as eye, and proper fog signals are required in restricted visibility." },
{ t: "Right of Way", q: "When a small sailboat must cross a busy shipping lane or traffic separation scheme, it should:", opts: ["Cross promptly, on a heading as nearly as practicable at right angles to the lane", "Follow the lane against traffic", "Cross diagonally to minimize distance", "Anchor at the lane's edge and wait for nightfall"], a: 0, e: "A right-angle crossing minimizes time in the lane and shows your intent clearly to ship traffic." },
{ t: "Right of Way", q: "When required to give way, your course or speed change should be:", opts: ["Early, substantial, and obvious to the other vessel", "As small as possible", "Made only at the last moment", "Signaled but not actually made"], a: 0, e: "Small, late alterations leave the other vessel guessing. Make your intentions unmistakable." },
{ t: "Right of Way", q: "A boat motorsailing (sails up, engine engaged) converges with a boat under sail alone. Absent other factors, who gives way?", opts: ["The motorsailing boat — she is a power-driven vessel", "The boat under sail alone", "Whichever is on port tack", "The larger vessel"], a: 0, e: "Engine in gear makes her power-driven regardless of sails, so she gives way to the vessel under sail (unless overtaking, etc.)." },
// ---- Navigation Aids (round 3) ----
{ t: "Navigation Aids", q: "A red triangular daybeacon on a piling should be treated:", opts: ["Like a red nun — keep it to starboard when returning from sea", "Like a green can — keep it to port when returning", "As a safe-water mark", "As a special-purpose mark"], a: 0, e: "Fixed daybeacons follow the same lateral system: red triangles = red side; green squares = green side." },
{ t: "Navigation Aids", q: "If a red lateral buoy is lighted, its light will be:", opts: ["Red", "White", "Green", "Yellow"], a: 0, e: "Lateral marks show lights matching their color — red marks red, green marks green." },
{ t: "Navigation Aids", q: "True or False: A mooring buoy is white with a blue horizontal band.", opts: ["True", "False"], a: 0, e: "White with a blue band is the standard US mooring buoy — the only buoy you may legally tie up to." },
// ---- Safety (round 3) ----
{ t: "Safety", q: "For a coastal daysail, visual distress signals must be:", opts: ["USCG-approved and current (not expired), suitable for day and night use", "Homemade flags", "Optional if you carry a phone", "Only required on powerboats"], a: 0, e: "Carry approved VDS (e.g., flares within expiry, or approved non-pyrotechnic equivalents) for day and night." },
{ t: "Safety", q: "The radio call 'PAN-PAN' (repeated three times) signals:", opts: ["An urgent situation that is not yet immediately life-threatening", "A routine radio check", "Abandoning ship", "A securité weather notice"], a: 0, e: "PAN-PAN is urgency (e.g., engine failure drifting toward shoal); MAYDAY is reserved for grave and imminent danger." },
{ t: "Safety", q: "The best PFD for a sailor is ultimately:", opts: ["One that fits properly and will actually be worn", "The most expensive offshore model", "Whichever is stowed deepest and driest", "Any adult universal size"], a: 0, e: "A PFD only works if it's on your body and fits — comfort and fit drive real-world use." },
{ t: "Safety", q: "True or False: Under federal rules, children under 13 must wear a PFD while a recreational boat is under way, unless below decks or in an enclosed cabin.", opts: ["True", "False"], a: 0, e: "The federal child PFD rule applies under way (some states set different ages — check locally)." },
{ t: "Safety", q: "Before starting an inboard gasoline engine, you should:", opts: ["Run the blower for about four minutes and sniff the compartment for fuel vapors", "Open the throttle fully", "Disconnect the battery", "Pump the bilge dry first"], a: 0, e: "Gasoline vapors collect in enclosed spaces and can explode — ventilate and check before every start." },
{ t: "Safety", q: "If your boat capsizes or becomes disabled and you cannot restore it, the crew should:", opts: ["Stay with the boat — it floats, it's visible, and rescuers find boats before swimmers", "Swim for shore immediately", "Split up to find help in different directions", "Dive to recover gear"], a: 0, e: "The hull is your biggest flotation and search target. Leave it only as a last resort." },
// ---- Knots (round 3) ----
{ t: "Knots", q: "To join two lines of different diameters, the preferred knot is a:", opts: ["Sheet bend", "Square knot", "Clove hitch", "Figure-eight"], a: 0, e: "The sheet bend (doubled for extra security) joins unequal lines; a square knot can capsize and slip." },
{ t: "Knots", q: "True or False: Halyard tails and other lines should be coiled and secured so they can run free without tangling when needed.", opts: ["True", "False"], a: 0, e: "A fouled coil can jam at exactly the wrong moment — coil, secure, and hang lines ready to run." },
{ t: "Knots", q: "While sailing with the jib drawing, which jib sheet is under load?", opts: ["The leeward (working) sheet", "The windward (lazy) sheet", "Both equally", "Neither — the halyard takes the load"], a: 0, e: "The working sheet is on the leeward side, where the sail is trimmed; the windward sheet lies lazy." },
// ---- Weather (round 3) ----
{ t: "Weather", q: "Continuous marine weather forecasts are broadcast on:", opts: ["NOAA weather channels on your VHF radio", "Channel 16 every hour", "AM 530 only", "Flag hoists at the yacht club"], a: 0, e: "VHF weather channels (WX1–WX7) carry continuous NOAA marine forecasts — check before and during your sail." },
{ t: "Weather", q: "A typical afternoon sea breeze blows:", opts: ["From the cooler water toward the warmer land", "From the land toward the water", "Parallel to the shoreline in all cases", "Straight down from high pressure"], a: 0, e: "Sun-heated land draws air in from over the water — a daily onshore breeze that often builds through the afternoon." },
{ t: "Weather", q: "True or False: A steadily rising barometer generally indicates improving weather.", opts: ["True", "False"], a: 0, e: "Rising pressure usually means fair weather building in; a falling glass warns of deteriorating conditions." },
// ---- Seamanship (round 3) ----
{ t: "Seamanship", q: "When docking, the general rule is to approach:", opts: ["Slowly, heading into the wind or current — whichever is stronger", "Quickly, to maintain steerage", "Downwind for a softer landing", "Perpendicular to the dock at speed"], a: 0, e: "Wind or current on the bow acts as a brake and keeps the approach controlled." },
{ t: "Seamanship", q: "After anchoring, the best way to confirm the anchor is holding is to:", opts: ["Take bearings or line up ranges on fixed shore objects and re-check them", "Pull the rode by hand", "Dive on the anchor immediately", "Motor forward over the anchor"], a: 0, e: "If your bearings or transits change over time, you're dragging — re-anchor with more scope." },
{ t: "Seamanship", q: "A proper pre-departure crew briefing includes:", opts: ["PFD locations, boom hazards, and each crew member's job", "Only the day's lunch plan", "Engine maintenance history", "The skipper's sailing résumé"], a: 0, e: "Everyone should know where safety gear lives, when the boom crosses, and what their role is before the lines come off." },
{ t: "Seamanship", q: "True or False: Approach a dock no faster than the speed at which you are willing to hit it.", opts: ["True", "False"], a: 0, e: "The old rule holds: boats have no brakes, so momentum is your liability near a dock." },
{ t: "Seamanship", q: "The wind is pinning your boat against the dock. The most effective departure technique is usually to:", opts: ["Spring off — pivot the boat on a spring line so the bow or stern angles away from the dock", "Push off amidships and hope", "Hoist the mainsail at the dock", "Reverse hard with no lines rigged"], a: 0, e: "Powering against a spring line levers one end of the boat out into clear water despite the onshore wind." },
// ---- Terminology & boat parts (round 4) ----
{ t: "Terminology", q: "Chainplates are:", opts: ["Strong metal fittings on the hull that anchor the shrouds and stays", "The links of the anchor chain", "Plates protecting the bow from anchor chafe", "Backing plates for winches"], a: 0, e: "The standing rigging's enormous loads transfer into the hull through the chainplates." },
{ t: "Terminology", q: "'Amidships' refers to:", opts: ["The middle portion of the boat", "The area behind the helm", "The top of the mast", "The forward cabin"], a: 0, e: "Amidships is the boat's middle, fore-and-aft and side-to-side — as in 'helm amidships' (tiller centered)." },
{ t: "Terminology", q: "True or False: A 'painter' is the line attached to the bow of a dinghy, used for towing or tying it up.", opts: ["True", "False"], a: 0, e: "Every dinghy needs a painter — secure it to a strong point and keep it out of the propeller." },
{ t: "Terminology", q: "Aboard a boat, 'the head' most commonly refers to:", opts: ["The marine toilet or its compartment", "The galley stove", "The bow anchor", "The chart table"], a: 0, e: "The head is the toilet; confusingly, 'head' is also the top corner of a sail — context tells you which." },
{ t: "Terminology", q: "A 'berth' can mean:", opts: ["Either a place where a boat is docked or a bed aboard the boat", "Only the boat's registration slip", "The distance between two boats", "The width of the companionway"], a: 0, e: "You sleep in a berth and you park the boat in a berth — and 'give a wide berth' means keep well clear." },
{ t: "Terminology", q: "True or False: The 'tack' of a sail and being 'on port tack' refer to the same thing.", opts: ["True", "False"], a: 1, e: "The tack (noun) is a sail's forward lower corner; a boat's tack is which side the wind comes over. Same word, two meanings." },
// ---- Sail trim (round 4) ----
{ t: "Sail Trim", q: "The 'draft' of a sail refers to:", opts: ["The depth and position of its curved shape", "The sail's weight", "Its total area", "The length of its foot"], a: 0, e: "Draft is the sail's fullness. Deeper draft = more power; flatter = less power and less heel. (Different from hull draft.)" },
{ t: "Sail Trim", q: "In light air, sails should generally be trimmed:", opts: ["Fuller, with slightly eased tension to keep airflow attached", "Board-flat with maximum tension", "All the way in on every course", "With the boom vang cranked hard"], a: 0, e: "Light wind wants gentle, full shapes — ease the outhaul, halyard, and sheets slightly." },
{ t: "Sail Trim", q: "True or False: As the wind increases, flattening the sails helps keep the boat on its feet.", opts: ["True", "False"], a: 0, e: "Tension outhaul, cunningham, and halyards to flatten sails, reducing power and heel as the breeze builds." },
{ t: "Sail Trim", q: "A strong gust hits while you are close-hauled and the boat heels hard. The quickest way to depower is to:", opts: ["Ease the mainsheet and/or feather up toward the wind", "Trim the jib in harder", "Bear away onto a beam reach", "Send crew to leeward"], a: 0, e: "Dumping air from the main (or briefly luffing up) instantly reduces heeling force." },
{ t: "Sail Trim", q: "True or False: In gusty conditions, the mainsheet should be cleated firmly and left alone.", opts: ["True", "False"], a: 1, e: "Keep the mainsheet in hand (or ready to release) so you can ease instantly when a puff hits." },
{ t: "Sail Trim", q: "The mainsheet's job is to:", opts: ["Trim the mainsail in and out, controlling its angle to the wind", "Hoist the mainsail", "Hold the boom up when the sail is down", "Tension the luff"], a: 0, e: "Sheets trim; halyards hoist. The mainsheet is your primary power control for the main." },
// ---- Points of Sail (round 4) ----
{ t: "Points of Sail", q: "Which point of sail demands the most vigilance against an accidental jibe?", opts: ["A run, especially when sailing by the lee", "Close-hauled", "A close reach", "A beam reach"], a: 0, e: "Dead downwind, a small course change or wind shift can throw the boom across — steer attentively and consider a preventer." },
{ t: "Points of Sail", q: "Sailing close-hauled, you enter a lull and the boat slows noticeably. To restore speed you should:", opts: ["Bear away a few degrees and ease trim slightly to power up", "Pinch even closer to the wind", "Trim everything to the centerline", "Tack immediately"], a: 0, e: "In light spots, foot off — a slightly lower, faster course rebuilds speed better than pinching." },
{ t: "Points of Sail", q: "True or False: The mainsail stays on the same side of the boat throughout a tack.", opts: ["True", "False"], a: 1, e: "As the bow passes through the wind, the boom and mainsail swing to the new leeward side." },
{ t: "Points of Sail", q: "When running wing-on-wing, a whisker pole is used to:", opts: ["Hold the jib out on the side opposite the mainsail", "Support the boom", "Extend the masthead fly", "Push off the dock"], a: 0, e: "The pole keeps the jib spread and drawing in clean air on the windward side." },
{ t: "Points of Sail", q: "How do you know your tack is complete and you can steady the helm?", opts: ["The sails fill on the new side with the boat about 45° off the wind", "The boat points dead into the wind", "The jib is flogging on the centerline", "The boom touches the shrouds"], a: 0, e: "Stop the turn once the sails draw on the new close-hauled course — over-turning wastes distance." },
{ t: "Points of Sail", q: "True or False: More heel generally means more speed.", opts: ["True", "False"], a: 1, e: "Excess heel increases leeway and weather helm and spills wind — flatter is usually faster." },
// ---- Right of Way (round 4) ----
{ t: "Right of Way", q: "Which of these is an example of a vessel 'restricted in her ability to maneuver'?", opts: ["A dredge working a channel, or a vessel laying cable", "A sailboat racing", "A powerboat trolling slowly", "Any anchored vessel"], a: 0, e: "Work like dredging, cable-laying, or towing that limits maneuvering earns priority — even sailboats keep clear." },
{ t: "Right of Way", q: "On inland waters, one short horn blast from a power-driven vessel signals:", opts: ["'I intend to pass you on my port side' (typically altering to starboard)", "Danger — stop immediately", "'I am anchoring'", "'I have lost steering'"], a: 0, e: "One short = port-to-port intentions; the other vessel answers with one short to agree." },
{ t: "Right of Way", q: "On inland waters, two short horn blasts signal:", opts: ["'I intend to pass you on my starboard side'", "'I am going astern'", "Fog ahead", "'Follow me through the channel'"], a: 0, e: "Two short = starboard-to-starboard passing intentions, answered with two short to agree." },
{ t: "Right of Way", q: "Three short horn blasts mean a vessel is:", opts: ["Operating astern propulsion (backing)", "On fire", "Overtaking to starboard", "Constrained by draft"], a: 0, e: "Three short blasts = engines running astern — common around docks, ferries, and tight quarters." },
{ t: "Right of Way", q: "During daylight, a vessel at anchor should display:", opts: ["A black ball shape forward, where it can best be seen", "A yellow flag at the stern", "Crossed oars on the bow", "No special signal"], a: 0, e: "The anchor ball tells approaching traffic you're not under way (an all-round white light does the job at night)." },
{ t: "Right of Way", q: "A personal watercraft is running erratically near your sailboat. Your best course of action is to:", opts: ["Hold a steady, predictable course and be ready to act to avoid a collision", "Match its maneuvers", "Turn directly toward it to assert right of way", "Stop dead in the water immediately"], a: 0, e: "Predictability helps the other operator avoid you — and Rule 2 always requires you to prevent a collision if you can." },
{ t: "Right of Way", q: "True or False: Vessels under oars or paddles (kayaks, rowboats, paddleboards) should be given generous room by sailboats.", opts: ["True", "False"], a: 0, e: "They're slow, low, and hard to see, with limited maneuverability — good seamanship (and the rules' spirit) says keep well clear." },
// ---- Navigation Aids (round 4) ----
{ t: "Navigation Aids", q: "A green square daybeacon on a piling marks:", opts: ["The green side of the channel — keep it to port when returning from sea", "The red side of the channel", "Safe water all around", "A special-purpose area"], a: 0, e: "Green squares work like green cans; red triangles work like red nuns." },
{ t: "Navigation Aids", q: "The light on a safe-water (mid-channel) mark flashes:", opts: ["White, in the Morse code letter 'A' (short-long)", "Red, quick-flashing", "Green, occulting", "Yellow, fixed"], a: 0, e: "White Morse 'A' identifies safe water at night — often the first mark you find approaching a harbor." },
{ t: "Navigation Aids", q: "True or False: It is fine to tie your boat to a channel buoy for a short lunch stop.", opts: ["True", "False"], a: 1, e: "Tying to any aid to navigation is illegal — it can drag the buoy off station and endanger others. Mooring buoys (white with blue band) are the exception, where permitted." },
{ t: "Navigation Aids", q: "Depths printed on a US nautical chart are measured from:", opts: ["The chart datum — mean lower low water", "The water level at high tide", "Sea level on the day the chart was printed", "The average of high and low tide"], a: 0, e: "Charted depths use a conservative low-water reference, so actual depth is usually the charted number or more — but not always." },
// ---- Safety (round 4) ----
{ t: "Safety", q: "A PFD fits properly when:", opts: ["It is snug and does not ride up over your chin or ears when lifted at the shoulders", "It is one size larger than your jacket", "You can slip it on over winter clothing without adjusting", "It floats away easily for a swimmer to grab"], a: 0, e: "Test the fit: zipped and cinched, a lift at the shoulders shouldn't pull it past your chin." },
{ t: "Safety", q: "Fire breaks out in the galley. Along with using the extinguisher at the base of the flames, you should:", opts: ["Shut off the fuel or power source feeding the fire", "Open all hatches to ventilate", "Throw water on it regardless of type", "Head below to investigate the cause first"], a: 0, e: "Kill the fuel supply (stove valve, electrical master) and attack the base — and position so smoke doesn't trap you below." },
{ t: "Safety", q: "True or False: Non-swimmers and anyone uneasy on the water should wear a PFD the entire time they are aboard.", opts: ["True", "False"], a: 0, e: "For non-swimmers, children, rough weather, or night sailing, PFDs go on and stay on." },
{ t: "Safety", q: "'One hand for yourself and one for the boat' means:", opts: ["Always keep one hand holding on when moving around on deck", "Steer with one hand only", "Split every job between two crew", "Keep one hand on the wheel and one on the throttle"], a: 0, e: "Moving crew keep a grip on handholds, keep low, and stay on the windward side when possible." },
{ t: "Safety", q: "A crew member is pale, dizzy, and sweating heavily on a hot afternoon sail. You should:", opts: ["Move them to shade, cool them, and give water to sip", "Give them strong coffee", "Have them keep working through it", "Wrap them in blankets"], a: 0, e: "That's heat exhaustion — shade, cooling, and hydration now, before it progresses to heat stroke." },
{ t: "Safety", q: "Before going forward on deck while under way, crew should:", opts: ["Tell the helm, stay low, and keep a hand on the boat", "Jump quickly to minimize time on deck", "Wait until the boat is heeling hard", "Remove their PFD for mobility"], a: 0, e: "The helm can steer to steady the deck and avoid maneuvers while crew are exposed forward." },
{ t: "Safety", q: "True or False: A portable air horn or whistle satisfies the sound-signaling requirement for a small recreational boat.", opts: ["True", "False"], a: 0, e: "Boats must be able to make an efficient sound signal — a horn or whistle within reach does it." },
// ---- Knots & Lines (round 4) ----
{ t: "Knots", q: "A 'bight' of line is:", opts: ["A loop or curved section between the two ends", "The frayed end", "The line's breaking strength", "A knot that has jammed"], a: 0, e: "Many knots are tied 'in the bight' — using a doubled section without needing the ends." },
{ t: "Knots", q: "Whipping, taping, or heat-sealing the end of a line prevents:", opts: ["The strands from fraying and unlaying", "The line from stretching", "Kinks in the coil", "The line from absorbing water"], a: 0, e: "An unwhipped end quickly unravels into an unusable mess — finish every cut end." },
{ t: "Knots", q: "True or False: A figure-eight knot is easier to untie after heavy loading than a simple overhand knot.", opts: ["True", "False"], a: 0, e: "That's exactly why the figure-eight is the standard stopper — an overhand jams nearly permanently." },
{ t: "Knots", q: "Dock lines and anchor rodes are usually made of nylon because it:", opts: ["Stretches to absorb shock loads", "Floats on the surface", "Never chafes", "Is the cheapest fiber"], a: 0, e: "Nylon's elasticity cushions surge at the dock and at anchor. (Sheets and halyards use low-stretch fibers instead.)" },
// ---- Seamanship (round 4) ----
{ t: "Seamanship", q: "When picking up a mooring, the bow crew should:", opts: ["Signal distance and direction to the helm, then lift the pennant aboard with a boat hook", "Dive in and swim the line back", "Stand silently until the boat stops", "Throw the anchor at the mooring ball"], a: 0, e: "The helm can't see the ball under the bow — clear hand signals guide the final approach." },
{ t: "Seamanship", q: "You run gently aground on a soft bottom under sail. A good first response is to:", opts: ["Try to pivot or heel the boat and work it back toward the deeper water you came from", "Hoist more sail and drive forward harder", "Drop all sails and wait for a bigger boat", "Send everyone to the bow"], a: 0, e: "You came from deep water — go back that way. Heeling reduces draft; sails or engine can help pivot the boat off." },
{ t: "Seamanship", q: "True or False: Always step — never jump — between the boat and the dock.", opts: ["True", "False"], a: 0, e: "Jumping with dock lines in hand is how sailors get hurt. Bring the boat close, step across calmly, or use the lines." },
{ t: "Seamanship", q: "During a tack, the jib sheets are handled by:", opts: ["The cockpit crew, releasing the old sheet and trimming the new one", "The helmsman with one free hand", "The bow crew standing at the forestay", "No one — the jib tacks itself"], a: 0, e: "Crew work as a team: helm steers the turn while cockpit crew swap the working sheet." },
{ t: "Seamanship", q: "When refueling, good practice includes:", opts: ["Engines off, no smoking, fill portable tanks on the dock, wipe spills, and ventilate before starting", "Keeping the engine idling to save time", "Fueling with all hatches open and crew below", "Topping the tank until fuel overflows"], a: 0, e: "Fuel vapors and spills cause fires and pollution — refuel deliberately and ventilate before restarting." },
{ t: "Seamanship", q: "Boat speed is measured in knots. One knot equals:", opts: ["One nautical mile per hour (about 1.15 statute mph)", "One statute mile per hour", "One kilometer per hour", "Six feet per second"], a: 0, e: "A nautical mile (~6,076 ft) is one minute of latitude — handy for chart work." },
// ---- Weather (round 4) ----
{ t: "Weather", q: "Puffy cumulus clouds begin building into tall towers during the afternoon. This suggests:", opts: ["Growing thunderstorm potential — keep an eye on them and plan an early return", "A guaranteed calm evening", "Fog forming by sunset", "Steady light wind all day"], a: 0, e: "Vertical development is the storm warning — towering cumulus can become cumulonimbus fast on a summer afternoon." },
{ t: "Weather", q: "True or False: Weather systems across the continental US generally move from west to east.", opts: ["True", "False"], a: 0, e: "The prevailing westerlies steer most systems eastward — today's weather upwind is often tomorrow's forecast." },
{ t: "Weather", q: "Tide is the vertical rise and fall of the water. Current is:", opts: ["The horizontal flow of water", "The same thing as tide", "Only found in rivers", "The wind's effect on waves"], a: 0, e: "Tide moves water up and down; current moves it sideways — and current affects your course and docking far more." },
{ t: "Weather", q: "A forecast calls for wind of 15 knots. This means the wind speed is:", opts: ["15 nautical miles per hour", "15 statute miles per hour", "15 feet per second", "15 kilometers per hour"], a: 0, e: "Marine wind speeds are given in knots — 15 knots is about 17 mph, a lively but manageable breeze for ASA 101 skills." },
];
// ==========================================================
// Matching sets — a diagram with 5 numbered labels and one
// shared answer pool, as on the real ASA 101 exam.
// ==========================================================
const MATCHING_SETS = [
{
t: "Terminology", title: "Parts of the boat",
prompt: "Match each numbered label on the diagram to the part of the boat it points to.",
pool: ["Bow", "Stern", "Keel", "Rudder", "Boom"],
items: [
{ n: 1, answer: "Bow", e: "The bow is the forward end of the boat — the pointed end at the right of the diagram." },
{ n: 2, answer: "Stern", e: "The stern is the aft end of the boat." },
{ n: 3, answer: "Keel", e: "The keel is the weighted fin under the hull that resists leeway and provides ballast." },
{ n: 4, answer: "Rudder", e: "The rudder is the steering blade at the stern, aft of the keel." },
{ n: 5, answer: "Boom", e: "The boom is the horizontal spar holding the foot of the mainsail." },
],
svg: `<svg class="match-svg" viewBox="0 0 340 255" xmlns="http://www.w3.org/2000/svg">
<path d="M45 170 L265 170 Q290 172 288 176 L258 205 L72 205 Q52 188 45 170 Z" fill="#dfe9f0" stroke="#0b2545" stroke-width="2"/>
<line x1="155" y1="168" x2="155" y2="30" stroke="#0b2545" stroke-width="3"/>
<polygon points="155,38 155,86 82,88" fill="#f7f3e7" stroke="#8da9c4"/>
<line x1="155" y1="90" x2="75" y2="90" stroke="#0b2545" stroke-width="3"/>
<line x1="155" y1="30" x2="286" y2="172" stroke="#8da9c4" stroke-width="1.5"/>
<polygon points="150,205 178,205 170,238 156,238" fill="#0b2545"/>
<polygon points="78,206 94,206 90,230 80,230" fill="#13315c"/>
<line x1="303" y1="163" x2="290" y2="172" stroke="#666"/><circle cx="312" cy="158" r="12" fill="#0b2545"/><text x="312" y="162" fill="#fff" font-size="12" text-anchor="middle" font-weight="bold">1</text>
<line x1="32" y1="160" x2="47" y2="171" stroke="#666"/><circle cx="24" cy="154" r="12" fill="#0b2545"/><text x="24" y="158" fill="#fff" font-size="12" text-anchor="middle" font-weight="bold">2</text>
<line x1="196" y1="238" x2="174" y2="230" stroke="#666"/><circle cx="206" cy="241" r="12" fill="#0b2545"/><text x="206" y="245" fill="#fff" font-size="12" text-anchor="middle" font-weight="bold">3</text>
<line x1="58" y1="238" x2="84" y2="226" stroke="#666"/><circle cx="48" cy="241" r="12" fill="#0b2545"/><text x="48" y="245" fill="#fff" font-size="12" text-anchor="middle" font-weight="bold">4</text>
<line x1="62" y1="74" x2="80" y2="88" stroke="#666"/><circle cx="53" cy="67" r="12" fill="#0b2545"/><text x="53" y="71" fill="#fff" font-size="12" text-anchor="middle" font-weight="bold">5</text>
</svg>`
},
{
t: "Sails & Rigging", title: "Parts of the sail",
prompt: "Match each numbered label to the correct corner or edge of the sail.",
pool: ["Head", "Tack", "Clew", "Luff", "Leech"],
items: [
{ n: 1, answer: "Head", e: "The head is the top corner of the sail." },
{ n: 2, answer: "Tack", e: "The tack is the forward lower corner (at the gooseneck on a mainsail)." },
{ n: 3, answer: "Clew", e: "The clew is the aft lower corner, where the sheets or outhaul attach." },
{ n: 4, answer: "Luff", e: "The luff is the forward edge of the sail." },
{ n: 5, answer: "Leech", e: "The leech is the aft edge of the sail." },
],
svg: `<svg class="match-svg" viewBox="0 0 320 250" xmlns="http://www.w3.org/2000/svg">
<polygon points="160,25 65,205 265,205" fill="#f7f3e7" stroke="#0b2545" stroke-width="2"/>
<line x1="184" y1="21" x2="164" y2="26" stroke="#666"/><circle cx="194" cy="18" r="12" fill="#0b2545"/><text x="194" y="22" fill="#fff" font-size="12" text-anchor="middle" font-weight="bold">1</text>
<line x1="44" y1="222" x2="64" y2="207" stroke="#666"/><circle cx="36" cy="228" r="12" fill="#0b2545"/><text x="36" y="232" fill="#fff" font-size="12" text-anchor="middle" font-weight="bold">2</text>
<line x1="284" y1="222" x2="266" y2="207" stroke="#666"/><circle cx="292" cy="228" r="12" fill="#0b2545"/><text x="292" y="232" fill="#fff" font-size="12" text-anchor="middle" font-weight="bold">3</text>
<line x1="86" y1="103" x2="110" y2="117" stroke="#666"/><circle cx="76" cy="97" r="12" fill="#0b2545"/><text x="76" y="101" fill="#fff" font-size="12" text-anchor="middle" font-weight="bold">4</text>
<line x1="240" y1="103" x2="215" y2="117" stroke="#666"/><circle cx="250" cy="97" r="12" fill="#0b2545"/><text x="250" y="101" fill="#fff" font-size="12" text-anchor="middle" font-weight="bold">5</text>
</svg>`
},
{
t: "Points of Sail", title: "Points of sail",
prompt: "The arrow shows the wind direction. Match each numbered position to its point of sail.",
pool: ["Close-hauled", "Close reach", "Beam reach", "Broad reach", "Run"],
items: [
{ n: 1, answer: "Close-hauled", e: "About 45° to the wind, at the edge of the no-sail zone." },
{ n: 2, answer: "Close reach", e: "Between close-hauled and a beam reach." },
{ n: 3, answer: "Beam reach", e: "Wind directly over the side, 90° to the boat." },
{ n: 4, answer: "Broad reach", e: "Wind over the aft quarter." },
{ n: 5, answer: "Run", e: "Directly downwind, wind astern." },
],
svg: `<svg class="match-svg" viewBox="0 0 320 260" xmlns="http://www.w3.org/2000/svg">
<path d="M160 130 L96 66 A90 90 0 0 1 224 66 Z" fill="rgba(192,57,43,0.12)" stroke="rgba(192,57,43,0.4)" stroke-dasharray="4 3"/>
<text x="160" y="88" fill="#a04236" font-size="10" text-anchor="middle">NO-SAIL ZONE</text>
<circle cx="160" cy="130" r="90" fill="none" stroke="#8da9c4" stroke-dasharray="5 4"/>
<line x1="160" y1="8" x2="160" y2="40" stroke="#0b2545" stroke-width="3"/>
<polygon points="153,38 167,38 160,52" fill="#0b2545"/>
<text x="196" y="24" fill="#0b2545" font-size="12" font-weight="bold">WIND</text>
<circle cx="96" cy="66" r="13" fill="#0b2545"/><text x="96" y="70" fill="#fff" font-size="12" text-anchor="middle" font-weight="bold">1</text>
<circle cx="77" cy="96" r="13" fill="#0b2545"/><text x="77" y="100" fill="#fff" font-size="12" text-anchor="middle" font-weight="bold">2</text>
<circle cx="70" cy="130" r="13" fill="#0b2545"/><text x="70" y="134" fill="#fff" font-size="12" text-anchor="middle" font-weight="bold">3</text>
<circle cx="96" cy="194" r="13" fill="#0b2545"/><text x="96" y="198" fill="#fff" font-size="12" text-anchor="middle" font-weight="bold">4</text>
<circle cx="160" cy="220" r="13" fill="#0b2545"/><text x="160" y="224" fill="#fff" font-size="12" text-anchor="middle" font-weight="bold">5</text>
</svg>`
},
{
t: "Sails & Rigging", title: "Standing rigging & spars",
prompt: "Match each numbered label to the correct piece of rigging. The bow is to the right.",
pool: ["Forestay", "Backstay", "Shroud", "Spreader", "Boom vang"],
items: [
{ n: 1, answer: "Forestay", e: "The forestay runs from the bow to the upper mast — the jib is set on it." },
{ n: 2, answer: "Backstay", e: "The backstay runs from the masthead to the stern." },
{ n: 3, answer: "Shroud", e: "Shrouds support the mast from side to side, passing over the spreaders down to the chainplates." },
{ n: 4, answer: "Spreader", e: "Spreaders push the shrouds outboard for a better support angle." },
{ n: 5, answer: "Boom vang", e: "The vang runs diagonally from the mast base to the boom, pulling the boom down." },
],
svg: `<svg class="match-svg" viewBox="0 0 340 240" xmlns="http://www.w3.org/2000/svg">
<line x1="50" y1="205" x2="300" y2="205" stroke="#0b2545" stroke-width="3"/>
<line x1="170" y1="25" x2="170" y2="205" stroke="#0b2545" stroke-width="3"/>
<line x1="170" y1="25" x2="300" y2="205" stroke="#555" stroke-width="2"/>
<line x1="170" y1="25" x2="50" y2="205" stroke="#555" stroke-width="2"/>
<polyline points="170,25 196,105 200,205" fill="none" stroke="#2274a5" stroke-width="2"/>
<line x1="170" y1="105" x2="196" y2="105" stroke="#0b2545" stroke-width="4"/>
<line x1="170" y1="150" x2="95" y2="150" stroke="#0b2545" stroke-width="3"/>
<line x1="170" y1="180" x2="122" y2="153" stroke="#2e8b57" stroke-width="2.5"/>
<line x1="258" y1="106" x2="238" y2="118" stroke="#666"/><circle cx="268" cy="100" r="12" fill="#0b2545"/><text x="268" y="104" fill="#fff" font-size="12" text-anchor="middle" font-weight="bold">1</text>
<line x1="88" y1="102" x2="106" y2="115" stroke="#666"/><circle cx="79" cy="96" r="12" fill="#0b2545"/><text x="79" y="100" fill="#fff" font-size="12" text-anchor="middle" font-weight="bold">2</text>
<line x1="226" y1="163" x2="201" y2="163" stroke="#666"/><circle cx="238" cy="163" r="12" fill="#0b2545"/><text x="238" y="167" fill="#fff" font-size="12" text-anchor="middle" font-weight="bold">3</text>
<line x1="216" y1="84" x2="194" y2="102" stroke="#666"/><circle cx="225" cy="77" r="12" fill="#0b2545"/><text x="225" y="81" fill="#fff" font-size="12" text-anchor="middle" font-weight="bold">4</text>
<line x1="112" y1="182" x2="135" y2="169" stroke="#666"/><circle cx="102" cy="187" r="12" fill="#0b2545"/><text x="102" y="191" fill="#fff" font-size="12" text-anchor="middle" font-weight="bold">5</text>
</svg>`
},
{
t: "Navigation Aids", title: "Buoys & marks",
prompt: "Match each numbered buoy to what it is. Colors matter: 1 is red, 2 is green, 3 is red-and-white striped, 4 is white with a blue band, 5 is yellow.",
pool: ["Red nun buoy", "Green can buoy", "Safe water mark", "Mooring buoy", "Special-purpose mark"],
items: [
{ n: 1, answer: "Red nun buoy", e: "Red cone-topped nun, even numbers — keep to starboard when returning from sea." },
{ n: 2, answer: "Green can buoy", e: "Green flat-topped can, odd numbers — keep to port when returning from sea." },
{ n: 3, answer: "Safe water mark", e: "Red-and-white vertical stripes — navigable water all around, often mid-channel." },
{ n: 4, answer: "Mooring buoy", e: "White with a blue horizontal band — the only buoy you may tie up to." },
{ n: 5, answer: "Special-purpose mark", e: "Yellow — marks anchorages, cable areas, race courses, and similar; see the chart." },
],
svg: `<svg class="match-svg" viewBox="0 0 360 255" xmlns="http://www.w3.org/2000/svg">
<line x1="10" y1="205" x2="350" y2="205" stroke="#8da9c4" stroke-width="2"/>
<polygon points="45,205 85,205 65,140" fill="#c0392b"/>
<rect x="115" y="150" width="36" height="55" fill="#2e8b57"/>
<circle cx="200" cy="175" r="28" fill="#ffffff" stroke="#c0392b" stroke-width="2"/>
<line x1="192" y1="152" x2="192" y2="198" stroke="#c0392b" stroke-width="6"/>
<line x1="208" y1="152" x2="208" y2="198" stroke="#c0392b" stroke-width="6"/>
<circle cx="200" cy="140" r="6" fill="#c0392b"/>
<rect x="245" y="150" width="36" height="55" fill="#ffffff" stroke="#445566"/>
<rect x="245" y="170" width="36" height="14" fill="#2274a5"/>
<rect x="305" y="150" width="36" height="55" fill="#e8b04b" stroke="#a8842f"/>
<circle cx="65" cy="232" r="12" fill="#0b2545"/><text x="65" y="236" fill="#fff" font-size="12" text-anchor="middle" font-weight="bold">1</text>
<circle cx="133" cy="232" r="12" fill="#0b2545"/><text x="133" y="236" fill="#fff" font-size="12" text-anchor="middle" font-weight="bold">2</text>
<circle cx="200" cy="232" r="12" fill="#0b2545"/><text x="200" y="236" fill="#fff" font-size="12" text-anchor="middle" font-weight="bold">3</text>
<circle cx="263" cy="232" r="12" fill="#0b2545"/><text x="263" y="236" fill="#fff" font-size="12" text-anchor="middle" font-weight="bold">4</text>
<circle cx="323" cy="232" r="12" fill="#0b2545"/><text x="323" y="236" fill="#fff" font-size="12" text-anchor="middle" font-weight="bold">5</text>
</svg>`
},
{
t: "Right of Way", title: "Who gives way?",
prompt: "Each numbered box shows two converging vessels (S = under sail, P = power; the small arrow is the wind). Match each situation to the correct rule.",
pool: ["The port-tack boat gives way", "The windward boat gives way", "The overtaking boat gives way", "The powerboat gives way", "Both alter course to starboard"],
items: [
{ n: 1, answer: "The port-tack boat gives way", e: "Opposite tacks: the boat with the wind over its port side keeps clear; starboard tack stands on." },
{ n: 2, answer: "The windward boat gives way", e: "Same tack: the upwind (windward) boat keeps clear of the leeward boat." },
{ n: 3, answer: "The overtaking boat gives way", e: "An overtaking vessel always keeps clear — regardless of sail or power." },
{ n: 4, answer: "The powerboat gives way", e: "Crossing in open water, power gives way to sail (absent overtaking or special-vessel status)." },
{ n: 5, answer: "Both alter course to starboard", e: "Two power vessels meeting head-on each turn to starboard and pass port-to-port." },
],
svg: `<svg class="match-svg" viewBox="0 0 380 310" xmlns="http://www.w3.org/2000/svg">
<rect x="5" y="5" width="180" height="92" rx="8" fill="#f4f8fa" stroke="#c5d2dc"/>
<line x1="95" y1="12" x2="95" y2="26" stroke="#2274a5" stroke-width="2"/><polygon points="91,25 99,25 95,33" fill="#2274a5"/>
<line x1="35" y1="82" x2="72" y2="48" stroke="#0b2545" stroke-width="3"/><polygon points="66,42 78,46 70,56" fill="#0b2545"/><text x="28" y="94" font-size="11" fill="#0b2545" font-weight="bold">S</text>
<line x1="155" y1="82" x2="118" y2="48" stroke="#0b2545" stroke-width="3"/><polygon points="112,46 124,42 120,56" fill="#0b2545"/><text x="155" y="94" font-size="11" fill="#0b2545" font-weight="bold">S</text>
<circle cx="18" cy="18" r="11" fill="#e8b04b"/><text x="18" y="22" fill="#0b2545" font-size="12" text-anchor="middle" font-weight="bold">1</text>
<rect x="195" y="5" width="180" height="92" rx="8" fill="#f4f8fa" stroke="#c5d2dc"/>
<line x1="285" y1="12" x2="285" y2="26" stroke="#2274a5" stroke-width="2"/><polygon points="281,25 289,25 285,33" fill="#2274a5"/>
<line x1="215" y1="60" x2="248" y2="34" stroke="#0b2545" stroke-width="3"/><polygon points="242,29 254,32 247,43" fill="#0b2545"/><text x="208" y="72" font-size="11" fill="#0b2545" font-weight="bold">S</text>
<line x1="255" y1="88" x2="288" y2="62" stroke="#0b2545" stroke-width="3"/><polygon points="282,57 294,60 287,71" fill="#0b2545"/><text x="248" y="99" font-size="11" fill="#0b2545" font-weight="bold">S</text>
<circle cx="208" cy="18" r="11" fill="#e8b04b"/><text x="208" y="22" fill="#0b2545" font-size="12" text-anchor="middle" font-weight="bold">2</text>
<rect x="5" y="105" width="180" height="92" rx="8" fill="#f4f8fa" stroke="#c5d2dc"/>
<line x1="95" y1="150" x2="135" y2="150" stroke="#0b2545" stroke-width="3"/><polygon points="133,144 145,150 133,156" fill="#0b2545"/>
<line x1="22" y1="150" x2="62" y2="150" stroke="#0b2545" stroke-width="3"/><polygon points="60,144 72,150 60,156" fill="#0b2545"/>
<line x1="14" y1="145" x2="20" y2="145" stroke="#8da9c4" stroke-width="2"/><line x1="12" y1="150" x2="18" y2="150" stroke="#8da9c4" stroke-width="2"/><line x1="14" y1="155" x2="20" y2="155" stroke="#8da9c4" stroke-width="2"/>
<text x="38" y="170" font-size="10" fill="#445" font-style="italic">faster, from astern</text>
<circle cx="18" cy="118" r="11" fill="#e8b04b"/><text x="18" y="122" fill="#0b2545" font-size="12" text-anchor="middle" font-weight="bold">3</text>
<rect x="195" y="105" width="180" height="92" rx="8" fill="#f4f8fa" stroke="#c5d2dc"/>
<line x1="215" y1="160" x2="262" y2="160" stroke="#0b2545" stroke-width="3"/><polygon points="260,154 272,160 260,166" fill="#0b2545"/><text x="208" y="174" font-size="11" fill="#0b2545" font-weight="bold">S</text>
<line x1="305" y1="190" x2="305" y2="152" stroke="#555" stroke-width="3"/><polygon points="299,154 311,154 305,142" fill="#555"/><text x="316" y="178" font-size="11" fill="#555" font-weight="bold">P</text>
<circle cx="208" cy="118" r="11" fill="#e8b04b"/><text x="208" y="122" fill="#0b2545" font-size="12" text-anchor="middle" font-weight="bold">4</text>
<rect x="5" y="205" width="180" height="92" rx="8" fill="#f4f8fa" stroke="#c5d2dc"/>
<line x1="30" y1="255" x2="70" y2="255" stroke="#555" stroke-width="3"/><polygon points="68,249 80,255 68,261" fill="#555"/><text x="30" y="244" font-size="11" fill="#555" font-weight="bold">P</text>
<line x1="160" y1="255" x2="120" y2="255" stroke="#555" stroke-width="3"/><polygon points="122,249 110,255 122,261" fill="#555"/><text x="150" y="244" font-size="11" fill="#555" font-weight="bold">P</text>
<circle cx="18" cy="218" r="11" fill="#e8b04b"/><text x="18" y="222" fill="#0b2545" font-size="12" text-anchor="middle" font-weight="bold">5</text>
</svg>`
},
{
t: "Right of Way", title: "Sound signals",
prompt: "Each numbered row shows a horn signal (a short bar is a short blast; a long bar is a prolonged blast). Match each signal to its meaning.",
pool: ["I intend to pass you on my port side", "I intend to pass you on my starboard side", "Operating astern propulsion", "Danger / I doubt your intentions", "Leaving a berth or approaching a blind bend"],
items: [
{ n: 1, answer: "I intend to pass you on my port side", e: "One short blast (inland): port-to-port passing intentions." },
{ n: 2, answer: "I intend to pass you on my starboard side", e: "Two short blasts (inland): starboard-to-starboard passing intentions." },
{ n: 3, answer: "Operating astern propulsion", e: "Three short blasts: engines going astern (backing)." },
{ n: 4, answer: "Danger / I doubt your intentions", e: "Five or more short, rapid blasts: the danger/doubt signal." },
{ n: 5, answer: "Leaving a berth or approaching a blind bend", e: "One prolonged blast (4–6 seconds): announcing your presence." },
],
svg: `<svg class="match-svg" viewBox="0 0 340 250" xmlns="http://www.w3.org/2000/svg">
<circle cx="25" cy="35" r="12" fill="#0b2545"/><text x="25" y="39" fill="#fff" font-size="12" text-anchor="middle" font-weight="bold">1</text>
<rect x="60" y="27" width="18" height="16" rx="4" fill="#2274a5"/>
<circle cx="25" cy="80" r="12" fill="#0b2545"/><text x="25" y="84" fill="#fff" font-size="12" text-anchor="middle" font-weight="bold">2</text>
<rect x="60" y="72" width="18" height="16" rx="4" fill="#2274a5"/><rect x="86" y="72" width="18" height="16" rx="4" fill="#2274a5"/>
<circle cx="25" cy="125" r="12" fill="#0b2545"/><text x="25" y="129" fill="#fff" font-size="12" text-anchor="middle" font-weight="bold">3</text>
<rect x="60" y="117" width="18" height="16" rx="4" fill="#2274a5"/><rect x="86" y="117" width="18" height="16" rx="4" fill="#2274a5"/><rect x="112" y="117" width="18" height="16" rx="4" fill="#2274a5"/>
<circle cx="25" cy="170" r="12" fill="#0b2545"/><text x="25" y="174" fill="#fff" font-size="12" text-anchor="middle" font-weight="bold">4</text>
<rect x="60" y="162" width="18" height="16" rx="4" fill="#c0392b"/><rect x="86" y="162" width="18" height="16" rx="4" fill="#c0392b"/><rect x="112" y="162" width="18" height="16" rx="4" fill="#c0392b"/><rect x="138" y="162" width="18" height="16" rx="4" fill="#c0392b"/><rect x="164" y="162" width="18" height="16" rx="4" fill="#c0392b"/>
<circle cx="25" cy="215" r="12" fill="#0b2545"/><text x="25" y="219" fill="#fff" font-size="12" text-anchor="middle" font-weight="bold">5</text>
<rect x="60" y="207" width="80" height="16" rx="4" fill="#2274a5"/>
</svg>`
},
{
t: "Right of Way", title: "Navigation lights at night",
prompt: "Each numbered box shows the lights you see on another vessel at night. Match each to what you are looking at.",
pool: ["Power-driven vessel approaching head-on", "Sailing vessel approaching head-on", "Vessel at anchor", "Power-driven vessel showing you her starboard side", "Power-driven vessel showing you her port side"],
items: [
{ n: 1, answer: "Power-driven vessel approaching head-on", e: "Both sidelights plus a white masthead (steaming) light above: a power vessel pointed at you — act early." },
{ n: 2, answer: "Sailing vessel approaching head-on", e: "Both sidelights with NO white masthead light: a vessel under sail coming toward you." },
{ n: 3, answer: "Vessel at anchor", e: "A single all-round white light (and no sidelights) marks a vessel at anchor." },
{ n: 4, answer: "Power-driven vessel showing you her starboard side", e: "Green sidelight + white masthead light: you're seeing her starboard side as she crosses." },
{ n: 5, answer: "Power-driven vessel showing you her port side", e: "Red sidelight + white masthead light: you're seeing her port side — if she's crossing from your starboard, you likely give way." },
],
svg: `<svg class="match-svg" viewBox="0 0 380 310" xmlns="http://www.w3.org/2000/svg">
<rect x="5" y="5" width="180" height="92" rx="8" fill="#17273a" stroke="#c5d2dc"/>
<circle cx="95" cy="32" r="7" fill="#ffffff"/><circle cx="73" cy="62" r="7" fill="#e74c3c"/><circle cx="117" cy="62" r="7" fill="#2ecc71"/>
<circle cx="18" cy="18" r="11" fill="#e8b04b"/><text x="18" y="22" fill="#0b2545" font-size="12" text-anchor="middle" font-weight="bold">1</text>
<rect x="195" y="5" width="180" height="92" rx="8" fill="#17273a" stroke="#c5d2dc"/>
<circle cx="263" cy="55" r="7" fill="#e74c3c"/><circle cx="307" cy="55" r="7" fill="#2ecc71"/>
<circle cx="208" cy="18" r="11" fill="#e8b04b"/><text x="208" y="22" fill="#0b2545" font-size="12" text-anchor="middle" font-weight="bold">2</text>
<rect x="5" y="105" width="180" height="92" rx="8" fill="#17273a" stroke="#c5d2dc"/>
<circle cx="95" cy="150" r="7" fill="#ffffff"/>
<circle cx="18" cy="118" r="11" fill="#e8b04b"/><text x="18" y="122" fill="#0b2545" font-size="12" text-anchor="middle" font-weight="bold">3</text>
<rect x="195" y="105" width="180" height="92" rx="8" fill="#17273a" stroke="#c5d2dc"/>
<circle cx="292" cy="132" r="7" fill="#ffffff"/><circle cx="272" cy="162" r="7" fill="#2ecc71"/>
<circle cx="208" cy="118" r="11" fill="#e8b04b"/><text x="208" y="122" fill="#0b2545" font-size="12" text-anchor="middle" font-weight="bold">4</text>
<rect x="5" y="205" width="180" height="92" rx="8" fill="#17273a" stroke="#c5d2dc"/>
<circle cx="102" cy="232" r="7" fill="#ffffff"/><circle cx="82" cy="262" r="7" fill="#e74c3c"/>
<circle cx="18" cy="218" r="11" fill="#e8b04b"/><text x="18" y="222" fill="#0b2545" font-size="12" text-anchor="middle" font-weight="bold">5</text>
</svg>`
},
];
// ==========================================================
// State
// ==========================================================
const LS_KEY = "asa101_progress_v1";
let progress = {}; // cardIndex -> "known" | "review"
try { progress = JSON.parse(localStorage.getItem(LS_KEY)) || {}; } catch (e) { progress = {}; }
let mode = "study"; // "study" | "quiz"
let activeIndices = []; // deck indices currently in rotation
let pos = 0; // position within activeIndices
let flipped = false;
// quiz state
let quizOrder = [], quizPos = 0, quizScoreCount = 0, quizAnswered = false;
// exam state
const EXAM_PASS_PCT = 80;
let examSize = 50;
let examQs = [], examAnswers = [], examPos = 0, examStart = 0, examTimer = null, examFinished = false;
// ==========================================================
// Elements
// ==========================================================
const $ = id => document.getElementById(id);
const categorySelect = $("categorySelect"), filterSelect = $("filterSelect");
const flashcard = $("flashcard");
const studyArea = $("studyArea"), quizArea = $("quizArea");
// populate categories
const categories = [...new Set(DECK.map(c => c.c))];
categorySelect.innerHTML = `<option value="all">All categories (${DECK.length})</option>` +
categories.map(c => `<option value="${c}">${c} (${DECK.filter(x => x.c === c).length})</option>`).join("");
// ==========================================================
// Helpers
// ==========================================================
function saveProgress() { localStorage.setItem(LS_KEY, JSON.stringify(progress)); }
function buildActiveList() {
const cat = categorySelect.value, filt = filterSelect.value;
activeIndices = DECK.map((_, i) => i).filter(i => {
if (cat !== "all" && DECK[i].c !== cat) return false;
const st = progress[i];
if (filt === "known" && st !== "known") return false;
if (filt === "review" && st !== "review") return false;
if (filt === "unseen" && st) return false;
return true;
});
pos = 0;
}
function shuffleArray(a) {
for (let i = a.length - 1; i > 0; i--) {
const j = Math.floor(Math.random() * (i + 1));
[a[i], a[j]] = [a[j], a[i]];
}
}
function updateStats() {
const known = Object.values(progress).filter(v => v === "known").length;