/* A compact entrance followed by an independent, explorable workshop. */
.skills-machines button:focus-visible { outline:3px solid #8c624c; outline-offset:2px; }
.skills-experience { background:#f2ede0; }
.skills-controls { position:absolute; z-index:3; top:auto; right:24px; bottom:22px; left:24px; inset:auto 24px 22px; display:flex; align-items:flex-end; justify-content:space-between; gap:16px; pointer-events:none; }
.skills-detail { pointer-events:auto; flex:0 1 355px; width:min(355px, 34vw); max-height:min(34vh, 260px); overflow:auto; padding:15px 17px; border:1px solid rgba(255,255,255,.74); border-radius:15px; background:rgba(250,248,238,.96); box-shadow:0 6px 24px rgba(49,51,35,.1); }
.skills-detail [hidden] { display:none !important; }
.skills-detail h3 { margin:3px 0 7px; color:#282620; font-size:18px; line-height:1.3; }
.skills-detail p { margin:0; color:#514c40; font-size:13px; line-height:1.6; }
.skills-detail p+p { margin-top:6px; }
.skills-detail strong { color:#302c26; }
.skills-detail .skills-kicker { color:#866c54; font-size:11px; font-weight:800; letter-spacing:.04em; }
.skills-machines { pointer-events:auto; display:flex; flex-wrap:wrap; justify-content:flex-end; gap:6px; }
.skills-machines button { display:inline-flex; align-items:center; justify-content:center; gap:5px; min-width:66px; min-height:44px; padding:8px 11px; border:1px solid rgba(126,110,89,.18); border-radius:10px; background:rgba(250,248,238,.96); color:#514b3f; font:inherit; font-size:12px; font-weight:750; white-space:nowrap; cursor:pointer; }
.skills-machines button span { color:#99816b; font-size:10px; }
.skills-machines button[aria-current] { border-color:#745542; background:#514132; color:#fffdf5; }
.skills-machines button[aria-current] span { color:#e8cbb2; }
@media(max-width:760px) {
  .skills-controls { left:12px; right:12px; bottom:max(12px,env(safe-area-inset-bottom)); flex-direction:column; align-items:stretch; gap:7px; }
  .skills-detail { flex:none; width:min(100%, 360px); max-height:27vh; padding:10px 12px; }
  .skills-detail h3 { margin-bottom:3px; font-size:15px; }
  .skills-detail p { font-size:12px; line-height:1.5; }
  .skills-machines { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:4px; width:100%; }
  .skills-machines button { min-width:0; min-height:44px; padding:5px 2px; font-size:11px; }
  .skills-machines button span { display:none; }
}
@media(max-width:360px) { .skills-machines button { font-size:10px; } }

.skills-source { display:inline-flex; align-items:center; min-height:36px; margin-top:6px; color:#624536; font-size:12px; font-weight:700; text-decoration:underline; text-underline-offset:3px; }
.skills-source:focus-visible { outline:3px solid #8c624c; outline-offset:2px; }
@media(max-width:760px) { .skills-source { min-height:44px; } }

/* A complete, readable process inside the selected machine's panel. */
.skills-detail { flex-basis:410px; width:min(410px,36vw); max-height:min(48vh,400px); overscroll-behavior:contain; scrollbar-width:thin; scrollbar-color:#bcae98 transparent; }
.skills-detail:focus-visible { outline:3px solid #8c624c; outline-offset:2px; }
.skills-actions { display:flex; flex-wrap:wrap; align-items:center; gap:6px 10px; margin:0 0 6px; }
.skills-actions .skills-source { margin:0; min-height:38px; }
.skills-actions .skills-source-primary { padding:6px 11px; border:1px solid #514132; border-radius:8px; background:#514132; color:#fffdf6; text-decoration:none; }
.skills-actions .skills-source-primary:hover { background:#63503e; }
@media(max-width:760px) { .skills-actions .skills-source { min-height:44px; } }
.skills-share { min-height:44px; padding:6px 10px; border:1px solid #c9b9a3; border-radius:8px; background:#fffdf7; color:#514132; font:inherit; font-size:12px; font-weight:700; cursor:pointer; }
.skills-share:hover { background:#f1e9da; }
.skills-share:focus-visible { outline:3px solid #8c624c; outline-offset:2px; }
.skills-detail .skills-flow-label { margin-top:12px; color:#866c54; font-size:11px; font-weight:800; }
.skills-flow { display:grid; gap:10px; margin:8px 0 0; padding:0; list-style:none; counter-reset:skill-step; }
.skills-flow li { position:relative; min-height:28px; padding-left:33px; counter-increment:skill-step; }
.skills-flow li::before { content:counter(skill-step,decimal-leading-zero); position:absolute; left:0; top:0; display:grid; place-items:center; width:24px; height:24px; border-radius:7px; background:#e7dcc9; color:#715442; font-size:10px; font-weight:800; }
.skills-flow li b, .skills-flow li span { display:block; }
.skills-flow li b { margin-bottom:2px; color:#302c26; font-size:12px; line-height:1.35; }
.skills-flow li span { color:#60584b; font-size:12px; line-height:1.5; }
.skills-detail .skills-result { margin-top:12px; padding-top:10px; border-top:1px solid #ded5c7; }
@media(max-width:760px) {
  .skills-detail { width:min(100%,390px); max-height:min(37vh,310px); }
  .skills-detail[data-overview] { max-height:27vh; }
  .skills-actions { margin-bottom:3px; }
  .skills-flow { gap:8px; }
  .skills-flow li b, .skills-flow li span { font-size:12px; }
}
.skills-share-status { flex-basis:100%; color:#625746; font-size:11px; line-height:1.4; overflow-wrap:anywhere; }
@media(max-width:760px) {
  .skills-detail { flex:none; height:auto; }
}

@media(max-width:760px) { .skills-machines { grid-template-columns:repeat(6,minmax(0,1fr)); } }

/* A readable directory stays beside the workshop and its machines. */
.skills-controls { top:92px; right:auto; bottom:20px; left:24px; inset:92px auto 20px 24px; width:min(410px,36vw); display:block; }
.skills-sidebar { pointer-events:auto; display:flex; flex-direction:column; gap:12px; max-height:100%; padding:18px; overflow:hidden; border:1px solid rgba(255,255,255,.86); border-radius:18px; background:rgba(253,251,245,.96); box-shadow:0 10px 30px rgba(42,36,26,.13); }
.skills-directory-heading .skills-kicker { margin:0 0 4px; color:#8f4d34; font-size:12.5px; font-weight:850; letter-spacing:.04em; }
.skills-directory-heading h3 { margin:0; color:#24211b; font-size:21px; line-height:1.25; font-weight:850; }
.skills-machines { display:grid; flex:0 1 auto; grid-template-columns:1fr; justify-content:stretch; gap:6px; min-height:0; overflow:auto; }
.skills-machines button { display:flex; align-items:center; justify-content:space-between; gap:10px; width:100%; min-width:0; min-height:48px; padding:9px 13px; border:1px solid #dfd4c4; border-radius:11px; background:#fffefb; text-align:left; }
.skills-machines button[aria-current] { border-color:#2b2620; background:#2b2620; color:#fffdf8; }
.skills-machines button b { min-width:0; color:inherit; font-size:15px; font-weight:800; line-height:1.25; overflow-wrap:anywhere; }
.skills-machines button small { flex:0 0 auto; color:#655d50; font-size:13px; font-weight:600; line-height:1.25; }
.skills-machines button[aria-current] small { color:#eadfcf; }
.skills-detail { flex:0 1 auto; width:100%; max-height:min(33vh,270px); padding:15px 16px; border:1px solid #e2d8c9; border-radius:12px; background:#fffefb; box-shadow:none; }
.skills-detail h3 { font-size:19px; font-weight:850; overflow-wrap:anywhere; }
.skills-detail p { font-size:14.5px; line-height:1.6; font-weight:600; color:#433e34; }
.skills-detail .skills-actions { margin-top:8px; }
.skills-detail [data-skills-panel="overview"] p { color:#5d5449; }
@media(max-width:760px) {
  .skills-controls { top:auto; right:12px; bottom:12px; left:12px; inset:auto 12px max(12px,env(safe-area-inset-bottom)); width:auto; }
  .skills-sidebar { gap:8px; max-height:min(54vh,430px); padding:12px; }
  .skills-directory-heading .skills-kicker { display:none; }
  .skills-directory-heading h3 { font-size:16px; }
  .skills-machines { grid-template-columns:repeat(2,minmax(0,1fr)); gap:5px; overflow:visible; }
  .skills-machines button { min-height:46px; padding:6px 9px; flex-direction:column; align-items:flex-start; justify-content:center; gap:2px; font-size:13px; white-space:normal; }
  .skills-machines button b, .skills-machines button small { min-width:0; max-width:100%; line-height:1.3; overflow-wrap:anywhere; }
  .skills-machines button b { font-size:14px; }
  .skills-machines button small { font-size:12.5px; }
  .skills-detail { flex:0 1 auto; width:100%; max-height:min(25vh,200px); padding:10px 12px; }
  .skills-detail h3 { font-size:16px; }
  .skills-detail p { font-size:14px; }
  .skills-actions { gap:4px 10px; }
}
/* Keep the directory and details separately scrollable on short screens. */
@media(max-width:760px) {
  .skills-machines { flex:1 1 140px; min-height:48px; grid-auto-rows:minmax(46px,auto); overflow-x:hidden; overflow-y:auto; overscroll-behavior:contain; }
  .skills-detail { flex:1 1 auto; min-height:58px; }
}
@media(max-width:280px) { .skills-machines { grid-template-columns:minmax(0,1fr); } }

.skills-detail .skills-steps { margin-top:8px; color:#6c5b49; font-size:14px; font-weight:650; line-height:1.55; }
/* Rows grow when a phone wraps a skill name or description. */
@media (max-width: 760px) {
  .skills-machines { grid-auto-rows: minmax(84px, max-content); }
  .skills-machines button b, .skills-machines button small { flex: none; }
}
