/* Shared brand action: add class="bite-button" to a button or link. */
:root {
  --bite-button-bg: #795239;
  --bite-button-hover: #62412d;
  --bite-button-text: #fff8ec;
  --bite-button-ink: #302219;
}
/* Repeated class keeps the component independent of legacy page selectors. */
.bite-button.bite-button.bite-button.bite-button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 10px 20px;
  border: 2px solid var(--bite-button-ink);
  border-radius: 0;
  background: var(--bite-button-bg);
  color: var(--bite-button-text);
  box-shadow: 4px 4px 0 var(--bite-button-ink);
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: -.3px;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transform: translate(0, 0);
  transition: transform 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
  -webkit-tap-highlight-color: transparent;
}
@media (hover: hover) {
  .bite-button.bite-button.bite-button.bite-button:hover:not(:disabled):not([aria-disabled="true"]) {
    background: var(--bite-button-hover);
    color: var(--bite-button-text);
    box-shadow: 6px 6px 0 var(--bite-button-ink);
    transform: translate(-2px, -2px);
    text-decoration: none;
  }
}
.bite-button.bite-button.bite-button.bite-button:active:not(:disabled):not([aria-disabled="true"]) {
  background: var(--bite-button-hover);
  transform: translate(4px, 4px);
  box-shadow: 0 0 0 var(--bite-button-ink);
}
.bite-button.bite-button.bite-button.bite-button:focus-visible {
  outline: 2px solid var(--bite-button-ink);
  outline-offset: 7px;
}
.bite-button.bite-button.bite-button.bite-button:disabled,
.bite-button.bite-button.bite-button.bite-button[aria-disabled="true"] {
  background: #ded8ce;
  color: #746b60;
  border-color: #a89e91;
  box-shadow: 2px 2px 0 #a89e91;
  cursor: not-allowed;
  opacity: 1;
  transform: none;
}
.bite-button.bite-button.bite-button.bite-button[aria-busy="true"] { cursor: wait; }
.bite-button.bite-button.bite-button.bite-button[hidden] { display: none; }
.bite-button.bite-button.bite-button.bite-button .icon { width: 18px; height: 18px; }
@media (prefers-reduced-motion: reduce) {
  .bite-button.bite-button.bite-button.bite-button { transition: none; }
}
/* Keep the compact header action balanced on small screens. */
@media (max-width: 480px) {
  .subscribe-link.bite-button { font-size: 10px; padding: 8px 10px; min-height: 40px; gap: 6px; }
}

/* Three small scallops make a bite in the top-right corner.
   The outer filter follows the cutout, keeping the offset silhouette. */
@supports (mask-image: radial-gradient(circle, #000 50%, transparent 51%)) {
  .bite-button.bite-button.bite-button.bite-button {
    border: 0;
    padding: 12px 22px;
    background: transparent;
    box-shadow: none;
    filter: drop-shadow(4px 4px 0 var(--bite-button-ink));
    isolation: isolate;
    position: relative;
    overflow: visible;
  }
  .bite-button.bite-button.bite-button.bite-button::before,
  .bite-button.bite-button.bite-button.bite-button::after {
    content: '';
    position: absolute;
    pointer-events: none;
    z-index: -1;
  }
  .bite-button.bite-button.bite-button.bite-button::before { inset: 0; background: var(--bite-button-ink); }
  .bite-button.bite-button.bite-button.bite-button::after { inset: 2px; background: var(--bite-button-bg); }
  .bite-button.bite-button.bite-button.bite-button:hover:not(:disabled):not([aria-disabled="true"]) {
    background: transparent;
    box-shadow: none;
    filter: drop-shadow(6px 6px 0 var(--bite-button-ink));
  }
  .bite-button.bite-button.bite-button.bite-button:active:not(:disabled):not([aria-disabled="true"]) {
    background: transparent;
    box-shadow: none;
    filter: drop-shadow(0 0 0 var(--bite-button-ink));
  }
  .bite-button.bite-button.bite-button.bite-button:hover:not(:disabled):not([aria-disabled="true"])::after,
  .bite-button.bite-button.bite-button.bite-button:active:not(:disabled):not([aria-disabled="true"])::after { background: var(--bite-button-hover); }
  .bite-button.bite-button.bite-button.bite-button:disabled,
  .bite-button.bite-button.bite-button.bite-button[aria-disabled="true"] { background: transparent; box-shadow: none; filter: drop-shadow(2px 2px 0 #a89e91); }
  .bite-button.bite-button.bite-button.bite-button:disabled::before,
  .bite-button.bite-button.bite-button.bite-button[aria-disabled="true"]::before { background: #a89e91; }
  .bite-button.bite-button.bite-button.bite-button:disabled::after,
  .bite-button.bite-button.bite-button.bite-button[aria-disabled="true"]::after { background: #ded8ce; }
  @media(max-width:480px) { .subscribe-link.bite-button { padding:10px 12px; } }
}

/* The bite appears only while hovering; touch devices keep the rectangle. */
@media (hover: hover) {
  @supports (mask-composite: intersect) {
    .bite-button.bite-button.bite-button.bite-button:hover:not(:disabled):not([aria-disabled="true"])::before,
    .bite-button.bite-button.bite-button.bite-button:hover:not(:disabled):not([aria-disabled="true"])::after {
    mask-image: radial-gradient(circle at calc(100% - 13px) 0, transparent 4px, #000 4.5px), radial-gradient(circle at calc(100% - 5px) 4px, transparent 5px, #000 5.5px), radial-gradient(circle at 100% 12px, transparent 4px, #000 4.5px);
    mask-composite: intersect;
    clip-path: polygon(0 0, calc(100% - 13px) 0, 100% 13px, 100% 100%, 0 100%);
    }
  }
}

/* Leave room for the hard shadow in compact layouts. */
.bite-button.bite-button.bite-button.bite-button { flex-shrink: 0; max-width: 100%; }
.article-subscribe-link.bite-button { font-size: 12px; gap: 7px; }
.home-subscribe-form:has(.bite-button),
.query-field:has(.bite-button),
.search-form:has(.bite-button),
.admin-btn-group:has(.bite-button) { padding-right: 6px; padding-bottom: 6px; }
@media(max-width:480px) {
 .article-subscribe-link.bite-button { font-size: 10px; padding: 10px 12px; min-height: 40px; }
 .archive .bite-button { font-size: 12px; padding: 12px 14px; gap: 6px; }
}
.list-message .bite-button { display:flex; width:max-content; margin:16px auto 6px; }

/* Quiet choices share the coffee palette without the primary action shadow. */
:is(.filters, .opinion-filters, .category-pagination) button:not(.bite-button),
.filter-btn.filter-btn:not(.bite-button),
.page-btn.page-btn {
  min-height: 40px;
  min-width: 40px;
  padding: 8px 15px;
  border: 1px solid #d8cbbb;
  border-radius: 6px;
  background: #f6f0e7;
  color: #70543e;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  box-shadow: none;
  transform: none;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}
:is(.filters, .opinion-filters, .category-pagination) button:not(.bite-button):is(.selected, .active, [aria-pressed="true"], [aria-current="page"]),
.filter-btn.filter-btn:not(.bite-button).active,
.page-btn.page-btn.active {
  background: var(--bite-button-bg);
  border-color: var(--bite-button-bg);
  color: var(--bite-button-text);
  font-weight: 700;
}
@media(hover:hover) {
 :is(.filters, .opinion-filters, .category-pagination) button:not(.bite-button):not(:disabled):not(.selected):not(.active):not([aria-current="page"]):hover,
 .filter-btn.filter-btn:not(.bite-button):not(.active):hover,
 .page-btn.page-btn:not(:disabled):not(.active):hover {
   background: #ece1d2;
   border-color: #b99b7f;
   color: #513923;
   transform: none;
   box-shadow: none;
 }
}
:is(.filters, .opinion-filters, .category-pagination) button:not(.bite-button):focus-visible,
.filter-btn.filter-btn:not(.bite-button):focus-visible,
.page-btn.page-btn:focus-visible {
  outline: 2px solid #795239;
  outline-offset: 3px;
}
.category-pagination button:disabled,
.page-btn.page-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}
/* The existing compact paired-choice shape remains comfortable on mobile. */
.topics-page .vote-buttons .vote-btn:not(.bite-button) {
  background: #f6f0e7;
  border-color: #d8cbbb;
  color: #70543e;
}
.topics-page .vote-buttons .vote-btn:not(.bite-button).selected {
  background: var(--bite-button-bg);
  border-color: var(--bite-button-bg);
  color: var(--bite-button-text);
  box-shadow: none;
}
@media(hover:hover) {
 .topics-page .vote-buttons .vote-btn:not(.bite-button):not(.selected):not(:disabled):hover {
  background: #ece1d2;
  border-color: #b99b7f;
  color: #513923;
 }
}
@media(max-width:480px) {
 .filters { flex-wrap:wrap; }
 .filters button:not(.bite-button) { padding:8px 12px; font-size:11px; }
}
@media(prefers-reduced-motion:reduce) {
 :is(.filters, .opinion-filters, .category-pagination) button:not(.bite-button),
 .filter-btn.filter-btn:not(.bite-button), .page-btn.page-btn { transition:none; }
}

/* Navigation and choices use the same cutout, with cream for idle choices. */
.bite-button.bite-button.bite-button.bite-button--choice {
 --bite-button-bg:#f6f0e7;
 --bite-button-hover:#e8d9c5;
 --bite-button-text:#60432e;
 font-size:12px;
 min-height:40px;
 padding:10px 16px;
}
.bite-button.bite-button.bite-button.bite-button--choice:is(.active,.selected,[aria-current="page"],[aria-pressed="true"]) {
 --bite-button-bg:#795239;
 --bite-button-hover:#62412d;
 --bite-button-text:#fff8ec;
}
.nav .nav-inner, .article-nav nav { height:auto; min-height:64px; padding-top:10px; padding-bottom:14px; gap:12px; flex-wrap:wrap; }
.nav-links { gap:12px; }
.nav .nav-inner .bite-button { height:auto; }
.topics-page .vote-buttons { background:none; border:0; border-radius:0; box-shadow:none; padding:0 6px 6px 0; gap:12px; }
.filters, .opinion-filters { gap:12px; flex-wrap:wrap; padding-bottom:6px; }
.bite-button.bite-button--choice:disabled.selected { --bite-button-bg:#795239; color:#fff8ec; opacity:1; }
.bite-button.bite-button--choice:disabled.selected::before { background:var(--bite-button-ink); }
.bite-button.bite-button--choice:disabled.selected::after { background:var(--bite-button-bg); }
@media(max-width:600px) {
 .nav .nav-inner, .article-nav nav { gap:8px; justify-content:flex-start; }
 .nav-inner .bite-button.bite-button--choice, .article-nav .bite-button.bite-button.bite-button.bite-button--choice { padding:10px 9px; font-size:10px; }
 .nav .search-link { margin-left:0; }
}
@media(max-width:480px) {
 .subscribe-link.bite-button.bite-button.bite-button,
 .article-subscribe-link.bite-button.bite-button.bite-button { font-size:10px; padding:10px 12px; min-height:40px; gap:6px; }
}
