/* fde.css — activities used only in the Forward Deployed Engineering course.
   Colours only through the shared variables, so light and dark both work. */

/* Small selectable buttons */
.chip { font-family: var(--body); font-size: 0.95rem; padding: 6px 12px; border: 2px solid var(--ink); border-radius: 999px; background: var(--card); color: var(--ink); cursor: pointer; line-height: 1.3; }
.chip:hover { background: var(--note-yellow); }
.chip.on { background: var(--hl-yellow); color: var(--on-hl); }
.chip.ok { background: var(--hl-green); color: var(--on-hl); border-color: var(--good); }
.chip.no { background: var(--note-pink); border-color: var(--redpen); }
.chip.used { opacity: .45; cursor: default; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }

/* A message from the client */
.mail { background: var(--card); border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent); border-radius: 6px; padding: 14px 18px; font-size: 1.02rem; line-height: 1.6; box-shadow: 0 10px 22px -16px rgba(20,24,50,.4); }
.mail .from { font-size: 0.85rem; color: var(--pencil); margin-bottom: 6px; }
.mail p { margin: 0 0 8px; }
.vague { font: inherit; padding: 0 3px; margin: 0; border: 0; border-bottom: 2px dotted var(--pen); border-radius: 2px; background: none; color: inherit; cursor: pointer; }
.vague:hover { background: var(--note-yellow); }
.vague.found { background: var(--hl-yellow); color: var(--on-hl); border-bottom-color: transparent; }
.qlist { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 6px; min-height: 3em; }
.qlist li { font-family: var(--hand); font-size: 1.1rem; color: var(--pen); }
.qlist li b { font-family: var(--body); font-weight: 700; color: var(--ink); font-size: 0.9rem; }
.count { font-family: var(--hand); font-size: 1.1rem; color: var(--pencil); margin-top: 8px; }

/* Sorting into two or more boxes */
.bins { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 12px; }
.bin { border: 2px dashed var(--pencil); border-radius: 8px; padding: 8px; min-height: 80px; background: transparent; text-align: left; cursor: pointer; color: var(--ink); font: inherit; display: block; width: 100%; }
.bin:hover { border-color: var(--pen); background: var(--note-blue); }
.bin h4 { margin: 0 0 6px; font-family: var(--head); font-size: 1.15rem; font-weight: 400; }
.bin .chip { margin: 3px 3px 0 0; font-size: 0.85rem; cursor: default; }
.picked { min-height: 2.2em; font-family: var(--hand); color: var(--pencil); font-size: 1.05rem; }

/* People cards */
.people { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.person { text-align: left; font: inherit; padding: 10px 12px; border: 2px solid var(--ink); border-radius: 8px; background: var(--card); color: var(--ink); cursor: pointer; line-height: 1.35; }
.person:hover { background: var(--note-yellow); }
.person b { display: block; font-family: var(--head); font-size: 1.15rem; font-weight: 400; }
.person small { display: block; color: var(--pencil); font-size: 0.8rem; margin-bottom: 4px; }
.person span { font-size: 0.88rem; }
.person.ok { background: var(--hl-green); color: var(--on-hl); border-color: var(--good); }
.person.ok small { color: var(--on-hl); }
.person.no { background: var(--note-pink); border-color: var(--redpen); }

/* Facts about the client */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.fact { background: var(--note-yellow); padding: 10px 12px; border-radius: 2px 2px 6px 2px; box-shadow: 0 8px 14px -12px rgba(20,24,50,.5); color: var(--ink); }
.fact:nth-child(2n) { background: var(--note-blue); }
.fact:nth-child(3n) { background: var(--note-green); }
.fact .big { font-family: var(--head); font-size: 1.8rem; line-height: 1.1; }
.fact .what { font-size: 0.85rem; }

/* Steps through a day or a story */
.day { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: 0.95rem; }
.day li { display: grid; grid-template-columns: 3.6em 1fr; gap: 8px; align-items: start; padding: 6px 10px; line-height: 1.4; border-radius: 6px; background: var(--card); border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent); }
.day li.off { visibility: hidden; }
.day li.now { background: var(--note-yellow); }
.day .t { font-family: var(--mono); font-size: 0.85rem; color: var(--pencil); padding-top: 2px; }
.day .tag { display: inline-block; white-space: nowrap; font-size: 0.75rem; padding: 0 8px; border-radius: 999px; margin-left: 6px; color: var(--on-hl); }
.tag.eng { background: var(--hl-blue); }
.tag.cli { background: var(--hl-orange); }
.btnrow { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; align-items: center; }

/* A 24-hour line of message times */
.clock { position: relative; height: 92px; margin: 10px 4px 0; }
.clock .bar { position: absolute; left: 0; right: 0; top: 46px; height: 2px; background: var(--ink); }
.clock .night { position: absolute; top: 20px; height: 54px; background: var(--note-blue); border-radius: 4px; }
.clock .dot { position: absolute; top: 37px; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; background: var(--card); border: 2px solid var(--ink); }
.clock .dot.lit { background: var(--hl-orange); }
.clock .lab { position: absolute; top: 76px; font-family: var(--mono); font-size: 0.72rem; color: var(--pencil); transform: translateX(-50%); }
.clock .nightlab { position: absolute; top: 2px; font-family: var(--hand); font-size: 0.9rem; color: var(--pen); }

/* Problem tree */
.tree { display: grid; gap: 10px; }
.tree .goal { justify-self: center; text-align: center; padding: 8px 16px; border: 2px solid var(--ink); border-radius: 8px; background: var(--hl-yellow); color: var(--on-hl); font-family: var(--head); font-size: 1.25rem; }
.tree .row3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.cause { font: inherit; font-size: 0.92rem; text-align: left; padding: 8px 10px; border: 2px solid var(--ink); border-radius: 8px; background: var(--card); color: var(--ink); cursor: pointer; line-height: 1.35; }
.cause:hover { background: var(--note-yellow); }
.cause .fix { display: block; margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--pencil); font-family: var(--hand); color: var(--pen); font-size: 1rem; }
.cause.open { background: var(--note-green); }
.tree .arrow { text-align: center; color: var(--pencil); font-family: var(--hand); }

/* Scoring table */
.score { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.score th, .score td { padding: 6px 6px; border-bottom: 1px solid var(--rule); text-align: center; }
.score th:first-child, .score td:first-child { text-align: left; }
.score select { font: inherit; padding: 2px 4px; border: 2px solid var(--ink); border-radius: 6px; background: var(--card); color: var(--ink); }
.score .tot { font-family: var(--mono); font-weight: 600; }
.score tr.best td { background: var(--note-green); }

/* A short conversation */
.chat { display: grid; gap: 8px; }
.bub { max-width: 85%; padding: 8px 12px; border-radius: 12px; line-height: 1.45; font-size: 0.98rem; }
.bub.them { background: var(--note-orange); justify-self: start; border-bottom-left-radius: 2px; }
.bub.you { background: var(--note-blue); justify-self: end; border-bottom-right-radius: 2px; }
.bub small { display: block; font-size: 0.75rem; color: var(--pencil); }
.replies { display: grid; gap: 6px; margin-top: 4px; }
.replies button { text-align: left; font: inherit; font-size: 0.95rem; }
.say-why { font-family: var(--hand); font-size: 1.05rem; min-height: 1.4em; }
.say-why.good { color: var(--good); }
.say-why.bad { color: var(--redpen); }

/* Scope doc builder */
.scope { display: grid; gap: 8px; }
.scope .line { display: grid; grid-template-columns: 8.5em 1fr; gap: 8px; align-items: center; }
.scope .line b { font-family: var(--head); font-weight: 400; font-size: 1.1rem; }
.scope select { font: inherit; font-size: 0.9rem; width: 100%; padding: 4px 6px; border: 2px solid var(--ink); border-radius: 6px; background: var(--card); color: var(--ink); }
.scope select.ok { border-color: var(--good); background: var(--note-green); }
.scope select.no { border-color: var(--redpen); background: var(--note-pink); }
@media (max-width: 560px) { .scope .line { grid-template-columns: 1fr; gap: 2px; } }

/* Practice problems */
.prob { padding: 12px 0; border-top: 1px dashed var(--rule); }
.prob:first-of-type { border-top: 0; }
.prob .ask { margin-bottom: 8px; }
.prob input { font: inherit; width: 9em; padding: 4px 8px; border: 2px solid var(--ink); border-radius: 6px; background: var(--card); color: var(--ink); }
.prob .res { font-family: var(--hand); font-size: 1.05rem; margin-top: 6px; min-height: 1.3em; }
.prob .res.good { color: var(--good); }
.prob .res.bad { color: var(--redpen); }
.prob .work { margin-top: 6px; font-size: 0.92rem; background: var(--note-blue); padding: 8px 10px; border-radius: 6px; }
.remember { background: var(--note-yellow); padding: 10px 14px; border-radius: 4px; margin-bottom: 14px; line-height: 1.7; color: var(--ink); }
.remember b:first-child { font-family: var(--head); font-weight: 400; font-size: 1.15rem; }

/* Small data tables inside activities */
.mini { border-collapse: collapse; font-size: 0.85rem; width: 100%; }
.mini th, .mini td { padding: 4px 6px; border-bottom: 1px solid var(--rule); text-align: left; white-space: nowrap; }
.mini th { font-weight: 700; }
.mini td.n { text-align: right; font-family: var(--mono); }
.twocol { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .twocol { grid-template-columns: 1fr; } }
.cap { font-size: 0.8rem; color: var(--pencil); margin: 0 0 4px; }

/* Course map on the home page */
.map { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.map li { display: grid; grid-template-columns: 2.2em 1fr; gap: 10px; align-items: center; background: var(--card); padding: 8px 12px; border-radius: 6px; border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent); }
.map .n { font-family: var(--head); font-size: 1.5rem; color: var(--pen); text-align: center; }
.map small { display: block; color: var(--pencil); font-size: 0.85rem; }

/* Put-in-order list */
.ordered { margin: 8px 0 0; padding-left: 1.6em; display: grid; gap: 4px; min-height: 2em; }
.ordered li { font-family: var(--hand); font-size: 1.1rem; color: var(--pen); }

/* Code shown in an activity */
.code { font-family: var(--mono); font-size: 0.82rem; line-height: 1.55; background: var(--card); border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent); border-radius: 6px; padding: 8px 0; overflow-x: auto; margin: 0; }
.code .ln { display: block; padding: 0 12px; white-space: pre; }
.code .ln.hl { background: var(--hl-yellow); color: var(--on-hl); }
.code .ln.bad { background: var(--note-pink); }
.code .ln.good { background: var(--note-green); }
.code .c { color: var(--pencil); }
.files { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; font-family: var(--mono); font-size: 0.85rem; }
.files button { font: inherit; text-align: left; width: 100%; padding: 4px 8px; border: 1px solid var(--rule); border-radius: 4px; background: var(--card); color: var(--ink); cursor: pointer; }
.files button:hover, .files button.on { background: var(--note-yellow); }
.files .in { padding-left: 1.4em; }

/* Switches */
.switch { display: flex; gap: 8px; align-items: center; padding: 3px 0; cursor: pointer; font-size: 0.95rem; }
.switch input { width: 1.1em; height: 1.1em; accent-color: var(--pen); }
.reply { background: var(--note-blue); border-radius: 12px 12px 12px 2px; padding: 10px 12px; margin-top: 10px; line-height: 1.5; font-size: 0.98rem; color: var(--ink); }
.reply small { display: block; color: var(--pencil); font-size: 0.75rem; }
.reply .warn { color: var(--redpen); }

/* Simple horizontal bars */
.bars { display: grid; gap: 6px; }
.bars .row { display: grid; grid-template-columns: 11em 1fr 2.5em; gap: 8px; align-items: center; font-size: 0.9rem; }
.bars .fill { height: 16px; background: var(--hl-blue); border-radius: 3px; }
.bars .v { font-family: var(--mono); font-size: 0.85rem; }
@media (max-width: 560px) { .bars .row { grid-template-columns: 7.5em 1fr 2.2em; font-size: 0.82rem; } }

/* Sliders */
.slide { display: grid; grid-template-columns: 10em 1fr 6em; gap: 10px; align-items: center; margin: 6px 0; font-size: 0.95rem; }
.slide input[type=range] { width: 100%; accent-color: var(--pen); }
.slide .v { font-family: var(--mono); font-size: 0.9rem; text-align: right; }
@media (max-width: 560px) { .slide { grid-template-columns: 1fr 5em; } .slide input[type=range] { grid-column: 1 / -1; grid-row: 2; } }
.result { font-family: var(--head); font-size: 1.5rem; margin-top: 8px; }
.result small { font-family: var(--body); font-size: 0.85rem; color: var(--pencil); display: block; }

/* 2D map of meanings */
.plane { position: relative; height: 260px; border: 1px solid var(--rule); border-radius: 6px; background: var(--card); margin-top: 8px; }
.plane .pt { position: absolute; transform: translate(-50%, -50%); font-size: 0.78rem; padding: 2px 6px; border-radius: 999px; background: var(--note-yellow); border: 1px solid var(--ink); white-space: nowrap; color: var(--ink); }
.plane .pt.q { background: var(--hl-orange); color: var(--on-hl); font-weight: 700; }
.plane .pt.near { background: var(--hl-green); color: var(--on-hl); }
.plane .pt.dim { opacity: .45; }
@media (max-width: 560px) { .plane { height: 300px; } .plane .pt { font-size: 0.7rem; } }

/* Interview case cards: full width, plain text */
.tree.cards { grid-template-columns: 1fr; }
.cards .row3 { grid-template-columns: 1fr; gap: 6px; }
.cards .cause { padding: 6px 12px; width: 100%; }
.cards .cause .fix { font-family: var(--body); font-size: 0.92rem; color: var(--ink); line-height: 1.45; }

/* A list of links with a note each */
.files .btn { display: inline-block; margin-right: 8px; }
.files li:has(.btn) { padding: 4px 0; }
.files .muted-note { font-family: var(--body); }
