/* Course 1 activities (The Trip, Bits You Can Hold, Find the File). Builds on
   site.css and bench.css. */
.act { max-width: 1100px; }
.act-intro { max-width: 62ch; margin: .4rem 0 0; }
.act-h { font-family: var(--display); font-weight: normal; text-transform: uppercase; font-size: 1.4rem; margin: 0 0 .3rem; }
.act h3 { font-family: var(--display); font-weight: normal; text-transform: uppercase; font-size: 1.05rem; margin: 1rem 0 .4rem; }
.msg { margin: .8rem 0 0; padding: .6rem .8rem; background: #fff; border-left: 5px solid var(--hit); }
.msg.ok { border-left-color: var(--wall); }
.msg.warn { border-left-color: var(--copper); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: 4px 4px 0 var(--ink); }
.score { font-weight: 700; margin: .8rem 0 0; }

/* the trip: path diagram */
.path { display: flex; align-items: center; justify-content: space-between; gap: .2rem; background: var(--deep); border: 3px solid var(--ink); padding: .8rem; margin: .8rem 0 .4rem; overflow-x: auto; }
.node { display: grid; justify-items: center; gap: .2rem; min-width: 78px; padding: .45rem .5rem; background: #263b2e; color: var(--cream); border: 2px solid #4f6b58; font-size: .8rem; text-align: center; font-family: var(--mono); transition: background .25s, transform .25s; }
.node .ico { font-size: 1.5rem; line-height: 1; }
.node.lit { background: var(--hit); color: var(--ink); border-color: var(--ink); transform: translateY(-3px); }
.node.broken { background: var(--copper); color: #fff; }
.wire { flex: 1; min-width: 14px; height: 4px; background: #4f6b58; transition: background .25s; }
.wire.lit { background: var(--hit); }
.caption { min-height: 1.5em; font-weight: 700; margin: .2rem 0 .6rem; }
.order { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.card-step { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; gap: .6rem; align-items: center; background: #fff; border: 2px solid var(--ink); padding: .45rem .6rem; }
.card-step .n { font-family: var(--display); font-size: 1.3rem; color: var(--copper); width: 1.4rem; text-align: center; }
.card-step .txt b { font-weight: 400; }
.card-step .txt small { display: block; color: var(--muted); margin-top: .15rem; }
.card-step.right { border-color: var(--wall); box-shadow: inset 6px 0 0 var(--wall); }
.card-step.wrong { box-shadow: inset 6px 0 0 var(--copper); }
.card-step.solved .txt b { font-weight: 700; }
.card-step.now { background: #fff8de; }
.card-step.dragging { opacity: .5; }
.card-step.drop-here { box-shadow: 0 -4px 0 var(--hit); }
.card-step .grip { cursor: grab; touch-action: none; color: var(--muted); padding: .2rem; }
.card-step .arrows { display: flex; gap: .25rem; }

/* the trip: break it */
.case { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.2rem; }
.case .says { font-weight: 700; background: #fff; border-left: 5px solid var(--hit); padding: .5rem .7rem; }
.browser-err { display: grid; gap: .35rem; background: #fff; border: 2px solid #999; padding: 1rem; font-size: .92rem; }
.browser-err b { font-size: 1.1rem; }
.browser-err code { font-family: var(--mono); font-size: .78rem; color: var(--muted); }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.checks .tool.done { background: #e9efe9; box-shadow: none; }
.checks .result { margin: .3rem 0 0 .2rem; font-family: var(--mono); font-size: .82rem; }
.picks { display: flex; flex-wrap: wrap; gap: .6rem; }
.pick { font: inherit; font-family: var(--display); text-transform: uppercase; background: var(--cream); color: var(--ink); border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); padding: .55rem .9rem .45rem; cursor: pointer; }
.pick:hover:not(:disabled) { background: var(--hit); }
.pick.right { background: var(--wall); color: var(--hit); }
.pick.wrong { background: var(--copper); color: #fff; }
.pick:disabled { cursor: default; }
.again { margin-left: .6rem; }

@media (max-width: 760px) {
  .case { grid-template-columns: 1fr; }
  .node { min-width: 64px; font-size: .7rem; }
  .card-step { grid-template-columns: auto minmax(0, 1fr) auto; }
  .card-step .grip { display: none; }
}

/* sample benchmark */
.sets { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: .9rem; }
.set { font: inherit; width: 100%; height: 100%; text-align: left; display: grid; gap: .3rem; align-content: start; background: #fff; color: var(--ink); border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); padding: .8rem .9rem; cursor: pointer; }
.set b { font-family: var(--display); font-weight: normal; text-transform: uppercase; font-size: 1.15rem; }
.set:hover { background: #fff8de; transform: translate(-1px, -1px); }
.set.main { background: var(--hit); }
.bm-note { margin-top: 1rem; color: var(--muted); opacity: 1; }
.bm-top { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-family: var(--mono); font-size: .85rem; }
.bm-progress { height: 8px; background: rgba(27,27,27,.12); margin: .5rem 0 1rem; }
.bm-progress i { display: block; height: 100%; width: 0; background: var(--copper); transition: width .3s; }
.bm-stem p { font-size: 1.15rem; font-weight: 700; margin: 0 0 .9rem; }
.code { font-family: var(--mono); background: var(--deep); color: var(--cream); padding: .8rem 1rem; margin: 0 0 .7rem; white-space: pre; overflow-x: auto; }
.bm-choices { display: grid; gap: .5rem; }
.choice { font: inherit; display: flex; align-items: center; gap: .7rem; text-align: left; background: #fff; color: var(--ink); border: 2px solid var(--ink); padding: .6rem .8rem; cursor: pointer; }
.choice:hover:not(:disabled) { background: #fff8de; }
.choice .letter { display: inline-grid; place-content: center; flex: none; width: 1.7rem; height: 1.7rem; border: 2px solid var(--ink); border-radius: 50%; font-family: var(--mono); font-size: .8rem; }
.choice.picked { background: #fff3c4; box-shadow: inset 6px 0 0 var(--hit); }
.choice.right { background: #e3f0e6; box-shadow: inset 6px 0 0 var(--wall); }
.choice.wrong { background: #fbe6dc; box-shadow: inset 6px 0 0 var(--copper); }
.choice:disabled { cursor: default; color: var(--ink); }
.msg .std { display: block; margin-top: .35rem; font-size: .85rem; color: var(--muted); }
.bm-score { font-family: var(--display); font-size: 3rem; line-height: 1; margin: .2rem 0 .6rem; }
.bm-score small { font-family: var(--mono); font-size: 1rem; margin-left: .6rem; color: var(--copper); }
.bm-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.bm-bars li { display: grid; grid-template-columns: minmax(0, 18rem) minmax(0, 1fr) 3rem; gap: .6rem; align-items: center; font-size: .9rem; }
.bm-bars .bar { height: 12px; background: rgba(27,27,27,.1); border: 1.5px solid var(--ink); }
.bm-bars .bar i { display: block; height: 100%; background: var(--wall); }
.bm-bars .bp { font-family: var(--mono); font-size: .8rem; text-align: right; }
.bm-missed { padding-left: 1.2rem; display: grid; gap: .6rem; }
.bm-missed b { display: block; }
.bm-missed span { font-size: .92rem; color: var(--muted); }
@media (max-width: 640px) { .bm-bars li { grid-template-columns: 1fr 3rem; } .bm-bars .bar { grid-column: 1 / -1; grid-row: 2; } }

/* bits */
.target { font-weight: 700; font-size: 1.15rem; margin: .4rem 0; }
.bcards { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: .4rem; }
.bcard { font: inherit; position: relative; aspect-ratio: 3 / 4; background: repeating-linear-gradient(45deg, var(--wall), var(--wall) 6px, var(--deep) 6px, var(--deep) 12px); border: 3px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); cursor: pointer; display: grid; place-content: center; padding: .3rem; color: var(--ink); }
.bcard.up { background: #fff; }
.bcard b { font-family: var(--display); font-size: clamp(1rem, 3vw, 1.6rem); }
.bcard .bit { position: absolute; bottom: .2rem; right: .35rem; font-family: var(--mono); font-size: .8rem; color: var(--hit); }
.bcard.up .bit { color: var(--copper); }
.dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; max-width: 100%; margin-bottom: .2rem; }
.dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--copper); }
.readout { display: flex; flex-wrap: wrap; gap: 1.2rem; align-items: center; font-family: var(--mono); margin: .8rem 0 0; }
.readout b { font-size: 1.3rem; margin-left: .3rem; }
.readrow { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.readrow input, .rgb input { font: inherit; font-family: var(--mono); font-size: 1.1rem; border: 2px solid var(--ink); padding: .35rem .5rem; width: 6rem; }
.pattern { font-family: var(--mono); font-size: 1.5rem; }
.colorrow { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 1rem; align-items: center; }
.swatch { width: 120px; height: 120px; border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.hexline { font-family: var(--mono); font-size: 1.4rem; margin: 0 0 .5rem; }
.pairs { white-space: pre; color: var(--copper); }
.rgb { display: flex; flex-wrap: wrap; gap: .7rem; align-items: end; margin: 0; }
.rgb label { display: grid; gap: .2rem; font-family: var(--mono); font-size: .75rem; text-transform: uppercase; }
.rgb input { width: 5rem; }
@media (max-width: 640px) { .bcards { grid-template-columns: repeat(4, minmax(0, 1fr)); } .colorrow { grid-template-columns: 1fr; } }

/* find the file */
.fx-grid { display: grid; grid-template-columns: minmax(230px, 1fr) minmax(0, 2.4fr); grid-template-areas: "tasks win" "tasks doc"; gap: 1rem; align-items: start; }
.fx-tasks { grid-area: tasks; }
.fx-win { grid-area: win; padding: 0; overflow: hidden; }
.fx-doc { grid-area: doc; }
.tasks { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; font-size: .92rem; }
.tasks li { display: grid; grid-template-columns: 1.7rem minmax(0, 1fr); gap: .5rem; }
.tasks .tick { display: grid; place-content: center; width: 1.6rem; height: 1.6rem; border: 2px solid var(--ink); border-radius: 50%; font-family: var(--mono); font-size: .75rem; }
.tasks li.done .tick { background: var(--wall); color: var(--hit); border-color: var(--wall); }
.tasks li.done span:last-child { color: var(--muted); text-decoration: line-through; }
.fx-bar { display: flex; gap: .5rem; align-items: center; background: #e8e6df; border-bottom: 2px solid var(--ink); padding: .5rem; flex-wrap: wrap; }
.crumbs { flex: 1; display: flex; align-items: center; gap: .2rem; flex-wrap: wrap; background: #fff; border: 1.5px solid #999; padding: .25rem .4rem; min-height: 2rem; font-size: .9rem; }
.crumb { font: inherit; background: none; border: 0; padding: .1rem .3rem; cursor: pointer; color: var(--ink); }
.crumb:hover { background: #fff3c4; }
.sep { color: var(--muted); }
#search { font: inherit; font-size: .9rem; border: 1.5px solid #999; padding: .3rem .5rem; width: 12rem; }
.fx-tools { display: flex; flex-wrap: wrap; gap: .35rem; padding: .45rem .5rem; border-bottom: 1px solid #ccc; background: #f5f3ee; }
.fx-body { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); min-height: 300px; }
.fx-side { background: #f0eee8; border-right: 1px solid #ccc; padding: .4rem; display: grid; align-content: start; gap: .2rem; }
.side-item { font: inherit; font-size: .9rem; text-align: left; background: none; border: 0; padding: .35rem .45rem; cursor: pointer; color: var(--ink); }
.side-item.on { background: #fff3c4; font-weight: 700; }
.fx-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: .4rem; padding: .6rem; align-content: start; background: #fff; }
.item { display: grid; justify-items: center; gap: .25rem; padding: .5rem .3rem; border: 2px solid transparent; text-align: center; cursor: pointer; user-select: none; touch-action: none; font-size: .85rem; overflow-wrap: anywhere; }
.item:hover { background: #f6f3ea; }
.item.sel { background: #fff3c4; border-color: var(--hit); }
.item .ico { font-size: 2rem; line-height: 1; }
.item .where { font-size: .7rem; color: var(--muted); }
.item .ren { font: inherit; width: 100%; border: 2px solid var(--ink); padding: .1rem .2rem; text-align: center; }
.item.ghost { position: fixed; z-index: 60; pointer-events: none; background: #fff; border-color: var(--ink); box-shadow: 4px 4px 0 var(--ink); transform: translate(-50%, -50%); width: 110px; }
.droppable { outline: 3px solid var(--copper) !important; background: #fbe6dc !important; }
.fx-items .empty { color: var(--muted); grid-column: 1 / -1; }
.fx-path { margin: 0; padding: .35rem .6rem; font-family: var(--mono); font-size: .78rem; background: #f5f3ee; border-top: 1px solid #ccc; min-height: 1.8em; }
.fx-status { margin: 0; padding: .4rem .6rem; font-size: .88rem; background: var(--deep); color: var(--cream); min-height: 2em; }
.doc-bar { display: flex; justify-content: space-between; align-items: center; gap: .6rem; margin-bottom: .5rem; }
.fx-doc textarea { font: inherit; width: 100%; border: 2px solid var(--ink); padding: .5rem; background: #fff; }
.pk-tree { display: grid; gap: .1rem; max-height: 50vh; overflow: auto; border: 2px solid var(--ink); background: #fff; padding: .3rem; margin: .5rem 0; }
.pk-item { font: inherit; text-align: left; background: none; border: 0; padding: .3rem .6rem; cursor: pointer; }
.pk-item.on, .pk-item:hover { background: #fff3c4; }
.pk-where { font-family: var(--mono); font-size: .8rem; }
#pk-name-row label { display: grid; gap: .3rem; font-family: var(--mono); font-size: .75rem; text-transform: uppercase; }
#pk-name { font: inherit; text-transform: none; border: 2px solid var(--ink); padding: .4rem; }
@media (max-width: 900px) { .fx-grid { grid-template-columns: 1fr; grid-template-areas: "tasks" "win" "doc"; } }
@media (max-width: 560px) { .fx-body { grid-template-columns: 1fr; } .fx-side { display: flex; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid #ccc; } #search { width: 100%; } }
@media (max-width: 480px) {
  .path { padding: .5rem .4rem; }
  .node { min-width: 0; flex: 1; font-size: .58rem; padding: .3rem .15rem; }
  .node .ico { font-size: 1.1rem; }
  .wire { min-width: 4px; }
}
