cookcli 0.36.0

A command-line interface for managing and working with Cooklang recipes
Documentation
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
/* ============================================================
   COMPONENT LAYER
   Imported from input.css after the token registration. Everything here
   resolves through the tokens; never introduce raw hex values or Tailwind
   palette utilities. Dimensions match what main rendered before the token
   migration — this file changes how things look, not how big they are.
   Colour transitions are deliberately absent: transitioning a token-valued
   property races Chrome's custom-property invalidation when .dark flips,
   and elements keep the outgoing theme's colour until the next recalc.
   ============================================================ */
@layer components {
    /* ---------- Focus ---------- */
    :focus-visible {
        outline: 2px solid var(--accent);
        outline-offset: 2px;
    }

    /* ---------- Surfaces ---------- */
    .card {
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: var(--radius-card);
        box-shadow: var(--shadow-card);
    }

    .card-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 10px 14px;
        border-bottom: 1px solid var(--border);
    }

    .card-head h2,
    .card-head h3 {
        margin: 0;
        font-size: var(--text-label);
        font-weight: 600;
        letter-spacing: .06em;
        text-transform: uppercase;
        color: var(--text-muted);
    }

    .card-head.plain h2,
    .card-head.plain h3 {
        font-size: var(--text-body);
        font-weight: 600;
        letter-spacing: 0;
        text-transform: none;
        color: var(--text);
    }

    .card-head .count {
        font-size: var(--text-meta);
        color: var(--text-faint);
        font-variant-numeric: tabular-nums;
    }

    /* The nav container: main's rounded card, not sticky. */
    .nav-card {
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: var(--radius-card);
        box-shadow: var(--shadow-card);
        margin-bottom: 2rem;
    }

    /* ---------- Controls ---------- */
    /* 40px: main's px-4 py-2 buttons at 16px text. */
    .btn {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        height: 40px;
        padding: 0 16px;
        border-radius: var(--radius-control);
        font-size: var(--text-body);
        font-weight: 500;
        white-space: nowrap;
        cursor: pointer;
        text-decoration: none;
        background: var(--surface);
        color: var(--text);
        border: 1px solid var(--border-strong);
    }

    .btn:hover {
        background: var(--surface-sunk);
    }

    .btn:active { background: var(--surface-sunk); filter: brightness(.97); }
    .btn-primary:active { background: var(--accent-strong); filter: brightness(.9); }
    .btn-danger:active { background: var(--danger); filter: brightness(.97); }

    .btn svg { width: 20px; height: 20px; flex: 0 0 auto; }

    /* One accent-filled button per view. Everything else is neutral.
       Hover and active darken rather than brighten so the white label never
       drops below AA on the fill. */
    .btn-primary {
        background: var(--accent-strong);
        border-color: var(--accent-strong);
        color: var(--accent-ink);
    }

    .btn-primary:hover {
        background: var(--accent-strong);
        filter: brightness(.94);
    }

    /* The commit half of a destructive confirmation. */
    .btn-danger {
        background: var(--danger);
        border-color: var(--danger);
        color: var(--danger-ink);
    }

    .btn-danger:hover {
        background: var(--danger);
        filter: brightness(1.06);
    }

    /* Compact control for inline forms that sit inside a card row. */
    .btn-sm {
        height: 32px;
        padding: 0 12px;
        font-size: var(--text-ui);
    }

    .btn-sm svg { width: 16px; height: 16px; }

    .icon-btn {
        width: 36px;
        height: 36px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 0;
        border-radius: var(--radius-control);
        background: transparent;
        color: var(--text-muted);
        cursor: pointer;
        text-decoration: none;
    }

    .icon-btn:hover {
        background: var(--surface-sunk);
        color: var(--text);
    }

    .icon-btn svg { width: 20px; height: 20px; }

    .select {
        height: 40px;
        padding: 0 10px;
        border-radius: var(--radius-control);
        border: 1px solid var(--border-strong);
        background: var(--surface);
        color: var(--text);
        font-size: var(--text-body);
        font-weight: 500;
        cursor: pointer;
    }

    .select:hover { background: var(--surface-sunk); }

    .stepper {
        display: inline-flex;
        align-items: center;
        height: 40px;
        overflow: hidden;
        background: var(--surface);
        border: 1px solid var(--border-strong);
        border-radius: var(--radius-control);
    }

    .stepper button {
        width: 32px;
        height: 100%;
        border: 0;
        background: transparent;
        color: var(--text-muted);
        cursor: pointer;
        font-size: var(--text-read);
    }

    .stepper button:hover {
        background: var(--surface-sunk);
        color: var(--text);
    }

    .stepper button:active { background: var(--surface-sunk); filter: brightness(.97); }

    .stepper input {
        width: 56px;
        height: 100%;
        border: 0;
        background: transparent;
        color: var(--text);
        text-align: center;
        font-size: var(--text-body);
        font-weight: 600;
        font-variant-numeric: tabular-nums;
        -moz-appearance: textfield;
        appearance: textfield;
    }

    .stepper input::-webkit-outer-spin-button,
    .stepper input::-webkit-inner-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }

    .stepper input:focus { outline: none; }

    .stepper:focus-within {
        border-color: var(--accent);
        box-shadow: 0 0 0 2px var(--accent-soft);
    }

    .search-input {
        width: 100%;
        height: 44px;
        padding: 0 16px 0 40px;
        border-radius: var(--radius-control);
        border: 1px solid var(--border-strong);
        background: var(--surface);
        color: var(--text);
        font-size: var(--text-body);
    }

    .search-input::placeholder { color: var(--text-faint); }

    .search-input:focus {
        outline: none;
        border-color: var(--accent);
        box-shadow: 0 0 0 2px var(--accent-soft);
    }

    /* ---------- Navigation ---------- */
    .nav-pill {
        padding: .5rem 1.25rem;
        border-radius: 9999px;
        font-size: var(--text-body);
        font-weight: 500;
        color: var(--text-muted);
        text-decoration: none;
        white-space: nowrap;
    }

    .nav-pill:hover {
        background: var(--surface-sunk);
        color: var(--text);
    }

    .nav-pill.active {
        background: var(--accent-soft);
        color: var(--accent-text);
        font-weight: 600;
    }

    /* Rows of the small-screen overflow menu. A component rather than
       text-muted + a conditional text-accent-text: two utilities of equal
       specificity collide and the active colour silently loses. */
    .menu-item {
        display: flex;
        align-items: center;
        gap: 12px;
        width: 100%;
        padding: 10px 16px;
        font-size: var(--text-body);
        color: var(--text-muted);
        text-decoration: none;
        background: transparent;
        border: 0;
        text-align: left;
        cursor: pointer;
    }

    .menu-item:hover {
        background: var(--surface-sunk);
        color: var(--text);
    }

    .menu-item.active {
        color: var(--accent-text);
        font-weight: 600;
    }

    /* The brand mark is orange with dark dots on transparency; it needs a
       light backing on a dark nav. */
    .dark .brand-mark {
        background: var(--text);
        padding: 2px;
    }

    /* ---------- Lists ---------- */
    .row {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 7px 14px;
        font-size: var(--text-body);
    }

    .row + .row { border-top: 1px solid var(--border); }

    .row .row-name { flex: 1; min-width: 0; }

    .row-value {
        white-space: nowrap;
        font-weight: 600;
        color: var(--accent-text);
        font-variant-numeric: tabular-nums;
    }

    .row-note {
        color: var(--text-faint);
        font-size: var(--text-meta);
    }

    /* Checkbox sizes live here, not in w-* / h-* utilities, so the
       coarse-pointer override further down can actually win. */
    .ref-checkbox { width: 16px; height: 16px; }
    .list-checkbox { width: 20px; height: 20px; }

    /* Recipe ingredient rows: main's tinted row, on the sunk surface. */
    .ingredient-list { list-style: none; margin: 0; padding: 0; }

    .ingredient-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: .5rem .75rem;
        border-radius: var(--radius-control);
        background: var(--surface-sunk);
    }

    .section-label {
        font-size: var(--text-label);
        font-weight: 600;
        letter-spacing: .06em;
        text-transform: uppercase;
        color: var(--text-faint);
        margin: 18px 0 8px;
        padding: 0 14px;
    }

    /* ---------- Text ---------- */
    .metaline {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 6px 0;
        font-size: var(--text-ui);
        color: var(--text-muted);
    }

    .metaline > *:not(:last-child)::after {
        content: "·";
        margin: 0 8px;
        color: var(--text-faint);
    }

    .metaline b { font-weight: 600; color: var(--text); }

    /* Recipe-reference links. --info is a warm orange, so the underline is
       what makes it read as a link. */
    a.text-info { text-decoration: underline; text-underline-offset: 2px; }

    /* ---------- Status ---------- */
    .item-status-dot {
        flex: 0 0 auto;
        width: 8px;
        height: 8px;
        border-radius: 50%;
    }

    .item-status-dot.in-stock { background: var(--ok); }

    .item-status-dot.low-stock { background: var(--accent); }

    .item-status-dot.out-of-stock { background: var(--danger); }

    /* ---------- Inline recipe entities ---------- */
    /* Weight + tint, not bordered gradient pills, so they stop competing with
       the prose they sit inside. */
    .ingredient-badge {
        color: var(--accent-text);
        font-weight: 600;
        white-space: nowrap;
    }

    /* Distinguished from an ingredient by texture, not hue, so the split is
       visible to red-green deficient readers. */
    .cookware-badge {
        color: var(--text);
        font-weight: 600;
        white-space: nowrap;
        text-decoration: underline dotted var(--inactive);
        text-underline-offset: 3px;
    }

    .timer-badge {
        padding: 1px 6px;
        border-radius: 5px;
        background: var(--surface-sunk);
        border: 1px solid var(--border);
        color: var(--text);
        font-weight: 600;
        font-variant-numeric: tabular-nums;
        white-space: nowrap;
    }

    /* main's 32px circle, on a flat accent tint. */
    .step-number {
        flex: 0 0 32px;
        width: 32px;
        height: 32px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--accent-soft);
        color: var(--accent-text);
        font-size: var(--text-body);
        font-weight: 700;
        font-variant-numeric: tabular-nums;
    }

    .tag {
        display: inline-block;
        padding: 1px 8px;
        border-radius: 9999px;
        font-size: var(--text-meta);
        font-weight: 500;
        background: var(--surface-sunk);
        border: 1px solid var(--border);
        color: var(--text-muted);
    }

    /* Neutral bordered pill. The metadata-* key classes stay in the markup as
       hooks but carry no colour of their own any more. */
    .metadata-pill {
        display: inline-flex;
        align-items: center;
        padding: .25rem .75rem;
        border-radius: 9999px;
        font-size: var(--text-body);
        font-weight: 500;
        white-space: nowrap;
        background: var(--surface);
        border: 1px solid var(--border);
        color: var(--text-muted);
    }

    .metadata-pill svg {
        width: 1rem;
        height: 1rem;
        margin-right: .5rem;
    }

    /* ---------- Recipes index ---------- */
    /* main's tall card: block layout, p-6 content from the template, no
       gradient stripe, no scale transform. */
    .recipe-card {
        display: flex;
        flex-direction: column;
        overflow: hidden;
        text-decoration: none;
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: var(--radius-card);
        box-shadow: var(--shadow-card);
    }

    .recipe-card:hover { border-color: var(--border-strong); }

    .recipe-card-icon {
        width: 64px;
        height: 64px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background: var(--surface-sunk);
        border: 1px solid var(--border);
        font-size: 24px;
        margin-bottom: 1rem;
    }

    /* An <h2>, not an <h3>: the index has an <h1> and nothing between. */
    .recipe-card-title {
        display: block;
        margin: 0 0 .5rem;
        font-size: var(--text-title);
        font-weight: 700;
        line-height: 1.35;
        color: var(--text);
    }

    .recipe-card-sub {
        display: block;
        font-size: var(--text-meta);
        color: var(--text-faint);
    }

    /* ---------- Recipe page ---------- */
    .step-list { list-style: none; margin: 0; padding: 0; }

    /* main's per-step box. */
    .step-box {
        background: var(--surface-sunk);
        border: 1px solid var(--border);
        border-radius: var(--radius-card);
        padding: 1rem;
    }

    /* Step prose keeps main's leading-8 (2.0) on 16px text — the one place
       the reading step's line-height is overridden, by decision. */
    .step-body {
        font-size: var(--text-read);
        line-height: 2;
        color: var(--text);
    }

    .step-refs {
        margin-top: .5rem;
        padding-left: 1rem;
        border-left: 2px solid var(--accent);
        font-size: var(--text-body);
        color: var(--text-muted);
    }

    .recipe-note {
        display: flex;
        gap: 8px;
        padding: 12px 14px;
        border-radius: var(--radius-card);
        border: 1px solid var(--border);
        border-left: 3px solid var(--accent);
        background: var(--surface-sunk);
        color: var(--text-muted);
        font-style: italic;
    }

    .image-step {
        @apply w-full max-h-80 object-contain;
        border-radius: var(--radius-card);
    }

    .recipe-image-placeholder {
        background: var(--surface-sunk);
        border: 1px solid var(--border);
        color: var(--accent-text);
        @apply w-30 h-30 rounded-full flex items-center justify-center text-5xl;
    }

    /* ---------- Pantry ---------- */
    /* main's four-line stat block. The transparent border keeps the box from
       shifting when a state border appears. */
    .pantry-item {
        background: var(--surface-sunk);
        border: 1px solid transparent;
        border-radius: var(--radius-control);
        padding: 1rem;
    }

    .pantry-item:hover { border-color: var(--border); }

    .pantry-item .quantity-display { color: var(--text-muted); }
    .pantry-item .item-quantity { font-weight: 500; }

    .pantry-item.out-of-stock {
        background: var(--danger-soft);
        border-color: var(--danger);
    }

    .pantry-item.out-of-stock .quantity-display,
    .pantry-item.out-of-stock .out-of-stock-icon {
        color: var(--danger);
    }

    .pantry-item.out-of-stock .item-quantity { font-weight: 600; }

    .pantry-item.low-stock {
        background: var(--accent-soft);
        border-color: var(--accent);
    }

    .pantry-item.low-stock .quantity-display,
    .pantry-item.low-stock .out-of-stock-icon {
        color: var(--accent-text);
    }

    .pantry-item.low-stock .item-quantity { font-weight: 600; }

    /* Row actions appear on hover or focus, as main's group-hover did. */
    .pantry-actions { opacity: 0; }

    .pantry-item:hover .pantry-actions,
    .pantry-item:focus-within .pantry-actions { opacity: 1; }

    /* Row icons stay compact so the text column keeps its width at narrower
       breakpoints (main's icons here were 24px, not the 36px default). */
    .pantry-actions .icon-btn { width: 28px; height: 28px; }
    .pantry-actions .icon-btn svg { width: 16px; height: 16px; }

    /* ---------- Coarse pointers ---------- */
    /* Touch targets per WCAG 2.2 SC 2.5.8. Only active on touch devices. */
    @media (pointer: coarse) {
        .btn { height: 44px; }
        .select { height: 44px; }
        .stepper { height: 46px; }
        .stepper button { width: 44px; }
        .icon-btn { width: 44px; height: 44px; }
        .ref-checkbox,
        .list-checkbox { width: 24px; height: 24px; }
        .pantry-actions { opacity: 1; }
    }
}