/* Badge kit page (/badges). Built on the site.css tokens: violet stamp ink on form paper, light and dark. */

/* Intro */
.bk-hero { padding: clamp(2rem, 6vw, 4.5rem) 0 clamp(2.5rem, 6vw, 4.5rem); }
.bk-hero h1 { font-size: clamp(2.6rem, 7vw, 4.75rem); line-height: 0.98; letter-spacing: -0.035em; }
.bk-hero .lede { max-width: 34ch; }
.bk-fine { color: var(--carbon); font-size: var(--step--1); margin: 1.5rem 0 0; }
.bk-fine a { color: var(--stamp); }

/* Platform list */
.bk-jump { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.75rem 0 0; }
.bk-jump a { color: var(--ink); font-weight: 700; font-size: var(--step--1); text-decoration: none; border: 2px solid var(--line); border-radius: 2rem; padding: 0.35rem 0.9rem; background: var(--field); }
.bk-jump a:hover { border-color: var(--stamp); color: var(--stamp); }

.bk-place { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; padding: clamp(2.5rem, 5vw, 4rem) 0; border-top: 1px solid var(--rule); scroll-margin-top: 1rem; }
.bk-place:first-of-type { margin-top: 2.5rem; border-top: 2px solid var(--line); }
.bk-fig { margin: 0; }
.bk-illo { width: 100%; height: auto; border-radius: 0.75rem; border: 2px solid var(--line); background: #1b2838; }
.bk-fig figcaption { color: var(--carbon); font-size: var(--step--1); margin-top: 0.75rem; }
.bk-text h3 { font-size: var(--step-2); margin-bottom: 0.75rem; }
.bk-text h4 { font-size: var(--step--1); text-transform: uppercase; letter-spacing: 0.08em; color: var(--carbon); font-weight: 800; margin: 0 0 0.6rem; line-height: 1.2; }
.bk-text p { max-width: 54ch; }
.bk-text ul { list-style: none; margin: 0; padding: 0; }
.bk-text li { position: relative; padding-left: 2rem; margin: 0 0 0.7rem; max-width: 54ch; }
.bk-do, .bk-dont { margin-top: 1.5rem; }
.bk-do li::before, .bk-dont li::before { content: ""; position: absolute; left: 0; top: 0.3em; width: 1.15rem; height: 1.15rem; background: currentColor; -webkit-mask: var(--bk-icon) center / contain no-repeat; mask: var(--bk-icon) center / contain no-repeat; }
.bk-do li::before { color: var(--stamp); --bk-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 94 92'%3E%3Cpath d='M0,56 L16,40 L36,60 L78,14 L94,30 L36,92 Z'/%3E%3C/svg%3E"); }
.bk-dont li::before { color: var(--error); --bk-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4.5 1.5 12 9l7.5-7.5 3 3L15 12l7.5 7.5-3 3L12 15l-7.5 7.5-3-3L9 12 1.5 4.5z'/%3E%3C/svg%3E"); }
.bk-how { margin-top: 1.5rem; color: var(--carbon); }
.bk-text a { color: var(--stamp); }

/* Rules */
.bk-rules { list-style: none; counter-reset: rule; margin: 2.25rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.6rem clamp(2rem, 5vw, 4rem); max-width: 62rem; }
.bk-rules li { counter-increment: rule; position: relative; padding-left: 3.4rem; min-height: 2.5rem; font-size: var(--step-0); line-height: 1.5; }
.bk-rules li::before { content: counter(rule); position: absolute; left: 0; top: 0; font-size: 2rem; font-weight: 800; line-height: 1; color: var(--stamp); letter-spacing: -0.04em; }
.bk-rules a { color: var(--stamp); }

/* Generator */
.bk-form { margin-top: 2rem; max-width: 36rem; }
.bk-form .field { margin: 0; }
.bk-formrow { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.bk-formrow input { flex: 1 1 12rem; min-width: 0; font: inherit; font-weight: 700; letter-spacing: 0.04em; color: var(--ink); background: var(--field); border: 2px solid var(--rule); border-radius: 0.5rem; padding: 0.75rem 0.85rem; text-transform: uppercase; }
.bk-formrow input::placeholder { text-transform: none; font-weight: 500; letter-spacing: 0; color: var(--carbon); }
.bk-formrow input:focus { outline: none; border-color: var(--stamp); box-shadow: 0 0 0 3px color-mix(in srgb, var(--stamp) 28%, transparent); }
.bk-status { min-height: 1.6em; margin: 0.9rem 0 0; font-weight: 700; max-width: 52rem; }
.bk-status:empty { min-height: 0; margin: 0; }
.bk-status[data-kind="error"] { color: var(--error); }
.bk-status[data-kind="ok"] { color: var(--stamp); }
.bk-result { margin-top: 2rem; }

.bk-cert { background: var(--field); border: 2px solid var(--ink); border-radius: 0.75rem; padding: 1.1rem 1.4rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 2rem; }
.bk-cert h3 { font-size: var(--step-1); }
.bk-cert p { margin: 0.25rem 0 0; color: var(--carbon); font-size: var(--step--1); }
.bk-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.6rem; }
.bk-tag { font-size: 0.8125rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; background: var(--stamp); color: var(--on-stamp); border-radius: 0.3rem; padding: 0.18rem 0.5rem; line-height: 1.3; }
.bk-tag[data-kind="muted"] { background: transparent; color: var(--ink); border: 2px solid var(--line); padding: 0.1rem 0.45rem; }
.bk-tag[data-kind="bad"] { background: var(--error); color: var(--paper); }
.bk-notice { margin: 1rem 0 0; padding: 0.9rem 1.2rem; border: 2px solid var(--error); border-radius: 0.6rem; background: var(--field); font-weight: 600; max-width: none; }
.bk-notice[data-kind="info"] { border-color: var(--stamp); }
.bk-notice a { color: var(--stamp); }

.bk-tools { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem 2rem; margin: 2rem 0 1rem; }
.bk-seg { border: 0; margin: 0; padding: 0; min-width: 0; }
.bk-seg-card { margin-top: 0.9rem; }
.bk-vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.bk-seg legend { font-weight: 700; margin: 0 0 0.4rem; padding: 0; }
.bk-seg-row { display: inline-flex; border: 2px solid var(--ink); border-radius: 0.5rem; overflow: hidden; background: var(--field); }
.bk-seg label { position: relative; display: block; }
.bk-seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.bk-seg span { display: block; padding: 0.5rem 1rem; font-weight: 700; font-size: var(--step--1); cursor: pointer; }
.bk-seg label + label span { border-left: 2px solid var(--ink); }
.bk-seg input:checked + span { background: var(--stamp); color: var(--on-stamp); }
.bk-seg input:focus-visible + span { outline: 3px solid var(--stamp); outline-offset: -5px; }

.bk-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
@media (min-width: 38rem) { .bk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64rem) { .bk-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 63.99rem) { .bk-help { display: none; } }
.bk-card { background: var(--field); border: 2px solid var(--ink); border-radius: 0.75rem; padding: 1rem 1rem 1.1rem; display: flex; flex-direction: column; min-width: 0; }
.bk-card h3 { font-size: 1.125rem; }
.bk-card .bk-note { color: var(--carbon); font-size: var(--step--1); margin: 0.25rem 0 0.9rem; max-width: none; }
.bk-pv { flex: 1; display: flex; align-items: center; justify-content: center; border-radius: 0.5rem; border: 1px solid var(--rule); padding: 0.9rem; min-height: 9rem; overflow: hidden; background: #fff; }
.bk-pv[data-bg="steam"] { background: #1b2838; border-color: #1b2838; }
.bk-pv[data-bg="check"] { background: #f5f3fa conic-gradient(#e3dff0 25%, transparent 0 50%, #e3dff0 0 75%, transparent 0) 0 0 / 16px 16px; }
.bk-pv img { display: block; max-width: 100%; height: auto; }
.bk-pv img[data-pixel] { image-rendering: pixelated; width: 264px; max-width: 100%; }
.bk-dl { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.9rem; }
.bk-btn { font: inherit; font-size: var(--step--1); font-weight: 700; line-height: 1.2; color: var(--ink); background: var(--paper); border: 2px solid var(--ink); border-radius: 0.5rem; padding: 0.5rem 0.8rem; cursor: pointer; text-decoration: none; display: inline-block; }
.bk-btn:hover { border-color: var(--stamp); color: var(--stamp); }
.bk-btn[aria-disabled="true"], .bk-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.bk-btn[aria-disabled="true"]:hover, .bk-btn:disabled:hover { border-color: var(--ink); color: var(--ink); }
.bk-btn.is-primary { background: var(--stamp); color: var(--on-stamp); border-color: var(--stamp); }
.bk-btn.is-primary:hover { filter: brightness(1.1); color: var(--on-stamp); }

.bk-snips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; margin-top: 2.5rem; }
.bk-snips h3 { font-size: var(--step-1); margin-bottom: 0.75rem; }
.bk-snip { background: var(--field); border: 2px solid var(--line); border-radius: 0.75rem; padding: 1rem 1.1rem 1.1rem; min-width: 0; }
.bk-snip p { font-size: var(--step--1); color: var(--carbon); margin: 0 0 0.75rem; max-width: none; }
.bk-snip pre { margin: 0 0 0.75rem; padding: 0.75rem 0.85rem; background: var(--paper); border: 1px solid var(--rule); border-radius: 0.5rem; font: 0.8125rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.bk-embed-pick { margin: 2.5rem 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.6rem; }
.bk-embed-pick h3 { flex-basis: 100%; font-size: var(--step-1); margin: 0 0 0.25rem; }
.bk-embed-pick label { font-weight: 700; }
.bk-embed-pick select + label { margin-left: 0.75rem; }
.bk-embed-pick + .bk-snips { margin-top: 1rem; }
.bk-help { justify-content: center; align-items: flex-start; background: var(--field); border-style: dashed; }
.bk-help .bk-note { margin-bottom: 1rem; }
.bk-embed-pick select { font: inherit; font-weight: 700; color: var(--ink); background: var(--paper); border: 2px solid var(--rule); border-radius: 0.5rem; padding: 0.45rem 0.6rem; max-width: 100%; }
.bk-zip { margin-top: 2.5rem; display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; align-items: center; }
.bk-zip p { margin: 0; color: var(--carbon); font-size: var(--step--1); }

@media (max-width: 56rem) {
  .bk-place { grid-template-columns: minmax(0, 1fr); }
  .bk-snips { grid-template-columns: minmax(0, 1fr); }
  .bk-rules { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: no-preference) {
  .bk-btn, .bk-jump a { transition: border-color 0.12s, color 0.12s; }
}
