/* ONE BUTTON, ONE CHIP (worklist row 347, John, 12 Oct 2026: chose "Pills
   everywhere" after the visual QA review counted five button designs for the
   same jobs: 40px pills, 34px 6px-corner boxes, 8px beige row buttons, a
   black and a brown primary fill, and Generate's own set; and three chip
   designs with three different "selected" looks).

   THE CLASSES STAY, THE LOOK IS ONE. Renaming three hundred buttons across
   authoring.js and index.html would be three hundred chances to break one;
   instead every existing class takes its look from here, and this file loads
   after every other staff stylesheet, so nothing earlier can give a button
   another shape. tests/test_one_button.py fails if any other staff
   stylesheet sets a button's corners or fill.

     primary  near-black fill            .btn-primary, .tr-go.is-loud, .btn-icon-primary, .gen-btn-primary
     ghost    tan outline, ink text      .btn-ghost, .btn-secondary, .btn-icon, .tr-go, .gen-btn-ghost
     danger   ghost with the danger ink  .btn-icon-danger
     sizes    40px (md), 34px (sm: row actions, .btn-icon, .tr-go, .btn-small, .btn-sm)

   Chips: one look, one selected state (filled ink), .tag-chip and
   .filter-chip alike; the warning chip keeps its own colours. */

:is(.btn-primary, .btn-ghost, .btn-secondary, .btn-icon, .tr-go, .gen-btn, .gen-btn-ghost) {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: var(--radius-pill);
  font-family: var(--font-ui); font-weight: 600; line-height: 1.2;
  white-space: nowrap; cursor: pointer; text-decoration: none;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
/* A MENU'S SUMMARY THAT WEARS A BUTTON IS LAID OUT AS ONE (12 Oct 2026, the
   release walk refused row 347 over it). `.menu > summary { display:
   inline-block }` is (0,1,1) and beat the (0,1,0) inline-flex above, so
   "More" and "Add" were 40px boxes with no vertical padding and their text
   glued to the top edge, on 116 screens. Same specificity, loaded last. */
summary:is(.btn-primary, .btn-ghost, .btn-secondary, .btn-icon, .tr-go) { display: inline-flex; }

/* Sizes: the small one after, so .btn-ghost.btn-small is small. */
:is(.btn-primary, .btn-ghost, .btn-secondary, .gen-btn, .gen-btn-ghost) {
  min-height: 40px; padding: 0 18px; font-size: var(--type-body-dense);
}
:is(.btn-icon, .tr-go, .btn-small, .btn-sm) {
  min-height: 34px; padding: 0 14px; font-size: var(--type-meta-dense);
}

/* Primary */
:is(.btn-primary, .tr-go.is-loud, .btn-icon-primary, .gen-btn-primary) {
  background: var(--deep-ink); color: var(--parchment); border: 1.5px solid var(--deep-ink);
}
:is(.btn-primary, .tr-go.is-loud, .btn-icon-primary, .gen-btn-primary):hover:not(:disabled) {
  background: var(--ink-hover); border-color: var(--ink-hover);
}

/* Ghost */
:is(.btn-ghost, .btn-secondary, .gen-btn-ghost),
.btn-icon:not(.btn-icon-primary):not(.btn-icon-danger),
.tr-go:not(.is-loud) {
  background: transparent; color: var(--brown-ink); border: 1.5px solid var(--border-card);
}
:is(.btn-ghost, .btn-secondary, .gen-btn-ghost):hover:not(:disabled),
.btn-icon:not(.btn-icon-primary):not(.btn-icon-danger):hover:not(:disabled),
.tr-go:not(.is-loud):hover:not(:disabled) {
  background: var(--parchment); border-color: var(--brown-ink);
}

/* Danger */
.btn-icon-danger {
  background: transparent; color: var(--danger-text); border: 1.5px solid var(--danger-border);
}
.btn-icon-danger:hover:not(:disabled) { background: var(--danger-hover-bg); border-color: var(--danger-text); }

:is(.btn-primary, .btn-ghost, .btn-secondary, .btn-icon, .tr-go, .gen-btn, .gen-btn-ghost):disabled {
  opacity: 0.4; cursor: not-allowed;
}
/* Off, but pressable: a press says what is missing (worklist 451, the
   teacher screen's 398 pattern). */
:is(.btn-primary, .btn-ghost, .btn-secondary, .btn-icon)[aria-disabled="true"] { opacity: 0.4; }

/* Chips */
:is(.tag-chip, .filter-chip) {
  display: inline-flex; align-items: center; gap: 4px; min-height: 30px; padding: 0 12px;
  border-radius: var(--radius-pill); border: 1.5px solid var(--border-card);
  background: var(--warm-white); color: var(--brown-ink);
  font-family: inherit; font-size: var(--type-meta-dense); font-weight: 600; cursor: pointer;
}
:is(.tag-chip, .filter-chip):hover { border-color: var(--brown-ink); }
:is(.tag-chip, .filter-chip):is(.active, [aria-pressed="true"]) {
  background: var(--deep-ink); border-color: var(--deep-ink); color: var(--warm-white);
}
