/* Pick one (docs/PICK-ONE.md): cards in lists and the Inbox, the side-by-side compare page, and the new form.
   Locky Design System tokens only. */

/* ---------- cards */
.pk-cards { list-style: none; margin: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.pk-card { min-width: 0; }
.pk-card-link {
  display: grid; gap: 8px; height: 100%; padding: 12px 14px; color: var(--ink); text-decoration: none;
  border: 2px solid var(--keyline); border-radius: var(--radius); background: var(--surface); box-shadow: var(--slab-s);
}
.pk-card-link:hover { background: var(--sunk); }
.pk-card-link:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.pk-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.pk-card-q { font-size: 15px; line-height: 1.3; overflow-wrap: anywhere; }
.pk-card-go { justify-self: start; pointer-events: none; }

.pk-thumbs { display: flex; gap: 6px; flex-wrap: wrap; }
.pk-thumb {
  position: relative; width: 64px; height: 64px; flex: none; overflow: hidden; display: grid; place-items: center;
  border: 2px solid var(--keyline); border-radius: var(--radius-s); background: var(--sunk); color: var(--muted);
}
.pk-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pk-thumb-plain { align-content: center; gap: 0; }
.pk-thumb-label {
  position: absolute; left: 3px; top: 3px; min-width: 18px; padding: 0 4px; border-radius: 6px; font-size: 11px; font-weight: 800;
  line-height: 18px; text-align: center; background: var(--gold); color: var(--face-ink); max-width: 56px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pk-thumb-kind { font-size: 10px; font-weight: 600; margin-top: 2px; }

/* ---------- the compare page */
.pk-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: -6px 0 12px; }
.pk-detail { padding: 12px 14px; margin-bottom: 12px; }
.pk-detail .prose { margin: 0; white-space: pre-wrap; }

.pk-grid { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 14px; }
.pk-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pk-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pk-option {
  display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 12px;
  border: 2px solid var(--keyline); border-radius: var(--radius); background: var(--surface); box-shadow: var(--slab-s);
}
.pk-option.pk-chosen { background: var(--attn); outline: 3px solid var(--gold); outline-offset: -1px; }
.pk-option-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 10px; }
.pk-option-label { font-family: var(--display); font-size: 20px; line-height: 1.1; overflow-wrap: anywhere; }
.pk-option-body { flex: 1 1 auto; min-width: 0; }

.pk-picture { display: block; border-radius: var(--radius-s); overflow: hidden; background: var(--sunk); border: 2px solid var(--line-strong); }
.pk-picture img { display: block; width: 100%; max-height: 64vh; object-fit: contain; }
.pk-media { display: block; width: 100%; max-height: 64vh; border-radius: var(--radius-s); background: #000; }
.pk-frame { border: 2px solid var(--line-strong); border-radius: var(--radius-s); overflow: hidden; background: var(--sunk); }
.pk-frame iframe { display: block; width: 100%; height: min(60vh, 600px); border: 0; background: var(--surface); }
.pk-words { padding: 14px; border-radius: var(--radius-s); background: var(--sunk); font-size: 17px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.pk-words audio { width: 100%; }
.pk-linkcard {
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; padding: 14px;
  border: 2px solid var(--keyline); border-radius: var(--radius-s); background: var(--accent-soft); color: var(--ink); text-decoration: none;
}
.pk-linkcard:hover { background: var(--sunk); }
.pk-linkcard-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: var(--surface); border: 2px solid var(--keyline); }
.pk-linkcard-text { display: grid; gap: 2px; min-width: 0; }
.pk-linkcard-text strong { overflow-wrap: anywhere; }

/* The pick button is the radio's label, so the whole thing is one big target. */
.pk-pick { position: relative; justify-content: center; width: 100%; cursor: pointer; }
.pk-pick .pk-radio { position: absolute; opacity: 0; pointer-events: none; }
.pk-pick:has(.pk-radio:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.pk-pick:has(.pk-radio:checked) { background: var(--gold); color: var(--face-ink); }
.pk-pick:has(.pk-radio:checked) span::before { content: "✓ "; }

.pk-result { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.pk-bar { display: block; height: 10px; border-radius: 99px; background: var(--tray); overflow: hidden; border: 1px solid var(--line-strong); }
.pk-bar-fill { display: block; height: 100%; background: var(--accent); border-radius: 99px; }

.pk-answer { margin-bottom: 14px; }
.pk-hidden-note { margin: 0 0 14px; }
.pk-notes { list-style: none; margin: 0; display: grid; gap: 12px; }
.pk-note-head { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.pk-note-text { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------- the new form */
/* Buttons and panels set their own display, which would beat the hidden attribute. */
.pk-new [hidden] { display: none !important; }
.pk-edit-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.pk-edit { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 10px; border: 2px solid var(--line-strong); border-radius: var(--radius-s); background: var(--sunk); }
.pk-edit-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pk-edit-head > input[type="text"] { flex: 1 1 180px; min-width: 0; }
.pk-edit-letter {
  width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 8px; font-weight: 800;
  background: var(--gold); color: var(--face-ink); border: 2px solid var(--keyline);
}
.pk-kinds { display: inline-flex; border: 2px solid var(--keyline); border-radius: 99px; overflow: hidden; background: var(--surface); }
.pk-kind { position: relative; cursor: pointer; }
.pk-kind input { position: absolute; opacity: 0; pointer-events: none; }
.pk-kind span { display: block; padding: 4px 12px; font-size: 13px; font-weight: 700; }
.pk-kind + .pk-kind span { border-left: 2px solid var(--keyline); }
.pk-kind:has(input:checked) span { background: var(--accent); color: var(--accent-ink); }
.pk-kind:has(input:focus-visible) span { outline: 3px solid var(--focus); outline-offset: -3px; }
.pk-edit-body input[type="url"], .pk-edit-body textarea { width: 100%; }
.pk-file { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.pk-file-input { max-width: 100%; }
.pk-file-state { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pk-file-state:empty { display: none; }
.pk-file-state progress { flex: 1 1 120px; }
.pk-file-preview { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; border: 2px solid var(--keyline); }

@media (max-width: 820px) {
  .pk-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .pk-grid-2, .pk-grid-3 { grid-template-columns: minmax(0, 1fr); }
  .pk-frame iframe { height: 52vh; }
}

/* ---------- pins on a picture (js/pins/board.js), Pick one and Feedback */
.pin-board { display: grid; gap: 8px; }
.pin-stage { position: relative; line-height: 0; border-radius: var(--radius-s); overflow: hidden; background: var(--sunk); border: 2px solid var(--line-strong); }
.pin-stage img { display: block; width: 100%; max-height: 64vh; object-fit: contain; user-select: none; }
.pin-stage.pin-armed { cursor: crosshair; outline: 3px dashed var(--gold); outline-offset: -3px; }
/* The dots sit on the picture itself, which object-fit may letterbox; pictures fill the width, so it lines up. */
.pin-dots { position: absolute; inset: 0; pointer-events: none; }
.pin-dot {
  position: absolute; transform: translate(-50%, -50%); width: 26px; height: 26px; padding: 0; border-radius: 50%;
  display: grid; place-items: center; font: 800 12px/1 var(--font); pointer-events: auto; cursor: pointer;
  background: var(--gold); color: var(--face-ink); border: 2px solid var(--keyline); box-shadow: 0 2px 0 var(--keyline);
}
.pin-dot.pin-mine { background: var(--face-sky); }
.pin-dot.pin-new { background: var(--surface); pointer-events: none; }
.pin-dot:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.pin-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.pin-bar [hidden], .pin-board [hidden] { display: none !important; }
.pin-form { display: grid; gap: 6px; }
.pin-form textarea { width: 100%; }
.pin-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pin-list:empty { display: none; }
.pin-list li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 8px; padding: 4px; border-radius: 8px; }
.pin-list li.pin-flash { background: var(--attn); }
.pin-num { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; background: var(--gold); color: var(--face-ink); border: 2px solid var(--keyline); }
.pin-text { overflow-wrap: anywhere; font-size: 14px; }

/* ---------- Rank (docs/RANK.md): the rows people drag or number, and the overall order */
.pk-order-title { margin: 0 0 4px; font-size: 15px; }
.pk-order-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.pk-order-item {
  display: grid; grid-template-columns: auto auto auto minmax(0, 1fr); align-items: center; gap: 8px; padding: 6px 8px;
  border: 2px solid var(--line-strong); border-radius: var(--radius-s); background: var(--surface);
}
.pk-order-item .pk-thumb { width: 44px; height: 44px; }
.pk-order-item .pk-thumb-label, .pk-order-item .pk-thumb-kind { display: none; }
/* The handle: big enough for a finger, and it keeps the page from scrolling while a row is dragged by it. */
.pk-order-grip {
  width: 36px; height: 36px; padding: 0; display: grid; place-items: center; cursor: grab; touch-action: none;
  border: 2px solid var(--keyline); border-radius: 8px; background: var(--sunk); color: var(--ink);
}
.pk-order-grip:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.pk-order-place { width: 84px; flex: none; font-weight: 800; }
.pk-order-label { font-weight: 700; overflow-wrap: anywhere; }
.pk-order-item.pk-dragging { background: var(--attn); outline: 3px solid var(--gold); outline-offset: -1px; box-shadow: var(--slab-s); }
.pk-order-item.pk-dragging .pk-order-grip { cursor: grabbing; }
.pk-order-busy { user-select: none; -webkit-user-select: none; }

.pk-overall { list-style: none; margin: 0; display: grid; gap: 8px; }
.pk-overall-item { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(60px, 1fr) auto; align-items: center; gap: 6px 10px; }
.pk-overall-place {
  min-width: 30px; height: 30px; padding: 0 6px; border-radius: 99px; display: grid; place-items: center; font-weight: 800; font-size: 13px;
  background: var(--gold); color: var(--face-ink); border: 2px solid var(--keyline);
}
.pk-overall-label { font-weight: 700; overflow-wrap: anywhere; }
.pk-each { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 8px; }
.pk-each li { display: grid; grid-template-columns: minmax(70px, 140px) minmax(0, 1fr); align-items: start; gap: 4px 10px; }
.pk-each-name { overflow-wrap: anywhere; }
.pk-each-order { display: flex; flex-wrap: wrap; gap: 4px 6px; }
@media (max-width: 560px) {
  .pk-overall-item { grid-template-columns: auto minmax(0, 1fr); }
  .pk-overall-item .pk-bar, .pk-overall-points { grid-column: 1 / -1; }
  .pk-each li { grid-template-columns: minmax(0, 1fr); }
}

.pk-extras { border: 2px dashed var(--line-strong); border-radius: var(--radius); padding: 10px 14px; }
.pk-extras > summary { cursor: pointer; font-weight: 800; }
.pk-extras[open] > summary { margin-bottom: 10px; }

/* ---------- what my AI made ready (js/picks/drafts.js), on the list pages and in From your AI */
.pk-draft { display: grid; gap: 8px; }
.pk-draft-q { margin: 0; font-size: 16px; overflow-wrap: anywhere; }
.pk-draft-facts { margin: 0; display: grid; gap: 2px; }
.pk-draft .ag-actions { flex-wrap: wrap; }

/* The "something to try" example on Your AI. */
.ya-try { margin: .8rem 0 .4rem; }
.ya-try .ag-quote { margin: .3rem 0; }
