/* A case on the spot: the parameter form, the case file (a manila folder like the docket's), "your call" and the solution.
 * Uses the tokens in styles.css and the pills, chips and matter tags in live.css. */
.spot { padding: 150px 0 120px; background: var(--ink); border-bottom: 1px solid rgba(255, 255, 255, .06); }
.spot-grid { display: grid; grid-template-columns: minmax(300px, 410px) minmax(0, 1fr); gap: 48px; align-items: start; }
.spot-form { position: sticky; top: 88px; max-height: calc(100vh - 110px); overflow: auto; padding: 22px 24px; border-radius: 12px; background: var(--ink-2); }
@media (max-width: 1000px) {
  .spot-grid { grid-template-columns: 1fr; gap: 32px; }
  .spot-form { position: static; max-height: none; }
}

/* ---------------------------------------------------------------- the form */
.spot-modes { margin-bottom: 14px; }
.spot-modes .chip { flex: 1; }
.spot-ai { margin: 0 0 18px; font-size: 14px; line-height: 1.5; color: var(--bone-2); }
.spot-ai code { color: var(--bone); }
.spot-field { min-width: 0; margin: 0 0 16px; }
.spot-label { display: block; margin: 0 0 8px; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--quiet); }
.spot-choice { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 8px; background: var(--ink); }
.spot-choice button { flex: 1 1 auto; min-height: 40px; padding: 6px 12px; border: 0; border-radius: 6px; background: transparent; color: var(--bone-2); font-size: 15px; font-weight: 500; transition: background .2s, color .2s; }
.spot-choice button:hover { color: var(--bone); }
.spot-choice button[aria-pressed="true"] { background: var(--bone); color: var(--ink); }
.spot-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.spot-form input[type="text"], .spot-form input[type="number"], .spot-form select, .spot-form textarea {
  width: 100%; min-height: 44px; padding: 8px 12px; border-radius: 6px; border: 1px solid #4a3f33; background: var(--ink); color: var(--bone); font: inherit; font-size: 16px;
}
.spot-form input[type="number"] { width: 110px; flex: none; }
.spot-form textarea { min-height: 150px; margin: 0 0 8px; resize: vertical; }
.spot-form .row { display: flex; align-items: center; gap: 8px; }
.spot-form .muted.small { margin: 6px 0 0; }
.spot-traps { min-width: 0; margin: 0 0 16px; padding: 0; border: 0; }
.spot-traps legend { padding: 0; }
.spot-traps > p { margin: -2px 0 10px; }
.trap-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.check.trap { margin: 0; padding: 8px 10px; border-radius: 8px; background: var(--ink); line-height: 1.3; }
.check.trap input { width: 20px; height: 20px; margin-top: 1px; }
.trap > span { display: grid; gap: 2px; }
.trap small { font-size: 12.5px; color: var(--quiet); }
.trap.off { opacity: .45; cursor: not-allowed; }
@media (max-width: 420px) { .trap-grid, .spot-pair { grid-template-columns: 1fr; } }
/* the PDF: a drop zone over a real file input (kept focusable for the keyboard, visually tucked away) */
.spot-drop { position: relative; display: grid; gap: 4px; margin: 0 0 10px; padding: 22px 18px; border: 2px dashed #4a3f33; border-radius: 10px; background: var(--ink); cursor: pointer; transition: border-color .2s, background .2s; }
.spot-drop:hover, .spot-drop.over { border-color: var(--brass); background: #15110d; }
.spot-drop:focus-within { outline: 3px solid var(--brass); outline-offset: 3px; }
.spot-drop b { font: 600 20px/1.2 var(--serif); }
.spot-drop small { font-size: 13px; color: var(--quiet); }
.spot-drop-name { font-size: 15px; color: var(--bone-2); overflow-wrap: anywhere; }
.spot-file { position: absolute; width: 1px; height: 1px; opacity: 0; }
.spot-go { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.spot-go .btn { flex: 1 1 auto; }
.spot-status { min-height: 1.2em; margin: 12px 0 0; font-size: 15px; color: var(--bone-2); }

/* ---------------------------------------------------------------- waiting, and before anything is asked */
.spot-out { min-width: 0; scroll-margin-top: 90px; }
.spot-empty { display: grid; place-content: center; min-height: 360px; padding: 32px; border: 2px dashed #3a3027; border-radius: 12px; text-align: center; }
.spot-empty p { margin: 0; }
.spot-empty-title { margin: 0 0 8px !important; font: 600 30px/1.1 var(--serif); }
.spot-working { display: flex; align-items: flex-start; gap: 16px; padding: 24px; border-radius: 12px; background: var(--ink-2); }
.spot-working p { margin: 0 0 4px; }
.spot-spinner { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--ink-3); border-top-color: var(--brass); animation: spot-spin .9s linear infinite; }
@keyframes spot-spin { to { transform: rotate(1turn); } }
@media (prefers-reduced-motion: reduce) { .spot-spinner { animation-duration: 3s; } }

/* ---------------------------------------------------------------- the case file */
.spot-case { position: relative; margin-top: 32px; color: var(--folder-ink); }
.spot-case .tab { position: absolute; top: -30px; left: 0; height: 32px; padding: 6px 18px 0; border-radius: 10px 10px 0 0; background: var(--brass); font-size: 14px; font-weight: 600; color: var(--brass-ink); }
.spot-case .body { padding: 28px 30px 26px; border-radius: 0 10px 10px 10px; background: var(--manila); }
.spot-case h3 { margin: 0 0 12px; font: 600 clamp(30px, 3.4vw, 42px)/1.02 var(--serif); letter-spacing: -.015em; }
.spot-case .parties { margin: 0 0 4px; font-size: 15px; color: #6a5534; }
.spot-case p { margin: 0 0 12px; font-size: 16.5px; line-height: 1.5; }
.spot-points ol { margin: 6px 0 14px; padding-left: 22px; }
.spot-points li { margin: 0 0 4px; }
.spot-evs { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 22px; margin: 14px 0; }
.spot-ev h4 { margin: 0 0 6px; font-size: 15px; }
.spot-ev.p h4 { color: #9c3a24; }
.spot-ev.d h4 { color: #1b6a64; }
.spot-ev ul { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.spot-ev li { padding: 8px 12px; border-radius: 6px; font-size: 15px; line-height: 1.35; }
.spot-ev.p li { background: rgba(232, 115, 90, .2); }
.spot-ev.d li { background: rgba(69, 179, 170, .2); }
.spot-ev .kind { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: #6a5534; }
.spot-ev small { font-size: 12px; color: #7d6845; }
@media (max-width: 640px) { .spot-evs { grid-template-columns: 1fr; } .spot-case .body { padding: 24px 20px; } }
.spot-wits { font-size: 15px !important; }
.spot-asked { margin: 16px 0 6px; padding-top: 14px; border-top: 1px dashed rgba(42, 29, 16, .3); }
.spot-asked .spot-label { color: #6a5534; }
.spot-asked ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.spot-asked li { padding: 4px 10px; border-radius: 99px; background: rgba(42, 29, 16, .1); font-size: 14px; font-weight: 500; }
.spot-asked .ok { font-weight: 700; color: #2e6b3a; }
.spot-asked .muted { margin: 8px 0 0; color: #6a5534; }
.spot-note { padding: 8px 12px; border-radius: 6px; background: rgba(42, 29, 16, .08); font-size: 14px !important; color: #5a4a30; }

/* ---------------------------------------------------------------- your call */
.spot-call { margin: 22px 0 0; padding: 22px 24px; border-radius: 12px; background: var(--ink-2); }
.spot-call h3 { margin: 0 0 8px; font: 600 28px/1.1 var(--serif); }
.spot-call-q { margin: 0 0 14px; line-height: 2.4; }
.spot-call-q select { margin: 0 4px; }
.spot-call-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.btn.guess { border: 2px solid transparent; background: var(--ink-3); }
.btn.guess.p { border-color: var(--p); }
.btn.guess.p:hover { background: rgba(232, 115, 90, .18); }
.btn.guess.d { border-color: var(--d); }
.btn.guess.d:hover { background: rgba(69, 179, 170, .18); }

/* ---------------------------------------------------------------- the solution */
.spot-solution { margin-top: 18px; }
.spot-solution:empty { display: none; }
.spot-solution h4 { margin: 28px 0 10px; font: 600 22px/1.2 var(--serif); }
.spot-verdict { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 14px; padding: 20px 24px; border-radius: 12px; background: var(--bone); color: var(--ink); }
.spot-verdict .side { padding: 2px 12px; border-radius: 99px; font-size: 15px; font-weight: 600; background: var(--d); color: #06201d; }
.spot-verdict.p .side { background: var(--p); color: #2a0f08; }
.spot-verdict .spot-label { flex-basis: 100%; margin: 0; color: #6a5534; }
.spot-verdict .word { font: 700 clamp(30px, 4vw, 46px)/1 var(--serif); letter-spacing: .02em; text-transform: uppercase; }
.spot-guess { margin-left: auto; padding: 4px 12px; border-radius: 99px; font-size: 15px; font-weight: 600; }
.spot-guess.ok { background: #cfeed6; color: #13401f; }
.spot-guess.no { background: #f6d3cd; color: #5a1a10; }
.spot-brief { margin: 18px 0 0; }
.spot-brief-text { margin: 0 0 8px; font: 500 20px/1.5 var(--serif); }
.spot-brief .muted { margin: 0; }
.spot-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 18px 0 0; }
.spot-stats > div { display: grid; align-content: start; gap: 6px; padding: 14px 16px; border-radius: 10px; background: var(--ink-2); }
.spot-stats small { font-size: 14px; line-height: 1.4; color: var(--bone-2); }
.spot-stats .big { font: 600 40px/1 var(--serif); }
.spot-stats .matter-tag { width: fit-content; margin: 0; }
@media (max-width: 700px) { .spot-stats { grid-template-columns: 1fr; } }
.spot-scroll { overflow-x: auto; }
.spot-matrix { width: 100%; min-width: 420px; border-collapse: separate; border-spacing: 6px; }
.spot-matrix caption { caption-side: bottom; padding: 4px 6px 0; text-align: left; }
.spot-matrix th { padding: 4px 8px; font-size: 15px; font-weight: 600; text-align: center; }
.spot-matrix th[scope="row"] { text-align: left; }
/* the Accuser's share of wins fills each box from the bottom, in the Accuser's colour */
.spot-matrix td {
  position: relative; padding: 16px 8px; border-radius: 8px; text-align: center;
  background: linear-gradient(to top, rgba(232, 115, 90, .42) calc(var(--w) * 100%), rgba(69, 179, 170, .14) calc(var(--w) * 100%));
}
.spot-matrix td b { font: 600 24px/1 var(--serif); }
.spot-matrix td.chosen { box-shadow: inset 0 0 0 3px var(--bone); }
.spot-matrix td.eq::after { content: "stable"; position: absolute; top: 4px; right: 6px; font-size: 11px; font-weight: 600; color: var(--brass); }
@media (max-width: 520px) {
  .spot-matrix { min-width: 0; border-spacing: 3px; }
  .spot-matrix th { padding: 4px 2px; font-size: 13px; }
  .spot-matrix td { padding: 14px 2px; }
  .spot-matrix td b { font-size: 18px; }
  .spot-matrix td.eq::after { top: 2px; right: 3px; font-size: 9px; }
}
.spot-plans, .spot-flips { margin: 12px 0 0; padding-left: 20px; color: var(--bone-2); }
.spot-plans li, .spot-flips li { margin: 0 0 6px; }
.spot-key { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.spot-key li { padding: 10px 14px; border-radius: 8px; background: var(--ink-2); line-height: 1.45; }
.spot-key small { color: var(--quiet); }
.spot-key .who { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.spot-key .who.p { background: var(--p); color: #2a0f08; }
.spot-key .who.d { background: var(--d); color: #06201d; }
.spot-key .who.j { background: var(--brass); color: var(--brass-ink); }
.spot-why { margin-top: 22px; }
.spot-why summary { min-height: 32px; font-weight: 600; cursor: pointer; }
.spot-why p { color: var(--bone-2); }
.spot-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 0; }
