/* Card-specific styles for the "basics" harbor course (class prefix .hb-basics-).
 * Images are wooden crates of stacked planks (layers); Pods are dashed cabins that sit on ships (nodes). */
.hb-basics-gap { margin-top:12px; }
.hb-basics .hb-log { max-height:280px; }
/* Long values (DB_HOST=…) wrap inside a narrow ship instead of pushing the page sideways. */
.hb-basics .hb-ship-flags .hb-chip { white-space:normal; overflow-wrap:anywhere; max-width:100%; }

/* Image crate: base OS at the bottom, the app on top. */
.hb-basics-crate { padding:7px 8px 8px; border:3px solid #b59c61; border-radius:13px; background:linear-gradient(#fff7d8,#f2dfac); box-shadow:inset 0 2px 0 #fffbe9,0 5px 0 #ab905b; color:#4b553d; min-width:0; }
.hb-basics-crate-top { display:flex; justify-content:space-between; align-items:center; gap:8px; margin:0 2px 6px; font:800 12px var(--mono); color:#5b4a26; }
.hb-basics-crate-top span { font-weight:700; color:#7a6331; }
.hb-basics-planks { display:flex; flex-direction:column; gap:3px; }
.hb-basics-plank { --c:#b3bfbb; --bg:#eef1ef; display:flex; justify-content:space-between; align-items:center; gap:8px; min-height:26px; padding:3px 9px; border:1.5px solid #c8b583; border-left:7px solid var(--c); border-radius:6px; background:var(--bg); font:700 11.5px var(--mono); color:#3f4a38; }
.hb-basics-plank b { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.hb-basics-plank small { flex-shrink:0; font:700 10.5px var(--mono); color:#6b7159; }
.hb-basics-plank.c-gold { --c:#efaa42; --bg:#fff1c9; }
.hb-basics-plank.c-sky { --c:#7cc0dc; --bg:#e3f3f9; }
.hb-basics-plank.c-violet { --c:#b49ad8; --bg:#efe8f8; }
.hb-basics-plank.c-mint { --c:#8fcfa8; --bg:#e4f5ea; }
.hb-basics-plank.c-slate { --c:#97a5a1; --bg:#eef1ef; }
.hb-basics-plank.c-coral { --c:#ec9a76; --bg:#fbe6dc; }
.hb-basics-plank.fresh { animation:hb-basics-stack .5s cubic-bezier(.2,.8,.3,1) both; animation-delay:calc(var(--i) * .12s); }
/* A failed build: the RUN that failed is marked, the layers above it were never built. */
.hb-basics-crate.failed { border-color:#c38a7c; box-shadow:inset 0 2px 0 #fffbe9,0 5px 0 #b77f6f; }
.hb-basics-crate.failed .hb-basics-crate-top span { color:#9c3d2d; }
.hb-basics-plank.bad { --c:#d97f5b; --bg:#f8e1da; border-color:#c38a7c; color:#9c3d2d; animation:st-shake .4s; }
.hb-basics-plank.bad small { color:#9c3d2d; }
.hb-basics-plank.skip { border-style:dashed; opacity:.5; filter:grayscale(1); }
/* A warning riding on a layer (a password anyone who pulls the image can read). */
.hb-basics-plank .hb-chip { margin-left:auto; font-size:10px; padding:0 6px; flex-shrink:1; min-width:0; white-space:normal; }
.hb-basics-inject { display:flex; justify-content:center; margin-top:8px; }
.hb-basics-inject .hb-chip { white-space:normal; overflow-wrap:anywhere; max-width:100%; }
.hb-basics-crate.small { padding:5px 6px 6px; border-width:2px; border-radius:10px; box-shadow:0 3px 0 #ab905b; max-width:170px; margin:0 auto; width:100%; }
.hb-basics-crate.small .hb-basics-crate-top { font-size:10px; margin-bottom:4px; }
.hb-basics-crate.small .hb-basics-plank { min-height:17px; padding:1px 6px; border-left-width:5px; font-size:9.5px; }

/* Image on the left, node on the right. */
.hb-basics-dock { display:grid; grid-template-columns:minmax(0,1fr) auto minmax(0,1fr); gap:14px; align-items:center; }
.hb-basics-imagecol { min-width:0; }
.hb-basics-arrow { font:800 26px var(--mono); color:#4f7f86; }
.hb-basics-solo { grid-template-columns:minmax(0,1fr); padding-bottom:16px; }
.hb-basics-solo.wide { max-width:560px; margin:0 auto; }

/* Pod cabin: a dashed deck house holding container cubes. */
.hb-basics-cabin { position:relative; margin-top:10px; padding:7px 8px 8px; border:2px dashed #6f9ea0; border-radius:12px; background:#f2faf1; min-width:0; transition:border-color .3s; }
.hb-basics-cabin.fresh { animation:hb-drop .65s cubic-bezier(.2,.8,.3,1) both; border-color:#a98048; background:#fff6dc; }
.hb-basics-cabin.warn { border-color:#c38a7c; }
.hb-basics-cabin-top { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:4px; margin-bottom:5px; font:800 11px var(--mono); color:#2b5a66; }
.hb-basics-cabin-top .hb-chip { font-size:10px; padding:1px 5px; }
.hb-basics-crew { display:flex; flex-wrap:wrap; justify-content:center; gap:6px; }
.hb-basics-ctr { display:flex; flex-direction:column; align-items:center; gap:2px; min-width:52px; max-width:100%; padding:4px 5px 5px; border:1.5px solid #b8c6b3; border-radius:9px; background:#fffdf4; }
.hb-basics-ctr svg { width:28px; height:31px; }
.hb-basics-ctr small { font:700 10px var(--mono); color:#3f5d57; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.hb-basics-ctr .hb-chip { font-size:9.5px; padding:0 5px; }
.hb-basics-ctr.ok { border-color:#6aa274; background:#eef8e8; }
.hb-basics-ctr.bad { border-color:#c38a7c; background:#fbe9e3; animation:st-shake .4s; }
.hb-basics-vol { margin-top:6px; padding:2px 8px; border-radius:7px; background:repeating-linear-gradient(90deg,#d9eef8 0 10px,#cbe6f3 10px 20px); border:1.5px solid #5a8fae; font:700 10px var(--mono); color:#245470; text-align:center; overflow-wrap:anywhere; }

/* Request path under the cabin in the ports stage. */
.hb-basics-route { display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:5px; margin-top:10px; padding:7px 8px; border:1.5px dashed #b9c1ab; border-radius:10px; background:#fffdf4; font:700 11px var(--mono); color:#3f5d57; }
.hb-basics-route i { font-style:normal; color:#4f7f86; }
.hb-basics-route b { font-size:11px; }
.hb-basics-route.ok b { color:#2d694b; }
.hb-basics-route.bad b { color:#9c3d2d; }

/* Small versions for the demo porthole. */
.hb-basics-cabin.small { margin:0; padding:4px 5px 5px; border-radius:9px; }
.hb-basics-cabin.small .hb-basics-cabin-top { font-size:9px; margin-bottom:3px; }
.hb-basics-cabin.small .hb-basics-cabin-top .hb-chip { font-size:8.5px; }
.hb-basics-cabin.small .hb-basics-crew { gap:3px; }
.hb-basics-cabin.small .hb-basics-ctr { min-width:0; padding:2px 3px; border-radius:7px; }
.hb-basics-cabin.small .hb-basics-ctr svg { width:18px; height:20px; }
.hb-basics-cabin.small .hb-basics-ctr small { font-size:8.5px; }
.hb-basics-cabin.small .hb-basics-ctr .hb-chip { font-size:8px; padding:0 3px; }
.hb-basics-cabin.small .hb-basics-vol { font-size:8.5px; margin-top:4px; padding:1px 4px; }
.hb-mini-scene.hb-basics-tight { gap:6px; }
/* Demo flags are short words: keep each whole instead of breaking it mid-word in a narrow porthole. */
.hb-basics-scene .hb-mini-flags .hb-chip { font-size:8px; padding:0 3px; white-space:nowrap; overflow-wrap:normal; }
/* Frames with a single cabin have room for readable labels. */
.hb-basics-roomy { gap:12px; }
.hb-basics-roomy .hb-basics-cabin.small { padding:7px 7px 8px; border-radius:11px; }
.hb-basics-roomy .hb-basics-cabin.small .hb-basics-cabin-top { font-size:11px; margin-bottom:6px; }
.hb-basics-roomy .hb-basics-cabin.small .hb-basics-cabin-top .hb-chip { font-size:10px; }
.hb-basics-roomy .hb-basics-cabin.small .hb-basics-crew { gap:5px; }
.hb-basics-roomy .hb-basics-cabin.small .hb-basics-ctr { padding:4px 4px 5px; }
.hb-basics-roomy .hb-basics-cabin.small .hb-basics-ctr svg { width:26px; height:29px; }
.hb-basics-roomy .hb-basics-cabin.small .hb-basics-ctr small { font-size:10px; }
.hb-basics-roomy .hb-basics-cabin.small .hb-basics-ctr .hb-chip { font-size:9.5px; padding:0 4px; }
.hb-basics-roomy .hb-basics-cabin.small .hb-basics-vol { font-size:10px; margin-top:6px; padding:2px 6px; }
.hb-basics-crate.tiny { padding:4px 5px 5px; }
.hb-basics-crate.tiny .hb-basics-crate-top { margin-bottom:2px; }
.hb-basics-crate.tiny .hb-basics-planks { gap:2px; }
.hb-basics-crate.tiny .hb-basics-plank { min-height:12px; padding:0 6px; font-size:8.5px; line-height:1.3; }
.hb-basics-hull { display:flex; flex-direction:column; gap:4px; min-height:54px; }
.hb-basics-berth { flex:1; min-height:44px; border:1.5px dashed #9cb1a0; border-radius:8px; background:#fffdf4; }
.hb-basics-hull .hb-basics-cabin.small { padding:3px; }
.hb-basics-hull .hb-basics-cabin.small .hb-basics-ctr { padding:1px; border:0; background:none; }
.hb-basics-hull .hb-basics-cabin.small .hb-basics-ctr svg { width:15px; height:17px; }
.hb-basics-hull .hb-basics-cabin-top { justify-content:center; font-size:8px; }

@keyframes hb-basics-stack { from { opacity:0; transform:translateY(-22px); } 70% { opacity:1; transform:translateY(2px); } to { transform:none; } }

@media(max-width:640px) {
  .hb-basics-dock { grid-template-columns:minmax(0,1fr); }
  .hb-basics-arrow { text-align:center; transform:rotate(90deg); }
}
