/* Strategist page: octopus backdrop, red-string board, chess moves */
.archive.st { background: #120606 url("assets/octopus-tentacles-background.webp") center / cover fixed no-repeat; }
@media (max-width: 900px) { .archive.st { background: #120606 url("assets/octopus-tentacles-background.webp") center top / 100% auto repeat-y; } }
.st .sheet { overflow: hidden; }

.sec-title { font-family: "Archivo", sans-serif; font-stretch: 125%; font-weight: 700; font-size: clamp(24px, 3vw, 38px); line-height: 1; text-transform: uppercase; }
.sec-title em { font-family: "Inter", sans-serif; font-stretch: normal; font-style: italic; font-weight: 500; text-transform: none; color: var(--red); letter-spacing: -.03em; }
.sec-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; border-bottom: 2px solid var(--ink2); padding-bottom: 12px; }

/* intro */
.st-intro { margin-top: 26px; display: grid; grid-template-columns: 1.3fr 1fr; gap: 34px; align-items: start; }
.st-big { font-size: clamp(22px, 2.6vw, 32px); line-height: 1.25; font-weight: 600; letter-spacing: -.02em; }
.st-lede { font-size: 15px; line-height: 1.65; color: #3d3832; border-left: 3px solid var(--red); padding-left: 16px; }

/* cork board */
.cork { position: relative; margin-top: 22px; aspect-ratio: 16 / 11; border-radius: 6px; overflow: hidden;
  background:
    radial-gradient(circle at 20% 30%, rgba(255,220,170,.08) 0 2px, transparent 3px) 0 0 / 23px 19px,
    radial-gradient(circle at 70% 60%, rgba(40,20,5,.35) 0 1.5px, transparent 2.5px) 0 0 / 17px 21px,
    radial-gradient(circle at 40% 80%, rgba(255,230,190,.06) 0 1px, transparent 2px) 0 0 / 11px 13px,
    linear-gradient(160deg, #9c6b3f, #7d5230 55%, #6a4426);
  box-shadow: inset 0 0 0 10px #3b2414, inset 0 0 0 12px #241509, inset 0 0 60px rgba(0,0,0,.45); }
.strings { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.strings path { fill: none; stroke: #c4161c; stroke-width: 2.2; stroke-linecap: round;
  stroke-dasharray: 1; stroke-dashoffset: 1; filter: drop-shadow(0 1px 1px rgba(0,0,0,.45)); transition: opacity .3s, stroke-width .3s; }
.cork.live .strings path { animation: draw 1.1s ease forwards; animation-delay: calc(var(--i) * 90ms + .5s); }
@keyframes draw { to { stroke-dashoffset: 0; } }
.cork.drawn .strings path { animation: none; stroke-dashoffset: 0; }
.cork.drawn .note { animation: none; }
.cork.focus .strings path { opacity: .15; }
.cork.focus .strings path.on { opacity: 1; stroke-width: 3.2; }

.pin { position: absolute; top: -7px; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; z-index: 3;
  background: radial-gradient(circle at 35% 30%, #ff7a7a, #b3121a 55%, #5c0508); box-shadow: 0 3px 4px rgba(0,0,0,.45); }

.note, .core { position: absolute; z-index: 2; left: calc(var(--x) * 1%); top: calc(var(--y) * 1%); }
.note { all: unset; display: block; box-sizing: border-box; position: absolute; z-index: 2; left: calc(var(--x) * 1%); top: calc(var(--y) * 1%);
  width: 15.5%; min-height: 96px; padding: 14px 12px 12px; cursor: pointer; color: #1d1a16;
  transform: translateX(-50%) rotate(var(--r)); box-shadow: 0 8px 14px rgba(0,0,0,.35), inset 0 -10px 18px rgba(0,0,0,.05);
  transition: transform .25s ease, opacity .3s, box-shadow .25s; opacity: 0; }
.note b { display: block; font-size: 14px; line-height: 1.2; font-weight: 700; letter-spacing: -.01em; }
.note span:not(.pin) { display: block; margin-top: 6px; font-size: 12px; line-height: 1.35; color: #4a4239; }
.note:hover, .note:focus-visible { transform: translateX(-50%) rotate(0deg) scale(1.06); z-index: 4; box-shadow: 0 14px 22px rgba(0,0,0,.4); }
.note:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.n-y { background: #f6e27a; } .n-p { background: #f4b6c2; } .n-b { background: #bfe0ef; }
.cork.live .note { opacity: 1; animation: drop .5s ease backwards; animation-delay: calc(var(--d, 0) * 70ms); }
@keyframes drop { from { opacity: 0; transform: translate(-50%, -26px) rotate(var(--r)); } }
.cork.focus .note { opacity: .35; }
.cork.focus .note.on { opacity: 1; }
.cork.focus .note.sel { transform: translateX(-50%) rotate(0deg) scale(1.1); z-index: 5; outline: 3px solid #c4161c; outline-offset: 2px; }

.core { width: 23%; transform: translateX(-50%) rotate(-1deg); background: #fbfaf7; padding: 22px 16px 18px; text-align: center;
  box-shadow: 0 12px 24px rgba(0,0,0,.4); border: 1px solid #ddd6cc; }
.core::after { content: ""; position: absolute; inset: 8px; border: 1.5px dashed rgba(163,25,31,.5); pointer-events: none; }
.core-k { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--red); }
.core-t { margin-top: 6px; font-family: "Archivo", sans-serif; font-stretch: 125%; font-weight: 700; font-size: clamp(18px, 2.2vw, 28px); line-height: 1; text-transform: uppercase; }
.core-s { margin-top: 8px; font-size: 12px; color: #5a5148; }

.clue { margin-top: 18px; border: 2px solid var(--ink2); background: #fbfaf7; padding: 16px 20px; display: grid; grid-template-columns: 90px 1fr; column-gap: 18px; }
.clue .mono { grid-row: span 2; color: var(--red); }
.clue h3 { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.clue p:last-child { margin-top: 4px; font-size: 14.5px; line-height: 1.6; color: #3d3832; }
.clue .links { color: var(--red); font-weight: 600; }

/* chess */
.game { margin-top: 26px; display: grid; grid-template-columns: minmax(0, 460px) 1fr; gap: 34px; align-items: start; }
.chess { position: relative; width: 100%; aspect-ratio: 1; border: 10px solid #2a1a10; border-radius: 4px; box-shadow: 0 14px 28px rgba(0,0,0,.3);
  background: repeating-conic-gradient(#e9dcc6 0 25%, #8a4b2f 0 50%) 0 0 / 25% 25%; }
.piece { position: absolute; width: 12.5%; height: 12.5%; display: grid; place-items: center; z-index: 1;
  left: calc(var(--c) * 12.5%); top: calc(var(--r) * 12.5%); transition: left .8s cubic-bezier(.6,.05,.3,1), top .8s cubic-bezier(.6,.05,.3,1), transform .3s, opacity .4s; }
.piece.moved { transform: scale(1.1); z-index: 3; }
.piece.gone { opacity: 0; transform: scale(.4); pointer-events: none; }
.pc { width: 86%; height: 86%; overflow: visible; filter: drop-shadow(0 2px 2px rgba(0,0,0,.25)); }
.pc * { stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.pw * { fill: #f8f4ec; stroke: #1d1a16; }
.pb * { fill: #45403c; stroke: #0f0d0c; }
.pc .cut { fill: none; } .pw .cut { stroke: #1d1a16; } .pb .cut { stroke: #e9e3d8; }
.pw .eye { fill: #1d1a16; stroke: none; } .pb .eye { fill: #e9e3d8; stroke: none; }
.chess .mark { position: absolute; width: 12.5%; height: 12.5%; left: calc(var(--c) * 12.5%); top: calc(var(--r) * 12.5%); background: rgba(196,22,28,.42); }
.chess .mark.from { background: rgba(196,22,28,.18); }
.chess.mate .king-b { animation: topple 1s ease .9s forwards; }
.chess.mate .king-b .pc { filter: drop-shadow(0 0 6px rgba(196,22,28,.9)); }
@keyframes topple { to { transform: rotate(80deg) translate(8%, 10%); } }
.mate-tag { position: absolute; left: 50%; top: 50%; z-index: 5; transform: translate(-50%, -50%) scale(.6) rotate(-6deg); opacity: 0; pointer-events: none;
  font-family: "Archivo", sans-serif; font-stretch: 125%; font-weight: 700; font-size: clamp(22px, 4vw, 40px); text-transform: uppercase;
  background: var(--red); color: #fff; padding: 10px 20px; box-shadow: 0 10px 24px rgba(0,0,0,.4); transition: opacity .4s 1.4s, transform .4s 1.4s; }
.chess.mate .mate-tag { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(-6deg); }

.movelist ol { list-style: none; padding: 0; counter-reset: m; }
.movelist li { counter-increment: m; display: grid; grid-template-columns: 40px 1fr; column-gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--rule); opacity: .45; transition: opacity .3s; cursor: pointer; }
.movelist li::before { content: counter(m); grid-row: span 2; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--ink2); font-weight: 700; font-size: 14px; }
.movelist li b { font-size: 16px; }
.movelist li span { font-size: 13.5px; line-height: 1.5; color: #3d3832; }
.movelist li.done { opacity: .75; }
.movelist li.cur { opacity: 1; }
.movelist li.cur::before { background: var(--red); border-color: var(--red); color: #fff; }
.movelist li.locked { cursor: default; opacity: .5; padding: 8px 0; }
.movelist li.locked b, .movelist li.locked span { display: none; }
.movelist li.locked::after { content: ""; grid-column: 2; align-self: center; height: 8px; border-radius: 4px; width: 60%;
  background: repeating-linear-gradient(90deg, rgba(21,19,17,.18) 0 10px, transparent 10px 16px); }
.movelist li.locked::before { grid-row: auto; border-style: dashed; color: #8a8178; }
.movelist li.up-next { opacity: 1; cursor: pointer; padding: 12px 0; }
.movelist li.up-next::before { border-style: solid; border-color: var(--red); color: var(--red); animation: pulse 1.8s ease-in-out infinite; }
.movelist li.up-next::after { content: "Tap to play move " counter(m) " \2192"; background: none; height: auto; width: auto; border-radius: 999px;
  justify-self: start; padding: 8px 16px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #fff; background: var(--ink2); }
.movelist li.up-next:hover::after, .movelist li.up-next:focus-visible::after { background: var(--red); }
.movelist li:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.movelist li.done:hover, .movelist li.cur:hover { opacity: 1; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(163,25,31,.5); } 50% { box-shadow: 0 0 0 8px rgba(163,25,31,0); } }
.chess { cursor: pointer; }
.chess.mate { cursor: default; }
.game-ctl { margin-top: 16px; display: flex; gap: 8px; flex-wrap: wrap; }
.game-ctl button { font: inherit; font-size: 13px; font-weight: 600; border: 1.5px solid var(--ink2); background: transparent; border-radius: 999px; padding: 7px 16px; cursor: pointer; color: var(--ink2); }
.game-ctl [hidden] { display: none; }
.game-ctl button:hover { background: var(--red); border-color: var(--red); color: #fff; }

@media (max-width: 900px) {
  .st-intro, .game { grid-template-columns: 1fr; }
  .chess { max-width: 440px; margin: 0 auto; width: 100%; }
}
@media (max-width: 760px) {
  .cork { aspect-ratio: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 26px 18px; padding: 34px 22px 26px; }
  .strings { display: none; }
  .cork::before { content: ""; position: absolute; left: 50%; top: 30px; bottom: 30px; border-left: 2px solid #c4161c; opacity: .7; }
  .note, .core { position: relative; left: auto; top: auto; width: auto; }
  .note { transform: rotate(var(--r)); opacity: 1; }
  .note:hover, .note:focus-visible, .cork.focus .note.sel { transform: rotate(0) scale(1.03); }
  .cork.live .note { animation: none; }
  .core { grid-column: 1 / -1; order: -1; transform: rotate(-1deg); width: auto; }
  .clue { grid-template-columns: 1fr; }
  .clue .mono { grid-row: auto; }
}
@media (max-width: 600px) { .st .arch-title { font-size: clamp(30px, 11vw, 64px); } }
@media (prefers-reduced-motion: reduce) {
  .strings path, .cork.live .strings path { animation: none; stroke-dashoffset: 0; }
  .cork.live .note { animation: none; }
  .piece, .chess .mark { transition: none; } .movelist li.up-next::before { animation: none; }
}